v-code-diff 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -18
- package/dist/v2/index.cjs.js +14 -14
- package/dist/v2/index.es.js +742 -736
- package/dist/v2/index.umd.js +14 -14
- package/dist/v2.7/index.cjs.js +10 -10
- package/dist/v2.7/index.es.js +599 -598
- package/dist/v2.7/index.umd.js +10 -10
- package/dist/v3/index.cjs.js +14 -14
- package/dist/v3/index.es.js +809 -808
- package/dist/v3/index.umd.js +13 -13
- package/package.json +3 -2
- package/src/CodeDiff.vue +4 -2
- package/src/utils.ts +6 -4
package/dist/v3/index.es.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
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:#ffffff}.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{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 table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .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)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { defineComponent as Ae, openBlock as G, createElementBlock as W, createElementVNode as
|
|
2
|
+
import { defineComponent as Ae, openBlock as G, createElementBlock as W, createElementVNode as P, normalizeClass as me, unref as F, toDisplayString as ee, createCommentVNode as ve, Fragment as pe, renderList as Ge, createBlock as Ce, computed as Ee, ref as Fn, watch as zn, normalizeStyle as xn, renderSlot as en } from "vue";
|
|
3
3
|
function ae() {
|
|
4
4
|
}
|
|
5
5
|
ae.prototype = {
|
|
6
6
|
diff: function(r, l) {
|
|
7
|
-
var
|
|
8
|
-
typeof
|
|
7
|
+
var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, g = f.callback;
|
|
8
|
+
typeof f == "function" && (g = f, f = {}), this.options = f;
|
|
9
9
|
var n = this;
|
|
10
|
-
function t(
|
|
10
|
+
function t(p) {
|
|
11
11
|
return g ? (setTimeout(function() {
|
|
12
|
-
g(void 0,
|
|
13
|
-
}, 0), !0) :
|
|
12
|
+
g(void 0, p);
|
|
13
|
+
}, 0), !0) : p;
|
|
14
14
|
}
|
|
15
15
|
r = this.castInput(r), l = this.castInput(l), r = this.removeEmpty(this.tokenize(r)), l = this.removeEmpty(this.tokenize(l));
|
|
16
16
|
var i = l.length, s = r.length, o = 1, a = i + s;
|
|
17
|
-
|
|
17
|
+
f.maxEditLength && (a = Math.min(a, f.maxEditLength));
|
|
18
18
|
var c = [{
|
|
19
19
|
newPos: -1,
|
|
20
20
|
components: []
|
|
21
|
-
}],
|
|
22
|
-
if (c[0].newPos + 1 >= i &&
|
|
21
|
+
}], u = this.extractCommon(c[0], l, r, 0);
|
|
22
|
+
if (c[0].newPos + 1 >= i && u + 1 >= s)
|
|
23
23
|
return t([{
|
|
24
24
|
value: this.join(l),
|
|
25
25
|
count: l.length
|
|
26
26
|
}]);
|
|
27
27
|
function h() {
|
|
28
|
-
for (var
|
|
29
|
-
var _ = void 0,
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
if (!
|
|
33
|
-
c[
|
|
28
|
+
for (var p = -1 * o; p <= o; p += 2) {
|
|
29
|
+
var _ = void 0, E = c[p - 1], m = c[p + 1], v = (m ? m.newPos : 0) - p;
|
|
30
|
+
E && (c[p - 1] = void 0);
|
|
31
|
+
var A = E && E.newPos + 1 < i, D = m && 0 <= v && v < s;
|
|
32
|
+
if (!A && !D) {
|
|
33
|
+
c[p] = void 0;
|
|
34
34
|
continue;
|
|
35
35
|
}
|
|
36
|
-
if (!
|
|
36
|
+
if (!A || D && E.newPos < m.newPos ? (_ = Kn(m), n.pushComponent(_.components, void 0, !0)) : (_ = E, _.newPos++, n.pushComponent(_.components, !0, void 0)), v = n.extractCommon(_, l, r, p), _.newPos + 1 >= i && v + 1 >= s)
|
|
37
37
|
return t(Gn(n, _.components, l, r, n.useLongestToken));
|
|
38
|
-
c[
|
|
38
|
+
c[p] = _;
|
|
39
39
|
}
|
|
40
40
|
o++;
|
|
41
41
|
}
|
|
42
42
|
if (g)
|
|
43
|
-
(function
|
|
43
|
+
(function p() {
|
|
44
44
|
setTimeout(function() {
|
|
45
45
|
if (o > a)
|
|
46
46
|
return g();
|
|
47
|
-
h() ||
|
|
47
|
+
h() || p();
|
|
48
48
|
}, 0);
|
|
49
49
|
})();
|
|
50
50
|
else
|
|
51
51
|
for (; o <= a; ) {
|
|
52
|
-
var
|
|
53
|
-
if (
|
|
54
|
-
return
|
|
52
|
+
var d = h();
|
|
53
|
+
if (d)
|
|
54
|
+
return d;
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
pushComponent: function(r, l,
|
|
57
|
+
pushComponent: function(r, l, f) {
|
|
58
58
|
var g = r[r.length - 1];
|
|
59
|
-
g && g.added === l && g.removed ===
|
|
59
|
+
g && g.added === l && g.removed === f ? r[r.length - 1] = {
|
|
60
60
|
count: g.count + 1,
|
|
61
61
|
added: l,
|
|
62
|
-
removed:
|
|
62
|
+
removed: f
|
|
63
63
|
} : r.push({
|
|
64
64
|
count: 1,
|
|
65
65
|
added: l,
|
|
66
|
-
removed:
|
|
66
|
+
removed: f
|
|
67
67
|
});
|
|
68
68
|
},
|
|
69
|
-
extractCommon: function(r, l,
|
|
70
|
-
for (var n = l.length, t =
|
|
69
|
+
extractCommon: function(r, l, f, g) {
|
|
70
|
+
for (var n = l.length, t = f.length, i = r.newPos, s = i - g, o = 0; i + 1 < n && s + 1 < t && this.equals(l[i + 1], f[s + 1]); )
|
|
71
71
|
i++, s++, o++;
|
|
72
72
|
return o && r.components.push({
|
|
73
73
|
count: o
|
|
@@ -77,8 +77,8 @@ ae.prototype = {
|
|
|
77
77
|
return this.options.comparator ? this.options.comparator(r, l) : r === l || this.options.ignoreCase && r.toLowerCase() === l.toLowerCase();
|
|
78
78
|
},
|
|
79
79
|
removeEmpty: function(r) {
|
|
80
|
-
for (var l = [],
|
|
81
|
-
r[
|
|
80
|
+
for (var l = [], f = 0; f < r.length; f++)
|
|
81
|
+
r[f] && l.push(r[f]);
|
|
82
82
|
return l;
|
|
83
83
|
},
|
|
84
84
|
castInput: function(r) {
|
|
@@ -91,28 +91,28 @@ ae.prototype = {
|
|
|
91
91
|
return r.join("");
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
function Gn(e, r, l,
|
|
94
|
+
function Gn(e, r, l, f, g) {
|
|
95
95
|
for (var n = 0, t = r.length, i = 0, s = 0; n < t; n++) {
|
|
96
96
|
var o = r[n];
|
|
97
97
|
if (o.removed) {
|
|
98
|
-
if (o.value = e.join(
|
|
98
|
+
if (o.value = e.join(f.slice(s, s + o.count)), s += o.count, n && r[n - 1].added) {
|
|
99
99
|
var c = r[n - 1];
|
|
100
100
|
r[n - 1] = r[n], r[n] = c;
|
|
101
101
|
}
|
|
102
102
|
} else {
|
|
103
103
|
if (!o.added && g) {
|
|
104
104
|
var a = l.slice(i, i + o.count);
|
|
105
|
-
a = a.map(function(h,
|
|
106
|
-
var
|
|
107
|
-
return
|
|
105
|
+
a = a.map(function(h, d) {
|
|
106
|
+
var p = f[s + d];
|
|
107
|
+
return p.length > h.length ? p : h;
|
|
108
108
|
}), o.value = e.join(a);
|
|
109
109
|
} else
|
|
110
110
|
o.value = e.join(l.slice(i, i + o.count));
|
|
111
111
|
i += o.count, o.added || (s += o.count);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
return t > 1 && typeof
|
|
114
|
+
var u = r[t - 1];
|
|
115
|
+
return t > 1 && typeof u.value == "string" && (u.added || u.removed) && e.equals("", u.value) && (r[t - 2].value += u.value, r.pop()), r;
|
|
116
116
|
}
|
|
117
117
|
function Kn(e) {
|
|
118
118
|
return {
|
|
@@ -150,9 +150,9 @@ var hn = new ae();
|
|
|
150
150
|
hn.tokenize = function(e) {
|
|
151
151
|
var r = [], l = e.split(/(\n|\r\n)/);
|
|
152
152
|
l[l.length - 1] || l.pop();
|
|
153
|
-
for (var
|
|
154
|
-
var g = l[
|
|
155
|
-
|
|
153
|
+
for (var f = 0; f < l.length; f++) {
|
|
154
|
+
var g = l[f];
|
|
155
|
+
f % 2 && !this.options.newlineIsToken ? r[r.length - 1] += g : (this.options.ignoreWhitespace && (g = g.trim()), r.push(g));
|
|
156
156
|
}
|
|
157
157
|
return r;
|
|
158
158
|
};
|
|
@@ -176,16 +176,16 @@ var Vn = Object.prototype.toString, ye = new ae();
|
|
|
176
176
|
ye.useLongestToken = !0;
|
|
177
177
|
ye.tokenize = hn.tokenize;
|
|
178
178
|
ye.castInput = function(e) {
|
|
179
|
-
var r = this.options, l = r.undefinedReplacement,
|
|
179
|
+
var r = this.options, l = r.undefinedReplacement, f = r.stringifyReplacer, g = f === void 0 ? function(n, t) {
|
|
180
180
|
return typeof t == "undefined" ? l : t;
|
|
181
|
-
} :
|
|
181
|
+
} : f;
|
|
182
182
|
return typeof e == "string" ? e : JSON.stringify(ze(e, null, null, g), g, " ");
|
|
183
183
|
};
|
|
184
184
|
ye.equals = function(e, r) {
|
|
185
185
|
return ae.prototype.equals.call(ye, e.replace(/,([\r\n])/g, "$1"), r.replace(/,([\r\n])/g, "$1"));
|
|
186
186
|
};
|
|
187
|
-
function ze(e, r, l,
|
|
188
|
-
r = r || [], l = l || [],
|
|
187
|
+
function ze(e, r, l, f, g) {
|
|
188
|
+
r = r || [], l = l || [], f && (e = f(g, e));
|
|
189
189
|
var n;
|
|
190
190
|
for (n = 0; n < r.length; n += 1)
|
|
191
191
|
if (r[n] === e)
|
|
@@ -193,7 +193,7 @@ function ze(e, r, l, u, g) {
|
|
|
193
193
|
var t;
|
|
194
194
|
if (Vn.call(e) === "[object Array]") {
|
|
195
195
|
for (r.push(e), t = new Array(e.length), l.push(t), n = 0; n < e.length; n += 1)
|
|
196
|
-
t[n] = ze(e[n], r, l,
|
|
196
|
+
t[n] = ze(e[n], r, l, f, g);
|
|
197
197
|
return r.pop(), l.pop(), t;
|
|
198
198
|
}
|
|
199
199
|
if (e && e.toJSON && (e = e.toJSON()), Oe(e) === "object" && e !== null) {
|
|
@@ -202,7 +202,7 @@ function ze(e, r, l, u, g) {
|
|
|
202
202
|
for (s in e)
|
|
203
203
|
e.hasOwnProperty(s) && i.push(s);
|
|
204
204
|
for (i.sort(), n = 0; n < i.length; n += 1)
|
|
205
|
-
s = i[n], t[s] = ze(e[s], r, l,
|
|
205
|
+
s = i[n], t[s] = ze(e[s], r, l, f, s);
|
|
206
206
|
r.pop(), l.pop();
|
|
207
207
|
} else
|
|
208
208
|
t = e;
|
|
@@ -222,7 +222,7 @@ var dn = { exports: {} };
|
|
|
222
222
|
(function(e) {
|
|
223
223
|
var r = function() {
|
|
224
224
|
this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = 0.5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = 0.5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
|
|
225
|
-
}, l = -1,
|
|
225
|
+
}, l = -1, f = 1, g = 0;
|
|
226
226
|
r.Diff = function(n, t) {
|
|
227
227
|
return [n, t];
|
|
228
228
|
}, r.prototype.diff_main = function(n, t, i, s) {
|
|
@@ -233,39 +233,39 @@ var dn = { exports: {} };
|
|
|
233
233
|
if (n == t)
|
|
234
234
|
return n ? [new r.Diff(g, n)] : [];
|
|
235
235
|
typeof i == "undefined" && (i = !0);
|
|
236
|
-
var a = i, c = this.diff_commonPrefix(n, t),
|
|
236
|
+
var a = i, c = this.diff_commonPrefix(n, t), u = n.substring(0, c);
|
|
237
237
|
n = n.substring(c), t = t.substring(c), c = this.diff_commonSuffix(n, t);
|
|
238
238
|
var h = n.substring(n.length - c);
|
|
239
239
|
n = n.substring(0, n.length - c), t = t.substring(0, t.length - c);
|
|
240
|
-
var
|
|
241
|
-
return
|
|
240
|
+
var d = this.diff_compute_(n, t, a, o);
|
|
241
|
+
return u && d.unshift(new r.Diff(g, u)), h && d.push(new r.Diff(g, h)), this.diff_cleanupMerge(d), d;
|
|
242
242
|
}, r.prototype.diff_compute_ = function(n, t, i, s) {
|
|
243
243
|
var o;
|
|
244
244
|
if (!n)
|
|
245
|
-
return [new r.Diff(
|
|
245
|
+
return [new r.Diff(f, t)];
|
|
246
246
|
if (!t)
|
|
247
247
|
return [new r.Diff(l, n)];
|
|
248
|
-
var a = n.length > t.length ? n : t, c = n.length > t.length ? t : n,
|
|
249
|
-
if (
|
|
248
|
+
var a = n.length > t.length ? n : t, c = n.length > t.length ? t : n, u = a.indexOf(c);
|
|
249
|
+
if (u != -1)
|
|
250
250
|
return o = [
|
|
251
|
-
new r.Diff(
|
|
251
|
+
new r.Diff(f, a.substring(0, u)),
|
|
252
252
|
new r.Diff(g, c),
|
|
253
253
|
new r.Diff(
|
|
254
|
-
|
|
255
|
-
a.substring(
|
|
254
|
+
f,
|
|
255
|
+
a.substring(u + c.length)
|
|
256
256
|
)
|
|
257
257
|
], n.length > t.length && (o[0][0] = o[2][0] = l), o;
|
|
258
258
|
if (c.length == 1)
|
|
259
259
|
return [
|
|
260
260
|
new r.Diff(l, n),
|
|
261
|
-
new r.Diff(
|
|
261
|
+
new r.Diff(f, t)
|
|
262
262
|
];
|
|
263
263
|
var h = this.diff_halfMatch_(n, t);
|
|
264
264
|
if (h) {
|
|
265
|
-
var
|
|
266
|
-
return
|
|
267
|
-
[new r.Diff(g,
|
|
268
|
-
|
|
265
|
+
var d = h[0], p = h[1], _ = h[2], E = h[3], m = h[4], v = this.diff_main(d, _, i, s), A = this.diff_main(p, E, i, s);
|
|
266
|
+
return v.concat(
|
|
267
|
+
[new r.Diff(g, m)],
|
|
268
|
+
A
|
|
269
269
|
);
|
|
270
270
|
}
|
|
271
271
|
return i && n.length > 100 && t.length > 100 ? this.diff_lineMode_(n, t, s) : this.diff_bisect_(n, t, s);
|
|
@@ -274,95 +274,95 @@ var dn = { exports: {} };
|
|
|
274
274
|
n = s.chars1, t = s.chars2;
|
|
275
275
|
var o = s.lineArray, a = this.diff_main(n, t, !1, i);
|
|
276
276
|
this.diff_charsToLines_(a, o), this.diff_cleanupSemantic(a), a.push(new r.Diff(g, ""));
|
|
277
|
-
for (var c = 0,
|
|
277
|
+
for (var c = 0, u = 0, h = 0, d = "", p = ""; c < a.length; ) {
|
|
278
278
|
switch (a[c][0]) {
|
|
279
|
-
case
|
|
280
|
-
h++,
|
|
279
|
+
case f:
|
|
280
|
+
h++, p += a[c][1];
|
|
281
281
|
break;
|
|
282
282
|
case l:
|
|
283
|
-
|
|
283
|
+
u++, d += a[c][1];
|
|
284
284
|
break;
|
|
285
285
|
case g:
|
|
286
|
-
if (
|
|
286
|
+
if (u >= 1 && h >= 1) {
|
|
287
287
|
a.splice(
|
|
288
|
-
c -
|
|
289
|
-
|
|
290
|
-
), c = c -
|
|
291
|
-
for (var _ = this.diff_main(
|
|
292
|
-
a.splice(c, 0, _[
|
|
288
|
+
c - u - h,
|
|
289
|
+
u + h
|
|
290
|
+
), c = c - u - h;
|
|
291
|
+
for (var _ = this.diff_main(d, p, !1, i), E = _.length - 1; E >= 0; E--)
|
|
292
|
+
a.splice(c, 0, _[E]);
|
|
293
293
|
c = c + _.length;
|
|
294
294
|
}
|
|
295
|
-
h = 0,
|
|
295
|
+
h = 0, u = 0, d = "", p = "";
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
c++;
|
|
299
299
|
}
|
|
300
300
|
return a.pop(), a;
|
|
301
301
|
}, r.prototype.diff_bisect_ = function(n, t, i) {
|
|
302
|
-
for (var s = n.length, o = t.length, a = Math.ceil((s + o) / 2), c = a,
|
|
303
|
-
h[
|
|
304
|
-
h[c + 1] = 0,
|
|
305
|
-
for (var _ = s - o,
|
|
306
|
-
for (var
|
|
307
|
-
var R = c +
|
|
308
|
-
|
|
309
|
-
for (var
|
|
310
|
-
|
|
311
|
-
if (h[R] =
|
|
312
|
-
|
|
313
|
-
else if (
|
|
314
|
-
|
|
315
|
-
else if (
|
|
316
|
-
var
|
|
317
|
-
if (
|
|
318
|
-
var
|
|
319
|
-
if (
|
|
320
|
-
return this.diff_bisectSplit_(n, t,
|
|
302
|
+
for (var s = n.length, o = t.length, a = Math.ceil((s + o) / 2), c = a, u = 2 * a, h = new Array(u), d = new Array(u), p = 0; p < u; p++)
|
|
303
|
+
h[p] = -1, d[p] = -1;
|
|
304
|
+
h[c + 1] = 0, d[c + 1] = 0;
|
|
305
|
+
for (var _ = s - o, E = _ % 2 != 0, m = 0, v = 0, A = 0, D = 0, S = 0; S < a && !((/* @__PURE__ */ new Date()).getTime() > i); S++) {
|
|
306
|
+
for (var M = -S + m; M <= S - v; M += 2) {
|
|
307
|
+
var R = c + M, L;
|
|
308
|
+
M == -S || M != S && h[R - 1] < h[R + 1] ? L = h[R + 1] : L = h[R - 1] + 1;
|
|
309
|
+
for (var I = L - M; L < s && I < o && n.charAt(L) == t.charAt(I); )
|
|
310
|
+
L++, I++;
|
|
311
|
+
if (h[R] = L, L > s)
|
|
312
|
+
v += 2;
|
|
313
|
+
else if (I > o)
|
|
314
|
+
m += 2;
|
|
315
|
+
else if (E) {
|
|
316
|
+
var $ = c + _ - M;
|
|
317
|
+
if ($ >= 0 && $ < u && d[$] != -1) {
|
|
318
|
+
var B = s - d[$];
|
|
319
|
+
if (L >= B)
|
|
320
|
+
return this.diff_bisectSplit_(n, t, L, I, i);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
for (var K = -
|
|
325
|
-
var
|
|
326
|
-
K == -
|
|
327
|
-
for (var Y =
|
|
328
|
-
|
|
329
|
-
if (
|
|
330
|
-
|
|
324
|
+
for (var K = -S + A; K <= S - D; K += 2) {
|
|
325
|
+
var $ = c + K, B;
|
|
326
|
+
K == -S || K != S && d[$ - 1] < d[$ + 1] ? B = d[$ + 1] : B = d[$ - 1] + 1;
|
|
327
|
+
for (var Y = B - K; B < s && Y < o && n.charAt(s - B - 1) == t.charAt(o - Y - 1); )
|
|
328
|
+
B++, Y++;
|
|
329
|
+
if (d[$] = B, B > s)
|
|
330
|
+
D += 2;
|
|
331
331
|
else if (Y > o)
|
|
332
|
-
|
|
333
|
-
else if (!
|
|
332
|
+
A += 2;
|
|
333
|
+
else if (!E) {
|
|
334
334
|
var R = c + _ - K;
|
|
335
|
-
if (R >= 0 && R <
|
|
336
|
-
var
|
|
337
|
-
if (
|
|
338
|
-
return this.diff_bisectSplit_(n, t,
|
|
335
|
+
if (R >= 0 && R < u && h[R] != -1) {
|
|
336
|
+
var L = h[R], I = c + L - R;
|
|
337
|
+
if (B = s - B, L >= B)
|
|
338
|
+
return this.diff_bisectSplit_(n, t, L, I, i);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
return [
|
|
344
344
|
new r.Diff(l, n),
|
|
345
|
-
new r.Diff(
|
|
345
|
+
new r.Diff(f, t)
|
|
346
346
|
];
|
|
347
347
|
}, r.prototype.diff_bisectSplit_ = function(n, t, i, s, o) {
|
|
348
|
-
var a = n.substring(0, i), c = t.substring(0, s),
|
|
349
|
-
return
|
|
348
|
+
var a = n.substring(0, i), c = t.substring(0, s), u = n.substring(i), h = t.substring(s), d = this.diff_main(a, c, !1, o), p = this.diff_main(u, h, !1, o);
|
|
349
|
+
return d.concat(p);
|
|
350
350
|
}, r.prototype.diff_linesToChars_ = function(n, t) {
|
|
351
351
|
var i = [], s = {};
|
|
352
352
|
i[0] = "";
|
|
353
353
|
function o(h) {
|
|
354
|
-
for (var
|
|
354
|
+
for (var d = "", p = 0, _ = -1, E = i.length; _ < h.length - 1; ) {
|
|
355
355
|
_ = h.indexOf(`
|
|
356
|
-
`,
|
|
357
|
-
var
|
|
358
|
-
(s.hasOwnProperty ? s.hasOwnProperty(
|
|
356
|
+
`, p), _ == -1 && (_ = h.length - 1);
|
|
357
|
+
var m = h.substring(p, _ + 1);
|
|
358
|
+
(s.hasOwnProperty ? s.hasOwnProperty(m) : s[m] !== void 0) ? d += String.fromCharCode(s[m]) : (E == a && (m = h.substring(p), _ = h.length), d += String.fromCharCode(E), s[m] = E, i[E++] = m), p = _ + 1;
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return d;
|
|
361
361
|
}
|
|
362
362
|
var a = 4e4, c = o(n);
|
|
363
363
|
a = 65535;
|
|
364
|
-
var
|
|
365
|
-
return { chars1: c, chars2:
|
|
364
|
+
var u = o(t);
|
|
365
|
+
return { chars1: c, chars2: u, lineArray: i };
|
|
366
366
|
}, r.prototype.diff_charsToLines_ = function(n, t) {
|
|
367
367
|
for (var i = 0; i < n.length; i++) {
|
|
368
368
|
for (var s = n[i][1], o = [], a = 0; a < s.length; a++)
|
|
@@ -390,7 +390,7 @@ var dn = { exports: {} };
|
|
|
390
390
|
if (n == t)
|
|
391
391
|
return o;
|
|
392
392
|
for (var a = 0, c = 1; ; ) {
|
|
393
|
-
var
|
|
393
|
+
var u = n.substring(o - c), h = t.indexOf(u);
|
|
394
394
|
if (h == -1)
|
|
395
395
|
return a;
|
|
396
396
|
c += h, (h == 0 || n.substring(o - c) == t.substring(0, c)) && (a = c, c++);
|
|
@@ -402,22 +402,22 @@ var dn = { exports: {} };
|
|
|
402
402
|
if (i.length < 4 || s.length * 2 < i.length)
|
|
403
403
|
return null;
|
|
404
404
|
var o = this;
|
|
405
|
-
function a(
|
|
406
|
-
for (var
|
|
405
|
+
function a(v, A, D) {
|
|
406
|
+
for (var S = v.substring(D, D + Math.floor(v.length / 4)), M = -1, R = "", L, I, $, B; (M = A.indexOf(S, M + 1)) != -1; ) {
|
|
407
407
|
var K = o.diff_commonPrefix(
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
v.substring(D),
|
|
409
|
+
A.substring(M)
|
|
410
410
|
), Y = o.diff_commonSuffix(
|
|
411
|
-
|
|
412
|
-
|
|
411
|
+
v.substring(0, D),
|
|
412
|
+
A.substring(0, M)
|
|
413
413
|
);
|
|
414
|
-
R.length < Y + K && (R =
|
|
414
|
+
R.length < Y + K && (R = A.substring(M - Y, M) + A.substring(M, M + K), L = v.substring(0, D - Y), I = v.substring(D + K), $ = A.substring(0, M - Y), B = A.substring(M + K));
|
|
415
415
|
}
|
|
416
|
-
return R.length * 2 >=
|
|
417
|
-
|
|
416
|
+
return R.length * 2 >= v.length ? [
|
|
417
|
+
L,
|
|
418
|
+
I,
|
|
418
419
|
$,
|
|
419
|
-
|
|
420
|
-
H,
|
|
420
|
+
B,
|
|
421
421
|
R
|
|
422
422
|
] : null;
|
|
423
423
|
}
|
|
@@ -425,77 +425,77 @@ var dn = { exports: {} };
|
|
|
425
425
|
i,
|
|
426
426
|
s,
|
|
427
427
|
Math.ceil(i.length / 4)
|
|
428
|
-
),
|
|
428
|
+
), u = a(
|
|
429
429
|
i,
|
|
430
430
|
s,
|
|
431
431
|
Math.ceil(i.length / 2)
|
|
432
432
|
), h;
|
|
433
|
-
if (!c && !
|
|
433
|
+
if (!c && !u)
|
|
434
434
|
return null;
|
|
435
|
-
|
|
436
|
-
var
|
|
437
|
-
n.length > t.length ? (
|
|
438
|
-
var
|
|
439
|
-
return [
|
|
435
|
+
u ? c ? h = c[4].length > u[4].length ? c : u : h = u : h = c;
|
|
436
|
+
var d, p, _, E;
|
|
437
|
+
n.length > t.length ? (d = h[0], p = h[1], _ = h[2], E = h[3]) : (_ = h[0], E = h[1], d = h[2], p = h[3]);
|
|
438
|
+
var m = h[4];
|
|
439
|
+
return [d, p, _, E, m];
|
|
440
440
|
}, r.prototype.diff_cleanupSemantic = function(n) {
|
|
441
|
-
for (var t = !1, i = [], s = 0, o = null, a = 0, c = 0,
|
|
442
|
-
n[a][0] == g ? (i[s++] = a, c = h,
|
|
441
|
+
for (var t = !1, i = [], s = 0, o = null, a = 0, c = 0, u = 0, h = 0, d = 0; a < n.length; )
|
|
442
|
+
n[a][0] == g ? (i[s++] = a, c = h, u = d, h = 0, d = 0, o = n[a][1]) : (n[a][0] == f ? h += n[a][1].length : d += n[a][1].length, o && o.length <= Math.max(c, u) && o.length <= Math.max(
|
|
443
443
|
h,
|
|
444
|
-
|
|
444
|
+
d
|
|
445
445
|
) && (n.splice(
|
|
446
446
|
i[s - 1],
|
|
447
447
|
0,
|
|
448
448
|
new r.Diff(l, o)
|
|
449
|
-
), n[i[s - 1] + 1][0] =
|
|
449
|
+
), n[i[s - 1] + 1][0] = f, s--, s--, a = s > 0 ? i[s - 1] : -1, c = 0, u = 0, h = 0, d = 0, o = null, t = !0)), a++;
|
|
450
450
|
for (t && this.diff_cleanupMerge(n), this.diff_cleanupSemanticLossless(n), a = 1; a < n.length; ) {
|
|
451
|
-
if (n[a - 1][0] == l && n[a][0] ==
|
|
452
|
-
var
|
|
453
|
-
|
|
451
|
+
if (n[a - 1][0] == l && n[a][0] == f) {
|
|
452
|
+
var p = n[a - 1][1], _ = n[a][1], E = this.diff_commonOverlap_(p, _), m = this.diff_commonOverlap_(_, p);
|
|
453
|
+
E >= m ? (E >= p.length / 2 || E >= _.length / 2) && (n.splice(a, 0, new r.Diff(
|
|
454
454
|
g,
|
|
455
|
-
_.substring(0,
|
|
456
|
-
)), n[a - 1][1] =
|
|
455
|
+
_.substring(0, E)
|
|
456
|
+
)), n[a - 1][1] = p.substring(0, p.length - E), n[a + 1][1] = _.substring(E), a++) : (m >= p.length / 2 || m >= _.length / 2) && (n.splice(a, 0, new r.Diff(
|
|
457
457
|
g,
|
|
458
|
-
|
|
459
|
-
)), n[a - 1][0] =
|
|
458
|
+
p.substring(0, m)
|
|
459
|
+
)), n[a - 1][0] = f, n[a - 1][1] = _.substring(0, _.length - m), n[a + 1][0] = l, n[a + 1][1] = p.substring(m), a++), a++;
|
|
460
460
|
}
|
|
461
461
|
a++;
|
|
462
462
|
}
|
|
463
463
|
}, r.prototype.diff_cleanupSemanticLossless = function(n) {
|
|
464
|
-
function t(
|
|
465
|
-
if (!
|
|
464
|
+
function t(m, v) {
|
|
465
|
+
if (!m || !v)
|
|
466
466
|
return 6;
|
|
467
|
-
var
|
|
468
|
-
return
|
|
467
|
+
var A = m.charAt(m.length - 1), D = v.charAt(0), S = A.match(r.nonAlphaNumericRegex_), M = D.match(r.nonAlphaNumericRegex_), R = S && A.match(r.whitespaceRegex_), L = M && D.match(r.whitespaceRegex_), I = R && A.match(r.linebreakRegex_), $ = L && D.match(r.linebreakRegex_), B = I && m.match(r.blanklineEndRegex_), K = $ && v.match(r.blanklineStartRegex_);
|
|
468
|
+
return B || K ? 5 : I || $ ? 4 : S && !R && L ? 3 : R || L ? 2 : S || M ? 1 : 0;
|
|
469
469
|
}
|
|
470
470
|
for (var i = 1; i < n.length - 1; ) {
|
|
471
471
|
if (n[i - 1][0] == g && n[i + 1][0] == g) {
|
|
472
472
|
var s = n[i - 1][1], o = n[i][1], a = n[i + 1][1], c = this.diff_commonSuffix(s, o);
|
|
473
473
|
if (c) {
|
|
474
|
-
var
|
|
475
|
-
s = s.substring(0, s.length - c), o =
|
|
474
|
+
var u = o.substring(o.length - c);
|
|
475
|
+
s = s.substring(0, s.length - c), o = u + o.substring(0, o.length - c), a = u + a;
|
|
476
476
|
}
|
|
477
|
-
for (var h = s,
|
|
477
|
+
for (var h = s, d = o, p = a, _ = t(s, o) + t(o, a); o.charAt(0) === a.charAt(0); ) {
|
|
478
478
|
s += o.charAt(0), o = o.substring(1) + a.charAt(0), a = a.substring(1);
|
|
479
|
-
var
|
|
480
|
-
|
|
479
|
+
var E = t(s, o) + t(o, a);
|
|
480
|
+
E >= _ && (_ = E, h = s, d = o, p = a);
|
|
481
481
|
}
|
|
482
|
-
n[i - 1][1] != h && (h ? n[i - 1][1] = h : (n.splice(i - 1, 1), i--), n[i][1] =
|
|
482
|
+
n[i - 1][1] != h && (h ? n[i - 1][1] = h : (n.splice(i - 1, 1), i--), n[i][1] = d, p ? n[i + 1][1] = p : (n.splice(i + 1, 1), i--));
|
|
483
483
|
}
|
|
484
484
|
i++;
|
|
485
485
|
}
|
|
486
486
|
}, r.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, r.whitespaceRegex_ = /\s/, r.linebreakRegex_ = /[\r\n]/, r.blanklineEndRegex_ = /\n\r?\n$/, r.blanklineStartRegex_ = /^\r?\n\r?\n/, r.prototype.diff_cleanupEfficiency = function(n) {
|
|
487
|
-
for (var t = !1, i = [], s = 0, o = null, a = 0, c = !1,
|
|
488
|
-
n[a][0] == g ? (n[a][1].length < this.Diff_EditCost && (h ||
|
|
487
|
+
for (var t = !1, i = [], s = 0, o = null, a = 0, c = !1, u = !1, h = !1, d = !1; a < n.length; )
|
|
488
|
+
n[a][0] == g ? (n[a][1].length < this.Diff_EditCost && (h || d) ? (i[s++] = a, c = h, u = d, o = n[a][1]) : (s = 0, o = null), h = d = !1) : (n[a][0] == l ? d = !0 : h = !0, o && (c && u && h && d || o.length < this.Diff_EditCost / 2 && c + u + h + d == 3) && (n.splice(
|
|
489
489
|
i[s - 1],
|
|
490
490
|
0,
|
|
491
491
|
new r.Diff(l, o)
|
|
492
|
-
), n[i[s - 1] + 1][0] =
|
|
492
|
+
), n[i[s - 1] + 1][0] = f, s--, o = null, c && u ? (h = d = !0, s = 0) : (s--, a = s > 0 ? i[s - 1] : -1, h = d = !1), t = !0)), a++;
|
|
493
493
|
t && this.diff_cleanupMerge(n);
|
|
494
494
|
}, r.prototype.diff_cleanupMerge = function(n) {
|
|
495
495
|
n.push(new r.Diff(g, ""));
|
|
496
496
|
for (var t = 0, i = 0, s = 0, o = "", a = "", c; t < n.length; )
|
|
497
497
|
switch (n[t][0]) {
|
|
498
|
-
case
|
|
498
|
+
case f:
|
|
499
499
|
s++, a += n[t][1], t++;
|
|
500
500
|
break;
|
|
501
501
|
case l:
|
|
@@ -512,39 +512,39 @@ var dn = { exports: {} };
|
|
|
512
512
|
), t++), a.length && (n.splice(
|
|
513
513
|
t,
|
|
514
514
|
0,
|
|
515
|
-
new r.Diff(
|
|
515
|
+
new r.Diff(f, a)
|
|
516
516
|
), t++), t++) : t !== 0 && n[t - 1][0] == g ? (n[t - 1][1] += n[t][1], n.splice(t, 1)) : t++, s = 0, i = 0, o = "", a = "";
|
|
517
517
|
break;
|
|
518
518
|
}
|
|
519
519
|
n[n.length - 1][1] === "" && n.pop();
|
|
520
|
-
var
|
|
520
|
+
var u = !1;
|
|
521
521
|
for (t = 1; t < n.length - 1; )
|
|
522
|
-
n[t - 1][0] == g && n[t + 1][0] == g && (n[t][1].substring(n[t][1].length - n[t - 1][1].length) == n[t - 1][1] ? (n[t][1] = n[t - 1][1] + n[t][1].substring(0, n[t][1].length - n[t - 1][1].length), n[t + 1][1] = n[t - 1][1] + n[t + 1][1], n.splice(t - 1, 1),
|
|
523
|
-
|
|
522
|
+
n[t - 1][0] == g && n[t + 1][0] == g && (n[t][1].substring(n[t][1].length - n[t - 1][1].length) == n[t - 1][1] ? (n[t][1] = n[t - 1][1] + n[t][1].substring(0, n[t][1].length - n[t - 1][1].length), n[t + 1][1] = n[t - 1][1] + n[t + 1][1], n.splice(t - 1, 1), u = !0) : n[t][1].substring(0, n[t + 1][1].length) == n[t + 1][1] && (n[t - 1][1] += n[t + 1][1], n[t][1] = n[t][1].substring(n[t + 1][1].length) + n[t + 1][1], n.splice(t + 1, 1), u = !0)), t++;
|
|
523
|
+
u && this.diff_cleanupMerge(n);
|
|
524
524
|
}, r.prototype.diff_xIndex = function(n, t) {
|
|
525
525
|
var i = 0, s = 0, o = 0, a = 0, c;
|
|
526
|
-
for (c = 0; c < n.length && (n[c][0] !==
|
|
526
|
+
for (c = 0; c < n.length && (n[c][0] !== f && (i += n[c][1].length), n[c][0] !== l && (s += n[c][1].length), !(i > t)); c++)
|
|
527
527
|
o = i, a = s;
|
|
528
528
|
return n.length != c && n[c][0] === l ? a : a + (t - o);
|
|
529
529
|
}, r.prototype.diff_prettyHtml = function(n) {
|
|
530
530
|
for (var t = [], i = /&/g, s = /</g, o = />/g, a = /\n/g, c = 0; c < n.length; c++) {
|
|
531
|
-
var
|
|
532
|
-
switch (
|
|
533
|
-
case
|
|
534
|
-
t[c] = '<ins style="background:#e6ffe6;">' +
|
|
531
|
+
var u = n[c][0], h = n[c][1], d = h.replace(i, "&").replace(s, "<").replace(o, ">").replace(a, "¶<br>");
|
|
532
|
+
switch (u) {
|
|
533
|
+
case f:
|
|
534
|
+
t[c] = '<ins style="background:#e6ffe6;">' + d + "</ins>";
|
|
535
535
|
break;
|
|
536
536
|
case l:
|
|
537
|
-
t[c] = '<del style="background:#ffe6e6;">' +
|
|
537
|
+
t[c] = '<del style="background:#ffe6e6;">' + d + "</del>";
|
|
538
538
|
break;
|
|
539
539
|
case g:
|
|
540
|
-
t[c] = "<span>" +
|
|
540
|
+
t[c] = "<span>" + d + "</span>";
|
|
541
541
|
break;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
return t.join("");
|
|
545
545
|
}, r.prototype.diff_text1 = function(n) {
|
|
546
546
|
for (var t = [], i = 0; i < n.length; i++)
|
|
547
|
-
n[i][0] !==
|
|
547
|
+
n[i][0] !== f && (t[i] = n[i][1]);
|
|
548
548
|
return t.join("");
|
|
549
549
|
}, r.prototype.diff_text2 = function(n) {
|
|
550
550
|
for (var t = [], i = 0; i < n.length; i++)
|
|
@@ -554,7 +554,7 @@ var dn = { exports: {} };
|
|
|
554
554
|
for (var t = 0, i = 0, s = 0, o = 0; o < n.length; o++) {
|
|
555
555
|
var a = n[o][0], c = n[o][1];
|
|
556
556
|
switch (a) {
|
|
557
|
-
case
|
|
557
|
+
case f:
|
|
558
558
|
i += c.length;
|
|
559
559
|
break;
|
|
560
560
|
case l:
|
|
@@ -569,7 +569,7 @@ var dn = { exports: {} };
|
|
|
569
569
|
}, r.prototype.diff_toDelta = function(n) {
|
|
570
570
|
for (var t = [], i = 0; i < n.length; i++)
|
|
571
571
|
switch (n[i][0]) {
|
|
572
|
-
case
|
|
572
|
+
case f:
|
|
573
573
|
t[i] = "+" + encodeURI(n[i][1]);
|
|
574
574
|
break;
|
|
575
575
|
case l:
|
|
@@ -582,22 +582,22 @@ var dn = { exports: {} };
|
|
|
582
582
|
return t.join(" ").replace(/%20/g, " ");
|
|
583
583
|
}, r.prototype.diff_fromDelta = function(n, t) {
|
|
584
584
|
for (var i = [], s = 0, o = 0, a = t.split(/\t/g), c = 0; c < a.length; c++) {
|
|
585
|
-
var
|
|
585
|
+
var u = a[c].substring(1);
|
|
586
586
|
switch (a[c].charAt(0)) {
|
|
587
587
|
case "+":
|
|
588
588
|
try {
|
|
589
|
-
i[s++] = new r.Diff(
|
|
590
|
-
} catch (
|
|
591
|
-
throw new Error("Illegal escape in diff_fromDelta: " +
|
|
589
|
+
i[s++] = new r.Diff(f, decodeURI(u));
|
|
590
|
+
} catch (p) {
|
|
591
|
+
throw new Error("Illegal escape in diff_fromDelta: " + u);
|
|
592
592
|
}
|
|
593
593
|
break;
|
|
594
594
|
case "-":
|
|
595
595
|
case "=":
|
|
596
|
-
var h = parseInt(
|
|
596
|
+
var h = parseInt(u, 10);
|
|
597
597
|
if (isNaN(h) || h < 0)
|
|
598
|
-
throw new Error("Invalid number in diff_fromDelta: " +
|
|
599
|
-
var
|
|
600
|
-
a[c].charAt(0) == "=" ? i[s++] = new r.Diff(g,
|
|
598
|
+
throw new Error("Invalid number in diff_fromDelta: " + u);
|
|
599
|
+
var d = n.substring(o, o += h);
|
|
600
|
+
a[c].charAt(0) == "=" ? i[s++] = new r.Diff(g, d) : i[s++] = new r.Diff(l, d);
|
|
601
601
|
break;
|
|
602
602
|
default:
|
|
603
603
|
if (a[c])
|
|
@@ -615,36 +615,36 @@ var dn = { exports: {} };
|
|
|
615
615
|
if (t.length > this.Match_MaxBits)
|
|
616
616
|
throw new Error("Pattern too long for this browser.");
|
|
617
617
|
var s = this.match_alphabet_(t), o = this;
|
|
618
|
-
function a(
|
|
619
|
-
var
|
|
620
|
-
return o.Match_Distance ?
|
|
618
|
+
function a(L, I) {
|
|
619
|
+
var $ = L / t.length, B = Math.abs(i - I);
|
|
620
|
+
return o.Match_Distance ? $ + B / o.Match_Distance : B ? 1 : $;
|
|
621
621
|
}
|
|
622
|
-
var c = this.Match_Threshold,
|
|
623
|
-
|
|
622
|
+
var c = this.Match_Threshold, u = n.indexOf(t, i);
|
|
623
|
+
u != -1 && (c = Math.min(a(0, u), c), u = n.lastIndexOf(t, i + t.length), u != -1 && (c = Math.min(a(0, u), c)));
|
|
624
624
|
var h = 1 << t.length - 1;
|
|
625
|
-
|
|
626
|
-
for (var
|
|
627
|
-
for (
|
|
628
|
-
a(
|
|
629
|
-
_ =
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
for (var
|
|
633
|
-
var
|
|
634
|
-
if (
|
|
635
|
-
var R = a(
|
|
625
|
+
u = -1;
|
|
626
|
+
for (var d, p, _ = t.length + n.length, E, m = 0; m < t.length; m++) {
|
|
627
|
+
for (d = 0, p = _; d < p; )
|
|
628
|
+
a(m, i + p) <= c ? d = p : _ = p, p = Math.floor((_ - d) / 2 + d);
|
|
629
|
+
_ = p;
|
|
630
|
+
var v = Math.max(1, i - p + 1), A = Math.min(i + p, n.length) + t.length, D = Array(A + 2);
|
|
631
|
+
D[A + 1] = (1 << m) - 1;
|
|
632
|
+
for (var S = A; S >= v; S--) {
|
|
633
|
+
var M = s[n.charAt(S - 1)];
|
|
634
|
+
if (m === 0 ? D[S] = (D[S + 1] << 1 | 1) & M : D[S] = (D[S + 1] << 1 | 1) & M | ((E[S + 1] | E[S]) << 1 | 1) | E[S + 1], D[S] & h) {
|
|
635
|
+
var R = a(m, S - 1);
|
|
636
636
|
if (R <= c)
|
|
637
|
-
if (c = R,
|
|
638
|
-
|
|
637
|
+
if (c = R, u = S - 1, u > i)
|
|
638
|
+
v = Math.max(1, 2 * i - u);
|
|
639
639
|
else
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
if (a(
|
|
643
|
+
if (a(m + 1, i) > c)
|
|
644
644
|
break;
|
|
645
|
-
|
|
645
|
+
E = D;
|
|
646
646
|
}
|
|
647
|
-
return
|
|
647
|
+
return u;
|
|
648
648
|
}, r.prototype.match_alphabet_ = function(n) {
|
|
649
649
|
for (var t = {}, i = 0; i < n.length; i++)
|
|
650
650
|
t[n.charAt(i)] = 0;
|
|
@@ -694,22 +694,22 @@ var dn = { exports: {} };
|
|
|
694
694
|
throw new Error("Unknown call format to patch_make.");
|
|
695
695
|
if (o.length === 0)
|
|
696
696
|
return [];
|
|
697
|
-
for (var a = [], c = new r.patch_obj(),
|
|
698
|
-
var
|
|
699
|
-
switch (!
|
|
700
|
-
case
|
|
701
|
-
c.diffs[
|
|
697
|
+
for (var a = [], c = new r.patch_obj(), u = 0, h = 0, d = 0, p = s, _ = s, E = 0; E < o.length; E++) {
|
|
698
|
+
var m = o[E][0], v = o[E][1];
|
|
699
|
+
switch (!u && m !== g && (c.start1 = h, c.start2 = d), m) {
|
|
700
|
+
case f:
|
|
701
|
+
c.diffs[u++] = o[E], c.length2 += v.length, _ = _.substring(0, d) + v + _.substring(d);
|
|
702
702
|
break;
|
|
703
703
|
case l:
|
|
704
|
-
c.length1 +=
|
|
704
|
+
c.length1 += v.length, c.diffs[u++] = o[E], _ = _.substring(0, d) + _.substring(d + v.length);
|
|
705
705
|
break;
|
|
706
706
|
case g:
|
|
707
|
-
|
|
707
|
+
v.length <= 2 * this.Patch_Margin && u && o.length != E + 1 ? (c.diffs[u++] = o[E], c.length1 += v.length, c.length2 += v.length) : v.length >= 2 * this.Patch_Margin && u && (this.patch_addContext_(c, p), a.push(c), c = new r.patch_obj(), u = 0, p = _, h = d);
|
|
708
708
|
break;
|
|
709
709
|
}
|
|
710
|
-
|
|
710
|
+
m !== f && (h += v.length), m !== l && (d += v.length);
|
|
711
711
|
}
|
|
712
|
-
return
|
|
712
|
+
return u && (this.patch_addContext_(c, p), a.push(c)), a;
|
|
713
713
|
}, r.prototype.patch_deepCopy = function(n) {
|
|
714
714
|
for (var t = [], i = 0; i < n.length; i++) {
|
|
715
715
|
var s = n[i], o = new r.patch_obj();
|
|
@@ -726,34 +726,34 @@ var dn = { exports: {} };
|
|
|
726
726
|
var i = this.patch_addPadding(n);
|
|
727
727
|
t = i + t + i, this.patch_splitMax(n);
|
|
728
728
|
for (var s = 0, o = [], a = 0; a < n.length; a++) {
|
|
729
|
-
var c = n[a].start2 + s,
|
|
730
|
-
if (
|
|
729
|
+
var c = n[a].start2 + s, u = this.diff_text1(n[a].diffs), h, d = -1;
|
|
730
|
+
if (u.length > this.Match_MaxBits ? (h = this.match_main(
|
|
731
731
|
t,
|
|
732
|
-
|
|
732
|
+
u.substring(0, this.Match_MaxBits),
|
|
733
733
|
c
|
|
734
|
-
), h != -1 && (
|
|
734
|
+
), h != -1 && (d = this.match_main(
|
|
735
735
|
t,
|
|
736
|
-
|
|
737
|
-
c +
|
|
738
|
-
), (
|
|
736
|
+
u.substring(u.length - this.Match_MaxBits),
|
|
737
|
+
c + u.length - this.Match_MaxBits
|
|
738
|
+
), (d == -1 || h >= d) && (h = -1))) : h = this.match_main(t, u, c), h == -1)
|
|
739
739
|
o[a] = !1, s -= n[a].length2 - n[a].length1;
|
|
740
740
|
else {
|
|
741
741
|
o[a] = !0, s = h - c;
|
|
742
|
-
var
|
|
743
|
-
if (
|
|
744
|
-
t = t.substring(0, h) + this.diff_text2(n[a].diffs) + t.substring(h +
|
|
742
|
+
var p;
|
|
743
|
+
if (d == -1 ? p = t.substring(h, h + u.length) : p = t.substring(h, d + this.Match_MaxBits), u == p)
|
|
744
|
+
t = t.substring(0, h) + this.diff_text2(n[a].diffs) + t.substring(h + u.length);
|
|
745
745
|
else {
|
|
746
|
-
var _ = this.diff_main(
|
|
747
|
-
if (
|
|
746
|
+
var _ = this.diff_main(u, p, !1);
|
|
747
|
+
if (u.length > this.Match_MaxBits && this.diff_levenshtein(_) / u.length > this.Patch_DeleteThreshold)
|
|
748
748
|
o[a] = !1;
|
|
749
749
|
else {
|
|
750
750
|
this.diff_cleanupSemanticLossless(_);
|
|
751
|
-
for (var
|
|
752
|
-
var
|
|
753
|
-
|
|
751
|
+
for (var E = 0, m, v = 0; v < n[a].diffs.length; v++) {
|
|
752
|
+
var A = n[a].diffs[v];
|
|
753
|
+
A[0] !== g && (m = this.diff_xIndex(_, E)), A[0] === f ? t = t.substring(0, h + m) + A[1] + t.substring(h + m) : A[0] === l && (t = t.substring(0, h + m) + t.substring(h + this.diff_xIndex(
|
|
754
754
|
_,
|
|
755
|
-
|
|
756
|
-
))),
|
|
755
|
+
E + A[1].length
|
|
756
|
+
))), A[0] !== l && (E += A[1].length);
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
}
|
|
@@ -785,17 +785,17 @@ var dn = { exports: {} };
|
|
|
785
785
|
var s = n[i];
|
|
786
786
|
n.splice(i--, 1);
|
|
787
787
|
for (var o = s.start1, a = s.start2, c = ""; s.diffs.length !== 0; ) {
|
|
788
|
-
var
|
|
789
|
-
for (
|
|
790
|
-
var
|
|
791
|
-
|
|
788
|
+
var u = new r.patch_obj(), h = !0;
|
|
789
|
+
for (u.start1 = o - c.length, u.start2 = a - c.length, c !== "" && (u.length1 = u.length2 = c.length, u.diffs.push(new r.Diff(g, c))); s.diffs.length !== 0 && u.length1 < t - this.Patch_Margin; ) {
|
|
790
|
+
var d = s.diffs[0][0], p = s.diffs[0][1];
|
|
791
|
+
d === f ? (u.length2 += p.length, a += p.length, u.diffs.push(s.diffs.shift()), h = !1) : d === l && u.diffs.length == 1 && u.diffs[0][0] == g && p.length > 2 * t ? (u.length1 += p.length, o += p.length, h = !1, u.diffs.push(new r.Diff(d, p)), s.diffs.shift()) : (p = p.substring(
|
|
792
792
|
0,
|
|
793
|
-
t -
|
|
794
|
-
),
|
|
793
|
+
t - u.length1 - this.Patch_Margin
|
|
794
|
+
), u.length1 += p.length, o += p.length, d === g ? (u.length2 += p.length, a += p.length) : h = !1, u.diffs.push(new r.Diff(d, p)), p == s.diffs[0][1] ? s.diffs.shift() : s.diffs[0][1] = s.diffs[0][1].substring(p.length));
|
|
795
795
|
}
|
|
796
|
-
c = this.diff_text2(
|
|
796
|
+
c = this.diff_text2(u.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
797
797
|
var _ = this.diff_text1(s.diffs).substring(0, this.Patch_Margin);
|
|
798
|
-
_ !== "" && (
|
|
798
|
+
_ !== "" && (u.length1 += _.length, u.length2 += _.length, u.diffs.length !== 0 && u.diffs[u.diffs.length - 1][0] === g ? u.diffs[u.diffs.length - 1][1] += _ : u.diffs.push(new r.Diff(g, _))), h || n.splice(++i, 0, u);
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
}, r.prototype.patch_toText = function(n) {
|
|
@@ -813,23 +813,23 @@ var dn = { exports: {} };
|
|
|
813
813
|
throw new Error("Invalid patch string: " + i[s]);
|
|
814
814
|
var c = new r.patch_obj();
|
|
815
815
|
for (t.push(c), c.start1 = parseInt(a[1], 10), a[2] === "" ? (c.start1--, c.length1 = 1) : a[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(a[2], 10)), c.start2 = parseInt(a[3], 10), a[4] === "" ? (c.start2--, c.length2 = 1) : a[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(a[4], 10)), s++; s < i.length; ) {
|
|
816
|
-
var
|
|
816
|
+
var u = i[s].charAt(0);
|
|
817
817
|
try {
|
|
818
818
|
var h = decodeURI(i[s].substring(1));
|
|
819
|
-
} catch (
|
|
819
|
+
} catch (d) {
|
|
820
820
|
throw new Error("Illegal escape in patch_fromText: " + h);
|
|
821
821
|
}
|
|
822
|
-
if (
|
|
822
|
+
if (u == "-")
|
|
823
823
|
c.diffs.push(new r.Diff(l, h));
|
|
824
|
-
else if (
|
|
825
|
-
c.diffs.push(new r.Diff(
|
|
826
|
-
else if (
|
|
824
|
+
else if (u == "+")
|
|
825
|
+
c.diffs.push(new r.Diff(f, h));
|
|
826
|
+
else if (u == " ")
|
|
827
827
|
c.diffs.push(new r.Diff(g, h));
|
|
828
828
|
else {
|
|
829
|
-
if (
|
|
829
|
+
if (u == "@")
|
|
830
830
|
break;
|
|
831
|
-
if (
|
|
832
|
-
throw new Error('Invalid patch mode "' +
|
|
831
|
+
if (u !== "")
|
|
832
|
+
throw new Error('Invalid patch mode "' + u + '" in: ' + h);
|
|
833
833
|
}
|
|
834
834
|
s++;
|
|
835
835
|
}
|
|
@@ -843,7 +843,7 @@ var dn = { exports: {} };
|
|
|
843
843
|
for (var i = ["@@ -" + n + " +" + t + ` @@
|
|
844
844
|
`], s, o = 0; o < this.diffs.length; o++) {
|
|
845
845
|
switch (this.diffs[o][0]) {
|
|
846
|
-
case
|
|
846
|
+
case f:
|
|
847
847
|
s = "+";
|
|
848
848
|
break;
|
|
849
849
|
case l:
|
|
@@ -857,7 +857,7 @@ var dn = { exports: {} };
|
|
|
857
857
|
`;
|
|
858
858
|
}
|
|
859
859
|
return i.join("").replace(/%20/g, " ");
|
|
860
|
-
}, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = l, e.exports.DIFF_INSERT =
|
|
860
|
+
}, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = l, e.exports.DIFF_INSERT = f, e.exports.DIFF_EQUAL = g;
|
|
861
861
|
})(dn);
|
|
862
862
|
var He = dn.exports;
|
|
863
863
|
function pn(e) {
|
|
@@ -866,8 +866,8 @@ function pn(e) {
|
|
|
866
866
|
} : e instanceof Set && (e.add = e.clear = e.delete = function() {
|
|
867
867
|
throw new Error("set is read-only");
|
|
868
868
|
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((r) => {
|
|
869
|
-
const l = e[r],
|
|
870
|
-
(
|
|
869
|
+
const l = e[r], f = typeof l;
|
|
870
|
+
(f === "object" || f === "function") && !Object.isFrozen(l) && pn(l);
|
|
871
871
|
}), e;
|
|
872
872
|
}
|
|
873
873
|
class rn {
|
|
@@ -886,11 +886,11 @@ function _n(e) {
|
|
|
886
886
|
}
|
|
887
887
|
function le(e, ...r) {
|
|
888
888
|
const l = /* @__PURE__ */ Object.create(null);
|
|
889
|
-
for (const
|
|
890
|
-
l[
|
|
891
|
-
return r.forEach(function(
|
|
892
|
-
for (const g in
|
|
893
|
-
l[g] =
|
|
889
|
+
for (const f in e)
|
|
890
|
+
l[f] = e[f];
|
|
891
|
+
return r.forEach(function(f) {
|
|
892
|
+
for (const g in f)
|
|
893
|
+
l[g] = f[g];
|
|
894
894
|
}), /** @type {T} */
|
|
895
895
|
l;
|
|
896
896
|
}
|
|
@@ -901,7 +901,7 @@ const qn = "</span>", sn = (e) => !!e.scope, et = (e, { prefix: r }) => {
|
|
|
901
901
|
const l = e.split(".");
|
|
902
902
|
return [
|
|
903
903
|
`${r}${l.shift()}`,
|
|
904
|
-
...l.map((
|
|
904
|
+
...l.map((f, g) => `${f}${"_".repeat(g + 1)}`)
|
|
905
905
|
].join(" ");
|
|
906
906
|
}
|
|
907
907
|
return `${r}${e}`;
|
|
@@ -1004,7 +1004,7 @@ class We {
|
|
|
1004
1004
|
* @param {Node} node
|
|
1005
1005
|
*/
|
|
1006
1006
|
static _walk(r, l) {
|
|
1007
|
-
return typeof l == "string" ? r.addText(l) : l.children && (r.openNode(l), l.children.forEach((
|
|
1007
|
+
return typeof l == "string" ? r.addText(l) : l.children && (r.openNode(l), l.children.forEach((f) => this._walk(r, f)), r.closeNode(l)), r;
|
|
1008
1008
|
}
|
|
1009
1009
|
/**
|
|
1010
1010
|
* @param {Node} node
|
|
@@ -1040,8 +1040,8 @@ class tt extends We {
|
|
|
1040
1040
|
* @param {string} name
|
|
1041
1041
|
*/
|
|
1042
1042
|
__addSublanguage(r, l) {
|
|
1043
|
-
const
|
|
1044
|
-
l && (
|
|
1043
|
+
const f = r.root;
|
|
1044
|
+
l && (f.scope = `language:${l}`), this.add(f);
|
|
1045
1045
|
}
|
|
1046
1046
|
toHTML() {
|
|
1047
1047
|
return new nt(this, this.options).value();
|
|
@@ -1070,7 +1070,7 @@ function st(e) {
|
|
|
1070
1070
|
return typeof r == "object" && r.constructor === Object ? (e.splice(e.length - 1, 1), r) : {};
|
|
1071
1071
|
}
|
|
1072
1072
|
function Qe(...e) {
|
|
1073
|
-
return "(" + (st(e).capture ? "" : "?:") + e.map((
|
|
1073
|
+
return "(" + (st(e).capture ? "" : "?:") + e.map((f) => we(f)).join("|") + ")";
|
|
1074
1074
|
}
|
|
1075
1075
|
function En(e) {
|
|
1076
1076
|
return new RegExp(e.toString() + "|").exec("").length - 1;
|
|
@@ -1082,10 +1082,10 @@ function at(e, r) {
|
|
|
1082
1082
|
const ot = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1083
1083
|
function Ze(e, { joinWith: r }) {
|
|
1084
1084
|
let l = 0;
|
|
1085
|
-
return e.map((
|
|
1085
|
+
return e.map((f) => {
|
|
1086
1086
|
l += 1;
|
|
1087
1087
|
const g = l;
|
|
1088
|
-
let n = we(
|
|
1088
|
+
let n = we(f), t = "";
|
|
1089
1089
|
for (; n.length > 0; ) {
|
|
1090
1090
|
const i = ot.exec(n);
|
|
1091
1091
|
if (!i) {
|
|
@@ -1095,7 +1095,7 @@ function Ze(e, { joinWith: r }) {
|
|
|
1095
1095
|
t += n.substring(0, i.index), n = n.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? t += "\\" + String(Number(i[1]) + g) : (t += i[0], i[0] === "(" && l++);
|
|
1096
1096
|
}
|
|
1097
1097
|
return t;
|
|
1098
|
-
}).map((
|
|
1098
|
+
}).map((f) => `(${f})`).join(r);
|
|
1099
1099
|
}
|
|
1100
1100
|
const lt = /\b\B/, mn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", vn = "\\b\\d+(\\.\\d+)?", yn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", wn = "\\b(0b[01]+)", ct = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ut = (e = {}) => {
|
|
1101
1101
|
const r = /^#![ ]*\//;
|
|
@@ -1110,8 +1110,8 @@ const lt = /\b\B/, mn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", vn = "\\b\\d+(\\.\
|
|
|
1110
1110
|
end: /$/,
|
|
1111
1111
|
relevance: 0,
|
|
1112
1112
|
/** @type {ModeCallback} */
|
|
1113
|
-
"on:begin": (l,
|
|
1114
|
-
l.index !== 0 &&
|
|
1113
|
+
"on:begin": (l, f) => {
|
|
1114
|
+
l.index !== 0 && f.ignoreMatch();
|
|
1115
1115
|
}
|
|
1116
1116
|
}, e);
|
|
1117
1117
|
}, Ne = {
|
|
@@ -1132,7 +1132,7 @@ const lt = /\b\B/, mn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", vn = "\\b\\d+(\\.\
|
|
|
1132
1132
|
}, ht = {
|
|
1133
1133
|
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
1134
1134
|
}, Be = function(e, r, l = {}) {
|
|
1135
|
-
const
|
|
1135
|
+
const f = le(
|
|
1136
1136
|
{
|
|
1137
1137
|
scope: "comment",
|
|
1138
1138
|
begin: e,
|
|
@@ -1141,7 +1141,7 @@ const lt = /\b\B/, mn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", vn = "\\b\\d+(\\.\
|
|
|
1141
1141
|
},
|
|
1142
1142
|
l
|
|
1143
1143
|
);
|
|
1144
|
-
|
|
1144
|
+
f.contains.push({
|
|
1145
1145
|
scope: "doctag",
|
|
1146
1146
|
// hack to avoid the space from being included. the space is necessary to
|
|
1147
1147
|
// match here to prevent the plain text rule below from gobbling up doctags
|
|
@@ -1171,7 +1171,7 @@ const lt = /\b\B/, mn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", vn = "\\b\\d+(\\.\
|
|
|
1171
1171
|
/[A-Za-z][a-z]{2,}/
|
|
1172
1172
|
// allow capitalized words at beginning of sentences
|
|
1173
1173
|
);
|
|
1174
|
-
return
|
|
1174
|
+
return f.contains.push(
|
|
1175
1175
|
{
|
|
1176
1176
|
// TODO: how to include ", (, ) without breaking grammars that use these for
|
|
1177
1177
|
// comment delimiters?
|
|
@@ -1196,7 +1196,7 @@ const lt = /\b\B/, mn = "[a-zA-Z]\\w*", Ye = "[a-zA-Z_]\\w*", vn = "\\b\\d+(\\.\
|
|
|
1196
1196
|
)
|
|
1197
1197
|
// look for 3 words in a row
|
|
1198
1198
|
}
|
|
1199
|
-
),
|
|
1199
|
+
), f;
|
|
1200
1200
|
}, dt = Be("//", "$"), pt = Be("/\\*", "\\*/"), _t = Be("#", "$"), bt = {
|
|
1201
1201
|
scope: "number",
|
|
1202
1202
|
begin: vn,
|
|
@@ -1304,8 +1304,8 @@ const Ot = (e, r) => {
|
|
|
1304
1304
|
if (e.starts)
|
|
1305
1305
|
throw new Error("beforeMatch cannot be used with starts");
|
|
1306
1306
|
const l = Object.assign({}, e);
|
|
1307
|
-
Object.keys(e).forEach((
|
|
1308
|
-
delete e[
|
|
1307
|
+
Object.keys(e).forEach((f) => {
|
|
1308
|
+
delete e[f];
|
|
1309
1309
|
}), e.keywords = l.keywords, e.begin = fe(l.beforeMatch, bn(l.begin)), e.starts = {
|
|
1310
1310
|
relevance: 0,
|
|
1311
1311
|
contains: [
|
|
@@ -1329,17 +1329,17 @@ const Ot = (e, r) => {
|
|
|
1329
1329
|
// common variable name
|
|
1330
1330
|
], It = "keyword";
|
|
1331
1331
|
function Nn(e, r, l = It) {
|
|
1332
|
-
const
|
|
1332
|
+
const f = /* @__PURE__ */ Object.create(null);
|
|
1333
1333
|
return typeof e == "string" ? g(l, e.split(" ")) : Array.isArray(e) ? g(l, e) : Object.keys(e).forEach(function(n) {
|
|
1334
1334
|
Object.assign(
|
|
1335
|
-
|
|
1335
|
+
f,
|
|
1336
1336
|
Nn(e[n], r, n)
|
|
1337
1337
|
);
|
|
1338
|
-
}),
|
|
1338
|
+
}), f;
|
|
1339
1339
|
function g(n, t) {
|
|
1340
1340
|
r && (t = t.map((i) => i.toLowerCase())), t.forEach(function(i) {
|
|
1341
1341
|
const s = i.split("|");
|
|
1342
|
-
|
|
1342
|
+
f[s[0]] = [n, kt(s[0], s[1])];
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
@@ -1357,10 +1357,10 @@ const on = {}, ue = (e) => {
|
|
|
1357
1357
|
on[`${e}/${r}`] || (console.log(`Deprecated as of ${e}. ${r}`), on[`${e}/${r}`] = !0);
|
|
1358
1358
|
}, Ie = new Error();
|
|
1359
1359
|
function An(e, r, { key: l }) {
|
|
1360
|
-
let
|
|
1360
|
+
let f = 0;
|
|
1361
1361
|
const g = e[l], n = {}, t = {};
|
|
1362
1362
|
for (let i = 1; i <= r.length; i++)
|
|
1363
|
-
t[i +
|
|
1363
|
+
t[i + f] = g[i], n[i + f] = !0, f += En(r[i - 1]);
|
|
1364
1364
|
e[l] = t, e[l]._emit = n, e[l]._multi = !0;
|
|
1365
1365
|
}
|
|
1366
1366
|
function $t(e) {
|
|
@@ -1413,11 +1413,11 @@ function Ft(e) {
|
|
|
1413
1413
|
const s = this.matcherRe.exec(i);
|
|
1414
1414
|
if (!s)
|
|
1415
1415
|
return null;
|
|
1416
|
-
const o = s.findIndex((c,
|
|
1416
|
+
const o = s.findIndex((c, u) => u > 0 && c !== void 0), a = this.matchIndexes[o];
|
|
1417
1417
|
return s.splice(0, o), Object.assign(s, a);
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
class
|
|
1420
|
+
class f {
|
|
1421
1421
|
constructor() {
|
|
1422
1422
|
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
1423
1423
|
}
|
|
@@ -1451,7 +1451,7 @@ function Ft(e) {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
function g(t) {
|
|
1454
|
-
const i = new
|
|
1454
|
+
const i = new f();
|
|
1455
1455
|
return t.contains.forEach((s) => i.addRule(s.begin, { rule: s, type: "begin" })), t.terminatorEnd && i.addRule(t.terminatorEnd, { type: "end" }), t.illegal && i.addRule(t.illegal, { type: "illegal" }), i;
|
|
1456
1456
|
}
|
|
1457
1457
|
function n(t, i) {
|
|
@@ -1512,7 +1512,7 @@ class Gt extends Error {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
const Fe = _n, cn = le, un = Symbol("nomatch"), Kt = 7, Tn = function(e) {
|
|
1515
|
-
const r = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ Object.create(null),
|
|
1515
|
+
const r = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ Object.create(null), f = [];
|
|
1516
1516
|
let g = !0;
|
|
1517
1517
|
const n = "Could not find the language '{}', did you forget to load/include a language module?", t = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
1518
1518
|
let i = {
|
|
@@ -1527,386 +1527,386 @@ const Fe = _n, cn = le, un = Symbol("nomatch"), Kt = 7, Tn = function(e) {
|
|
|
1527
1527
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1528
1528
|
__emitter: tt
|
|
1529
1529
|
};
|
|
1530
|
-
function s(
|
|
1531
|
-
return i.noHighlightRe.test(
|
|
1530
|
+
function s(b) {
|
|
1531
|
+
return i.noHighlightRe.test(b);
|
|
1532
1532
|
}
|
|
1533
|
-
function o(
|
|
1534
|
-
let
|
|
1535
|
-
|
|
1536
|
-
const
|
|
1537
|
-
if (
|
|
1538
|
-
const
|
|
1539
|
-
return
|
|
1533
|
+
function o(b) {
|
|
1534
|
+
let N = b.className + " ";
|
|
1535
|
+
N += b.parentNode ? b.parentNode.className : "";
|
|
1536
|
+
const O = i.languageDetectRe.exec(N);
|
|
1537
|
+
if (O) {
|
|
1538
|
+
const U = L(O[1]);
|
|
1539
|
+
return U || (ln(n.replace("{}", O[1])), ln("Falling back to no-highlight mode for this block.", b)), U ? O[1] : "no-highlight";
|
|
1540
1540
|
}
|
|
1541
|
-
return
|
|
1541
|
+
return N.split(/\s+/).find((U) => s(U) || L(U));
|
|
1542
1542
|
}
|
|
1543
|
-
function a(
|
|
1544
|
-
let
|
|
1545
|
-
typeof
|
|
1546
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), x =
|
|
1543
|
+
function a(b, N, O) {
|
|
1544
|
+
let U = "", x = "";
|
|
1545
|
+
typeof N == "object" ? (U = b, O = N.ignoreIllegals, x = N.language) : (he("10.7.0", "highlight(lang, code, ...args) has been deprecated."), he("10.7.0", `Please use highlight(code, options) instead.
|
|
1546
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), x = b, U = N), O === void 0 && (O = !0);
|
|
1547
1547
|
const X = {
|
|
1548
|
-
code:
|
|
1548
|
+
code: U,
|
|
1549
1549
|
language: x
|
|
1550
1550
|
};
|
|
1551
1551
|
oe("before:highlight", X);
|
|
1552
|
-
const q = X.result ? X.result : c(X.language, X.code,
|
|
1552
|
+
const q = X.result ? X.result : c(X.language, X.code, O);
|
|
1553
1553
|
return q.code = X.code, oe("after:highlight", q), q;
|
|
1554
1554
|
}
|
|
1555
|
-
function c(
|
|
1555
|
+
function c(b, N, O, U) {
|
|
1556
1556
|
const x = /* @__PURE__ */ Object.create(null);
|
|
1557
|
-
function X(
|
|
1558
|
-
return
|
|
1557
|
+
function X(y, T) {
|
|
1558
|
+
return y.keywords[T];
|
|
1559
1559
|
}
|
|
1560
1560
|
function q() {
|
|
1561
|
-
if (!
|
|
1561
|
+
if (!C.keywords) {
|
|
1562
1562
|
Q.addText(z);
|
|
1563
1563
|
return;
|
|
1564
1564
|
}
|
|
1565
|
-
let
|
|
1566
|
-
|
|
1567
|
-
let T =
|
|
1565
|
+
let y = 0;
|
|
1566
|
+
C.keywordPatternRe.lastIndex = 0;
|
|
1567
|
+
let T = C.keywordPatternRe.exec(z), k = "";
|
|
1568
1568
|
for (; T; ) {
|
|
1569
|
-
|
|
1570
|
-
const
|
|
1569
|
+
k += z.substring(y, T.index);
|
|
1570
|
+
const H = te.case_insensitive ? T[0].toLowerCase() : T[0], Z = X(C, H);
|
|
1571
1571
|
if (Z) {
|
|
1572
1572
|
const [re, Pn] = Z;
|
|
1573
|
-
if (Q.addText(
|
|
1574
|
-
|
|
1573
|
+
if (Q.addText(k), k = "", x[H] = (x[H] || 0) + 1, x[H] <= Kt && (Se += Pn), re.startsWith("_"))
|
|
1574
|
+
k += T[0];
|
|
1575
1575
|
else {
|
|
1576
1576
|
const Hn = te.classNameAliases[re] || re;
|
|
1577
1577
|
ne(T[0], Hn);
|
|
1578
1578
|
}
|
|
1579
1579
|
} else
|
|
1580
|
-
|
|
1581
|
-
|
|
1580
|
+
k += T[0];
|
|
1581
|
+
y = C.keywordPatternRe.lastIndex, T = C.keywordPatternRe.exec(z);
|
|
1582
1582
|
}
|
|
1583
|
-
|
|
1583
|
+
k += z.substring(y), Q.addText(k);
|
|
1584
1584
|
}
|
|
1585
1585
|
function Me() {
|
|
1586
1586
|
if (z === "")
|
|
1587
1587
|
return;
|
|
1588
|
-
let
|
|
1589
|
-
if (typeof
|
|
1590
|
-
if (!r[
|
|
1588
|
+
let y = null;
|
|
1589
|
+
if (typeof C.subLanguage == "string") {
|
|
1590
|
+
if (!r[C.subLanguage]) {
|
|
1591
1591
|
Q.addText(z);
|
|
1592
1592
|
return;
|
|
1593
1593
|
}
|
|
1594
|
-
|
|
1595
|
-
|
|
1594
|
+
y = c(C.subLanguage, z, !0, qe[C.subLanguage]), qe[C.subLanguage] = /** @type {CompiledMode} */
|
|
1595
|
+
y._top;
|
|
1596
1596
|
} else
|
|
1597
|
-
|
|
1598
|
-
|
|
1597
|
+
y = h(z, C.subLanguage.length ? C.subLanguage : null);
|
|
1598
|
+
C.relevance > 0 && (Se += y.relevance), Q.__addSublanguage(y._emitter, y.language);
|
|
1599
1599
|
}
|
|
1600
1600
|
function j() {
|
|
1601
|
-
|
|
1601
|
+
C.subLanguage != null ? Me() : q(), z = "";
|
|
1602
1602
|
}
|
|
1603
|
-
function ne(
|
|
1604
|
-
|
|
1603
|
+
function ne(y, T) {
|
|
1604
|
+
y !== "" && (Q.startScope(T), Q.addText(y), Q.endScope());
|
|
1605
1605
|
}
|
|
1606
|
-
function Xe(
|
|
1607
|
-
let
|
|
1608
|
-
const
|
|
1609
|
-
for (;
|
|
1610
|
-
if (!
|
|
1611
|
-
|
|
1606
|
+
function Xe(y, T) {
|
|
1607
|
+
let k = 1;
|
|
1608
|
+
const H = T.length - 1;
|
|
1609
|
+
for (; k <= H; ) {
|
|
1610
|
+
if (!y._emit[k]) {
|
|
1611
|
+
k++;
|
|
1612
1612
|
continue;
|
|
1613
1613
|
}
|
|
1614
|
-
const Z = te.classNameAliases[
|
|
1615
|
-
Z ? ne(re, Z) : (z = re, q(), z = ""),
|
|
1614
|
+
const Z = te.classNameAliases[y[k]] || y[k], re = T[k];
|
|
1615
|
+
Z ? ne(re, Z) : (z = re, q(), z = ""), k++;
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
|
-
function je(
|
|
1619
|
-
return
|
|
1618
|
+
function je(y, T) {
|
|
1619
|
+
return y.scope && typeof y.scope == "string" && Q.openNode(te.classNameAliases[y.scope] || y.scope), y.beginScope && (y.beginScope._wrap ? (ne(z, te.classNameAliases[y.beginScope._wrap] || y.beginScope._wrap), z = "") : y.beginScope._multi && (Xe(y.beginScope, T), z = "")), C = Object.create(y, { parent: { value: C } }), C;
|
|
1620
1620
|
}
|
|
1621
|
-
function Ve(
|
|
1622
|
-
let
|
|
1623
|
-
if (
|
|
1624
|
-
if (
|
|
1625
|
-
const Z = new rn(
|
|
1626
|
-
|
|
1621
|
+
function Ve(y, T, k) {
|
|
1622
|
+
let H = at(y.endRe, k);
|
|
1623
|
+
if (H) {
|
|
1624
|
+
if (y["on:end"]) {
|
|
1625
|
+
const Z = new rn(y);
|
|
1626
|
+
y["on:end"](T, Z), Z.isMatchIgnored && (H = !1);
|
|
1627
1627
|
}
|
|
1628
|
-
if (
|
|
1629
|
-
for (;
|
|
1630
|
-
|
|
1631
|
-
return
|
|
1628
|
+
if (H) {
|
|
1629
|
+
for (; y.endsParent && y.parent; )
|
|
1630
|
+
y = y.parent;
|
|
1631
|
+
return y;
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
|
-
if (
|
|
1635
|
-
return Ve(
|
|
1634
|
+
if (y.endsWithParent)
|
|
1635
|
+
return Ve(y.parent, T, k);
|
|
1636
1636
|
}
|
|
1637
|
-
function In(
|
|
1638
|
-
return
|
|
1637
|
+
function In(y) {
|
|
1638
|
+
return C.matcher.regexIndex === 0 ? (z += y[0], 1) : (Pe = !0, 0);
|
|
1639
1639
|
}
|
|
1640
|
-
function kn(
|
|
1641
|
-
const T =
|
|
1640
|
+
function kn(y) {
|
|
1641
|
+
const T = y[0], k = y.rule, H = new rn(k), Z = [k.__beforeBegin, k["on:begin"]];
|
|
1642
1642
|
for (const re of Z)
|
|
1643
|
-
if (re && (re(
|
|
1643
|
+
if (re && (re(y, H), H.isMatchIgnored))
|
|
1644
1644
|
return In(T);
|
|
1645
|
-
return
|
|
1645
|
+
return k.skip ? z += T : (k.excludeBegin && (z += T), j(), !k.returnBegin && !k.excludeBegin && (z = T)), je(k, y), k.returnBegin ? 0 : T.length;
|
|
1646
1646
|
}
|
|
1647
|
-
function Bn(
|
|
1648
|
-
const T =
|
|
1649
|
-
if (!
|
|
1647
|
+
function Bn(y) {
|
|
1648
|
+
const T = y[0], k = N.substring(y.index), H = Ve(C, y, k);
|
|
1649
|
+
if (!H)
|
|
1650
1650
|
return un;
|
|
1651
|
-
const Z =
|
|
1652
|
-
|
|
1651
|
+
const Z = C;
|
|
1652
|
+
C.endScope && C.endScope._wrap ? (j(), ne(T, C.endScope._wrap)) : C.endScope && C.endScope._multi ? (j(), Xe(C.endScope, y)) : Z.skip ? z += T : (Z.returnEnd || Z.excludeEnd || (z += T), j(), Z.excludeEnd && (z = T));
|
|
1653
1653
|
do
|
|
1654
|
-
|
|
1655
|
-
while (
|
|
1656
|
-
return
|
|
1654
|
+
C.scope && Q.closeNode(), !C.skip && !C.subLanguage && (Se += C.relevance), C = C.parent;
|
|
1655
|
+
while (C !== H.parent);
|
|
1656
|
+
return H.starts && je(H.starts, y), Z.returnEnd ? 0 : T.length;
|
|
1657
1657
|
}
|
|
1658
1658
|
function $n() {
|
|
1659
|
-
const
|
|
1660
|
-
for (let T =
|
|
1661
|
-
T.scope &&
|
|
1662
|
-
|
|
1659
|
+
const y = [];
|
|
1660
|
+
for (let T = C; T !== te; T = T.parent)
|
|
1661
|
+
T.scope && y.unshift(T.scope);
|
|
1662
|
+
y.forEach((T) => Q.openNode(T));
|
|
1663
1663
|
}
|
|
1664
1664
|
let Te = {};
|
|
1665
|
-
function Je(
|
|
1666
|
-
const
|
|
1667
|
-
if (z +=
|
|
1665
|
+
function Je(y, T) {
|
|
1666
|
+
const k = T && T[0];
|
|
1667
|
+
if (z += y, k == null)
|
|
1668
1668
|
return j(), 0;
|
|
1669
|
-
if (Te.type === "begin" && T.type === "end" && Te.index === T.index &&
|
|
1670
|
-
if (z +=
|
|
1671
|
-
const
|
|
1672
|
-
throw
|
|
1669
|
+
if (Te.type === "begin" && T.type === "end" && Te.index === T.index && k === "") {
|
|
1670
|
+
if (z += N.slice(T.index, T.index + 1), !g) {
|
|
1671
|
+
const H = new Error(`0 width match regex (${b})`);
|
|
1672
|
+
throw H.languageName = b, H.badRule = Te.rule, H;
|
|
1673
1673
|
}
|
|
1674
1674
|
return 1;
|
|
1675
1675
|
}
|
|
1676
1676
|
if (Te = T, T.type === "begin")
|
|
1677
1677
|
return kn(T);
|
|
1678
|
-
if (T.type === "illegal" && !
|
|
1679
|
-
const
|
|
1680
|
-
throw
|
|
1678
|
+
if (T.type === "illegal" && !O) {
|
|
1679
|
+
const H = new Error('Illegal lexeme "' + k + '" for mode "' + (C.scope || "<unnamed>") + '"');
|
|
1680
|
+
throw H.mode = C, H;
|
|
1681
1681
|
} else if (T.type === "end") {
|
|
1682
|
-
const
|
|
1683
|
-
if (
|
|
1684
|
-
return
|
|
1682
|
+
const H = Bn(T);
|
|
1683
|
+
if (H !== un)
|
|
1684
|
+
return H;
|
|
1685
1685
|
}
|
|
1686
|
-
if (T.type === "illegal" &&
|
|
1686
|
+
if (T.type === "illegal" && k === "")
|
|
1687
1687
|
return 1;
|
|
1688
1688
|
if (Ue > 1e5 && Ue > T.index * 3)
|
|
1689
1689
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1690
|
-
return z +=
|
|
1690
|
+
return z += k, k.length;
|
|
1691
1691
|
}
|
|
1692
|
-
const te =
|
|
1692
|
+
const te = L(b);
|
|
1693
1693
|
if (!te)
|
|
1694
|
-
throw ue(n.replace("{}",
|
|
1694
|
+
throw ue(n.replace("{}", b)), new Error('Unknown language: "' + b + '"');
|
|
1695
1695
|
const Un = Ft(te);
|
|
1696
|
-
let $e = "",
|
|
1696
|
+
let $e = "", C = U || Un;
|
|
1697
1697
|
const qe = {}, Q = new i.__emitter(i);
|
|
1698
1698
|
$n();
|
|
1699
1699
|
let z = "", Se = 0, ce = 0, Ue = 0, Pe = !1;
|
|
1700
1700
|
try {
|
|
1701
1701
|
if (te.__emitTokens)
|
|
1702
|
-
te.__emitTokens(
|
|
1702
|
+
te.__emitTokens(N, Q);
|
|
1703
1703
|
else {
|
|
1704
|
-
for (
|
|
1705
|
-
Ue++, Pe ? Pe = !1 :
|
|
1706
|
-
const
|
|
1707
|
-
if (!
|
|
1704
|
+
for (C.matcher.considerAll(); ; ) {
|
|
1705
|
+
Ue++, Pe ? Pe = !1 : C.matcher.considerAll(), C.matcher.lastIndex = ce;
|
|
1706
|
+
const y = C.matcher.exec(N);
|
|
1707
|
+
if (!y)
|
|
1708
1708
|
break;
|
|
1709
|
-
const T =
|
|
1710
|
-
ce =
|
|
1709
|
+
const T = N.substring(ce, y.index), k = Je(T, y);
|
|
1710
|
+
ce = y.index + k;
|
|
1711
1711
|
}
|
|
1712
|
-
Je(
|
|
1712
|
+
Je(N.substring(ce));
|
|
1713
1713
|
}
|
|
1714
1714
|
return Q.finalize(), $e = Q.toHTML(), {
|
|
1715
|
-
language:
|
|
1715
|
+
language: b,
|
|
1716
1716
|
value: $e,
|
|
1717
1717
|
relevance: Se,
|
|
1718
1718
|
illegal: !1,
|
|
1719
1719
|
_emitter: Q,
|
|
1720
|
-
_top:
|
|
1720
|
+
_top: C
|
|
1721
1721
|
};
|
|
1722
|
-
} catch (
|
|
1723
|
-
if (
|
|
1722
|
+
} catch (y) {
|
|
1723
|
+
if (y.message && y.message.includes("Illegal"))
|
|
1724
1724
|
return {
|
|
1725
|
-
language:
|
|
1726
|
-
value: Fe(
|
|
1725
|
+
language: b,
|
|
1726
|
+
value: Fe(N),
|
|
1727
1727
|
illegal: !0,
|
|
1728
1728
|
relevance: 0,
|
|
1729
1729
|
_illegalBy: {
|
|
1730
|
-
message:
|
|
1730
|
+
message: y.message,
|
|
1731
1731
|
index: ce,
|
|
1732
|
-
context:
|
|
1733
|
-
mode:
|
|
1732
|
+
context: N.slice(ce - 100, ce + 100),
|
|
1733
|
+
mode: y.mode,
|
|
1734
1734
|
resultSoFar: $e
|
|
1735
1735
|
},
|
|
1736
1736
|
_emitter: Q
|
|
1737
1737
|
};
|
|
1738
1738
|
if (g)
|
|
1739
1739
|
return {
|
|
1740
|
-
language:
|
|
1741
|
-
value: Fe(
|
|
1740
|
+
language: b,
|
|
1741
|
+
value: Fe(N),
|
|
1742
1742
|
illegal: !1,
|
|
1743
1743
|
relevance: 0,
|
|
1744
|
-
errorRaised:
|
|
1744
|
+
errorRaised: y,
|
|
1745
1745
|
_emitter: Q,
|
|
1746
|
-
_top:
|
|
1746
|
+
_top: C
|
|
1747
1747
|
};
|
|
1748
|
-
throw
|
|
1748
|
+
throw y;
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
const
|
|
1753
|
-
value: Fe(
|
|
1751
|
+
function u(b) {
|
|
1752
|
+
const N = {
|
|
1753
|
+
value: Fe(b),
|
|
1754
1754
|
illegal: !1,
|
|
1755
1755
|
relevance: 0,
|
|
1756
1756
|
_top: t,
|
|
1757
1757
|
_emitter: new i.__emitter(i)
|
|
1758
1758
|
};
|
|
1759
|
-
return
|
|
1759
|
+
return N._emitter.addText(b), N;
|
|
1760
1760
|
}
|
|
1761
|
-
function h(
|
|
1762
|
-
|
|
1763
|
-
const
|
|
1764
|
-
(j) => c(j,
|
|
1761
|
+
function h(b, N) {
|
|
1762
|
+
N = N || i.languages || Object.keys(r);
|
|
1763
|
+
const O = u(b), U = N.filter(L).filter($).map(
|
|
1764
|
+
(j) => c(j, b, !1)
|
|
1765
1765
|
);
|
|
1766
|
-
|
|
1767
|
-
const x =
|
|
1766
|
+
U.unshift(O);
|
|
1767
|
+
const x = U.sort((j, ne) => {
|
|
1768
1768
|
if (j.relevance !== ne.relevance)
|
|
1769
1769
|
return ne.relevance - j.relevance;
|
|
1770
1770
|
if (j.language && ne.language) {
|
|
1771
|
-
if (
|
|
1771
|
+
if (L(j.language).supersetOf === ne.language)
|
|
1772
1772
|
return 1;
|
|
1773
|
-
if (
|
|
1773
|
+
if (L(ne.language).supersetOf === j.language)
|
|
1774
1774
|
return -1;
|
|
1775
1775
|
}
|
|
1776
1776
|
return 0;
|
|
1777
1777
|
}), [X, q] = x, Me = X;
|
|
1778
1778
|
return Me.secondBest = q, Me;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1780
|
+
function d(b, N, O) {
|
|
1781
|
+
const U = N && l[N] || O;
|
|
1782
|
+
b.classList.add("hljs"), b.classList.add(`language-${U}`);
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1785
|
-
let
|
|
1786
|
-
const
|
|
1787
|
-
if (s(
|
|
1784
|
+
function p(b) {
|
|
1785
|
+
let N = null;
|
|
1786
|
+
const O = o(b);
|
|
1787
|
+
if (s(O))
|
|
1788
1788
|
return;
|
|
1789
1789
|
if (oe(
|
|
1790
1790
|
"before:highlightElement",
|
|
1791
|
-
{ el:
|
|
1792
|
-
),
|
|
1793
|
-
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",
|
|
1791
|
+
{ el: b, language: O }
|
|
1792
|
+
), b.dataset.highlighted) {
|
|
1793
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", b);
|
|
1794
1794
|
return;
|
|
1795
1795
|
}
|
|
1796
|
-
if (
|
|
1796
|
+
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))
|
|
1797
1797
|
throw new Gt(
|
|
1798
1798
|
"One of your code blocks includes unescaped HTML.",
|
|
1799
|
-
|
|
1799
|
+
b.innerHTML
|
|
1800
1800
|
);
|
|
1801
|
-
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1801
|
+
N = b;
|
|
1802
|
+
const U = N.textContent, x = O ? a(U, { language: O, ignoreIllegals: !0 }) : h(U);
|
|
1803
|
+
b.innerHTML = x.value, b.dataset.highlighted = "yes", d(b, O, x.language), b.result = {
|
|
1804
1804
|
language: x.language,
|
|
1805
1805
|
// TODO: remove with version 11.0
|
|
1806
1806
|
re: x.relevance,
|
|
1807
1807
|
relevance: x.relevance
|
|
1808
|
-
}, x.secondBest && (
|
|
1808
|
+
}, x.secondBest && (b.secondBest = {
|
|
1809
1809
|
language: x.secondBest.language,
|
|
1810
1810
|
relevance: x.secondBest.relevance
|
|
1811
|
-
}), oe("after:highlightElement", { el:
|
|
1811
|
+
}), oe("after:highlightElement", { el: b, result: x, text: U });
|
|
1812
1812
|
}
|
|
1813
|
-
function _(
|
|
1814
|
-
i = cn(i,
|
|
1813
|
+
function _(b) {
|
|
1814
|
+
i = cn(i, b);
|
|
1815
1815
|
}
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1816
|
+
const E = () => {
|
|
1817
|
+
A(), he("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1818
1818
|
};
|
|
1819
|
-
function
|
|
1820
|
-
|
|
1819
|
+
function m() {
|
|
1820
|
+
A(), he("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1821
1821
|
}
|
|
1822
|
-
let
|
|
1823
|
-
function
|
|
1822
|
+
let v = !1;
|
|
1823
|
+
function A() {
|
|
1824
1824
|
if (document.readyState === "loading") {
|
|
1825
|
-
|
|
1825
|
+
v = !0;
|
|
1826
1826
|
return;
|
|
1827
1827
|
}
|
|
1828
|
-
document.querySelectorAll(i.cssSelector).forEach(
|
|
1828
|
+
document.querySelectorAll(i.cssSelector).forEach(p);
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1831
|
-
|
|
1830
|
+
function D() {
|
|
1831
|
+
v && A();
|
|
1832
1832
|
}
|
|
1833
|
-
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
|
1834
|
-
function
|
|
1835
|
-
let
|
|
1833
|
+
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, !1);
|
|
1834
|
+
function S(b, N) {
|
|
1835
|
+
let O = null;
|
|
1836
1836
|
try {
|
|
1837
|
-
|
|
1838
|
-
} catch (
|
|
1839
|
-
if (ue("Language definition for '{}' could not be registered.".replace("{}",
|
|
1840
|
-
ue(
|
|
1837
|
+
O = N(e);
|
|
1838
|
+
} catch (U) {
|
|
1839
|
+
if (ue("Language definition for '{}' could not be registered.".replace("{}", b)), g)
|
|
1840
|
+
ue(U);
|
|
1841
1841
|
else
|
|
1842
|
-
throw
|
|
1843
|
-
|
|
1842
|
+
throw U;
|
|
1843
|
+
O = t;
|
|
1844
1844
|
}
|
|
1845
|
-
|
|
1845
|
+
O.name || (O.name = b), r[b] = O, O.rawDefinition = N.bind(null, e), O.aliases && I(O.aliases, { languageName: b });
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1848
|
-
delete r[
|
|
1849
|
-
for (const
|
|
1850
|
-
l[
|
|
1847
|
+
function M(b) {
|
|
1848
|
+
delete r[b];
|
|
1849
|
+
for (const N of Object.keys(l))
|
|
1850
|
+
l[N] === b && delete l[N];
|
|
1851
1851
|
}
|
|
1852
1852
|
function R() {
|
|
1853
1853
|
return Object.keys(r);
|
|
1854
1854
|
}
|
|
1855
|
-
function
|
|
1856
|
-
return
|
|
1855
|
+
function L(b) {
|
|
1856
|
+
return b = (b || "").toLowerCase(), r[b] || r[l[b]];
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1859
|
-
typeof
|
|
1860
|
-
l[
|
|
1858
|
+
function I(b, { languageName: N }) {
|
|
1859
|
+
typeof b == "string" && (b = [b]), b.forEach((O) => {
|
|
1860
|
+
l[O.toLowerCase()] = N;
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1864
|
-
const
|
|
1865
|
-
return
|
|
1863
|
+
function $(b) {
|
|
1864
|
+
const N = L(b);
|
|
1865
|
+
return N && !N.disableAutodetect;
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
Object.assign({ block:
|
|
1867
|
+
function B(b) {
|
|
1868
|
+
b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (N) => {
|
|
1869
|
+
b["before:highlightBlock"](
|
|
1870
|
+
Object.assign({ block: N.el }, N)
|
|
1871
1871
|
);
|
|
1872
|
-
}),
|
|
1873
|
-
|
|
1874
|
-
Object.assign({ block:
|
|
1872
|
+
}), b["after:highlightBlock"] && !b["after:highlightElement"] && (b["after:highlightElement"] = (N) => {
|
|
1873
|
+
b["after:highlightBlock"](
|
|
1874
|
+
Object.assign({ block: N.el }, N)
|
|
1875
1875
|
);
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
1878
|
-
function K(
|
|
1879
|
-
|
|
1878
|
+
function K(b) {
|
|
1879
|
+
B(b), f.push(b);
|
|
1880
1880
|
}
|
|
1881
|
-
function Y(
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1881
|
+
function Y(b) {
|
|
1882
|
+
const N = f.indexOf(b);
|
|
1883
|
+
N !== -1 && f.splice(N, 1);
|
|
1884
1884
|
}
|
|
1885
|
-
function oe(
|
|
1886
|
-
const
|
|
1887
|
-
|
|
1888
|
-
|
|
1885
|
+
function oe(b, N) {
|
|
1886
|
+
const O = b;
|
|
1887
|
+
f.forEach(function(U) {
|
|
1888
|
+
U[O] && U[O](N);
|
|
1889
1889
|
});
|
|
1890
1890
|
}
|
|
1891
|
-
function ge(
|
|
1892
|
-
return he("10.7.0", "highlightBlock will be removed entirely in v12.0"), he("10.7.0", "Please use highlightElement now."),
|
|
1891
|
+
function ge(b) {
|
|
1892
|
+
return he("10.7.0", "highlightBlock will be removed entirely in v12.0"), he("10.7.0", "Please use highlightElement now."), p(b);
|
|
1893
1893
|
}
|
|
1894
1894
|
Object.assign(e, {
|
|
1895
1895
|
highlight: a,
|
|
1896
1896
|
highlightAuto: h,
|
|
1897
|
-
highlightAll:
|
|
1898
|
-
highlightElement:
|
|
1897
|
+
highlightAll: A,
|
|
1898
|
+
highlightElement: p,
|
|
1899
1899
|
// TODO: Remove with v12 API
|
|
1900
1900
|
highlightBlock: ge,
|
|
1901
1901
|
configure: _,
|
|
1902
|
-
initHighlighting:
|
|
1903
|
-
initHighlightingOnLoad:
|
|
1904
|
-
registerLanguage:
|
|
1905
|
-
unregisterLanguage:
|
|
1902
|
+
initHighlighting: E,
|
|
1903
|
+
initHighlightingOnLoad: m,
|
|
1904
|
+
registerLanguage: S,
|
|
1905
|
+
unregisterLanguage: M,
|
|
1906
1906
|
listLanguages: R,
|
|
1907
|
-
getLanguage:
|
|
1908
|
-
registerAliases:
|
|
1909
|
-
autoDetection:
|
|
1907
|
+
getLanguage: L,
|
|
1908
|
+
registerAliases: I,
|
|
1909
|
+
autoDetection: $,
|
|
1910
1910
|
inherit: cn,
|
|
1911
1911
|
addPlugin: K,
|
|
1912
1912
|
removePlugin: Y
|
|
@@ -1921,8 +1921,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), x = E, B = A), C ===
|
|
|
1921
1921
|
optional: it,
|
|
1922
1922
|
anyNumberOfTimes: rt
|
|
1923
1923
|
};
|
|
1924
|
-
for (const
|
|
1925
|
-
typeof De[
|
|
1924
|
+
for (const b in De)
|
|
1925
|
+
typeof De[b] == "object" && pn(De[b]);
|
|
1926
1926
|
return Object.assign(e, De), e;
|
|
1927
1927
|
}, _e = Tn({});
|
|
1928
1928
|
_e.newInstance = () => Tn({});
|
|
@@ -1931,7 +1931,7 @@ _e.HighlightJS = _e;
|
|
|
1931
1931
|
_e.default = _e;
|
|
1932
1932
|
const J = /* @__PURE__ */ Jn(Wt);
|
|
1933
1933
|
function Qt(e) {
|
|
1934
|
-
const r = e.regex, l = r.concat(/[\p{L}_]/u, r.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u),
|
|
1934
|
+
const r = e.regex, l = r.concat(/[\p{L}_]/u, r.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), f = /[\p{L}0-9._:-]+/u, g = {
|
|
1935
1935
|
className: "symbol",
|
|
1936
1936
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1937
1937
|
}, n = {
|
|
@@ -1953,7 +1953,7 @@ function Qt(e) {
|
|
|
1953
1953
|
contains: [
|
|
1954
1954
|
{
|
|
1955
1955
|
className: "attr",
|
|
1956
|
-
begin:
|
|
1956
|
+
begin: f,
|
|
1957
1957
|
relevance: 0
|
|
1958
1958
|
},
|
|
1959
1959
|
{
|
|
@@ -2291,10 +2291,10 @@ const fn = "[A-Za-z$_][0-9A-Za-z$_]*", Zt = [
|
|
|
2291
2291
|
Dn
|
|
2292
2292
|
);
|
|
2293
2293
|
function Vt(e) {
|
|
2294
|
-
const r = e.regex, l = (
|
|
2295
|
-
const
|
|
2296
|
-
return
|
|
2297
|
-
},
|
|
2294
|
+
const r = e.regex, l = (N, { after: O }) => {
|
|
2295
|
+
const U = "</" + N[0].slice(1);
|
|
2296
|
+
return N.input.indexOf(U, O) !== -1;
|
|
2297
|
+
}, f = fn, g = {
|
|
2298
2298
|
begin: "<>",
|
|
2299
2299
|
end: "</>"
|
|
2300
2300
|
}, n = /<[A-Za-z0-9\\._:-]+\s*\/>/, t = {
|
|
@@ -2304,8 +2304,8 @@ function Vt(e) {
|
|
|
2304
2304
|
* @param {RegExpMatchArray} match
|
|
2305
2305
|
* @param {CallbackResponse} response
|
|
2306
2306
|
*/
|
|
2307
|
-
isTrulyOpeningTag: (
|
|
2308
|
-
const
|
|
2307
|
+
isTrulyOpeningTag: (N, O) => {
|
|
2308
|
+
const U = N[0].length + N.index, x = N.input[U];
|
|
2309
2309
|
if (
|
|
2310
2310
|
// HTML should not include another raw `<` inside a tag
|
|
2311
2311
|
// nested type?
|
|
@@ -2314,18 +2314,18 @@ function Vt(e) {
|
|
|
2314
2314
|
// `<T, A extends keyof T, V>`
|
|
2315
2315
|
x === ","
|
|
2316
2316
|
) {
|
|
2317
|
-
|
|
2317
|
+
O.ignoreMatch();
|
|
2318
2318
|
return;
|
|
2319
2319
|
}
|
|
2320
|
-
x === ">" && (l(
|
|
2320
|
+
x === ">" && (l(N, { after: U }) || O.ignoreMatch());
|
|
2321
2321
|
let X;
|
|
2322
|
-
const q =
|
|
2322
|
+
const q = N.input.substring(U);
|
|
2323
2323
|
if (X = q.match(/^\s*=/)) {
|
|
2324
|
-
|
|
2324
|
+
O.ignoreMatch();
|
|
2325
2325
|
return;
|
|
2326
2326
|
}
|
|
2327
2327
|
if ((X = q.match(/^\s+extends\s+/)) && X.index === 0) {
|
|
2328
|
-
|
|
2328
|
+
O.ignoreMatch();
|
|
2329
2329
|
return;
|
|
2330
2330
|
}
|
|
2331
2331
|
}
|
|
@@ -2352,7 +2352,7 @@ function Vt(e) {
|
|
|
2352
2352
|
{ begin: "\\b0[0-7]+n?\\b" }
|
|
2353
2353
|
],
|
|
2354
2354
|
relevance: 0
|
|
2355
|
-
},
|
|
2355
|
+
}, u = {
|
|
2356
2356
|
className: "subst",
|
|
2357
2357
|
begin: "\\$\\{",
|
|
2358
2358
|
end: "\\}",
|
|
@@ -2367,11 +2367,11 @@ function Vt(e) {
|
|
|
2367
2367
|
returnEnd: !1,
|
|
2368
2368
|
contains: [
|
|
2369
2369
|
e.BACKSLASH_ESCAPE,
|
|
2370
|
-
|
|
2370
|
+
u
|
|
2371
2371
|
],
|
|
2372
2372
|
subLanguage: "xml"
|
|
2373
2373
|
}
|
|
2374
|
-
},
|
|
2374
|
+
}, d = {
|
|
2375
2375
|
begin: "css`",
|
|
2376
2376
|
end: "",
|
|
2377
2377
|
starts: {
|
|
@@ -2379,11 +2379,11 @@ function Vt(e) {
|
|
|
2379
2379
|
returnEnd: !1,
|
|
2380
2380
|
contains: [
|
|
2381
2381
|
e.BACKSLASH_ESCAPE,
|
|
2382
|
-
|
|
2382
|
+
u
|
|
2383
2383
|
],
|
|
2384
2384
|
subLanguage: "css"
|
|
2385
2385
|
}
|
|
2386
|
-
},
|
|
2386
|
+
}, p = {
|
|
2387
2387
|
begin: "gql`",
|
|
2388
2388
|
end: "",
|
|
2389
2389
|
starts: {
|
|
@@ -2391,7 +2391,7 @@ function Vt(e) {
|
|
|
2391
2391
|
returnEnd: !1,
|
|
2392
2392
|
contains: [
|
|
2393
2393
|
e.BACKSLASH_ESCAPE,
|
|
2394
|
-
|
|
2394
|
+
u
|
|
2395
2395
|
],
|
|
2396
2396
|
subLanguage: "graphql"
|
|
2397
2397
|
}
|
|
@@ -2401,9 +2401,9 @@ function Vt(e) {
|
|
|
2401
2401
|
end: "`",
|
|
2402
2402
|
contains: [
|
|
2403
2403
|
e.BACKSLASH_ESCAPE,
|
|
2404
|
-
|
|
2404
|
+
u
|
|
2405
2405
|
]
|
|
2406
|
-
},
|
|
2406
|
+
}, m = {
|
|
2407
2407
|
className: "comment",
|
|
2408
2408
|
variants: [
|
|
2409
2409
|
e.COMMENT(
|
|
@@ -2430,7 +2430,7 @@ function Vt(e) {
|
|
|
2430
2430
|
},
|
|
2431
2431
|
{
|
|
2432
2432
|
className: "variable",
|
|
2433
|
-
begin:
|
|
2433
|
+
begin: f + "(?=\\s*(-)|$)",
|
|
2434
2434
|
endsParent: !0,
|
|
2435
2435
|
relevance: 0
|
|
2436
2436
|
},
|
|
@@ -2448,12 +2448,12 @@ function Vt(e) {
|
|
|
2448
2448
|
e.C_BLOCK_COMMENT_MODE,
|
|
2449
2449
|
e.C_LINE_COMMENT_MODE
|
|
2450
2450
|
]
|
|
2451
|
-
},
|
|
2451
|
+
}, v = [
|
|
2452
2452
|
e.APOS_STRING_MODE,
|
|
2453
2453
|
e.QUOTE_STRING_MODE,
|
|
2454
2454
|
h,
|
|
2455
|
-
p,
|
|
2456
2455
|
d,
|
|
2456
|
+
p,
|
|
2457
2457
|
_,
|
|
2458
2458
|
// Skip numbers when they are part of a variable name
|
|
2459
2459
|
{ match: /\$\d+/ },
|
|
@@ -2462,7 +2462,7 @@ function Vt(e) {
|
|
|
2462
2462
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
2463
2463
|
// hljs.REGEXP_MODE
|
|
2464
2464
|
];
|
|
2465
|
-
|
|
2465
|
+
u.contains = v.concat({
|
|
2466
2466
|
// we need to pair up {} inside our subst to prevent
|
|
2467
2467
|
// it from ending too early by matching another }
|
|
2468
2468
|
begin: /\{/,
|
|
@@ -2470,36 +2470,36 @@ function Vt(e) {
|
|
|
2470
2470
|
keywords: i,
|
|
2471
2471
|
contains: [
|
|
2472
2472
|
"self"
|
|
2473
|
-
].concat(
|
|
2473
|
+
].concat(v)
|
|
2474
2474
|
});
|
|
2475
|
-
const
|
|
2475
|
+
const A = [].concat(m, u.contains), D = A.concat([
|
|
2476
2476
|
// eat recursive parens in sub expressions
|
|
2477
2477
|
{
|
|
2478
2478
|
begin: /\(/,
|
|
2479
2479
|
end: /\)/,
|
|
2480
2480
|
keywords: i,
|
|
2481
|
-
contains: ["self"].concat(
|
|
2481
|
+
contains: ["self"].concat(A)
|
|
2482
2482
|
}
|
|
2483
|
-
]),
|
|
2483
|
+
]), S = {
|
|
2484
2484
|
className: "params",
|
|
2485
2485
|
begin: /\(/,
|
|
2486
2486
|
end: /\)/,
|
|
2487
2487
|
excludeBegin: !0,
|
|
2488
2488
|
excludeEnd: !0,
|
|
2489
2489
|
keywords: i,
|
|
2490
|
-
contains:
|
|
2491
|
-
},
|
|
2490
|
+
contains: D
|
|
2491
|
+
}, M = {
|
|
2492
2492
|
variants: [
|
|
2493
2493
|
// class Car extends vehicle
|
|
2494
2494
|
{
|
|
2495
2495
|
match: [
|
|
2496
2496
|
/class/,
|
|
2497
2497
|
/\s+/,
|
|
2498
|
-
|
|
2498
|
+
f,
|
|
2499
2499
|
/\s+/,
|
|
2500
2500
|
/extends/,
|
|
2501
2501
|
/\s+/,
|
|
2502
|
-
r.concat(
|
|
2502
|
+
r.concat(f, "(", r.concat(/\./, f), ")*")
|
|
2503
2503
|
],
|
|
2504
2504
|
scope: {
|
|
2505
2505
|
1: "keyword",
|
|
@@ -2513,7 +2513,7 @@ function Vt(e) {
|
|
|
2513
2513
|
match: [
|
|
2514
2514
|
/class/,
|
|
2515
2515
|
/\s+/,
|
|
2516
|
-
|
|
2516
|
+
f
|
|
2517
2517
|
],
|
|
2518
2518
|
scope: {
|
|
2519
2519
|
1: "keyword",
|
|
@@ -2545,18 +2545,18 @@ function Vt(e) {
|
|
|
2545
2545
|
...Dn
|
|
2546
2546
|
]
|
|
2547
2547
|
}
|
|
2548
|
-
},
|
|
2548
|
+
}, L = {
|
|
2549
2549
|
label: "use_strict",
|
|
2550
2550
|
className: "meta",
|
|
2551
2551
|
relevance: 10,
|
|
2552
2552
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
2553
|
-
},
|
|
2553
|
+
}, I = {
|
|
2554
2554
|
variants: [
|
|
2555
2555
|
{
|
|
2556
2556
|
match: [
|
|
2557
2557
|
/function/,
|
|
2558
2558
|
/\s+/,
|
|
2559
|
-
|
|
2559
|
+
f,
|
|
2560
2560
|
/(?=\s*\()/
|
|
2561
2561
|
]
|
|
2562
2562
|
},
|
|
@@ -2573,34 +2573,34 @@ function Vt(e) {
|
|
|
2573
2573
|
3: "title.function"
|
|
2574
2574
|
},
|
|
2575
2575
|
label: "func.def",
|
|
2576
|
-
contains: [
|
|
2576
|
+
contains: [S],
|
|
2577
2577
|
illegal: /%/
|
|
2578
|
-
},
|
|
2578
|
+
}, $ = {
|
|
2579
2579
|
relevance: 0,
|
|
2580
2580
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
2581
2581
|
className: "variable.constant"
|
|
2582
2582
|
};
|
|
2583
|
-
function
|
|
2584
|
-
return r.concat("(?!",
|
|
2583
|
+
function B(N) {
|
|
2584
|
+
return r.concat("(?!", N.join("|"), ")");
|
|
2585
2585
|
}
|
|
2586
2586
|
const K = {
|
|
2587
2587
|
match: r.concat(
|
|
2588
2588
|
/\b/,
|
|
2589
|
-
|
|
2589
|
+
B([
|
|
2590
2590
|
...Ln,
|
|
2591
2591
|
"super",
|
|
2592
2592
|
"import"
|
|
2593
2593
|
]),
|
|
2594
|
-
|
|
2594
|
+
f,
|
|
2595
2595
|
r.lookahead(/\(/)
|
|
2596
2596
|
),
|
|
2597
2597
|
className: "title.function",
|
|
2598
2598
|
relevance: 0
|
|
2599
2599
|
}, Y = {
|
|
2600
2600
|
begin: r.concat(/\./, r.lookahead(
|
|
2601
|
-
r.concat(
|
|
2601
|
+
r.concat(f, /(?![0-9A-Za-z$_(])/)
|
|
2602
2602
|
)),
|
|
2603
|
-
end:
|
|
2603
|
+
end: f,
|
|
2604
2604
|
excludeBegin: !0,
|
|
2605
2605
|
keywords: "prototype",
|
|
2606
2606
|
className: "property",
|
|
@@ -2609,7 +2609,7 @@ function Vt(e) {
|
|
|
2609
2609
|
match: [
|
|
2610
2610
|
/get|set/,
|
|
2611
2611
|
/\s+/,
|
|
2612
|
-
|
|
2612
|
+
f,
|
|
2613
2613
|
/(?=\()/
|
|
2614
2614
|
],
|
|
2615
2615
|
className: {
|
|
@@ -2621,13 +2621,13 @@ function Vt(e) {
|
|
|
2621
2621
|
// eat to avoid empty params
|
|
2622
2622
|
begin: /\(\)/
|
|
2623
2623
|
},
|
|
2624
|
-
|
|
2624
|
+
S
|
|
2625
2625
|
]
|
|
2626
|
-
}, ge = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>",
|
|
2626
|
+
}, ge = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
|
|
2627
2627
|
match: [
|
|
2628
2628
|
/const|var|let/,
|
|
2629
2629
|
/\s+/,
|
|
2630
|
-
|
|
2630
|
+
f,
|
|
2631
2631
|
/\s*/,
|
|
2632
2632
|
/=\s*/,
|
|
2633
2633
|
/(async\s*)?/,
|
|
@@ -2640,7 +2640,7 @@ function Vt(e) {
|
|
|
2640
2640
|
3: "title.function"
|
|
2641
2641
|
},
|
|
2642
2642
|
contains: [
|
|
2643
|
-
|
|
2643
|
+
S
|
|
2644
2644
|
]
|
|
2645
2645
|
};
|
|
2646
2646
|
return {
|
|
@@ -2648,7 +2648,7 @@ function Vt(e) {
|
|
|
2648
2648
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
2649
2649
|
keywords: i,
|
|
2650
2650
|
// this will be extended by TypeScript
|
|
2651
|
-
exports: { PARAMS_CONTAINS:
|
|
2651
|
+
exports: { PARAMS_CONTAINS: D, CLASS_REFERENCE: R },
|
|
2652
2652
|
illegal: /#(?![$_A-z])/,
|
|
2653
2653
|
contains: [
|
|
2654
2654
|
e.SHEBANG({
|
|
@@ -2656,31 +2656,31 @@ function Vt(e) {
|
|
|
2656
2656
|
binary: "node",
|
|
2657
2657
|
relevance: 5
|
|
2658
2658
|
}),
|
|
2659
|
-
|
|
2659
|
+
L,
|
|
2660
2660
|
e.APOS_STRING_MODE,
|
|
2661
2661
|
e.QUOTE_STRING_MODE,
|
|
2662
2662
|
h,
|
|
2663
|
-
p,
|
|
2664
2663
|
d,
|
|
2664
|
+
p,
|
|
2665
2665
|
_,
|
|
2666
|
-
|
|
2666
|
+
m,
|
|
2667
2667
|
// Skip numbers when they are part of a variable name
|
|
2668
2668
|
{ match: /\$\d+/ },
|
|
2669
2669
|
c,
|
|
2670
2670
|
R,
|
|
2671
2671
|
{
|
|
2672
2672
|
className: "attr",
|
|
2673
|
-
begin:
|
|
2673
|
+
begin: f + r.lookahead(":"),
|
|
2674
2674
|
relevance: 0
|
|
2675
2675
|
},
|
|
2676
|
-
|
|
2676
|
+
b,
|
|
2677
2677
|
{
|
|
2678
2678
|
// "value" container
|
|
2679
2679
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
2680
2680
|
keywords: "return throw case",
|
|
2681
2681
|
relevance: 0,
|
|
2682
2682
|
contains: [
|
|
2683
|
-
|
|
2683
|
+
m,
|
|
2684
2684
|
e.REGEXP_MODE,
|
|
2685
2685
|
{
|
|
2686
2686
|
className: "function",
|
|
@@ -2709,7 +2709,7 @@ function Vt(e) {
|
|
|
2709
2709
|
excludeBegin: !0,
|
|
2710
2710
|
excludeEnd: !0,
|
|
2711
2711
|
keywords: i,
|
|
2712
|
-
contains:
|
|
2712
|
+
contains: D
|
|
2713
2713
|
}
|
|
2714
2714
|
]
|
|
2715
2715
|
}
|
|
@@ -2749,7 +2749,7 @@ function Vt(e) {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
]
|
|
2751
2751
|
},
|
|
2752
|
-
|
|
2752
|
+
I,
|
|
2753
2753
|
{
|
|
2754
2754
|
// prevent this from getting swallowed up by function
|
|
2755
2755
|
// since they appear "function like"
|
|
@@ -2764,8 +2764,8 @@ function Vt(e) {
|
|
|
2764
2764
|
returnBegin: !0,
|
|
2765
2765
|
label: "func.def",
|
|
2766
2766
|
contains: [
|
|
2767
|
-
|
|
2768
|
-
e.inherit(e.TITLE_MODE, { begin:
|
|
2767
|
+
S,
|
|
2768
|
+
e.inherit(e.TITLE_MODE, { begin: f, className: "title.function" })
|
|
2769
2769
|
]
|
|
2770
2770
|
},
|
|
2771
2771
|
// catch ... so it won't trigger the property rule below
|
|
@@ -2778,17 +2778,17 @@ function Vt(e) {
|
|
|
2778
2778
|
// .keyword()
|
|
2779
2779
|
// $keyword = x
|
|
2780
2780
|
{
|
|
2781
|
-
match: "\\$" +
|
|
2781
|
+
match: "\\$" + f,
|
|
2782
2782
|
relevance: 0
|
|
2783
2783
|
},
|
|
2784
2784
|
{
|
|
2785
2785
|
match: [/\bconstructor(?=\s*\()/],
|
|
2786
2786
|
className: { 1: "title.function" },
|
|
2787
|
-
contains: [
|
|
2787
|
+
contains: [S]
|
|
2788
2788
|
},
|
|
2789
2789
|
K,
|
|
2790
|
-
|
|
2791
|
-
|
|
2790
|
+
$,
|
|
2791
|
+
M,
|
|
2792
2792
|
oe,
|
|
2793
2793
|
{
|
|
2794
2794
|
match: /\$[(.]/
|
|
@@ -2806,18 +2806,18 @@ function Jt(e) {
|
|
|
2806
2806
|
match: /[{}[\],:]/,
|
|
2807
2807
|
className: "punctuation",
|
|
2808
2808
|
relevance: 0
|
|
2809
|
-
},
|
|
2809
|
+
}, f = [
|
|
2810
2810
|
"true",
|
|
2811
2811
|
"false",
|
|
2812
2812
|
"null"
|
|
2813
2813
|
], g = {
|
|
2814
2814
|
scope: "literal",
|
|
2815
|
-
beginKeywords:
|
|
2815
|
+
beginKeywords: f.join(" ")
|
|
2816
2816
|
};
|
|
2817
2817
|
return {
|
|
2818
2818
|
name: "JSON",
|
|
2819
2819
|
keywords: {
|
|
2820
|
-
literal:
|
|
2820
|
+
literal: f
|
|
2821
2821
|
},
|
|
2822
2822
|
contains: [
|
|
2823
2823
|
r,
|
|
@@ -2832,7 +2832,7 @@ function Jt(e) {
|
|
|
2832
2832
|
};
|
|
2833
2833
|
}
|
|
2834
2834
|
function qt(e) {
|
|
2835
|
-
const r = "true false yes no null", l = "[\\w#;/?:@&=+$,.~*'()[\\]]+",
|
|
2835
|
+
const r = "true false yes no null", l = "[\\w#;/?:@&=+$,.~*'()[\\]]+", f = {
|
|
2836
2836
|
className: "attr",
|
|
2837
2837
|
variants: [
|
|
2838
2838
|
{ begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
|
|
@@ -2890,7 +2890,7 @@ function qt(e) {
|
|
|
2890
2890
|
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", s = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", o = "(\\.[0-9]*)?", a = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", c = {
|
|
2891
2891
|
className: "number",
|
|
2892
2892
|
begin: "\\b" + i + s + o + a + "\\b"
|
|
2893
|
-
},
|
|
2893
|
+
}, u = {
|
|
2894
2894
|
end: ",",
|
|
2895
2895
|
endsWithParent: !0,
|
|
2896
2896
|
excludeEnd: !0,
|
|
@@ -2899,17 +2899,17 @@ function qt(e) {
|
|
|
2899
2899
|
}, h = {
|
|
2900
2900
|
begin: /\{/,
|
|
2901
2901
|
end: /\}/,
|
|
2902
|
-
contains: [
|
|
2902
|
+
contains: [u],
|
|
2903
2903
|
illegal: "\\n",
|
|
2904
2904
|
relevance: 0
|
|
2905
|
-
},
|
|
2905
|
+
}, d = {
|
|
2906
2906
|
begin: "\\[",
|
|
2907
2907
|
end: "\\]",
|
|
2908
|
-
contains: [
|
|
2908
|
+
contains: [u],
|
|
2909
2909
|
illegal: "\\n",
|
|
2910
2910
|
relevance: 0
|
|
2911
|
-
},
|
|
2912
|
-
|
|
2911
|
+
}, p = [
|
|
2912
|
+
f,
|
|
2913
2913
|
{
|
|
2914
2914
|
className: "meta",
|
|
2915
2915
|
begin: "^---\\s*$",
|
|
@@ -2985,14 +2985,14 @@ function qt(e) {
|
|
|
2985
2985
|
relevance: 0
|
|
2986
2986
|
},
|
|
2987
2987
|
h,
|
|
2988
|
-
|
|
2988
|
+
d,
|
|
2989
2989
|
n
|
|
2990
|
-
], _ = [...
|
|
2991
|
-
return _.pop(), _.push(t),
|
|
2990
|
+
], _ = [...p];
|
|
2991
|
+
return _.pop(), _.push(t), u.contains = _, {
|
|
2992
2992
|
name: "YAML",
|
|
2993
2993
|
case_insensitive: !0,
|
|
2994
2994
|
aliases: ["yml"],
|
|
2995
|
-
contains:
|
|
2995
|
+
contains: p
|
|
2996
2996
|
};
|
|
2997
2997
|
}
|
|
2998
2998
|
function er(e) {
|
|
@@ -3006,7 +3006,7 @@ function er(e) {
|
|
|
3006
3006
|
};
|
|
3007
3007
|
}
|
|
3008
3008
|
function nr(e) {
|
|
3009
|
-
const r = e.regex, l = /[\p{XID_Start}_]\p{XID_Continue}*/u,
|
|
3009
|
+
const r = e.regex, l = /[\p{XID_Start}_]\p{XID_Continue}*/u, f = [
|
|
3010
3010
|
"and",
|
|
3011
3011
|
"as",
|
|
3012
3012
|
"assert",
|
|
@@ -3043,7 +3043,7 @@ function nr(e) {
|
|
|
3043
3043
|
"yield"
|
|
3044
3044
|
], i = {
|
|
3045
3045
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
3046
|
-
keyword:
|
|
3046
|
+
keyword: f,
|
|
3047
3047
|
built_in: [
|
|
3048
3048
|
"__import__",
|
|
3049
3049
|
"abs",
|
|
@@ -3231,7 +3231,7 @@ function nr(e) {
|
|
|
3231
3231
|
e.APOS_STRING_MODE,
|
|
3232
3232
|
e.QUOTE_STRING_MODE
|
|
3233
3233
|
]
|
|
3234
|
-
},
|
|
3234
|
+
}, u = "[0-9](_?[0-9])*", h = `(\\b(${u}))?\\.(${u})|\\b(${u})\\.`, d = `\\b|${f.join("|")}`, p = {
|
|
3235
3235
|
className: "number",
|
|
3236
3236
|
relevance: 0,
|
|
3237
3237
|
variants: [
|
|
@@ -3246,7 +3246,7 @@ function nr(e) {
|
|
|
3246
3246
|
// because both MUST contain a decimal point and so cannot be confused with
|
|
3247
3247
|
// the interior part of an identifier
|
|
3248
3248
|
{
|
|
3249
|
-
begin: `(\\b(${
|
|
3249
|
+
begin: `(\\b(${u})|(${h}))[eE][+-]?(${u})[jJ]?(?=${d})`
|
|
3250
3250
|
},
|
|
3251
3251
|
{
|
|
3252
3252
|
begin: `(${h})[jJ]?`
|
|
@@ -3258,21 +3258,21 @@ function nr(e) {
|
|
|
3258
3258
|
// decinteger is optionally imaginary
|
|
3259
3259
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3260
3260
|
{
|
|
3261
|
-
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${
|
|
3261
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`
|
|
3262
3262
|
},
|
|
3263
3263
|
{
|
|
3264
|
-
begin: `\\b0[bB](_?[01])+[lL]?(?=${
|
|
3264
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${d})`
|
|
3265
3265
|
},
|
|
3266
3266
|
{
|
|
3267
|
-
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${
|
|
3267
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${d})`
|
|
3268
3268
|
},
|
|
3269
3269
|
{
|
|
3270
|
-
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${
|
|
3270
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`
|
|
3271
3271
|
},
|
|
3272
3272
|
// imagnumber (digitpart-based)
|
|
3273
3273
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3274
3274
|
{
|
|
3275
|
-
begin: `\\b(${
|
|
3275
|
+
begin: `\\b(${u})[jJ](?=${d})`
|
|
3276
3276
|
}
|
|
3277
3277
|
]
|
|
3278
3278
|
}, _ = {
|
|
@@ -3292,7 +3292,7 @@ function nr(e) {
|
|
|
3292
3292
|
endsWithParent: !0
|
|
3293
3293
|
}
|
|
3294
3294
|
]
|
|
3295
|
-
},
|
|
3295
|
+
}, E = {
|
|
3296
3296
|
className: "params",
|
|
3297
3297
|
variants: [
|
|
3298
3298
|
// Exclude params in functions without params
|
|
@@ -3310,7 +3310,7 @@ function nr(e) {
|
|
|
3310
3310
|
contains: [
|
|
3311
3311
|
"self",
|
|
3312
3312
|
s,
|
|
3313
|
-
|
|
3313
|
+
p,
|
|
3314
3314
|
c,
|
|
3315
3315
|
e.HASH_COMMENT_MODE
|
|
3316
3316
|
]
|
|
@@ -3319,7 +3319,7 @@ function nr(e) {
|
|
|
3319
3319
|
};
|
|
3320
3320
|
return o.contains = [
|
|
3321
3321
|
c,
|
|
3322
|
-
|
|
3322
|
+
p,
|
|
3323
3323
|
s
|
|
3324
3324
|
], {
|
|
3325
3325
|
name: "Python",
|
|
@@ -3333,7 +3333,7 @@ function nr(e) {
|
|
|
3333
3333
|
illegal: /(<\/|\?)|=>/,
|
|
3334
3334
|
contains: [
|
|
3335
3335
|
s,
|
|
3336
|
-
|
|
3336
|
+
p,
|
|
3337
3337
|
{
|
|
3338
3338
|
// very common convention
|
|
3339
3339
|
begin: /\bself\b/
|
|
@@ -3357,7 +3357,7 @@ function nr(e) {
|
|
|
3357
3357
|
1: "keyword",
|
|
3358
3358
|
3: "title.function"
|
|
3359
3359
|
},
|
|
3360
|
-
contains: [
|
|
3360
|
+
contains: [E]
|
|
3361
3361
|
},
|
|
3362
3362
|
{
|
|
3363
3363
|
variants: [
|
|
@@ -3391,8 +3391,8 @@ function nr(e) {
|
|
|
3391
3391
|
begin: /^[\t ]*@/,
|
|
3392
3392
|
end: /(?=#)|$/,
|
|
3393
3393
|
contains: [
|
|
3394
|
-
|
|
3395
|
-
|
|
3394
|
+
p,
|
|
3395
|
+
E,
|
|
3396
3396
|
c
|
|
3397
3397
|
]
|
|
3398
3398
|
}
|
|
@@ -3423,10 +3423,10 @@ var de = "[0-9](_*[0-9])*", Le = `\\.(${de})`, Re = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3423
3423
|
relevance: 0
|
|
3424
3424
|
};
|
|
3425
3425
|
function Rn(e, r, l) {
|
|
3426
|
-
return l === -1 ? "" : e.replace(r, (
|
|
3426
|
+
return l === -1 ? "" : e.replace(r, (f) => Rn(e, r, l - 1));
|
|
3427
3427
|
}
|
|
3428
3428
|
function tr(e) {
|
|
3429
|
-
const r = e.regex, l = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",
|
|
3429
|
+
const r = e.regex, l = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", f = l + Rn("(?:<" + l + "~~~(?:\\s*,\\s*" + l + "~~~)*>)?", /~~~/g, 2), s = {
|
|
3430
3430
|
keyword: [
|
|
3431
3431
|
"synchronized",
|
|
3432
3432
|
"abstract",
|
|
@@ -3604,7 +3604,7 @@ function tr(e) {
|
|
|
3604
3604
|
},
|
|
3605
3605
|
{
|
|
3606
3606
|
begin: [
|
|
3607
|
-
"(?:" +
|
|
3607
|
+
"(?:" + f + "\\s+)",
|
|
3608
3608
|
e.UNDERSCORE_IDENT_RE,
|
|
3609
3609
|
/\s*(?=\()/
|
|
3610
3610
|
],
|
|
@@ -3635,7 +3635,7 @@ function tr(e) {
|
|
|
3635
3635
|
};
|
|
3636
3636
|
}
|
|
3637
3637
|
function rr(e) {
|
|
3638
|
-
const r = e.regex, l = {},
|
|
3638
|
+
const r = e.regex, l = {}, f = {
|
|
3639
3639
|
begin: /\$\{/,
|
|
3640
3640
|
end: /\}/,
|
|
3641
3641
|
contains: [
|
|
@@ -3656,7 +3656,7 @@ function rr(e) {
|
|
|
3656
3656
|
// Perl at all like $ident$, @ident@, etc.
|
|
3657
3657
|
"(?![\\w\\d])(?![$])"
|
|
3658
3658
|
) },
|
|
3659
|
-
|
|
3659
|
+
f
|
|
3660
3660
|
]
|
|
3661
3661
|
});
|
|
3662
3662
|
const g = {
|
|
@@ -3713,7 +3713,7 @@ function rr(e) {
|
|
|
3713
3713
|
"tcsh",
|
|
3714
3714
|
"dash",
|
|
3715
3715
|
"scsh"
|
|
3716
|
-
],
|
|
3716
|
+
], u = e.SHEBANG({
|
|
3717
3717
|
binary: `(${c.join("|")})`,
|
|
3718
3718
|
relevance: 10
|
|
3719
3719
|
}), h = {
|
|
@@ -3722,7 +3722,7 @@ function rr(e) {
|
|
|
3722
3722
|
returnBegin: !0,
|
|
3723
3723
|
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
3724
3724
|
relevance: 0
|
|
3725
|
-
},
|
|
3725
|
+
}, d = [
|
|
3726
3726
|
"if",
|
|
3727
3727
|
"then",
|
|
3728
3728
|
"else",
|
|
@@ -3738,10 +3738,10 @@ function rr(e) {
|
|
|
3738
3738
|
"esac",
|
|
3739
3739
|
"function",
|
|
3740
3740
|
"select"
|
|
3741
|
-
],
|
|
3741
|
+
], p = [
|
|
3742
3742
|
"true",
|
|
3743
3743
|
"false"
|
|
3744
|
-
], _ = { match: /(\/[a-z._-]+)+/ },
|
|
3744
|
+
], _ = { match: /(\/[a-z._-]+)+/ }, E = [
|
|
3745
3745
|
"break",
|
|
3746
3746
|
"cd",
|
|
3747
3747
|
"continue",
|
|
@@ -3760,7 +3760,7 @@ function rr(e) {
|
|
|
3760
3760
|
"trap",
|
|
3761
3761
|
"umask",
|
|
3762
3762
|
"unset"
|
|
3763
|
-
],
|
|
3763
|
+
], m = [
|
|
3764
3764
|
"alias",
|
|
3765
3765
|
"bind",
|
|
3766
3766
|
"builtin",
|
|
@@ -3782,7 +3782,7 @@ function rr(e) {
|
|
|
3782
3782
|
"typeset",
|
|
3783
3783
|
"ulimit",
|
|
3784
3784
|
"unalias"
|
|
3785
|
-
],
|
|
3785
|
+
], v = [
|
|
3786
3786
|
"autoload",
|
|
3787
3787
|
"bg",
|
|
3788
3788
|
"bindkey",
|
|
@@ -3851,7 +3851,7 @@ function rr(e) {
|
|
|
3851
3851
|
"zsocket",
|
|
3852
3852
|
"zstyle",
|
|
3853
3853
|
"ztcp"
|
|
3854
|
-
],
|
|
3854
|
+
], A = [
|
|
3855
3855
|
"chcon",
|
|
3856
3856
|
"chgrp",
|
|
3857
3857
|
"chown",
|
|
@@ -3961,20 +3961,20 @@ function rr(e) {
|
|
|
3961
3961
|
aliases: ["sh"],
|
|
3962
3962
|
keywords: {
|
|
3963
3963
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3964
|
-
keyword:
|
|
3965
|
-
literal:
|
|
3964
|
+
keyword: d,
|
|
3965
|
+
literal: p,
|
|
3966
3966
|
built_in: [
|
|
3967
|
+
...E,
|
|
3967
3968
|
...m,
|
|
3968
|
-
...b,
|
|
3969
3969
|
// Shell modifiers
|
|
3970
3970
|
"set",
|
|
3971
3971
|
"shopt",
|
|
3972
|
-
...
|
|
3973
|
-
...
|
|
3972
|
+
...v,
|
|
3973
|
+
...A
|
|
3974
3974
|
]
|
|
3975
3975
|
},
|
|
3976
3976
|
contains: [
|
|
3977
|
-
|
|
3977
|
+
u,
|
|
3978
3978
|
// to catch known shells and boost relevancy
|
|
3979
3979
|
e.SHEBANG(),
|
|
3980
3980
|
// to catch unknown shells but still highlight the shebang
|
|
@@ -3992,7 +3992,7 @@ function rr(e) {
|
|
|
3992
3992
|
};
|
|
3993
3993
|
}
|
|
3994
3994
|
function ir(e) {
|
|
3995
|
-
const r = e.regex, l = e.COMMENT("--", "$"),
|
|
3995
|
+
const r = e.regex, l = e.COMMENT("--", "$"), f = {
|
|
3996
3996
|
className: "string",
|
|
3997
3997
|
variants: [
|
|
3998
3998
|
{
|
|
@@ -4523,7 +4523,7 @@ function ir(e) {
|
|
|
4523
4523
|
"localtime",
|
|
4524
4524
|
"current_timestamp",
|
|
4525
4525
|
"localtimestamp"
|
|
4526
|
-
],
|
|
4526
|
+
], u = [
|
|
4527
4527
|
"create table",
|
|
4528
4528
|
"insert into",
|
|
4529
4529
|
"primary key",
|
|
@@ -4540,27 +4540,27 @@ function ir(e) {
|
|
|
4540
4540
|
"nulls last",
|
|
4541
4541
|
"depth first",
|
|
4542
4542
|
"breadth first"
|
|
4543
|
-
], h = a,
|
|
4543
|
+
], h = a, d = [
|
|
4544
4544
|
...o,
|
|
4545
4545
|
...s
|
|
4546
|
-
].filter((
|
|
4546
|
+
].filter((v) => !a.includes(v)), p = {
|
|
4547
4547
|
className: "variable",
|
|
4548
4548
|
begin: /@[a-z0-9][a-z0-9_]*/
|
|
4549
4549
|
}, _ = {
|
|
4550
4550
|
className: "operator",
|
|
4551
4551
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4552
4552
|
relevance: 0
|
|
4553
|
-
},
|
|
4553
|
+
}, E = {
|
|
4554
4554
|
begin: r.concat(/\b/, r.either(...h), /\s*\(/),
|
|
4555
4555
|
relevance: 0,
|
|
4556
4556
|
keywords: { built_in: h }
|
|
4557
4557
|
};
|
|
4558
|
-
function
|
|
4559
|
-
exceptions:
|
|
4560
|
-
when:
|
|
4558
|
+
function m(v, {
|
|
4559
|
+
exceptions: A,
|
|
4560
|
+
when: D
|
|
4561
4561
|
} = {}) {
|
|
4562
|
-
const
|
|
4563
|
-
return
|
|
4562
|
+
const S = D;
|
|
4563
|
+
return A = A || [], v.map((M) => M.match(/\|\d+$/) || A.includes(M) ? M : S(M) ? `${M}|0` : M);
|
|
4564
4564
|
}
|
|
4565
4565
|
return {
|
|
4566
4566
|
name: "SQL",
|
|
@@ -4569,18 +4569,18 @@ function ir(e) {
|
|
|
4569
4569
|
illegal: /[{}]|<\//,
|
|
4570
4570
|
keywords: {
|
|
4571
4571
|
$pattern: /\b[\w\.]+/,
|
|
4572
|
-
keyword:
|
|
4572
|
+
keyword: m(d, { when: (v) => v.length < 3 }),
|
|
4573
4573
|
literal: n,
|
|
4574
4574
|
type: i,
|
|
4575
4575
|
built_in: c
|
|
4576
4576
|
},
|
|
4577
4577
|
contains: [
|
|
4578
4578
|
{
|
|
4579
|
-
begin: r.either(...
|
|
4579
|
+
begin: r.either(...u),
|
|
4580
4580
|
relevance: 0,
|
|
4581
4581
|
keywords: {
|
|
4582
4582
|
$pattern: /[\w\.]+/,
|
|
4583
|
-
keyword:
|
|
4583
|
+
keyword: d.concat(u),
|
|
4584
4584
|
literal: n,
|
|
4585
4585
|
type: i
|
|
4586
4586
|
}
|
|
@@ -4589,9 +4589,9 @@ function ir(e) {
|
|
|
4589
4589
|
className: "type",
|
|
4590
4590
|
begin: r.either(...t)
|
|
4591
4591
|
},
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4592
|
+
E,
|
|
4593
|
+
p,
|
|
4594
|
+
f,
|
|
4595
4595
|
g,
|
|
4596
4596
|
e.C_NUMBER_MODE,
|
|
4597
4597
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -4620,7 +4620,7 @@ function ke(e, r, l = "word") {
|
|
|
4620
4620
|
).join("");
|
|
4621
4621
|
}
|
|
4622
4622
|
function On(e, r) {
|
|
4623
|
-
const l = new He.diff_match_patch(),
|
|
4623
|
+
const l = new He.diff_match_patch(), f = l.diff_linesToChars_(e, r), g = f.chars1, n = f.chars2, t = f.lineArray, i = l.diff_main(g, n, !1);
|
|
4624
4624
|
return l.diff_charsToLines_(i, t), i.map((s) => {
|
|
4625
4625
|
const [o, a] = s;
|
|
4626
4626
|
return {
|
|
@@ -4635,7 +4635,7 @@ function On(e, r) {
|
|
|
4635
4635
|
function V(e, r) {
|
|
4636
4636
|
if (!r.match(new RegExp(`(${ie}|${se})`, "g")))
|
|
4637
4637
|
return J.highlight(r, { language: e }).value;
|
|
4638
|
-
let
|
|
4638
|
+
let f = r;
|
|
4639
4639
|
const g = r.replace(new RegExp(`(${ie}|${se})`, "g"), ""), n = document.createElement("div");
|
|
4640
4640
|
n.innerHTML = J.highlight(g, { language: e }).value;
|
|
4641
4641
|
let t = !1;
|
|
@@ -4646,16 +4646,16 @@ function V(e, r) {
|
|
|
4646
4646
|
return;
|
|
4647
4647
|
let a = o.textContent, c = "";
|
|
4648
4648
|
for (t && (c = c + ie); a.length; ) {
|
|
4649
|
-
if (
|
|
4650
|
-
|
|
4649
|
+
if (f.startsWith(ie)) {
|
|
4650
|
+
f = f.slice(ie.length), c = c + ie, t = !0;
|
|
4651
4651
|
continue;
|
|
4652
4652
|
}
|
|
4653
|
-
if (
|
|
4654
|
-
|
|
4653
|
+
if (f.startsWith(se)) {
|
|
4654
|
+
f = f.slice(se.length), c = c + se, t = !1;
|
|
4655
4655
|
continue;
|
|
4656
4656
|
}
|
|
4657
|
-
const
|
|
4658
|
-
c = c +
|
|
4657
|
+
const u = f.match(new RegExp(`(${ie}|${se})`)), h = u && u.index ? u.index : f.length, d = Math.min(h, a.length);
|
|
4658
|
+
c = c + f.substring(0, d), f = f.slice(d), a = a.slice(d);
|
|
4659
4659
|
}
|
|
4660
4660
|
t && (c = c + se), o.textContent = c;
|
|
4661
4661
|
}
|
|
@@ -4664,18 +4664,18 @@ function V(e, r) {
|
|
|
4664
4664
|
return i(n), n.innerHTML.replace(new RegExp(sr, "g"), '<span class="x">').replace(new RegExp(ar, "g"), "</span>");
|
|
4665
4665
|
}
|
|
4666
4666
|
function Cn(e, r) {
|
|
4667
|
-
const l = (s, o) => (s.match(new RegExp(o, "g")) || []).length,
|
|
4667
|
+
const l = (s, o) => (s.match(new RegExp(o, "g")) || []).length, f = (s) => s.filter((o) => r == null ? void 0 : r.test(o)).length;
|
|
4668
4668
|
let g = 0, n = 0, t = 0, i = 0;
|
|
4669
4669
|
for (const s of e) {
|
|
4670
4670
|
if (s.added) {
|
|
4671
|
-
const o =
|
|
4671
|
+
const o = f(s.value.trim().split(`
|
|
4672
4672
|
`));
|
|
4673
4673
|
g += l(s.value.trim(), `
|
|
4674
4674
|
`) + 1 - o, t += o;
|
|
4675
4675
|
continue;
|
|
4676
4676
|
}
|
|
4677
4677
|
if (s.removed) {
|
|
4678
|
-
const o =
|
|
4678
|
+
const o = f(s.value.trim().split(`
|
|
4679
4679
|
`));
|
|
4680
4680
|
n += l(s.value.trim(), `
|
|
4681
4681
|
`) + 1 - o, i += o;
|
|
@@ -4689,201 +4689,201 @@ function Cn(e, r) {
|
|
|
4689
4689
|
ignoreDeletionsNum: i
|
|
4690
4690
|
};
|
|
4691
4691
|
}
|
|
4692
|
-
function or(e, r, l = "plaintext",
|
|
4693
|
-
const
|
|
4694
|
-
let
|
|
4695
|
-
const
|
|
4696
|
-
changes:
|
|
4692
|
+
function or(e, r, l = "plaintext", f = "word", g = !1, n = 10, t) {
|
|
4693
|
+
const i = () => ({ type: w.EMPTY }), s = (m, v, A) => ({ type: m, num: v, code: A }), o = On(e, r), a = t ? new RegExp(t) : void 0;
|
|
4694
|
+
let c = 0, u = 0, h = !1;
|
|
4695
|
+
const d = [], p = {
|
|
4696
|
+
changes: d,
|
|
4697
4697
|
collector: [],
|
|
4698
|
-
stat: Cn(
|
|
4698
|
+
stat: Cn(o, a)
|
|
4699
4699
|
};
|
|
4700
|
-
for (let m = 0; m <
|
|
4701
|
-
if (
|
|
4702
|
-
|
|
4700
|
+
for (let m = 0; m < o.length; m++) {
|
|
4701
|
+
if (h) {
|
|
4702
|
+
h = !1;
|
|
4703
4703
|
continue;
|
|
4704
4704
|
}
|
|
4705
|
-
const [
|
|
4705
|
+
const [v, A] = [o[m], o[m + 1]], [D, S] = [be(v), be(A)], M = v.value.replace(/\n$/, "").split(`
|
|
4706
4706
|
`);
|
|
4707
|
-
if (
|
|
4708
|
-
for (const
|
|
4709
|
-
let
|
|
4710
|
-
const
|
|
4711
|
-
|
|
4707
|
+
if (A === void 0) {
|
|
4708
|
+
for (const L of M) {
|
|
4709
|
+
let I = i(), $ = i();
|
|
4710
|
+
const B = V(l, L);
|
|
4711
|
+
D === w.EQUAL && (c++, u++, I = s(w.EQUAL, c, B), $ = s(w.EQUAL, u, B)), D === w.DELETE && (c++, I = s(w.DELETE, c, B), $ = i()), D === w.ADD && (u++, I = i(), $ = s(w.ADD, u, B)), d.push({ left: I, right: $ });
|
|
4712
4712
|
}
|
|
4713
4713
|
break;
|
|
4714
4714
|
}
|
|
4715
|
-
if (
|
|
4716
|
-
for (const
|
|
4717
|
-
|
|
4718
|
-
const
|
|
4719
|
-
|
|
4720
|
-
left:
|
|
4721
|
-
right:
|
|
4715
|
+
if (D === w.EQUAL)
|
|
4716
|
+
for (const L of M) {
|
|
4717
|
+
c++, u++;
|
|
4718
|
+
const I = V(l, L);
|
|
4719
|
+
d.push({
|
|
4720
|
+
left: s(w.EQUAL, c, I),
|
|
4721
|
+
right: s(w.EQUAL, u, I)
|
|
4722
4722
|
});
|
|
4723
4723
|
}
|
|
4724
|
-
const
|
|
4724
|
+
const R = A.value.replace(/\n$/, "").split(`
|
|
4725
4725
|
`);
|
|
4726
|
-
if (
|
|
4727
|
-
if (
|
|
4728
|
-
for (const
|
|
4729
|
-
|
|
4730
|
-
left:
|
|
4731
|
-
right:
|
|
4726
|
+
if (D === w.DELETE) {
|
|
4727
|
+
if (S === w.EQUAL)
|
|
4728
|
+
for (const L of M)
|
|
4729
|
+
c++, d.push({
|
|
4730
|
+
left: s(w.DELETE, c, V(l, L)),
|
|
4731
|
+
right: i()
|
|
4732
4732
|
});
|
|
4733
|
-
if (
|
|
4734
|
-
|
|
4735
|
-
const
|
|
4736
|
-
for (let
|
|
4737
|
-
|
|
4738
|
-
const [$,
|
|
4739
|
-
|
|
4733
|
+
if (S === w.ADD) {
|
|
4734
|
+
h = !0;
|
|
4735
|
+
const L = Math.max(v.count, A.count);
|
|
4736
|
+
for (let I = 0; I < L; I++) {
|
|
4737
|
+
I < v.count && c++, I < A.count && u++;
|
|
4738
|
+
const [$, B] = [M[I], R[I]], K = g || M.length === R.length, Y = K ? ke(B, $, f) : $, oe = K ? ke($, B, f) : B, ge = a != null && a.test($) ? w.EQUAL : w.DELETE, b = a != null && a.test(B) ? w.EQUAL : w.ADD, N = I < v.count ? s(ge, c, V(l, Y)) : i(), O = I < A.count ? s(b, u, V(l, oe)) : i();
|
|
4739
|
+
d.push({ left: N, right: O });
|
|
4740
4740
|
}
|
|
4741
4741
|
}
|
|
4742
4742
|
}
|
|
4743
|
-
if (
|
|
4744
|
-
for (const
|
|
4745
|
-
|
|
4746
|
-
left:
|
|
4747
|
-
right:
|
|
4743
|
+
if (D === w.ADD)
|
|
4744
|
+
for (const L of M)
|
|
4745
|
+
u++, d.push({
|
|
4746
|
+
left: i(),
|
|
4747
|
+
right: s(w.ADD, u, V(l, L))
|
|
4748
4748
|
});
|
|
4749
4749
|
}
|
|
4750
4750
|
if (e === r) {
|
|
4751
|
-
for (let m = 0; m <
|
|
4752
|
-
|
|
4751
|
+
for (let m = 0; m < d.length; m++)
|
|
4752
|
+
d[m].fold = !1;
|
|
4753
4753
|
return p;
|
|
4754
4754
|
}
|
|
4755
|
-
for (let m = 0; m <
|
|
4756
|
-
const
|
|
4757
|
-
if (
|
|
4758
|
-
const [
|
|
4759
|
-
for (let
|
|
4760
|
-
|
|
4755
|
+
for (let m = 0; m < d.length; m++) {
|
|
4756
|
+
const v = d[m];
|
|
4757
|
+
if (v.left.type === w.DELETE || v.right.type === w.ADD) {
|
|
4758
|
+
const [A, D] = [Math.max(m - n, 0), Math.min(m + n + 1, d.length)];
|
|
4759
|
+
for (let S = A; S < D; S++)
|
|
4760
|
+
d[S].fold = !1;
|
|
4761
4761
|
}
|
|
4762
|
-
|
|
4762
|
+
v.fold === void 0 && (v.fold = !0);
|
|
4763
4763
|
}
|
|
4764
|
-
const
|
|
4765
|
-
let
|
|
4766
|
-
for (let m = 0; m <
|
|
4767
|
-
const
|
|
4768
|
-
if (
|
|
4769
|
-
|
|
4770
|
-
lines:
|
|
4764
|
+
const _ = [];
|
|
4765
|
+
let E = [];
|
|
4766
|
+
for (let m = 0; m < d.length; m++) {
|
|
4767
|
+
const v = d[m];
|
|
4768
|
+
if (v.fold === !1) {
|
|
4769
|
+
E.length && (E[0].hideIndex = p.collector.length, p.collector.push({
|
|
4770
|
+
lines: E,
|
|
4771
4771
|
fold: !0
|
|
4772
|
-
}),
|
|
4772
|
+
}), E = []), _.push(v);
|
|
4773
4773
|
continue;
|
|
4774
4774
|
}
|
|
4775
|
-
|
|
4775
|
+
v.hide = !0, E.push(v), _.push(v);
|
|
4776
4776
|
}
|
|
4777
|
-
return
|
|
4778
|
-
lines:
|
|
4777
|
+
return E.length && (E[0].hideIndex = p.collector.length, p.collector.push({
|
|
4778
|
+
lines: E,
|
|
4779
4779
|
fold: !0
|
|
4780
|
-
}),
|
|
4780
|
+
}), E = []), p.changes = _, p;
|
|
4781
4781
|
}
|
|
4782
|
-
function lr(e, r, l = "plaintext",
|
|
4783
|
-
const
|
|
4784
|
-
let
|
|
4785
|
-
const
|
|
4786
|
-
changes:
|
|
4782
|
+
function lr(e, r, l = "plaintext", f = "word", g = !1, n = 10, t) {
|
|
4783
|
+
const i = On(e, r), s = t ? new RegExp(t) : void 0;
|
|
4784
|
+
let o = 0, a = 0, c = !1;
|
|
4785
|
+
const u = [], h = {
|
|
4786
|
+
changes: u,
|
|
4787
4787
|
collector: [],
|
|
4788
|
-
stat: Cn(
|
|
4788
|
+
stat: Cn(i, s)
|
|
4789
4789
|
};
|
|
4790
|
-
for (let
|
|
4791
|
-
if (
|
|
4792
|
-
|
|
4790
|
+
for (let _ = 0; _ < i.length; _++) {
|
|
4791
|
+
if (c) {
|
|
4792
|
+
c = !1;
|
|
4793
4793
|
continue;
|
|
4794
4794
|
}
|
|
4795
|
-
const [
|
|
4795
|
+
const [E, m] = [i[_], i[_ + 1]], [v, A] = [be(E), be(m)], D = E.value.replace(/\n$/, "").split(`
|
|
4796
4796
|
`);
|
|
4797
4797
|
if (m === void 0) {
|
|
4798
|
-
for (const
|
|
4799
|
-
|
|
4800
|
-
const
|
|
4801
|
-
|
|
4802
|
-
type:
|
|
4803
|
-
code:
|
|
4804
|
-
addNum:
|
|
4805
|
-
delNum:
|
|
4798
|
+
for (const M of D) {
|
|
4799
|
+
v === w.EQUAL && (o++, a++), v === w.DELETE && o++, v === w.ADD && a++;
|
|
4800
|
+
const R = V(l, M);
|
|
4801
|
+
u.push({
|
|
4802
|
+
type: v,
|
|
4803
|
+
code: R,
|
|
4804
|
+
addNum: v === w.DELETE ? void 0 : a,
|
|
4805
|
+
delNum: v === w.ADD ? void 0 : o
|
|
4806
4806
|
});
|
|
4807
4807
|
}
|
|
4808
4808
|
break;
|
|
4809
4809
|
}
|
|
4810
|
-
if (
|
|
4811
|
-
for (const
|
|
4812
|
-
|
|
4813
|
-
const
|
|
4814
|
-
|
|
4810
|
+
if (v === w.EQUAL)
|
|
4811
|
+
for (const M of D) {
|
|
4812
|
+
o++, a++;
|
|
4813
|
+
const R = V(l, M);
|
|
4814
|
+
u.push({ type: w.EQUAL, code: R, delNum: o, addNum: a });
|
|
4815
4815
|
}
|
|
4816
|
-
const
|
|
4816
|
+
const S = m.value.replace(/\n$/, "").split(`
|
|
4817
4817
|
`);
|
|
4818
|
-
if (
|
|
4819
|
-
if (
|
|
4820
|
-
for (let
|
|
4821
|
-
const
|
|
4822
|
-
|
|
4823
|
-
const
|
|
4824
|
-
|
|
4825
|
-
type:
|
|
4826
|
-
code:
|
|
4827
|
-
delNum:
|
|
4818
|
+
if (v === w.DELETE)
|
|
4819
|
+
if (A === w.ADD && (D.length === S.length || g)) {
|
|
4820
|
+
for (let M = 0; M < D.length; M++) {
|
|
4821
|
+
const R = D[M], L = S[M];
|
|
4822
|
+
o++;
|
|
4823
|
+
const I = V(l, ke(L, R, f));
|
|
4824
|
+
u.push({
|
|
4825
|
+
type: s != null && s.test(R) ? w.EQUAL : w.DELETE,
|
|
4826
|
+
code: I,
|
|
4827
|
+
delNum: o
|
|
4828
4828
|
});
|
|
4829
4829
|
}
|
|
4830
|
-
for (let
|
|
4831
|
-
const
|
|
4832
|
-
|
|
4833
|
-
const
|
|
4834
|
-
|
|
4835
|
-
type:
|
|
4836
|
-
code:
|
|
4837
|
-
addNum:
|
|
4830
|
+
for (let M = 0; M < S.length; M++) {
|
|
4831
|
+
const R = D[M], L = S[M];
|
|
4832
|
+
a++;
|
|
4833
|
+
const I = V(l, ke(R, L, f));
|
|
4834
|
+
u.push({
|
|
4835
|
+
type: s != null && s.test(L) ? w.EQUAL : w.ADD,
|
|
4836
|
+
code: I,
|
|
4837
|
+
addNum: a
|
|
4838
4838
|
});
|
|
4839
4839
|
}
|
|
4840
|
-
|
|
4840
|
+
c = !0;
|
|
4841
4841
|
} else
|
|
4842
|
-
for (const
|
|
4843
|
-
|
|
4844
|
-
const
|
|
4845
|
-
|
|
4842
|
+
for (const M of D) {
|
|
4843
|
+
o++;
|
|
4844
|
+
const R = V(l, M);
|
|
4845
|
+
u.push({ type: w.DELETE, code: R, delNum: o });
|
|
4846
4846
|
}
|
|
4847
|
-
if (
|
|
4848
|
-
for (const
|
|
4849
|
-
|
|
4850
|
-
const
|
|
4851
|
-
|
|
4847
|
+
if (v === w.ADD)
|
|
4848
|
+
for (const M of D) {
|
|
4849
|
+
a++;
|
|
4850
|
+
const R = V(l, M);
|
|
4851
|
+
u.push({ type: w.ADD, code: R, addNum: a });
|
|
4852
4852
|
}
|
|
4853
4853
|
}
|
|
4854
|
-
for (let
|
|
4855
|
-
const
|
|
4856
|
-
if (
|
|
4857
|
-
const [m,
|
|
4858
|
-
for (let
|
|
4859
|
-
|
|
4854
|
+
for (let _ = 0; _ < u.length; _++) {
|
|
4855
|
+
const E = u[_];
|
|
4856
|
+
if (E.type === w.DELETE || E.type === w.ADD) {
|
|
4857
|
+
const [m, v] = [Math.max(_ - n, 0), Math.min(_ + n + 1, u.length)];
|
|
4858
|
+
for (let A = m; A < v; A++)
|
|
4859
|
+
u[A].fold = !1;
|
|
4860
4860
|
}
|
|
4861
|
-
|
|
4861
|
+
E.fold === void 0 && (E.fold = !0);
|
|
4862
4862
|
}
|
|
4863
4863
|
if (e === r) {
|
|
4864
|
-
for (let
|
|
4865
|
-
|
|
4866
|
-
return
|
|
4864
|
+
for (let _ = 0; _ < u.length; _++)
|
|
4865
|
+
u[_].fold = !1;
|
|
4866
|
+
return h;
|
|
4867
4867
|
}
|
|
4868
|
-
const
|
|
4868
|
+
const d = [];
|
|
4869
4869
|
let p = [];
|
|
4870
|
-
for (let
|
|
4871
|
-
const
|
|
4872
|
-
if (
|
|
4873
|
-
p.length && (p[0].hideIndex =
|
|
4870
|
+
for (let _ = 0; _ < u.length; _++) {
|
|
4871
|
+
const E = u[_];
|
|
4872
|
+
if (E.fold === !1) {
|
|
4873
|
+
p.length && (p[0].hideIndex = h.collector.length, h.collector.push({
|
|
4874
4874
|
lines: p,
|
|
4875
4875
|
fold: !0
|
|
4876
|
-
}), p = []),
|
|
4876
|
+
}), p = []), d.push(E);
|
|
4877
4877
|
continue;
|
|
4878
4878
|
}
|
|
4879
|
-
|
|
4879
|
+
E.type === "equal" && (E.hide = !0, p.push(E)), d.push(E);
|
|
4880
4880
|
}
|
|
4881
|
-
return p.length && (p[0].hideIndex =
|
|
4881
|
+
return p.length && (p[0].hideIndex = h.collector.length, h.collector.push({
|
|
4882
4882
|
lines: p,
|
|
4883
4883
|
fold: !0
|
|
4884
|
-
}), p = []),
|
|
4884
|
+
}), p = []), h.changes = d, h;
|
|
4885
4885
|
}
|
|
4886
|
-
const cr = { key: 0 }, ur = /* @__PURE__ */
|
|
4886
|
+
const cr = { key: 0 }, ur = /* @__PURE__ */ P("td", {
|
|
4887
4887
|
class: "blob-code blob-code-hunk",
|
|
4888
4888
|
align: "left"
|
|
4889
4889
|
}, " ⋯ ", -1), fr = { key: 1 }, gr = ["data-code-marker", "innerHTML"], hr = /* @__PURE__ */ Ae({
|
|
@@ -4894,18 +4894,18 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4894
4894
|
emits: ["expand"],
|
|
4895
4895
|
setup(e, { emit: r }) {
|
|
4896
4896
|
const l = r;
|
|
4897
|
-
function
|
|
4897
|
+
function f(g) {
|
|
4898
4898
|
return g === w.DELETE ? "-" : g === w.ADD ? "+" : "";
|
|
4899
4899
|
}
|
|
4900
4900
|
return (g, n) => g.line.hideIndex !== void 0 && g.line.hide ? (G(), W("tr", cr, [
|
|
4901
|
-
|
|
4901
|
+
P("td", {
|
|
4902
4902
|
class: "blob-num blob-num-hunk text-center",
|
|
4903
4903
|
colspan: "2",
|
|
4904
4904
|
onClick: n[0] || (n[0] = (t) => l("expand", g.line))
|
|
4905
4905
|
}, " > "),
|
|
4906
4906
|
ur
|
|
4907
4907
|
])) : g.line.hide ? ve("", !0) : (G(), W("tr", fr, [
|
|
4908
|
-
|
|
4908
|
+
P("td", {
|
|
4909
4909
|
class: me(["blob-num", {
|
|
4910
4910
|
"blob-num-deletion": g.line.type === F(w).DELETE,
|
|
4911
4911
|
"blob-num-addition": g.line.type === F(w).ADD,
|
|
@@ -4913,7 +4913,7 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4913
4913
|
"blob-num-hunk": g.line.hide !== void 0
|
|
4914
4914
|
}])
|
|
4915
4915
|
}, ee(g.line.delNum), 3),
|
|
4916
|
-
|
|
4916
|
+
P("td", {
|
|
4917
4917
|
class: me(["blob-num", {
|
|
4918
4918
|
"blob-num-deletion": g.line.type === F(w).DELETE,
|
|
4919
4919
|
"blob-num-addition": g.line.type === F(w).ADD,
|
|
@@ -4921,7 +4921,7 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4921
4921
|
"blob-num-hunk": g.line.hide !== void 0
|
|
4922
4922
|
}])
|
|
4923
4923
|
}, ee(g.line.addNum), 3),
|
|
4924
|
-
|
|
4924
|
+
P("td", {
|
|
4925
4925
|
class: me(["blob-code", {
|
|
4926
4926
|
"blob-code-deletion": g.line.type === F(w).DELETE,
|
|
4927
4927
|
"blob-code-addition": g.line.type === F(w).ADD,
|
|
@@ -4929,9 +4929,9 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4929
4929
|
"blob-code-hunk": g.line.hide !== void 0
|
|
4930
4930
|
}])
|
|
4931
4931
|
}, [
|
|
4932
|
-
|
|
4932
|
+
P("span", {
|
|
4933
4933
|
class: "blob-code-inner blob-code-marker",
|
|
4934
|
-
"data-code-marker":
|
|
4934
|
+
"data-code-marker": f(g.line.type),
|
|
4935
4935
|
innerHTML: g.line.code
|
|
4936
4936
|
}, null, 8, gr)
|
|
4937
4937
|
], 2)
|
|
@@ -4944,16 +4944,16 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4944
4944
|
},
|
|
4945
4945
|
setup(e) {
|
|
4946
4946
|
const r = e;
|
|
4947
|
-
function l({ hideIndex:
|
|
4948
|
-
|
|
4947
|
+
function l({ hideIndex: f }) {
|
|
4948
|
+
f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
|
|
4949
4949
|
g.hide = !1, g.fold = !1;
|
|
4950
4950
|
});
|
|
4951
4951
|
}
|
|
4952
|
-
return (
|
|
4952
|
+
return (f, g) => {
|
|
4953
4953
|
var n;
|
|
4954
4954
|
return G(), W("table", dr, [
|
|
4955
|
-
|
|
4956
|
-
(G(!0), W(pe, null, Ge((n =
|
|
4955
|
+
P("tbody", null, [
|
|
4956
|
+
(G(!0), W(pe, null, Ge((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (G(), Ce(hr, {
|
|
4957
4957
|
key: i,
|
|
4958
4958
|
line: t,
|
|
4959
4959
|
onExpand: l
|
|
@@ -4962,11 +4962,11 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4962
4962
|
]);
|
|
4963
4963
|
};
|
|
4964
4964
|
}
|
|
4965
|
-
}), _r = { key: 0 }, br = /* @__PURE__ */
|
|
4965
|
+
}), _r = { key: 0 }, br = /* @__PURE__ */ P("td", {
|
|
4966
4966
|
class: "blob-code blob-code-inner blob-code-hunk",
|
|
4967
4967
|
colspan: "3",
|
|
4968
4968
|
align: "left"
|
|
4969
|
-
}, " ⋯ ", -1), Er = { key: 1 }, mr = /* @__PURE__ */
|
|
4969
|
+
}, " ⋯ ", -1), Er = { key: 1 }, mr = /* @__PURE__ */ P("td", { class: "blob-num blob-num-empty empty-cell" }, null, -1), vr = /* @__PURE__ */ P("td", { class: "blob-code blob-code-empty empty-cell" }, null, -1), yr = ["onMousedown"], wr = ["data-code-marker", "innerHTML"], Nr = /* @__PURE__ */ Ae({
|
|
4970
4970
|
__name: "SplitLine",
|
|
4971
4971
|
props: {
|
|
4972
4972
|
splitLine: {}
|
|
@@ -4974,7 +4974,7 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4974
4974
|
emits: ["expand"],
|
|
4975
4975
|
setup(e, { emit: r }) {
|
|
4976
4976
|
const l = r;
|
|
4977
|
-
function
|
|
4977
|
+
function f(n) {
|
|
4978
4978
|
return n === w.DELETE ? "-" : n === w.ADD ? "+" : "";
|
|
4979
4979
|
}
|
|
4980
4980
|
function g(n) {
|
|
@@ -4986,7 +4986,7 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4986
4986
|
s.classList.toggle("no-select", n === "right");
|
|
4987
4987
|
}
|
|
4988
4988
|
return (n, t) => n.splitLine.hideIndex !== void 0 && n.splitLine.hide ? (G(), W("tr", _r, [
|
|
4989
|
-
|
|
4989
|
+
P("td", {
|
|
4990
4990
|
class: "blob-num blob-num-hunk",
|
|
4991
4991
|
colspan: "1",
|
|
4992
4992
|
onClick: t[0] || (t[0] = (i) => l("expand", n.splitLine))
|
|
@@ -4998,7 +4998,7 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
4998
4998
|
mr,
|
|
4999
4999
|
vr
|
|
5000
5000
|
], 64)) : (G(), W(pe, { key: 1 }, [
|
|
5001
|
-
|
|
5001
|
+
P("td", {
|
|
5002
5002
|
class: me(["blob-num", {
|
|
5003
5003
|
"blob-num-deletion": i.type === F(w).DELETE,
|
|
5004
5004
|
"blob-num-addition": i.type === F(w).ADD,
|
|
@@ -5006,7 +5006,7 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
5006
5006
|
"blob-num-hunk": n.splitLine.hide !== void 0
|
|
5007
5007
|
}])
|
|
5008
5008
|
}, ee(i.num), 3),
|
|
5009
|
-
|
|
5009
|
+
P("td", {
|
|
5010
5010
|
class: me(["blob-code", {
|
|
5011
5011
|
"blob-code-deletion": i.type === F(w).DELETE,
|
|
5012
5012
|
"blob-code-addition": i.type === F(w).ADD,
|
|
@@ -5017,9 +5017,9 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
5017
5017
|
}]),
|
|
5018
5018
|
onMousedown: (o) => g(s === 0 ? "left" : "right")
|
|
5019
5019
|
}, [
|
|
5020
|
-
|
|
5020
|
+
P("span", {
|
|
5021
5021
|
class: "blob-code-inner blob-code-marker",
|
|
5022
|
-
"data-code-marker":
|
|
5022
|
+
"data-code-marker": f(i.type),
|
|
5023
5023
|
innerHTML: i.code
|
|
5024
5024
|
}, null, 8, wr)
|
|
5025
5025
|
], 42, yr)
|
|
@@ -5027,11 +5027,11 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
5027
5027
|
], 64))), 256))
|
|
5028
5028
|
]));
|
|
5029
5029
|
}
|
|
5030
|
-
}), Ar = { class: "file-diff-split diff-table" }, Mr = /* @__PURE__ */
|
|
5031
|
-
/* @__PURE__ */
|
|
5032
|
-
/* @__PURE__ */
|
|
5033
|
-
/* @__PURE__ */
|
|
5034
|
-
/* @__PURE__ */
|
|
5030
|
+
}), Ar = { class: "file-diff-split diff-table" }, Mr = /* @__PURE__ */ P("colgroup", null, [
|
|
5031
|
+
/* @__PURE__ */ P("col", { width: "44" }),
|
|
5032
|
+
/* @__PURE__ */ P("col"),
|
|
5033
|
+
/* @__PURE__ */ P("col", { width: "44" }),
|
|
5034
|
+
/* @__PURE__ */ P("col")
|
|
5035
5035
|
], -1), Tr = /* @__PURE__ */ Ae({
|
|
5036
5036
|
__name: "SplitViewer",
|
|
5037
5037
|
props: {
|
|
@@ -5039,17 +5039,17 @@ const cr = { key: 0 }, ur = /* @__PURE__ */ U("td", {
|
|
|
5039
5039
|
},
|
|
5040
5040
|
setup(e) {
|
|
5041
5041
|
const r = e;
|
|
5042
|
-
function l({ hideIndex:
|
|
5043
|
-
|
|
5042
|
+
function l({ hideIndex: f }) {
|
|
5043
|
+
f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
|
|
5044
5044
|
g.hide = !1, g.fold = !1;
|
|
5045
5045
|
});
|
|
5046
5046
|
}
|
|
5047
|
-
return (
|
|
5047
|
+
return (f, g) => {
|
|
5048
5048
|
var n;
|
|
5049
5049
|
return G(), W("table", Ar, [
|
|
5050
5050
|
Mr,
|
|
5051
|
-
|
|
5052
|
-
(G(!0), W(pe, null, Ge((n =
|
|
5051
|
+
P("tbody", null, [
|
|
5052
|
+
(G(!0), W(pe, null, Ge((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (G(), Ce(Nr, {
|
|
5053
5053
|
key: i,
|
|
5054
5054
|
"split-line": t,
|
|
5055
5055
|
onExpand: l
|
|
@@ -5082,6 +5082,7 @@ const Sr = ["theme"], Dr = {
|
|
|
5082
5082
|
language: { default: "plaintext" },
|
|
5083
5083
|
context: { default: 10 },
|
|
5084
5084
|
diffStyle: { default: "word" },
|
|
5085
|
+
forceInlineComparison: { type: Boolean, default: !1 },
|
|
5085
5086
|
outputFormat: { default: "line-by-line" },
|
|
5086
5087
|
trim: { type: Boolean, default: !1 },
|
|
5087
5088
|
noDiffLineFeed: { type: Boolean, default: !1 },
|
|
@@ -5095,7 +5096,7 @@ const Sr = ["theme"], Dr = {
|
|
|
5095
5096
|
},
|
|
5096
5097
|
emits: ["diff"],
|
|
5097
5098
|
setup(e, { emit: r }) {
|
|
5098
|
-
const l = e,
|
|
5099
|
+
const l = e, f = r, g = Ee(() => l.outputFormat === "line-by-line"), n = Ee(() => {
|
|
5099
5100
|
let a = l.oldString || "";
|
|
5100
5101
|
return a = l.trim ? a.trim() : a, a = l.noDiffLineFeed ? a.replace(/(\r\n)/g, `
|
|
5101
5102
|
`) : a, a;
|
|
@@ -5104,10 +5105,10 @@ const Sr = ["theme"], Dr = {
|
|
|
5104
5105
|
return a = l.trim ? a.trim() : a, a = l.noDiffLineFeed ? a.replace(/(\r\n)/g, `
|
|
5105
5106
|
`) : a, a;
|
|
5106
5107
|
}), i = Ee(
|
|
5107
|
-
() => g.value ? lr(n.value, t.value, l.language, l.diffStyle, l.context, l.ignoreMatchingLines) : or(n.value, t.value, l.language, l.diffStyle, l.context, l.ignoreMatchingLines)
|
|
5108
|
+
() => g.value ? lr(n.value, t.value, l.language, l.diffStyle, l.forceInlineComparison, l.context, l.ignoreMatchingLines) : or(n.value, t.value, l.language, l.diffStyle, l.forceInlineComparison, l.context, l.ignoreMatchingLines)
|
|
5108
5109
|
), s = Fn(i.value), o = Ee(() => s.value.stat.additionsNum === 0 && s.value.stat.deletionsNum === 0);
|
|
5109
5110
|
return zn(() => l, () => {
|
|
5110
|
-
s.value = i.value,
|
|
5111
|
+
s.value = i.value, f("diff", {
|
|
5111
5112
|
stat: {
|
|
5112
5113
|
isChanged: !o.value,
|
|
5113
5114
|
addNum: s.value.stat.additionsNum,
|
|
@@ -5121,28 +5122,28 @@ const Sr = ["theme"], Dr = {
|
|
|
5121
5122
|
}, [
|
|
5122
5123
|
a.hideHeader ? ve("", !0) : (G(), W("div", Dr, [
|
|
5123
5124
|
F(g) ? (G(), W("div", Lr, [
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5125
|
+
P("span", null, [
|
|
5126
|
+
P("div", Rr, ee(a.filename), 1),
|
|
5127
|
+
P("div", Or, ee(a.newFilename), 1)
|
|
5127
5128
|
]),
|
|
5128
5129
|
a.hideStat ? ve("", !0) : (G(), W("span", Cr, [
|
|
5129
5130
|
en(a.$slots, "stat", {
|
|
5130
5131
|
stat: F(s).stat
|
|
5131
5132
|
}, () => [
|
|
5132
|
-
|
|
5133
|
-
|
|
5133
|
+
P("span", Ir, "+" + ee(F(s).stat.additionsNum) + " additions", 1),
|
|
5134
|
+
P("span", kr, "-" + ee(F(s).stat.deletionsNum) + " deletions", 1)
|
|
5134
5135
|
])
|
|
5135
5136
|
]))
|
|
5136
5137
|
])) : (G(), W("div", Br, [
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5138
|
+
P("span", $r, ee(a.filename), 1),
|
|
5139
|
+
P("span", Ur, [
|
|
5140
|
+
P("span", Pr, ee(a.newFilename), 1),
|
|
5140
5141
|
a.hideStat ? ve("", !0) : (G(), W("span", Hr, [
|
|
5141
5142
|
en(a.$slots, "stat", {
|
|
5142
5143
|
stat: F(s).stat
|
|
5143
5144
|
}, () => [
|
|
5144
|
-
|
|
5145
|
-
|
|
5145
|
+
P("span", Fr, "+" + ee(F(s).stat.additionsNum) + " additions", 1),
|
|
5146
|
+
P("span", zr, "-" + ee(F(s).stat.deletionsNum) + " deletions", 1)
|
|
5146
5147
|
])
|
|
5147
5148
|
]))
|
|
5148
5149
|
])
|