v-code-diff 1.13.1 → 1.13.2
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 +20 -5
- package/dist/v2/{index.cjs.js → index.cjs} +17 -17
- package/dist/v2/index.es.js +1119 -1097
- package/dist/v2/index.umd.js +17 -17
- package/dist/v2.7/{index.cjs.js → index.cjs} +14 -14
- package/dist/v2.7/index.es.js +625 -613
- package/dist/v2.7/index.umd.js +13 -13
- package/dist/v3/{index.cjs.js → index.cjs} +14 -14
- package/dist/v3/index.es.js +860 -840
- package/dist/v3/index.umd.js +15 -15
- package/package.json +21 -13
- package/scripts/perf-test.ts +40 -0
- package/scripts/postinstall.cjs +15 -18
- package/scripts/utils.cjs +4 -19
- package/src/CodeDiff.vue +7 -5
- package/src/split/SplitLine.vue +9 -5
- package/src/unified/UnifiedLine.vue +1 -1
- package/src/utils.ts +17 -0
package/dist/v2.7/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--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: #1F2328;--color-diff-blob-addition-fg: #1F2328;--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: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--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: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--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: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--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: #1f883d;--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(31,35,40,.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-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px 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(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--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(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,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(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.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(31,35,40,.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-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.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(31,35,40,.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-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--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: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--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: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--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(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.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: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--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: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--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(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.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-scale-black: #1F2328;--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[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.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{position:sticky;top:0;z-index:1;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 .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.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 .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.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 .current-diff{border:1px solid var(--color-border-muted)}.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 .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import kn, { defineComponent as he, computed as de, ref as Le, watch as Bn } from "vue";
|
|
3
|
+
kn.util.warn;
|
|
4
4
|
function ne() {
|
|
5
5
|
}
|
|
6
6
|
ne.prototype = {
|
|
@@ -8,54 +8,54 @@ ne.prototype = {
|
|
|
8
8
|
var u, h = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = h.callback;
|
|
9
9
|
typeof h == "function" && (t = h, h = {}), this.options = h;
|
|
10
10
|
var r = this;
|
|
11
|
-
function i(
|
|
11
|
+
function i(y) {
|
|
12
12
|
return t ? (setTimeout(function() {
|
|
13
|
-
t(void 0,
|
|
14
|
-
}, 0), !0) :
|
|
13
|
+
t(void 0, y);
|
|
14
|
+
}, 0), !0) : y;
|
|
15
15
|
}
|
|
16
16
|
e = this.castInput(e), s = this.castInput(s), e = this.removeEmpty(this.tokenize(e)), s = this.removeEmpty(this.tokenize(s));
|
|
17
17
|
var a = s.length, o = e.length, l = 1, c = a + o;
|
|
18
18
|
h.maxEditLength && (c = Math.min(c, h.maxEditLength));
|
|
19
|
-
var f = (u = h.timeout) !== null && u !== void 0 ? u : 1 / 0,
|
|
19
|
+
var f = (u = h.timeout) !== null && u !== void 0 ? u : 1 / 0, d = Date.now() + f, g = [{
|
|
20
20
|
oldPos: -1,
|
|
21
21
|
lastComponent: void 0
|
|
22
|
-
}], p = this.extractCommon(
|
|
23
|
-
if (
|
|
22
|
+
}], p = this.extractCommon(g[0], s, e, 0);
|
|
23
|
+
if (g[0].oldPos + 1 >= o && p + 1 >= a)
|
|
24
24
|
return i([{
|
|
25
25
|
value: this.join(s),
|
|
26
26
|
count: s.length
|
|
27
27
|
}]);
|
|
28
28
|
var _ = -1 / 0, v = 1 / 0;
|
|
29
29
|
function m() {
|
|
30
|
-
for (var
|
|
31
|
-
var
|
|
32
|
-
|
|
30
|
+
for (var y = Math.max(_, -l); y <= Math.min(v, l); y += 2) {
|
|
31
|
+
var M = void 0, T = g[y - 1], N = g[y + 1];
|
|
32
|
+
T && (g[y - 1] = void 0);
|
|
33
33
|
var R = !1;
|
|
34
34
|
if (N) {
|
|
35
|
-
var C = N.oldPos -
|
|
35
|
+
var C = N.oldPos - y;
|
|
36
36
|
R = N && 0 <= C && C < a;
|
|
37
37
|
}
|
|
38
|
-
var L =
|
|
38
|
+
var L = T && T.oldPos + 1 < o;
|
|
39
39
|
if (!R && !L) {
|
|
40
|
-
|
|
40
|
+
g[y] = void 0;
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
|
-
if (!L || R &&
|
|
44
|
-
return i(
|
|
45
|
-
|
|
43
|
+
if (!L || R && T.oldPos + 1 < N.oldPos ? M = r.addToPath(N, !0, void 0, 0) : M = r.addToPath(T, void 0, !0, 1), p = r.extractCommon(M, s, e, y), M.oldPos + 1 >= o && p + 1 >= a)
|
|
44
|
+
return i($n(r, M.lastComponent, s, e, r.useLongestToken));
|
|
45
|
+
g[y] = M, M.oldPos + 1 >= o && (v = Math.min(v, y - 1)), p + 1 >= a && (_ = Math.max(_, y + 1));
|
|
46
46
|
}
|
|
47
47
|
l++;
|
|
48
48
|
}
|
|
49
49
|
if (t)
|
|
50
|
-
(function
|
|
50
|
+
(function y() {
|
|
51
51
|
setTimeout(function() {
|
|
52
|
-
if (l > c || Date.now() >
|
|
52
|
+
if (l > c || Date.now() > d)
|
|
53
53
|
return t();
|
|
54
|
-
m() ||
|
|
54
|
+
m() || y();
|
|
55
55
|
}, 0);
|
|
56
56
|
})();
|
|
57
57
|
else
|
|
58
|
-
for (; l <= c && Date.now() <=
|
|
58
|
+
for (; l <= c && Date.now() <= d; ) {
|
|
59
59
|
var E = m();
|
|
60
60
|
if (E)
|
|
61
61
|
return E;
|
|
@@ -107,7 +107,7 @@ ne.prototype = {
|
|
|
107
107
|
return e.join("");
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
-
function
|
|
110
|
+
function $n(n, e, s, u, h) {
|
|
111
111
|
for (var t = [], r; e; )
|
|
112
112
|
t.push(e), r = e.previousComponent, delete e.previousComponent, e = r;
|
|
113
113
|
t.reverse();
|
|
@@ -115,8 +115,8 @@ function kn(n, e, s, u, h) {
|
|
|
115
115
|
var c = t[i];
|
|
116
116
|
if (c.removed) {
|
|
117
117
|
if (c.value = n.join(u.slice(l, l + c.count)), l += c.count, i && t[i - 1].added) {
|
|
118
|
-
var
|
|
119
|
-
t[i - 1] = t[i], t[i] =
|
|
118
|
+
var d = t[i - 1];
|
|
119
|
+
t[i - 1] = t[i], t[i] = d;
|
|
120
120
|
}
|
|
121
121
|
} else {
|
|
122
122
|
if (!c.added && h) {
|
|
@@ -130,14 +130,14 @@ function kn(n, e, s, u, h) {
|
|
|
130
130
|
o += c.count, c.added || (l += c.count);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
134
|
-
return a > 1 && typeof
|
|
133
|
+
var g = t[a - 1];
|
|
134
|
+
return a > 1 && typeof g.value == "string" && (g.added || g.removed) && n.equals("", g.value) && (t[a - 2].value += g.value, t.pop()), t;
|
|
135
135
|
}
|
|
136
|
-
var
|
|
137
|
-
function
|
|
138
|
-
return
|
|
136
|
+
var Pn = new ne();
|
|
137
|
+
function Un(n, e, s) {
|
|
138
|
+
return Pn.diff(n, e, s);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function xn(n, e) {
|
|
141
141
|
if (typeof n == "function")
|
|
142
142
|
e.callback = n;
|
|
143
143
|
else if (n)
|
|
@@ -145,22 +145,22 @@ function Pn(n, e) {
|
|
|
145
145
|
n.hasOwnProperty(s) && (e[s] = n[s]);
|
|
146
146
|
return e;
|
|
147
147
|
}
|
|
148
|
-
var Qe = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Ze = /\S/,
|
|
149
|
-
|
|
148
|
+
var Qe = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Ze = /\S/, $e = new ne();
|
|
149
|
+
$e.equals = function(n, e) {
|
|
150
150
|
return this.options.ignoreCase && (n = n.toLowerCase(), e = e.toLowerCase()), n === e || this.options.ignoreWhitespace && !Ze.test(n) && !Ze.test(e);
|
|
151
151
|
};
|
|
152
|
-
|
|
152
|
+
$e.tokenize = function(n) {
|
|
153
153
|
for (var e = n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), s = 0; s < e.length - 1; s++)
|
|
154
154
|
!e[s + 1] && e[s + 2] && Qe.test(e[s]) && Qe.test(e[s + 2]) && (e[s] += e[s + 2], e.splice(s + 1, 2), s--);
|
|
155
155
|
return e;
|
|
156
156
|
};
|
|
157
|
-
function
|
|
158
|
-
return s =
|
|
157
|
+
function Fn(n, e, s) {
|
|
158
|
+
return s = xn(s, {
|
|
159
159
|
ignoreWhitespace: !0
|
|
160
|
-
}),
|
|
160
|
+
}), $e.diff(n, e, s);
|
|
161
161
|
}
|
|
162
|
-
var
|
|
163
|
-
|
|
162
|
+
var an = new ne();
|
|
163
|
+
an.tokenize = function(n) {
|
|
164
164
|
this.options.stripTrailingCr && (n = n.replace(/\r\n/g, `
|
|
165
165
|
`));
|
|
166
166
|
var e = [], s = n.split(/(\n|\r\n)/);
|
|
@@ -171,12 +171,12 @@ rn.tokenize = function(n) {
|
|
|
171
171
|
}
|
|
172
172
|
return e;
|
|
173
173
|
};
|
|
174
|
-
var
|
|
175
|
-
|
|
174
|
+
var Hn = new ne();
|
|
175
|
+
Hn.tokenize = function(n) {
|
|
176
176
|
return n.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
177
177
|
};
|
|
178
|
-
var
|
|
179
|
-
|
|
178
|
+
var zn = new ne();
|
|
179
|
+
zn.tokenize = function(n) {
|
|
180
180
|
return n.split(/([{}:;,]|\s+)/);
|
|
181
181
|
};
|
|
182
182
|
function Ne(n) {
|
|
@@ -187,28 +187,28 @@ function Ne(n) {
|
|
|
187
187
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
188
188
|
}, Ne(n);
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var Gn = Object.prototype.toString, pe = new ne();
|
|
191
191
|
pe.useLongestToken = !0;
|
|
192
|
-
pe.tokenize =
|
|
192
|
+
pe.tokenize = an.tokenize;
|
|
193
193
|
pe.castInput = function(n) {
|
|
194
194
|
var e = this.options, s = e.undefinedReplacement, u = e.stringifyReplacer, h = u === void 0 ? function(t, r) {
|
|
195
195
|
return typeof r == "undefined" ? s : r;
|
|
196
196
|
} : u;
|
|
197
|
-
return typeof n == "string" ? n : JSON.stringify(
|
|
197
|
+
return typeof n == "string" ? n : JSON.stringify(ke(n, null, null, h), h, " ");
|
|
198
198
|
};
|
|
199
199
|
pe.equals = function(n, e) {
|
|
200
200
|
return ne.prototype.equals.call(pe, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
|
|
201
201
|
};
|
|
202
|
-
function
|
|
202
|
+
function ke(n, e, s, u, h) {
|
|
203
203
|
e = e || [], s = s || [], u && (n = u(h, n));
|
|
204
204
|
var t;
|
|
205
205
|
for (t = 0; t < e.length; t += 1)
|
|
206
206
|
if (e[t] === n)
|
|
207
207
|
return s[t];
|
|
208
208
|
var r;
|
|
209
|
-
if (
|
|
209
|
+
if (Gn.call(n) === "[object Array]") {
|
|
210
210
|
for (e.push(n), r = new Array(n.length), s.push(r), t = 0; t < n.length; t += 1)
|
|
211
|
-
r[t] =
|
|
211
|
+
r[t] = ke(n[t], e, s, u, h);
|
|
212
212
|
return e.pop(), s.pop(), r;
|
|
213
213
|
}
|
|
214
214
|
if (n && n.toJSON && (n = n.toJSON()), Ne(n) === "object" && n !== null) {
|
|
@@ -217,23 +217,23 @@ function Ie(n, e, s, u, h) {
|
|
|
217
217
|
for (a in n)
|
|
218
218
|
n.hasOwnProperty(a) && i.push(a);
|
|
219
219
|
for (i.sort(), t = 0; t < i.length; t += 1)
|
|
220
|
-
a = i[t], r[a] =
|
|
220
|
+
a = i[t], r[a] = ke(n[a], e, s, u, a);
|
|
221
221
|
e.pop(), s.pop();
|
|
222
222
|
} else
|
|
223
223
|
r = n;
|
|
224
224
|
return r;
|
|
225
225
|
}
|
|
226
|
-
var
|
|
227
|
-
|
|
226
|
+
var Be = new ne();
|
|
227
|
+
Be.tokenize = function(n) {
|
|
228
228
|
return n.slice();
|
|
229
229
|
};
|
|
230
|
-
|
|
230
|
+
Be.join = Be.removeEmpty = function(n) {
|
|
231
231
|
return n;
|
|
232
232
|
};
|
|
233
|
-
function
|
|
233
|
+
function Kn(n) {
|
|
234
234
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
235
235
|
}
|
|
236
|
-
var
|
|
236
|
+
var on = { exports: {} };
|
|
237
237
|
(function(n) {
|
|
238
238
|
var e = function() {
|
|
239
239
|
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;
|
|
@@ -250,10 +250,10 @@ var sn = { exports: {} };
|
|
|
250
250
|
typeof i == "undefined" && (i = !0);
|
|
251
251
|
var l = i, c = this.diff_commonPrefix(t, r), f = t.substring(0, c);
|
|
252
252
|
t = t.substring(c), r = r.substring(c), c = this.diff_commonSuffix(t, r);
|
|
253
|
-
var
|
|
253
|
+
var d = t.substring(t.length - c);
|
|
254
254
|
t = t.substring(0, t.length - c), r = r.substring(0, r.length - c);
|
|
255
|
-
var
|
|
256
|
-
return f &&
|
|
255
|
+
var g = this.diff_compute_(t, r, l, o);
|
|
256
|
+
return f && g.unshift(new e.Diff(h, f)), d && g.push(new e.Diff(h, d)), this.diff_cleanupMerge(g), g;
|
|
257
257
|
}, e.prototype.diff_compute_ = function(t, r, i, a) {
|
|
258
258
|
var o;
|
|
259
259
|
if (!t)
|
|
@@ -275,12 +275,12 @@ var sn = { exports: {} };
|
|
|
275
275
|
new e.Diff(s, t),
|
|
276
276
|
new e.Diff(u, r)
|
|
277
277
|
];
|
|
278
|
-
var
|
|
279
|
-
if (
|
|
280
|
-
var
|
|
278
|
+
var d = this.diff_halfMatch_(t, r);
|
|
279
|
+
if (d) {
|
|
280
|
+
var g = d[0], p = d[1], _ = d[2], v = d[3], m = d[4], E = this.diff_main(g, _, i, a), y = this.diff_main(p, v, i, a);
|
|
281
281
|
return E.concat(
|
|
282
282
|
[new e.Diff(h, m)],
|
|
283
|
-
|
|
283
|
+
y
|
|
284
284
|
);
|
|
285
285
|
}
|
|
286
286
|
return i && t.length > 100 && r.length > 100 ? this.diff_lineMode_(t, r, a) : this.diff_bisect_(t, r, a);
|
|
@@ -289,66 +289,66 @@ var sn = { exports: {} };
|
|
|
289
289
|
t = a.chars1, r = a.chars2;
|
|
290
290
|
var o = a.lineArray, l = this.diff_main(t, r, !1, i);
|
|
291
291
|
this.diff_charsToLines_(l, o), this.diff_cleanupSemantic(l), l.push(new e.Diff(h, ""));
|
|
292
|
-
for (var c = 0, f = 0,
|
|
292
|
+
for (var c = 0, f = 0, d = 0, g = "", p = ""; c < l.length; ) {
|
|
293
293
|
switch (l[c][0]) {
|
|
294
294
|
case u:
|
|
295
|
-
|
|
295
|
+
d++, p += l[c][1];
|
|
296
296
|
break;
|
|
297
297
|
case s:
|
|
298
|
-
f++,
|
|
298
|
+
f++, g += l[c][1];
|
|
299
299
|
break;
|
|
300
300
|
case h:
|
|
301
|
-
if (f >= 1 &&
|
|
301
|
+
if (f >= 1 && d >= 1) {
|
|
302
302
|
l.splice(
|
|
303
|
-
c - f -
|
|
304
|
-
f +
|
|
305
|
-
), c = c - f -
|
|
306
|
-
for (var _ = this.diff_main(
|
|
303
|
+
c - f - d,
|
|
304
|
+
f + d
|
|
305
|
+
), c = c - f - d;
|
|
306
|
+
for (var _ = this.diff_main(g, p, !1, i), v = _.length - 1; v >= 0; v--)
|
|
307
307
|
l.splice(c, 0, _[v]);
|
|
308
308
|
c = c + _.length;
|
|
309
309
|
}
|
|
310
|
-
|
|
310
|
+
d = 0, f = 0, g = "", p = "";
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
c++;
|
|
314
314
|
}
|
|
315
315
|
return l.pop(), l;
|
|
316
316
|
}, e.prototype.diff_bisect_ = function(t, r, i) {
|
|
317
|
-
for (var a = t.length, o = r.length, l = Math.ceil((a + o) / 2), c = l, f = 2 * l,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
for (var _ = a - o, v = _ % 2 != 0, m = 0, E = 0,
|
|
321
|
-
for (var N = -
|
|
317
|
+
for (var a = t.length, o = r.length, l = Math.ceil((a + o) / 2), c = l, f = 2 * l, d = new Array(f), g = new Array(f), p = 0; p < f; p++)
|
|
318
|
+
d[p] = -1, g[p] = -1;
|
|
319
|
+
d[c + 1] = 0, g[c + 1] = 0;
|
|
320
|
+
for (var _ = a - o, v = _ % 2 != 0, m = 0, E = 0, y = 0, M = 0, T = 0; T < l && !((/* @__PURE__ */ new Date()).getTime() > i); T++) {
|
|
321
|
+
for (var N = -T + m; N <= T - E; N += 2) {
|
|
322
322
|
var R = c + N, C;
|
|
323
|
-
N == -
|
|
323
|
+
N == -T || N != T && d[R - 1] < d[R + 1] ? C = d[R + 1] : C = d[R - 1] + 1;
|
|
324
324
|
for (var L = C - N; C < a && L < o && t.charAt(C) == r.charAt(L); )
|
|
325
325
|
C++, L++;
|
|
326
|
-
if (
|
|
326
|
+
if (d[R] = C, C > a)
|
|
327
327
|
E += 2;
|
|
328
328
|
else if (L > o)
|
|
329
329
|
m += 2;
|
|
330
330
|
else if (v) {
|
|
331
331
|
var $ = c + _ - N;
|
|
332
|
-
if ($ >= 0 && $ < f &&
|
|
333
|
-
var B = a -
|
|
332
|
+
if ($ >= 0 && $ < f && g[$] != -1) {
|
|
333
|
+
var B = a - g[$];
|
|
334
334
|
if (C >= B)
|
|
335
335
|
return this.diff_bisectSplit_(t, r, C, L, i);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
for (var H = -
|
|
339
|
+
for (var H = -T + y; H <= T - M; H += 2) {
|
|
340
340
|
var $ = c + H, B;
|
|
341
|
-
H == -
|
|
341
|
+
H == -T || H != T && g[$ - 1] < g[$ + 1] ? B = g[$ + 1] : B = g[$ - 1] + 1;
|
|
342
342
|
for (var K = B - H; B < a && K < o && t.charAt(a - B - 1) == r.charAt(o - K - 1); )
|
|
343
343
|
B++, K++;
|
|
344
|
-
if (
|
|
345
|
-
|
|
344
|
+
if (g[$] = B, B > a)
|
|
345
|
+
M += 2;
|
|
346
346
|
else if (K > o)
|
|
347
|
-
|
|
347
|
+
y += 2;
|
|
348
348
|
else if (!v) {
|
|
349
349
|
var R = c + _ - H;
|
|
350
|
-
if (R >= 0 && R < f &&
|
|
351
|
-
var C =
|
|
350
|
+
if (R >= 0 && R < f && d[R] != -1) {
|
|
351
|
+
var C = d[R], L = c + C - R;
|
|
352
352
|
if (B = a - B, C >= B)
|
|
353
353
|
return this.diff_bisectSplit_(t, r, C, L, i);
|
|
354
354
|
}
|
|
@@ -360,19 +360,19 @@ var sn = { exports: {} };
|
|
|
360
360
|
new e.Diff(u, r)
|
|
361
361
|
];
|
|
362
362
|
}, e.prototype.diff_bisectSplit_ = function(t, r, i, a, o) {
|
|
363
|
-
var l = t.substring(0, i), c = r.substring(0, a), f = t.substring(i),
|
|
364
|
-
return
|
|
363
|
+
var l = t.substring(0, i), c = r.substring(0, a), f = t.substring(i), d = r.substring(a), g = this.diff_main(l, c, !1, o), p = this.diff_main(f, d, !1, o);
|
|
364
|
+
return g.concat(p);
|
|
365
365
|
}, e.prototype.diff_linesToChars_ = function(t, r) {
|
|
366
366
|
var i = [], a = {};
|
|
367
367
|
i[0] = "";
|
|
368
|
-
function o(
|
|
369
|
-
for (var
|
|
370
|
-
_ =
|
|
371
|
-
`, p), _ == -1 && (_ =
|
|
372
|
-
var m =
|
|
373
|
-
(a.hasOwnProperty ? a.hasOwnProperty(m) : a[m] !== void 0) ?
|
|
368
|
+
function o(d) {
|
|
369
|
+
for (var g = "", p = 0, _ = -1, v = i.length; _ < d.length - 1; ) {
|
|
370
|
+
_ = d.indexOf(`
|
|
371
|
+
`, p), _ == -1 && (_ = d.length - 1);
|
|
372
|
+
var m = d.substring(p, _ + 1);
|
|
373
|
+
(a.hasOwnProperty ? a.hasOwnProperty(m) : a[m] !== void 0) ? g += String.fromCharCode(a[m]) : (v == l && (m = d.substring(p), _ = d.length), g += String.fromCharCode(v), a[m] = v, i[v++] = m), p = _ + 1;
|
|
374
374
|
}
|
|
375
|
-
return
|
|
375
|
+
return g;
|
|
376
376
|
}
|
|
377
377
|
var l = 4e4, c = o(t);
|
|
378
378
|
l = 65535;
|
|
@@ -405,10 +405,10 @@ var sn = { exports: {} };
|
|
|
405
405
|
if (t == r)
|
|
406
406
|
return o;
|
|
407
407
|
for (var l = 0, c = 1; ; ) {
|
|
408
|
-
var f = t.substring(o - c),
|
|
409
|
-
if (
|
|
408
|
+
var f = t.substring(o - c), d = r.indexOf(f);
|
|
409
|
+
if (d == -1)
|
|
410
410
|
return l;
|
|
411
|
-
c +=
|
|
411
|
+
c += d, (d == 0 || t.substring(o - c) == r.substring(0, c)) && (l = c, c++);
|
|
412
412
|
}
|
|
413
413
|
}, e.prototype.diff_halfMatch_ = function(t, r) {
|
|
414
414
|
if (this.Diff_Timeout <= 0)
|
|
@@ -417,16 +417,16 @@ var sn = { exports: {} };
|
|
|
417
417
|
if (i.length < 4 || a.length * 2 < i.length)
|
|
418
418
|
return null;
|
|
419
419
|
var o = this;
|
|
420
|
-
function l(E,
|
|
421
|
-
for (var
|
|
420
|
+
function l(E, y, M) {
|
|
421
|
+
for (var T = E.substring(M, M + Math.floor(E.length / 4)), N = -1, R = "", C, L, $, B; (N = y.indexOf(T, N + 1)) != -1; ) {
|
|
422
422
|
var H = o.diff_commonPrefix(
|
|
423
|
-
E.substring(
|
|
424
|
-
|
|
423
|
+
E.substring(M),
|
|
424
|
+
y.substring(N)
|
|
425
425
|
), K = o.diff_commonSuffix(
|
|
426
|
-
E.substring(0,
|
|
427
|
-
|
|
426
|
+
E.substring(0, M),
|
|
427
|
+
y.substring(0, N)
|
|
428
428
|
);
|
|
429
|
-
R.length < K + H && (R =
|
|
429
|
+
R.length < K + H && (R = y.substring(N - K, N) + y.substring(N, N + H), C = E.substring(0, M - K), L = E.substring(M + H), $ = y.substring(0, N - K), B = y.substring(N + H));
|
|
430
430
|
}
|
|
431
431
|
return R.length * 2 >= E.length ? [
|
|
432
432
|
C,
|
|
@@ -444,24 +444,24 @@ var sn = { exports: {} };
|
|
|
444
444
|
i,
|
|
445
445
|
a,
|
|
446
446
|
Math.ceil(i.length / 2)
|
|
447
|
-
),
|
|
447
|
+
), d;
|
|
448
448
|
if (!c && !f)
|
|
449
449
|
return null;
|
|
450
|
-
f ? c ?
|
|
451
|
-
var
|
|
452
|
-
t.length > r.length ? (
|
|
453
|
-
var m =
|
|
454
|
-
return [
|
|
450
|
+
f ? c ? d = c[4].length > f[4].length ? c : f : d = f : d = c;
|
|
451
|
+
var g, p, _, v;
|
|
452
|
+
t.length > r.length ? (g = d[0], p = d[1], _ = d[2], v = d[3]) : (_ = d[0], v = d[1], g = d[2], p = d[3]);
|
|
453
|
+
var m = d[4];
|
|
454
|
+
return [g, p, _, v, m];
|
|
455
455
|
}, e.prototype.diff_cleanupSemantic = function(t) {
|
|
456
|
-
for (var r = !1, i = [], a = 0, o = null, l = 0, c = 0, f = 0,
|
|
457
|
-
t[l][0] == h ? (i[a++] = l, c =
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
for (var r = !1, i = [], a = 0, o = null, l = 0, c = 0, f = 0, d = 0, g = 0; l < t.length; )
|
|
457
|
+
t[l][0] == h ? (i[a++] = l, c = d, f = g, d = 0, g = 0, o = t[l][1]) : (t[l][0] == u ? d += t[l][1].length : g += t[l][1].length, o && o.length <= Math.max(c, f) && o.length <= Math.max(
|
|
458
|
+
d,
|
|
459
|
+
g
|
|
460
460
|
) && (t.splice(
|
|
461
461
|
i[a - 1],
|
|
462
462
|
0,
|
|
463
463
|
new e.Diff(s, o)
|
|
464
|
-
), t[i[a - 1] + 1][0] = u, a--, a--, l = a > 0 ? i[a - 1] : -1, c = 0, f = 0,
|
|
464
|
+
), t[i[a - 1] + 1][0] = u, a--, a--, l = a > 0 ? i[a - 1] : -1, c = 0, f = 0, d = 0, g = 0, o = null, r = !0)), l++;
|
|
465
465
|
for (r && this.diff_cleanupMerge(t), this.diff_cleanupSemanticLossless(t), l = 1; l < t.length; ) {
|
|
466
466
|
if (t[l - 1][0] == s && t[l][0] == u) {
|
|
467
467
|
var p = t[l - 1][1], _ = t[l][1], v = this.diff_commonOverlap_(p, _), m = this.diff_commonOverlap_(_, p);
|
|
@@ -479,8 +479,8 @@ var sn = { exports: {} };
|
|
|
479
479
|
function r(m, E) {
|
|
480
480
|
if (!m || !E)
|
|
481
481
|
return 6;
|
|
482
|
-
var
|
|
483
|
-
return B || H ? 5 : L || $ ? 4 :
|
|
482
|
+
var y = m.charAt(m.length - 1), M = E.charAt(0), T = y.match(e.nonAlphaNumericRegex_), N = M.match(e.nonAlphaNumericRegex_), R = T && y.match(e.whitespaceRegex_), C = N && M.match(e.whitespaceRegex_), L = R && y.match(e.linebreakRegex_), $ = C && M.match(e.linebreakRegex_), B = L && m.match(e.blanklineEndRegex_), H = $ && E.match(e.blanklineStartRegex_);
|
|
483
|
+
return B || H ? 5 : L || $ ? 4 : T && !R && C ? 3 : R || C ? 2 : T || N ? 1 : 0;
|
|
484
484
|
}
|
|
485
485
|
for (var i = 1; i < t.length - 1; ) {
|
|
486
486
|
if (t[i - 1][0] == h && t[i + 1][0] == h) {
|
|
@@ -489,22 +489,22 @@ var sn = { exports: {} };
|
|
|
489
489
|
var f = o.substring(o.length - c);
|
|
490
490
|
a = a.substring(0, a.length - c), o = f + o.substring(0, o.length - c), l = f + l;
|
|
491
491
|
}
|
|
492
|
-
for (var
|
|
492
|
+
for (var d = a, g = o, p = l, _ = r(a, o) + r(o, l); o.charAt(0) === l.charAt(0); ) {
|
|
493
493
|
a += o.charAt(0), o = o.substring(1) + l.charAt(0), l = l.substring(1);
|
|
494
494
|
var v = r(a, o) + r(o, l);
|
|
495
|
-
v >= _ && (_ = v,
|
|
495
|
+
v >= _ && (_ = v, d = a, g = o, p = l);
|
|
496
496
|
}
|
|
497
|
-
t[i - 1][1] !=
|
|
497
|
+
t[i - 1][1] != d && (d ? t[i - 1][1] = d : (t.splice(i - 1, 1), i--), t[i][1] = g, p ? t[i + 1][1] = p : (t.splice(i + 1, 1), i--));
|
|
498
498
|
}
|
|
499
499
|
i++;
|
|
500
500
|
}
|
|
501
501
|
}, e.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, e.whitespaceRegex_ = /\s/, e.linebreakRegex_ = /[\r\n]/, e.blanklineEndRegex_ = /\n\r?\n$/, e.blanklineStartRegex_ = /^\r?\n\r?\n/, e.prototype.diff_cleanupEfficiency = function(t) {
|
|
502
|
-
for (var r = !1, i = [], a = 0, o = null, l = 0, c = !1, f = !1,
|
|
503
|
-
t[l][0] == h ? (t[l][1].length < this.Diff_EditCost && (
|
|
502
|
+
for (var r = !1, i = [], a = 0, o = null, l = 0, c = !1, f = !1, d = !1, g = !1; l < t.length; )
|
|
503
|
+
t[l][0] == h ? (t[l][1].length < this.Diff_EditCost && (d || g) ? (i[a++] = l, c = d, f = g, o = t[l][1]) : (a = 0, o = null), d = g = !1) : (t[l][0] == s ? g = !0 : d = !0, o && (c && f && d && g || o.length < this.Diff_EditCost / 2 && c + f + d + g == 3) && (t.splice(
|
|
504
504
|
i[a - 1],
|
|
505
505
|
0,
|
|
506
506
|
new e.Diff(s, o)
|
|
507
|
-
), t[i[a - 1] + 1][0] = u, a--, o = null, c && f ? (
|
|
507
|
+
), t[i[a - 1] + 1][0] = u, a--, o = null, c && f ? (d = g = !0, a = 0) : (a--, l = a > 0 ? i[a - 1] : -1, d = g = !1), r = !0)), l++;
|
|
508
508
|
r && this.diff_cleanupMerge(t);
|
|
509
509
|
}, e.prototype.diff_cleanupMerge = function(t) {
|
|
510
510
|
t.push(new e.Diff(h, ""));
|
|
@@ -543,16 +543,16 @@ var sn = { exports: {} };
|
|
|
543
543
|
return t.length != c && t[c][0] === s ? l : l + (r - o);
|
|
544
544
|
}, e.prototype.diff_prettyHtml = function(t) {
|
|
545
545
|
for (var r = [], i = /&/g, a = /</g, o = />/g, l = /\n/g, c = 0; c < t.length; c++) {
|
|
546
|
-
var f = t[c][0],
|
|
546
|
+
var f = t[c][0], d = t[c][1], g = d.replace(i, "&").replace(a, "<").replace(o, ">").replace(l, "¶<br>");
|
|
547
547
|
switch (f) {
|
|
548
548
|
case u:
|
|
549
|
-
r[c] = '<ins style="background:#e6ffe6;">' +
|
|
549
|
+
r[c] = '<ins style="background:#e6ffe6;">' + g + "</ins>";
|
|
550
550
|
break;
|
|
551
551
|
case s:
|
|
552
|
-
r[c] = '<del style="background:#ffe6e6;">' +
|
|
552
|
+
r[c] = '<del style="background:#ffe6e6;">' + g + "</del>";
|
|
553
553
|
break;
|
|
554
554
|
case h:
|
|
555
|
-
r[c] = "<span>" +
|
|
555
|
+
r[c] = "<span>" + g + "</span>";
|
|
556
556
|
break;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
@@ -608,11 +608,11 @@ var sn = { exports: {} };
|
|
|
608
608
|
break;
|
|
609
609
|
case "-":
|
|
610
610
|
case "=":
|
|
611
|
-
var
|
|
612
|
-
if (isNaN(
|
|
611
|
+
var d = parseInt(f, 10);
|
|
612
|
+
if (isNaN(d) || d < 0)
|
|
613
613
|
throw new Error("Invalid number in diff_fromDelta: " + f);
|
|
614
|
-
var
|
|
615
|
-
l[c].charAt(0) == "=" ? i[a++] = new e.Diff(h,
|
|
614
|
+
var g = t.substring(o, o += d);
|
|
615
|
+
l[c].charAt(0) == "=" ? i[a++] = new e.Diff(h, g) : i[a++] = new e.Diff(s, g);
|
|
616
616
|
break;
|
|
617
617
|
default:
|
|
618
618
|
if (l[c])
|
|
@@ -636,20 +636,20 @@ var sn = { exports: {} };
|
|
|
636
636
|
}
|
|
637
637
|
var c = this.Match_Threshold, f = t.indexOf(r, i);
|
|
638
638
|
f != -1 && (c = Math.min(l(0, f), c), f = t.lastIndexOf(r, i + r.length), f != -1 && (c = Math.min(l(0, f), c)));
|
|
639
|
-
var
|
|
639
|
+
var d = 1 << r.length - 1;
|
|
640
640
|
f = -1;
|
|
641
|
-
for (var
|
|
642
|
-
for (
|
|
643
|
-
l(m, i + p) <= c ?
|
|
641
|
+
for (var g, p, _ = r.length + t.length, v, m = 0; m < r.length; m++) {
|
|
642
|
+
for (g = 0, p = _; g < p; )
|
|
643
|
+
l(m, i + p) <= c ? g = p : _ = p, p = Math.floor((_ - g) / 2 + g);
|
|
644
644
|
_ = p;
|
|
645
|
-
var E = Math.max(1, i - p + 1),
|
|
646
|
-
|
|
647
|
-
for (var
|
|
648
|
-
var N = a[t.charAt(
|
|
649
|
-
if (m === 0 ? T
|
|
650
|
-
var R = l(m,
|
|
645
|
+
var E = Math.max(1, i - p + 1), y = Math.min(i + p, t.length) + r.length, M = Array(y + 2);
|
|
646
|
+
M[y + 1] = (1 << m) - 1;
|
|
647
|
+
for (var T = y; T >= E; T--) {
|
|
648
|
+
var N = a[t.charAt(T - 1)];
|
|
649
|
+
if (m === 0 ? M[T] = (M[T + 1] << 1 | 1) & N : M[T] = (M[T + 1] << 1 | 1) & N | ((v[T + 1] | v[T]) << 1 | 1) | v[T + 1], M[T] & d) {
|
|
650
|
+
var R = l(m, T - 1);
|
|
651
651
|
if (R <= c)
|
|
652
|
-
if (c = R, f =
|
|
652
|
+
if (c = R, f = T - 1, f > i)
|
|
653
653
|
E = Math.max(1, 2 * i - f);
|
|
654
654
|
else
|
|
655
655
|
break;
|
|
@@ -657,7 +657,7 @@ var sn = { exports: {} };
|
|
|
657
657
|
}
|
|
658
658
|
if (l(m + 1, i) > c)
|
|
659
659
|
break;
|
|
660
|
-
v =
|
|
660
|
+
v = M;
|
|
661
661
|
}
|
|
662
662
|
return f;
|
|
663
663
|
}, e.prototype.match_alphabet_ = function(t) {
|
|
@@ -709,20 +709,20 @@ var sn = { exports: {} };
|
|
|
709
709
|
throw new Error("Unknown call format to patch_make.");
|
|
710
710
|
if (o.length === 0)
|
|
711
711
|
return [];
|
|
712
|
-
for (var l = [], c = new e.patch_obj(), f = 0,
|
|
712
|
+
for (var l = [], c = new e.patch_obj(), f = 0, d = 0, g = 0, p = a, _ = a, v = 0; v < o.length; v++) {
|
|
713
713
|
var m = o[v][0], E = o[v][1];
|
|
714
|
-
switch (!f && m !== h && (c.start1 =
|
|
714
|
+
switch (!f && m !== h && (c.start1 = d, c.start2 = g), m) {
|
|
715
715
|
case u:
|
|
716
|
-
c.diffs[f++] = o[v], c.length2 += E.length, _ = _.substring(0,
|
|
716
|
+
c.diffs[f++] = o[v], c.length2 += E.length, _ = _.substring(0, g) + E + _.substring(g);
|
|
717
717
|
break;
|
|
718
718
|
case s:
|
|
719
|
-
c.length1 += E.length, c.diffs[f++] = o[v], _ = _.substring(0,
|
|
719
|
+
c.length1 += E.length, c.diffs[f++] = o[v], _ = _.substring(0, g) + _.substring(g + E.length);
|
|
720
720
|
break;
|
|
721
721
|
case h:
|
|
722
|
-
E.length <= 2 * this.Patch_Margin && f && o.length != v + 1 ? (c.diffs[f++] = o[v], c.length1 += E.length, c.length2 += E.length) : E.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, p), l.push(c), c = new e.patch_obj(), f = 0, p = _,
|
|
722
|
+
E.length <= 2 * this.Patch_Margin && f && o.length != v + 1 ? (c.diffs[f++] = o[v], c.length1 += E.length, c.length2 += E.length) : E.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, p), l.push(c), c = new e.patch_obj(), f = 0, p = _, d = g);
|
|
723
723
|
break;
|
|
724
724
|
}
|
|
725
|
-
m !== u && (
|
|
725
|
+
m !== u && (d += E.length), m !== s && (g += E.length);
|
|
726
726
|
}
|
|
727
727
|
return f && (this.patch_addContext_(c, p), l.push(c)), l;
|
|
728
728
|
}, e.prototype.patch_deepCopy = function(t) {
|
|
@@ -741,22 +741,22 @@ var sn = { exports: {} };
|
|
|
741
741
|
var i = this.patch_addPadding(t);
|
|
742
742
|
r = i + r + i, this.patch_splitMax(t);
|
|
743
743
|
for (var a = 0, o = [], l = 0; l < t.length; l++) {
|
|
744
|
-
var c = t[l].start2 + a, f = this.diff_text1(t[l].diffs),
|
|
745
|
-
if (f.length > this.Match_MaxBits ? (
|
|
744
|
+
var c = t[l].start2 + a, f = this.diff_text1(t[l].diffs), d, g = -1;
|
|
745
|
+
if (f.length > this.Match_MaxBits ? (d = this.match_main(
|
|
746
746
|
r,
|
|
747
747
|
f.substring(0, this.Match_MaxBits),
|
|
748
748
|
c
|
|
749
|
-
),
|
|
749
|
+
), d != -1 && (g = this.match_main(
|
|
750
750
|
r,
|
|
751
751
|
f.substring(f.length - this.Match_MaxBits),
|
|
752
752
|
c + f.length - this.Match_MaxBits
|
|
753
|
-
), (
|
|
753
|
+
), (g == -1 || d >= g) && (d = -1))) : d = this.match_main(r, f, c), d == -1)
|
|
754
754
|
o[l] = !1, a -= t[l].length2 - t[l].length1;
|
|
755
755
|
else {
|
|
756
|
-
o[l] = !0, a =
|
|
756
|
+
o[l] = !0, a = d - c;
|
|
757
757
|
var p;
|
|
758
|
-
if (
|
|
759
|
-
r = r.substring(0,
|
|
758
|
+
if (g == -1 ? p = r.substring(d, d + f.length) : p = r.substring(d, g + this.Match_MaxBits), f == p)
|
|
759
|
+
r = r.substring(0, d) + this.diff_text2(t[l].diffs) + r.substring(d + f.length);
|
|
760
760
|
else {
|
|
761
761
|
var _ = this.diff_main(f, p, !1);
|
|
762
762
|
if (f.length > this.Match_MaxBits && this.diff_levenshtein(_) / f.length > this.Patch_DeleteThreshold)
|
|
@@ -764,11 +764,11 @@ var sn = { exports: {} };
|
|
|
764
764
|
else {
|
|
765
765
|
this.diff_cleanupSemanticLossless(_);
|
|
766
766
|
for (var v = 0, m, E = 0; E < t[l].diffs.length; E++) {
|
|
767
|
-
var
|
|
768
|
-
|
|
767
|
+
var y = t[l].diffs[E];
|
|
768
|
+
y[0] !== h && (m = this.diff_xIndex(_, v)), y[0] === u ? r = r.substring(0, d + m) + y[1] + r.substring(d + m) : y[0] === s && (r = r.substring(0, d + m) + r.substring(d + this.diff_xIndex(
|
|
769
769
|
_,
|
|
770
|
-
v +
|
|
771
|
-
))),
|
|
770
|
+
v + y[1].length
|
|
771
|
+
))), y[0] !== s && (v += y[1].length);
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
}
|
|
@@ -800,17 +800,17 @@ var sn = { exports: {} };
|
|
|
800
800
|
var a = t[i];
|
|
801
801
|
t.splice(i--, 1);
|
|
802
802
|
for (var o = a.start1, l = a.start2, c = ""; a.diffs.length !== 0; ) {
|
|
803
|
-
var f = new e.patch_obj(),
|
|
803
|
+
var f = new e.patch_obj(), d = !0;
|
|
804
804
|
for (f.start1 = o - c.length, f.start2 = l - c.length, c !== "" && (f.length1 = f.length2 = c.length, f.diffs.push(new e.Diff(h, c))); a.diffs.length !== 0 && f.length1 < r - this.Patch_Margin; ) {
|
|
805
|
-
var
|
|
806
|
-
|
|
805
|
+
var g = a.diffs[0][0], p = a.diffs[0][1];
|
|
806
|
+
g === u ? (f.length2 += p.length, l += p.length, f.diffs.push(a.diffs.shift()), d = !1) : g === s && f.diffs.length == 1 && f.diffs[0][0] == h && p.length > 2 * r ? (f.length1 += p.length, o += p.length, d = !1, f.diffs.push(new e.Diff(g, p)), a.diffs.shift()) : (p = p.substring(
|
|
807
807
|
0,
|
|
808
808
|
r - f.length1 - this.Patch_Margin
|
|
809
|
-
), f.length1 += p.length, o += p.length,
|
|
809
|
+
), f.length1 += p.length, o += p.length, g === h ? (f.length2 += p.length, l += p.length) : d = !1, f.diffs.push(new e.Diff(g, p)), p == a.diffs[0][1] ? a.diffs.shift() : a.diffs[0][1] = a.diffs[0][1].substring(p.length));
|
|
810
810
|
}
|
|
811
811
|
c = this.diff_text2(f.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
812
812
|
var _ = this.diff_text1(a.diffs).substring(0, this.Patch_Margin);
|
|
813
|
-
_ !== "" && (f.length1 += _.length, f.length2 += _.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] === h ? f.diffs[f.diffs.length - 1][1] += _ : f.diffs.push(new e.Diff(h, _))),
|
|
813
|
+
_ !== "" && (f.length1 += _.length, f.length2 += _.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] === h ? f.diffs[f.diffs.length - 1][1] += _ : f.diffs.push(new e.Diff(h, _))), d || t.splice(++i, 0, f);
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
}, e.prototype.patch_toText = function(t) {
|
|
@@ -830,20 +830,20 @@ var sn = { exports: {} };
|
|
|
830
830
|
for (r.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; ) {
|
|
831
831
|
var f = i[a].charAt(0);
|
|
832
832
|
try {
|
|
833
|
-
var
|
|
834
|
-
} catch (
|
|
835
|
-
throw new Error("Illegal escape in patch_fromText: " +
|
|
833
|
+
var d = decodeURI(i[a].substring(1));
|
|
834
|
+
} catch (g) {
|
|
835
|
+
throw new Error("Illegal escape in patch_fromText: " + d);
|
|
836
836
|
}
|
|
837
837
|
if (f == "-")
|
|
838
|
-
c.diffs.push(new e.Diff(s,
|
|
838
|
+
c.diffs.push(new e.Diff(s, d));
|
|
839
839
|
else if (f == "+")
|
|
840
|
-
c.diffs.push(new e.Diff(u,
|
|
840
|
+
c.diffs.push(new e.Diff(u, d));
|
|
841
841
|
else if (f == " ")
|
|
842
|
-
c.diffs.push(new e.Diff(h,
|
|
842
|
+
c.diffs.push(new e.Diff(h, d));
|
|
843
843
|
else {
|
|
844
844
|
if (f == "@")
|
|
845
845
|
break;
|
|
846
|
-
if (f !== "") throw new Error('Invalid patch mode "' + f + '" in: ' +
|
|
846
|
+
if (f !== "") throw new Error('Invalid patch mode "' + f + '" in: ' + d);
|
|
847
847
|
}
|
|
848
848
|
a++;
|
|
849
849
|
}
|
|
@@ -872,16 +872,16 @@ var sn = { exports: {} };
|
|
|
872
872
|
}
|
|
873
873
|
return i.join("").replace(/%20/g, " ");
|
|
874
874
|
}, n.exports = e, n.exports.diff_match_patch = e, n.exports.DIFF_DELETE = s, n.exports.DIFF_INSERT = u, n.exports.DIFF_EQUAL = h;
|
|
875
|
-
})(
|
|
876
|
-
var
|
|
877
|
-
function
|
|
875
|
+
})(on);
|
|
876
|
+
var Oe = on.exports;
|
|
877
|
+
function ln(n) {
|
|
878
878
|
return n instanceof Map ? n.clear = n.delete = n.set = function() {
|
|
879
879
|
throw new Error("map is read-only");
|
|
880
880
|
} : n instanceof Set && (n.add = n.clear = n.delete = function() {
|
|
881
881
|
throw new Error("set is read-only");
|
|
882
882
|
}), Object.freeze(n), Object.getOwnPropertyNames(n).forEach((e) => {
|
|
883
883
|
const s = n[e], u = typeof s;
|
|
884
|
-
(u === "object" || u === "function") && !Object.isFrozen(s) &&
|
|
884
|
+
(u === "object" || u === "function") && !Object.isFrozen(s) && ln(s);
|
|
885
885
|
}), n;
|
|
886
886
|
}
|
|
887
887
|
class Ye {
|
|
@@ -895,7 +895,7 @@ class Ye {
|
|
|
895
895
|
this.isMatchIgnored = !0;
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function cn(n) {
|
|
899
899
|
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
900
900
|
}
|
|
901
901
|
function re(n, ...e) {
|
|
@@ -908,7 +908,7 @@ function re(n, ...e) {
|
|
|
908
908
|
}), /** @type {T} */
|
|
909
909
|
s;
|
|
910
910
|
}
|
|
911
|
-
const
|
|
911
|
+
const Wn = "</span>", Ve = (n) => !!n.scope, Qn = (n, { prefix: e }) => {
|
|
912
912
|
if (n.startsWith("language:"))
|
|
913
913
|
return n.replace("language:", "language-");
|
|
914
914
|
if (n.includes(".")) {
|
|
@@ -920,7 +920,7 @@ const Gn = "</span>", Ve = (n) => !!n.scope, Kn = (n, { prefix: e }) => {
|
|
|
920
920
|
}
|
|
921
921
|
return `${e}${n}`;
|
|
922
922
|
};
|
|
923
|
-
class
|
|
923
|
+
class Zn {
|
|
924
924
|
/**
|
|
925
925
|
* Creates a new HTMLRenderer
|
|
926
926
|
*
|
|
@@ -935,7 +935,7 @@ class Wn {
|
|
|
935
935
|
*
|
|
936
936
|
* @param {string} text */
|
|
937
937
|
addText(e) {
|
|
938
|
-
this.buffer +=
|
|
938
|
+
this.buffer += cn(e);
|
|
939
939
|
}
|
|
940
940
|
/**
|
|
941
941
|
* Adds a node open to the output stream (if needed)
|
|
@@ -943,7 +943,7 @@ class Wn {
|
|
|
943
943
|
* @param {Node} node */
|
|
944
944
|
openNode(e) {
|
|
945
945
|
if (!Ve(e)) return;
|
|
946
|
-
const s =
|
|
946
|
+
const s = Qn(
|
|
947
947
|
e.scope,
|
|
948
948
|
{ prefix: this.classPrefix }
|
|
949
949
|
);
|
|
@@ -954,7 +954,7 @@ class Wn {
|
|
|
954
954
|
*
|
|
955
955
|
* @param {Node} node */
|
|
956
956
|
closeNode(e) {
|
|
957
|
-
Ve(e) && (this.buffer +=
|
|
957
|
+
Ve(e) && (this.buffer += Wn);
|
|
958
958
|
}
|
|
959
959
|
/**
|
|
960
960
|
* returns the accumulated buffer
|
|
@@ -975,7 +975,7 @@ const Xe = (n = {}) => {
|
|
|
975
975
|
const e = { children: [] };
|
|
976
976
|
return Object.assign(e, n), e;
|
|
977
977
|
};
|
|
978
|
-
class
|
|
978
|
+
class Pe {
|
|
979
979
|
constructor() {
|
|
980
980
|
this.rootNode = Xe(), this.stack = [this.rootNode];
|
|
981
981
|
}
|
|
@@ -1023,11 +1023,11 @@ class $e {
|
|
|
1023
1023
|
*/
|
|
1024
1024
|
static _collapse(e) {
|
|
1025
1025
|
typeof e != "string" && e.children && (e.children.every((s) => typeof s == "string") ? e.children = [e.children.join("")] : e.children.forEach((s) => {
|
|
1026
|
-
|
|
1026
|
+
Pe._collapse(s);
|
|
1027
1027
|
}));
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
class
|
|
1030
|
+
class Yn extends Pe {
|
|
1031
1031
|
/**
|
|
1032
1032
|
* @param {*} options
|
|
1033
1033
|
*/
|
|
@@ -1056,7 +1056,7 @@ class Qn extends $e {
|
|
|
1056
1056
|
s && (u.scope = `language:${s}`), this.add(u);
|
|
1057
1057
|
}
|
|
1058
1058
|
toHTML() {
|
|
1059
|
-
return new
|
|
1059
|
+
return new Zn(this, this.options).value();
|
|
1060
1060
|
}
|
|
1061
1061
|
finalize() {
|
|
1062
1062
|
return this.closeAllNodes(), !0;
|
|
@@ -1065,41 +1065,41 @@ class Qn extends $e {
|
|
|
1065
1065
|
function _e(n) {
|
|
1066
1066
|
return n ? typeof n == "string" ? n : n.source : null;
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function un(n) {
|
|
1069
1069
|
return oe("(?=", n, ")");
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function Vn(n) {
|
|
1072
1072
|
return oe("(?:", n, ")*");
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function Xn(n) {
|
|
1075
1075
|
return oe("(?:", n, ")?");
|
|
1076
1076
|
}
|
|
1077
1077
|
function oe(...n) {
|
|
1078
1078
|
return n.map((s) => _e(s)).join("");
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function jn(n) {
|
|
1081
1081
|
const e = n[n.length - 1];
|
|
1082
1082
|
return typeof e == "object" && e.constructor === Object ? (n.splice(n.length - 1, 1), e) : {};
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1085
|
-
return "(" + (
|
|
1084
|
+
function Ue(...n) {
|
|
1085
|
+
return "(" + (jn(n).capture ? "" : "?:") + n.map((u) => _e(u)).join("|") + ")";
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function fn(n) {
|
|
1088
1088
|
return new RegExp(n.toString() + "|").exec("").length - 1;
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function qn(n, e) {
|
|
1091
1091
|
const s = n && n.exec(e);
|
|
1092
1092
|
return s && s.index === 0;
|
|
1093
1093
|
}
|
|
1094
|
-
const
|
|
1095
|
-
function
|
|
1094
|
+
const Jn = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1095
|
+
function xe(n, { joinWith: e }) {
|
|
1096
1096
|
let s = 0;
|
|
1097
1097
|
return n.map((u) => {
|
|
1098
1098
|
s += 1;
|
|
1099
1099
|
const h = s;
|
|
1100
1100
|
let t = _e(u), r = "";
|
|
1101
1101
|
for (; t.length > 0; ) {
|
|
1102
|
-
const i =
|
|
1102
|
+
const i = Jn.exec(t);
|
|
1103
1103
|
if (!i) {
|
|
1104
1104
|
r += t;
|
|
1105
1105
|
break;
|
|
@@ -1109,7 +1109,7 @@ function Ue(n, { joinWith: e }) {
|
|
|
1109
1109
|
return r;
|
|
1110
1110
|
}).map((u) => `(${u})`).join(e);
|
|
1111
1111
|
}
|
|
1112
|
-
const
|
|
1112
|
+
const et = /\b\B/, gn = "[a-zA-Z]\\w*", Fe = "[a-zA-Z_]\\w*", hn = "\\b\\d+(\\.\\d+)?", dn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", pn = "\\b(0b[01]+)", nt = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", tt = (n = {}) => {
|
|
1113
1113
|
const e = /^#![ ]*\//;
|
|
1114
1114
|
return n.binary && (n.begin = oe(
|
|
1115
1115
|
e,
|
|
@@ -1129,19 +1129,19 @@ const qn = /\b\B/, un = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", fn = "\\b\\d+(\\.\
|
|
|
1129
1129
|
}, be = {
|
|
1130
1130
|
begin: "\\\\[\\s\\S]",
|
|
1131
1131
|
relevance: 0
|
|
1132
|
-
},
|
|
1132
|
+
}, rt = {
|
|
1133
1133
|
scope: "string",
|
|
1134
1134
|
begin: "'",
|
|
1135
1135
|
end: "'",
|
|
1136
1136
|
illegal: "\\n",
|
|
1137
1137
|
contains: [be]
|
|
1138
|
-
},
|
|
1138
|
+
}, it = {
|
|
1139
1139
|
scope: "string",
|
|
1140
1140
|
begin: '"',
|
|
1141
1141
|
end: '"',
|
|
1142
1142
|
illegal: "\\n",
|
|
1143
1143
|
contains: [be]
|
|
1144
|
-
},
|
|
1144
|
+
}, st = {
|
|
1145
1145
|
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/
|
|
1146
1146
|
}, De = function(n, e, s = {}) {
|
|
1147
1147
|
const u = re(
|
|
@@ -1162,7 +1162,7 @@ const qn = /\b\B/, un = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", fn = "\\b\\d+(\\.\
|
|
|
1162
1162
|
excludeBegin: !0,
|
|
1163
1163
|
relevance: 0
|
|
1164
1164
|
});
|
|
1165
|
-
const h =
|
|
1165
|
+
const h = Ue(
|
|
1166
1166
|
// list of common 1 and 2 letter words in English
|
|
1167
1167
|
"I",
|
|
1168
1168
|
"a",
|
|
@@ -1209,19 +1209,19 @@ const qn = /\b\B/, un = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", fn = "\\b\\d+(\\.\
|
|
|
1209
1209
|
// look for 3 words in a row
|
|
1210
1210
|
}
|
|
1211
1211
|
), u;
|
|
1212
|
-
},
|
|
1212
|
+
}, at = De("//", "$"), ot = De("/\\*", "\\*/"), lt = De("#", "$"), ct = {
|
|
1213
1213
|
scope: "number",
|
|
1214
|
-
begin:
|
|
1214
|
+
begin: hn,
|
|
1215
1215
|
relevance: 0
|
|
1216
|
-
},
|
|
1216
|
+
}, ut = {
|
|
1217
1217
|
scope: "number",
|
|
1218
|
-
begin:
|
|
1218
|
+
begin: dn,
|
|
1219
1219
|
relevance: 0
|
|
1220
|
-
},
|
|
1220
|
+
}, ft = {
|
|
1221
1221
|
scope: "number",
|
|
1222
|
-
begin:
|
|
1222
|
+
begin: pn,
|
|
1223
1223
|
relevance: 0
|
|
1224
|
-
},
|
|
1224
|
+
}, gt = {
|
|
1225
1225
|
scope: "regexp",
|
|
1226
1226
|
begin: /\/(?=[^/\n]*\/)/,
|
|
1227
1227
|
end: /\/[gimuy]*/,
|
|
@@ -1234,19 +1234,19 @@ const qn = /\b\B/, un = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", fn = "\\b\\d+(\\.\
|
|
|
1234
1234
|
contains: [be]
|
|
1235
1235
|
}
|
|
1236
1236
|
]
|
|
1237
|
-
},
|
|
1237
|
+
}, ht = {
|
|
1238
1238
|
scope: "title",
|
|
1239
|
-
begin:
|
|
1239
|
+
begin: gn,
|
|
1240
1240
|
relevance: 0
|
|
1241
|
-
},
|
|
1241
|
+
}, dt = {
|
|
1242
1242
|
scope: "title",
|
|
1243
|
-
begin:
|
|
1243
|
+
begin: Fe,
|
|
1244
1244
|
relevance: 0
|
|
1245
|
-
},
|
|
1245
|
+
}, pt = {
|
|
1246
1246
|
// excludes method names from keyword processing
|
|
1247
|
-
begin: "\\.\\s*" +
|
|
1247
|
+
begin: "\\.\\s*" + Fe,
|
|
1248
1248
|
relevance: 0
|
|
1249
|
-
},
|
|
1249
|
+
}, _t = function(n) {
|
|
1250
1250
|
return Object.assign(
|
|
1251
1251
|
n,
|
|
1252
1252
|
{
|
|
@@ -1261,67 +1261,67 @@ const qn = /\b\B/, un = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", fn = "\\b\\d+(\\.\
|
|
|
1261
1261
|
}
|
|
1262
1262
|
);
|
|
1263
1263
|
};
|
|
1264
|
-
var
|
|
1264
|
+
var ye = /* @__PURE__ */ Object.freeze({
|
|
1265
1265
|
__proto__: null,
|
|
1266
|
-
APOS_STRING_MODE:
|
|
1266
|
+
APOS_STRING_MODE: rt,
|
|
1267
1267
|
BACKSLASH_ESCAPE: be,
|
|
1268
|
-
BINARY_NUMBER_MODE:
|
|
1269
|
-
BINARY_NUMBER_RE:
|
|
1268
|
+
BINARY_NUMBER_MODE: ft,
|
|
1269
|
+
BINARY_NUMBER_RE: pn,
|
|
1270
1270
|
COMMENT: De,
|
|
1271
|
-
C_BLOCK_COMMENT_MODE:
|
|
1272
|
-
C_LINE_COMMENT_MODE:
|
|
1273
|
-
C_NUMBER_MODE:
|
|
1274
|
-
C_NUMBER_RE:
|
|
1275
|
-
END_SAME_AS_BEGIN:
|
|
1276
|
-
HASH_COMMENT_MODE:
|
|
1277
|
-
IDENT_RE:
|
|
1278
|
-
MATCH_NOTHING_RE:
|
|
1279
|
-
METHOD_GUARD:
|
|
1280
|
-
NUMBER_MODE:
|
|
1281
|
-
NUMBER_RE:
|
|
1282
|
-
PHRASAL_WORDS_MODE:
|
|
1283
|
-
QUOTE_STRING_MODE:
|
|
1284
|
-
REGEXP_MODE:
|
|
1285
|
-
RE_STARTERS_RE:
|
|
1286
|
-
SHEBANG:
|
|
1287
|
-
TITLE_MODE:
|
|
1288
|
-
UNDERSCORE_IDENT_RE:
|
|
1289
|
-
UNDERSCORE_TITLE_MODE:
|
|
1271
|
+
C_BLOCK_COMMENT_MODE: ot,
|
|
1272
|
+
C_LINE_COMMENT_MODE: at,
|
|
1273
|
+
C_NUMBER_MODE: ut,
|
|
1274
|
+
C_NUMBER_RE: dn,
|
|
1275
|
+
END_SAME_AS_BEGIN: _t,
|
|
1276
|
+
HASH_COMMENT_MODE: lt,
|
|
1277
|
+
IDENT_RE: gn,
|
|
1278
|
+
MATCH_NOTHING_RE: et,
|
|
1279
|
+
METHOD_GUARD: pt,
|
|
1280
|
+
NUMBER_MODE: ct,
|
|
1281
|
+
NUMBER_RE: hn,
|
|
1282
|
+
PHRASAL_WORDS_MODE: st,
|
|
1283
|
+
QUOTE_STRING_MODE: it,
|
|
1284
|
+
REGEXP_MODE: gt,
|
|
1285
|
+
RE_STARTERS_RE: nt,
|
|
1286
|
+
SHEBANG: tt,
|
|
1287
|
+
TITLE_MODE: ht,
|
|
1288
|
+
UNDERSCORE_IDENT_RE: Fe,
|
|
1289
|
+
UNDERSCORE_TITLE_MODE: dt
|
|
1290
1290
|
});
|
|
1291
|
-
function
|
|
1291
|
+
function bt(n, e) {
|
|
1292
1292
|
n.input[n.index - 1] === "." && e.ignoreMatch();
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function vt(n, e) {
|
|
1295
1295
|
n.className !== void 0 && (n.scope = n.className, delete n.className);
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1298
|
-
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin =
|
|
1297
|
+
function mt(n, e) {
|
|
1298
|
+
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin = bt, n.keywords = n.keywords || n.beginKeywords, delete n.beginKeywords, n.relevance === void 0 && (n.relevance = 0));
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
Array.isArray(n.illegal) && (n.illegal =
|
|
1300
|
+
function Et(n, e) {
|
|
1301
|
+
Array.isArray(n.illegal) && (n.illegal = Ue(...n.illegal));
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function yt(n, e) {
|
|
1304
1304
|
if (n.match) {
|
|
1305
1305
|
if (n.begin || n.end) throw new Error("begin & end are not supported with match");
|
|
1306
1306
|
n.begin = n.match, delete n.match;
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function wt(n, e) {
|
|
1310
1310
|
n.relevance === void 0 && (n.relevance = 1);
|
|
1311
1311
|
}
|
|
1312
|
-
const
|
|
1312
|
+
const At = (n, e) => {
|
|
1313
1313
|
if (!n.beforeMatch) return;
|
|
1314
1314
|
if (n.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
1315
1315
|
const s = Object.assign({}, n);
|
|
1316
1316
|
Object.keys(n).forEach((u) => {
|
|
1317
1317
|
delete n[u];
|
|
1318
|
-
}), n.keywords = s.keywords, n.begin = oe(s.beforeMatch,
|
|
1318
|
+
}), n.keywords = s.keywords, n.begin = oe(s.beforeMatch, un(s.begin)), n.starts = {
|
|
1319
1319
|
relevance: 0,
|
|
1320
1320
|
contains: [
|
|
1321
1321
|
Object.assign(s, { endsParent: !0 })
|
|
1322
1322
|
]
|
|
1323
1323
|
}, n.relevance = 0, delete s.beforeMatch;
|
|
1324
|
-
},
|
|
1324
|
+
}, Nt = [
|
|
1325
1325
|
"of",
|
|
1326
1326
|
"and",
|
|
1327
1327
|
"for",
|
|
@@ -1336,27 +1336,27 @@ const wt = (n, e) => {
|
|
|
1336
1336
|
// common variable name
|
|
1337
1337
|
"value"
|
|
1338
1338
|
// common variable name
|
|
1339
|
-
],
|
|
1340
|
-
function
|
|
1339
|
+
], Tt = "keyword";
|
|
1340
|
+
function _n(n, e, s = Tt) {
|
|
1341
1341
|
const u = /* @__PURE__ */ Object.create(null);
|
|
1342
1342
|
return typeof n == "string" ? h(s, n.split(" ")) : Array.isArray(n) ? h(s, n) : Object.keys(n).forEach(function(t) {
|
|
1343
1343
|
Object.assign(
|
|
1344
1344
|
u,
|
|
1345
|
-
|
|
1345
|
+
_n(n[t], e, t)
|
|
1346
1346
|
);
|
|
1347
1347
|
}), u;
|
|
1348
1348
|
function h(t, r) {
|
|
1349
1349
|
e && (r = r.map((i) => i.toLowerCase())), r.forEach(function(i) {
|
|
1350
1350
|
const a = i.split("|");
|
|
1351
|
-
u[a[0]] = [t,
|
|
1351
|
+
u[a[0]] = [t, Mt(a[0], a[1])];
|
|
1352
1352
|
});
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return e ? Number(e) :
|
|
1355
|
+
function Mt(n, e) {
|
|
1356
|
+
return e ? Number(e) : Dt(n) ? 0 : 1;
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
return
|
|
1358
|
+
function Dt(n) {
|
|
1359
|
+
return Nt.includes(n.toLowerCase());
|
|
1360
1360
|
}
|
|
1361
1361
|
const je = {}, ae = (n) => {
|
|
1362
1362
|
console.error(n);
|
|
@@ -1364,39 +1364,39 @@ const je = {}, ae = (n) => {
|
|
|
1364
1364
|
console.log(`WARN: ${n}`, ...e);
|
|
1365
1365
|
}, ce = (n, e) => {
|
|
1366
1366
|
je[`${n}/${e}`] || (console.log(`Deprecated as of ${n}. ${e}`), je[`${n}/${e}`] = !0);
|
|
1367
|
-
},
|
|
1368
|
-
function
|
|
1367
|
+
}, Te = new Error();
|
|
1368
|
+
function bn(n, e, { key: s }) {
|
|
1369
1369
|
let u = 0;
|
|
1370
1370
|
const h = n[s], t = {}, r = {};
|
|
1371
1371
|
for (let i = 1; i <= e.length; i++)
|
|
1372
|
-
r[i + u] = h[i], t[i + u] = !0, u +=
|
|
1372
|
+
r[i + u] = h[i], t[i + u] = !0, u += fn(e[i - 1]);
|
|
1373
1373
|
n[s] = r, n[s]._emit = t, n[s]._multi = !0;
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function St(n) {
|
|
1376
1376
|
if (Array.isArray(n.begin)) {
|
|
1377
1377
|
if (n.skip || n.excludeBegin || n.returnBegin)
|
|
1378
|
-
throw ae("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
|
|
1378
|
+
throw ae("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Te;
|
|
1379
1379
|
if (typeof n.beginScope != "object" || n.beginScope === null)
|
|
1380
|
-
throw ae("beginScope must be object"),
|
|
1381
|
-
|
|
1380
|
+
throw ae("beginScope must be object"), Te;
|
|
1381
|
+
bn(n, n.begin, { key: "beginScope" }), n.begin = xe(n.begin, { joinWith: "" });
|
|
1382
1382
|
}
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function Ct(n) {
|
|
1385
1385
|
if (Array.isArray(n.end)) {
|
|
1386
1386
|
if (n.skip || n.excludeEnd || n.returnEnd)
|
|
1387
|
-
throw ae("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
|
|
1387
|
+
throw ae("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Te;
|
|
1388
1388
|
if (typeof n.endScope != "object" || n.endScope === null)
|
|
1389
|
-
throw ae("endScope must be object"),
|
|
1390
|
-
|
|
1389
|
+
throw ae("endScope must be object"), Te;
|
|
1390
|
+
bn(n, n.end, { key: "endScope" }), n.end = xe(n.end, { joinWith: "" });
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function Rt(n) {
|
|
1394
1394
|
n.scope && typeof n.scope == "object" && n.scope !== null && (n.beginScope = n.scope, delete n.scope);
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1396
|
+
function Lt(n) {
|
|
1397
|
+
Rt(n), typeof n.beginScope == "string" && (n.beginScope = { _wrap: n.beginScope }), typeof n.endScope == "string" && (n.endScope = { _wrap: n.endScope }), St(n), Ct(n);
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function Ot(n) {
|
|
1400
1400
|
function e(r, i) {
|
|
1401
1401
|
return new RegExp(
|
|
1402
1402
|
_e(r),
|
|
@@ -1409,12 +1409,12 @@ function Rt(n) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
// @ts-ignore
|
|
1411
1411
|
addRule(i, a) {
|
|
1412
|
-
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt +=
|
|
1412
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt += fn(i) + 1;
|
|
1413
1413
|
}
|
|
1414
1414
|
compile() {
|
|
1415
1415
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1416
1416
|
const i = this.regexes.map((a) => a[1]);
|
|
1417
|
-
this.matcherRe = e(
|
|
1417
|
+
this.matcherRe = e(xe(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1418
1418
|
}
|
|
1419
1419
|
/** @param {string} s */
|
|
1420
1420
|
exec(i) {
|
|
@@ -1469,26 +1469,26 @@ function Rt(n) {
|
|
|
1469
1469
|
);
|
|
1470
1470
|
if (r.isCompiled) return a;
|
|
1471
1471
|
[
|
|
1472
|
-
|
|
1472
|
+
vt,
|
|
1473
1473
|
// do this early so compiler extensions generally don't have to worry about
|
|
1474
1474
|
// the distinction between match/begin
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1475
|
+
yt,
|
|
1476
|
+
Lt,
|
|
1477
|
+
At
|
|
1478
1478
|
].forEach((l) => l(r, i)), n.compilerExtensions.forEach((l) => l(r, i)), r.__beforeBegin = null, [
|
|
1479
|
-
|
|
1479
|
+
mt,
|
|
1480
1480
|
// do this later so compiler extensions that come earlier have access to the
|
|
1481
1481
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1482
|
-
|
|
1482
|
+
Et,
|
|
1483
1483
|
// default to 1 relevance if not specified
|
|
1484
|
-
|
|
1484
|
+
wt
|
|
1485
1485
|
].forEach((l) => l(r, i)), r.isCompiled = !0;
|
|
1486
1486
|
let o = null;
|
|
1487
|
-
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords =
|
|
1487
|
+
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords = _n(r.keywords, n.case_insensitive)), a.keywordPatternRe = e(o, !0), i && (r.begin || (r.begin = /\B|\b/), a.beginRe = e(a.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (a.endRe = e(a.end)), a.terminatorEnd = _e(a.end) || "", r.endsWithParent && i.terminatorEnd && (a.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (a.illegalRe = e(
|
|
1488
1488
|
/** @type {RegExp | string} */
|
|
1489
1489
|
r.illegal
|
|
1490
1490
|
)), r.contains || (r.contains = []), r.contains = [].concat(...r.contains.map(function(l) {
|
|
1491
|
-
return
|
|
1491
|
+
return It(l === "self" ? r : l);
|
|
1492
1492
|
})), r.contains.forEach(function(l) {
|
|
1493
1493
|
t(
|
|
1494
1494
|
/** @type Mode */
|
|
@@ -1504,21 +1504,21 @@ function Rt(n) {
|
|
|
1504
1504
|
n
|
|
1505
1505
|
);
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return n ? n.endsWithParent ||
|
|
1507
|
+
function vn(n) {
|
|
1508
|
+
return n ? n.endsWithParent || vn(n.starts) : !1;
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function It(n) {
|
|
1511
1511
|
return n.variants && !n.cachedVariants && (n.cachedVariants = n.variants.map(function(e) {
|
|
1512
1512
|
return re(n, { variants: null }, e);
|
|
1513
|
-
})), n.cachedVariants ? n.cachedVariants :
|
|
1513
|
+
})), n.cachedVariants ? n.cachedVariants : vn(n) ? re(n, { starts: n.starts ? re(n.starts) : null }) : Object.isFrozen(n) ? re(n) : n;
|
|
1514
1514
|
}
|
|
1515
|
-
var
|
|
1516
|
-
class
|
|
1515
|
+
var kt = "11.10.0";
|
|
1516
|
+
class Bt extends Error {
|
|
1517
1517
|
constructor(e, s) {
|
|
1518
1518
|
super(e), this.name = "HTMLInjectionError", this.html = s;
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
const
|
|
1521
|
+
const Ie = cn, Je = re, en = Symbol("nomatch"), $t = 7, mn = function(n) {
|
|
1522
1522
|
const e = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null), u = [];
|
|
1523
1523
|
let h = !0;
|
|
1524
1524
|
const t = "Could not find the language '{}', did you forget to load/include a language module?", r = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
@@ -1532,7 +1532,7 @@ const Oe = on, Je = re, en = Symbol("nomatch"), kt = 7, bn = function(n) {
|
|
|
1532
1532
|
languages: null,
|
|
1533
1533
|
// beta configuration options, subject to change, welcome to discuss
|
|
1534
1534
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1535
|
-
__emitter:
|
|
1535
|
+
__emitter: Yn
|
|
1536
1536
|
};
|
|
1537
1537
|
function a(b) {
|
|
1538
1538
|
return i.noHighlightRe.test(b);
|
|
@@ -1561,116 +1561,116 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1561
1561
|
}
|
|
1562
1562
|
function c(b, A, O, P) {
|
|
1563
1563
|
const F = /* @__PURE__ */ Object.create(null);
|
|
1564
|
-
function W(
|
|
1565
|
-
return
|
|
1564
|
+
function W(w, D) {
|
|
1565
|
+
return w.keywords[D];
|
|
1566
1566
|
}
|
|
1567
1567
|
function V() {
|
|
1568
1568
|
if (!I.keywords) {
|
|
1569
1569
|
z.addText(x);
|
|
1570
1570
|
return;
|
|
1571
1571
|
}
|
|
1572
|
-
let
|
|
1572
|
+
let w = 0;
|
|
1573
1573
|
I.keywordPatternRe.lastIndex = 0;
|
|
1574
1574
|
let D = I.keywordPatternRe.exec(x), k = "";
|
|
1575
1575
|
for (; D; ) {
|
|
1576
|
-
k += x.substring(
|
|
1576
|
+
k += x.substring(w, D.index);
|
|
1577
1577
|
const U = j.case_insensitive ? D[0].toLowerCase() : D[0], G = W(I, U);
|
|
1578
1578
|
if (G) {
|
|
1579
|
-
const [q,
|
|
1580
|
-
if (z.addText(k), k = "", F[U] = (F[U] || 0) + 1, F[U] <=
|
|
1579
|
+
const [q, On] = G;
|
|
1580
|
+
if (z.addText(k), k = "", F[U] = (F[U] || 0) + 1, F[U] <= $t && (Ee += On), q.startsWith("_"))
|
|
1581
1581
|
k += D[0];
|
|
1582
1582
|
else {
|
|
1583
|
-
const
|
|
1584
|
-
X(D[0],
|
|
1583
|
+
const In = j.classNameAliases[q] || q;
|
|
1584
|
+
X(D[0], In);
|
|
1585
1585
|
}
|
|
1586
1586
|
} else
|
|
1587
1587
|
k += D[0];
|
|
1588
|
-
|
|
1588
|
+
w = I.keywordPatternRe.lastIndex, D = I.keywordPatternRe.exec(x);
|
|
1589
1589
|
}
|
|
1590
|
-
k += x.substring(
|
|
1590
|
+
k += x.substring(w), z.addText(k);
|
|
1591
1591
|
}
|
|
1592
1592
|
function ve() {
|
|
1593
1593
|
if (x === "") return;
|
|
1594
|
-
let
|
|
1594
|
+
let w = null;
|
|
1595
1595
|
if (typeof I.subLanguage == "string") {
|
|
1596
1596
|
if (!e[I.subLanguage]) {
|
|
1597
1597
|
z.addText(x);
|
|
1598
1598
|
return;
|
|
1599
1599
|
}
|
|
1600
|
-
|
|
1601
|
-
|
|
1600
|
+
w = c(I.subLanguage, x, !0, We[I.subLanguage]), We[I.subLanguage] = /** @type {CompiledMode} */
|
|
1601
|
+
w._top;
|
|
1602
1602
|
} else
|
|
1603
|
-
|
|
1604
|
-
I.relevance > 0 && (Ee +=
|
|
1603
|
+
w = d(x, I.subLanguage.length ? I.subLanguage : null);
|
|
1604
|
+
I.relevance > 0 && (Ee += w.relevance), z.__addSublanguage(w._emitter, w.language);
|
|
1605
1605
|
}
|
|
1606
1606
|
function Q() {
|
|
1607
1607
|
I.subLanguage != null ? ve() : V(), x = "";
|
|
1608
1608
|
}
|
|
1609
|
-
function X(
|
|
1610
|
-
|
|
1609
|
+
function X(w, D) {
|
|
1610
|
+
w !== "" && (z.startScope(D), z.addText(w), z.endScope());
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function He(w, D) {
|
|
1613
1613
|
let k = 1;
|
|
1614
1614
|
const U = D.length - 1;
|
|
1615
1615
|
for (; k <= U; ) {
|
|
1616
|
-
if (!
|
|
1616
|
+
if (!w._emit[k]) {
|
|
1617
1617
|
k++;
|
|
1618
1618
|
continue;
|
|
1619
1619
|
}
|
|
1620
|
-
const G = j.classNameAliases[
|
|
1620
|
+
const G = j.classNameAliases[w[k]] || w[k], q = D[k];
|
|
1621
1621
|
G ? X(q, G) : (x = q, V(), x = ""), k++;
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1625
|
-
return
|
|
1624
|
+
function ze(w, D) {
|
|
1625
|
+
return w.scope && typeof w.scope == "string" && z.openNode(j.classNameAliases[w.scope] || w.scope), w.beginScope && (w.beginScope._wrap ? (X(x, j.classNameAliases[w.beginScope._wrap] || w.beginScope._wrap), x = "") : w.beginScope._multi && (He(w.beginScope, D), x = "")), I = Object.create(w, { parent: { value: I } }), I;
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1628
|
-
let U =
|
|
1627
|
+
function Ge(w, D, k) {
|
|
1628
|
+
let U = qn(w.endRe, k);
|
|
1629
1629
|
if (U) {
|
|
1630
|
-
if (
|
|
1631
|
-
const G = new Ye(
|
|
1632
|
-
|
|
1630
|
+
if (w["on:end"]) {
|
|
1631
|
+
const G = new Ye(w);
|
|
1632
|
+
w["on:end"](D, G), G.isMatchIgnored && (U = !1);
|
|
1633
1633
|
}
|
|
1634
1634
|
if (U) {
|
|
1635
|
-
for (;
|
|
1636
|
-
|
|
1637
|
-
return
|
|
1635
|
+
for (; w.endsParent && w.parent; )
|
|
1636
|
+
w = w.parent;
|
|
1637
|
+
return w;
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
|
-
if (
|
|
1641
|
-
return
|
|
1640
|
+
if (w.endsWithParent)
|
|
1641
|
+
return Ge(w.parent, D, k);
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1644
|
-
return I.matcher.regexIndex === 0 ? (x +=
|
|
1643
|
+
function Dn(w) {
|
|
1644
|
+
return I.matcher.regexIndex === 0 ? (x += w[0], 1) : (Re = !0, 0);
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1647
|
-
const D =
|
|
1646
|
+
function Sn(w) {
|
|
1647
|
+
const D = w[0], k = w.rule, U = new Ye(k), G = [k.__beforeBegin, k["on:begin"]];
|
|
1648
1648
|
for (const q of G)
|
|
1649
|
-
if (q && (q(
|
|
1650
|
-
return
|
|
1651
|
-
return k.skip ? x += D : (k.excludeBegin && (x += D), Q(), !k.returnBegin && !k.excludeBegin && (x = D)),
|
|
1649
|
+
if (q && (q(w, U), U.isMatchIgnored))
|
|
1650
|
+
return Dn(D);
|
|
1651
|
+
return k.skip ? x += D : (k.excludeBegin && (x += D), Q(), !k.returnBegin && !k.excludeBegin && (x = D)), ze(k, w), k.returnBegin ? 0 : D.length;
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const D =
|
|
1653
|
+
function Cn(w) {
|
|
1654
|
+
const D = w[0], k = A.substring(w.index), U = Ge(I, w, k);
|
|
1655
1655
|
if (!U)
|
|
1656
1656
|
return en;
|
|
1657
1657
|
const G = I;
|
|
1658
|
-
I.endScope && I.endScope._wrap ? (Q(), X(D, I.endScope._wrap)) : I.endScope && I.endScope._multi ? (Q(),
|
|
1658
|
+
I.endScope && I.endScope._wrap ? (Q(), X(D, I.endScope._wrap)) : I.endScope && I.endScope._multi ? (Q(), He(I.endScope, w)) : G.skip ? x += D : (G.returnEnd || G.excludeEnd || (x += D), Q(), G.excludeEnd && (x = D));
|
|
1659
1659
|
do
|
|
1660
1660
|
I.scope && z.closeNode(), !I.skip && !I.subLanguage && (Ee += I.relevance), I = I.parent;
|
|
1661
1661
|
while (I !== U.parent);
|
|
1662
|
-
return U.starts &&
|
|
1662
|
+
return U.starts && ze(U.starts, w), G.returnEnd ? 0 : D.length;
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1665
|
-
const
|
|
1664
|
+
function Rn() {
|
|
1665
|
+
const w = [];
|
|
1666
1666
|
for (let D = I; D !== j; D = D.parent)
|
|
1667
|
-
D.scope &&
|
|
1668
|
-
|
|
1667
|
+
D.scope && w.unshift(D.scope);
|
|
1668
|
+
w.forEach((D) => z.openNode(D));
|
|
1669
1669
|
}
|
|
1670
1670
|
let me = {};
|
|
1671
|
-
function
|
|
1671
|
+
function Ke(w, D) {
|
|
1672
1672
|
const k = D && D[0];
|
|
1673
|
-
if (x +=
|
|
1673
|
+
if (x += w, k == null)
|
|
1674
1674
|
return Q(), 0;
|
|
1675
1675
|
if (me.type === "begin" && D.type === "end" && me.index === D.index && k === "") {
|
|
1676
1676
|
if (x += A.slice(D.index, D.index + 1), !h) {
|
|
@@ -1680,12 +1680,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1680
1680
|
return 1;
|
|
1681
1681
|
}
|
|
1682
1682
|
if (me = D, D.type === "begin")
|
|
1683
|
-
return
|
|
1683
|
+
return Sn(D);
|
|
1684
1684
|
if (D.type === "illegal" && !O) {
|
|
1685
1685
|
const U = new Error('Illegal lexeme "' + k + '" for mode "' + (I.scope || "<unnamed>") + '"');
|
|
1686
1686
|
throw U.mode = I, U;
|
|
1687
1687
|
} else if (D.type === "end") {
|
|
1688
|
-
const U =
|
|
1688
|
+
const U = Cn(D);
|
|
1689
1689
|
if (U !== en)
|
|
1690
1690
|
return U;
|
|
1691
1691
|
}
|
|
@@ -1698,10 +1698,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1698
1698
|
const j = C(b);
|
|
1699
1699
|
if (!j)
|
|
1700
1700
|
throw ae(t.replace("{}", b)), new Error('Unknown language: "' + b + '"');
|
|
1701
|
-
const
|
|
1702
|
-
let Se = "", I = P ||
|
|
1703
|
-
const
|
|
1704
|
-
|
|
1701
|
+
const Ln = Ot(j);
|
|
1702
|
+
let Se = "", I = P || Ln;
|
|
1703
|
+
const We = {}, z = new i.__emitter(i);
|
|
1704
|
+
Rn();
|
|
1705
1705
|
let x = "", Ee = 0, se = 0, Ce = 0, Re = !1;
|
|
1706
1706
|
try {
|
|
1707
1707
|
if (j.__emitTokens)
|
|
@@ -1709,12 +1709,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1709
1709
|
else {
|
|
1710
1710
|
for (I.matcher.considerAll(); ; ) {
|
|
1711
1711
|
Ce++, Re ? Re = !1 : I.matcher.considerAll(), I.matcher.lastIndex = se;
|
|
1712
|
-
const
|
|
1713
|
-
if (!
|
|
1714
|
-
const D = A.substring(se,
|
|
1715
|
-
se =
|
|
1712
|
+
const w = I.matcher.exec(A);
|
|
1713
|
+
if (!w) break;
|
|
1714
|
+
const D = A.substring(se, w.index), k = Ke(D, w);
|
|
1715
|
+
se = w.index + k;
|
|
1716
1716
|
}
|
|
1717
|
-
|
|
1717
|
+
Ke(A.substring(se));
|
|
1718
1718
|
}
|
|
1719
1719
|
return z.finalize(), Se = z.toHTML(), {
|
|
1720
1720
|
language: b,
|
|
@@ -1724,18 +1724,18 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1724
1724
|
_emitter: z,
|
|
1725
1725
|
_top: I
|
|
1726
1726
|
};
|
|
1727
|
-
} catch (
|
|
1728
|
-
if (
|
|
1727
|
+
} catch (w) {
|
|
1728
|
+
if (w.message && w.message.includes("Illegal"))
|
|
1729
1729
|
return {
|
|
1730
1730
|
language: b,
|
|
1731
|
-
value:
|
|
1731
|
+
value: Ie(A),
|
|
1732
1732
|
illegal: !0,
|
|
1733
1733
|
relevance: 0,
|
|
1734
1734
|
_illegalBy: {
|
|
1735
|
-
message:
|
|
1735
|
+
message: w.message,
|
|
1736
1736
|
index: se,
|
|
1737
1737
|
context: A.slice(se - 100, se + 100),
|
|
1738
|
-
mode:
|
|
1738
|
+
mode: w.mode,
|
|
1739
1739
|
resultSoFar: Se
|
|
1740
1740
|
},
|
|
1741
1741
|
_emitter: z
|
|
@@ -1743,19 +1743,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1743
1743
|
if (h)
|
|
1744
1744
|
return {
|
|
1745
1745
|
language: b,
|
|
1746
|
-
value:
|
|
1746
|
+
value: Ie(A),
|
|
1747
1747
|
illegal: !1,
|
|
1748
1748
|
relevance: 0,
|
|
1749
|
-
errorRaised:
|
|
1749
|
+
errorRaised: w,
|
|
1750
1750
|
_emitter: z,
|
|
1751
1751
|
_top: I
|
|
1752
1752
|
};
|
|
1753
|
-
throw
|
|
1753
|
+
throw w;
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
1756
|
function f(b) {
|
|
1757
1757
|
const A = {
|
|
1758
|
-
value:
|
|
1758
|
+
value: Ie(b),
|
|
1759
1759
|
illegal: !1,
|
|
1760
1760
|
relevance: 0,
|
|
1761
1761
|
_top: r,
|
|
@@ -1763,7 +1763,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1763
1763
|
};
|
|
1764
1764
|
return A._emitter.addText(b), A;
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1766
|
+
function d(b, A) {
|
|
1767
1767
|
A = A || i.languages || Object.keys(e);
|
|
1768
1768
|
const O = f(b), P = A.filter(C).filter($).map(
|
|
1769
1769
|
(Q) => c(Q, b, !1)
|
|
@@ -1781,7 +1781,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1781
1781
|
}), [W, V] = F, ve = W;
|
|
1782
1782
|
return ve.secondBest = V, ve;
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function g(b, A, O) {
|
|
1785
1785
|
const P = A && s[A] || O;
|
|
1786
1786
|
b.classList.add("hljs"), b.classList.add(`language-${P}`);
|
|
1787
1787
|
}
|
|
@@ -1797,13 +1797,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1797
1797
|
return;
|
|
1798
1798
|
}
|
|
1799
1799
|
if (b.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(b)), i.throwUnescapedHTML))
|
|
1800
|
-
throw new
|
|
1800
|
+
throw new Bt(
|
|
1801
1801
|
"One of your code blocks includes unescaped HTML.",
|
|
1802
1802
|
b.innerHTML
|
|
1803
1803
|
);
|
|
1804
1804
|
A = b;
|
|
1805
|
-
const P = A.textContent, F = O ? l(P, { language: O, ignoreIllegals: !0 }) :
|
|
1806
|
-
b.innerHTML = F.value, b.dataset.highlighted = "yes",
|
|
1805
|
+
const P = A.textContent, F = O ? l(P, { language: O, ignoreIllegals: !0 }) : d(P);
|
|
1806
|
+
b.innerHTML = F.value, b.dataset.highlighted = "yes", g(b, O, F.language), b.result = {
|
|
1807
1807
|
language: F.language,
|
|
1808
1808
|
// TODO: remove with version 11.0
|
|
1809
1809
|
re: F.relevance,
|
|
@@ -1817,24 +1817,24 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1817
1817
|
i = Je(i, b);
|
|
1818
1818
|
}
|
|
1819
1819
|
const v = () => {
|
|
1820
|
-
|
|
1820
|
+
y(), ce("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1821
1821
|
};
|
|
1822
1822
|
function m() {
|
|
1823
|
-
|
|
1823
|
+
y(), ce("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1824
1824
|
}
|
|
1825
1825
|
let E = !1;
|
|
1826
|
-
function
|
|
1826
|
+
function y() {
|
|
1827
1827
|
if (document.readyState === "loading") {
|
|
1828
1828
|
E = !0;
|
|
1829
1829
|
return;
|
|
1830
1830
|
}
|
|
1831
1831
|
document.querySelectorAll(i.cssSelector).forEach(p);
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1834
|
-
E &&
|
|
1833
|
+
function M() {
|
|
1834
|
+
E && y();
|
|
1835
1835
|
}
|
|
1836
|
-
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
|
1837
|
-
function
|
|
1836
|
+
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", M, !1);
|
|
1837
|
+
function T(b, A) {
|
|
1838
1838
|
let O = null;
|
|
1839
1839
|
try {
|
|
1840
1840
|
O = A(n);
|
|
@@ -1896,15 +1896,15 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1896
1896
|
}
|
|
1897
1897
|
Object.assign(n, {
|
|
1898
1898
|
highlight: l,
|
|
1899
|
-
highlightAuto:
|
|
1900
|
-
highlightAll:
|
|
1899
|
+
highlightAuto: d,
|
|
1900
|
+
highlightAll: y,
|
|
1901
1901
|
highlightElement: p,
|
|
1902
1902
|
// TODO: Remove with v12 API
|
|
1903
1903
|
highlightBlock: le,
|
|
1904
1904
|
configure: _,
|
|
1905
1905
|
initHighlighting: v,
|
|
1906
1906
|
initHighlightingOnLoad: m,
|
|
1907
|
-
registerLanguage:
|
|
1907
|
+
registerLanguage: T,
|
|
1908
1908
|
unregisterLanguage: N,
|
|
1909
1909
|
listLanguages: R,
|
|
1910
1910
|
getLanguage: C,
|
|
@@ -1917,23 +1917,23 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1917
1917
|
h = !1;
|
|
1918
1918
|
}, n.safeMode = function() {
|
|
1919
1919
|
h = !0;
|
|
1920
|
-
}, n.versionString =
|
|
1920
|
+
}, n.versionString = kt, n.regex = {
|
|
1921
1921
|
concat: oe,
|
|
1922
|
-
lookahead:
|
|
1923
|
-
either:
|
|
1924
|
-
optional:
|
|
1925
|
-
anyNumberOfTimes:
|
|
1922
|
+
lookahead: un,
|
|
1923
|
+
either: Ue,
|
|
1924
|
+
optional: Xn,
|
|
1925
|
+
anyNumberOfTimes: Vn
|
|
1926
1926
|
};
|
|
1927
|
-
for (const b in
|
|
1928
|
-
typeof
|
|
1929
|
-
return Object.assign(n,
|
|
1930
|
-
}, fe =
|
|
1931
|
-
fe.newInstance = () =>
|
|
1932
|
-
var
|
|
1927
|
+
for (const b in ye)
|
|
1928
|
+
typeof ye[b] == "object" && ln(ye[b]);
|
|
1929
|
+
return Object.assign(n, ye), n;
|
|
1930
|
+
}, fe = mn({});
|
|
1931
|
+
fe.newInstance = () => mn({});
|
|
1932
|
+
var Pt = fe;
|
|
1933
1933
|
fe.HighlightJS = fe;
|
|
1934
1934
|
fe.default = fe;
|
|
1935
|
-
const Y = /* @__PURE__ */
|
|
1936
|
-
function
|
|
1935
|
+
const Y = /* @__PURE__ */ Kn(Pt);
|
|
1936
|
+
function Ut(n) {
|
|
1937
1937
|
const e = n.regex, s = e.concat(/[\p{L}_]/u, e.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u, h = {
|
|
1938
1938
|
className: "symbol",
|
|
1939
1939
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
@@ -2149,7 +2149,7 @@ function $t(n) {
|
|
|
2149
2149
|
]
|
|
2150
2150
|
};
|
|
2151
2151
|
}
|
|
2152
|
-
const nn = "[A-Za-z$_][0-9A-Za-z$_]*",
|
|
2152
|
+
const nn = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
2153
2153
|
"as",
|
|
2154
2154
|
// for exports
|
|
2155
2155
|
"in",
|
|
@@ -2192,14 +2192,14 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", Pt = [
|
|
|
2192
2192
|
"from",
|
|
2193
2193
|
"export",
|
|
2194
2194
|
"extends"
|
|
2195
|
-
],
|
|
2195
|
+
], Ft = [
|
|
2196
2196
|
"true",
|
|
2197
2197
|
"false",
|
|
2198
2198
|
"null",
|
|
2199
2199
|
"undefined",
|
|
2200
2200
|
"NaN",
|
|
2201
2201
|
"Infinity"
|
|
2202
|
-
],
|
|
2202
|
+
], En = [
|
|
2203
2203
|
// Fundamental objects
|
|
2204
2204
|
"Object",
|
|
2205
2205
|
"Function",
|
|
@@ -2249,7 +2249,7 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", Pt = [
|
|
|
2249
2249
|
"Intl",
|
|
2250
2250
|
// WebAssembly
|
|
2251
2251
|
"WebAssembly"
|
|
2252
|
-
],
|
|
2252
|
+
], yn = [
|
|
2253
2253
|
"Error",
|
|
2254
2254
|
"EvalError",
|
|
2255
2255
|
"InternalError",
|
|
@@ -2258,7 +2258,7 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", Pt = [
|
|
|
2258
2258
|
"SyntaxError",
|
|
2259
2259
|
"TypeError",
|
|
2260
2260
|
"URIError"
|
|
2261
|
-
],
|
|
2261
|
+
], wn = [
|
|
2262
2262
|
"setInterval",
|
|
2263
2263
|
"setTimeout",
|
|
2264
2264
|
"clearInterval",
|
|
@@ -2276,7 +2276,7 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", Pt = [
|
|
|
2276
2276
|
"encodeURIComponent",
|
|
2277
2277
|
"escape",
|
|
2278
2278
|
"unescape"
|
|
2279
|
-
],
|
|
2279
|
+
], Ht = [
|
|
2280
2280
|
"arguments",
|
|
2281
2281
|
"this",
|
|
2282
2282
|
"super",
|
|
@@ -2288,12 +2288,12 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", Pt = [
|
|
|
2288
2288
|
"module",
|
|
2289
2289
|
"global"
|
|
2290
2290
|
// Node.js
|
|
2291
|
-
],
|
|
2291
|
+
], zt = [].concat(
|
|
2292
|
+
wn,
|
|
2292
2293
|
En,
|
|
2293
|
-
|
|
2294
|
-
mn
|
|
2294
|
+
yn
|
|
2295
2295
|
);
|
|
2296
|
-
function
|
|
2296
|
+
function Gt(n) {
|
|
2297
2297
|
const e = n.regex, s = (A, { after: O }) => {
|
|
2298
2298
|
const P = "</" + A[0].slice(1);
|
|
2299
2299
|
return A.input.indexOf(P, O) !== -1;
|
|
@@ -2334,10 +2334,10 @@ function Ht(n) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
}, i = {
|
|
2336
2336
|
$pattern: nn,
|
|
2337
|
-
keyword:
|
|
2338
|
-
literal:
|
|
2339
|
-
built_in:
|
|
2340
|
-
"variable.language":
|
|
2337
|
+
keyword: xt,
|
|
2338
|
+
literal: Ft,
|
|
2339
|
+
built_in: zt,
|
|
2340
|
+
"variable.language": Ht
|
|
2341
2341
|
}, a = "[0-9](_?[0-9])*", o = `\\.(${a})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2342
2342
|
className: "number",
|
|
2343
2343
|
variants: [
|
|
@@ -2362,7 +2362,7 @@ function Ht(n) {
|
|
|
2362
2362
|
keywords: i,
|
|
2363
2363
|
contains: []
|
|
2364
2364
|
// defined later
|
|
2365
|
-
},
|
|
2365
|
+
}, d = {
|
|
2366
2366
|
begin: ".?html`",
|
|
2367
2367
|
end: "",
|
|
2368
2368
|
starts: {
|
|
@@ -2374,7 +2374,7 @@ function Ht(n) {
|
|
|
2374
2374
|
],
|
|
2375
2375
|
subLanguage: "xml"
|
|
2376
2376
|
}
|
|
2377
|
-
},
|
|
2377
|
+
}, g = {
|
|
2378
2378
|
begin: ".?css`",
|
|
2379
2379
|
end: "",
|
|
2380
2380
|
starts: {
|
|
@@ -2454,8 +2454,8 @@ function Ht(n) {
|
|
|
2454
2454
|
}, E = [
|
|
2455
2455
|
n.APOS_STRING_MODE,
|
|
2456
2456
|
n.QUOTE_STRING_MODE,
|
|
2457
|
-
g,
|
|
2458
2457
|
d,
|
|
2458
|
+
g,
|
|
2459
2459
|
p,
|
|
2460
2460
|
_,
|
|
2461
2461
|
// Skip numbers when they are part of a variable name
|
|
@@ -2475,15 +2475,15 @@ function Ht(n) {
|
|
|
2475
2475
|
"self"
|
|
2476
2476
|
].concat(E)
|
|
2477
2477
|
});
|
|
2478
|
-
const
|
|
2478
|
+
const y = [].concat(m, f.contains), M = y.concat([
|
|
2479
2479
|
// eat recursive parens in sub expressions
|
|
2480
2480
|
{
|
|
2481
2481
|
begin: /(\s*)\(/,
|
|
2482
2482
|
end: /\)/,
|
|
2483
2483
|
keywords: i,
|
|
2484
|
-
contains: ["self"].concat(
|
|
2484
|
+
contains: ["self"].concat(y)
|
|
2485
2485
|
}
|
|
2486
|
-
]),
|
|
2486
|
+
]), T = {
|
|
2487
2487
|
className: "params",
|
|
2488
2488
|
// convert this to negative lookbehind in v12
|
|
2489
2489
|
begin: /(\s*)\(/,
|
|
@@ -2492,7 +2492,7 @@ function Ht(n) {
|
|
|
2492
2492
|
excludeBegin: !0,
|
|
2493
2493
|
excludeEnd: !0,
|
|
2494
2494
|
keywords: i,
|
|
2495
|
-
contains:
|
|
2495
|
+
contains: M
|
|
2496
2496
|
}, N = {
|
|
2497
2497
|
variants: [
|
|
2498
2498
|
// class Car extends vehicle
|
|
@@ -2546,8 +2546,8 @@ function Ht(n) {
|
|
|
2546
2546
|
keywords: {
|
|
2547
2547
|
_: [
|
|
2548
2548
|
// se we still get relevance credit for JS library classes
|
|
2549
|
-
...
|
|
2550
|
-
...
|
|
2549
|
+
...En,
|
|
2550
|
+
...yn
|
|
2551
2551
|
]
|
|
2552
2552
|
}
|
|
2553
2553
|
}, C = {
|
|
@@ -2578,7 +2578,7 @@ function Ht(n) {
|
|
|
2578
2578
|
3: "title.function"
|
|
2579
2579
|
},
|
|
2580
2580
|
label: "func.def",
|
|
2581
|
-
contains: [
|
|
2581
|
+
contains: [T],
|
|
2582
2582
|
illegal: /%/
|
|
2583
2583
|
}, $ = {
|
|
2584
2584
|
relevance: 0,
|
|
@@ -2592,7 +2592,7 @@ function Ht(n) {
|
|
|
2592
2592
|
match: e.concat(
|
|
2593
2593
|
/\b/,
|
|
2594
2594
|
B([
|
|
2595
|
-
...
|
|
2595
|
+
...wn,
|
|
2596
2596
|
"super",
|
|
2597
2597
|
"import"
|
|
2598
2598
|
].map((A) => `${A}\\s*\\(`)),
|
|
@@ -2626,7 +2626,7 @@ function Ht(n) {
|
|
|
2626
2626
|
// eat to avoid empty params
|
|
2627
2627
|
begin: /\(\)/
|
|
2628
2628
|
},
|
|
2629
|
-
|
|
2629
|
+
T
|
|
2630
2630
|
]
|
|
2631
2631
|
}, le = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + n.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
|
|
2632
2632
|
match: [
|
|
@@ -2645,7 +2645,7 @@ function Ht(n) {
|
|
|
2645
2645
|
3: "title.function"
|
|
2646
2646
|
},
|
|
2647
2647
|
contains: [
|
|
2648
|
-
|
|
2648
|
+
T
|
|
2649
2649
|
]
|
|
2650
2650
|
};
|
|
2651
2651
|
return {
|
|
@@ -2653,7 +2653,7 @@ function Ht(n) {
|
|
|
2653
2653
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
2654
2654
|
keywords: i,
|
|
2655
2655
|
// this will be extended by TypeScript
|
|
2656
|
-
exports: { PARAMS_CONTAINS:
|
|
2656
|
+
exports: { PARAMS_CONTAINS: M, CLASS_REFERENCE: R },
|
|
2657
2657
|
illegal: /#(?![$_A-z])/,
|
|
2658
2658
|
contains: [
|
|
2659
2659
|
n.SHEBANG({
|
|
@@ -2664,8 +2664,8 @@ function Ht(n) {
|
|
|
2664
2664
|
C,
|
|
2665
2665
|
n.APOS_STRING_MODE,
|
|
2666
2666
|
n.QUOTE_STRING_MODE,
|
|
2667
|
-
g,
|
|
2668
2667
|
d,
|
|
2668
|
+
g,
|
|
2669
2669
|
p,
|
|
2670
2670
|
_,
|
|
2671
2671
|
m,
|
|
@@ -2714,7 +2714,7 @@ function Ht(n) {
|
|
|
2714
2714
|
excludeBegin: !0,
|
|
2715
2715
|
excludeEnd: !0,
|
|
2716
2716
|
keywords: i,
|
|
2717
|
-
contains:
|
|
2717
|
+
contains: M
|
|
2718
2718
|
}
|
|
2719
2719
|
]
|
|
2720
2720
|
}
|
|
@@ -2769,7 +2769,7 @@ function Ht(n) {
|
|
|
2769
2769
|
returnBegin: !0,
|
|
2770
2770
|
label: "func.def",
|
|
2771
2771
|
contains: [
|
|
2772
|
-
|
|
2772
|
+
T,
|
|
2773
2773
|
n.inherit(n.TITLE_MODE, { begin: u, className: "title.function" })
|
|
2774
2774
|
]
|
|
2775
2775
|
},
|
|
@@ -2789,7 +2789,7 @@ function Ht(n) {
|
|
|
2789
2789
|
{
|
|
2790
2790
|
match: [/\bconstructor(?=\s*\()/],
|
|
2791
2791
|
className: { 1: "title.function" },
|
|
2792
|
-
contains: [
|
|
2792
|
+
contains: [T]
|
|
2793
2793
|
},
|
|
2794
2794
|
H,
|
|
2795
2795
|
$,
|
|
@@ -2802,7 +2802,7 @@ function Ht(n) {
|
|
|
2802
2802
|
]
|
|
2803
2803
|
};
|
|
2804
2804
|
}
|
|
2805
|
-
function
|
|
2805
|
+
function Kt(n) {
|
|
2806
2806
|
const e = {
|
|
2807
2807
|
className: "attr",
|
|
2808
2808
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
@@ -2837,7 +2837,7 @@ function zt(n) {
|
|
|
2837
2837
|
illegal: "\\S"
|
|
2838
2838
|
};
|
|
2839
2839
|
}
|
|
2840
|
-
function
|
|
2840
|
+
function Wt(n) {
|
|
2841
2841
|
const e = "true false yes no null", s = "[\\w#;/?:@&=+$,.~*'()[\\]]+", u = {
|
|
2842
2842
|
className: "attr",
|
|
2843
2843
|
variants: [
|
|
@@ -2903,13 +2903,13 @@ function Gt(n) {
|
|
|
2903
2903
|
excludeEnd: !0,
|
|
2904
2904
|
keywords: e,
|
|
2905
2905
|
relevance: 0
|
|
2906
|
-
},
|
|
2906
|
+
}, d = {
|
|
2907
2907
|
begin: /\{/,
|
|
2908
2908
|
end: /\}/,
|
|
2909
2909
|
contains: [f],
|
|
2910
2910
|
illegal: "\\n",
|
|
2911
2911
|
relevance: 0
|
|
2912
|
-
},
|
|
2912
|
+
}, g = {
|
|
2913
2913
|
begin: "\\[",
|
|
2914
2914
|
end: "\\]",
|
|
2915
2915
|
contains: [f],
|
|
@@ -2991,8 +2991,8 @@ function Gt(n) {
|
|
|
2991
2991
|
begin: n.C_NUMBER_RE + "\\b",
|
|
2992
2992
|
relevance: 0
|
|
2993
2993
|
},
|
|
2994
|
-
g,
|
|
2995
2994
|
d,
|
|
2995
|
+
g,
|
|
2996
2996
|
t
|
|
2997
2997
|
], _ = [...p];
|
|
2998
2998
|
return _.pop(), _.push(r), f.contains = _, {
|
|
@@ -3002,7 +3002,7 @@ function Gt(n) {
|
|
|
3002
3002
|
contains: p
|
|
3003
3003
|
};
|
|
3004
3004
|
}
|
|
3005
|
-
function
|
|
3005
|
+
function Qt(n) {
|
|
3006
3006
|
return {
|
|
3007
3007
|
name: "Plain text",
|
|
3008
3008
|
aliases: [
|
|
@@ -3012,7 +3012,7 @@ function Kt(n) {
|
|
|
3012
3012
|
disableAutodetect: !0
|
|
3013
3013
|
};
|
|
3014
3014
|
}
|
|
3015
|
-
function
|
|
3015
|
+
function Zt(n) {
|
|
3016
3016
|
const e = n.regex, s = /[\p{XID_Start}_]\p{XID_Continue}*/u, u = [
|
|
3017
3017
|
"and",
|
|
3018
3018
|
"as",
|
|
@@ -3238,7 +3238,7 @@ function Wt(n) {
|
|
|
3238
3238
|
n.APOS_STRING_MODE,
|
|
3239
3239
|
n.QUOTE_STRING_MODE
|
|
3240
3240
|
]
|
|
3241
|
-
}, f = "[0-9](_?[0-9])*",
|
|
3241
|
+
}, f = "[0-9](_?[0-9])*", d = `(\\b(${f}))?\\.(${f})|\\b(${f})\\.`, g = `\\b|${u.join("|")}`, p = {
|
|
3242
3242
|
className: "number",
|
|
3243
3243
|
relevance: 0,
|
|
3244
3244
|
variants: [
|
|
@@ -3253,10 +3253,10 @@ function Wt(n) {
|
|
|
3253
3253
|
// because both MUST contain a decimal point and so cannot be confused with
|
|
3254
3254
|
// the interior part of an identifier
|
|
3255
3255
|
{
|
|
3256
|
-
begin: `(\\b(${f})|(${
|
|
3256
|
+
begin: `(\\b(${f})|(${d}))[eE][+-]?(${f})[jJ]?(?=${g})`
|
|
3257
3257
|
},
|
|
3258
3258
|
{
|
|
3259
|
-
begin: `(${
|
|
3259
|
+
begin: `(${d})[jJ]?`
|
|
3260
3260
|
},
|
|
3261
3261
|
// decinteger, bininteger, octinteger, hexinteger
|
|
3262
3262
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
|
|
@@ -3265,21 +3265,21 @@ function Wt(n) {
|
|
|
3265
3265
|
// decinteger is optionally imaginary
|
|
3266
3266
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3267
3267
|
{
|
|
3268
|
-
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${
|
|
3268
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`
|
|
3269
3269
|
},
|
|
3270
3270
|
{
|
|
3271
|
-
begin: `\\b0[bB](_?[01])+[lL]?(?=${
|
|
3271
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${g})`
|
|
3272
3272
|
},
|
|
3273
3273
|
{
|
|
3274
|
-
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${
|
|
3274
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${g})`
|
|
3275
3275
|
},
|
|
3276
3276
|
{
|
|
3277
|
-
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${
|
|
3277
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`
|
|
3278
3278
|
},
|
|
3279
3279
|
// imagnumber (digitpart-based)
|
|
3280
3280
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3281
3281
|
{
|
|
3282
|
-
begin: `\\b(${f})[jJ](?=${
|
|
3282
|
+
begin: `\\b(${f})[jJ](?=${g})`
|
|
3283
3283
|
}
|
|
3284
3284
|
]
|
|
3285
3285
|
}, _ = {
|
|
@@ -3408,15 +3408,15 @@ function Wt(n) {
|
|
|
3408
3408
|
]
|
|
3409
3409
|
};
|
|
3410
3410
|
}
|
|
3411
|
-
var ue = "[0-9](_*[0-9])*",
|
|
3411
|
+
var ue = "[0-9](_*[0-9])*", we = `\\.(${ue})`, Ae = "[0-9a-fA-F](_*[0-9a-fA-F])*", tn = {
|
|
3412
3412
|
className: "number",
|
|
3413
3413
|
variants: [
|
|
3414
3414
|
// DecimalFloatingPointLiteral
|
|
3415
3415
|
// including ExponentPart
|
|
3416
|
-
{ begin: `(\\b(${ue})((${
|
|
3416
|
+
{ begin: `(\\b(${ue})((${we})|\\.)?|(${we}))[eE][+-]?(${ue})[fFdD]?\\b` },
|
|
3417
3417
|
// excluding ExponentPart
|
|
3418
|
-
{ begin: `\\b(${ue})((${
|
|
3419
|
-
{ begin: `(${
|
|
3418
|
+
{ begin: `\\b(${ue})((${we})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
3419
|
+
{ begin: `(${we})[fFdD]?\\b` },
|
|
3420
3420
|
{ begin: `\\b(${ue})[fFdD]\\b` },
|
|
3421
3421
|
// HexadecimalFloatingPointLiteral
|
|
3422
3422
|
{ begin: `\\b0[xX]((${Ae})\\.?|(${Ae})?\\.(${Ae}))[pP][+-]?(${ue})[fFdD]?\\b` },
|
|
@@ -3431,11 +3431,11 @@ var ue = "[0-9](_*[0-9])*", ye = `\\.(${ue})`, Ae = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3431
3431
|
],
|
|
3432
3432
|
relevance: 0
|
|
3433
3433
|
};
|
|
3434
|
-
function
|
|
3435
|
-
return s === -1 ? "" : n.replace(e, (u) =>
|
|
3434
|
+
function An(n, e, s) {
|
|
3435
|
+
return s === -1 ? "" : n.replace(e, (u) => An(n, e, s - 1));
|
|
3436
3436
|
}
|
|
3437
|
-
function
|
|
3438
|
-
const e = n.regex, s = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = s +
|
|
3437
|
+
function Yt(n) {
|
|
3438
|
+
const e = n.regex, s = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = s + An("(?:<" + s + "~~~(?:\\s*,\\s*" + s + "~~~)*>)?", /~~~/g, 2), a = {
|
|
3439
3439
|
keyword: [
|
|
3440
3440
|
"synchronized",
|
|
3441
3441
|
"abstract",
|
|
@@ -3644,7 +3644,7 @@ function Qt(n) {
|
|
|
3644
3644
|
]
|
|
3645
3645
|
};
|
|
3646
3646
|
}
|
|
3647
|
-
function
|
|
3647
|
+
function Vt(n) {
|
|
3648
3648
|
const e = n.regex, s = {}, u = {
|
|
3649
3649
|
begin: /\$\{/,
|
|
3650
3650
|
end: /\}/,
|
|
@@ -3734,10 +3734,10 @@ function Zt(n) {
|
|
|
3734
3734
|
"tcsh",
|
|
3735
3735
|
"dash",
|
|
3736
3736
|
"scsh"
|
|
3737
|
-
],
|
|
3737
|
+
], d = n.SHEBANG({
|
|
3738
3738
|
binary: `(${f.join("|")})`,
|
|
3739
3739
|
relevance: 10
|
|
3740
|
-
}),
|
|
3740
|
+
}), g = {
|
|
3741
3741
|
className: "function",
|
|
3742
3742
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3743
3743
|
returnBegin: !0,
|
|
@@ -3804,7 +3804,7 @@ function Zt(n) {
|
|
|
3804
3804
|
"typeset",
|
|
3805
3805
|
"ulimit",
|
|
3806
3806
|
"unalias"
|
|
3807
|
-
],
|
|
3807
|
+
], y = [
|
|
3808
3808
|
"autoload",
|
|
3809
3809
|
"bg",
|
|
3810
3810
|
"bindkey",
|
|
@@ -3873,7 +3873,7 @@ function Zt(n) {
|
|
|
3873
3873
|
"zsocket",
|
|
3874
3874
|
"zstyle",
|
|
3875
3875
|
"ztcp"
|
|
3876
|
-
],
|
|
3876
|
+
], M = [
|
|
3877
3877
|
"chcon",
|
|
3878
3878
|
"chgrp",
|
|
3879
3879
|
"chown",
|
|
@@ -3994,16 +3994,16 @@ function Zt(n) {
|
|
|
3994
3994
|
// Shell modifiers
|
|
3995
3995
|
"set",
|
|
3996
3996
|
"shopt",
|
|
3997
|
-
...
|
|
3998
|
-
...
|
|
3997
|
+
...y,
|
|
3998
|
+
...M
|
|
3999
3999
|
]
|
|
4000
4000
|
},
|
|
4001
4001
|
contains: [
|
|
4002
|
-
|
|
4002
|
+
d,
|
|
4003
4003
|
// to catch known shells and boost relevancy
|
|
4004
4004
|
n.SHEBANG(),
|
|
4005
4005
|
// to catch unknown shells but still highlight the shebang
|
|
4006
|
-
|
|
4006
|
+
g,
|
|
4007
4007
|
c,
|
|
4008
4008
|
t,
|
|
4009
4009
|
r,
|
|
@@ -4016,7 +4016,7 @@ function Zt(n) {
|
|
|
4016
4016
|
]
|
|
4017
4017
|
};
|
|
4018
4018
|
}
|
|
4019
|
-
function
|
|
4019
|
+
function Xt(n) {
|
|
4020
4020
|
const e = n.regex, s = n.COMMENT("--", "$"), u = {
|
|
4021
4021
|
className: "string",
|
|
4022
4022
|
variants: [
|
|
@@ -4565,7 +4565,7 @@ function Yt(n) {
|
|
|
4565
4565
|
"nulls last",
|
|
4566
4566
|
"depth first",
|
|
4567
4567
|
"breadth first"
|
|
4568
|
-
],
|
|
4568
|
+
], d = l, g = [
|
|
4569
4569
|
...o,
|
|
4570
4570
|
...a
|
|
4571
4571
|
].filter((E) => !l.includes(E)), p = {
|
|
@@ -4576,16 +4576,16 @@ function Yt(n) {
|
|
|
4576
4576
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4577
4577
|
relevance: 0
|
|
4578
4578
|
}, v = {
|
|
4579
|
-
begin: e.concat(/\b/, e.either(...
|
|
4579
|
+
begin: e.concat(/\b/, e.either(...d), /\s*\(/),
|
|
4580
4580
|
relevance: 0,
|
|
4581
|
-
keywords: { built_in:
|
|
4581
|
+
keywords: { built_in: d }
|
|
4582
4582
|
};
|
|
4583
4583
|
function m(E, {
|
|
4584
|
-
exceptions:
|
|
4585
|
-
when:
|
|
4584
|
+
exceptions: y,
|
|
4585
|
+
when: M
|
|
4586
4586
|
} = {}) {
|
|
4587
|
-
const
|
|
4588
|
-
return
|
|
4587
|
+
const T = M;
|
|
4588
|
+
return y = y || [], E.map((N) => N.match(/\|\d+$/) || y.includes(N) ? N : T(N) ? `${N}|0` : N);
|
|
4589
4589
|
}
|
|
4590
4590
|
return {
|
|
4591
4591
|
name: "SQL",
|
|
@@ -4594,7 +4594,7 @@ function Yt(n) {
|
|
|
4594
4594
|
illegal: /[{}]|<\//,
|
|
4595
4595
|
keywords: {
|
|
4596
4596
|
$pattern: /\b[\w\.]+/,
|
|
4597
|
-
keyword: m(
|
|
4597
|
+
keyword: m(g, { when: (E) => E.length < 3 }),
|
|
4598
4598
|
literal: t,
|
|
4599
4599
|
type: i,
|
|
4600
4600
|
built_in: c
|
|
@@ -4605,7 +4605,7 @@ function Yt(n) {
|
|
|
4605
4605
|
relevance: 0,
|
|
4606
4606
|
keywords: {
|
|
4607
4607
|
$pattern: /[\w\.]+/,
|
|
4608
|
-
keyword:
|
|
4608
|
+
keyword: g.concat(f),
|
|
4609
4609
|
literal: t,
|
|
4610
4610
|
type: i
|
|
4611
4611
|
}
|
|
@@ -4625,39 +4625,51 @@ function Yt(n) {
|
|
|
4625
4625
|
]
|
|
4626
4626
|
};
|
|
4627
4627
|
}
|
|
4628
|
-
Y.registerLanguage("xml",
|
|
4629
|
-
Y.registerLanguage("javascript",
|
|
4630
|
-
Y.registerLanguage("json",
|
|
4631
|
-
Y.registerLanguage("yaml",
|
|
4632
|
-
Y.registerLanguage("plaintext",
|
|
4633
|
-
Y.registerLanguage("python",
|
|
4634
|
-
Y.registerLanguage("java",
|
|
4635
|
-
Y.registerLanguage("bash",
|
|
4636
|
-
Y.registerLanguage("sql",
|
|
4628
|
+
Y.registerLanguage("xml", Ut);
|
|
4629
|
+
Y.registerLanguage("javascript", Gt);
|
|
4630
|
+
Y.registerLanguage("json", Kt);
|
|
4631
|
+
Y.registerLanguage("yaml", Wt);
|
|
4632
|
+
Y.registerLanguage("plaintext", Qt);
|
|
4633
|
+
Y.registerLanguage("python", Zt);
|
|
4634
|
+
Y.registerLanguage("java", Yt);
|
|
4635
|
+
Y.registerLanguage("bash", Vt);
|
|
4636
|
+
Y.registerLanguage("sql", Xt);
|
|
4637
4637
|
var S = /* @__PURE__ */ ((n) => (n.EQUAL = "equal", n.DELETE = "removed", n.ADD = "added", n.EMPTY = "empty", n))(S || {});
|
|
4638
|
-
const J = "<code-diff-modified>", ee = "</code-diff-modified>",
|
|
4638
|
+
const J = "<code-diff-modified>", ee = "</code-diff-modified>", rn = J.replace("<", "<").replace(">", ">"), sn = ee.replace("<", "<").replace(">", ">");
|
|
4639
|
+
function jt(n) {
|
|
4640
|
+
const e = {
|
|
4641
|
+
"&": "&",
|
|
4642
|
+
"<": "<",
|
|
4643
|
+
">": ">",
|
|
4644
|
+
'"': """,
|
|
4645
|
+
"'": "'"
|
|
4646
|
+
};
|
|
4647
|
+
return n.replace(/[&<>"']/g, (s) => e[s]);
|
|
4648
|
+
}
|
|
4639
4649
|
function ge(n) {
|
|
4640
4650
|
return n === void 0 ? S.EQUAL : n.added ? S.ADD : n.removed ? S.DELETE : S.EQUAL;
|
|
4641
4651
|
}
|
|
4642
|
-
function
|
|
4643
|
-
return typeof n == "undefined" ? e : typeof e == "undefined" ? n : (s === "char" ?
|
|
4652
|
+
function Me(n, e, s = "word") {
|
|
4653
|
+
return typeof n == "undefined" ? e : typeof e == "undefined" ? n : (s === "char" ? Un : Fn)(n, e).filter((h) => ge(h) !== S.DELETE).map(
|
|
4644
4654
|
(h) => ge(h) === S.ADD ? `${J}${h.value}${ee}` : h.value
|
|
4645
4655
|
).join("");
|
|
4646
4656
|
}
|
|
4647
|
-
function
|
|
4648
|
-
const s = new
|
|
4657
|
+
function Nn(n, e) {
|
|
4658
|
+
const s = new Oe.diff_match_patch(), u = s.diff_linesToChars_(n, e), h = u.chars1, t = u.chars2, r = u.lineArray, i = s.diff_main(h, t, !1);
|
|
4649
4659
|
return s.diff_charsToLines_(i, r), i.map((a) => {
|
|
4650
4660
|
const [o, l] = a;
|
|
4651
4661
|
return {
|
|
4652
4662
|
count: l.replace(/\n$/, "").split(`
|
|
4653
4663
|
`).length,
|
|
4654
4664
|
value: l,
|
|
4655
|
-
removed: o ===
|
|
4656
|
-
added: o ===
|
|
4665
|
+
removed: o === Oe.DIFF_DELETE,
|
|
4666
|
+
added: o === Oe.DIFF_INSERT
|
|
4657
4667
|
};
|
|
4658
4668
|
});
|
|
4659
4669
|
}
|
|
4660
4670
|
function Z(n, e) {
|
|
4671
|
+
if (typeof document == "undefined")
|
|
4672
|
+
return jt(e).replace(new RegExp(rn, "g"), '<span class="x">').replace(new RegExp(sn, "g"), "</span>");
|
|
4661
4673
|
if (!e.match(new RegExp(`(${J}|${ee})`, "g")))
|
|
4662
4674
|
return Y.highlight(e, { language: n }).value;
|
|
4663
4675
|
let u = e;
|
|
@@ -4679,16 +4691,16 @@ function Z(n, e) {
|
|
|
4679
4691
|
u = u.slice(ee.length), c = c + ee, r = !1;
|
|
4680
4692
|
continue;
|
|
4681
4693
|
}
|
|
4682
|
-
const f = u.match(new RegExp(`(${J}|${ee})`)),
|
|
4683
|
-
c = c + u.substring(0,
|
|
4694
|
+
const f = u.match(new RegExp(`(${J}|${ee})`)), d = f && f.index ? f.index : u.length, g = Math.min(d, l.length);
|
|
4695
|
+
c = c + u.substring(0, g), u = u.slice(g), l = l.slice(g);
|
|
4684
4696
|
}
|
|
4685
4697
|
r && (c = c + ee), o.textContent = c;
|
|
4686
4698
|
}
|
|
4687
4699
|
});
|
|
4688
4700
|
};
|
|
4689
|
-
return i(t), t.innerHTML.replace(new RegExp(
|
|
4701
|
+
return i(t), t.innerHTML.replace(new RegExp(rn, "g"), '<span class="x">').replace(new RegExp(sn, "g"), "</span>");
|
|
4690
4702
|
}
|
|
4691
|
-
function
|
|
4703
|
+
function Tn(n, e) {
|
|
4692
4704
|
const s = (a, o) => (a.match(new RegExp(o, "g")) || []).length, u = (a) => a.filter((o) => e == null ? void 0 : e.test(o)).length;
|
|
4693
4705
|
let h = 0, t = 0, r = 0, i = 0;
|
|
4694
4706
|
for (const a of n) {
|
|
@@ -4714,82 +4726,82 @@ function An(n, e) {
|
|
|
4714
4726
|
ignoreDeletionsNum: i
|
|
4715
4727
|
};
|
|
4716
4728
|
}
|
|
4717
|
-
function
|
|
4718
|
-
const i = () => ({ type: S.EMPTY }), a = (m, E,
|
|
4719
|
-
let c = 0, f = 0,
|
|
4720
|
-
const
|
|
4721
|
-
changes:
|
|
4729
|
+
function qt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
4730
|
+
const i = () => ({ type: S.EMPTY }), a = (m, E, y) => ({ type: m, num: E, code: y }), o = Nn(n, e), l = r ? new RegExp(r) : void 0;
|
|
4731
|
+
let c = 0, f = 0, d = !1;
|
|
4732
|
+
const g = [], p = {
|
|
4733
|
+
changes: g,
|
|
4722
4734
|
collector: [],
|
|
4723
|
-
stat:
|
|
4735
|
+
stat: Tn(o, l)
|
|
4724
4736
|
};
|
|
4725
4737
|
for (let m = 0; m < o.length; m++) {
|
|
4726
|
-
if (
|
|
4727
|
-
|
|
4738
|
+
if (d) {
|
|
4739
|
+
d = !1;
|
|
4728
4740
|
continue;
|
|
4729
4741
|
}
|
|
4730
|
-
const [E,
|
|
4742
|
+
const [E, y] = [o[m], o[m + 1]], [M, T] = [ge(E), ge(y)], N = E.value.replace(/\n$/, "").split(`
|
|
4731
4743
|
`);
|
|
4732
|
-
if (
|
|
4744
|
+
if (y === void 0) {
|
|
4733
4745
|
for (const C of N) {
|
|
4734
4746
|
let L = i(), $ = i();
|
|
4735
4747
|
const B = Z(s, C);
|
|
4736
|
-
|
|
4748
|
+
M === S.EQUAL && (c++, f++, L = a(S.EQUAL, c, B), $ = a(S.EQUAL, f, B)), M === S.DELETE && (c++, L = a(S.DELETE, c, B), $ = i()), M === S.ADD && (f++, L = i(), $ = a(S.ADD, f, B)), g.push({ left: L, right: $ });
|
|
4737
4749
|
}
|
|
4738
4750
|
break;
|
|
4739
4751
|
}
|
|
4740
|
-
if (
|
|
4752
|
+
if (M === S.EQUAL)
|
|
4741
4753
|
for (const C of N) {
|
|
4742
4754
|
c++, f++;
|
|
4743
4755
|
const L = Z(s, C);
|
|
4744
|
-
|
|
4756
|
+
g.push({
|
|
4745
4757
|
left: a(S.EQUAL, c, L),
|
|
4746
4758
|
right: a(S.EQUAL, f, L)
|
|
4747
4759
|
});
|
|
4748
4760
|
}
|
|
4749
|
-
const R =
|
|
4761
|
+
const R = y.value.replace(/\n$/, "").split(`
|
|
4750
4762
|
`);
|
|
4751
|
-
if (
|
|
4752
|
-
if (
|
|
4763
|
+
if (M === S.DELETE) {
|
|
4764
|
+
if (T === S.EQUAL)
|
|
4753
4765
|
for (const C of N)
|
|
4754
|
-
c++,
|
|
4766
|
+
c++, g.push({
|
|
4755
4767
|
left: a(S.DELETE, c, Z(s, C)),
|
|
4756
4768
|
right: i()
|
|
4757
4769
|
});
|
|
4758
|
-
if (
|
|
4759
|
-
|
|
4760
|
-
const C = Math.max(E.count,
|
|
4770
|
+
if (T === S.ADD) {
|
|
4771
|
+
d = !0;
|
|
4772
|
+
const C = Math.max(E.count, y.count);
|
|
4761
4773
|
for (let L = 0; L < C; L++) {
|
|
4762
|
-
L < E.count && c++, L <
|
|
4763
|
-
const [$, B] = [N[L], R[L]], H = h || N.length === R.length, K = H ?
|
|
4764
|
-
|
|
4774
|
+
L < E.count && c++, L < y.count && f++;
|
|
4775
|
+
const [$, B] = [N[L], R[L]], H = h || N.length === R.length, K = H ? Me(B, $, u) : $, te = H ? Me($, B, u) : B, le = l != null && l.test($) ? S.EQUAL : S.DELETE, b = l != null && l.test(B) ? S.EQUAL : S.ADD, A = L < E.count ? a(le, c, Z(s, K)) : i(), O = L < y.count ? a(b, f, Z(s, te)) : i();
|
|
4776
|
+
g.push({ left: A, right: O });
|
|
4765
4777
|
}
|
|
4766
4778
|
}
|
|
4767
4779
|
}
|
|
4768
|
-
if (
|
|
4780
|
+
if (M === S.ADD)
|
|
4769
4781
|
for (const C of N)
|
|
4770
|
-
f++,
|
|
4782
|
+
f++, g.push({
|
|
4771
4783
|
left: i(),
|
|
4772
4784
|
right: a(S.ADD, f, Z(s, C))
|
|
4773
4785
|
});
|
|
4774
4786
|
}
|
|
4775
4787
|
if (n === e) {
|
|
4776
|
-
for (let m = 0; m <
|
|
4777
|
-
|
|
4788
|
+
for (let m = 0; m < g.length; m++)
|
|
4789
|
+
g[m].fold = !1;
|
|
4778
4790
|
return p;
|
|
4779
4791
|
}
|
|
4780
|
-
for (let m = 0; m <
|
|
4781
|
-
const E =
|
|
4792
|
+
for (let m = 0; m < g.length; m++) {
|
|
4793
|
+
const E = g[m];
|
|
4782
4794
|
if (E.left.type === S.DELETE || E.right.type === S.ADD) {
|
|
4783
|
-
const [
|
|
4784
|
-
for (let
|
|
4785
|
-
|
|
4795
|
+
const [y, M] = [Math.max(m - t, 0), Math.min(m + t + 1, g.length)];
|
|
4796
|
+
for (let T = y; T < M; T++)
|
|
4797
|
+
g[T].fold = !1;
|
|
4786
4798
|
}
|
|
4787
4799
|
E.fold === void 0 && (E.fold = !0);
|
|
4788
4800
|
}
|
|
4789
4801
|
const _ = [];
|
|
4790
4802
|
let v = [];
|
|
4791
|
-
for (let m = 0; m <
|
|
4792
|
-
const E =
|
|
4803
|
+
for (let m = 0; m < g.length; m++) {
|
|
4804
|
+
const E = g[m];
|
|
4793
4805
|
if (E.fold === !1) {
|
|
4794
4806
|
v.length && (v[0].hideIndex = p.collector.length, p.collector.push({
|
|
4795
4807
|
lines: v,
|
|
@@ -4804,23 +4816,23 @@ function jt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
|
4804
4816
|
fold: !0
|
|
4805
4817
|
}), v = []), p.changes = _, p;
|
|
4806
4818
|
}
|
|
4807
|
-
function
|
|
4808
|
-
const i =
|
|
4819
|
+
function Jt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
4820
|
+
const i = Nn(n, e), a = r ? new RegExp(r) : void 0;
|
|
4809
4821
|
let o = 0, l = 0, c = !1;
|
|
4810
|
-
const f = [],
|
|
4822
|
+
const f = [], d = {
|
|
4811
4823
|
changes: f,
|
|
4812
4824
|
collector: [],
|
|
4813
|
-
stat:
|
|
4825
|
+
stat: Tn(i, a)
|
|
4814
4826
|
};
|
|
4815
4827
|
for (let _ = 0; _ < i.length; _++) {
|
|
4816
4828
|
if (c) {
|
|
4817
4829
|
c = !1;
|
|
4818
4830
|
continue;
|
|
4819
4831
|
}
|
|
4820
|
-
const [v, m] = [i[_], i[_ + 1]], [E,
|
|
4832
|
+
const [v, m] = [i[_], i[_ + 1]], [E, y] = [ge(v), ge(m)], M = v.value.replace(/\n$/, "").split(`
|
|
4821
4833
|
`);
|
|
4822
4834
|
if (m === void 0) {
|
|
4823
|
-
for (const N of
|
|
4835
|
+
for (const N of M) {
|
|
4824
4836
|
E === S.EQUAL && (o++, l++), E === S.DELETE && o++, E === S.ADD && l++;
|
|
4825
4837
|
const R = Z(s, N);
|
|
4826
4838
|
f.push({
|
|
@@ -4833,29 +4845,29 @@ function qt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
|
4833
4845
|
break;
|
|
4834
4846
|
}
|
|
4835
4847
|
if (E === S.EQUAL)
|
|
4836
|
-
for (const N of
|
|
4848
|
+
for (const N of M) {
|
|
4837
4849
|
o++, l++;
|
|
4838
4850
|
const R = Z(s, N);
|
|
4839
4851
|
f.push({ type: S.EQUAL, code: R, delNum: o, addNum: l });
|
|
4840
4852
|
}
|
|
4841
|
-
const
|
|
4853
|
+
const T = m.value.replace(/\n$/, "").split(`
|
|
4842
4854
|
`);
|
|
4843
4855
|
if (E === S.DELETE)
|
|
4844
|
-
if (
|
|
4845
|
-
for (let N = 0; N <
|
|
4846
|
-
const R =
|
|
4856
|
+
if (y === S.ADD && (M.length === T.length || h)) {
|
|
4857
|
+
for (let N = 0; N < M.length; N++) {
|
|
4858
|
+
const R = M[N], C = T[N];
|
|
4847
4859
|
o++;
|
|
4848
|
-
const L = Z(s,
|
|
4860
|
+
const L = Z(s, Me(C, R, u));
|
|
4849
4861
|
f.push({
|
|
4850
4862
|
type: a != null && a.test(R) ? S.EQUAL : S.DELETE,
|
|
4851
4863
|
code: L,
|
|
4852
4864
|
delNum: o
|
|
4853
4865
|
});
|
|
4854
4866
|
}
|
|
4855
|
-
for (let N = 0; N <
|
|
4856
|
-
const R =
|
|
4867
|
+
for (let N = 0; N < T.length; N++) {
|
|
4868
|
+
const R = M[N], C = T[N];
|
|
4857
4869
|
l++;
|
|
4858
|
-
const L = Z(s,
|
|
4870
|
+
const L = Z(s, Me(R, C, u));
|
|
4859
4871
|
f.push({
|
|
4860
4872
|
type: a != null && a.test(C) ? S.EQUAL : S.ADD,
|
|
4861
4873
|
code: L,
|
|
@@ -4864,13 +4876,13 @@ function qt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
|
4864
4876
|
}
|
|
4865
4877
|
c = !0;
|
|
4866
4878
|
} else
|
|
4867
|
-
for (const N of
|
|
4879
|
+
for (const N of M) {
|
|
4868
4880
|
o++;
|
|
4869
4881
|
const R = Z(s, N);
|
|
4870
4882
|
f.push({ type: S.DELETE, code: R, delNum: o });
|
|
4871
4883
|
}
|
|
4872
4884
|
if (E === S.ADD)
|
|
4873
|
-
for (const N of
|
|
4885
|
+
for (const N of M) {
|
|
4874
4886
|
l++;
|
|
4875
4887
|
const R = Z(s, N);
|
|
4876
4888
|
f.push({ type: S.ADD, code: R, addNum: l });
|
|
@@ -4880,35 +4892,35 @@ function qt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
|
4880
4892
|
const v = f[_];
|
|
4881
4893
|
if (v.type === S.DELETE || v.type === S.ADD) {
|
|
4882
4894
|
const [m, E] = [Math.max(_ - t, 0), Math.min(_ + t + 1, f.length)];
|
|
4883
|
-
for (let
|
|
4884
|
-
f[
|
|
4895
|
+
for (let y = m; y < E; y++)
|
|
4896
|
+
f[y].fold = !1;
|
|
4885
4897
|
}
|
|
4886
4898
|
v.fold === void 0 && (v.fold = !0);
|
|
4887
4899
|
}
|
|
4888
4900
|
if (n === e) {
|
|
4889
4901
|
for (let _ = 0; _ < f.length; _++)
|
|
4890
4902
|
f[_].fold = !1;
|
|
4891
|
-
return
|
|
4903
|
+
return d;
|
|
4892
4904
|
}
|
|
4893
|
-
const
|
|
4905
|
+
const g = [];
|
|
4894
4906
|
let p = [];
|
|
4895
4907
|
for (let _ = 0; _ < f.length; _++) {
|
|
4896
4908
|
const v = f[_];
|
|
4897
4909
|
if (v.fold === !1) {
|
|
4898
|
-
p.length && (p[0].hideIndex =
|
|
4910
|
+
p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
|
|
4899
4911
|
lines: p,
|
|
4900
4912
|
fold: !0
|
|
4901
|
-
}), p = []),
|
|
4913
|
+
}), p = []), g.push(v);
|
|
4902
4914
|
continue;
|
|
4903
4915
|
}
|
|
4904
|
-
v.type === "equal" && (v.hide = !0, p.push(v)),
|
|
4916
|
+
v.type === "equal" && (v.hide = !0, p.push(v)), g.push(v);
|
|
4905
4917
|
}
|
|
4906
|
-
return p.length && (p[0].hideIndex =
|
|
4918
|
+
return p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
|
|
4907
4919
|
lines: p,
|
|
4908
4920
|
fold: !0
|
|
4909
|
-
}), p = []),
|
|
4921
|
+
}), p = []), d.changes = g, d;
|
|
4910
4922
|
}
|
|
4911
|
-
const
|
|
4923
|
+
const er = /* @__PURE__ */ he({
|
|
4912
4924
|
__name: "UnifiedLine",
|
|
4913
4925
|
props: {
|
|
4914
4926
|
line: null
|
|
@@ -4928,11 +4940,11 @@ function ie(n, e, s, u, h, t, r, i) {
|
|
|
4928
4940
|
options: a
|
|
4929
4941
|
};
|
|
4930
4942
|
}
|
|
4931
|
-
var
|
|
4943
|
+
var nr = function() {
|
|
4932
4944
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4933
4945
|
return e.line.hideIndex !== void 0 && e.line.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk text-center", attrs: { colspan: "2" }, on: { click: function(h) {
|
|
4934
4946
|
return u.emit("expand", e.line);
|
|
4935
|
-
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-hunk", attrs: { align: "left" } }, [e._v(" ⋯ ")])]) : e.line.hide ? e._e() : s("tr", [s("td", { staticClass: "blob-num", class: {
|
|
4947
|
+
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-hunk", attrs: { align: "left" } }, [e._v(" ⋯ ")])]) : e.line.hide ? e._e() : s("tr", { attrs: { "data-diff-change": e.line.type !== u.DiffType.EQUAL ? "" : void 0 } }, [s("td", { staticClass: "blob-num", class: {
|
|
4936
4948
|
"blob-num-deletion": e.line.type === u.DiffType.DELETE,
|
|
4937
4949
|
"blob-num-addition": e.line.type === u.DiffType.ADD,
|
|
4938
4950
|
"blob-num-context": e.line.type === u.DiffType.EQUAL,
|
|
@@ -4948,15 +4960,15 @@ var er = function() {
|
|
|
4948
4960
|
"blob-code-context": e.line.type === u.DiffType.EQUAL,
|
|
4949
4961
|
"blob-code-hunk": e.line.hide !== void 0
|
|
4950
4962
|
} }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(e.line.type) }, domProps: { innerHTML: e._s(e.line.code) } })])]);
|
|
4951
|
-
},
|
|
4952
|
-
Jt,
|
|
4963
|
+
}, tr = [], rr = /* @__PURE__ */ ie(
|
|
4953
4964
|
er,
|
|
4954
4965
|
nr,
|
|
4966
|
+
tr,
|
|
4955
4967
|
!1,
|
|
4956
4968
|
null,
|
|
4957
4969
|
null
|
|
4958
4970
|
);
|
|
4959
|
-
const
|
|
4971
|
+
const ir = rr.exports, sr = /* @__PURE__ */ he({
|
|
4960
4972
|
__name: "UnifiedViewer",
|
|
4961
4973
|
props: {
|
|
4962
4974
|
diffChange: null
|
|
@@ -4968,24 +4980,24 @@ const rr = tr.exports, ir = /* @__PURE__ */ he({
|
|
|
4968
4980
|
h.hide = !1, h.fold = !1;
|
|
4969
4981
|
});
|
|
4970
4982
|
}
|
|
4971
|
-
return { __sfc: !0, props: e, expandHandler: s, UnifiedLine:
|
|
4983
|
+
return { __sfc: !0, props: e, expandHandler: s, UnifiedLine: ir };
|
|
4972
4984
|
}
|
|
4973
4985
|
});
|
|
4974
|
-
var
|
|
4986
|
+
var ar = function() {
|
|
4975
4987
|
var h;
|
|
4976
4988
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4977
4989
|
return s("table", { staticClass: "diff-table" }, [s("tbody", e._l((h = e.diffChange) == null ? void 0 : h.changes, function(t, r) {
|
|
4978
4990
|
return s(u.UnifiedLine, { key: r, attrs: { line: t }, on: { expand: u.expandHandler } });
|
|
4979
4991
|
}), 1)]);
|
|
4980
|
-
},
|
|
4981
|
-
ir,
|
|
4992
|
+
}, or = [], lr = /* @__PURE__ */ ie(
|
|
4982
4993
|
sr,
|
|
4983
4994
|
ar,
|
|
4995
|
+
or,
|
|
4984
4996
|
!1,
|
|
4985
4997
|
null,
|
|
4986
4998
|
"238e1326"
|
|
4987
4999
|
);
|
|
4988
|
-
const
|
|
5000
|
+
const cr = lr.exports, ur = /* @__PURE__ */ he({
|
|
4989
5001
|
__name: "SplitLine",
|
|
4990
5002
|
props: {
|
|
4991
5003
|
splitLine: null
|
|
@@ -4995,21 +5007,21 @@ const lr = or.exports, cr = /* @__PURE__ */ he({
|
|
|
4995
5007
|
function s(h) {
|
|
4996
5008
|
return h === S.DELETE ? "-" : h === S.ADD ? "+" : "";
|
|
4997
5009
|
}
|
|
4998
|
-
function u(h) {
|
|
4999
|
-
const
|
|
5000
|
-
for (const
|
|
5001
|
-
|
|
5002
|
-
for (const
|
|
5003
|
-
|
|
5010
|
+
function u(h, t) {
|
|
5011
|
+
const r = h.currentTarget.closest(".file-diff-split"), i = r.querySelectorAll(".split-side-left"), a = r.querySelectorAll(".split-side-right");
|
|
5012
|
+
for (const o of a)
|
|
5013
|
+
o.classList.toggle("no-select", t === "left");
|
|
5014
|
+
for (const o of i)
|
|
5015
|
+
o.classList.toggle("no-select", t === "right");
|
|
5004
5016
|
}
|
|
5005
5017
|
return { __sfc: !0, emit: e, getCodeMarker: s, onSplitLineMousedown: u, DiffType: S };
|
|
5006
5018
|
}
|
|
5007
5019
|
});
|
|
5008
|
-
var
|
|
5020
|
+
var fr = function() {
|
|
5009
5021
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5010
5022
|
return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk", attrs: { colspan: "1" }, on: { click: function(h) {
|
|
5011
5023
|
return u.emit("expand", e.splitLine);
|
|
5012
|
-
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-inner blob-code-hunk", attrs: { colspan: "3", align: "left" } }, [e._v(" ⋯ ")])]) : e.splitLine.hide ? e._e() : s("tr", [e._l([e.splitLine.left, e.splitLine.right], function(h, t) {
|
|
5024
|
+
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-inner blob-code-hunk", attrs: { colspan: "3", align: "left" } }, [e._v(" ⋯ ")])]) : e.splitLine.hide ? e._e() : s("tr", { attrs: { "data-diff-change": e.splitLine.left.type === u.DiffType.DELETE || e.splitLine.right.type === u.DiffType.ADD ? "" : void 0 } }, [e._l([e.splitLine.left, e.splitLine.right], function(h, t) {
|
|
5013
5025
|
return [h.type === u.DiffType.EMPTY ? [s("td", { staticClass: "blob-num blob-num-empty empty-cell" }), s("td", { staticClass: "blob-code blob-code-empty empty-cell" })] : [s("td", { staticClass: "blob-num", class: {
|
|
5014
5026
|
"blob-num-deletion": h.type === u.DiffType.DELETE,
|
|
5015
5027
|
"blob-num-addition": h.type === u.DiffType.ADD,
|
|
@@ -5023,18 +5035,18 @@ var ur = function() {
|
|
|
5023
5035
|
"split-side-left": t === 0,
|
|
5024
5036
|
"split-side-right": t === 1
|
|
5025
5037
|
}, on: { mousedown: function(r) {
|
|
5026
|
-
return u.onSplitLineMousedown(t === 0 ? "left" : "right");
|
|
5038
|
+
return u.onSplitLineMousedown(r, t === 0 ? "left" : "right");
|
|
5027
5039
|
} } }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(h.type) }, domProps: { innerHTML: e._s(h.code) } })])]];
|
|
5028
5040
|
})], 2);
|
|
5029
|
-
},
|
|
5030
|
-
cr,
|
|
5041
|
+
}, gr = [], hr = /* @__PURE__ */ ie(
|
|
5031
5042
|
ur,
|
|
5032
5043
|
fr,
|
|
5044
|
+
gr,
|
|
5033
5045
|
!1,
|
|
5034
5046
|
null,
|
|
5035
5047
|
null
|
|
5036
5048
|
);
|
|
5037
|
-
const
|
|
5049
|
+
const dr = hr.exports, pr = /* @__PURE__ */ he({
|
|
5038
5050
|
__name: "SplitViewer",
|
|
5039
5051
|
props: {
|
|
5040
5052
|
diffChange: null
|
|
@@ -5046,55 +5058,55 @@ const hr = gr.exports, dr = /* @__PURE__ */ he({
|
|
|
5046
5058
|
h.hide = !1, h.fold = !1;
|
|
5047
5059
|
});
|
|
5048
5060
|
}
|
|
5049
|
-
return { __sfc: !0, props: e, expandHandler: s, SplitLine:
|
|
5061
|
+
return { __sfc: !0, props: e, expandHandler: s, SplitLine: dr };
|
|
5050
5062
|
}
|
|
5051
5063
|
});
|
|
5052
|
-
var
|
|
5064
|
+
var _r = function() {
|
|
5053
5065
|
var h;
|
|
5054
5066
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5055
5067
|
return s("table", { staticClass: "file-diff-split diff-table" }, [e._m(0), s("tbody", e._l((h = e.diffChange) == null ? void 0 : h.changes, function(t, r) {
|
|
5056
5068
|
return s(u.SplitLine, { key: r, attrs: { "split-line": t }, on: { expand: u.expandHandler } });
|
|
5057
5069
|
}), 1)]);
|
|
5058
|
-
},
|
|
5070
|
+
}, br = [function() {
|
|
5059
5071
|
var n = this, e = n._self._c;
|
|
5060
5072
|
return n._self._setupProxy, e("colgroup", [e("col", { attrs: { width: "44" } }), e("col"), e("col", { attrs: { width: "44" } }), e("col")]);
|
|
5061
|
-
}],
|
|
5062
|
-
dr,
|
|
5073
|
+
}], vr = /* @__PURE__ */ ie(
|
|
5063
5074
|
pr,
|
|
5064
5075
|
_r,
|
|
5076
|
+
br,
|
|
5065
5077
|
!1,
|
|
5066
5078
|
null,
|
|
5067
5079
|
"829edc33"
|
|
5068
5080
|
);
|
|
5069
|
-
const
|
|
5081
|
+
const mr = vr.exports, Er = {
|
|
5070
5082
|
name: "DownArrowIcon"
|
|
5071
5083
|
};
|
|
5072
|
-
var
|
|
5084
|
+
var yr = function() {
|
|
5073
5085
|
var e = this, s = e._self._c;
|
|
5074
5086
|
return s("svg", { attrs: { width: "1rem", viewBox: "0 0 512 512", xmlns: "http://www.w3.org/2000/svg" } }, [s("path", { attrs: { d: "M383.6,322.7L278.6,423c-5.8,6-13.7,9-22.4,9c-8.7,0-16.5-3-22.4-9L128.4,322.7c-12.5-11.9-12.5-31.3,0-43.2 c12.5-11.9,32.7-11.9,45.2,0l50.4,48.2v-217c0-16.9,14.3-30.6,32-30.6c17.7,0,32,13.7,32,30.6v217l50.4-48.2 c12.5-11.9,32.7-11.9,45.2,0C396.1,291.4,396.1,310.7,383.6,322.7z" } })]);
|
|
5075
|
-
}, wr = [],
|
|
5076
|
-
mr,
|
|
5087
|
+
}, wr = [], Ar = /* @__PURE__ */ ie(
|
|
5077
5088
|
Er,
|
|
5089
|
+
yr,
|
|
5078
5090
|
wr,
|
|
5079
5091
|
!1,
|
|
5080
5092
|
null,
|
|
5081
5093
|
null
|
|
5082
5094
|
);
|
|
5083
|
-
const
|
|
5095
|
+
const Nr = Ar.exports, Tr = {
|
|
5084
5096
|
name: "UpArrowIcon"
|
|
5085
5097
|
};
|
|
5086
5098
|
var Mr = function() {
|
|
5087
5099
|
var e = this, s = e._self._c;
|
|
5088
5100
|
return s("svg", { attrs: { width: "1rem", viewBox: "0 0 512 512", xmlns: "http://www.w3.org/2000/svg" } }, [s("path", { attrs: { d: "M128.4,189.3L233.4,89c5.8-6,13.7-9,22.4-9c8.7,0,16.5,3,22.4,9l105.4,100.3c12.5,11.9,12.5,31.3,0,43.2 c-12.5,11.9-32.7,11.9-45.2,0L288,184.4v217c0,16.9-14.3,30.6-32,30.6c-17.7,0-32-13.7-32-30.6v-217l-50.4,48.2 c-12.5,11.9-32.7,11.9-45.2,0C115.9,220.6,115.9,201.3,128.4,189.3z" } })]);
|
|
5089
|
-
},
|
|
5090
|
-
Nr,
|
|
5091
|
-
Mr,
|
|
5101
|
+
}, Dr = [], Sr = /* @__PURE__ */ ie(
|
|
5092
5102
|
Tr,
|
|
5103
|
+
Mr,
|
|
5104
|
+
Dr,
|
|
5093
5105
|
!1,
|
|
5094
5106
|
null,
|
|
5095
5107
|
null
|
|
5096
5108
|
);
|
|
5097
|
-
const
|
|
5109
|
+
const Cr = Sr.exports, Rr = /* @__PURE__ */ he({
|
|
5098
5110
|
__name: "CodeDiff",
|
|
5099
5111
|
props: {
|
|
5100
5112
|
newString: null,
|
|
@@ -5125,79 +5137,79 @@ const Sr = Dr.exports, Cr = /* @__PURE__ */ he({
|
|
|
5125
5137
|
return g = s.trim ? g.trim() : g, g = s.noDiffLineFeed ? g.replace(/(\r\n)/g, `
|
|
5126
5138
|
`) : g, g;
|
|
5127
5139
|
}), r = de(
|
|
5128
|
-
() => u.value ?
|
|
5129
|
-
), i =
|
|
5130
|
-
function l() {
|
|
5131
|
-
const g = document.querySelectorAll(".blob-code-addition");
|
|
5132
|
-
o.value < g.length - 1 && (o.value++, f(g));
|
|
5133
|
-
}
|
|
5140
|
+
() => u.value ? Jt(h.value, t.value, s.language, s.diffStyle, s.forceInlineComparison, s.context, s.ignoreMatchingLines) : qt(h.value, t.value, s.language, s.diffStyle, s.forceInlineComparison, s.context, s.ignoreMatchingLines)
|
|
5141
|
+
), i = Le(r.value), a = de(() => i.value.stat.additionsNum === 0 && i.value.stat.deletionsNum === 0), o = Le(-1), l = Le();
|
|
5134
5142
|
function c() {
|
|
5135
|
-
const g =
|
|
5136
|
-
o.value
|
|
5143
|
+
const g = l.value.querySelectorAll("[data-diff-change]");
|
|
5144
|
+
o.value < g.length - 1 && (o.value++, d(g));
|
|
5145
|
+
}
|
|
5146
|
+
function f() {
|
|
5147
|
+
const g = l.value.querySelectorAll("[data-diff-change]");
|
|
5148
|
+
o.value > 0 && (o.value--, d(g));
|
|
5137
5149
|
}
|
|
5138
|
-
function
|
|
5139
|
-
|
|
5140
|
-
const
|
|
5141
|
-
|
|
5150
|
+
function d(g) {
|
|
5151
|
+
l.value.querySelectorAll(".current-diff").forEach((_) => _.classList.remove("current-diff"));
|
|
5152
|
+
const p = g[o.value];
|
|
5153
|
+
p && (p.querySelectorAll(".blob-code").forEach((_) => _.classList.add("current-diff")), p.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
5142
5154
|
}
|
|
5143
|
-
return
|
|
5144
|
-
i.value = r.value, e("diff", {
|
|
5155
|
+
return Bn(() => s, () => {
|
|
5156
|
+
o.value = -1, i.value = r.value, e("diff", {
|
|
5145
5157
|
stat: {
|
|
5146
5158
|
isChanged: !a.value,
|
|
5147
5159
|
addNum: i.value.stat.additionsNum,
|
|
5148
5160
|
delNum: i.value.stat.deletionsNum
|
|
5149
5161
|
}
|
|
5150
5162
|
});
|
|
5151
|
-
}, { deep: !0, immediate: !0 }), { __sfc: !0, props: s, emits: e, isUnifiedViewer: u, oldString: h, newString: t, raw: r, diffChange: i, isNotChanged: a, currentDiffIndex: o,
|
|
5163
|
+
}, { deep: !0, immediate: !0 }), { __sfc: !0, props: s, emits: e, isUnifiedViewer: u, oldString: h, newString: t, raw: r, diffChange: i, isNotChanged: a, currentDiffIndex: o, root: l, goToNextDiff: c, goToPrevDiff: f, updateCurrentDiffHighlight: d, UnifiedViewer: cr, SplitViewer: mr, DownArrowIcon: Nr, UpArrowIcon: Cr };
|
|
5152
5164
|
}
|
|
5153
5165
|
});
|
|
5154
|
-
var
|
|
5166
|
+
var Lr = function() {
|
|
5155
5167
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5156
|
-
return s("div", { staticClass: "code-diff-view", style: { maxHeight: e.maxHeight }, attrs: { theme: e.theme } }, [e.hideHeader ? e._e() : s("div", { staticClass: "file-header" }, [u.isUnifiedViewer ? s("div", { staticClass: "file-info" }, [s("span", [s("div", { staticClass: "info-left" }, [e._v(e._s(e.filename))]), s("div", { staticClass: "info-left" }, [e._v(e._s(e.newFilename))])]), s("span", { staticClass: "diff-commandbar" }, [s("button", { staticClass: "command-item-button", attrs: { title: "Next Change" }, on: { click: u.goToNextDiff } }, [s(u.DownArrowIcon)], 1), s("button", { staticClass: "command-item-button", attrs: { title: "Previous Change" }, on: { click: u.goToPrevDiff } }, [s(u.UpArrowIcon)], 1)]), e.hideStat ? e._e() : s("span", { staticClass: "diff-stat" }, [e._t("stat", function() {
|
|
5168
|
+
return s("div", { ref: "root", staticClass: "code-diff-view", style: { maxHeight: e.maxHeight }, attrs: { theme: e.theme } }, [e.hideHeader ? e._e() : s("div", { staticClass: "file-header" }, [u.isUnifiedViewer ? s("div", { staticClass: "file-info" }, [s("span", [s("div", { staticClass: "info-left" }, [e._v(e._s(e.filename))]), s("div", { staticClass: "info-left" }, [e._v(e._s(e.newFilename))])]), s("span", { staticClass: "diff-commandbar" }, [s("button", { staticClass: "command-item-button", attrs: { title: "Next Change" }, on: { click: u.goToNextDiff } }, [s(u.DownArrowIcon)], 1), s("button", { staticClass: "command-item-button", attrs: { title: "Previous Change" }, on: { click: u.goToPrevDiff } }, [s(u.UpArrowIcon)], 1)]), e.hideStat ? e._e() : s("span", { staticClass: "diff-stat" }, [e._t("stat", function() {
|
|
5157
5169
|
return [s("span", { staticClass: "diff-stat-added" }, [e._v("+" + e._s(u.diffChange.stat.additionsNum) + " additions")]), s("span", { staticClass: "diff-stat-deleted" }, [e._v("-" + e._s(u.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5158
5170
|
}, { stat: u.diffChange.stat })], 2)]) : s("div", { staticClass: "file-info" }, [s("span", { staticClass: "info-left" }, [e._v(e._s(e.filename))]), s("span", { staticClass: "info-right" }, [s("span", { staticStyle: { "margin-left": "20px" } }, [e._v(e._s(e.newFilename))]), s("span", { staticClass: "diff-commandbar" }, [s("button", { staticClass: "command-item-button", attrs: { title: "Next Change" }, on: { click: u.goToNextDiff } }, [s(u.DownArrowIcon)], 1), s("button", { staticClass: "command-item-button", attrs: { title: "Previous Change" }, on: { click: u.goToPrevDiff } }, [s(u.UpArrowIcon)], 1)]), e.hideStat ? e._e() : s("span", { staticClass: "diff-stat" }, [e._t("stat", function() {
|
|
5159
5171
|
return [s("span", { staticClass: "diff-stat-added" }, [e._v("+" + e._s(u.diffChange.stat.additionsNum) + " additions")]), s("span", { staticClass: "diff-stat-deleted" }, [e._v("-" + e._s(u.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5160
5172
|
}, { stat: u.diffChange.stat })], 2)])])]), u.isUnifiedViewer ? s(u.UnifiedViewer, { attrs: { "diff-change": u.diffChange } }) : s(u.SplitViewer, { attrs: { "diff-change": u.diffChange } })], 1);
|
|
5161
|
-
},
|
|
5162
|
-
Cr,
|
|
5173
|
+
}, Or = [], Ir = /* @__PURE__ */ ie(
|
|
5163
5174
|
Rr,
|
|
5164
5175
|
Lr,
|
|
5176
|
+
Or,
|
|
5165
5177
|
!1,
|
|
5166
5178
|
null,
|
|
5167
5179
|
null
|
|
5168
5180
|
);
|
|
5169
|
-
const
|
|
5181
|
+
const Mn = Ir.exports, kr = /* @__PURE__ */ he({
|
|
5170
5182
|
__name: "CodeReader",
|
|
5171
5183
|
props: {
|
|
5172
5184
|
language: { default: "plaintext" },
|
|
5173
5185
|
text: null
|
|
5174
5186
|
},
|
|
5175
5187
|
setup(n) {
|
|
5176
|
-
return { __sfc: !0, CodeDiff:
|
|
5188
|
+
return { __sfc: !0, CodeDiff: Mn };
|
|
5177
5189
|
}
|
|
5178
5190
|
});
|
|
5179
|
-
var
|
|
5191
|
+
var Br = function() {
|
|
5180
5192
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5181
5193
|
return s(u.CodeDiff, { attrs: { "hide-header": "", language: e.language, "old-string": e.text, "new-string": e.text } });
|
|
5182
|
-
},
|
|
5183
|
-
Ir,
|
|
5194
|
+
}, $r = [], Pr = /* @__PURE__ */ ie(
|
|
5184
5195
|
kr,
|
|
5185
5196
|
Br,
|
|
5197
|
+
$r,
|
|
5186
5198
|
!1,
|
|
5187
5199
|
null,
|
|
5188
5200
|
"0c5adc58"
|
|
5189
5201
|
);
|
|
5190
|
-
const
|
|
5191
|
-
function
|
|
5192
|
-
n.component("CodeDiff",
|
|
5202
|
+
const Ur = Pr.exports;
|
|
5203
|
+
function xr(n) {
|
|
5204
|
+
n.component("CodeDiff", Mn), n.component("CodeReader", Ur);
|
|
5193
5205
|
}
|
|
5194
|
-
const
|
|
5195
|
-
install:
|
|
5206
|
+
const Hr = {
|
|
5207
|
+
install: xr,
|
|
5196
5208
|
hljs: Y
|
|
5197
5209
|
};
|
|
5198
5210
|
export {
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5211
|
+
Mn as CodeDiff,
|
|
5212
|
+
Ur as CodeReader,
|
|
5213
|
+
Hr as default,
|
|
5202
5214
|
Y as hljs
|
|
5203
5215
|
};
|