v-code-diff 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -8
- package/dist/v2/index.cjs.js +12 -12
- package/dist/v2/index.es.js +440 -422
- package/dist/v2/index.umd.js +12 -12
- package/dist/v2.7/index.cjs.js +11 -11
- package/dist/v2.7/index.es.js +510 -492
- package/dist/v2.7/index.umd.js +9 -9
- package/dist/v3/index.cjs.js +15 -15
- package/dist/v3/index.es.js +1264 -1248
- package/dist/v3/index.umd.js +15 -15
- package/package.json +13 -20
- package/scripts/postinstall.js +6 -3
- package/scripts/utils.js +2 -2
- package/src/CodeDiff.vue +32 -6
- package/src/global.ts +1 -1
- package/src/index.ts +1 -1
- package/src/split/SplitLine.vue +3 -2
- package/src/types.ts +1 -1
- package/src/unified/UnifiedLine.vue +2 -2
- package/src/utils.ts +3 -3
package/dist/v3/index.es.js
CHANGED
|
@@ -1,211 +1,212 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view{--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #24292f;--color-diff-blob-addition-fg: #24292f;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #24292f;--color-diff-blob-deletion-fg: #24292f;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #57606a;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(27,31,36,.15);--color-diffstat-addition-border: rgba(27,31,36,.15);--color-diffstat-addition-bg: #2da44e;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #8250df;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #24292f;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #57606a;--color-codemirror-cursor: #24292f;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #24292f;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #2da44e;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(27,31,36,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(27,31,36,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: -2px -2px 0 rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(27,31,36,.12), 0 8px 24px rgba(66,74,83,.12);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(27,31,36,.15);--color-btn-shadow: 0 1px 0 rgba(27,31,36,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(27,31,36,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(27,31,36,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-focus-bg: #f6f8fa;--color-btn-focus-border: rgba(27,31,36,.15);--color-btn-focus-shadow: 0 0 0 3px rgba(9,105,218,.3);--color-btn-shadow-active: inset 0 .15em .3em rgba(27,31,36,.15);--color-btn-shadow-input-focus: 0 0 0 .2em rgba(9,105,218,.3);--color-btn-counter-bg: rgba(27,31,36,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #2da44e;--color-btn-primary-border: rgba(27,31,36,.15);--color-btn-primary-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #2c974b;--color-btn-primary-hover-border: rgba(27,31,36,.15);--color-btn-primary-selected-bg: hsla(137,55%,36%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(27,31,36,.15);--color-btn-primary-focus-bg: #2da44e;--color-btn-primary-focus-border: rgba(27,31,36,.15);--color-btn-primary-focus-shadow: 0 0 0 3px rgba(45,164,78,.4);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(255,255,255,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(27,31,36,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(27,31,36,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-focus-border: rgba(27,31,36,.15);--color-btn-outline-focus-shadow: 0 0 0 3px rgba(5,80,174,.4);--color-btn-outline-counter-bg: rgba(9,105,218,.1);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(27,31,36,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(27,31,36,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-focus-border: rgba(27,31,36,.15);--color-btn-danger-focus-shadow: 0 0 0 3px rgba(164,14,38,.4);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #cf222e;--color-switch-track-bg: #eaeef2;--color-switch-track-border: #afb8c1;--color-switch-track-checked-bg: #ddf4ff;--color-switch-track-checked-hover-bg: #b6e3ff;--color-switch-track-checked-active-bg: #80ccff;--color-switch-track-checked-border: #54aeff;--color-switch-knob-checked-bg: #0969da;--color-switch-knob-checked-disabled-bg: #6e7781;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #6e7781;--color-fg-default: #24292f;--color-fg-muted: #57606a;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(27,31,36,.15);--color-shadow-small: 0 1px 0 rgba(27,31,36,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #2da44e;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #bf8700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #cf222e;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #2da44e;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #cf222e;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(27,31,36,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(27,31,36,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-primer-shadow-focus: 0 0 0 3px rgba(9,105,218,.3);--color-scale-black: #1b1f24;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .filename{font-size:13px;color:var(--color-fg-default)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as ye, openBlock as W, createElementBlock as j, createElementVNode as P, normalizeClass as be, unref as z, toDisplayString as he, createCommentVNode as fn, Fragment as ge, renderList as Fe, createBlock as Oe, computed as pe, ref as Un, watch as Pn, normalizeStyle as xn } from "vue";
|
|
3
3
|
function re() {
|
|
4
4
|
}
|
|
5
5
|
re.prototype = {
|
|
6
|
-
diff: function(
|
|
6
|
+
diff: function(r, o) {
|
|
7
7
|
var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, h = u.callback;
|
|
8
8
|
typeof u == "function" && (h = u, u = {}), this.options = u;
|
|
9
9
|
var n = this;
|
|
10
|
-
function
|
|
10
|
+
function t(p) {
|
|
11
11
|
return h ? (setTimeout(function() {
|
|
12
12
|
h(void 0, p);
|
|
13
13
|
}, 0), !0) : p;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
var i =
|
|
17
|
-
u.maxEditLength && (
|
|
15
|
+
r = this.castInput(r), o = this.castInput(o), r = this.removeEmpty(this.tokenize(r)), o = this.removeEmpty(this.tokenize(o));
|
|
16
|
+
var i = o.length, a = r.length, s = 1, l = i + a;
|
|
17
|
+
u.maxEditLength && (l = Math.min(l, u.maxEditLength));
|
|
18
18
|
var c = [{
|
|
19
19
|
newPos: -1,
|
|
20
20
|
components: []
|
|
21
|
-
}], f = this.extractCommon(c[0],
|
|
22
|
-
if (c[0].newPos + 1 >= i && f + 1 >=
|
|
23
|
-
return
|
|
24
|
-
value: this.join(
|
|
25
|
-
count:
|
|
21
|
+
}], f = this.extractCommon(c[0], o, r, 0);
|
|
22
|
+
if (c[0].newPos + 1 >= i && f + 1 >= a)
|
|
23
|
+
return t([{
|
|
24
|
+
value: this.join(o),
|
|
25
|
+
count: o.length
|
|
26
26
|
}]);
|
|
27
27
|
function g() {
|
|
28
|
-
for (var p = -1 *
|
|
29
|
-
var b = void 0, E = c[p - 1], v = c[p + 1],
|
|
28
|
+
for (var p = -1 * s; p <= s; p += 2) {
|
|
29
|
+
var b = void 0, E = c[p - 1], v = c[p + 1], w = (v ? v.newPos : 0) - p;
|
|
30
30
|
E && (c[p - 1] = void 0);
|
|
31
|
-
var m = E && E.newPos + 1 < i, D = v && 0 <=
|
|
31
|
+
var m = E && E.newPos + 1 < i, D = v && 0 <= w && w < a;
|
|
32
32
|
if (!m && !D) {
|
|
33
33
|
c[p] = void 0;
|
|
34
34
|
continue;
|
|
35
35
|
}
|
|
36
|
-
if (!m || D && E.newPos < v.newPos ? (b =
|
|
37
|
-
return
|
|
36
|
+
if (!m || D && E.newPos < v.newPos ? (b = Fn(v), n.pushComponent(b.components, void 0, !0)) : (b = E, b.newPos++, n.pushComponent(b.components, !0, void 0)), w = n.extractCommon(b, o, r, p), b.newPos + 1 >= i && w + 1 >= a)
|
|
37
|
+
return t(Hn(n, b.components, o, r, n.useLongestToken));
|
|
38
38
|
c[p] = b;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
s++;
|
|
41
41
|
}
|
|
42
42
|
if (h)
|
|
43
43
|
(function p() {
|
|
44
44
|
setTimeout(function() {
|
|
45
|
-
if (
|
|
45
|
+
if (s > l)
|
|
46
46
|
return h();
|
|
47
47
|
g() || p();
|
|
48
48
|
}, 0);
|
|
49
49
|
})();
|
|
50
50
|
else
|
|
51
|
-
for (;
|
|
51
|
+
for (; s <= l; ) {
|
|
52
52
|
var d = g();
|
|
53
53
|
if (d)
|
|
54
54
|
return d;
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
pushComponent: function(
|
|
58
|
-
var h =
|
|
59
|
-
h && h.added ===
|
|
57
|
+
pushComponent: function(r, o, u) {
|
|
58
|
+
var h = r[r.length - 1];
|
|
59
|
+
h && h.added === o && h.removed === u ? r[r.length - 1] = {
|
|
60
60
|
count: h.count + 1,
|
|
61
|
-
added:
|
|
61
|
+
added: o,
|
|
62
62
|
removed: u
|
|
63
|
-
} :
|
|
63
|
+
} : r.push({
|
|
64
64
|
count: 1,
|
|
65
|
-
added:
|
|
65
|
+
added: o,
|
|
66
66
|
removed: u
|
|
67
67
|
});
|
|
68
68
|
},
|
|
69
|
-
extractCommon: function(
|
|
70
|
-
for (var n =
|
|
71
|
-
i++,
|
|
72
|
-
return
|
|
73
|
-
count:
|
|
74
|
-
}),
|
|
69
|
+
extractCommon: function(r, o, u, h) {
|
|
70
|
+
for (var n = o.length, t = u.length, i = r.newPos, a = i - h, s = 0; i + 1 < n && a + 1 < t && this.equals(o[i + 1], u[a + 1]); )
|
|
71
|
+
i++, a++, s++;
|
|
72
|
+
return s && r.components.push({
|
|
73
|
+
count: s
|
|
74
|
+
}), r.newPos = i, a;
|
|
75
75
|
},
|
|
76
|
-
equals: function(
|
|
77
|
-
return this.options.comparator ? this.options.comparator(
|
|
76
|
+
equals: function(r, o) {
|
|
77
|
+
return this.options.comparator ? this.options.comparator(r, o) : r === o || this.options.ignoreCase && r.toLowerCase() === o.toLowerCase();
|
|
78
78
|
},
|
|
79
|
-
removeEmpty: function(
|
|
80
|
-
for (var
|
|
81
|
-
|
|
82
|
-
return
|
|
79
|
+
removeEmpty: function(r) {
|
|
80
|
+
for (var o = [], u = 0; u < r.length; u++)
|
|
81
|
+
r[u] && o.push(r[u]);
|
|
82
|
+
return o;
|
|
83
83
|
},
|
|
84
|
-
castInput: function(
|
|
85
|
-
return
|
|
84
|
+
castInput: function(r) {
|
|
85
|
+
return r;
|
|
86
86
|
},
|
|
87
|
-
tokenize: function(
|
|
88
|
-
return
|
|
87
|
+
tokenize: function(r) {
|
|
88
|
+
return r.split("");
|
|
89
89
|
},
|
|
90
|
-
join: function(
|
|
91
|
-
return
|
|
90
|
+
join: function(r) {
|
|
91
|
+
return r.join("");
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
function
|
|
95
|
-
for (var n = 0,
|
|
96
|
-
var
|
|
97
|
-
if (
|
|
98
|
-
if (
|
|
99
|
-
var c =
|
|
100
|
-
|
|
94
|
+
function Hn(e, r, o, u, h) {
|
|
95
|
+
for (var n = 0, t = r.length, i = 0, a = 0; n < t; n++) {
|
|
96
|
+
var s = r[n];
|
|
97
|
+
if (s.removed) {
|
|
98
|
+
if (s.value = e.join(u.slice(a, a + s.count)), a += s.count, n && r[n - 1].added) {
|
|
99
|
+
var c = r[n - 1];
|
|
100
|
+
r[n - 1] = r[n], r[n] = c;
|
|
101
101
|
}
|
|
102
102
|
} else {
|
|
103
|
-
if (!
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
var p = u[
|
|
103
|
+
if (!s.added && h) {
|
|
104
|
+
var l = o.slice(i, i + s.count);
|
|
105
|
+
l = l.map(function(g, d) {
|
|
106
|
+
var p = u[a + d];
|
|
107
107
|
return p.length > g.length ? p : g;
|
|
108
|
-
}),
|
|
108
|
+
}), s.value = e.join(l);
|
|
109
109
|
} else
|
|
110
|
-
|
|
111
|
-
i +=
|
|
110
|
+
s.value = e.join(o.slice(i, i + s.count));
|
|
111
|
+
i += s.count, s.added || (a += s.count);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
var f = t
|
|
115
|
-
return
|
|
114
|
+
var f = r[t - 1];
|
|
115
|
+
return t > 1 && typeof f.value == "string" && (f.added || f.removed) && e.equals("", f.value) && (r[t - 2].value += f.value, r.pop()), r;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Fn(e) {
|
|
118
118
|
return {
|
|
119
119
|
newPos: e.newPos,
|
|
120
120
|
components: e.components.slice(0)
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
var zn = new re();
|
|
124
|
-
function
|
|
125
|
-
return zn.diff(e,
|
|
124
|
+
function Gn(e, r, o) {
|
|
125
|
+
return zn.diff(e, r, o);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Kn(e, r) {
|
|
128
128
|
if (typeof e == "function")
|
|
129
|
-
|
|
129
|
+
r.callback = e;
|
|
130
130
|
else if (e)
|
|
131
|
-
for (var
|
|
132
|
-
e.hasOwnProperty(
|
|
133
|
-
return
|
|
131
|
+
for (var o in e)
|
|
132
|
+
e.hasOwnProperty(o) && (r[o] = e[o]);
|
|
133
|
+
return r;
|
|
134
134
|
}
|
|
135
|
-
var qe = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, en = /\S/,
|
|
136
|
-
|
|
137
|
-
return this.options.ignoreCase && (e = e.toLowerCase(),
|
|
135
|
+
var qe = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, en = /\S/, ze = new re();
|
|
136
|
+
ze.equals = function(e, r) {
|
|
137
|
+
return this.options.ignoreCase && (e = e.toLowerCase(), r = r.toLowerCase()), e === r || this.options.ignoreWhitespace && !en.test(e) && !en.test(r);
|
|
138
138
|
};
|
|
139
|
-
|
|
140
|
-
for (var
|
|
141
|
-
!
|
|
142
|
-
return
|
|
139
|
+
ze.tokenize = function(e) {
|
|
140
|
+
for (var r = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), o = 0; o < r.length - 1; o++)
|
|
141
|
+
!r[o + 1] && r[o + 2] && qe.test(r[o]) && qe.test(r[o + 2]) && (r[o] += r[o + 2], r.splice(o + 1, 2), o--);
|
|
142
|
+
return r;
|
|
143
143
|
};
|
|
144
|
-
function
|
|
145
|
-
return
|
|
144
|
+
function Wn(e, r, o) {
|
|
145
|
+
return o = Kn(o, {
|
|
146
146
|
ignoreWhitespace: !0
|
|
147
|
-
}),
|
|
147
|
+
}), ze.diff(e, r, o);
|
|
148
148
|
}
|
|
149
149
|
var gn = new re();
|
|
150
150
|
gn.tokenize = function(e) {
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
-
for (var u = 0; u <
|
|
154
|
-
var h =
|
|
155
|
-
u % 2 && !this.options.newlineIsToken ?
|
|
151
|
+
var r = [], o = e.split(/(\n|\r\n)/);
|
|
152
|
+
o[o.length - 1] || o.pop();
|
|
153
|
+
for (var u = 0; u < o.length; u++) {
|
|
154
|
+
var h = o[u];
|
|
155
|
+
u % 2 && !this.options.newlineIsToken ? r[r.length - 1] += h : (this.options.ignoreWhitespace && (h = h.trim()), r.push(h));
|
|
156
156
|
}
|
|
157
|
-
return
|
|
158
|
-
};
|
|
159
|
-
var Wn = new re();
|
|
160
|
-
Wn.tokenize = function(e) {
|
|
161
|
-
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
157
|
+
return r;
|
|
162
158
|
};
|
|
163
159
|
var Qn = new re();
|
|
164
160
|
Qn.tokenize = function(e) {
|
|
161
|
+
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
162
|
+
};
|
|
163
|
+
var Zn = new re();
|
|
164
|
+
Zn.tokenize = function(e) {
|
|
165
165
|
return e.split(/([{}:;,]|\s+)/);
|
|
166
166
|
};
|
|
167
|
-
function
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
function Re(e) {
|
|
168
|
+
"@babel/helpers - typeof";
|
|
169
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Re = function(r) {
|
|
170
|
+
return typeof r;
|
|
171
|
+
} : Re = function(r) {
|
|
172
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
173
|
+
}, Re(e);
|
|
173
174
|
}
|
|
174
|
-
var
|
|
175
|
+
var Yn = Object.prototype.toString, _e = new re();
|
|
175
176
|
_e.useLongestToken = !0;
|
|
176
177
|
_e.tokenize = gn.tokenize;
|
|
177
178
|
_e.castInput = function(e) {
|
|
178
|
-
var
|
|
179
|
-
return typeof
|
|
179
|
+
var r = this.options, o = r.undefinedReplacement, u = r.stringifyReplacer, h = u === void 0 ? function(n, t) {
|
|
180
|
+
return typeof t == "undefined" ? o : t;
|
|
180
181
|
} : u;
|
|
181
182
|
return typeof e == "string" ? e : JSON.stringify(xe(e, null, null, h), h, " ");
|
|
182
183
|
};
|
|
183
|
-
_e.equals = function(e,
|
|
184
|
-
return re.prototype.equals.call(_e, e.replace(/,([\r\n])/g, "$1"),
|
|
184
|
+
_e.equals = function(e, r) {
|
|
185
|
+
return re.prototype.equals.call(_e, e.replace(/,([\r\n])/g, "$1"), r.replace(/,([\r\n])/g, "$1"));
|
|
185
186
|
};
|
|
186
|
-
function xe(e,
|
|
187
|
-
|
|
187
|
+
function xe(e, r, o, u, h) {
|
|
188
|
+
r = r || [], o = o || [], u && (e = u(h, e));
|
|
188
189
|
var n;
|
|
189
|
-
for (n = 0; n <
|
|
190
|
-
if (
|
|
191
|
-
return
|
|
192
|
-
var
|
|
193
|
-
if (
|
|
194
|
-
for (
|
|
195
|
-
|
|
196
|
-
return
|
|
190
|
+
for (n = 0; n < r.length; n += 1)
|
|
191
|
+
if (r[n] === e)
|
|
192
|
+
return o[n];
|
|
193
|
+
var t;
|
|
194
|
+
if (Yn.call(e) === "[object Array]") {
|
|
195
|
+
for (r.push(e), t = new Array(e.length), o.push(t), n = 0; n < e.length; n += 1)
|
|
196
|
+
t[n] = xe(e[n], r, o, u, h);
|
|
197
|
+
return r.pop(), o.pop(), t;
|
|
197
198
|
}
|
|
198
|
-
if (e && e.toJSON && (e = e.toJSON()),
|
|
199
|
-
|
|
200
|
-
var i = [],
|
|
201
|
-
for (
|
|
202
|
-
e.hasOwnProperty(
|
|
199
|
+
if (e && e.toJSON && (e = e.toJSON()), Re(e) === "object" && e !== null) {
|
|
200
|
+
r.push(e), t = {}, o.push(t);
|
|
201
|
+
var i = [], a;
|
|
202
|
+
for (a in e)
|
|
203
|
+
e.hasOwnProperty(a) && i.push(a);
|
|
203
204
|
for (i.sort(), n = 0; n < i.length; n += 1)
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
a = i[n], t[a] = xe(e[a], r, o, u, a);
|
|
206
|
+
r.pop(), o.pop();
|
|
206
207
|
} else
|
|
207
|
-
|
|
208
|
-
return
|
|
208
|
+
t = e;
|
|
209
|
+
return t;
|
|
209
210
|
}
|
|
210
211
|
var He = new re();
|
|
211
212
|
He.tokenize = function(e) {
|
|
@@ -214,85 +215,81 @@ He.tokenize = function(e) {
|
|
|
214
215
|
He.join = He.removeEmpty = function(e) {
|
|
215
216
|
return e;
|
|
216
217
|
};
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
set exports(e) {
|
|
222
|
-
be = e;
|
|
223
|
-
}
|
|
224
|
-
};
|
|
218
|
+
function Xn(e) {
|
|
219
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
220
|
+
}
|
|
221
|
+
var hn = { exports: {} };
|
|
225
222
|
(function(e) {
|
|
226
|
-
var
|
|
223
|
+
var r = function() {
|
|
227
224
|
this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = 0.5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = 0.5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
|
|
228
|
-
},
|
|
229
|
-
|
|
230
|
-
return [n,
|
|
231
|
-
},
|
|
232
|
-
typeof
|
|
233
|
-
var
|
|
234
|
-
if (n == null ||
|
|
225
|
+
}, o = -1, u = 1, h = 0;
|
|
226
|
+
r.Diff = function(n, t) {
|
|
227
|
+
return [n, t];
|
|
228
|
+
}, r.prototype.diff_main = function(n, t, i, a) {
|
|
229
|
+
typeof a == "undefined" && (this.Diff_Timeout <= 0 ? a = Number.MAX_VALUE : a = (/* @__PURE__ */ new Date()).getTime() + this.Diff_Timeout * 1e3);
|
|
230
|
+
var s = a;
|
|
231
|
+
if (n == null || t == null)
|
|
235
232
|
throw new Error("Null input. (diff_main)");
|
|
236
|
-
if (n ==
|
|
237
|
-
return n ? [new
|
|
233
|
+
if (n == t)
|
|
234
|
+
return n ? [new r.Diff(h, n)] : [];
|
|
238
235
|
typeof i == "undefined" && (i = !0);
|
|
239
|
-
var
|
|
240
|
-
n = n.substring(c),
|
|
236
|
+
var l = i, c = this.diff_commonPrefix(n, t), f = n.substring(0, c);
|
|
237
|
+
n = n.substring(c), t = t.substring(c), c = this.diff_commonSuffix(n, t);
|
|
241
238
|
var g = n.substring(n.length - c);
|
|
242
|
-
n = n.substring(0, n.length - c),
|
|
243
|
-
var d = this.diff_compute_(n,
|
|
244
|
-
return f && d.unshift(new
|
|
245
|
-
},
|
|
246
|
-
var
|
|
239
|
+
n = n.substring(0, n.length - c), t = t.substring(0, t.length - c);
|
|
240
|
+
var d = this.diff_compute_(n, t, l, s);
|
|
241
|
+
return f && d.unshift(new r.Diff(h, f)), g && d.push(new r.Diff(h, g)), this.diff_cleanupMerge(d), d;
|
|
242
|
+
}, r.prototype.diff_compute_ = function(n, t, i, a) {
|
|
243
|
+
var s;
|
|
247
244
|
if (!n)
|
|
248
|
-
return [new
|
|
249
|
-
if (!
|
|
250
|
-
return [new
|
|
251
|
-
var
|
|
245
|
+
return [new r.Diff(u, t)];
|
|
246
|
+
if (!t)
|
|
247
|
+
return [new r.Diff(o, n)];
|
|
248
|
+
var l = n.length > t.length ? n : t, c = n.length > t.length ? t : n, f = l.indexOf(c);
|
|
252
249
|
if (f != -1)
|
|
253
|
-
return
|
|
254
|
-
new
|
|
255
|
-
new
|
|
256
|
-
new
|
|
250
|
+
return s = [
|
|
251
|
+
new r.Diff(u, l.substring(0, f)),
|
|
252
|
+
new r.Diff(h, c),
|
|
253
|
+
new r.Diff(
|
|
257
254
|
u,
|
|
258
|
-
|
|
255
|
+
l.substring(f + c.length)
|
|
259
256
|
)
|
|
260
|
-
], n.length >
|
|
257
|
+
], n.length > t.length && (s[0][0] = s[2][0] = o), s;
|
|
261
258
|
if (c.length == 1)
|
|
262
259
|
return [
|
|
263
|
-
new
|
|
264
|
-
new
|
|
260
|
+
new r.Diff(o, n),
|
|
261
|
+
new r.Diff(u, t)
|
|
265
262
|
];
|
|
266
|
-
var g = this.diff_halfMatch_(n,
|
|
263
|
+
var g = this.diff_halfMatch_(n, t);
|
|
267
264
|
if (g) {
|
|
268
|
-
var d = g[0], p = g[1], b = g[2], E = g[3], v = g[4],
|
|
269
|
-
return
|
|
270
|
-
[new
|
|
265
|
+
var d = g[0], p = g[1], b = g[2], E = g[3], v = g[4], w = this.diff_main(d, b, i, a), m = this.diff_main(p, E, i, a);
|
|
266
|
+
return w.concat(
|
|
267
|
+
[new r.Diff(h, v)],
|
|
271
268
|
m
|
|
272
269
|
);
|
|
273
270
|
}
|
|
274
|
-
return i && n.length > 100 &&
|
|
275
|
-
},
|
|
276
|
-
var
|
|
277
|
-
n =
|
|
278
|
-
var
|
|
279
|
-
this.diff_charsToLines_(
|
|
280
|
-
for (var c = 0, f = 0, g = 0, d = "", p = ""; c <
|
|
281
|
-
switch (
|
|
271
|
+
return i && n.length > 100 && t.length > 100 ? this.diff_lineMode_(n, t, a) : this.diff_bisect_(n, t, a);
|
|
272
|
+
}, r.prototype.diff_lineMode_ = function(n, t, i) {
|
|
273
|
+
var a = this.diff_linesToChars_(n, t);
|
|
274
|
+
n = a.chars1, t = a.chars2;
|
|
275
|
+
var s = a.lineArray, l = this.diff_main(n, t, !1, i);
|
|
276
|
+
this.diff_charsToLines_(l, s), this.diff_cleanupSemantic(l), l.push(new r.Diff(h, ""));
|
|
277
|
+
for (var c = 0, f = 0, g = 0, d = "", p = ""; c < l.length; ) {
|
|
278
|
+
switch (l[c][0]) {
|
|
282
279
|
case u:
|
|
283
|
-
g++, p +=
|
|
280
|
+
g++, p += l[c][1];
|
|
284
281
|
break;
|
|
285
|
-
case
|
|
286
|
-
f++, d +=
|
|
282
|
+
case o:
|
|
283
|
+
f++, d += l[c][1];
|
|
287
284
|
break;
|
|
288
285
|
case h:
|
|
289
286
|
if (f >= 1 && g >= 1) {
|
|
290
|
-
|
|
287
|
+
l.splice(
|
|
291
288
|
c - f - g,
|
|
292
289
|
f + g
|
|
293
290
|
), c = c - f - g;
|
|
294
291
|
for (var b = this.diff_main(d, p, !1, i), E = b.length - 1; E >= 0; E--)
|
|
295
|
-
|
|
292
|
+
l.splice(c, 0, b[E]);
|
|
296
293
|
c = c + b.length;
|
|
297
294
|
}
|
|
298
295
|
g = 0, f = 0, d = "", p = "";
|
|
@@ -300,296 +297,296 @@ var be = {}, Yn = {
|
|
|
300
297
|
}
|
|
301
298
|
c++;
|
|
302
299
|
}
|
|
303
|
-
return
|
|
304
|
-
},
|
|
305
|
-
for (var
|
|
300
|
+
return l.pop(), l;
|
|
301
|
+
}, r.prototype.diff_bisect_ = function(n, t, i) {
|
|
302
|
+
for (var a = n.length, s = t.length, l = Math.ceil((a + s) / 2), c = l, f = 2 * l, g = new Array(f), d = new Array(f), p = 0; p < f; p++)
|
|
306
303
|
g[p] = -1, d[p] = -1;
|
|
307
304
|
g[c + 1] = 0, d[c + 1] = 0;
|
|
308
|
-
for (var b =
|
|
309
|
-
for (var A = -S + v; A <= S -
|
|
305
|
+
for (var b = a - s, E = b % 2 != 0, v = 0, w = 0, m = 0, D = 0, S = 0; S < l && !((/* @__PURE__ */ new Date()).getTime() > i); S++) {
|
|
306
|
+
for (var A = -S + v; A <= S - w; A += 2) {
|
|
310
307
|
var I = c + A, R;
|
|
311
308
|
A == -S || A != S && g[I - 1] < g[I + 1] ? R = g[I + 1] : R = g[I - 1] + 1;
|
|
312
|
-
for (var
|
|
313
|
-
R++,
|
|
314
|
-
if (g[I] = R, R >
|
|
315
|
-
|
|
316
|
-
else if (
|
|
309
|
+
for (var F = R - A; R < a && F < s && n.charAt(R) == t.charAt(F); )
|
|
310
|
+
R++, F++;
|
|
311
|
+
if (g[I] = R, R > a)
|
|
312
|
+
w += 2;
|
|
313
|
+
else if (F > s)
|
|
317
314
|
v += 2;
|
|
318
315
|
else if (E) {
|
|
319
316
|
var U = c + b - A;
|
|
320
317
|
if (U >= 0 && U < f && d[U] != -1) {
|
|
321
|
-
var $ =
|
|
318
|
+
var $ = a - d[U];
|
|
322
319
|
if (R >= $)
|
|
323
|
-
return this.diff_bisectSplit_(n,
|
|
320
|
+
return this.diff_bisectSplit_(n, t, R, F, i);
|
|
324
321
|
}
|
|
325
322
|
}
|
|
326
323
|
}
|
|
327
324
|
for (var G = -S + m; G <= S - D; G += 2) {
|
|
328
325
|
var U = c + G, $;
|
|
329
326
|
G == -S || G != S && d[U - 1] < d[U + 1] ? $ = d[U + 1] : $ = d[U - 1] + 1;
|
|
330
|
-
for (var Q = $ - G; $ <
|
|
327
|
+
for (var Q = $ - G; $ < a && Q < s && n.charAt(a - $ - 1) == t.charAt(s - Q - 1); )
|
|
331
328
|
$++, Q++;
|
|
332
|
-
if (d[U] = $, $ >
|
|
329
|
+
if (d[U] = $, $ > a)
|
|
333
330
|
D += 2;
|
|
334
|
-
else if (Q >
|
|
331
|
+
else if (Q > s)
|
|
335
332
|
m += 2;
|
|
336
333
|
else if (!E) {
|
|
337
334
|
var I = c + b - G;
|
|
338
335
|
if (I >= 0 && I < f && g[I] != -1) {
|
|
339
|
-
var R = g[I],
|
|
340
|
-
if ($ =
|
|
341
|
-
return this.diff_bisectSplit_(n,
|
|
336
|
+
var R = g[I], F = c + R - I;
|
|
337
|
+
if ($ = a - $, R >= $)
|
|
338
|
+
return this.diff_bisectSplit_(n, t, R, F, i);
|
|
342
339
|
}
|
|
343
340
|
}
|
|
344
341
|
}
|
|
345
342
|
}
|
|
346
343
|
return [
|
|
347
|
-
new
|
|
348
|
-
new
|
|
344
|
+
new r.Diff(o, n),
|
|
345
|
+
new r.Diff(u, t)
|
|
349
346
|
];
|
|
350
|
-
},
|
|
351
|
-
var
|
|
347
|
+
}, r.prototype.diff_bisectSplit_ = function(n, t, i, a, s) {
|
|
348
|
+
var l = n.substring(0, i), c = t.substring(0, a), f = n.substring(i), g = t.substring(a), d = this.diff_main(l, c, !1, s), p = this.diff_main(f, g, !1, s);
|
|
352
349
|
return d.concat(p);
|
|
353
|
-
},
|
|
354
|
-
var i = [],
|
|
350
|
+
}, r.prototype.diff_linesToChars_ = function(n, t) {
|
|
351
|
+
var i = [], a = {};
|
|
355
352
|
i[0] = "";
|
|
356
|
-
function
|
|
353
|
+
function s(g) {
|
|
357
354
|
for (var d = "", p = 0, b = -1, E = i.length; b < g.length - 1; ) {
|
|
358
355
|
b = g.indexOf(`
|
|
359
356
|
`, p), b == -1 && (b = g.length - 1);
|
|
360
357
|
var v = g.substring(p, b + 1);
|
|
361
|
-
(
|
|
358
|
+
(a.hasOwnProperty ? a.hasOwnProperty(v) : a[v] !== void 0) ? d += String.fromCharCode(a[v]) : (E == l && (v = g.substring(p), b = g.length), d += String.fromCharCode(E), a[v] = E, i[E++] = v), p = b + 1;
|
|
362
359
|
}
|
|
363
360
|
return d;
|
|
364
361
|
}
|
|
365
|
-
var
|
|
366
|
-
|
|
367
|
-
var f =
|
|
362
|
+
var l = 4e4, c = s(n);
|
|
363
|
+
l = 65535;
|
|
364
|
+
var f = s(t);
|
|
368
365
|
return { chars1: c, chars2: f, lineArray: i };
|
|
369
|
-
},
|
|
366
|
+
}, r.prototype.diff_charsToLines_ = function(n, t) {
|
|
370
367
|
for (var i = 0; i < n.length; i++) {
|
|
371
|
-
for (var
|
|
372
|
-
|
|
373
|
-
n[i][1] =
|
|
368
|
+
for (var a = n[i][1], s = [], l = 0; l < a.length; l++)
|
|
369
|
+
s[l] = t[a.charCodeAt(l)];
|
|
370
|
+
n[i][1] = s.join("");
|
|
374
371
|
}
|
|
375
|
-
},
|
|
376
|
-
if (!n || !
|
|
372
|
+
}, r.prototype.diff_commonPrefix = function(n, t) {
|
|
373
|
+
if (!n || !t || n.charAt(0) != t.charAt(0))
|
|
377
374
|
return 0;
|
|
378
|
-
for (var i = 0,
|
|
379
|
-
n.substring(
|
|
380
|
-
return
|
|
381
|
-
},
|
|
382
|
-
if (!n || !
|
|
375
|
+
for (var i = 0, a = Math.min(n.length, t.length), s = a, l = 0; i < s; )
|
|
376
|
+
n.substring(l, s) == t.substring(l, s) ? (i = s, l = i) : a = s, s = Math.floor((a - i) / 2 + i);
|
|
377
|
+
return s;
|
|
378
|
+
}, r.prototype.diff_commonSuffix = function(n, t) {
|
|
379
|
+
if (!n || !t || n.charAt(n.length - 1) != t.charAt(t.length - 1))
|
|
383
380
|
return 0;
|
|
384
|
-
for (var i = 0,
|
|
385
|
-
n.substring(n.length -
|
|
386
|
-
return
|
|
387
|
-
},
|
|
388
|
-
var i = n.length,
|
|
389
|
-
if (i == 0 ||
|
|
381
|
+
for (var i = 0, a = Math.min(n.length, t.length), s = a, l = 0; i < s; )
|
|
382
|
+
n.substring(n.length - s, n.length - l) == t.substring(t.length - s, t.length - l) ? (i = s, l = i) : a = s, s = Math.floor((a - i) / 2 + i);
|
|
383
|
+
return s;
|
|
384
|
+
}, r.prototype.diff_commonOverlap_ = function(n, t) {
|
|
385
|
+
var i = n.length, a = t.length;
|
|
386
|
+
if (i == 0 || a == 0)
|
|
390
387
|
return 0;
|
|
391
|
-
i >
|
|
392
|
-
var
|
|
393
|
-
if (n ==
|
|
394
|
-
return
|
|
395
|
-
for (var
|
|
396
|
-
var f = n.substring(
|
|
388
|
+
i > a ? n = n.substring(i - a) : i < a && (t = t.substring(0, i));
|
|
389
|
+
var s = Math.min(i, a);
|
|
390
|
+
if (n == t)
|
|
391
|
+
return s;
|
|
392
|
+
for (var l = 0, c = 1; ; ) {
|
|
393
|
+
var f = n.substring(s - c), g = t.indexOf(f);
|
|
397
394
|
if (g == -1)
|
|
398
|
-
return
|
|
399
|
-
c += g, (g == 0 || n.substring(
|
|
395
|
+
return l;
|
|
396
|
+
c += g, (g == 0 || n.substring(s - c) == t.substring(0, c)) && (l = c, c++);
|
|
400
397
|
}
|
|
401
|
-
},
|
|
398
|
+
}, r.prototype.diff_halfMatch_ = function(n, t) {
|
|
402
399
|
if (this.Diff_Timeout <= 0)
|
|
403
400
|
return null;
|
|
404
|
-
var i = n.length >
|
|
405
|
-
if (i.length < 4 ||
|
|
401
|
+
var i = n.length > t.length ? n : t, a = n.length > t.length ? t : n;
|
|
402
|
+
if (i.length < 4 || a.length * 2 < i.length)
|
|
406
403
|
return null;
|
|
407
|
-
var
|
|
408
|
-
function
|
|
409
|
-
for (var S =
|
|
410
|
-
var G =
|
|
411
|
-
|
|
404
|
+
var s = this;
|
|
405
|
+
function l(w, m, D) {
|
|
406
|
+
for (var S = w.substring(D, D + Math.floor(w.length / 4)), A = -1, I = "", R, F, U, $; (A = m.indexOf(S, A + 1)) != -1; ) {
|
|
407
|
+
var G = s.diff_commonPrefix(
|
|
408
|
+
w.substring(D),
|
|
412
409
|
m.substring(A)
|
|
413
|
-
), Q =
|
|
414
|
-
|
|
410
|
+
), Q = s.diff_commonSuffix(
|
|
411
|
+
w.substring(0, D),
|
|
415
412
|
m.substring(0, A)
|
|
416
413
|
);
|
|
417
|
-
I.length < Q + G && (I = m.substring(A - Q, A) + m.substring(A, A + G), R =
|
|
414
|
+
I.length < Q + G && (I = m.substring(A - Q, A) + m.substring(A, A + G), R = w.substring(0, D - Q), F = w.substring(D + G), U = m.substring(0, A - Q), $ = m.substring(A + G));
|
|
418
415
|
}
|
|
419
|
-
return I.length * 2 >=
|
|
416
|
+
return I.length * 2 >= w.length ? [
|
|
420
417
|
R,
|
|
421
|
-
|
|
418
|
+
F,
|
|
422
419
|
U,
|
|
423
420
|
$,
|
|
424
421
|
I
|
|
425
422
|
] : null;
|
|
426
423
|
}
|
|
427
|
-
var c =
|
|
424
|
+
var c = l(
|
|
428
425
|
i,
|
|
429
|
-
|
|
426
|
+
a,
|
|
430
427
|
Math.ceil(i.length / 4)
|
|
431
|
-
), f =
|
|
428
|
+
), f = l(
|
|
432
429
|
i,
|
|
433
|
-
|
|
430
|
+
a,
|
|
434
431
|
Math.ceil(i.length / 2)
|
|
435
432
|
), g;
|
|
436
433
|
if (!c && !f)
|
|
437
434
|
return null;
|
|
438
435
|
f ? c ? g = c[4].length > f[4].length ? c : f : g = f : g = c;
|
|
439
436
|
var d, p, b, E;
|
|
440
|
-
n.length >
|
|
437
|
+
n.length > t.length ? (d = g[0], p = g[1], b = g[2], E = g[3]) : (b = g[0], E = g[1], d = g[2], p = g[3]);
|
|
441
438
|
var v = g[4];
|
|
442
439
|
return [d, p, b, E, v];
|
|
443
|
-
},
|
|
444
|
-
for (var
|
|
445
|
-
n[
|
|
440
|
+
}, r.prototype.diff_cleanupSemantic = function(n) {
|
|
441
|
+
for (var t = !1, i = [], a = 0, s = null, l = 0, c = 0, f = 0, g = 0, d = 0; l < n.length; )
|
|
442
|
+
n[l][0] == h ? (i[a++] = l, c = g, f = d, g = 0, d = 0, s = n[l][1]) : (n[l][0] == u ? g += n[l][1].length : d += n[l][1].length, s && s.length <= Math.max(c, f) && s.length <= Math.max(
|
|
446
443
|
g,
|
|
447
444
|
d
|
|
448
445
|
) && (n.splice(
|
|
449
|
-
i[
|
|
446
|
+
i[a - 1],
|
|
450
447
|
0,
|
|
451
|
-
new
|
|
452
|
-
), n[i[
|
|
453
|
-
for (
|
|
454
|
-
if (n[
|
|
455
|
-
var p = n[
|
|
456
|
-
E >= v ? (E >= p.length / 2 || E >= b.length / 2) && (n.splice(
|
|
448
|
+
new r.Diff(o, s)
|
|
449
|
+
), n[i[a - 1] + 1][0] = u, a--, a--, l = a > 0 ? i[a - 1] : -1, c = 0, f = 0, g = 0, d = 0, s = null, t = !0)), l++;
|
|
450
|
+
for (t && this.diff_cleanupMerge(n), this.diff_cleanupSemanticLossless(n), l = 1; l < n.length; ) {
|
|
451
|
+
if (n[l - 1][0] == o && n[l][0] == u) {
|
|
452
|
+
var p = n[l - 1][1], b = n[l][1], E = this.diff_commonOverlap_(p, b), v = this.diff_commonOverlap_(b, p);
|
|
453
|
+
E >= v ? (E >= p.length / 2 || E >= b.length / 2) && (n.splice(l, 0, new r.Diff(
|
|
457
454
|
h,
|
|
458
455
|
b.substring(0, E)
|
|
459
|
-
)), n[
|
|
456
|
+
)), n[l - 1][1] = p.substring(0, p.length - E), n[l + 1][1] = b.substring(E), l++) : (v >= p.length / 2 || v >= b.length / 2) && (n.splice(l, 0, new r.Diff(
|
|
460
457
|
h,
|
|
461
458
|
p.substring(0, v)
|
|
462
|
-
)), n[
|
|
459
|
+
)), n[l - 1][0] = u, n[l - 1][1] = b.substring(0, b.length - v), n[l + 1][0] = o, n[l + 1][1] = p.substring(v), l++), l++;
|
|
463
460
|
}
|
|
464
|
-
|
|
461
|
+
l++;
|
|
465
462
|
}
|
|
466
|
-
},
|
|
467
|
-
function
|
|
468
|
-
if (!v || !
|
|
463
|
+
}, r.prototype.diff_cleanupSemanticLossless = function(n) {
|
|
464
|
+
function t(v, w) {
|
|
465
|
+
if (!v || !w)
|
|
469
466
|
return 6;
|
|
470
|
-
var m = v.charAt(v.length - 1), D =
|
|
471
|
-
return $ || G ? 5 :
|
|
467
|
+
var m = v.charAt(v.length - 1), D = w.charAt(0), S = m.match(r.nonAlphaNumericRegex_), A = D.match(r.nonAlphaNumericRegex_), I = S && m.match(r.whitespaceRegex_), R = A && D.match(r.whitespaceRegex_), F = I && m.match(r.linebreakRegex_), U = R && D.match(r.linebreakRegex_), $ = F && v.match(r.blanklineEndRegex_), G = U && w.match(r.blanklineStartRegex_);
|
|
468
|
+
return $ || G ? 5 : F || U ? 4 : S && !I && R ? 3 : I || R ? 2 : S || A ? 1 : 0;
|
|
472
469
|
}
|
|
473
470
|
for (var i = 1; i < n.length - 1; ) {
|
|
474
471
|
if (n[i - 1][0] == h && n[i + 1][0] == h) {
|
|
475
|
-
var
|
|
472
|
+
var a = n[i - 1][1], s = n[i][1], l = n[i + 1][1], c = this.diff_commonSuffix(a, s);
|
|
476
473
|
if (c) {
|
|
477
|
-
var f =
|
|
478
|
-
|
|
474
|
+
var f = s.substring(s.length - c);
|
|
475
|
+
a = a.substring(0, a.length - c), s = f + s.substring(0, s.length - c), l = f + l;
|
|
479
476
|
}
|
|
480
|
-
for (var g =
|
|
481
|
-
|
|
482
|
-
var E =
|
|
483
|
-
E >= b && (b = E, g =
|
|
477
|
+
for (var g = a, d = s, p = l, b = t(a, s) + t(s, l); s.charAt(0) === l.charAt(0); ) {
|
|
478
|
+
a += s.charAt(0), s = s.substring(1) + l.charAt(0), l = l.substring(1);
|
|
479
|
+
var E = t(a, s) + t(s, l);
|
|
480
|
+
E >= b && (b = E, g = a, d = s, p = l);
|
|
484
481
|
}
|
|
485
482
|
n[i - 1][1] != g && (g ? n[i - 1][1] = g : (n.splice(i - 1, 1), i--), n[i][1] = d, p ? n[i + 1][1] = p : (n.splice(i + 1, 1), i--));
|
|
486
483
|
}
|
|
487
484
|
i++;
|
|
488
485
|
}
|
|
489
|
-
},
|
|
490
|
-
for (var
|
|
491
|
-
n[
|
|
492
|
-
i[
|
|
486
|
+
}, r.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, r.whitespaceRegex_ = /\s/, r.linebreakRegex_ = /[\r\n]/, r.blanklineEndRegex_ = /\n\r?\n$/, r.blanklineStartRegex_ = /^\r?\n\r?\n/, r.prototype.diff_cleanupEfficiency = function(n) {
|
|
487
|
+
for (var t = !1, i = [], a = 0, s = null, l = 0, c = !1, f = !1, g = !1, d = !1; l < n.length; )
|
|
488
|
+
n[l][0] == h ? (n[l][1].length < this.Diff_EditCost && (g || d) ? (i[a++] = l, c = g, f = d, s = n[l][1]) : (a = 0, s = null), g = d = !1) : (n[l][0] == o ? d = !0 : g = !0, s && (c && f && g && d || s.length < this.Diff_EditCost / 2 && c + f + g + d == 3) && (n.splice(
|
|
489
|
+
i[a - 1],
|
|
493
490
|
0,
|
|
494
|
-
new
|
|
495
|
-
), n[i[
|
|
496
|
-
|
|
497
|
-
},
|
|
498
|
-
n.push(new
|
|
499
|
-
for (var
|
|
500
|
-
switch (n[
|
|
491
|
+
new r.Diff(o, s)
|
|
492
|
+
), n[i[a - 1] + 1][0] = u, a--, s = null, c && f ? (g = d = !0, a = 0) : (a--, l = a > 0 ? i[a - 1] : -1, g = d = !1), t = !0)), l++;
|
|
493
|
+
t && this.diff_cleanupMerge(n);
|
|
494
|
+
}, r.prototype.diff_cleanupMerge = function(n) {
|
|
495
|
+
n.push(new r.Diff(h, ""));
|
|
496
|
+
for (var t = 0, i = 0, a = 0, s = "", l = "", c; t < n.length; )
|
|
497
|
+
switch (n[t][0]) {
|
|
501
498
|
case u:
|
|
502
|
-
|
|
499
|
+
a++, l += n[t][1], t++;
|
|
503
500
|
break;
|
|
504
|
-
case
|
|
505
|
-
i++,
|
|
501
|
+
case o:
|
|
502
|
+
i++, s += n[t][1], t++;
|
|
506
503
|
break;
|
|
507
504
|
case h:
|
|
508
|
-
i +
|
|
505
|
+
i + a > 1 ? (i !== 0 && a !== 0 && (c = this.diff_commonPrefix(l, s), c !== 0 && (t - i - a > 0 && n[t - i - a - 1][0] == h ? n[t - i - a - 1][1] += l.substring(0, c) : (n.splice(0, 0, new r.Diff(
|
|
509
506
|
h,
|
|
510
|
-
|
|
511
|
-
)),
|
|
512
|
-
|
|
507
|
+
l.substring(0, c)
|
|
508
|
+
)), t++), l = l.substring(c), s = s.substring(c)), c = this.diff_commonSuffix(l, s), c !== 0 && (n[t][1] = l.substring(l.length - c) + n[t][1], l = l.substring(0, l.length - c), s = s.substring(0, s.length - c))), t -= i + a, n.splice(t, i + a), s.length && (n.splice(
|
|
509
|
+
t,
|
|
513
510
|
0,
|
|
514
|
-
new
|
|
515
|
-
),
|
|
516
|
-
|
|
511
|
+
new r.Diff(o, s)
|
|
512
|
+
), t++), l.length && (n.splice(
|
|
513
|
+
t,
|
|
517
514
|
0,
|
|
518
|
-
new
|
|
519
|
-
),
|
|
515
|
+
new r.Diff(u, l)
|
|
516
|
+
), t++), t++) : t !== 0 && n[t - 1][0] == h ? (n[t - 1][1] += n[t][1], n.splice(t, 1)) : t++, a = 0, i = 0, s = "", l = "";
|
|
520
517
|
break;
|
|
521
518
|
}
|
|
522
519
|
n[n.length - 1][1] === "" && n.pop();
|
|
523
520
|
var f = !1;
|
|
524
|
-
for (
|
|
525
|
-
n[
|
|
521
|
+
for (t = 1; t < n.length - 1; )
|
|
522
|
+
n[t - 1][0] == h && n[t + 1][0] == h && (n[t][1].substring(n[t][1].length - n[t - 1][1].length) == n[t - 1][1] ? (n[t][1] = n[t - 1][1] + n[t][1].substring(0, n[t][1].length - n[t - 1][1].length), n[t + 1][1] = n[t - 1][1] + n[t + 1][1], n.splice(t - 1, 1), f = !0) : n[t][1].substring(0, n[t + 1][1].length) == n[t + 1][1] && (n[t - 1][1] += n[t + 1][1], n[t][1] = n[t][1].substring(n[t + 1][1].length) + n[t + 1][1], n.splice(t + 1, 1), f = !0)), t++;
|
|
526
523
|
f && this.diff_cleanupMerge(n);
|
|
527
|
-
},
|
|
528
|
-
var i = 0,
|
|
529
|
-
for (c = 0; c < n.length && (n[c][0] !== u && (i += n[c][1].length), n[c][0] !==
|
|
530
|
-
|
|
531
|
-
return n.length != c && n[c][0] ===
|
|
532
|
-
},
|
|
533
|
-
for (var
|
|
534
|
-
var f = n[c][0], g = n[c][1], d = g.replace(i, "&").replace(
|
|
524
|
+
}, r.prototype.diff_xIndex = function(n, t) {
|
|
525
|
+
var i = 0, a = 0, s = 0, l = 0, c;
|
|
526
|
+
for (c = 0; c < n.length && (n[c][0] !== u && (i += n[c][1].length), n[c][0] !== o && (a += n[c][1].length), !(i > t)); c++)
|
|
527
|
+
s = i, l = a;
|
|
528
|
+
return n.length != c && n[c][0] === o ? l : l + (t - s);
|
|
529
|
+
}, r.prototype.diff_prettyHtml = function(n) {
|
|
530
|
+
for (var t = [], i = /&/g, a = /</g, s = />/g, l = /\n/g, c = 0; c < n.length; c++) {
|
|
531
|
+
var f = n[c][0], g = n[c][1], d = g.replace(i, "&").replace(a, "<").replace(s, ">").replace(l, "¶<br>");
|
|
535
532
|
switch (f) {
|
|
536
533
|
case u:
|
|
537
|
-
|
|
534
|
+
t[c] = '<ins style="background:#e6ffe6;">' + d + "</ins>";
|
|
538
535
|
break;
|
|
539
|
-
case
|
|
540
|
-
|
|
536
|
+
case o:
|
|
537
|
+
t[c] = '<del style="background:#ffe6e6;">' + d + "</del>";
|
|
541
538
|
break;
|
|
542
539
|
case h:
|
|
543
|
-
|
|
540
|
+
t[c] = "<span>" + d + "</span>";
|
|
544
541
|
break;
|
|
545
542
|
}
|
|
546
543
|
}
|
|
547
|
-
return
|
|
548
|
-
},
|
|
549
|
-
for (var
|
|
550
|
-
n[i][0] !== u && (
|
|
551
|
-
return
|
|
552
|
-
},
|
|
553
|
-
for (var
|
|
554
|
-
n[i][0] !==
|
|
555
|
-
return
|
|
556
|
-
},
|
|
557
|
-
for (var
|
|
558
|
-
var
|
|
559
|
-
switch (
|
|
544
|
+
return t.join("");
|
|
545
|
+
}, r.prototype.diff_text1 = function(n) {
|
|
546
|
+
for (var t = [], i = 0; i < n.length; i++)
|
|
547
|
+
n[i][0] !== u && (t[i] = n[i][1]);
|
|
548
|
+
return t.join("");
|
|
549
|
+
}, r.prototype.diff_text2 = function(n) {
|
|
550
|
+
for (var t = [], i = 0; i < n.length; i++)
|
|
551
|
+
n[i][0] !== o && (t[i] = n[i][1]);
|
|
552
|
+
return t.join("");
|
|
553
|
+
}, r.prototype.diff_levenshtein = function(n) {
|
|
554
|
+
for (var t = 0, i = 0, a = 0, s = 0; s < n.length; s++) {
|
|
555
|
+
var l = n[s][0], c = n[s][1];
|
|
556
|
+
switch (l) {
|
|
560
557
|
case u:
|
|
561
558
|
i += c.length;
|
|
562
559
|
break;
|
|
563
|
-
case
|
|
564
|
-
|
|
560
|
+
case o:
|
|
561
|
+
a += c.length;
|
|
565
562
|
break;
|
|
566
563
|
case h:
|
|
567
|
-
|
|
564
|
+
t += Math.max(i, a), i = 0, a = 0;
|
|
568
565
|
break;
|
|
569
566
|
}
|
|
570
567
|
}
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
for (var
|
|
568
|
+
return t += Math.max(i, a), t;
|
|
569
|
+
}, r.prototype.diff_toDelta = function(n) {
|
|
570
|
+
for (var t = [], i = 0; i < n.length; i++)
|
|
574
571
|
switch (n[i][0]) {
|
|
575
572
|
case u:
|
|
576
|
-
|
|
573
|
+
t[i] = "+" + encodeURI(n[i][1]);
|
|
577
574
|
break;
|
|
578
|
-
case
|
|
579
|
-
|
|
575
|
+
case o:
|
|
576
|
+
t[i] = "-" + n[i][1].length;
|
|
580
577
|
break;
|
|
581
578
|
case h:
|
|
582
|
-
|
|
579
|
+
t[i] = "=" + n[i][1].length;
|
|
583
580
|
break;
|
|
584
581
|
}
|
|
585
|
-
return
|
|
586
|
-
},
|
|
587
|
-
for (var i = [],
|
|
588
|
-
var f =
|
|
589
|
-
switch (
|
|
582
|
+
return t.join(" ").replace(/%20/g, " ");
|
|
583
|
+
}, r.prototype.diff_fromDelta = function(n, t) {
|
|
584
|
+
for (var i = [], a = 0, s = 0, l = t.split(/\t/g), c = 0; c < l.length; c++) {
|
|
585
|
+
var f = l[c].substring(1);
|
|
586
|
+
switch (l[c].charAt(0)) {
|
|
590
587
|
case "+":
|
|
591
588
|
try {
|
|
592
|
-
i[
|
|
589
|
+
i[a++] = new r.Diff(u, decodeURI(f));
|
|
593
590
|
} catch (p) {
|
|
594
591
|
throw new Error("Illegal escape in diff_fromDelta: " + f);
|
|
595
592
|
}
|
|
@@ -599,278 +596,278 @@ var be = {}, Yn = {
|
|
|
599
596
|
var g = parseInt(f, 10);
|
|
600
597
|
if (isNaN(g) || g < 0)
|
|
601
598
|
throw new Error("Invalid number in diff_fromDelta: " + f);
|
|
602
|
-
var d = n.substring(
|
|
603
|
-
|
|
599
|
+
var d = n.substring(s, s += g);
|
|
600
|
+
l[c].charAt(0) == "=" ? i[a++] = new r.Diff(h, d) : i[a++] = new r.Diff(o, d);
|
|
604
601
|
break;
|
|
605
602
|
default:
|
|
606
|
-
if (
|
|
607
|
-
throw new Error("Invalid diff operation in diff_fromDelta: " +
|
|
603
|
+
if (l[c])
|
|
604
|
+
throw new Error("Invalid diff operation in diff_fromDelta: " + l[c]);
|
|
608
605
|
}
|
|
609
606
|
}
|
|
610
|
-
if (
|
|
611
|
-
throw new Error("Delta length (" +
|
|
607
|
+
if (s != n.length)
|
|
608
|
+
throw new Error("Delta length (" + s + ") does not equal source text length (" + n.length + ").");
|
|
612
609
|
return i;
|
|
613
|
-
},
|
|
614
|
-
if (n == null ||
|
|
610
|
+
}, r.prototype.match_main = function(n, t, i) {
|
|
611
|
+
if (n == null || t == null || i == null)
|
|
615
612
|
throw new Error("Null input. (match_main)");
|
|
616
|
-
return i = Math.max(0, Math.min(i, n.length)), n ==
|
|
617
|
-
},
|
|
618
|
-
if (
|
|
613
|
+
return i = Math.max(0, Math.min(i, n.length)), n == t ? 0 : n.length ? n.substring(i, i + t.length) == t ? i : this.match_bitap_(n, t, i) : -1;
|
|
614
|
+
}, r.prototype.match_bitap_ = function(n, t, i) {
|
|
615
|
+
if (t.length > this.Match_MaxBits)
|
|
619
616
|
throw new Error("Pattern too long for this browser.");
|
|
620
|
-
var
|
|
621
|
-
function
|
|
622
|
-
var U = R /
|
|
623
|
-
return
|
|
617
|
+
var a = this.match_alphabet_(t), s = this;
|
|
618
|
+
function l(R, F) {
|
|
619
|
+
var U = R / t.length, $ = Math.abs(i - F);
|
|
620
|
+
return s.Match_Distance ? U + $ / s.Match_Distance : $ ? 1 : U;
|
|
624
621
|
}
|
|
625
|
-
var c = this.Match_Threshold, f = n.indexOf(
|
|
626
|
-
f != -1 && (c = Math.min(
|
|
627
|
-
var g = 1 <<
|
|
622
|
+
var c = this.Match_Threshold, f = n.indexOf(t, i);
|
|
623
|
+
f != -1 && (c = Math.min(l(0, f), c), f = n.lastIndexOf(t, i + t.length), f != -1 && (c = Math.min(l(0, f), c)));
|
|
624
|
+
var g = 1 << t.length - 1;
|
|
628
625
|
f = -1;
|
|
629
|
-
for (var d, p, b =
|
|
626
|
+
for (var d, p, b = t.length + n.length, E, v = 0; v < t.length; v++) {
|
|
630
627
|
for (d = 0, p = b; d < p; )
|
|
631
|
-
|
|
628
|
+
l(v, i + p) <= c ? d = p : b = p, p = Math.floor((b - d) / 2 + d);
|
|
632
629
|
b = p;
|
|
633
|
-
var
|
|
630
|
+
var w = Math.max(1, i - p + 1), m = Math.min(i + p, n.length) + t.length, D = Array(m + 2);
|
|
634
631
|
D[m + 1] = (1 << v) - 1;
|
|
635
|
-
for (var S = m; S >=
|
|
636
|
-
var A =
|
|
632
|
+
for (var S = m; S >= w; S--) {
|
|
633
|
+
var A = a[n.charAt(S - 1)];
|
|
637
634
|
if (v === 0 ? D[S] = (D[S + 1] << 1 | 1) & A : D[S] = (D[S + 1] << 1 | 1) & A | ((E[S + 1] | E[S]) << 1 | 1) | E[S + 1], D[S] & g) {
|
|
638
|
-
var I =
|
|
635
|
+
var I = l(v, S - 1);
|
|
639
636
|
if (I <= c)
|
|
640
637
|
if (c = I, f = S - 1, f > i)
|
|
641
|
-
|
|
638
|
+
w = Math.max(1, 2 * i - f);
|
|
642
639
|
else
|
|
643
640
|
break;
|
|
644
641
|
}
|
|
645
642
|
}
|
|
646
|
-
if (
|
|
643
|
+
if (l(v + 1, i) > c)
|
|
647
644
|
break;
|
|
648
645
|
E = D;
|
|
649
646
|
}
|
|
650
647
|
return f;
|
|
651
|
-
},
|
|
652
|
-
for (var
|
|
653
|
-
|
|
648
|
+
}, r.prototype.match_alphabet_ = function(n) {
|
|
649
|
+
for (var t = {}, i = 0; i < n.length; i++)
|
|
650
|
+
t[n.charAt(i)] = 0;
|
|
654
651
|
for (var i = 0; i < n.length; i++)
|
|
655
|
-
|
|
656
|
-
return
|
|
657
|
-
},
|
|
658
|
-
if (
|
|
652
|
+
t[n.charAt(i)] |= 1 << n.length - i - 1;
|
|
653
|
+
return t;
|
|
654
|
+
}, r.prototype.patch_addContext_ = function(n, t) {
|
|
655
|
+
if (t.length != 0) {
|
|
659
656
|
if (n.start2 === null)
|
|
660
657
|
throw Error("patch not initialized");
|
|
661
|
-
for (var i =
|
|
662
|
-
|
|
663
|
-
n.start2 -
|
|
664
|
-
n.start2 + n.length1 +
|
|
658
|
+
for (var i = t.substring(n.start2, n.start2 + n.length1), a = 0; t.indexOf(i) != t.lastIndexOf(i) && i.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; )
|
|
659
|
+
a += this.Patch_Margin, i = t.substring(
|
|
660
|
+
n.start2 - a,
|
|
661
|
+
n.start2 + n.length1 + a
|
|
665
662
|
);
|
|
666
|
-
|
|
667
|
-
var
|
|
668
|
-
|
|
669
|
-
var
|
|
663
|
+
a += this.Patch_Margin;
|
|
664
|
+
var s = t.substring(n.start2 - a, n.start2);
|
|
665
|
+
s && n.diffs.unshift(new r.Diff(h, s));
|
|
666
|
+
var l = t.substring(
|
|
670
667
|
n.start2 + n.length1,
|
|
671
|
-
n.start2 + n.length1 +
|
|
668
|
+
n.start2 + n.length1 + a
|
|
672
669
|
);
|
|
673
|
-
|
|
670
|
+
l && n.diffs.push(new r.Diff(h, l)), n.start1 -= s.length, n.start2 -= s.length, n.length1 += s.length + l.length, n.length2 += s.length + l.length;
|
|
674
671
|
}
|
|
675
|
-
},
|
|
676
|
-
var
|
|
677
|
-
if (typeof n == "string" && typeof
|
|
678
|
-
|
|
679
|
-
n,
|
|
680
|
-
|
|
672
|
+
}, r.prototype.patch_make = function(n, t, i) {
|
|
673
|
+
var a, s;
|
|
674
|
+
if (typeof n == "string" && typeof t == "string" && typeof i == "undefined")
|
|
675
|
+
a = /** @type {string} */
|
|
676
|
+
n, s = this.diff_main(
|
|
677
|
+
a,
|
|
681
678
|
/** @type {string} */
|
|
682
|
-
|
|
679
|
+
t,
|
|
683
680
|
!0
|
|
684
|
-
),
|
|
685
|
-
else if (n && typeof n == "object" && typeof
|
|
686
|
-
|
|
687
|
-
n,
|
|
688
|
-
else if (typeof n == "string" &&
|
|
689
|
-
|
|
690
|
-
n,
|
|
691
|
-
|
|
692
|
-
else if (typeof n == "string" && typeof
|
|
693
|
-
|
|
694
|
-
n,
|
|
681
|
+
), s.length > 2 && (this.diff_cleanupSemantic(s), this.diff_cleanupEfficiency(s));
|
|
682
|
+
else if (n && typeof n == "object" && typeof t == "undefined" && typeof i == "undefined")
|
|
683
|
+
s = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
684
|
+
n, a = this.diff_text1(s);
|
|
685
|
+
else if (typeof n == "string" && t && typeof t == "object" && typeof i == "undefined")
|
|
686
|
+
a = /** @type {string} */
|
|
687
|
+
n, s = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
688
|
+
t;
|
|
689
|
+
else if (typeof n == "string" && typeof t == "string" && i && typeof i == "object")
|
|
690
|
+
a = /** @type {string} */
|
|
691
|
+
n, s = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
695
692
|
i;
|
|
696
693
|
else
|
|
697
694
|
throw new Error("Unknown call format to patch_make.");
|
|
698
|
-
if (
|
|
695
|
+
if (s.length === 0)
|
|
699
696
|
return [];
|
|
700
|
-
for (var
|
|
701
|
-
var v =
|
|
697
|
+
for (var l = [], c = new r.patch_obj(), f = 0, g = 0, d = 0, p = a, b = a, E = 0; E < s.length; E++) {
|
|
698
|
+
var v = s[E][0], w = s[E][1];
|
|
702
699
|
switch (!f && v !== h && (c.start1 = g, c.start2 = d), v) {
|
|
703
700
|
case u:
|
|
704
|
-
c.diffs[f++] =
|
|
701
|
+
c.diffs[f++] = s[E], c.length2 += w.length, b = b.substring(0, d) + w + b.substring(d);
|
|
705
702
|
break;
|
|
706
|
-
case
|
|
707
|
-
c.length1 +=
|
|
703
|
+
case o:
|
|
704
|
+
c.length1 += w.length, c.diffs[f++] = s[E], b = b.substring(0, d) + b.substring(d + w.length);
|
|
708
705
|
break;
|
|
709
706
|
case h:
|
|
710
|
-
|
|
707
|
+
w.length <= 2 * this.Patch_Margin && f && s.length != E + 1 ? (c.diffs[f++] = s[E], c.length1 += w.length, c.length2 += w.length) : w.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, p), l.push(c), c = new r.patch_obj(), f = 0, p = b, g = d);
|
|
711
708
|
break;
|
|
712
709
|
}
|
|
713
|
-
v !== u && (g +=
|
|
710
|
+
v !== u && (g += w.length), v !== o && (d += w.length);
|
|
714
711
|
}
|
|
715
|
-
return f && (this.patch_addContext_(c, p),
|
|
716
|
-
},
|
|
717
|
-
for (var
|
|
718
|
-
var
|
|
719
|
-
|
|
720
|
-
for (var
|
|
721
|
-
|
|
722
|
-
|
|
712
|
+
return f && (this.patch_addContext_(c, p), l.push(c)), l;
|
|
713
|
+
}, r.prototype.patch_deepCopy = function(n) {
|
|
714
|
+
for (var t = [], i = 0; i < n.length; i++) {
|
|
715
|
+
var a = n[i], s = new r.patch_obj();
|
|
716
|
+
s.diffs = [];
|
|
717
|
+
for (var l = 0; l < a.diffs.length; l++)
|
|
718
|
+
s.diffs[l] = new r.Diff(a.diffs[l][0], a.diffs[l][1]);
|
|
719
|
+
s.start1 = a.start1, s.start2 = a.start2, s.length1 = a.length1, s.length2 = a.length2, t[i] = s;
|
|
723
720
|
}
|
|
724
|
-
return
|
|
725
|
-
},
|
|
721
|
+
return t;
|
|
722
|
+
}, r.prototype.patch_apply = function(n, t) {
|
|
726
723
|
if (n.length == 0)
|
|
727
|
-
return [
|
|
724
|
+
return [t, []];
|
|
728
725
|
n = this.patch_deepCopy(n);
|
|
729
726
|
var i = this.patch_addPadding(n);
|
|
730
|
-
|
|
731
|
-
for (var
|
|
732
|
-
var c = n[
|
|
727
|
+
t = i + t + i, this.patch_splitMax(n);
|
|
728
|
+
for (var a = 0, s = [], l = 0; l < n.length; l++) {
|
|
729
|
+
var c = n[l].start2 + a, f = this.diff_text1(n[l].diffs), g, d = -1;
|
|
733
730
|
if (f.length > this.Match_MaxBits ? (g = this.match_main(
|
|
734
|
-
|
|
731
|
+
t,
|
|
735
732
|
f.substring(0, this.Match_MaxBits),
|
|
736
733
|
c
|
|
737
734
|
), g != -1 && (d = this.match_main(
|
|
738
|
-
|
|
735
|
+
t,
|
|
739
736
|
f.substring(f.length - this.Match_MaxBits),
|
|
740
737
|
c + f.length - this.Match_MaxBits
|
|
741
|
-
), (d == -1 || g >= d) && (g = -1))) : g = this.match_main(
|
|
742
|
-
|
|
738
|
+
), (d == -1 || g >= d) && (g = -1))) : g = this.match_main(t, f, c), g == -1)
|
|
739
|
+
s[l] = !1, a -= n[l].length2 - n[l].length1;
|
|
743
740
|
else {
|
|
744
|
-
|
|
741
|
+
s[l] = !0, a = g - c;
|
|
745
742
|
var p;
|
|
746
|
-
if (d == -1 ? p =
|
|
747
|
-
|
|
743
|
+
if (d == -1 ? p = t.substring(g, g + f.length) : p = t.substring(g, d + this.Match_MaxBits), f == p)
|
|
744
|
+
t = t.substring(0, g) + this.diff_text2(n[l].diffs) + t.substring(g + f.length);
|
|
748
745
|
else {
|
|
749
746
|
var b = this.diff_main(f, p, !1);
|
|
750
747
|
if (f.length > this.Match_MaxBits && this.diff_levenshtein(b) / f.length > this.Patch_DeleteThreshold)
|
|
751
|
-
|
|
748
|
+
s[l] = !1;
|
|
752
749
|
else {
|
|
753
750
|
this.diff_cleanupSemanticLossless(b);
|
|
754
|
-
for (var E = 0, v,
|
|
755
|
-
var m = n[
|
|
756
|
-
m[0] !== h && (v = this.diff_xIndex(b, E)), m[0] === u ?
|
|
751
|
+
for (var E = 0, v, w = 0; w < n[l].diffs.length; w++) {
|
|
752
|
+
var m = n[l].diffs[w];
|
|
753
|
+
m[0] !== h && (v = this.diff_xIndex(b, E)), m[0] === u ? t = t.substring(0, g + v) + m[1] + t.substring(g + v) : m[0] === o && (t = t.substring(0, g + v) + t.substring(g + this.diff_xIndex(
|
|
757
754
|
b,
|
|
758
755
|
E + m[1].length
|
|
759
|
-
))), m[0] !==
|
|
756
|
+
))), m[0] !== o && (E += m[1].length);
|
|
760
757
|
}
|
|
761
758
|
}
|
|
762
759
|
}
|
|
763
760
|
}
|
|
764
761
|
}
|
|
765
|
-
return
|
|
766
|
-
},
|
|
767
|
-
for (var
|
|
768
|
-
i += String.fromCharCode(
|
|
769
|
-
for (var
|
|
770
|
-
n[
|
|
771
|
-
var
|
|
772
|
-
if (
|
|
773
|
-
|
|
774
|
-
else if (
|
|
775
|
-
var c =
|
|
776
|
-
|
|
762
|
+
return t = t.substring(i.length, t.length - i.length), [t, s];
|
|
763
|
+
}, r.prototype.patch_addPadding = function(n) {
|
|
764
|
+
for (var t = this.Patch_Margin, i = "", a = 1; a <= t; a++)
|
|
765
|
+
i += String.fromCharCode(a);
|
|
766
|
+
for (var a = 0; a < n.length; a++)
|
|
767
|
+
n[a].start1 += t, n[a].start2 += t;
|
|
768
|
+
var s = n[0], l = s.diffs;
|
|
769
|
+
if (l.length == 0 || l[0][0] != h)
|
|
770
|
+
l.unshift(new r.Diff(h, i)), s.start1 -= t, s.start2 -= t, s.length1 += t, s.length2 += t;
|
|
771
|
+
else if (t > l[0][1].length) {
|
|
772
|
+
var c = t - l[0][1].length;
|
|
773
|
+
l[0][1] = i.substring(l[0][1].length) + l[0][1], s.start1 -= c, s.start2 -= c, s.length1 += c, s.length2 += c;
|
|
777
774
|
}
|
|
778
|
-
if (
|
|
779
|
-
|
|
780
|
-
else if (
|
|
781
|
-
var c =
|
|
782
|
-
|
|
775
|
+
if (s = n[n.length - 1], l = s.diffs, l.length == 0 || l[l.length - 1][0] != h)
|
|
776
|
+
l.push(new r.Diff(h, i)), s.length1 += t, s.length2 += t;
|
|
777
|
+
else if (t > l[l.length - 1][1].length) {
|
|
778
|
+
var c = t - l[l.length - 1][1].length;
|
|
779
|
+
l[l.length - 1][1] += i.substring(0, c), s.length1 += c, s.length2 += c;
|
|
783
780
|
}
|
|
784
781
|
return i;
|
|
785
|
-
},
|
|
786
|
-
for (var
|
|
787
|
-
if (!(n[i].length1 <=
|
|
788
|
-
var
|
|
782
|
+
}, r.prototype.patch_splitMax = function(n) {
|
|
783
|
+
for (var t = this.Match_MaxBits, i = 0; i < n.length; i++)
|
|
784
|
+
if (!(n[i].length1 <= t)) {
|
|
785
|
+
var a = n[i];
|
|
789
786
|
n.splice(i--, 1);
|
|
790
|
-
for (var
|
|
791
|
-
var f = new
|
|
792
|
-
for (f.start1 =
|
|
793
|
-
var d =
|
|
794
|
-
d === u ? (f.length2 += p.length,
|
|
787
|
+
for (var s = a.start1, l = a.start2, c = ""; a.diffs.length !== 0; ) {
|
|
788
|
+
var f = new r.patch_obj(), g = !0;
|
|
789
|
+
for (f.start1 = s - c.length, f.start2 = l - c.length, c !== "" && (f.length1 = f.length2 = c.length, f.diffs.push(new r.Diff(h, c))); a.diffs.length !== 0 && f.length1 < t - this.Patch_Margin; ) {
|
|
790
|
+
var d = a.diffs[0][0], p = a.diffs[0][1];
|
|
791
|
+
d === u ? (f.length2 += p.length, l += p.length, f.diffs.push(a.diffs.shift()), g = !1) : d === o && f.diffs.length == 1 && f.diffs[0][0] == h && p.length > 2 * t ? (f.length1 += p.length, s += p.length, g = !1, f.diffs.push(new r.Diff(d, p)), a.diffs.shift()) : (p = p.substring(
|
|
795
792
|
0,
|
|
796
|
-
|
|
797
|
-
), f.length1 += p.length,
|
|
793
|
+
t - f.length1 - this.Patch_Margin
|
|
794
|
+
), f.length1 += p.length, s += p.length, d === h ? (f.length2 += p.length, l += p.length) : g = !1, f.diffs.push(new r.Diff(d, p)), p == a.diffs[0][1] ? a.diffs.shift() : a.diffs[0][1] = a.diffs[0][1].substring(p.length));
|
|
798
795
|
}
|
|
799
796
|
c = this.diff_text2(f.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
800
|
-
var b = this.diff_text1(
|
|
801
|
-
b !== "" && (f.length1 += b.length, f.length2 += b.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] === h ? f.diffs[f.diffs.length - 1][1] += b : f.diffs.push(new
|
|
797
|
+
var b = this.diff_text1(a.diffs).substring(0, this.Patch_Margin);
|
|
798
|
+
b !== "" && (f.length1 += b.length, f.length2 += b.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] === h ? f.diffs[f.diffs.length - 1][1] += b : f.diffs.push(new r.Diff(h, b))), g || n.splice(++i, 0, f);
|
|
802
799
|
}
|
|
803
800
|
}
|
|
804
|
-
},
|
|
805
|
-
for (var
|
|
806
|
-
|
|
807
|
-
return
|
|
808
|
-
},
|
|
809
|
-
var
|
|
801
|
+
}, r.prototype.patch_toText = function(n) {
|
|
802
|
+
for (var t = [], i = 0; i < n.length; i++)
|
|
803
|
+
t[i] = n[i];
|
|
804
|
+
return t.join("");
|
|
805
|
+
}, r.prototype.patch_fromText = function(n) {
|
|
806
|
+
var t = [];
|
|
810
807
|
if (!n)
|
|
811
|
-
return
|
|
808
|
+
return t;
|
|
812
809
|
for (var i = n.split(`
|
|
813
|
-
`),
|
|
814
|
-
var
|
|
815
|
-
if (!
|
|
816
|
-
throw new Error("Invalid patch string: " + i[
|
|
817
|
-
var c = new
|
|
818
|
-
for (
|
|
819
|
-
var f = i[
|
|
810
|
+
`), a = 0, s = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; a < i.length; ) {
|
|
811
|
+
var l = i[a].match(s);
|
|
812
|
+
if (!l)
|
|
813
|
+
throw new Error("Invalid patch string: " + i[a]);
|
|
814
|
+
var c = new r.patch_obj();
|
|
815
|
+
for (t.push(c), c.start1 = parseInt(l[1], 10), l[2] === "" ? (c.start1--, c.length1 = 1) : l[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(l[2], 10)), c.start2 = parseInt(l[3], 10), l[4] === "" ? (c.start2--, c.length2 = 1) : l[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(l[4], 10)), a++; a < i.length; ) {
|
|
816
|
+
var f = i[a].charAt(0);
|
|
820
817
|
try {
|
|
821
|
-
var g = decodeURI(i[
|
|
818
|
+
var g = decodeURI(i[a].substring(1));
|
|
822
819
|
} catch (d) {
|
|
823
820
|
throw new Error("Illegal escape in patch_fromText: " + g);
|
|
824
821
|
}
|
|
825
822
|
if (f == "-")
|
|
826
|
-
c.diffs.push(new
|
|
823
|
+
c.diffs.push(new r.Diff(o, g));
|
|
827
824
|
else if (f == "+")
|
|
828
|
-
c.diffs.push(new
|
|
825
|
+
c.diffs.push(new r.Diff(u, g));
|
|
829
826
|
else if (f == " ")
|
|
830
|
-
c.diffs.push(new
|
|
827
|
+
c.diffs.push(new r.Diff(h, g));
|
|
831
828
|
else {
|
|
832
829
|
if (f == "@")
|
|
833
830
|
break;
|
|
834
831
|
if (f !== "")
|
|
835
832
|
throw new Error('Invalid patch mode "' + f + '" in: ' + g);
|
|
836
833
|
}
|
|
837
|
-
|
|
834
|
+
a++;
|
|
838
835
|
}
|
|
839
836
|
}
|
|
840
|
-
return
|
|
841
|
-
},
|
|
837
|
+
return t;
|
|
838
|
+
}, r.patch_obj = function() {
|
|
842
839
|
this.diffs = [], this.start1 = null, this.start2 = null, this.length1 = 0, this.length2 = 0;
|
|
843
|
-
},
|
|
844
|
-
var n,
|
|
845
|
-
this.length1 === 0 ? n = this.start1 + ",0" : this.length1 == 1 ? n = this.start1 + 1 : n = this.start1 + 1 + "," + this.length1, this.length2 === 0 ?
|
|
846
|
-
for (var i = ["@@ -" + n + " +" +
|
|
847
|
-
`],
|
|
848
|
-
switch (this.diffs[
|
|
840
|
+
}, r.patch_obj.prototype.toString = function() {
|
|
841
|
+
var n, t;
|
|
842
|
+
this.length1 === 0 ? n = this.start1 + ",0" : this.length1 == 1 ? n = this.start1 + 1 : n = this.start1 + 1 + "," + this.length1, this.length2 === 0 ? t = this.start2 + ",0" : this.length2 == 1 ? t = this.start2 + 1 : t = this.start2 + 1 + "," + this.length2;
|
|
843
|
+
for (var i = ["@@ -" + n + " +" + t + ` @@
|
|
844
|
+
`], a, s = 0; s < this.diffs.length; s++) {
|
|
845
|
+
switch (this.diffs[s][0]) {
|
|
849
846
|
case u:
|
|
850
|
-
|
|
847
|
+
a = "+";
|
|
851
848
|
break;
|
|
852
|
-
case
|
|
853
|
-
|
|
849
|
+
case o:
|
|
850
|
+
a = "-";
|
|
854
851
|
break;
|
|
855
852
|
case h:
|
|
856
|
-
|
|
853
|
+
a = " ";
|
|
857
854
|
break;
|
|
858
855
|
}
|
|
859
|
-
i[
|
|
856
|
+
i[s + 1] = a + encodeURI(this.diffs[s][1]) + `
|
|
860
857
|
`;
|
|
861
858
|
}
|
|
862
859
|
return i.join("").replace(/%20/g, " ");
|
|
863
|
-
}, e.exports =
|
|
864
|
-
})(
|
|
865
|
-
var Ge = { exports: {} };
|
|
860
|
+
}, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = o, e.exports.DIFF_INSERT = u, e.exports.DIFF_EQUAL = h;
|
|
861
|
+
})(hn);
|
|
862
|
+
var Ue = hn.exports, Ge = { exports: {} };
|
|
866
863
|
function Ke(e) {
|
|
867
864
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
868
865
|
throw new Error("map is read-only");
|
|
869
866
|
} : e instanceof Set && (e.add = e.clear = e.delete = function() {
|
|
870
867
|
throw new Error("set is read-only");
|
|
871
|
-
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach(function(
|
|
872
|
-
var
|
|
873
|
-
typeof
|
|
868
|
+
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach(function(r) {
|
|
869
|
+
var o = e[r];
|
|
870
|
+
typeof o == "object" && !Object.isFrozen(o) && Ke(o);
|
|
874
871
|
}), e;
|
|
875
872
|
}
|
|
876
873
|
Ge.exports = Ke;
|
|
@@ -879,69 +876,69 @@ class nn {
|
|
|
879
876
|
/**
|
|
880
877
|
* @param {CompiledMode} mode
|
|
881
878
|
*/
|
|
882
|
-
constructor(
|
|
883
|
-
|
|
879
|
+
constructor(r) {
|
|
880
|
+
r.data === void 0 && (r.data = {}), this.data = r.data, this.isMatchIgnored = !1;
|
|
884
881
|
}
|
|
885
882
|
ignoreMatch() {
|
|
886
883
|
this.isMatchIgnored = !0;
|
|
887
884
|
}
|
|
888
885
|
}
|
|
889
|
-
function
|
|
886
|
+
function dn(e) {
|
|
890
887
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
891
888
|
}
|
|
892
|
-
function ae(e, ...
|
|
893
|
-
const
|
|
889
|
+
function ae(e, ...r) {
|
|
890
|
+
const o = /* @__PURE__ */ Object.create(null);
|
|
894
891
|
for (const u in e)
|
|
895
|
-
|
|
896
|
-
return
|
|
892
|
+
o[u] = e[u];
|
|
893
|
+
return r.forEach(function(u) {
|
|
897
894
|
for (const h in u)
|
|
898
|
-
|
|
895
|
+
o[h] = u[h];
|
|
899
896
|
}), /** @type {T} */
|
|
900
|
-
|
|
897
|
+
o;
|
|
901
898
|
}
|
|
902
|
-
const
|
|
899
|
+
const jn = "</span>", tn = (e) => !!e.scope || e.sublanguage && e.language, Vn = (e, { prefix: r }) => {
|
|
903
900
|
if (e.includes(".")) {
|
|
904
|
-
const
|
|
901
|
+
const o = e.split(".");
|
|
905
902
|
return [
|
|
906
|
-
`${
|
|
907
|
-
...
|
|
903
|
+
`${r}${o.shift()}`,
|
|
904
|
+
...o.map((u, h) => `${u}${"_".repeat(h + 1)}`)
|
|
908
905
|
].join(" ");
|
|
909
906
|
}
|
|
910
|
-
return `${
|
|
907
|
+
return `${r}${e}`;
|
|
911
908
|
};
|
|
912
|
-
class
|
|
909
|
+
class Jn {
|
|
913
910
|
/**
|
|
914
911
|
* Creates a new HTMLRenderer
|
|
915
912
|
*
|
|
916
913
|
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
|
917
914
|
* @param {{classPrefix: string}} options
|
|
918
915
|
*/
|
|
919
|
-
constructor(
|
|
920
|
-
this.buffer = "", this.classPrefix =
|
|
916
|
+
constructor(r, o) {
|
|
917
|
+
this.buffer = "", this.classPrefix = o.classPrefix, r.walk(this);
|
|
921
918
|
}
|
|
922
919
|
/**
|
|
923
920
|
* Adds texts to the output stream
|
|
924
921
|
*
|
|
925
922
|
* @param {string} text */
|
|
926
|
-
addText(
|
|
927
|
-
this.buffer +=
|
|
923
|
+
addText(r) {
|
|
924
|
+
this.buffer += dn(r);
|
|
928
925
|
}
|
|
929
926
|
/**
|
|
930
927
|
* Adds a node open to the output stream (if needed)
|
|
931
928
|
*
|
|
932
929
|
* @param {Node} node */
|
|
933
|
-
openNode(
|
|
934
|
-
if (!tn(
|
|
930
|
+
openNode(r) {
|
|
931
|
+
if (!tn(r))
|
|
935
932
|
return;
|
|
936
|
-
let
|
|
937
|
-
|
|
933
|
+
let o = "";
|
|
934
|
+
r.sublanguage ? o = `language-${r.language}` : o = Vn(r.scope, { prefix: this.classPrefix }), this.span(o);
|
|
938
935
|
}
|
|
939
936
|
/**
|
|
940
937
|
* Adds a node close to the output stream (if needed)
|
|
941
938
|
*
|
|
942
939
|
* @param {Node} node */
|
|
943
|
-
closeNode(
|
|
944
|
-
tn(
|
|
940
|
+
closeNode(r) {
|
|
941
|
+
tn(r) && (this.buffer += jn);
|
|
945
942
|
}
|
|
946
943
|
/**
|
|
947
944
|
* returns the accumulated buffer
|
|
@@ -954,13 +951,13 @@ class jn {
|
|
|
954
951
|
* Builds a span element
|
|
955
952
|
*
|
|
956
953
|
* @param {string} className */
|
|
957
|
-
span(
|
|
958
|
-
this.buffer += `<span class="${
|
|
954
|
+
span(r) {
|
|
955
|
+
this.buffer += `<span class="${r}">`;
|
|
959
956
|
}
|
|
960
957
|
}
|
|
961
958
|
const rn = (e = {}) => {
|
|
962
|
-
const
|
|
963
|
-
return Object.assign(
|
|
959
|
+
const r = { children: [] };
|
|
960
|
+
return Object.assign(r, e), r;
|
|
964
961
|
};
|
|
965
962
|
class We {
|
|
966
963
|
constructor() {
|
|
@@ -973,13 +970,13 @@ class We {
|
|
|
973
970
|
return this.rootNode;
|
|
974
971
|
}
|
|
975
972
|
/** @param {Node} node */
|
|
976
|
-
add(
|
|
977
|
-
this.top.children.push(
|
|
973
|
+
add(r) {
|
|
974
|
+
this.top.children.push(r);
|
|
978
975
|
}
|
|
979
976
|
/** @param {string} scope */
|
|
980
|
-
openNode(
|
|
981
|
-
const
|
|
982
|
-
this.add(
|
|
977
|
+
openNode(r) {
|
|
978
|
+
const o = rn({ scope: r });
|
|
979
|
+
this.add(o), this.stack.push(o);
|
|
983
980
|
}
|
|
984
981
|
closeNode() {
|
|
985
982
|
if (this.stack.length > 1)
|
|
@@ -996,55 +993,55 @@ class We {
|
|
|
996
993
|
* @typedef { import("./html_renderer").Renderer } Renderer
|
|
997
994
|
* @param {Renderer} builder
|
|
998
995
|
*/
|
|
999
|
-
walk(
|
|
1000
|
-
return this.constructor._walk(
|
|
996
|
+
walk(r) {
|
|
997
|
+
return this.constructor._walk(r, this.rootNode);
|
|
1001
998
|
}
|
|
1002
999
|
/**
|
|
1003
1000
|
* @param {Renderer} builder
|
|
1004
1001
|
* @param {Node} node
|
|
1005
1002
|
*/
|
|
1006
|
-
static _walk(
|
|
1007
|
-
return typeof
|
|
1003
|
+
static _walk(r, o) {
|
|
1004
|
+
return typeof o == "string" ? r.addText(o) : o.children && (r.openNode(o), o.children.forEach((u) => this._walk(r, u)), r.closeNode(o)), r;
|
|
1008
1005
|
}
|
|
1009
1006
|
/**
|
|
1010
1007
|
* @param {Node} node
|
|
1011
1008
|
*/
|
|
1012
|
-
static _collapse(
|
|
1013
|
-
typeof
|
|
1014
|
-
We._collapse(
|
|
1009
|
+
static _collapse(r) {
|
|
1010
|
+
typeof r != "string" && r.children && (r.children.every((o) => typeof o == "string") ? r.children = [r.children.join("")] : r.children.forEach((o) => {
|
|
1011
|
+
We._collapse(o);
|
|
1015
1012
|
}));
|
|
1016
1013
|
}
|
|
1017
1014
|
}
|
|
1018
|
-
class
|
|
1015
|
+
class qn extends We {
|
|
1019
1016
|
/**
|
|
1020
1017
|
* @param {*} options
|
|
1021
1018
|
*/
|
|
1022
|
-
constructor(
|
|
1023
|
-
super(), this.options =
|
|
1019
|
+
constructor(r) {
|
|
1020
|
+
super(), this.options = r;
|
|
1024
1021
|
}
|
|
1025
1022
|
/**
|
|
1026
1023
|
* @param {string} text
|
|
1027
1024
|
* @param {string} scope
|
|
1028
1025
|
*/
|
|
1029
|
-
addKeyword(
|
|
1030
|
-
|
|
1026
|
+
addKeyword(r, o) {
|
|
1027
|
+
r !== "" && (this.openNode(o), this.addText(r), this.closeNode());
|
|
1031
1028
|
}
|
|
1032
1029
|
/**
|
|
1033
1030
|
* @param {string} text
|
|
1034
1031
|
*/
|
|
1035
|
-
addText(
|
|
1036
|
-
|
|
1032
|
+
addText(r) {
|
|
1033
|
+
r !== "" && this.add(r);
|
|
1037
1034
|
}
|
|
1038
1035
|
/**
|
|
1039
1036
|
* @param {Emitter & {root: DataNode}} emitter
|
|
1040
1037
|
* @param {string} name
|
|
1041
1038
|
*/
|
|
1042
|
-
addSublanguage(
|
|
1043
|
-
const u =
|
|
1044
|
-
u.sublanguage = !0, u.language =
|
|
1039
|
+
addSublanguage(r, o) {
|
|
1040
|
+
const u = r.root;
|
|
1041
|
+
u.sublanguage = !0, u.language = o, this.add(u);
|
|
1045
1042
|
}
|
|
1046
1043
|
toHTML() {
|
|
1047
|
-
return new
|
|
1044
|
+
return new Jn(this, this.options).value();
|
|
1048
1045
|
}
|
|
1049
1046
|
finalize() {
|
|
1050
1047
|
return !0;
|
|
@@ -1053,93 +1050,93 @@ class Jn extends We {
|
|
|
1053
1050
|
function Ee(e) {
|
|
1054
1051
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
1055
1052
|
}
|
|
1056
|
-
function
|
|
1053
|
+
function pn(e) {
|
|
1057
1054
|
return ce("(?=", e, ")");
|
|
1058
1055
|
}
|
|
1059
|
-
function
|
|
1056
|
+
function et(e) {
|
|
1060
1057
|
return ce("(?:", e, ")*");
|
|
1061
1058
|
}
|
|
1062
|
-
function
|
|
1059
|
+
function nt(e) {
|
|
1063
1060
|
return ce("(?:", e, ")?");
|
|
1064
1061
|
}
|
|
1065
1062
|
function ce(...e) {
|
|
1066
|
-
return e.map((
|
|
1063
|
+
return e.map((o) => Ee(o)).join("");
|
|
1067
1064
|
}
|
|
1068
|
-
function
|
|
1069
|
-
const
|
|
1070
|
-
return typeof
|
|
1065
|
+
function tt(e) {
|
|
1066
|
+
const r = e[e.length - 1];
|
|
1067
|
+
return typeof r == "object" && r.constructor === Object ? (e.splice(e.length - 1, 1), r) : {};
|
|
1071
1068
|
}
|
|
1072
1069
|
function Qe(...e) {
|
|
1073
|
-
return "(" + (
|
|
1070
|
+
return "(" + (tt(e).capture ? "" : "?:") + e.map((u) => Ee(u)).join("|") + ")";
|
|
1074
1071
|
}
|
|
1075
|
-
function
|
|
1072
|
+
function bn(e) {
|
|
1076
1073
|
return new RegExp(e.toString() + "|").exec("").length - 1;
|
|
1077
1074
|
}
|
|
1078
|
-
function
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1075
|
+
function rt(e, r) {
|
|
1076
|
+
const o = e && e.exec(r);
|
|
1077
|
+
return o && o.index === 0;
|
|
1081
1078
|
}
|
|
1082
|
-
const
|
|
1083
|
-
function Ze(e, { joinWith:
|
|
1084
|
-
let
|
|
1079
|
+
const it = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1080
|
+
function Ze(e, { joinWith: r }) {
|
|
1081
|
+
let o = 0;
|
|
1085
1082
|
return e.map((u) => {
|
|
1086
|
-
|
|
1087
|
-
const h =
|
|
1088
|
-
let n = Ee(u),
|
|
1083
|
+
o += 1;
|
|
1084
|
+
const h = o;
|
|
1085
|
+
let n = Ee(u), t = "";
|
|
1089
1086
|
for (; n.length > 0; ) {
|
|
1090
|
-
const i =
|
|
1087
|
+
const i = it.exec(n);
|
|
1091
1088
|
if (!i) {
|
|
1092
|
-
|
|
1089
|
+
t += n;
|
|
1093
1090
|
break;
|
|
1094
1091
|
}
|
|
1095
|
-
|
|
1092
|
+
t += n.substring(0, i.index), n = n.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? t += "\\" + String(Number(i[1]) + h) : (t += i[0], i[0] === "(" && o++);
|
|
1096
1093
|
}
|
|
1097
|
-
return
|
|
1098
|
-
}).map((u) => `(${u})`).join(
|
|
1094
|
+
return t;
|
|
1095
|
+
}).map((u) => `(${u})`).join(r);
|
|
1099
1096
|
}
|
|
1100
|
-
const
|
|
1101
|
-
const
|
|
1097
|
+
const st = /\b\B/, _n = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", En = "\\b\\d+(\\.\\d+)?", vn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", mn = "\\b(0b[01]+)", at = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ot = (e = {}) => {
|
|
1098
|
+
const r = /^#![ ]*\//;
|
|
1102
1099
|
return e.binary && (e.begin = ce(
|
|
1103
|
-
|
|
1100
|
+
r,
|
|
1104
1101
|
/.*\b/,
|
|
1105
1102
|
e.binary,
|
|
1106
1103
|
/\b.*/
|
|
1107
1104
|
)), ae({
|
|
1108
1105
|
scope: "meta",
|
|
1109
|
-
begin:
|
|
1106
|
+
begin: r,
|
|
1110
1107
|
end: /$/,
|
|
1111
1108
|
relevance: 0,
|
|
1112
1109
|
/** @type {ModeCallback} */
|
|
1113
|
-
"on:begin": (
|
|
1114
|
-
|
|
1110
|
+
"on:begin": (o, u) => {
|
|
1111
|
+
o.index !== 0 && u.ignoreMatch();
|
|
1115
1112
|
}
|
|
1116
1113
|
}, e);
|
|
1117
1114
|
}, ve = {
|
|
1118
1115
|
begin: "\\\\[\\s\\S]",
|
|
1119
1116
|
relevance: 0
|
|
1120
|
-
},
|
|
1117
|
+
}, lt = {
|
|
1121
1118
|
scope: "string",
|
|
1122
1119
|
begin: "'",
|
|
1123
1120
|
end: "'",
|
|
1124
1121
|
illegal: "\\n",
|
|
1125
1122
|
contains: [ve]
|
|
1126
|
-
},
|
|
1123
|
+
}, ct = {
|
|
1127
1124
|
scope: "string",
|
|
1128
1125
|
begin: '"',
|
|
1129
1126
|
end: '"',
|
|
1130
1127
|
illegal: "\\n",
|
|
1131
1128
|
contains: [ve]
|
|
1132
|
-
},
|
|
1129
|
+
}, ut = {
|
|
1133
1130
|
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
1134
|
-
},
|
|
1131
|
+
}, Ie = function(e, r, o = {}) {
|
|
1135
1132
|
const u = ae(
|
|
1136
1133
|
{
|
|
1137
1134
|
scope: "comment",
|
|
1138
1135
|
begin: e,
|
|
1139
|
-
end:
|
|
1136
|
+
end: r,
|
|
1140
1137
|
contains: []
|
|
1141
1138
|
},
|
|
1142
|
-
|
|
1139
|
+
o
|
|
1143
1140
|
);
|
|
1144
1141
|
u.contains.push({
|
|
1145
1142
|
scope: "doctag",
|
|
@@ -1197,11 +1194,7 @@ const it = /\b\B/, bn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", _n = "\\b\\d+(\\.\
|
|
|
1197
1194
|
// look for 3 words in a row
|
|
1198
1195
|
}
|
|
1199
1196
|
), u;
|
|
1200
|
-
},
|
|
1201
|
-
scope: "number",
|
|
1202
|
-
begin: _n,
|
|
1203
|
-
relevance: 0
|
|
1204
|
-
}, dt = {
|
|
1197
|
+
}, ft = Ie("//", "$"), gt = Ie("/\\*", "\\*/"), ht = Ie("#", "$"), dt = {
|
|
1205
1198
|
scope: "number",
|
|
1206
1199
|
begin: En,
|
|
1207
1200
|
relevance: 0
|
|
@@ -1210,6 +1203,10 @@ const it = /\b\B/, bn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", _n = "\\b\\d+(\\.\
|
|
|
1210
1203
|
begin: vn,
|
|
1211
1204
|
relevance: 0
|
|
1212
1205
|
}, bt = {
|
|
1206
|
+
scope: "number",
|
|
1207
|
+
begin: mn,
|
|
1208
|
+
relevance: 0
|
|
1209
|
+
}, _t = {
|
|
1213
1210
|
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
|
1214
1211
|
// an expression such as:
|
|
1215
1212
|
//
|
|
@@ -1232,97 +1229,97 @@ const it = /\b\B/, bn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", _n = "\\b\\d+(\\.\
|
|
|
1232
1229
|
}
|
|
1233
1230
|
]
|
|
1234
1231
|
}]
|
|
1235
|
-
},
|
|
1232
|
+
}, Et = {
|
|
1236
1233
|
scope: "title",
|
|
1237
|
-
begin:
|
|
1234
|
+
begin: _n,
|
|
1238
1235
|
relevance: 0
|
|
1239
|
-
},
|
|
1236
|
+
}, vt = {
|
|
1240
1237
|
scope: "title",
|
|
1241
1238
|
begin: Ye,
|
|
1242
1239
|
relevance: 0
|
|
1243
|
-
},
|
|
1240
|
+
}, mt = {
|
|
1244
1241
|
// excludes method names from keyword processing
|
|
1245
1242
|
begin: "\\.\\s*" + Ye,
|
|
1246
1243
|
relevance: 0
|
|
1247
|
-
},
|
|
1244
|
+
}, yt = function(e) {
|
|
1248
1245
|
return Object.assign(
|
|
1249
1246
|
e,
|
|
1250
1247
|
{
|
|
1251
1248
|
/** @type {ModeCallback} */
|
|
1252
|
-
"on:begin": (
|
|
1253
|
-
|
|
1249
|
+
"on:begin": (r, o) => {
|
|
1250
|
+
o.data._beginMatch = r[1];
|
|
1254
1251
|
},
|
|
1255
1252
|
/** @type {ModeCallback} */
|
|
1256
|
-
"on:end": (
|
|
1257
|
-
|
|
1253
|
+
"on:end": (r, o) => {
|
|
1254
|
+
o.data._beginMatch !== r[1] && o.ignoreMatch();
|
|
1258
1255
|
}
|
|
1259
1256
|
}
|
|
1260
1257
|
);
|
|
1261
1258
|
};
|
|
1262
|
-
var
|
|
1259
|
+
var Te = /* @__PURE__ */ Object.freeze({
|
|
1263
1260
|
__proto__: null,
|
|
1264
|
-
MATCH_NOTHING_RE:
|
|
1265
|
-
IDENT_RE:
|
|
1261
|
+
MATCH_NOTHING_RE: st,
|
|
1262
|
+
IDENT_RE: _n,
|
|
1266
1263
|
UNDERSCORE_IDENT_RE: Ye,
|
|
1267
|
-
NUMBER_RE:
|
|
1268
|
-
C_NUMBER_RE:
|
|
1269
|
-
BINARY_NUMBER_RE:
|
|
1270
|
-
RE_STARTERS_RE:
|
|
1271
|
-
SHEBANG:
|
|
1264
|
+
NUMBER_RE: En,
|
|
1265
|
+
C_NUMBER_RE: vn,
|
|
1266
|
+
BINARY_NUMBER_RE: mn,
|
|
1267
|
+
RE_STARTERS_RE: at,
|
|
1268
|
+
SHEBANG: ot,
|
|
1272
1269
|
BACKSLASH_ESCAPE: ve,
|
|
1273
|
-
APOS_STRING_MODE:
|
|
1274
|
-
QUOTE_STRING_MODE:
|
|
1275
|
-
PHRASAL_WORDS_MODE:
|
|
1276
|
-
COMMENT:
|
|
1277
|
-
C_LINE_COMMENT_MODE:
|
|
1278
|
-
C_BLOCK_COMMENT_MODE:
|
|
1279
|
-
HASH_COMMENT_MODE:
|
|
1280
|
-
NUMBER_MODE:
|
|
1281
|
-
C_NUMBER_MODE:
|
|
1282
|
-
BINARY_NUMBER_MODE:
|
|
1283
|
-
REGEXP_MODE:
|
|
1284
|
-
TITLE_MODE:
|
|
1285
|
-
UNDERSCORE_TITLE_MODE:
|
|
1286
|
-
METHOD_GUARD:
|
|
1287
|
-
END_SAME_AS_BEGIN:
|
|
1270
|
+
APOS_STRING_MODE: lt,
|
|
1271
|
+
QUOTE_STRING_MODE: ct,
|
|
1272
|
+
PHRASAL_WORDS_MODE: ut,
|
|
1273
|
+
COMMENT: Ie,
|
|
1274
|
+
C_LINE_COMMENT_MODE: ft,
|
|
1275
|
+
C_BLOCK_COMMENT_MODE: gt,
|
|
1276
|
+
HASH_COMMENT_MODE: ht,
|
|
1277
|
+
NUMBER_MODE: dt,
|
|
1278
|
+
C_NUMBER_MODE: pt,
|
|
1279
|
+
BINARY_NUMBER_MODE: bt,
|
|
1280
|
+
REGEXP_MODE: _t,
|
|
1281
|
+
TITLE_MODE: Et,
|
|
1282
|
+
UNDERSCORE_TITLE_MODE: vt,
|
|
1283
|
+
METHOD_GUARD: mt,
|
|
1284
|
+
END_SAME_AS_BEGIN: yt
|
|
1288
1285
|
});
|
|
1289
|
-
function wt(e,
|
|
1290
|
-
e.input[e.index - 1] === "." &&
|
|
1286
|
+
function wt(e, r) {
|
|
1287
|
+
e.input[e.index - 1] === "." && r.ignoreMatch();
|
|
1291
1288
|
}
|
|
1292
|
-
function
|
|
1289
|
+
function Nt(e, r) {
|
|
1293
1290
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
1294
1291
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1292
|
+
function Mt(e, r) {
|
|
1293
|
+
r && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = wt, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
1297
1294
|
}
|
|
1298
|
-
function
|
|
1295
|
+
function At(e, r) {
|
|
1299
1296
|
Array.isArray(e.illegal) && (e.illegal = Qe(...e.illegal));
|
|
1300
1297
|
}
|
|
1301
|
-
function
|
|
1298
|
+
function Tt(e, r) {
|
|
1302
1299
|
if (e.match) {
|
|
1303
1300
|
if (e.begin || e.end)
|
|
1304
1301
|
throw new Error("begin & end are not supported with match");
|
|
1305
1302
|
e.begin = e.match, delete e.match;
|
|
1306
1303
|
}
|
|
1307
1304
|
}
|
|
1308
|
-
function
|
|
1305
|
+
function Dt(e, r) {
|
|
1309
1306
|
e.relevance === void 0 && (e.relevance = 1);
|
|
1310
1307
|
}
|
|
1311
|
-
const
|
|
1308
|
+
const St = (e, r) => {
|
|
1312
1309
|
if (!e.beforeMatch)
|
|
1313
1310
|
return;
|
|
1314
1311
|
if (e.starts)
|
|
1315
1312
|
throw new Error("beforeMatch cannot be used with starts");
|
|
1316
|
-
const
|
|
1313
|
+
const o = Object.assign({}, e);
|
|
1317
1314
|
Object.keys(e).forEach((u) => {
|
|
1318
1315
|
delete e[u];
|
|
1319
|
-
}), e.keywords =
|
|
1316
|
+
}), e.keywords = o.keywords, e.begin = ce(o.beforeMatch, pn(o.begin)), e.starts = {
|
|
1320
1317
|
relevance: 0,
|
|
1321
1318
|
contains: [
|
|
1322
|
-
Object.assign(
|
|
1319
|
+
Object.assign(o, { endsParent: !0 })
|
|
1323
1320
|
]
|
|
1324
|
-
}, e.relevance = 0, delete
|
|
1325
|
-
},
|
|
1321
|
+
}, e.relevance = 0, delete o.beforeMatch;
|
|
1322
|
+
}, Rt = [
|
|
1326
1323
|
"of",
|
|
1327
1324
|
"and",
|
|
1328
1325
|
"for",
|
|
@@ -1337,94 +1334,94 @@ const Dt = (e, t) => {
|
|
|
1337
1334
|
// common variable name
|
|
1338
1335
|
"value"
|
|
1339
1336
|
// common variable name
|
|
1340
|
-
],
|
|
1341
|
-
function
|
|
1337
|
+
], Ot = "keyword";
|
|
1338
|
+
function yn(e, r, o = Ot) {
|
|
1342
1339
|
const u = /* @__PURE__ */ Object.create(null);
|
|
1343
|
-
return typeof e == "string" ? h(
|
|
1340
|
+
return typeof e == "string" ? h(o, e.split(" ")) : Array.isArray(e) ? h(o, e) : Object.keys(e).forEach(function(n) {
|
|
1344
1341
|
Object.assign(
|
|
1345
1342
|
u,
|
|
1346
|
-
|
|
1343
|
+
yn(e[n], r, n)
|
|
1347
1344
|
);
|
|
1348
1345
|
}), u;
|
|
1349
|
-
function h(n,
|
|
1350
|
-
|
|
1351
|
-
const
|
|
1352
|
-
u[
|
|
1346
|
+
function h(n, t) {
|
|
1347
|
+
r && (t = t.map((i) => i.toLowerCase())), t.forEach(function(i) {
|
|
1348
|
+
const a = i.split("|");
|
|
1349
|
+
u[a[0]] = [n, Lt(a[0], a[1])];
|
|
1353
1350
|
});
|
|
1354
1351
|
}
|
|
1355
1352
|
}
|
|
1356
|
-
function Lt(e,
|
|
1357
|
-
return
|
|
1353
|
+
function Lt(e, r) {
|
|
1354
|
+
return r ? Number(r) : Ct(e) ? 0 : 1;
|
|
1358
1355
|
}
|
|
1359
|
-
function
|
|
1360
|
-
return
|
|
1356
|
+
function Ct(e) {
|
|
1357
|
+
return Rt.includes(e.toLowerCase());
|
|
1361
1358
|
}
|
|
1362
1359
|
const sn = {}, le = (e) => {
|
|
1363
1360
|
console.error(e);
|
|
1364
|
-
}, an = (e, ...
|
|
1365
|
-
console.log(`WARN: ${e}`, ...
|
|
1366
|
-
}, ue = (e,
|
|
1367
|
-
sn[`${e}/${
|
|
1368
|
-
},
|
|
1369
|
-
function wn(e,
|
|
1361
|
+
}, an = (e, ...r) => {
|
|
1362
|
+
console.log(`WARN: ${e}`, ...r);
|
|
1363
|
+
}, ue = (e, r) => {
|
|
1364
|
+
sn[`${e}/${r}`] || (console.log(`Deprecated as of ${e}. ${r}`), sn[`${e}/${r}`] = !0);
|
|
1365
|
+
}, Le = new Error();
|
|
1366
|
+
function wn(e, r, { key: o }) {
|
|
1370
1367
|
let u = 0;
|
|
1371
|
-
const h = e[
|
|
1372
|
-
for (let i = 1; i <=
|
|
1373
|
-
|
|
1374
|
-
e[
|
|
1368
|
+
const h = e[o], n = {}, t = {};
|
|
1369
|
+
for (let i = 1; i <= r.length; i++)
|
|
1370
|
+
t[i + u] = h[i], n[i + u] = !0, u += bn(r[i - 1]);
|
|
1371
|
+
e[o] = t, e[o]._emit = n, e[o]._multi = !0;
|
|
1375
1372
|
}
|
|
1376
|
-
function
|
|
1373
|
+
function It(e) {
|
|
1377
1374
|
if (Array.isArray(e.begin)) {
|
|
1378
1375
|
if (e.skip || e.excludeBegin || e.returnBegin)
|
|
1379
|
-
throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
|
|
1376
|
+
throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Le;
|
|
1380
1377
|
if (typeof e.beginScope != "object" || e.beginScope === null)
|
|
1381
|
-
throw le("beginScope must be object"),
|
|
1378
|
+
throw le("beginScope must be object"), Le;
|
|
1382
1379
|
wn(e, e.begin, { key: "beginScope" }), e.begin = Ze(e.begin, { joinWith: "" });
|
|
1383
1380
|
}
|
|
1384
1381
|
}
|
|
1385
|
-
function
|
|
1382
|
+
function kt(e) {
|
|
1386
1383
|
if (Array.isArray(e.end)) {
|
|
1387
1384
|
if (e.skip || e.excludeEnd || e.returnEnd)
|
|
1388
|
-
throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
|
|
1385
|
+
throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Le;
|
|
1389
1386
|
if (typeof e.endScope != "object" || e.endScope === null)
|
|
1390
|
-
throw le("endScope must be object"),
|
|
1387
|
+
throw le("endScope must be object"), Le;
|
|
1391
1388
|
wn(e, e.end, { key: "endScope" }), e.end = Ze(e.end, { joinWith: "" });
|
|
1392
1389
|
}
|
|
1393
1390
|
}
|
|
1394
|
-
function kt(e) {
|
|
1395
|
-
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
1396
|
-
}
|
|
1397
1391
|
function Bt(e) {
|
|
1398
|
-
|
|
1392
|
+
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
1399
1393
|
}
|
|
1400
1394
|
function $t(e) {
|
|
1401
|
-
|
|
1395
|
+
Bt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), It(e), kt(e);
|
|
1396
|
+
}
|
|
1397
|
+
function Ut(e) {
|
|
1398
|
+
function r(t, i) {
|
|
1402
1399
|
return new RegExp(
|
|
1403
|
-
Ee(
|
|
1400
|
+
Ee(t),
|
|
1404
1401
|
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
|
|
1405
1402
|
);
|
|
1406
1403
|
}
|
|
1407
|
-
class
|
|
1404
|
+
class o {
|
|
1408
1405
|
constructor() {
|
|
1409
1406
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
1410
1407
|
}
|
|
1411
1408
|
// @ts-ignore
|
|
1412
|
-
addRule(i,
|
|
1413
|
-
|
|
1409
|
+
addRule(i, a) {
|
|
1410
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt += bn(i) + 1;
|
|
1414
1411
|
}
|
|
1415
1412
|
compile() {
|
|
1416
1413
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1417
|
-
const i = this.regexes.map((
|
|
1418
|
-
this.matcherRe =
|
|
1414
|
+
const i = this.regexes.map((a) => a[1]);
|
|
1415
|
+
this.matcherRe = r(Ze(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1419
1416
|
}
|
|
1420
1417
|
/** @param {string} s */
|
|
1421
1418
|
exec(i) {
|
|
1422
1419
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
1423
|
-
const
|
|
1424
|
-
if (!
|
|
1420
|
+
const a = this.matcherRe.exec(i);
|
|
1421
|
+
if (!a)
|
|
1425
1422
|
return null;
|
|
1426
|
-
const
|
|
1427
|
-
return
|
|
1423
|
+
const s = a.findIndex((c, f) => f > 0 && c !== void 0), l = this.matchIndexes[s];
|
|
1424
|
+
return a.splice(0, s), Object.assign(a, l);
|
|
1428
1425
|
}
|
|
1429
1426
|
}
|
|
1430
1427
|
class u {
|
|
@@ -1435,8 +1432,8 @@ function $t(e) {
|
|
|
1435
1432
|
getMatcher(i) {
|
|
1436
1433
|
if (this.multiRegexes[i])
|
|
1437
1434
|
return this.multiRegexes[i];
|
|
1438
|
-
const
|
|
1439
|
-
return this.rules.slice(i).forEach(([
|
|
1435
|
+
const a = new o();
|
|
1436
|
+
return this.rules.slice(i).forEach(([s, l]) => a.addRule(s, l)), a.compile(), this.multiRegexes[i] = a, a;
|
|
1440
1437
|
}
|
|
1441
1438
|
resumingScanAtSamePosition() {
|
|
1442
1439
|
return this.regexIndex !== 0;
|
|
@@ -1445,60 +1442,60 @@ function $t(e) {
|
|
|
1445
1442
|
this.regexIndex = 0;
|
|
1446
1443
|
}
|
|
1447
1444
|
// @ts-ignore
|
|
1448
|
-
addRule(i,
|
|
1449
|
-
this.rules.push([i,
|
|
1445
|
+
addRule(i, a) {
|
|
1446
|
+
this.rules.push([i, a]), a.type === "begin" && this.count++;
|
|
1450
1447
|
}
|
|
1451
1448
|
/** @param {string} s */
|
|
1452
1449
|
exec(i) {
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1455
|
-
let
|
|
1456
|
-
if (this.resumingScanAtSamePosition() && !(
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1450
|
+
const a = this.getMatcher(this.regexIndex);
|
|
1451
|
+
a.lastIndex = this.lastIndex;
|
|
1452
|
+
let s = a.exec(i);
|
|
1453
|
+
if (this.resumingScanAtSamePosition() && !(s && s.index === this.lastIndex)) {
|
|
1454
|
+
const l = this.getMatcher(0);
|
|
1455
|
+
l.lastIndex = this.lastIndex + 1, s = l.exec(i);
|
|
1459
1456
|
}
|
|
1460
|
-
return
|
|
1457
|
+
return s && (this.regexIndex += s.position + 1, this.regexIndex === this.count && this.considerAll()), s;
|
|
1461
1458
|
}
|
|
1462
1459
|
}
|
|
1463
|
-
function h(
|
|
1460
|
+
function h(t) {
|
|
1464
1461
|
const i = new u();
|
|
1465
|
-
return
|
|
1462
|
+
return t.contains.forEach((a) => i.addRule(a.begin, { rule: a, type: "begin" })), t.terminatorEnd && i.addRule(t.terminatorEnd, { type: "end" }), t.illegal && i.addRule(t.illegal, { type: "illegal" }), i;
|
|
1466
1463
|
}
|
|
1467
|
-
function n(
|
|
1468
|
-
const
|
|
1464
|
+
function n(t, i) {
|
|
1465
|
+
const a = (
|
|
1469
1466
|
/** @type CompiledMode */
|
|
1470
|
-
|
|
1467
|
+
t
|
|
1471
1468
|
);
|
|
1472
|
-
if (
|
|
1473
|
-
return
|
|
1469
|
+
if (t.isCompiled)
|
|
1470
|
+
return a;
|
|
1474
1471
|
[
|
|
1475
|
-
|
|
1472
|
+
Nt,
|
|
1476
1473
|
// do this early so compiler extensions generally don't have to worry about
|
|
1477
1474
|
// the distinction between match/begin
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
].forEach((
|
|
1482
|
-
|
|
1475
|
+
Tt,
|
|
1476
|
+
$t,
|
|
1477
|
+
St
|
|
1478
|
+
].forEach((l) => l(t, i)), e.compilerExtensions.forEach((l) => l(t, i)), t.__beforeBegin = null, [
|
|
1479
|
+
Mt,
|
|
1483
1480
|
// do this later so compiler extensions that come earlier have access to the
|
|
1484
1481
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1485
|
-
|
|
1482
|
+
At,
|
|
1486
1483
|
// default to 1 relevance if not specified
|
|
1487
|
-
|
|
1488
|
-
].forEach((
|
|
1489
|
-
let
|
|
1490
|
-
return typeof
|
|
1484
|
+
Dt
|
|
1485
|
+
].forEach((l) => l(t, i)), t.isCompiled = !0;
|
|
1486
|
+
let s = null;
|
|
1487
|
+
return typeof t.keywords == "object" && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), s = t.keywords.$pattern, delete t.keywords.$pattern), s = s || /\w+/, t.keywords && (t.keywords = yn(t.keywords, e.case_insensitive)), a.keywordPatternRe = r(s, !0), i && (t.begin || (t.begin = /\B|\b/), a.beginRe = r(a.begin), !t.end && !t.endsWithParent && (t.end = /\B|\b/), t.end && (a.endRe = r(a.end)), a.terminatorEnd = Ee(a.end) || "", t.endsWithParent && i.terminatorEnd && (a.terminatorEnd += (t.end ? "|" : "") + i.terminatorEnd)), t.illegal && (a.illegalRe = r(
|
|
1491
1488
|
/** @type {RegExp | string} */
|
|
1492
|
-
|
|
1493
|
-
)),
|
|
1494
|
-
return
|
|
1495
|
-
})),
|
|
1489
|
+
t.illegal
|
|
1490
|
+
)), t.contains || (t.contains = []), t.contains = [].concat(...t.contains.map(function(l) {
|
|
1491
|
+
return Pt(l === "self" ? t : l);
|
|
1492
|
+
})), t.contains.forEach(function(l) {
|
|
1496
1493
|
n(
|
|
1497
1494
|
/** @type Mode */
|
|
1498
|
-
|
|
1499
|
-
|
|
1495
|
+
l,
|
|
1496
|
+
a
|
|
1500
1497
|
);
|
|
1501
|
-
}),
|
|
1498
|
+
}), t.starts && n(t.starts, i), a.matcher = h(a), a;
|
|
1502
1499
|
}
|
|
1503
1500
|
if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
|
|
1504
1501
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -1507,24 +1504,24 @@ function $t(e) {
|
|
|
1507
1504
|
e
|
|
1508
1505
|
);
|
|
1509
1506
|
}
|
|
1510
|
-
function
|
|
1511
|
-
return e ? e.endsWithParent ||
|
|
1507
|
+
function Nn(e) {
|
|
1508
|
+
return e ? e.endsWithParent || Nn(e.starts) : !1;
|
|
1512
1509
|
}
|
|
1513
|
-
function
|
|
1514
|
-
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(
|
|
1515
|
-
return ae(e, { variants: null },
|
|
1516
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
1510
|
+
function Pt(e) {
|
|
1511
|
+
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(r) {
|
|
1512
|
+
return ae(e, { variants: null }, r);
|
|
1513
|
+
})), e.cachedVariants ? e.cachedVariants : Nn(e) ? ae(e, { starts: e.starts ? ae(e.starts) : null }) : Object.isFrozen(e) ? ae(e) : e;
|
|
1517
1514
|
}
|
|
1518
|
-
var
|
|
1519
|
-
class
|
|
1520
|
-
constructor(
|
|
1521
|
-
super(
|
|
1515
|
+
var xt = "11.7.0";
|
|
1516
|
+
class Ht extends Error {
|
|
1517
|
+
constructor(r, o) {
|
|
1518
|
+
super(r), this.name = "HTMLInjectionError", this.html = o;
|
|
1522
1519
|
}
|
|
1523
1520
|
}
|
|
1524
|
-
const Pe =
|
|
1525
|
-
const
|
|
1521
|
+
const Pe = dn, on = ae, ln = Symbol("nomatch"), Ft = 7, zt = function(e) {
|
|
1522
|
+
const r = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null), u = [];
|
|
1526
1523
|
let h = !0;
|
|
1527
|
-
const n = "Could not find the language '{}', did you forget to load/include a language module?",
|
|
1524
|
+
const n = "Could not find the language '{}', did you forget to load/include a language module?", t = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
1528
1525
|
let i = {
|
|
1529
1526
|
ignoreUnescapedHTML: !1,
|
|
1530
1527
|
throwUnescapedHTML: !1,
|
|
@@ -1535,143 +1532,143 @@ const Pe = hn, on = ae, ln = Symbol("nomatch"), Ht = 7, zt = function(e) {
|
|
|
1535
1532
|
languages: null,
|
|
1536
1533
|
// beta configuration options, subject to change, welcome to discuss
|
|
1537
1534
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1538
|
-
__emitter:
|
|
1535
|
+
__emitter: qn
|
|
1539
1536
|
};
|
|
1540
|
-
function
|
|
1537
|
+
function a(_) {
|
|
1541
1538
|
return i.noHighlightRe.test(_);
|
|
1542
1539
|
}
|
|
1543
|
-
function
|
|
1540
|
+
function s(_) {
|
|
1544
1541
|
let M = _.className + " ";
|
|
1545
1542
|
M += _.parentNode ? _.parentNode.className : "";
|
|
1546
|
-
const
|
|
1547
|
-
if (
|
|
1548
|
-
const k = R(
|
|
1549
|
-
return k || (an(n.replace("{}",
|
|
1543
|
+
const L = i.languageDetectRe.exec(M);
|
|
1544
|
+
if (L) {
|
|
1545
|
+
const k = R(L[1]);
|
|
1546
|
+
return k || (an(n.replace("{}", L[1])), an("Falling back to no-highlight mode for this block.", _)), k ? L[1] : "no-highlight";
|
|
1550
1547
|
}
|
|
1551
|
-
return M.split(/\s+/).find((k) =>
|
|
1548
|
+
return M.split(/\s+/).find((k) => a(k) || R(k));
|
|
1552
1549
|
}
|
|
1553
|
-
function
|
|
1550
|
+
function l(_, M, L) {
|
|
1554
1551
|
let k = "", H = "";
|
|
1555
|
-
typeof M == "object" ? (k = _,
|
|
1556
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M),
|
|
1552
|
+
typeof M == "object" ? (k = _, L = M.ignoreIllegals, H = M.language) : (ue("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ue("10.7.0", `Please use highlight(code, options) instead.
|
|
1553
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), L === void 0 && (L = !0);
|
|
1557
1554
|
const Y = {
|
|
1558
1555
|
code: k,
|
|
1559
1556
|
language: H
|
|
1560
1557
|
};
|
|
1561
1558
|
Q("before:highlight", Y);
|
|
1562
|
-
const q = Y.result ? Y.result : c(Y.language, Y.code,
|
|
1559
|
+
const q = Y.result ? Y.result : c(Y.language, Y.code, L);
|
|
1563
1560
|
return q.code = Y.code, Q("after:highlight", q), q;
|
|
1564
1561
|
}
|
|
1565
|
-
function c(_, M,
|
|
1562
|
+
function c(_, M, L, k) {
|
|
1566
1563
|
const H = /* @__PURE__ */ Object.create(null);
|
|
1567
|
-
function Y(
|
|
1568
|
-
return
|
|
1564
|
+
function Y(y, T) {
|
|
1565
|
+
return y.keywords[T];
|
|
1569
1566
|
}
|
|
1570
1567
|
function q() {
|
|
1571
|
-
if (!
|
|
1568
|
+
if (!O.keywords) {
|
|
1572
1569
|
K.addText(x);
|
|
1573
1570
|
return;
|
|
1574
1571
|
}
|
|
1575
|
-
let
|
|
1576
|
-
|
|
1577
|
-
let T =
|
|
1572
|
+
let y = 0;
|
|
1573
|
+
O.keywordPatternRe.lastIndex = 0;
|
|
1574
|
+
let T = O.keywordPatternRe.exec(x), C = "";
|
|
1578
1575
|
for (; T; ) {
|
|
1579
|
-
C += x.substring(
|
|
1580
|
-
const B = se.case_insensitive ? T[0].toLowerCase() : T[0], Z = Y(
|
|
1576
|
+
C += x.substring(y, T.index);
|
|
1577
|
+
const B = se.case_insensitive ? T[0].toLowerCase() : T[0], Z = Y(O, B);
|
|
1581
1578
|
if (Z) {
|
|
1582
|
-
const [ee,
|
|
1583
|
-
if (K.addText(C), C = "", H[B] = (H[B] || 0) + 1, H[B] <=
|
|
1579
|
+
const [ee, Bn] = Z;
|
|
1580
|
+
if (K.addText(C), C = "", H[B] = (H[B] || 0) + 1, H[B] <= Ft && (Ae += Bn), ee.startsWith("_"))
|
|
1584
1581
|
C += T[0];
|
|
1585
1582
|
else {
|
|
1586
|
-
const
|
|
1587
|
-
K.addKeyword(T[0],
|
|
1583
|
+
const $n = se.classNameAliases[ee] || ee;
|
|
1584
|
+
K.addKeyword(T[0], $n);
|
|
1588
1585
|
}
|
|
1589
1586
|
} else
|
|
1590
1587
|
C += T[0];
|
|
1591
|
-
|
|
1588
|
+
y = O.keywordPatternRe.lastIndex, T = O.keywordPatternRe.exec(x);
|
|
1592
1589
|
}
|
|
1593
|
-
C += x.substring(
|
|
1590
|
+
C += x.substring(y), K.addText(C);
|
|
1594
1591
|
}
|
|
1595
1592
|
function Ne() {
|
|
1596
1593
|
if (x === "")
|
|
1597
1594
|
return;
|
|
1598
|
-
let
|
|
1599
|
-
if (typeof
|
|
1600
|
-
if (!
|
|
1595
|
+
let y = null;
|
|
1596
|
+
if (typeof O.subLanguage == "string") {
|
|
1597
|
+
if (!r[O.subLanguage]) {
|
|
1601
1598
|
K.addText(x);
|
|
1602
1599
|
return;
|
|
1603
1600
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1601
|
+
y = c(O.subLanguage, x, !0, Je[O.subLanguage]), Je[O.subLanguage] = /** @type {CompiledMode} */
|
|
1602
|
+
y._top;
|
|
1606
1603
|
} else
|
|
1607
|
-
|
|
1608
|
-
|
|
1604
|
+
y = g(x, O.subLanguage.length ? O.subLanguage : null);
|
|
1605
|
+
O.relevance > 0 && (Ae += y.relevance), K.addSublanguage(y._emitter, y.language);
|
|
1609
1606
|
}
|
|
1610
1607
|
function X() {
|
|
1611
|
-
|
|
1608
|
+
O.subLanguage != null ? Ne() : q(), x = "";
|
|
1612
1609
|
}
|
|
1613
|
-
function ie(
|
|
1610
|
+
function ie(y, T) {
|
|
1614
1611
|
let C = 1;
|
|
1615
1612
|
const B = T.length - 1;
|
|
1616
1613
|
for (; C <= B; ) {
|
|
1617
|
-
if (!
|
|
1614
|
+
if (!y._emit[C]) {
|
|
1618
1615
|
C++;
|
|
1619
1616
|
continue;
|
|
1620
1617
|
}
|
|
1621
|
-
const Z = se.classNameAliases[
|
|
1618
|
+
const Z = se.classNameAliases[y[C]] || y[C], ee = T[C];
|
|
1622
1619
|
Z ? K.addKeyword(ee, Z) : (x = ee, q(), x = ""), C++;
|
|
1623
1620
|
}
|
|
1624
1621
|
}
|
|
1625
|
-
function Xe(
|
|
1626
|
-
return
|
|
1622
|
+
function Xe(y, T) {
|
|
1623
|
+
return y.scope && typeof y.scope == "string" && K.openNode(se.classNameAliases[y.scope] || y.scope), y.beginScope && (y.beginScope._wrap ? (K.addKeyword(x, se.classNameAliases[y.beginScope._wrap] || y.beginScope._wrap), x = "") : y.beginScope._multi && (ie(y.beginScope, T), x = "")), O = Object.create(y, { parent: { value: O } }), O;
|
|
1627
1624
|
}
|
|
1628
|
-
function
|
|
1629
|
-
let B =
|
|
1625
|
+
function je(y, T, C) {
|
|
1626
|
+
let B = rt(y.endRe, C);
|
|
1630
1627
|
if (B) {
|
|
1631
|
-
if (
|
|
1632
|
-
const Z = new nn(
|
|
1633
|
-
|
|
1628
|
+
if (y["on:end"]) {
|
|
1629
|
+
const Z = new nn(y);
|
|
1630
|
+
y["on:end"](T, Z), Z.isMatchIgnored && (B = !1);
|
|
1634
1631
|
}
|
|
1635
1632
|
if (B) {
|
|
1636
|
-
for (;
|
|
1637
|
-
|
|
1638
|
-
return
|
|
1633
|
+
for (; y.endsParent && y.parent; )
|
|
1634
|
+
y = y.parent;
|
|
1635
|
+
return y;
|
|
1639
1636
|
}
|
|
1640
1637
|
}
|
|
1641
|
-
if (
|
|
1642
|
-
return
|
|
1638
|
+
if (y.endsWithParent)
|
|
1639
|
+
return je(y.parent, T, C);
|
|
1643
1640
|
}
|
|
1644
|
-
function
|
|
1645
|
-
return
|
|
1641
|
+
function On(y) {
|
|
1642
|
+
return O.matcher.regexIndex === 0 ? (x += y[0], 1) : ($e = !0, 0);
|
|
1646
1643
|
}
|
|
1647
|
-
function Ln(
|
|
1648
|
-
const T =
|
|
1644
|
+
function Ln(y) {
|
|
1645
|
+
const T = y[0], C = y.rule, B = new nn(C), Z = [C.__beforeBegin, C["on:begin"]];
|
|
1649
1646
|
for (const ee of Z)
|
|
1650
|
-
if (ee && (ee(
|
|
1651
|
-
return
|
|
1652
|
-
return C.skip ? x += T : (C.excludeBegin && (x += T), X(), !C.returnBegin && !C.excludeBegin && (x = T)), Xe(C,
|
|
1647
|
+
if (ee && (ee(y, B), B.isMatchIgnored))
|
|
1648
|
+
return On(T);
|
|
1649
|
+
return C.skip ? x += T : (C.excludeBegin && (x += T), X(), !C.returnBegin && !C.excludeBegin && (x = T)), Xe(C, y), C.returnBegin ? 0 : T.length;
|
|
1653
1650
|
}
|
|
1654
|
-
function
|
|
1655
|
-
const T =
|
|
1651
|
+
function Cn(y) {
|
|
1652
|
+
const T = y[0], C = M.substring(y.index), B = je(O, y, C);
|
|
1656
1653
|
if (!B)
|
|
1657
1654
|
return ln;
|
|
1658
|
-
const Z =
|
|
1659
|
-
|
|
1655
|
+
const Z = O;
|
|
1656
|
+
O.endScope && O.endScope._wrap ? (X(), K.addKeyword(T, O.endScope._wrap)) : O.endScope && O.endScope._multi ? (X(), ie(O.endScope, y)) : Z.skip ? x += T : (Z.returnEnd || Z.excludeEnd || (x += T), X(), Z.excludeEnd && (x = T));
|
|
1660
1657
|
do
|
|
1661
|
-
|
|
1662
|
-
while (
|
|
1663
|
-
return B.starts && Xe(B.starts,
|
|
1658
|
+
O.scope && K.closeNode(), !O.skip && !O.subLanguage && (Ae += O.relevance), O = O.parent;
|
|
1659
|
+
while (O !== B.parent);
|
|
1660
|
+
return B.starts && Xe(B.starts, y), Z.returnEnd ? 0 : T.length;
|
|
1664
1661
|
}
|
|
1665
|
-
function
|
|
1666
|
-
const
|
|
1667
|
-
for (let T =
|
|
1668
|
-
T.scope &&
|
|
1669
|
-
|
|
1662
|
+
function In() {
|
|
1663
|
+
const y = [];
|
|
1664
|
+
for (let T = O; T !== se; T = T.parent)
|
|
1665
|
+
T.scope && y.unshift(T.scope);
|
|
1666
|
+
y.forEach((T) => K.openNode(T));
|
|
1670
1667
|
}
|
|
1671
1668
|
let Me = {};
|
|
1672
|
-
function
|
|
1669
|
+
function Ve(y, T) {
|
|
1673
1670
|
const C = T && T[0];
|
|
1674
|
-
if (x +=
|
|
1671
|
+
if (x += y, C == null)
|
|
1675
1672
|
return X(), 0;
|
|
1676
1673
|
if (Me.type === "begin" && T.type === "end" && Me.index === T.index && C === "") {
|
|
1677
1674
|
if (x += M.slice(T.index, T.index + 1), !h) {
|
|
@@ -1682,58 +1679,58 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1682
1679
|
}
|
|
1683
1680
|
if (Me = T, T.type === "begin")
|
|
1684
1681
|
return Ln(T);
|
|
1685
|
-
if (T.type === "illegal" && !
|
|
1686
|
-
const B = new Error('Illegal lexeme "' + C + '" for mode "' + (
|
|
1687
|
-
throw B.mode =
|
|
1682
|
+
if (T.type === "illegal" && !L) {
|
|
1683
|
+
const B = new Error('Illegal lexeme "' + C + '" for mode "' + (O.scope || "<unnamed>") + '"');
|
|
1684
|
+
throw B.mode = O, B;
|
|
1688
1685
|
} else if (T.type === "end") {
|
|
1689
|
-
const B =
|
|
1686
|
+
const B = Cn(T);
|
|
1690
1687
|
if (B !== ln)
|
|
1691
1688
|
return B;
|
|
1692
1689
|
}
|
|
1693
1690
|
if (T.type === "illegal" && C === "")
|
|
1694
1691
|
return 1;
|
|
1695
|
-
if (
|
|
1692
|
+
if (Be > 1e5 && Be > T.index * 3)
|
|
1696
1693
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1697
1694
|
return x += C, C.length;
|
|
1698
1695
|
}
|
|
1699
1696
|
const se = R(_);
|
|
1700
1697
|
if (!se)
|
|
1701
1698
|
throw le(n.replace("{}", _)), new Error('Unknown language: "' + _ + '"');
|
|
1702
|
-
const
|
|
1703
|
-
let
|
|
1699
|
+
const kn = Ut(se);
|
|
1700
|
+
let ke = "", O = k || kn;
|
|
1704
1701
|
const Je = {}, K = new i.__emitter(i);
|
|
1705
|
-
|
|
1706
|
-
let x = "", Ae = 0, oe = 0,
|
|
1702
|
+
In();
|
|
1703
|
+
let x = "", Ae = 0, oe = 0, Be = 0, $e = !1;
|
|
1707
1704
|
try {
|
|
1708
|
-
for (
|
|
1709
|
-
$e
|
|
1710
|
-
const
|
|
1711
|
-
if (!
|
|
1705
|
+
for (O.matcher.considerAll(); ; ) {
|
|
1706
|
+
Be++, $e ? $e = !1 : O.matcher.considerAll(), O.matcher.lastIndex = oe;
|
|
1707
|
+
const y = O.matcher.exec(M);
|
|
1708
|
+
if (!y)
|
|
1712
1709
|
break;
|
|
1713
|
-
const T = M.substring(oe,
|
|
1714
|
-
oe =
|
|
1710
|
+
const T = M.substring(oe, y.index), C = Ve(T, y);
|
|
1711
|
+
oe = y.index + C;
|
|
1715
1712
|
}
|
|
1716
|
-
return
|
|
1713
|
+
return Ve(M.substring(oe)), K.closeAllNodes(), K.finalize(), ke = K.toHTML(), {
|
|
1717
1714
|
language: _,
|
|
1718
|
-
value:
|
|
1715
|
+
value: ke,
|
|
1719
1716
|
relevance: Ae,
|
|
1720
1717
|
illegal: !1,
|
|
1721
1718
|
_emitter: K,
|
|
1722
|
-
_top:
|
|
1719
|
+
_top: O
|
|
1723
1720
|
};
|
|
1724
|
-
} catch (
|
|
1725
|
-
if (
|
|
1721
|
+
} catch (y) {
|
|
1722
|
+
if (y.message && y.message.includes("Illegal"))
|
|
1726
1723
|
return {
|
|
1727
1724
|
language: _,
|
|
1728
1725
|
value: Pe(M),
|
|
1729
1726
|
illegal: !0,
|
|
1730
1727
|
relevance: 0,
|
|
1731
1728
|
_illegalBy: {
|
|
1732
|
-
message:
|
|
1729
|
+
message: y.message,
|
|
1733
1730
|
index: oe,
|
|
1734
1731
|
context: M.slice(oe - 100, oe + 100),
|
|
1735
|
-
mode:
|
|
1736
|
-
resultSoFar:
|
|
1732
|
+
mode: y.mode,
|
|
1733
|
+
resultSoFar: ke
|
|
1737
1734
|
},
|
|
1738
1735
|
_emitter: K
|
|
1739
1736
|
};
|
|
@@ -1743,11 +1740,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1743
1740
|
value: Pe(M),
|
|
1744
1741
|
illegal: !1,
|
|
1745
1742
|
relevance: 0,
|
|
1746
|
-
errorRaised:
|
|
1743
|
+
errorRaised: y,
|
|
1747
1744
|
_emitter: K,
|
|
1748
|
-
_top:
|
|
1745
|
+
_top: O
|
|
1749
1746
|
};
|
|
1750
|
-
throw
|
|
1747
|
+
throw y;
|
|
1751
1748
|
}
|
|
1752
1749
|
}
|
|
1753
1750
|
function f(_) {
|
|
@@ -1755,17 +1752,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1755
1752
|
value: Pe(_),
|
|
1756
1753
|
illegal: !1,
|
|
1757
1754
|
relevance: 0,
|
|
1758
|
-
_top:
|
|
1755
|
+
_top: t,
|
|
1759
1756
|
_emitter: new i.__emitter(i)
|
|
1760
1757
|
};
|
|
1761
1758
|
return M._emitter.addText(_), M;
|
|
1762
1759
|
}
|
|
1763
1760
|
function g(_, M) {
|
|
1764
|
-
M = M || i.languages || Object.keys(
|
|
1765
|
-
const
|
|
1761
|
+
M = M || i.languages || Object.keys(r);
|
|
1762
|
+
const L = f(_), k = M.filter(R).filter(U).map(
|
|
1766
1763
|
(X) => c(X, _, !1)
|
|
1767
1764
|
);
|
|
1768
|
-
k.unshift(
|
|
1765
|
+
k.unshift(L);
|
|
1769
1766
|
const H = k.sort((X, ie) => {
|
|
1770
1767
|
if (X.relevance !== ie.relevance)
|
|
1771
1768
|
return ie.relevance - X.relevance;
|
|
@@ -1779,26 +1776,26 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1779
1776
|
}), [Y, q] = H, Ne = Y;
|
|
1780
1777
|
return Ne.secondBest = q, Ne;
|
|
1781
1778
|
}
|
|
1782
|
-
function d(_, M,
|
|
1783
|
-
const k = M &&
|
|
1779
|
+
function d(_, M, L) {
|
|
1780
|
+
const k = M && o[M] || L;
|
|
1784
1781
|
_.classList.add("hljs"), _.classList.add(`language-${k}`);
|
|
1785
1782
|
}
|
|
1786
1783
|
function p(_) {
|
|
1787
1784
|
let M = null;
|
|
1788
|
-
const
|
|
1789
|
-
if (
|
|
1785
|
+
const L = s(_);
|
|
1786
|
+
if (a(L))
|
|
1790
1787
|
return;
|
|
1791
1788
|
if (Q(
|
|
1792
1789
|
"before:highlightElement",
|
|
1793
|
-
{ el: _, language:
|
|
1790
|
+
{ el: _, language: L }
|
|
1794
1791
|
), _.children.length > 0 && (i.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(_)), i.throwUnescapedHTML))
|
|
1795
|
-
throw new
|
|
1792
|
+
throw new Ht(
|
|
1796
1793
|
"One of your code blocks includes unescaped HTML.",
|
|
1797
1794
|
_.innerHTML
|
|
1798
1795
|
);
|
|
1799
1796
|
M = _;
|
|
1800
|
-
const k = M.textContent, H =
|
|
1801
|
-
_.innerHTML = H.value, d(_,
|
|
1797
|
+
const k = M.textContent, H = L ? l(k, { language: L, ignoreIllegals: !0 }) : g(k);
|
|
1798
|
+
_.innerHTML = H.value, d(_, L, H.language), _.result = {
|
|
1802
1799
|
language: H.language,
|
|
1803
1800
|
// TODO: remove with version 11.0
|
|
1804
1801
|
re: H.relevance,
|
|
@@ -1817,45 +1814,45 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1817
1814
|
function v() {
|
|
1818
1815
|
m(), ue("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1819
1816
|
}
|
|
1820
|
-
let
|
|
1817
|
+
let w = !1;
|
|
1821
1818
|
function m() {
|
|
1822
1819
|
if (document.readyState === "loading") {
|
|
1823
|
-
|
|
1820
|
+
w = !0;
|
|
1824
1821
|
return;
|
|
1825
1822
|
}
|
|
1826
1823
|
document.querySelectorAll(i.cssSelector).forEach(p);
|
|
1827
1824
|
}
|
|
1828
1825
|
function D() {
|
|
1829
|
-
|
|
1826
|
+
w && m();
|
|
1830
1827
|
}
|
|
1831
1828
|
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, !1);
|
|
1832
1829
|
function S(_, M) {
|
|
1833
|
-
let
|
|
1830
|
+
let L = null;
|
|
1834
1831
|
try {
|
|
1835
|
-
|
|
1832
|
+
L = M(e);
|
|
1836
1833
|
} catch (k) {
|
|
1837
1834
|
if (le("Language definition for '{}' could not be registered.".replace("{}", _)), h)
|
|
1838
1835
|
le(k);
|
|
1839
1836
|
else
|
|
1840
1837
|
throw k;
|
|
1841
|
-
|
|
1838
|
+
L = t;
|
|
1842
1839
|
}
|
|
1843
|
-
|
|
1840
|
+
L.name || (L.name = _), r[_] = L, L.rawDefinition = M.bind(null, e), L.aliases && F(L.aliases, { languageName: _ });
|
|
1844
1841
|
}
|
|
1845
1842
|
function A(_) {
|
|
1846
|
-
delete
|
|
1847
|
-
for (const M of Object.keys(
|
|
1848
|
-
|
|
1843
|
+
delete r[_];
|
|
1844
|
+
for (const M of Object.keys(o))
|
|
1845
|
+
o[M] === _ && delete o[M];
|
|
1849
1846
|
}
|
|
1850
1847
|
function I() {
|
|
1851
|
-
return Object.keys(
|
|
1848
|
+
return Object.keys(r);
|
|
1852
1849
|
}
|
|
1853
1850
|
function R(_) {
|
|
1854
|
-
return _ = (_ || "").toLowerCase(),
|
|
1851
|
+
return _ = (_ || "").toLowerCase(), r[_] || r[o[_]];
|
|
1855
1852
|
}
|
|
1856
|
-
function
|
|
1857
|
-
typeof _ == "string" && (_ = [_]), _.forEach((
|
|
1858
|
-
|
|
1853
|
+
function F(_, { languageName: M }) {
|
|
1854
|
+
typeof _ == "string" && (_ = [_]), _.forEach((L) => {
|
|
1855
|
+
o[L.toLowerCase()] = M;
|
|
1859
1856
|
});
|
|
1860
1857
|
}
|
|
1861
1858
|
function U(_) {
|
|
@@ -1877,21 +1874,21 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1877
1874
|
$(_), u.push(_);
|
|
1878
1875
|
}
|
|
1879
1876
|
function Q(_, M) {
|
|
1880
|
-
const
|
|
1877
|
+
const L = _;
|
|
1881
1878
|
u.forEach(function(k) {
|
|
1882
|
-
k[
|
|
1879
|
+
k[L] && k[L](M);
|
|
1883
1880
|
});
|
|
1884
1881
|
}
|
|
1885
|
-
function
|
|
1882
|
+
function we(_) {
|
|
1886
1883
|
return ue("10.7.0", "highlightBlock will be removed entirely in v12.0"), ue("10.7.0", "Please use highlightElement now."), p(_);
|
|
1887
1884
|
}
|
|
1888
1885
|
Object.assign(e, {
|
|
1889
|
-
highlight:
|
|
1886
|
+
highlight: l,
|
|
1890
1887
|
highlightAuto: g,
|
|
1891
1888
|
highlightAll: m,
|
|
1892
1889
|
highlightElement: p,
|
|
1893
1890
|
// TODO: Remove with v12 API
|
|
1894
|
-
highlightBlock:
|
|
1891
|
+
highlightBlock: we,
|
|
1895
1892
|
configure: b,
|
|
1896
1893
|
initHighlighting: E,
|
|
1897
1894
|
initHighlightingOnLoad: v,
|
|
@@ -1899,7 +1896,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1899
1896
|
unregisterLanguage: A,
|
|
1900
1897
|
listLanguages: I,
|
|
1901
1898
|
getLanguage: R,
|
|
1902
|
-
registerAliases:
|
|
1899
|
+
registerAliases: F,
|
|
1903
1900
|
autoDetection: U,
|
|
1904
1901
|
inherit: on,
|
|
1905
1902
|
addPlugin: G
|
|
@@ -1907,23 +1904,23 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = _, k = M), O ===
|
|
|
1907
1904
|
h = !1;
|
|
1908
1905
|
}, e.safeMode = function() {
|
|
1909
1906
|
h = !0;
|
|
1910
|
-
}, e.versionString =
|
|
1907
|
+
}, e.versionString = xt, e.regex = {
|
|
1911
1908
|
concat: ce,
|
|
1912
|
-
lookahead:
|
|
1909
|
+
lookahead: pn,
|
|
1913
1910
|
either: Qe,
|
|
1914
|
-
optional:
|
|
1915
|
-
anyNumberOfTimes:
|
|
1911
|
+
optional: nt,
|
|
1912
|
+
anyNumberOfTimes: et
|
|
1916
1913
|
};
|
|
1917
|
-
for (const _ in
|
|
1918
|
-
typeof
|
|
1919
|
-
return Object.assign(e,
|
|
1914
|
+
for (const _ in Te)
|
|
1915
|
+
typeof Te[_] == "object" && Ge.exports(Te[_]);
|
|
1916
|
+
return Object.assign(e, Te), e;
|
|
1920
1917
|
};
|
|
1921
|
-
var me = zt({}),
|
|
1918
|
+
var me = zt({}), Gt = me;
|
|
1922
1919
|
me.HighlightJS = me;
|
|
1923
1920
|
me.default = me;
|
|
1924
|
-
const J =
|
|
1925
|
-
function
|
|
1926
|
-
const
|
|
1921
|
+
const J = /* @__PURE__ */ Xn(Gt);
|
|
1922
|
+
function Kt(e) {
|
|
1923
|
+
const r = e.regex, o = r.concat(/[\p{L}_]/u, r.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u, h = {
|
|
1927
1924
|
className: "symbol",
|
|
1928
1925
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1929
1926
|
}, n = {
|
|
@@ -1935,10 +1932,10 @@ function Gt(e) {
|
|
|
1935
1932
|
illegal: /\n/
|
|
1936
1933
|
}
|
|
1937
1934
|
]
|
|
1938
|
-
},
|
|
1935
|
+
}, t = e.inherit(n, {
|
|
1939
1936
|
begin: /\(/,
|
|
1940
1937
|
end: /\)/
|
|
1941
|
-
}), i = e.inherit(e.APOS_STRING_MODE, { className: "string" }),
|
|
1938
|
+
}), i = e.inherit(e.APOS_STRING_MODE, { className: "string" }), a = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), s = {
|
|
1942
1939
|
endsWithParent: !0,
|
|
1943
1940
|
illegal: /</,
|
|
1944
1941
|
relevance: 0,
|
|
@@ -1997,9 +1994,9 @@ function Gt(e) {
|
|
|
1997
1994
|
relevance: 10,
|
|
1998
1995
|
contains: [
|
|
1999
1996
|
n,
|
|
2000
|
-
|
|
1997
|
+
a,
|
|
2001
1998
|
i,
|
|
2002
|
-
|
|
1999
|
+
t,
|
|
2003
2000
|
{
|
|
2004
2001
|
begin: /\[/,
|
|
2005
2002
|
end: /\]/,
|
|
@@ -2010,8 +2007,8 @@ function Gt(e) {
|
|
|
2010
2007
|
end: />/,
|
|
2011
2008
|
contains: [
|
|
2012
2009
|
n,
|
|
2013
|
-
|
|
2014
|
-
|
|
2010
|
+
t,
|
|
2011
|
+
a,
|
|
2015
2012
|
i
|
|
2016
2013
|
]
|
|
2017
2014
|
}
|
|
@@ -2039,7 +2036,7 @@ function Gt(e) {
|
|
|
2039
2036
|
begin: /<\?xml/,
|
|
2040
2037
|
relevance: 10,
|
|
2041
2038
|
contains: [
|
|
2042
|
-
|
|
2039
|
+
a
|
|
2043
2040
|
]
|
|
2044
2041
|
},
|
|
2045
2042
|
{
|
|
@@ -2057,7 +2054,7 @@ function Gt(e) {
|
|
|
2057
2054
|
begin: /<style(?=\s|>)/,
|
|
2058
2055
|
end: />/,
|
|
2059
2056
|
keywords: { name: "style" },
|
|
2060
|
-
contains: [
|
|
2057
|
+
contains: [s],
|
|
2061
2058
|
starts: {
|
|
2062
2059
|
end: /<\/style>/,
|
|
2063
2060
|
returnEnd: !0,
|
|
@@ -2073,7 +2070,7 @@ function Gt(e) {
|
|
|
2073
2070
|
begin: /<script(?=\s|>)/,
|
|
2074
2071
|
end: />/,
|
|
2075
2072
|
keywords: { name: "script" },
|
|
2076
|
-
contains: [
|
|
2073
|
+
contains: [s],
|
|
2077
2074
|
starts: {
|
|
2078
2075
|
end: /<\/script>/,
|
|
2079
2076
|
returnEnd: !0,
|
|
@@ -2092,40 +2089,40 @@ function Gt(e) {
|
|
|
2092
2089
|
// open tag
|
|
2093
2090
|
{
|
|
2094
2091
|
className: "tag",
|
|
2095
|
-
begin:
|
|
2092
|
+
begin: r.concat(
|
|
2096
2093
|
/</,
|
|
2097
|
-
|
|
2098
|
-
|
|
2094
|
+
r.lookahead(r.concat(
|
|
2095
|
+
o,
|
|
2099
2096
|
// <tag/>
|
|
2100
2097
|
// <tag>
|
|
2101
2098
|
// <tag ...
|
|
2102
|
-
|
|
2099
|
+
r.either(/\/>/, />/, /\s/)
|
|
2103
2100
|
))
|
|
2104
2101
|
),
|
|
2105
2102
|
end: /\/?>/,
|
|
2106
2103
|
contains: [
|
|
2107
2104
|
{
|
|
2108
2105
|
className: "name",
|
|
2109
|
-
begin:
|
|
2106
|
+
begin: o,
|
|
2110
2107
|
relevance: 0,
|
|
2111
|
-
starts:
|
|
2108
|
+
starts: s
|
|
2112
2109
|
}
|
|
2113
2110
|
]
|
|
2114
2111
|
},
|
|
2115
2112
|
// close tag
|
|
2116
2113
|
{
|
|
2117
2114
|
className: "tag",
|
|
2118
|
-
begin:
|
|
2115
|
+
begin: r.concat(
|
|
2119
2116
|
/<\//,
|
|
2120
|
-
|
|
2121
|
-
|
|
2117
|
+
r.lookahead(r.concat(
|
|
2118
|
+
o,
|
|
2122
2119
|
/>/
|
|
2123
2120
|
))
|
|
2124
2121
|
),
|
|
2125
2122
|
contains: [
|
|
2126
2123
|
{
|
|
2127
2124
|
className: "name",
|
|
2128
|
-
begin:
|
|
2125
|
+
begin: o,
|
|
2129
2126
|
relevance: 0
|
|
2130
2127
|
},
|
|
2131
2128
|
{
|
|
@@ -2138,7 +2135,7 @@ function Gt(e) {
|
|
|
2138
2135
|
]
|
|
2139
2136
|
};
|
|
2140
2137
|
}
|
|
2141
|
-
const cn = "[A-Za-z$_][0-9A-Za-z$_]*",
|
|
2138
|
+
const cn = "[A-Za-z$_][0-9A-Za-z$_]*", Wt = [
|
|
2142
2139
|
"as",
|
|
2143
2140
|
// for exports
|
|
2144
2141
|
"in",
|
|
@@ -2181,14 +2178,14 @@ const cn = "[A-Za-z$_][0-9A-Za-z$_]*", Kt = [
|
|
|
2181
2178
|
"from",
|
|
2182
2179
|
"export",
|
|
2183
2180
|
"extends"
|
|
2184
|
-
],
|
|
2181
|
+
], Qt = [
|
|
2185
2182
|
"true",
|
|
2186
2183
|
"false",
|
|
2187
2184
|
"null",
|
|
2188
2185
|
"undefined",
|
|
2189
2186
|
"NaN",
|
|
2190
2187
|
"Infinity"
|
|
2191
|
-
],
|
|
2188
|
+
], Mn = [
|
|
2192
2189
|
// Fundamental objects
|
|
2193
2190
|
"Object",
|
|
2194
2191
|
"Function",
|
|
@@ -2238,7 +2235,7 @@ const cn = "[A-Za-z$_][0-9A-Za-z$_]*", Kt = [
|
|
|
2238
2235
|
"Intl",
|
|
2239
2236
|
// WebAssembly
|
|
2240
2237
|
"WebAssembly"
|
|
2241
|
-
],
|
|
2238
|
+
], An = [
|
|
2242
2239
|
"Error",
|
|
2243
2240
|
"EvalError",
|
|
2244
2241
|
"InternalError",
|
|
@@ -2247,7 +2244,7 @@ const cn = "[A-Za-z$_][0-9A-Za-z$_]*", Kt = [
|
|
|
2247
2244
|
"SyntaxError",
|
|
2248
2245
|
"TypeError",
|
|
2249
2246
|
"URIError"
|
|
2250
|
-
],
|
|
2247
|
+
], Tn = [
|
|
2251
2248
|
"setInterval",
|
|
2252
2249
|
"setTimeout",
|
|
2253
2250
|
"clearInterval",
|
|
@@ -2265,7 +2262,7 @@ const cn = "[A-Za-z$_][0-9A-Za-z$_]*", Kt = [
|
|
|
2265
2262
|
"encodeURIComponent",
|
|
2266
2263
|
"escape",
|
|
2267
2264
|
"unescape"
|
|
2268
|
-
],
|
|
2265
|
+
], Zt = [
|
|
2269
2266
|
"arguments",
|
|
2270
2267
|
"this",
|
|
2271
2268
|
"super",
|
|
@@ -2276,26 +2273,26 @@ const cn = "[A-Za-z$_][0-9A-Za-z$_]*", Kt = [
|
|
|
2276
2273
|
"module",
|
|
2277
2274
|
"global"
|
|
2278
2275
|
// Node.js
|
|
2279
|
-
],
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2276
|
+
], Yt = [].concat(
|
|
2277
|
+
Tn,
|
|
2278
|
+
Mn,
|
|
2279
|
+
An
|
|
2283
2280
|
);
|
|
2284
|
-
function
|
|
2285
|
-
const
|
|
2281
|
+
function Xt(e) {
|
|
2282
|
+
const r = e.regex, o = (M, { after: L }) => {
|
|
2286
2283
|
const k = "</" + M[0].slice(1);
|
|
2287
|
-
return M.input.indexOf(k,
|
|
2284
|
+
return M.input.indexOf(k, L) !== -1;
|
|
2288
2285
|
}, u = cn, h = {
|
|
2289
2286
|
begin: "<>",
|
|
2290
2287
|
end: "</>"
|
|
2291
|
-
}, n = /<[A-Za-z0-9\\._:-]+\s*\/>/,
|
|
2288
|
+
}, n = /<[A-Za-z0-9\\._:-]+\s*\/>/, t = {
|
|
2292
2289
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
2293
2290
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
2294
2291
|
/**
|
|
2295
2292
|
* @param {RegExpMatchArray} match
|
|
2296
2293
|
* @param {CallbackResponse} response
|
|
2297
2294
|
*/
|
|
2298
|
-
isTrulyOpeningTag: (M,
|
|
2295
|
+
isTrulyOpeningTag: (M, L) => {
|
|
2299
2296
|
const k = M[0].length + M.index, H = M.input[k];
|
|
2300
2297
|
if (
|
|
2301
2298
|
// HTML should not include another raw `<` inside a tag
|
|
@@ -2305,33 +2302,33 @@ function Yt(e) {
|
|
|
2305
2302
|
// `<T, A extends keyof T, V>`
|
|
2306
2303
|
H === ","
|
|
2307
2304
|
) {
|
|
2308
|
-
|
|
2305
|
+
L.ignoreMatch();
|
|
2309
2306
|
return;
|
|
2310
2307
|
}
|
|
2311
|
-
H === ">" && (
|
|
2308
|
+
H === ">" && (o(M, { after: k }) || L.ignoreMatch());
|
|
2312
2309
|
let Y;
|
|
2313
2310
|
const q = M.input.substring(k);
|
|
2314
2311
|
if (Y = q.match(/^\s*=/)) {
|
|
2315
|
-
|
|
2312
|
+
L.ignoreMatch();
|
|
2316
2313
|
return;
|
|
2317
2314
|
}
|
|
2318
2315
|
if ((Y = q.match(/^\s+extends\s+/)) && Y.index === 0) {
|
|
2319
|
-
|
|
2316
|
+
L.ignoreMatch();
|
|
2320
2317
|
return;
|
|
2321
2318
|
}
|
|
2322
2319
|
}
|
|
2323
2320
|
}, i = {
|
|
2324
2321
|
$pattern: cn,
|
|
2325
|
-
keyword:
|
|
2326
|
-
literal:
|
|
2327
|
-
built_in:
|
|
2328
|
-
"variable.language":
|
|
2329
|
-
},
|
|
2322
|
+
keyword: Wt,
|
|
2323
|
+
literal: Qt,
|
|
2324
|
+
built_in: Yt,
|
|
2325
|
+
"variable.language": Zt
|
|
2326
|
+
}, a = "[0-9](_?[0-9])*", s = `\\.(${a})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2330
2327
|
className: "number",
|
|
2331
2328
|
variants: [
|
|
2332
2329
|
// DecimalLiteral
|
|
2333
|
-
{ begin: `(\\b(${
|
|
2334
|
-
{ begin: `\\b(${
|
|
2330
|
+
{ begin: `(\\b(${l})((${s})|\\.)?|(${s}))[eE][+-]?(${a})\\b` },
|
|
2331
|
+
{ begin: `\\b(${l})\\b((${s})\\b|\\.)?|(${s})\\b` },
|
|
2335
2332
|
// DecimalBigIntegerLiteral
|
|
2336
2333
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
2337
2334
|
// NonDecimalIntegerLiteral
|
|
@@ -2450,13 +2447,13 @@ function Yt(e) {
|
|
|
2450
2447
|
"self"
|
|
2451
2448
|
].concat(v)
|
|
2452
2449
|
});
|
|
2453
|
-
const
|
|
2450
|
+
const w = [].concat(E, f.contains), m = w.concat([
|
|
2454
2451
|
// eat recursive parens in sub expressions
|
|
2455
2452
|
{
|
|
2456
2453
|
begin: /\(/,
|
|
2457
2454
|
end: /\)/,
|
|
2458
2455
|
keywords: i,
|
|
2459
|
-
contains: ["self"].concat(
|
|
2456
|
+
contains: ["self"].concat(w)
|
|
2460
2457
|
}
|
|
2461
2458
|
]), D = {
|
|
2462
2459
|
className: "params",
|
|
@@ -2477,7 +2474,7 @@ function Yt(e) {
|
|
|
2477
2474
|
/\s+/,
|
|
2478
2475
|
/extends/,
|
|
2479
2476
|
/\s+/,
|
|
2480
|
-
|
|
2477
|
+
r.concat(u, "(", r.concat(/\./, u), ")*")
|
|
2481
2478
|
],
|
|
2482
2479
|
scope: {
|
|
2483
2480
|
1: "keyword",
|
|
@@ -2501,7 +2498,7 @@ function Yt(e) {
|
|
|
2501
2498
|
]
|
|
2502
2499
|
}, A = {
|
|
2503
2500
|
relevance: 0,
|
|
2504
|
-
match:
|
|
2501
|
+
match: r.either(
|
|
2505
2502
|
// Hard coded exceptions
|
|
2506
2503
|
/\bJSON/,
|
|
2507
2504
|
// Float32Array, OutT
|
|
@@ -2519,8 +2516,8 @@ function Yt(e) {
|
|
|
2519
2516
|
keywords: {
|
|
2520
2517
|
_: [
|
|
2521
2518
|
// se we still get relevance credit for JS library classes
|
|
2522
|
-
...
|
|
2523
|
-
...
|
|
2519
|
+
...Mn,
|
|
2520
|
+
...An
|
|
2524
2521
|
]
|
|
2525
2522
|
}
|
|
2526
2523
|
}, I = {
|
|
@@ -2553,30 +2550,30 @@ function Yt(e) {
|
|
|
2553
2550
|
label: "func.def",
|
|
2554
2551
|
contains: [D],
|
|
2555
2552
|
illegal: /%/
|
|
2556
|
-
},
|
|
2553
|
+
}, F = {
|
|
2557
2554
|
relevance: 0,
|
|
2558
2555
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
2559
2556
|
className: "variable.constant"
|
|
2560
2557
|
};
|
|
2561
2558
|
function U(M) {
|
|
2562
|
-
return
|
|
2559
|
+
return r.concat("(?!", M.join("|"), ")");
|
|
2563
2560
|
}
|
|
2564
2561
|
const $ = {
|
|
2565
|
-
match:
|
|
2562
|
+
match: r.concat(
|
|
2566
2563
|
/\b/,
|
|
2567
2564
|
U([
|
|
2568
|
-
...
|
|
2565
|
+
...Tn,
|
|
2569
2566
|
"super",
|
|
2570
2567
|
"import"
|
|
2571
2568
|
]),
|
|
2572
2569
|
u,
|
|
2573
|
-
|
|
2570
|
+
r.lookahead(/\(/)
|
|
2574
2571
|
),
|
|
2575
2572
|
className: "title.function",
|
|
2576
2573
|
relevance: 0
|
|
2577
2574
|
}, G = {
|
|
2578
|
-
begin:
|
|
2579
|
-
|
|
2575
|
+
begin: r.concat(/\./, r.lookahead(
|
|
2576
|
+
r.concat(u, /(?![0-9A-Za-z$_(])/)
|
|
2580
2577
|
)),
|
|
2581
2578
|
end: u,
|
|
2582
2579
|
excludeBegin: !0,
|
|
@@ -2601,7 +2598,7 @@ function Yt(e) {
|
|
|
2601
2598
|
},
|
|
2602
2599
|
D
|
|
2603
2600
|
]
|
|
2604
|
-
},
|
|
2601
|
+
}, we = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", _ = {
|
|
2605
2602
|
match: [
|
|
2606
2603
|
/const|var|let/,
|
|
2607
2604
|
/\s+/,
|
|
@@ -2610,7 +2607,7 @@ function Yt(e) {
|
|
|
2610
2607
|
/=\s*/,
|
|
2611
2608
|
/(async\s*)?/,
|
|
2612
2609
|
// async is optional
|
|
2613
|
-
|
|
2610
|
+
r.lookahead(we)
|
|
2614
2611
|
],
|
|
2615
2612
|
keywords: "async",
|
|
2616
2613
|
className: {
|
|
@@ -2647,7 +2644,7 @@ function Yt(e) {
|
|
|
2647
2644
|
A,
|
|
2648
2645
|
{
|
|
2649
2646
|
className: "attr",
|
|
2650
|
-
begin: u +
|
|
2647
|
+
begin: u + r.lookahead(":"),
|
|
2651
2648
|
relevance: 0
|
|
2652
2649
|
},
|
|
2653
2650
|
_,
|
|
@@ -2664,7 +2661,7 @@ function Yt(e) {
|
|
|
2664
2661
|
// we have to count the parens to make sure we actually have the
|
|
2665
2662
|
// correct bounding ( ) before the =>. There could be any number of
|
|
2666
2663
|
// sub-expressions inside also surrounded by parens.
|
|
2667
|
-
begin:
|
|
2664
|
+
begin: we,
|
|
2668
2665
|
returnBegin: !0,
|
|
2669
2666
|
end: "\\s*=>",
|
|
2670
2667
|
contains: [
|
|
@@ -2707,18 +2704,18 @@ function Yt(e) {
|
|
|
2707
2704
|
{ begin: h.begin, end: h.end },
|
|
2708
2705
|
{ match: n },
|
|
2709
2706
|
{
|
|
2710
|
-
begin:
|
|
2707
|
+
begin: t.begin,
|
|
2711
2708
|
// we carefully check the opening tag to see if it truly
|
|
2712
2709
|
// is a tag and not a false positive
|
|
2713
|
-
"on:begin":
|
|
2714
|
-
end:
|
|
2710
|
+
"on:begin": t.isTrulyOpeningTag,
|
|
2711
|
+
end: t.end
|
|
2715
2712
|
}
|
|
2716
2713
|
],
|
|
2717
2714
|
subLanguage: "xml",
|
|
2718
2715
|
contains: [
|
|
2719
2716
|
{
|
|
2720
|
-
begin:
|
|
2721
|
-
end:
|
|
2717
|
+
begin: t.begin,
|
|
2718
|
+
end: t.end,
|
|
2722
2719
|
skip: !0,
|
|
2723
2720
|
contains: ["self"]
|
|
2724
2721
|
}
|
|
@@ -2764,7 +2761,7 @@ function Yt(e) {
|
|
|
2764
2761
|
contains: [D]
|
|
2765
2762
|
},
|
|
2766
2763
|
$,
|
|
2767
|
-
|
|
2764
|
+
F,
|
|
2768
2765
|
S,
|
|
2769
2766
|
Q,
|
|
2770
2767
|
{
|
|
@@ -2774,12 +2771,12 @@ function Yt(e) {
|
|
|
2774
2771
|
]
|
|
2775
2772
|
};
|
|
2776
2773
|
}
|
|
2777
|
-
function
|
|
2778
|
-
const
|
|
2774
|
+
function jt(e) {
|
|
2775
|
+
const r = {
|
|
2779
2776
|
className: "attr",
|
|
2780
2777
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
2781
2778
|
relevance: 1.01
|
|
2782
|
-
},
|
|
2779
|
+
}, o = {
|
|
2783
2780
|
match: /[{}[\],:]/,
|
|
2784
2781
|
className: "punctuation",
|
|
2785
2782
|
relevance: 0
|
|
@@ -2797,8 +2794,8 @@ function Xt(e) {
|
|
|
2797
2794
|
literal: u
|
|
2798
2795
|
},
|
|
2799
2796
|
contains: [
|
|
2800
|
-
|
|
2801
|
-
|
|
2797
|
+
r,
|
|
2798
|
+
o,
|
|
2802
2799
|
e.QUOTE_STRING_MODE,
|
|
2803
2800
|
h,
|
|
2804
2801
|
e.C_NUMBER_MODE,
|
|
@@ -2809,7 +2806,7 @@ function Xt(e) {
|
|
|
2809
2806
|
};
|
|
2810
2807
|
}
|
|
2811
2808
|
function Vt(e) {
|
|
2812
|
-
const
|
|
2809
|
+
const r = "true false yes no null", o = "[\\w#;/?:@&=+$,.~*'()[\\]]+", u = {
|
|
2813
2810
|
className: "attr",
|
|
2814
2811
|
variants: [
|
|
2815
2812
|
{ begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
|
|
@@ -2854,7 +2851,7 @@ function Vt(e) {
|
|
|
2854
2851
|
e.BACKSLASH_ESCAPE,
|
|
2855
2852
|
h
|
|
2856
2853
|
]
|
|
2857
|
-
},
|
|
2854
|
+
}, t = e.inherit(n, { variants: [
|
|
2858
2855
|
{
|
|
2859
2856
|
begin: /'/,
|
|
2860
2857
|
end: /'/
|
|
@@ -2864,14 +2861,14 @@ function Vt(e) {
|
|
|
2864
2861
|
end: /"/
|
|
2865
2862
|
},
|
|
2866
2863
|
{ begin: /[^\s,{}[\]]+/ }
|
|
2867
|
-
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}",
|
|
2864
|
+
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", s = "(\\.[0-9]*)?", l = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", c = {
|
|
2868
2865
|
className: "number",
|
|
2869
|
-
begin: "\\b" + i +
|
|
2866
|
+
begin: "\\b" + i + a + s + l + "\\b"
|
|
2870
2867
|
}, f = {
|
|
2871
2868
|
end: ",",
|
|
2872
2869
|
endsWithParent: !0,
|
|
2873
2870
|
excludeEnd: !0,
|
|
2874
|
-
keywords:
|
|
2871
|
+
keywords: r,
|
|
2875
2872
|
relevance: 0
|
|
2876
2873
|
}, g = {
|
|
2877
2874
|
begin: /\{/,
|
|
@@ -2913,23 +2910,23 @@ function Vt(e) {
|
|
|
2913
2910
|
{
|
|
2914
2911
|
// named tags
|
|
2915
2912
|
className: "type",
|
|
2916
|
-
begin: "!\\w+!" +
|
|
2913
|
+
begin: "!\\w+!" + o
|
|
2917
2914
|
},
|
|
2918
2915
|
// https://yaml.org/spec/1.2/spec.html#id2784064
|
|
2919
2916
|
{
|
|
2920
2917
|
// verbatim tags
|
|
2921
2918
|
className: "type",
|
|
2922
|
-
begin: "!<" +
|
|
2919
|
+
begin: "!<" + o + ">"
|
|
2923
2920
|
},
|
|
2924
2921
|
{
|
|
2925
2922
|
// primary tags
|
|
2926
2923
|
className: "type",
|
|
2927
|
-
begin: "!" +
|
|
2924
|
+
begin: "!" + o
|
|
2928
2925
|
},
|
|
2929
2926
|
{
|
|
2930
2927
|
// secondary tags
|
|
2931
2928
|
className: "type",
|
|
2932
|
-
begin: "!!" +
|
|
2929
|
+
begin: "!!" + o
|
|
2933
2930
|
},
|
|
2934
2931
|
{
|
|
2935
2932
|
// fragment id &ref
|
|
@@ -2950,8 +2947,8 @@ function Vt(e) {
|
|
|
2950
2947
|
},
|
|
2951
2948
|
e.HASH_COMMENT_MODE,
|
|
2952
2949
|
{
|
|
2953
|
-
beginKeywords:
|
|
2954
|
-
keywords: { literal:
|
|
2950
|
+
beginKeywords: r,
|
|
2951
|
+
keywords: { literal: r }
|
|
2955
2952
|
},
|
|
2956
2953
|
c,
|
|
2957
2954
|
// numbers are any valid C-style number that
|
|
@@ -2965,14 +2962,14 @@ function Vt(e) {
|
|
|
2965
2962
|
d,
|
|
2966
2963
|
n
|
|
2967
2964
|
], b = [...p];
|
|
2968
|
-
return b.pop(), b.push(
|
|
2965
|
+
return b.pop(), b.push(t), f.contains = b, {
|
|
2969
2966
|
name: "YAML",
|
|
2970
2967
|
case_insensitive: !0,
|
|
2971
2968
|
aliases: ["yml"],
|
|
2972
2969
|
contains: p
|
|
2973
2970
|
};
|
|
2974
2971
|
}
|
|
2975
|
-
function
|
|
2972
|
+
function Jt(e) {
|
|
2976
2973
|
return {
|
|
2977
2974
|
name: "Plain text",
|
|
2978
2975
|
aliases: [
|
|
@@ -2982,8 +2979,8 @@ function jt(e) {
|
|
|
2982
2979
|
disableAutodetect: !0
|
|
2983
2980
|
};
|
|
2984
2981
|
}
|
|
2985
|
-
function
|
|
2986
|
-
const
|
|
2982
|
+
function qt(e) {
|
|
2983
|
+
const r = e.regex, o = /[\p{XID_Start}_]\p{XID_Continue}*/u, u = [
|
|
2987
2984
|
"and",
|
|
2988
2985
|
"as",
|
|
2989
2986
|
"assert",
|
|
@@ -3115,16 +3112,16 @@ function Jt(e) {
|
|
|
3115
3112
|
"Type",
|
|
3116
3113
|
"Union"
|
|
3117
3114
|
]
|
|
3118
|
-
},
|
|
3115
|
+
}, a = {
|
|
3119
3116
|
className: "meta",
|
|
3120
3117
|
begin: /^(>>>|\.\.\.) /
|
|
3121
|
-
},
|
|
3118
|
+
}, s = {
|
|
3122
3119
|
className: "subst",
|
|
3123
3120
|
begin: /\{/,
|
|
3124
3121
|
end: /\}/,
|
|
3125
3122
|
keywords: i,
|
|
3126
3123
|
illegal: /#/
|
|
3127
|
-
},
|
|
3124
|
+
}, l = {
|
|
3128
3125
|
begin: /\{\{/,
|
|
3129
3126
|
relevance: 0
|
|
3130
3127
|
}, c = {
|
|
@@ -3136,7 +3133,7 @@ function Jt(e) {
|
|
|
3136
3133
|
end: /'''/,
|
|
3137
3134
|
contains: [
|
|
3138
3135
|
e.BACKSLASH_ESCAPE,
|
|
3139
|
-
|
|
3136
|
+
a
|
|
3140
3137
|
],
|
|
3141
3138
|
relevance: 10
|
|
3142
3139
|
},
|
|
@@ -3145,7 +3142,7 @@ function Jt(e) {
|
|
|
3145
3142
|
end: /"""/,
|
|
3146
3143
|
contains: [
|
|
3147
3144
|
e.BACKSLASH_ESCAPE,
|
|
3148
|
-
|
|
3145
|
+
a
|
|
3149
3146
|
],
|
|
3150
3147
|
relevance: 10
|
|
3151
3148
|
},
|
|
@@ -3154,9 +3151,9 @@ function Jt(e) {
|
|
|
3154
3151
|
end: /'''/,
|
|
3155
3152
|
contains: [
|
|
3156
3153
|
e.BACKSLASH_ESCAPE,
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3154
|
+
a,
|
|
3155
|
+
l,
|
|
3156
|
+
s
|
|
3160
3157
|
]
|
|
3161
3158
|
},
|
|
3162
3159
|
{
|
|
@@ -3164,9 +3161,9 @@ function Jt(e) {
|
|
|
3164
3161
|
end: /"""/,
|
|
3165
3162
|
contains: [
|
|
3166
3163
|
e.BACKSLASH_ESCAPE,
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3164
|
+
a,
|
|
3165
|
+
l,
|
|
3166
|
+
s
|
|
3170
3167
|
]
|
|
3171
3168
|
},
|
|
3172
3169
|
{
|
|
@@ -3192,8 +3189,8 @@ function Jt(e) {
|
|
|
3192
3189
|
end: /'/,
|
|
3193
3190
|
contains: [
|
|
3194
3191
|
e.BACKSLASH_ESCAPE,
|
|
3195
|
-
|
|
3196
|
-
|
|
3192
|
+
l,
|
|
3193
|
+
s
|
|
3197
3194
|
]
|
|
3198
3195
|
},
|
|
3199
3196
|
{
|
|
@@ -3201,8 +3198,8 @@ function Jt(e) {
|
|
|
3201
3198
|
end: /"/,
|
|
3202
3199
|
contains: [
|
|
3203
3200
|
e.BACKSLASH_ESCAPE,
|
|
3204
|
-
|
|
3205
|
-
|
|
3201
|
+
l,
|
|
3202
|
+
s
|
|
3206
3203
|
]
|
|
3207
3204
|
},
|
|
3208
3205
|
e.APOS_STRING_MODE,
|
|
@@ -3254,7 +3251,7 @@ function Jt(e) {
|
|
|
3254
3251
|
]
|
|
3255
3252
|
}, b = {
|
|
3256
3253
|
className: "comment",
|
|
3257
|
-
begin:
|
|
3254
|
+
begin: r.lookahead(/# type:/),
|
|
3258
3255
|
end: /$/,
|
|
3259
3256
|
keywords: i,
|
|
3260
3257
|
contains: [
|
|
@@ -3286,7 +3283,7 @@ function Jt(e) {
|
|
|
3286
3283
|
keywords: i,
|
|
3287
3284
|
contains: [
|
|
3288
3285
|
"self",
|
|
3289
|
-
|
|
3286
|
+
a,
|
|
3290
3287
|
p,
|
|
3291
3288
|
c,
|
|
3292
3289
|
e.HASH_COMMENT_MODE
|
|
@@ -3294,10 +3291,10 @@ function Jt(e) {
|
|
|
3294
3291
|
}
|
|
3295
3292
|
]
|
|
3296
3293
|
};
|
|
3297
|
-
return
|
|
3294
|
+
return s.contains = [
|
|
3298
3295
|
c,
|
|
3299
3296
|
p,
|
|
3300
|
-
|
|
3297
|
+
a
|
|
3301
3298
|
], {
|
|
3302
3299
|
name: "Python",
|
|
3303
3300
|
aliases: [
|
|
@@ -3309,7 +3306,7 @@ function Jt(e) {
|
|
|
3309
3306
|
keywords: i,
|
|
3310
3307
|
illegal: /(<\/|->|\?)|=>/,
|
|
3311
3308
|
contains: [
|
|
3312
|
-
|
|
3309
|
+
a,
|
|
3313
3310
|
p,
|
|
3314
3311
|
{
|
|
3315
3312
|
// very common convention
|
|
@@ -3328,7 +3325,7 @@ function Jt(e) {
|
|
|
3328
3325
|
match: [
|
|
3329
3326
|
/\bdef/,
|
|
3330
3327
|
/\s+/,
|
|
3331
|
-
|
|
3328
|
+
o
|
|
3332
3329
|
],
|
|
3333
3330
|
scope: {
|
|
3334
3331
|
1: "keyword",
|
|
@@ -3342,10 +3339,10 @@ function Jt(e) {
|
|
|
3342
3339
|
match: [
|
|
3343
3340
|
/\bclass/,
|
|
3344
3341
|
/\s+/,
|
|
3345
|
-
|
|
3342
|
+
o,
|
|
3346
3343
|
/\s*/,
|
|
3347
3344
|
/\(\s*/,
|
|
3348
|
-
|
|
3345
|
+
o,
|
|
3349
3346
|
/\s*\)/
|
|
3350
3347
|
]
|
|
3351
3348
|
},
|
|
@@ -3353,7 +3350,7 @@ function Jt(e) {
|
|
|
3353
3350
|
match: [
|
|
3354
3351
|
/\bclass/,
|
|
3355
3352
|
/\s+/,
|
|
3356
|
-
|
|
3353
|
+
o
|
|
3357
3354
|
]
|
|
3358
3355
|
}
|
|
3359
3356
|
],
|
|
@@ -3376,22 +3373,22 @@ function Jt(e) {
|
|
|
3376
3373
|
]
|
|
3377
3374
|
};
|
|
3378
3375
|
}
|
|
3379
|
-
var fe = "[0-9](_*[0-9])*",
|
|
3376
|
+
var fe = "[0-9](_*[0-9])*", De = `\\.(${fe})`, Se = "[0-9a-fA-F](_*[0-9a-fA-F])*", un = {
|
|
3380
3377
|
className: "number",
|
|
3381
3378
|
variants: [
|
|
3382
3379
|
// DecimalFloatingPointLiteral
|
|
3383
3380
|
// including ExponentPart
|
|
3384
|
-
{ begin: `(\\b(${fe})((${
|
|
3381
|
+
{ begin: `(\\b(${fe})((${De})|\\.)?|(${De}))[eE][+-]?(${fe})[fFdD]?\\b` },
|
|
3385
3382
|
// excluding ExponentPart
|
|
3386
|
-
{ begin: `\\b(${fe})((${
|
|
3387
|
-
{ begin: `(${
|
|
3383
|
+
{ begin: `\\b(${fe})((${De})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
3384
|
+
{ begin: `(${De})[fFdD]?\\b` },
|
|
3388
3385
|
{ begin: `\\b(${fe})[fFdD]\\b` },
|
|
3389
3386
|
// HexadecimalFloatingPointLiteral
|
|
3390
|
-
{ begin: `\\b0[xX]((${
|
|
3387
|
+
{ begin: `\\b0[xX]((${Se})\\.?|(${Se})?\\.(${Se}))[pP][+-]?(${fe})[fFdD]?\\b` },
|
|
3391
3388
|
// DecimalIntegerLiteral
|
|
3392
3389
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
3393
3390
|
// HexIntegerLiteral
|
|
3394
|
-
{ begin: `\\b0[xX](${
|
|
3391
|
+
{ begin: `\\b0[xX](${Se})[lL]?\\b` },
|
|
3395
3392
|
// OctalIntegerLiteral
|
|
3396
3393
|
{ begin: "\\b0(_*[0-7])*[lL]?\\b" },
|
|
3397
3394
|
// BinaryIntegerLiteral
|
|
@@ -3399,11 +3396,11 @@ var fe = "[0-9](_*[0-9])*", Se = `\\.(${fe})`, Re = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3399
3396
|
],
|
|
3400
3397
|
relevance: 0
|
|
3401
3398
|
};
|
|
3402
|
-
function
|
|
3403
|
-
return
|
|
3399
|
+
function Dn(e, r, o) {
|
|
3400
|
+
return o === -1 ? "" : e.replace(r, (u) => Dn(e, r, o - 1));
|
|
3404
3401
|
}
|
|
3405
|
-
function
|
|
3406
|
-
const
|
|
3402
|
+
function er(e) {
|
|
3403
|
+
const r = e.regex, o = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = o + Dn("(?:<" + o + "~~~(?:\\s*,\\s*" + o + "~~~)*>)?", /~~~/g, 2), a = {
|
|
3407
3404
|
keyword: [
|
|
3408
3405
|
"synchronized",
|
|
3409
3406
|
"abstract",
|
|
@@ -3467,9 +3464,9 @@ function qt(e) {
|
|
|
3467
3464
|
"super",
|
|
3468
3465
|
"this"
|
|
3469
3466
|
]
|
|
3470
|
-
},
|
|
3467
|
+
}, s = {
|
|
3471
3468
|
className: "meta",
|
|
3472
|
-
begin: "@" +
|
|
3469
|
+
begin: "@" + o,
|
|
3473
3470
|
contains: [
|
|
3474
3471
|
{
|
|
3475
3472
|
begin: /\(/,
|
|
@@ -3478,11 +3475,11 @@ function qt(e) {
|
|
|
3478
3475
|
// allow nested () inside our annotation
|
|
3479
3476
|
}
|
|
3480
3477
|
]
|
|
3481
|
-
},
|
|
3478
|
+
}, l = {
|
|
3482
3479
|
className: "params",
|
|
3483
3480
|
begin: /\(/,
|
|
3484
3481
|
end: /\)/,
|
|
3485
|
-
keywords:
|
|
3482
|
+
keywords: a,
|
|
3486
3483
|
relevance: 0,
|
|
3487
3484
|
contains: [e.C_BLOCK_COMMENT_MODE],
|
|
3488
3485
|
endsParent: !0
|
|
@@ -3490,7 +3487,7 @@ function qt(e) {
|
|
|
3490
3487
|
return {
|
|
3491
3488
|
name: "Java",
|
|
3492
3489
|
aliases: ["jsp"],
|
|
3493
|
-
keywords:
|
|
3490
|
+
keywords: a,
|
|
3494
3491
|
illegal: /<\/|#/,
|
|
3495
3492
|
contains: [
|
|
3496
3493
|
e.COMMENT(
|
|
@@ -3531,7 +3528,7 @@ function qt(e) {
|
|
|
3531
3528
|
match: [
|
|
3532
3529
|
/\b(?:class|interface|enum|extends|implements|new)/,
|
|
3533
3530
|
/\s+/,
|
|
3534
|
-
|
|
3531
|
+
o
|
|
3535
3532
|
],
|
|
3536
3533
|
className: {
|
|
3537
3534
|
1: "keyword",
|
|
@@ -3545,9 +3542,9 @@ function qt(e) {
|
|
|
3545
3542
|
},
|
|
3546
3543
|
{
|
|
3547
3544
|
begin: [
|
|
3548
|
-
|
|
3545
|
+
r.concat(/(?!else)/, o),
|
|
3549
3546
|
/\s+/,
|
|
3550
|
-
|
|
3547
|
+
o,
|
|
3551
3548
|
/\s+/,
|
|
3552
3549
|
/=(?!=)/
|
|
3553
3550
|
],
|
|
@@ -3561,14 +3558,14 @@ function qt(e) {
|
|
|
3561
3558
|
begin: [
|
|
3562
3559
|
/record/,
|
|
3563
3560
|
/\s+/,
|
|
3564
|
-
|
|
3561
|
+
o
|
|
3565
3562
|
],
|
|
3566
3563
|
className: {
|
|
3567
3564
|
1: "keyword",
|
|
3568
3565
|
3: "title.class"
|
|
3569
3566
|
},
|
|
3570
3567
|
contains: [
|
|
3571
|
-
|
|
3568
|
+
l,
|
|
3572
3569
|
e.C_LINE_COMMENT_MODE,
|
|
3573
3570
|
e.C_BLOCK_COMMENT_MODE
|
|
3574
3571
|
]
|
|
@@ -3586,16 +3583,16 @@ function qt(e) {
|
|
|
3586
3583
|
/\s*(?=\()/
|
|
3587
3584
|
],
|
|
3588
3585
|
className: { 2: "title.function" },
|
|
3589
|
-
keywords:
|
|
3586
|
+
keywords: a,
|
|
3590
3587
|
contains: [
|
|
3591
3588
|
{
|
|
3592
3589
|
className: "params",
|
|
3593
3590
|
begin: /\(/,
|
|
3594
3591
|
end: /\)/,
|
|
3595
|
-
keywords:
|
|
3592
|
+
keywords: a,
|
|
3596
3593
|
relevance: 0,
|
|
3597
3594
|
contains: [
|
|
3598
|
-
|
|
3595
|
+
s,
|
|
3599
3596
|
e.APOS_STRING_MODE,
|
|
3600
3597
|
e.QUOTE_STRING_MODE,
|
|
3601
3598
|
un,
|
|
@@ -3607,27 +3604,27 @@ function qt(e) {
|
|
|
3607
3604
|
]
|
|
3608
3605
|
},
|
|
3609
3606
|
un,
|
|
3610
|
-
|
|
3607
|
+
s
|
|
3611
3608
|
]
|
|
3612
3609
|
};
|
|
3613
3610
|
}
|
|
3614
|
-
function
|
|
3615
|
-
const
|
|
3611
|
+
function nr(e) {
|
|
3612
|
+
const r = e.regex, o = {}, u = {
|
|
3616
3613
|
begin: /\$\{/,
|
|
3617
3614
|
end: /\}/,
|
|
3618
3615
|
contains: [
|
|
3619
3616
|
"self",
|
|
3620
3617
|
{
|
|
3621
3618
|
begin: /:-/,
|
|
3622
|
-
contains: [
|
|
3619
|
+
contains: [o]
|
|
3623
3620
|
}
|
|
3624
3621
|
// default values
|
|
3625
3622
|
]
|
|
3626
3623
|
};
|
|
3627
|
-
Object.assign(
|
|
3624
|
+
Object.assign(o, {
|
|
3628
3625
|
className: "variable",
|
|
3629
3626
|
variants: [
|
|
3630
|
-
{ begin:
|
|
3627
|
+
{ begin: r.concat(
|
|
3631
3628
|
/\$[\w\d#@][\w\d_]*/,
|
|
3632
3629
|
// negative look-ahead tries to avoid matching patterns that are not
|
|
3633
3630
|
// Perl at all like $ident$, @ident@, etc.
|
|
@@ -3650,25 +3647,25 @@ function er(e) {
|
|
|
3650
3647
|
className: "string"
|
|
3651
3648
|
})
|
|
3652
3649
|
] }
|
|
3653
|
-
},
|
|
3650
|
+
}, t = {
|
|
3654
3651
|
className: "string",
|
|
3655
3652
|
begin: /"/,
|
|
3656
3653
|
end: /"/,
|
|
3657
3654
|
contains: [
|
|
3658
3655
|
e.BACKSLASH_ESCAPE,
|
|
3659
|
-
|
|
3656
|
+
o,
|
|
3660
3657
|
h
|
|
3661
3658
|
]
|
|
3662
3659
|
};
|
|
3663
|
-
h.contains.push(
|
|
3660
|
+
h.contains.push(t);
|
|
3664
3661
|
const i = {
|
|
3665
3662
|
className: "",
|
|
3666
3663
|
begin: /\\"/
|
|
3667
|
-
},
|
|
3664
|
+
}, a = {
|
|
3668
3665
|
className: "string",
|
|
3669
3666
|
begin: /'/,
|
|
3670
3667
|
end: /'/
|
|
3671
|
-
},
|
|
3668
|
+
}, s = {
|
|
3672
3669
|
begin: /\$?\(\(/,
|
|
3673
3670
|
end: /\)\)/,
|
|
3674
3671
|
contains: [
|
|
@@ -3677,9 +3674,9 @@ function er(e) {
|
|
|
3677
3674
|
className: "number"
|
|
3678
3675
|
},
|
|
3679
3676
|
e.NUMBER_MODE,
|
|
3680
|
-
|
|
3677
|
+
o
|
|
3681
3678
|
]
|
|
3682
|
-
},
|
|
3679
|
+
}, l = [
|
|
3683
3680
|
"fish",
|
|
3684
3681
|
"bash",
|
|
3685
3682
|
"zsh",
|
|
@@ -3690,7 +3687,7 @@ function er(e) {
|
|
|
3690
3687
|
"dash",
|
|
3691
3688
|
"scsh"
|
|
3692
3689
|
], c = e.SHEBANG({
|
|
3693
|
-
binary: `(${
|
|
3690
|
+
binary: `(${l.join("|")})`,
|
|
3694
3691
|
relevance: 10
|
|
3695
3692
|
}), f = {
|
|
3696
3693
|
className: "function",
|
|
@@ -3825,7 +3822,7 @@ function er(e) {
|
|
|
3825
3822
|
"zsocket",
|
|
3826
3823
|
"zstyle",
|
|
3827
3824
|
"ztcp"
|
|
3828
|
-
],
|
|
3825
|
+
], w = [
|
|
3829
3826
|
"chcon",
|
|
3830
3827
|
"chgrp",
|
|
3831
3828
|
"chown",
|
|
@@ -3944,7 +3941,7 @@ function er(e) {
|
|
|
3944
3941
|
"set",
|
|
3945
3942
|
"shopt",
|
|
3946
3943
|
...v,
|
|
3947
|
-
...
|
|
3944
|
+
...w
|
|
3948
3945
|
]
|
|
3949
3946
|
},
|
|
3950
3947
|
contains: [
|
|
@@ -3953,19 +3950,19 @@ function er(e) {
|
|
|
3953
3950
|
e.SHEBANG(),
|
|
3954
3951
|
// to catch unknown shells but still highlight the shebang
|
|
3955
3952
|
f,
|
|
3956
|
-
|
|
3953
|
+
s,
|
|
3957
3954
|
e.HASH_COMMENT_MODE,
|
|
3958
3955
|
n,
|
|
3959
3956
|
p,
|
|
3960
|
-
|
|
3957
|
+
t,
|
|
3961
3958
|
i,
|
|
3962
|
-
|
|
3963
|
-
|
|
3959
|
+
a,
|
|
3960
|
+
o
|
|
3964
3961
|
]
|
|
3965
3962
|
};
|
|
3966
3963
|
}
|
|
3967
|
-
function
|
|
3968
|
-
const
|
|
3964
|
+
function tr(e) {
|
|
3965
|
+
const r = e.regex, o = e.COMMENT("--", "$"), u = {
|
|
3969
3966
|
className: "string",
|
|
3970
3967
|
variants: [
|
|
3971
3968
|
{
|
|
@@ -3984,7 +3981,7 @@ function nr(e) {
|
|
|
3984
3981
|
// Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
|
|
3985
3982
|
// "null",
|
|
3986
3983
|
"unknown"
|
|
3987
|
-
],
|
|
3984
|
+
], t = [
|
|
3988
3985
|
"double precision",
|
|
3989
3986
|
"large object",
|
|
3990
3987
|
"with timezone",
|
|
@@ -4018,7 +4015,7 @@ function nr(e) {
|
|
|
4018
4015
|
"varying",
|
|
4019
4016
|
// modifier (character varying)
|
|
4020
4017
|
"varbinary"
|
|
4021
|
-
],
|
|
4018
|
+
], a = [
|
|
4022
4019
|
"add",
|
|
4023
4020
|
"asc",
|
|
4024
4021
|
"collation",
|
|
@@ -4027,7 +4024,7 @@ function nr(e) {
|
|
|
4027
4024
|
"first",
|
|
4028
4025
|
"last",
|
|
4029
4026
|
"view"
|
|
4030
|
-
],
|
|
4027
|
+
], s = [
|
|
4031
4028
|
"abs",
|
|
4032
4029
|
"acos",
|
|
4033
4030
|
"all",
|
|
@@ -4394,7 +4391,7 @@ function nr(e) {
|
|
|
4394
4391
|
"within",
|
|
4395
4392
|
"without",
|
|
4396
4393
|
"year"
|
|
4397
|
-
],
|
|
4394
|
+
], l = [
|
|
4398
4395
|
"abs",
|
|
4399
4396
|
"acos",
|
|
4400
4397
|
"array_agg",
|
|
@@ -4513,10 +4510,10 @@ function nr(e) {
|
|
|
4513
4510
|
"nulls last",
|
|
4514
4511
|
"depth first",
|
|
4515
4512
|
"breadth first"
|
|
4516
|
-
], g =
|
|
4517
|
-
...
|
|
4518
|
-
...
|
|
4519
|
-
].filter((
|
|
4513
|
+
], g = l, d = [
|
|
4514
|
+
...s,
|
|
4515
|
+
...a
|
|
4516
|
+
].filter((w) => !l.includes(w)), p = {
|
|
4520
4517
|
className: "variable",
|
|
4521
4518
|
begin: /@[a-z0-9]+/
|
|
4522
4519
|
}, b = {
|
|
@@ -4524,16 +4521,16 @@ function nr(e) {
|
|
|
4524
4521
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4525
4522
|
relevance: 0
|
|
4526
4523
|
}, E = {
|
|
4527
|
-
begin:
|
|
4524
|
+
begin: r.concat(/\b/, r.either(...g), /\s*\(/),
|
|
4528
4525
|
relevance: 0,
|
|
4529
4526
|
keywords: { built_in: g }
|
|
4530
4527
|
};
|
|
4531
|
-
function v(
|
|
4528
|
+
function v(w, {
|
|
4532
4529
|
exceptions: m,
|
|
4533
4530
|
when: D
|
|
4534
4531
|
} = {}) {
|
|
4535
4532
|
const S = D;
|
|
4536
|
-
return m = m || [],
|
|
4533
|
+
return m = m || [], w.map((A) => A.match(/\|\d+$/) || m.includes(A) ? A : S(A) ? `${A}|0` : A);
|
|
4537
4534
|
}
|
|
4538
4535
|
return {
|
|
4539
4536
|
name: "SQL",
|
|
@@ -4542,14 +4539,14 @@ function nr(e) {
|
|
|
4542
4539
|
illegal: /[{}]|<\//,
|
|
4543
4540
|
keywords: {
|
|
4544
4541
|
$pattern: /\b[\w\.]+/,
|
|
4545
|
-
keyword: v(d, { when: (
|
|
4542
|
+
keyword: v(d, { when: (w) => w.length < 3 }),
|
|
4546
4543
|
literal: n,
|
|
4547
4544
|
type: i,
|
|
4548
4545
|
built_in: c
|
|
4549
4546
|
},
|
|
4550
4547
|
contains: [
|
|
4551
4548
|
{
|
|
4552
|
-
begin:
|
|
4549
|
+
begin: r.either(...f),
|
|
4553
4550
|
relevance: 0,
|
|
4554
4551
|
keywords: {
|
|
4555
4552
|
$pattern: /[\w\.]+/,
|
|
@@ -4560,7 +4557,7 @@ function nr(e) {
|
|
|
4560
4557
|
},
|
|
4561
4558
|
{
|
|
4562
4559
|
className: "type",
|
|
4563
|
-
begin:
|
|
4560
|
+
begin: r.either(...t)
|
|
4564
4561
|
},
|
|
4565
4562
|
E,
|
|
4566
4563
|
p,
|
|
@@ -4568,136 +4565,142 @@ function nr(e) {
|
|
|
4568
4565
|
h,
|
|
4569
4566
|
e.C_NUMBER_MODE,
|
|
4570
4567
|
e.C_BLOCK_COMMENT_MODE,
|
|
4571
|
-
|
|
4568
|
+
o,
|
|
4572
4569
|
b
|
|
4573
4570
|
]
|
|
4574
4571
|
};
|
|
4575
4572
|
}
|
|
4576
|
-
J.registerLanguage("xml",
|
|
4577
|
-
J.registerLanguage("javascript",
|
|
4578
|
-
J.registerLanguage("json",
|
|
4573
|
+
J.registerLanguage("xml", Kt);
|
|
4574
|
+
J.registerLanguage("javascript", Xt);
|
|
4575
|
+
J.registerLanguage("json", jt);
|
|
4579
4576
|
J.registerLanguage("yaml", Vt);
|
|
4580
|
-
J.registerLanguage("plaintext",
|
|
4581
|
-
J.registerLanguage("python",
|
|
4582
|
-
J.registerLanguage("java",
|
|
4583
|
-
J.registerLanguage("bash",
|
|
4584
|
-
J.registerLanguage("sql",
|
|
4577
|
+
J.registerLanguage("plaintext", Jt);
|
|
4578
|
+
J.registerLanguage("python", qt);
|
|
4579
|
+
J.registerLanguage("java", er);
|
|
4580
|
+
J.registerLanguage("bash", nr);
|
|
4581
|
+
J.registerLanguage("sql", tr);
|
|
4585
4582
|
var N = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(N || {});
|
|
4586
|
-
const ne = "<code-diff-modified>", te = "</code-diff-modified>",
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
return
|
|
4592
|
-
|
|
4583
|
+
const ne = "<code-diff-modified>", te = "</code-diff-modified>", rr = ne.replace("<", "<").replace(">", ">"), ir = te.replace("<", "<").replace(">", ">");
|
|
4584
|
+
function de(e) {
|
|
4585
|
+
return e === void 0 ? N.EQUAL : e.added ? N.ADD : e.removed ? N.DELETE : N.EQUAL;
|
|
4586
|
+
}
|
|
4587
|
+
function Ce(e, r, o = "word") {
|
|
4588
|
+
return typeof e == "undefined" ? r : typeof r == "undefined" ? e : (o === "char" ? Gn : Wn)(e, r).filter((h) => de(h) !== N.DELETE).map(
|
|
4589
|
+
(h) => de(h) === N.ADD ? `${ne}${h.value}${te}` : h.value
|
|
4590
|
+
).join("");
|
|
4591
|
+
}
|
|
4592
|
+
function Sn(e, r) {
|
|
4593
|
+
const o = new Ue.diff_match_patch(), u = o.diff_linesToChars_(e, r), h = u.chars1, n = u.chars2, t = u.lineArray, i = o.diff_main(h, n, !1);
|
|
4594
|
+
return o.diff_charsToLines_(i, t), i.map((a) => {
|
|
4595
|
+
const [s, l] = a;
|
|
4593
4596
|
return {
|
|
4594
|
-
count:
|
|
4597
|
+
count: l.trim().split(`
|
|
4595
4598
|
`).length,
|
|
4596
|
-
value:
|
|
4597
|
-
removed:
|
|
4598
|
-
added:
|
|
4599
|
+
value: l,
|
|
4600
|
+
removed: s === Ue.DIFF_DELETE,
|
|
4601
|
+
added: s === Ue.DIFF_INSERT
|
|
4599
4602
|
};
|
|
4600
4603
|
});
|
|
4601
4604
|
}
|
|
4602
|
-
|
|
4603
|
-
if (!
|
|
4604
|
-
return J.highlight(
|
|
4605
|
-
let u =
|
|
4606
|
-
const h =
|
|
4605
|
+
function V(e, r) {
|
|
4606
|
+
if (!r.match(new RegExp(`(${ne}|${te})`, "g")))
|
|
4607
|
+
return J.highlight(r, { language: e }).value;
|
|
4608
|
+
let u = r;
|
|
4609
|
+
const h = r.replace(new RegExp(`(${ne}|${te})`, "g"), ""), n = document.createElement("div");
|
|
4607
4610
|
n.innerHTML = J.highlight(h, { language: e }).value;
|
|
4608
|
-
let
|
|
4609
|
-
const i = (
|
|
4610
|
-
|
|
4611
|
-
if (
|
|
4612
|
-
if (!
|
|
4611
|
+
let t = !1;
|
|
4612
|
+
const i = (a) => {
|
|
4613
|
+
a.childNodes.forEach((s) => {
|
|
4614
|
+
if (s.nodeType === Node.ELEMENT_NODE && i(s), s.nodeType === Node.TEXT_NODE) {
|
|
4615
|
+
if (!s.textContent)
|
|
4613
4616
|
return;
|
|
4614
|
-
let
|
|
4615
|
-
for (
|
|
4617
|
+
let l = s.textContent, c = "";
|
|
4618
|
+
for (t && (c = c + ne); l.length; ) {
|
|
4616
4619
|
if (u.startsWith(ne)) {
|
|
4617
|
-
u = u.slice(ne.length), c = c + ne,
|
|
4620
|
+
u = u.slice(ne.length), c = c + ne, t = !0;
|
|
4618
4621
|
continue;
|
|
4619
4622
|
}
|
|
4620
4623
|
if (u.startsWith(te)) {
|
|
4621
|
-
u = u.slice(te.length), c = c + te,
|
|
4624
|
+
u = u.slice(te.length), c = c + te, t = !1;
|
|
4622
4625
|
continue;
|
|
4623
4626
|
}
|
|
4624
|
-
const f = u.match(new RegExp(`(${ne}|${te})`)), g = f && f.index ? f.index : u.length, d = Math.min(g,
|
|
4625
|
-
c = c + u.substring(0, d), u = u.slice(d),
|
|
4627
|
+
const f = u.match(new RegExp(`(${ne}|${te})`)), g = f && f.index ? f.index : u.length, d = Math.min(g, l.length);
|
|
4628
|
+
c = c + u.substring(0, d), u = u.slice(d), l = l.slice(d);
|
|
4626
4629
|
}
|
|
4627
|
-
|
|
4630
|
+
t && (c = c + te), s.textContent = c;
|
|
4628
4631
|
}
|
|
4629
4632
|
});
|
|
4630
4633
|
};
|
|
4631
|
-
return i(n), n.innerHTML.replace(new RegExp(
|
|
4632
|
-
}
|
|
4633
|
-
function
|
|
4634
|
-
const
|
|
4635
|
-
let
|
|
4634
|
+
return i(n), n.innerHTML.replace(new RegExp(rr, "g"), '<span class="x">').replace(new RegExp(ir, "g"), "</span>");
|
|
4635
|
+
}
|
|
4636
|
+
function Rn(e) {
|
|
4637
|
+
const r = (h, n) => (h.match(new RegExp(n, "g")) || []).length;
|
|
4638
|
+
let o = 0, u = 0;
|
|
4636
4639
|
for (const h of e)
|
|
4637
|
-
h.added && (
|
|
4638
|
-
`) + 1), h.removed && (u +=
|
|
4640
|
+
h.added && (o += r(h.value.trim(), `
|
|
4641
|
+
`) + 1), h.removed && (u += r(h.value.trim(), `
|
|
4639
4642
|
`) + 1);
|
|
4640
|
-
return { additionsNum:
|
|
4643
|
+
return { additionsNum: o, deletionsNum: u };
|
|
4641
4644
|
}
|
|
4642
|
-
function
|
|
4643
|
-
const n = () => ({ type: N.EMPTY }),
|
|
4644
|
-
let
|
|
4645
|
+
function sr(e, r, o = "plaintext", u = "word", h = 10) {
|
|
4646
|
+
const n = () => ({ type: N.EMPTY }), t = (p, b, E) => ({ type: p, num: b, code: E }), i = Sn(e, r);
|
|
4647
|
+
let a = 0, s = 0, l = !1;
|
|
4645
4648
|
const c = [], f = {
|
|
4646
4649
|
changes: c,
|
|
4647
4650
|
collector: [],
|
|
4648
|
-
stat:
|
|
4651
|
+
stat: Rn(i)
|
|
4649
4652
|
};
|
|
4650
4653
|
for (let p = 0; p < i.length; p++) {
|
|
4651
|
-
if (
|
|
4652
|
-
|
|
4654
|
+
if (l) {
|
|
4655
|
+
l = !1;
|
|
4653
4656
|
continue;
|
|
4654
4657
|
}
|
|
4655
|
-
const [b, E] = [i[p], i[p + 1]], [v,
|
|
4658
|
+
const [b, E] = [i[p], i[p + 1]], [v, w] = [de(b), de(E)], m = b.value.replace(/\n$/, "").split(`
|
|
4656
4659
|
`);
|
|
4657
4660
|
if (E === void 0) {
|
|
4658
4661
|
for (const S of m) {
|
|
4659
4662
|
let A = n(), I = n();
|
|
4660
|
-
const R =
|
|
4661
|
-
v === N.EQUAL && (
|
|
4663
|
+
const R = V(o, S);
|
|
4664
|
+
v === N.EQUAL && (a++, s++, A = t(N.EQUAL, a, R), I = t(N.EQUAL, s, R)), v === N.DELETE && (a++, A = t(N.DELETE, a, R), I = n()), v === N.ADD && (s++, A = n(), I = t(N.ADD, s, R)), c.push({ left: A, right: I });
|
|
4662
4665
|
}
|
|
4663
4666
|
break;
|
|
4664
4667
|
}
|
|
4665
4668
|
if (v === N.EQUAL)
|
|
4666
4669
|
for (const S of m) {
|
|
4667
|
-
|
|
4668
|
-
const A =
|
|
4670
|
+
a++, s++;
|
|
4671
|
+
const A = V(o, S);
|
|
4669
4672
|
c.push({
|
|
4670
|
-
left:
|
|
4671
|
-
right:
|
|
4673
|
+
left: t(N.EQUAL, a, A),
|
|
4674
|
+
right: t(N.EQUAL, s, A)
|
|
4672
4675
|
});
|
|
4673
4676
|
}
|
|
4674
4677
|
const D = E.value.replace(/\n$/, "").split(`
|
|
4675
4678
|
`);
|
|
4676
4679
|
if (v === N.DELETE) {
|
|
4677
|
-
if (
|
|
4680
|
+
if (w === N.EQUAL)
|
|
4678
4681
|
for (const S of m)
|
|
4679
|
-
|
|
4680
|
-
left:
|
|
4682
|
+
a++, c.push({
|
|
4683
|
+
left: t(N.DELETE, a, V(o, S)),
|
|
4681
4684
|
right: n()
|
|
4682
4685
|
});
|
|
4683
|
-
if (
|
|
4684
|
-
|
|
4686
|
+
if (w === N.ADD) {
|
|
4687
|
+
l = !0;
|
|
4685
4688
|
const S = Math.max(b.count, E.count);
|
|
4686
4689
|
for (let A = 0; A < S; A++) {
|
|
4687
|
-
A < b.count &&
|
|
4688
|
-
const [I, R] = [m[A], D[A]],
|
|
4690
|
+
A < b.count && a++, A < E.count && s++;
|
|
4691
|
+
const [I, R] = [m[A], D[A]], F = m.length === D.length ? Ce(R, I, u) : I, U = m.length === D.length ? Ce(I, R, u) : R, $ = A < b.count ? t(N.DELETE, a, V(o, F)) : n(), G = A < E.count ? t(N.ADD, s, V(o, U)) : n();
|
|
4689
4692
|
c.push({ left: $, right: G });
|
|
4690
4693
|
}
|
|
4691
4694
|
}
|
|
4692
4695
|
}
|
|
4693
4696
|
if (v === N.ADD)
|
|
4694
4697
|
for (const S of m)
|
|
4695
|
-
|
|
4698
|
+
s++, c.push({
|
|
4696
4699
|
left: n(),
|
|
4697
|
-
right:
|
|
4700
|
+
right: t(N.ADD, s, V(o, S))
|
|
4698
4701
|
});
|
|
4699
4702
|
}
|
|
4700
|
-
if (e ===
|
|
4703
|
+
if (e === r) {
|
|
4701
4704
|
for (let p = 0; p < c.length; p++)
|
|
4702
4705
|
c[p].fold = !1;
|
|
4703
4706
|
return f;
|
|
@@ -4706,8 +4709,8 @@ function ir(e, t, l = "plaintext", u = "word", h = 10) {
|
|
|
4706
4709
|
const b = c[p];
|
|
4707
4710
|
if (b.left.type === N.DELETE || b.right.type === N.ADD) {
|
|
4708
4711
|
const [E, v] = [Math.max(p - h, 0), Math.min(p + h + 1, c.length)];
|
|
4709
|
-
for (let
|
|
4710
|
-
c[
|
|
4712
|
+
for (let w = E; w < v; w++)
|
|
4713
|
+
c[w].fold = !1;
|
|
4711
4714
|
}
|
|
4712
4715
|
b.fold === void 0 && (b.fold = !0);
|
|
4713
4716
|
}
|
|
@@ -4729,90 +4732,90 @@ function ir(e, t, l = "plaintext", u = "word", h = 10) {
|
|
|
4729
4732
|
fold: !0
|
|
4730
4733
|
}), d = []), f.changes = g, f;
|
|
4731
4734
|
}
|
|
4732
|
-
function
|
|
4733
|
-
const n =
|
|
4734
|
-
let
|
|
4735
|
-
const
|
|
4736
|
-
changes:
|
|
4735
|
+
function ar(e, r, o = "plaintext", u = "word", h = 10) {
|
|
4736
|
+
const n = Sn(e, r);
|
|
4737
|
+
let t = 0, i = 0, a = !1;
|
|
4738
|
+
const s = [], l = {
|
|
4739
|
+
changes: s,
|
|
4737
4740
|
collector: [],
|
|
4738
|
-
stat:
|
|
4741
|
+
stat: Rn(n)
|
|
4739
4742
|
};
|
|
4740
4743
|
for (let g = 0; g < n.length; g++) {
|
|
4741
|
-
if (
|
|
4742
|
-
|
|
4744
|
+
if (a) {
|
|
4745
|
+
a = !1;
|
|
4743
4746
|
continue;
|
|
4744
4747
|
}
|
|
4745
4748
|
const [d, p] = [n[g], n[g + 1]], [b, E] = [de(d), de(p)], v = d.value.replace(/\n$/, "").split(`
|
|
4746
4749
|
`);
|
|
4747
4750
|
if (p === void 0) {
|
|
4748
4751
|
for (const m of v) {
|
|
4749
|
-
b === N.EQUAL && (
|
|
4750
|
-
const D =
|
|
4751
|
-
|
|
4752
|
+
b === N.EQUAL && (t++, i++), b === N.DELETE && t++, b === N.ADD && i++;
|
|
4753
|
+
const D = V(o, m);
|
|
4754
|
+
s.push({
|
|
4752
4755
|
type: b,
|
|
4753
4756
|
code: D,
|
|
4754
4757
|
addNum: b === N.DELETE ? void 0 : i,
|
|
4755
|
-
delNum: b === N.ADD ? void 0 :
|
|
4758
|
+
delNum: b === N.ADD ? void 0 : t
|
|
4756
4759
|
});
|
|
4757
4760
|
}
|
|
4758
4761
|
break;
|
|
4759
4762
|
}
|
|
4760
4763
|
if (b === N.EQUAL)
|
|
4761
4764
|
for (const m of v) {
|
|
4762
|
-
|
|
4763
|
-
const D =
|
|
4764
|
-
|
|
4765
|
+
t++, i++;
|
|
4766
|
+
const D = V(o, m);
|
|
4767
|
+
s.push({ type: N.EQUAL, code: D, delNum: t, addNum: i });
|
|
4765
4768
|
}
|
|
4766
|
-
const
|
|
4769
|
+
const w = p.value.replace(/\n$/, "").split(`
|
|
4767
4770
|
`);
|
|
4768
4771
|
if (b === N.DELETE)
|
|
4769
|
-
if (E === N.ADD && v.length ===
|
|
4772
|
+
if (E === N.ADD && v.length === w.length) {
|
|
4770
4773
|
for (let m = 0; m < v.length; m++) {
|
|
4771
|
-
const D = v[m], S =
|
|
4772
|
-
|
|
4773
|
-
const A =
|
|
4774
|
-
|
|
4774
|
+
const D = v[m], S = w[m];
|
|
4775
|
+
t++;
|
|
4776
|
+
const A = V(o, Ce(S, D, u));
|
|
4777
|
+
s.push({ type: N.DELETE, code: A, delNum: t });
|
|
4775
4778
|
}
|
|
4776
|
-
for (let m = 0; m <
|
|
4777
|
-
const D = v[m], S =
|
|
4779
|
+
for (let m = 0; m < w.length; m++) {
|
|
4780
|
+
const D = v[m], S = w[m];
|
|
4778
4781
|
i++;
|
|
4779
|
-
const A =
|
|
4780
|
-
|
|
4782
|
+
const A = V(o, Ce(D, S, u));
|
|
4783
|
+
s.push({ type: N.ADD, code: A, addNum: i });
|
|
4781
4784
|
}
|
|
4782
|
-
|
|
4785
|
+
a = !0;
|
|
4783
4786
|
} else
|
|
4784
4787
|
for (const m of v) {
|
|
4785
|
-
|
|
4786
|
-
const D =
|
|
4787
|
-
|
|
4788
|
+
t++;
|
|
4789
|
+
const D = V(o, m);
|
|
4790
|
+
s.push({ type: N.DELETE, code: D, delNum: t });
|
|
4788
4791
|
}
|
|
4789
4792
|
if (b === N.ADD)
|
|
4790
4793
|
for (const m of v) {
|
|
4791
4794
|
i++;
|
|
4792
|
-
const D =
|
|
4793
|
-
|
|
4795
|
+
const D = V(o, m);
|
|
4796
|
+
s.push({ type: N.ADD, code: D, addNum: i });
|
|
4794
4797
|
}
|
|
4795
4798
|
}
|
|
4796
|
-
for (let g = 0; g <
|
|
4797
|
-
const d =
|
|
4799
|
+
for (let g = 0; g < s.length; g++) {
|
|
4800
|
+
const d = s[g];
|
|
4798
4801
|
if (d.type === N.DELETE || d.type === N.ADD) {
|
|
4799
|
-
const [p, b] = [Math.max(g - h, 0), Math.min(g + h + 1,
|
|
4802
|
+
const [p, b] = [Math.max(g - h, 0), Math.min(g + h + 1, s.length)];
|
|
4800
4803
|
for (let E = p; E < b; E++)
|
|
4801
|
-
|
|
4804
|
+
s[E].fold = !1;
|
|
4802
4805
|
}
|
|
4803
4806
|
d.fold === void 0 && (d.fold = !0);
|
|
4804
4807
|
}
|
|
4805
|
-
if (e ===
|
|
4806
|
-
for (let g = 0; g <
|
|
4807
|
-
|
|
4808
|
-
return
|
|
4808
|
+
if (e === r) {
|
|
4809
|
+
for (let g = 0; g < s.length; g++)
|
|
4810
|
+
s[g].fold = !1;
|
|
4811
|
+
return l;
|
|
4809
4812
|
}
|
|
4810
4813
|
const c = [];
|
|
4811
4814
|
let f = [];
|
|
4812
|
-
for (let g = 0; g <
|
|
4813
|
-
const d =
|
|
4815
|
+
for (let g = 0; g < s.length; g++) {
|
|
4816
|
+
const d = s[g];
|
|
4814
4817
|
if (d.fold === !1) {
|
|
4815
|
-
f.length && (f[0].hideIndex =
|
|
4818
|
+
f.length && (f[0].hideIndex = l.collector.length, l.collector.push({
|
|
4816
4819
|
lines: f,
|
|
4817
4820
|
fold: !0
|
|
4818
4821
|
}), f = []), c.push(d);
|
|
@@ -4820,174 +4823,178 @@ function sr(e, t, l = "plaintext", u = "word", h = 10) {
|
|
|
4820
4823
|
}
|
|
4821
4824
|
d.type === "equal" && (d.hide = !0, f.push(d)), c.push(d);
|
|
4822
4825
|
}
|
|
4823
|
-
return f.length && (f[0].hideIndex =
|
|
4826
|
+
return f.length && (f[0].hideIndex = l.collector.length, l.collector.push({
|
|
4824
4827
|
lines: f,
|
|
4825
4828
|
fold: !0
|
|
4826
|
-
}), f = []),
|
|
4829
|
+
}), f = []), l.changes = c, l;
|
|
4827
4830
|
}
|
|
4828
|
-
const
|
|
4831
|
+
const or = { key: 0 }, lr = /* @__PURE__ */ P("td", {
|
|
4829
4832
|
class: "blob-code blob-code-hunk",
|
|
4830
4833
|
align: "left"
|
|
4831
|
-
}, " ⋯ ", -1),
|
|
4834
|
+
}, " ⋯ ", -1), cr = { key: 1 }, ur = ["data-code-marker", "innerHTML"], fr = /* @__PURE__ */ ye({
|
|
4832
4835
|
__name: "UnifiedLine",
|
|
4833
4836
|
props: {
|
|
4834
4837
|
line: null
|
|
4835
4838
|
},
|
|
4836
4839
|
emits: ["expand"],
|
|
4837
|
-
setup(e, { emit:
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
+
setup(e, { emit: r }) {
|
|
4841
|
+
function o(u) {
|
|
4842
|
+
return u === N.DELETE ? "-" : u === N.ADD ? "+" : "";
|
|
4843
|
+
}
|
|
4844
|
+
return (u, h) => e.line.hideIndex !== void 0 && e.line.hide ? (W(), j("tr", or, [
|
|
4840
4845
|
P("td", {
|
|
4841
4846
|
class: "blob-num blob-num-hunk text-center",
|
|
4842
4847
|
colspan: "2",
|
|
4843
|
-
onClick: h[0] || (h[0] = (n) =>
|
|
4848
|
+
onClick: h[0] || (h[0] = (n) => r("expand", e.line))
|
|
4844
4849
|
}, " > "),
|
|
4845
|
-
|
|
4846
|
-
])) : e.line.hide ? fn("", !0) : (W(),
|
|
4850
|
+
lr
|
|
4851
|
+
])) : e.line.hide ? fn("", !0) : (W(), j("tr", cr, [
|
|
4847
4852
|
P("td", {
|
|
4848
|
-
class:
|
|
4849
|
-
"blob-num-deletion": e.line.type ===
|
|
4850
|
-
"blob-num-addition": e.line.type ===
|
|
4851
|
-
"blob-num-context": e.line.type ===
|
|
4853
|
+
class: be(["blob-num", {
|
|
4854
|
+
"blob-num-deletion": e.line.type === z(N).DELETE,
|
|
4855
|
+
"blob-num-addition": e.line.type === z(N).ADD,
|
|
4856
|
+
"blob-num-context": e.line.type === z(N).EQUAL,
|
|
4852
4857
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4853
4858
|
}])
|
|
4854
4859
|
}, he(e.line.delNum), 3),
|
|
4855
4860
|
P("td", {
|
|
4856
|
-
class:
|
|
4857
|
-
"blob-num-deletion": e.line.type ===
|
|
4858
|
-
"blob-num-addition": e.line.type ===
|
|
4859
|
-
"blob-num-context": e.line.type ===
|
|
4861
|
+
class: be(["blob-num", {
|
|
4862
|
+
"blob-num-deletion": e.line.type === z(N).DELETE,
|
|
4863
|
+
"blob-num-addition": e.line.type === z(N).ADD,
|
|
4864
|
+
"blob-num-context": e.line.type === z(N).EQUAL,
|
|
4860
4865
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4861
4866
|
}])
|
|
4862
4867
|
}, he(e.line.addNum), 3),
|
|
4863
4868
|
P("td", {
|
|
4864
|
-
class:
|
|
4865
|
-
"blob-code-deletion": e.line.type ===
|
|
4866
|
-
"blob-code-addition": e.line.type ===
|
|
4867
|
-
"blob-code-context": e.line.type ===
|
|
4869
|
+
class: be(["blob-code", {
|
|
4870
|
+
"blob-code-deletion": e.line.type === z(N).DELETE,
|
|
4871
|
+
"blob-code-addition": e.line.type === z(N).ADD,
|
|
4872
|
+
"blob-code-context": e.line.type === z(N).EQUAL,
|
|
4868
4873
|
"blob-code-hunk": e.line.hide !== void 0
|
|
4869
4874
|
}])
|
|
4870
4875
|
}, [
|
|
4871
4876
|
P("span", {
|
|
4872
4877
|
class: "blob-code-inner blob-code-marker",
|
|
4873
|
-
"data-code-marker":
|
|
4878
|
+
"data-code-marker": o(e.line.type),
|
|
4874
4879
|
innerHTML: e.line.code
|
|
4875
|
-
}, null, 8,
|
|
4880
|
+
}, null, 8, ur)
|
|
4876
4881
|
], 2)
|
|
4877
4882
|
]));
|
|
4878
4883
|
}
|
|
4879
|
-
}),
|
|
4884
|
+
}), gr = { class: "diff-table" }, hr = /* @__PURE__ */ ye({
|
|
4880
4885
|
__name: "UnifiedViewer",
|
|
4881
4886
|
props: {
|
|
4882
4887
|
diffChange: null
|
|
4883
4888
|
},
|
|
4884
4889
|
setup(e) {
|
|
4885
|
-
const
|
|
4886
|
-
function
|
|
4887
|
-
u !== void 0 &&
|
|
4890
|
+
const r = e;
|
|
4891
|
+
function o({ hideIndex: u }) {
|
|
4892
|
+
u !== void 0 && r.diffChange.collector[u].lines.forEach((h) => {
|
|
4888
4893
|
h.hide = !1, h.fold = !1;
|
|
4889
4894
|
});
|
|
4890
4895
|
}
|
|
4891
4896
|
return (u, h) => {
|
|
4892
4897
|
var n;
|
|
4893
|
-
return W(),
|
|
4898
|
+
return W(), j("table", gr, [
|
|
4894
4899
|
P("tbody", null, [
|
|
4895
|
-
(W(!0),
|
|
4900
|
+
(W(!0), j(ge, null, Fe((n = e.diffChange) == null ? void 0 : n.changes, (t, i) => (W(), Oe(fr, {
|
|
4896
4901
|
key: i,
|
|
4897
|
-
line:
|
|
4898
|
-
onExpand:
|
|
4902
|
+
line: t,
|
|
4903
|
+
onExpand: o
|
|
4899
4904
|
}, null, 8, ["line"]))), 128))
|
|
4900
4905
|
])
|
|
4901
4906
|
]);
|
|
4902
4907
|
};
|
|
4903
4908
|
}
|
|
4904
|
-
}),
|
|
4909
|
+
}), dr = { key: 0 }, pr = /* @__PURE__ */ P("td", {
|
|
4905
4910
|
class: "blob-code blob-code-inner blob-code-hunk",
|
|
4906
4911
|
colspan: "3",
|
|
4907
4912
|
align: "left"
|
|
4908
|
-
}, " ⋯ ", -1),
|
|
4913
|
+
}, " ⋯ ", -1), br = { key: 1 }, _r = /* @__PURE__ */ P("td", { class: "blob-num blob-num-empty empty-cell" }, null, -1), Er = /* @__PURE__ */ P("td", { class: "blob-code blob-code-empty empty-cell" }, null, -1), vr = ["data-code-marker", "innerHTML"], mr = /* @__PURE__ */ ye({
|
|
4909
4914
|
__name: "SplitLine",
|
|
4910
4915
|
props: {
|
|
4911
4916
|
splitLine: null
|
|
4912
4917
|
},
|
|
4913
4918
|
emits: ["expand"],
|
|
4914
|
-
setup(e, { emit:
|
|
4915
|
-
|
|
4916
|
-
|
|
4919
|
+
setup(e, { emit: r }) {
|
|
4920
|
+
function o(u) {
|
|
4921
|
+
return u === N.DELETE ? "-" : u === N.ADD ? "+" : "";
|
|
4922
|
+
}
|
|
4923
|
+
return (u, h) => e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? (W(), j("tr", dr, [
|
|
4917
4924
|
P("td", {
|
|
4918
4925
|
class: "blob-num blob-num-hunk",
|
|
4919
4926
|
colspan: "1",
|
|
4920
|
-
onClick: h[0] || (h[0] = (n) =>
|
|
4927
|
+
onClick: h[0] || (h[0] = (n) => r("expand", e.splitLine))
|
|
4921
4928
|
}, " > "),
|
|
4922
|
-
|
|
4923
|
-
])) : e.splitLine.hide ? fn("", !0) : (W(),
|
|
4924
|
-
(W(!0),
|
|
4925
|
-
n.type ===
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
], 64)) : (W(),
|
|
4929
|
+
pr
|
|
4930
|
+
])) : e.splitLine.hide ? fn("", !0) : (W(), j("tr", br, [
|
|
4931
|
+
(W(!0), j(ge, null, Fe([e.splitLine.left, e.splitLine.right], (n) => (W(), j(ge, null, [
|
|
4932
|
+
n.type === z(N).EMPTY ? (W(), j(ge, { key: 0 }, [
|
|
4933
|
+
_r,
|
|
4934
|
+
Er
|
|
4935
|
+
], 64)) : (W(), j(ge, { key: 1 }, [
|
|
4929
4936
|
P("td", {
|
|
4930
|
-
class:
|
|
4931
|
-
"blob-num-deletion": n.type ===
|
|
4932
|
-
"blob-num-addition": n.type ===
|
|
4933
|
-
"blob-num-context": n.type ===
|
|
4937
|
+
class: be(["blob-num", {
|
|
4938
|
+
"blob-num-deletion": n.type === z(N).DELETE,
|
|
4939
|
+
"blob-num-addition": n.type === z(N).ADD,
|
|
4940
|
+
"blob-num-context": n.type === z(N).EQUAL,
|
|
4934
4941
|
"blob-num-hunk": e.splitLine.hide !== void 0
|
|
4935
4942
|
}])
|
|
4936
4943
|
}, he(n.num), 3),
|
|
4937
4944
|
P("td", {
|
|
4938
|
-
class:
|
|
4939
|
-
"blob-code-deletion": n.type ===
|
|
4940
|
-
"blob-code-addition": n.type ===
|
|
4941
|
-
"blob-code-context": n.type ===
|
|
4945
|
+
class: be(["blob-code", {
|
|
4946
|
+
"blob-code-deletion": n.type === z(N).DELETE,
|
|
4947
|
+
"blob-code-addition": n.type === z(N).ADD,
|
|
4948
|
+
"blob-code-context": n.type === z(N).EQUAL,
|
|
4942
4949
|
"blob-code-hunk": e.splitLine.hide !== void 0
|
|
4943
4950
|
}])
|
|
4944
4951
|
}, [
|
|
4945
4952
|
P("span", {
|
|
4946
4953
|
class: "blob-code-inner blob-code-marker",
|
|
4947
|
-
"data-code-marker":
|
|
4954
|
+
"data-code-marker": o(n.type),
|
|
4948
4955
|
innerHTML: n.code
|
|
4949
|
-
}, null, 8,
|
|
4956
|
+
}, null, 8, vr)
|
|
4950
4957
|
], 2)
|
|
4951
4958
|
], 64))
|
|
4952
4959
|
], 64))), 256))
|
|
4953
4960
|
]));
|
|
4954
4961
|
}
|
|
4955
|
-
}),
|
|
4962
|
+
}), yr = { class: "file-diff-split diff-table" }, wr = /* @__PURE__ */ P("colgroup", null, [
|
|
4956
4963
|
/* @__PURE__ */ P("col", { width: "44" }),
|
|
4957
4964
|
/* @__PURE__ */ P("col"),
|
|
4958
4965
|
/* @__PURE__ */ P("col", { width: "44" }),
|
|
4959
4966
|
/* @__PURE__ */ P("col")
|
|
4960
|
-
], -1),
|
|
4967
|
+
], -1), Nr = /* @__PURE__ */ ye({
|
|
4961
4968
|
__name: "SplitViewer",
|
|
4962
4969
|
props: {
|
|
4963
4970
|
diffChange: null
|
|
4964
4971
|
},
|
|
4965
4972
|
setup(e) {
|
|
4966
|
-
const
|
|
4967
|
-
function
|
|
4968
|
-
u !== void 0 &&
|
|
4973
|
+
const r = e;
|
|
4974
|
+
function o({ hideIndex: u }) {
|
|
4975
|
+
u !== void 0 && r.diffChange.collector[u].lines.forEach((h) => {
|
|
4969
4976
|
h.hide = !1, h.fold = !1;
|
|
4970
4977
|
});
|
|
4971
4978
|
}
|
|
4972
4979
|
return (u, h) => {
|
|
4973
4980
|
var n;
|
|
4974
|
-
return W(),
|
|
4981
|
+
return W(), j("table", yr, [
|
|
4975
4982
|
wr,
|
|
4976
4983
|
P("tbody", null, [
|
|
4977
|
-
(W(!0),
|
|
4984
|
+
(W(!0), j(ge, null, Fe((n = e.diffChange) == null ? void 0 : n.changes, (t, i) => (W(), Oe(mr, {
|
|
4978
4985
|
key: i,
|
|
4979
|
-
"split-line":
|
|
4980
|
-
onExpand:
|
|
4986
|
+
"split-line": t,
|
|
4987
|
+
onExpand: o
|
|
4981
4988
|
}, null, 8, ["split-line"]))), 128))
|
|
4982
4989
|
])
|
|
4983
4990
|
]);
|
|
4984
4991
|
};
|
|
4985
4992
|
}
|
|
4986
4993
|
});
|
|
4987
|
-
const
|
|
4994
|
+
const Mr = { class: "file-header" }, Ar = { class: "file-info" }, Tr = { class: "filename" }, Dr = { class: "diff-stat" }, Sr = { class: "diff-stat-added" }, Rr = {
|
|
4988
4995
|
class: "diff-stat-deleted",
|
|
4989
4996
|
style: { "margin-left": "8px" }
|
|
4990
|
-
},
|
|
4997
|
+
}, Or = /* @__PURE__ */ ye({
|
|
4991
4998
|
__name: "CodeDiff",
|
|
4992
4999
|
props: {
|
|
4993
5000
|
newString: null,
|
|
@@ -5001,49 +5008,58 @@ const Nr = { class: "file-header" }, Mr = { class: "file-info" }, Ar = { class:
|
|
|
5001
5008
|
maxHeight: { default: void 0 },
|
|
5002
5009
|
filename: { default: void 0 }
|
|
5003
5010
|
},
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5011
|
+
emits: ["diff"],
|
|
5012
|
+
setup(e, { emit: r }) {
|
|
5013
|
+
const o = e, u = pe(() => o.outputFormat === "line-by-line"), h = pe(() => {
|
|
5014
|
+
let s = o.oldString || "";
|
|
5015
|
+
return s = o.trim ? s.trim() : s, s = o.noDiffLineFeed ? s.replace(/(\r\n)/g, `
|
|
5016
|
+
`) : s, s;
|
|
5017
|
+
}), n = pe(() => {
|
|
5018
|
+
let s = o.newString || "";
|
|
5019
|
+
return s = o.trim ? s.trim() : s, s = o.noDiffLineFeed ? s.replace(/(\r\n)/g, `
|
|
5020
|
+
`) : s, s;
|
|
5021
|
+
}), t = pe(
|
|
5022
|
+
() => u.value ? ar(h.value, n.value, o.language, o.diffStyle, o.context) : sr(h.value, n.value, o.language, o.diffStyle, o.context)
|
|
5023
|
+
), i = Un(t.value), a = pe(() => i.value.stat.additionsNum === 0 && i.value.stat.deletionsNum === 0);
|
|
5024
|
+
return Pn(() => o, () => {
|
|
5025
|
+
i.value = t.value, r("diff", {
|
|
5026
|
+
stat: {
|
|
5027
|
+
isChanged: !a.value,
|
|
5028
|
+
addNum: i.value.stat.additionsNum,
|
|
5029
|
+
delNum: i.value.stat.deletionsNum
|
|
5030
|
+
}
|
|
5031
|
+
});
|
|
5032
|
+
}, { deep: !0, immediate: !0 }), (s, l) => (W(), j("div", {
|
|
5019
5033
|
class: "code-diff-view",
|
|
5020
|
-
style:
|
|
5034
|
+
style: xn({ maxHeight: e.maxHeight })
|
|
5021
5035
|
}, [
|
|
5022
|
-
P("div",
|
|
5023
|
-
P("div",
|
|
5024
|
-
P("span",
|
|
5025
|
-
P("span",
|
|
5026
|
-
P("span",
|
|
5027
|
-
P("span",
|
|
5036
|
+
P("div", Mr, [
|
|
5037
|
+
P("div", Ar, [
|
|
5038
|
+
P("span", Tr, he(e.filename), 1),
|
|
5039
|
+
P("span", Dr, [
|
|
5040
|
+
P("span", Sr, "+" + he(z(i).stat.additionsNum) + " additions", 1),
|
|
5041
|
+
P("span", Rr, "-" + he(z(i).stat.deletionsNum) + " deletions", 1)
|
|
5028
5042
|
])
|
|
5029
5043
|
])
|
|
5030
5044
|
]),
|
|
5031
|
-
|
|
5045
|
+
z(u) ? (W(), Oe(hr, {
|
|
5032
5046
|
key: 0,
|
|
5033
|
-
"diff-change":
|
|
5034
|
-
}, null, 8, ["diff-change"])) : (W(), Oe(
|
|
5047
|
+
"diff-change": z(i)
|
|
5048
|
+
}, null, 8, ["diff-change"])) : (W(), Oe(Nr, {
|
|
5035
5049
|
key: 1,
|
|
5036
|
-
"diff-change":
|
|
5050
|
+
"diff-change": z(i)
|
|
5037
5051
|
}, null, 8, ["diff-change"]))
|
|
5038
5052
|
], 4));
|
|
5039
5053
|
}
|
|
5040
|
-
})
|
|
5041
|
-
|
|
5042
|
-
|
|
5054
|
+
});
|
|
5055
|
+
function Lr(e) {
|
|
5056
|
+
e.component("CodeDiff", Or);
|
|
5057
|
+
}
|
|
5058
|
+
const Ir = {
|
|
5043
5059
|
install: Lr,
|
|
5044
5060
|
hljs: J
|
|
5045
5061
|
};
|
|
5046
5062
|
export {
|
|
5047
|
-
|
|
5048
|
-
|
|
5063
|
+
Or as CodeDiff,
|
|
5064
|
+
Ir as default
|
|
5049
5065
|
};
|