v-code-diff 1.7.1 → 1.8.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 +53 -43
- package/dist/v2/index.cjs.js +12 -12
- package/dist/v2/index.es.js +770 -700
- package/dist/v2/index.umd.js +13 -13
- package/dist/v2.7/index.cjs.js +15 -15
- package/dist/v2.7/index.es.js +1202 -1166
- package/dist/v2.7/index.umd.js +15 -15
- package/dist/v3/index.cjs.js +15 -15
- package/dist/v3/index.es.js +1155 -1094
- package/dist/v3/index.umd.js +15 -15
- package/package.json +13 -2
- package/src/CodeDiff.vue +40 -16
- package/src/style.scss +8 -3
- package/src/var.scss +541 -73
package/dist/v2.7/index.es.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view{--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #24292f;--color-diff-blob-addition-fg: #24292f;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #24292f;--color-diff-blob-deletion-fg: #24292f;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #57606a;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(27,31,36,.15);--color-diffstat-addition-border: rgba(27,31,36,.15);--color-diffstat-addition-bg: #2da44e;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #8250df;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #24292f;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #57606a;--color-codemirror-cursor: #24292f;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #24292f;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #2da44e;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(27,31,36,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(27,31,36,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: -2px -2px 0 rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(27,31,36,.12), 0 8px 24px rgba(66,74,83,.12);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(27,31,36,.15);--color-btn-shadow: 0 1px 0 rgba(27,31,36,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(27,31,36,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(27,31,36,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-focus-bg: #f6f8fa;--color-btn-focus-border: rgba(27,31,36,.15);--color-btn-focus-shadow: 0 0 0 3px rgba(9,105,218,.3);--color-btn-shadow-active: inset 0 .15em .3em rgba(27,31,36,.15);--color-btn-shadow-input-focus: 0 0 0 .2em rgba(9,105,218,.3);--color-btn-counter-bg: rgba(27,31,36,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #2da44e;--color-btn-primary-border: rgba(27,31,36,.15);--color-btn-primary-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #2c974b;--color-btn-primary-hover-border: rgba(27,31,36,.15);--color-btn-primary-selected-bg: hsla(137,55%,36%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(27,31,36,.15);--color-btn-primary-focus-bg: #2da44e;--color-btn-primary-focus-border: rgba(27,31,36,.15);--color-btn-primary-focus-shadow: 0 0 0 3px rgba(45,164,78,.4);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(255,255,255,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(27,31,36,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(27,31,36,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-focus-border: rgba(27,31,36,.15);--color-btn-outline-focus-shadow: 0 0 0 3px rgba(5,80,174,.4);--color-btn-outline-counter-bg: rgba(9,105,218,.1);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(27,31,36,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(27,31,36,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-focus-border: rgba(27,31,36,.15);--color-btn-danger-focus-shadow: 0 0 0 3px rgba(164,14,38,.4);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #cf222e;--color-switch-track-bg: #eaeef2;--color-switch-track-border: #afb8c1;--color-switch-track-checked-bg: #ddf4ff;--color-switch-track-checked-hover-bg: #b6e3ff;--color-switch-track-checked-active-bg: #80ccff;--color-switch-track-checked-border: #54aeff;--color-switch-knob-checked-bg: #0969da;--color-switch-knob-checked-disabled-bg: #6e7781;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #6e7781;--color-fg-default: #24292f;--color-fg-muted: #57606a;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(27,31,36,.15);--color-shadow-small: 0 1px 0 rgba(27,31,36,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #2da44e;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #bf8700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #cf222e;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #2da44e;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #cf222e;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(27,31,36,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(27,31,36,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-primer-shadow-focus: 0 0 0 3px rgba(9,105,218,.3);--color-scale-black: #1b1f24;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .filename{font-size:13px;color:var(--color-fg-default)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .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)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
function
|
|
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{font-size:13px;color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;width:50%}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .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 Cn, { defineComponent as _e, computed as fe, ref as Ln, watch as On } from "vue";
|
|
3
|
+
Cn.util.warn;
|
|
4
|
+
function ne() {
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
diff: function(e,
|
|
6
|
+
ne.prototype = {
|
|
7
|
+
diff: function(e, s) {
|
|
8
8
|
var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, g = u.callback;
|
|
9
9
|
typeof u == "function" && (g = u, u = {}), this.options = u;
|
|
10
10
|
var t = this;
|
|
11
|
-
function r(
|
|
11
|
+
function r(_) {
|
|
12
12
|
return g ? (setTimeout(function() {
|
|
13
|
-
g(void 0,
|
|
14
|
-
}, 0), !0) :
|
|
13
|
+
g(void 0, _);
|
|
14
|
+
}, 0), !0) : _;
|
|
15
15
|
}
|
|
16
|
-
e = this.castInput(e),
|
|
17
|
-
var i =
|
|
16
|
+
e = this.castInput(e), s = this.castInput(s), e = this.removeEmpty(this.tokenize(e)), s = this.removeEmpty(this.tokenize(s));
|
|
17
|
+
var i = s.length, a = e.length, o = 1, l = i + a;
|
|
18
18
|
u.maxEditLength && (l = Math.min(l, u.maxEditLength));
|
|
19
19
|
var c = [{
|
|
20
20
|
newPos: -1,
|
|
21
21
|
components: []
|
|
22
|
-
}], f = this.extractCommon(c[0],
|
|
23
|
-
if (c[0].newPos + 1 >= i && f + 1 >=
|
|
22
|
+
}], f = this.extractCommon(c[0], s, e, 0);
|
|
23
|
+
if (c[0].newPos + 1 >= i && f + 1 >= a)
|
|
24
24
|
return r([{
|
|
25
|
-
value: this.join(
|
|
26
|
-
count:
|
|
25
|
+
value: this.join(s),
|
|
26
|
+
count: s.length
|
|
27
27
|
}]);
|
|
28
28
|
function h() {
|
|
29
|
-
for (var
|
|
30
|
-
var
|
|
31
|
-
v && (c[
|
|
32
|
-
var
|
|
33
|
-
if (!
|
|
34
|
-
c[
|
|
29
|
+
for (var _ = -1 * o; _ <= o; _ += 2) {
|
|
30
|
+
var p = void 0, v = c[_ - 1], E = c[_ + 1], w = (E ? E.newPos : 0) - _;
|
|
31
|
+
v && (c[_ - 1] = void 0);
|
|
32
|
+
var y = v && v.newPos + 1 < i, D = E && 0 <= w && w < a;
|
|
33
|
+
if (!y && !D) {
|
|
34
|
+
c[_] = void 0;
|
|
35
35
|
continue;
|
|
36
36
|
}
|
|
37
|
-
if (!
|
|
38
|
-
return r(
|
|
39
|
-
c[
|
|
37
|
+
if (!y || D && v.newPos < E.newPos ? (p = kn(E), t.pushComponent(p.components, void 0, !0)) : (p = v, p.newPos++, t.pushComponent(p.components, !0, void 0)), w = t.extractCommon(p, s, e, _), p.newPos + 1 >= i && w + 1 >= a)
|
|
38
|
+
return r(In(t, p.components, s, e, t.useLongestToken));
|
|
39
|
+
c[_] = p;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
o++;
|
|
42
42
|
}
|
|
43
43
|
if (g)
|
|
44
|
-
(function
|
|
44
|
+
(function _() {
|
|
45
45
|
setTimeout(function() {
|
|
46
|
-
if (
|
|
46
|
+
if (o > l)
|
|
47
47
|
return g();
|
|
48
|
-
h() ||
|
|
48
|
+
h() || _();
|
|
49
49
|
}, 0);
|
|
50
50
|
})();
|
|
51
51
|
else
|
|
52
|
-
for (;
|
|
52
|
+
for (; o <= l; ) {
|
|
53
53
|
var d = h();
|
|
54
54
|
if (d)
|
|
55
55
|
return d;
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
pushComponent: function(e,
|
|
58
|
+
pushComponent: function(e, s, u) {
|
|
59
59
|
var g = e[e.length - 1];
|
|
60
|
-
g && g.added ===
|
|
60
|
+
g && g.added === s && g.removed === u ? e[e.length - 1] = {
|
|
61
61
|
count: g.count + 1,
|
|
62
|
-
added:
|
|
62
|
+
added: s,
|
|
63
63
|
removed: u
|
|
64
64
|
} : e.push({
|
|
65
65
|
count: 1,
|
|
66
|
-
added:
|
|
66
|
+
added: s,
|
|
67
67
|
removed: u
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
|
-
extractCommon: function(e,
|
|
71
|
-
for (var t =
|
|
72
|
-
i++,
|
|
73
|
-
return
|
|
74
|
-
count:
|
|
75
|
-
}), e.newPos = i,
|
|
70
|
+
extractCommon: function(e, s, u, g) {
|
|
71
|
+
for (var t = s.length, r = u.length, i = e.newPos, a = i - g, o = 0; i + 1 < t && a + 1 < r && this.equals(s[i + 1], u[a + 1]); )
|
|
72
|
+
i++, a++, o++;
|
|
73
|
+
return o && e.components.push({
|
|
74
|
+
count: o
|
|
75
|
+
}), e.newPos = i, a;
|
|
76
76
|
},
|
|
77
|
-
equals: function(e,
|
|
78
|
-
return this.options.comparator ? this.options.comparator(e,
|
|
77
|
+
equals: function(e, s) {
|
|
78
|
+
return this.options.comparator ? this.options.comparator(e, s) : e === s || this.options.ignoreCase && e.toLowerCase() === s.toLowerCase();
|
|
79
79
|
},
|
|
80
80
|
removeEmpty: function(e) {
|
|
81
|
-
for (var
|
|
82
|
-
e[u] &&
|
|
83
|
-
return
|
|
81
|
+
for (var s = [], u = 0; u < e.length; u++)
|
|
82
|
+
e[u] && s.push(e[u]);
|
|
83
|
+
return s;
|
|
84
84
|
},
|
|
85
85
|
castInput: function(e) {
|
|
86
86
|
return e;
|
|
@@ -92,143 +92,143 @@ q.prototype = {
|
|
|
92
92
|
return e.join("");
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
for (var t = 0, r = e.length, i = 0,
|
|
97
|
-
var
|
|
98
|
-
if (
|
|
99
|
-
if (
|
|
95
|
+
function In(n, e, s, u, g) {
|
|
96
|
+
for (var t = 0, r = e.length, i = 0, a = 0; t < r; t++) {
|
|
97
|
+
var o = e[t];
|
|
98
|
+
if (o.removed) {
|
|
99
|
+
if (o.value = n.join(u.slice(a, a + o.count)), a += o.count, t && e[t - 1].added) {
|
|
100
100
|
var c = e[t - 1];
|
|
101
101
|
e[t - 1] = e[t], e[t] = c;
|
|
102
102
|
}
|
|
103
103
|
} else {
|
|
104
|
-
if (!
|
|
105
|
-
var l =
|
|
104
|
+
if (!o.added && g) {
|
|
105
|
+
var l = s.slice(i, i + o.count);
|
|
106
106
|
l = l.map(function(h, d) {
|
|
107
|
-
var
|
|
108
|
-
return
|
|
109
|
-
}),
|
|
107
|
+
var _ = u[a + d];
|
|
108
|
+
return _.length > h.length ? _ : h;
|
|
109
|
+
}), o.value = n.join(l);
|
|
110
110
|
} else
|
|
111
|
-
|
|
112
|
-
i +=
|
|
111
|
+
o.value = n.join(s.slice(i, i + o.count));
|
|
112
|
+
i += o.count, o.added || (a += o.count);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
var f = e[r - 1];
|
|
116
116
|
return r > 1 && typeof f.value == "string" && (f.added || f.removed) && n.equals("", f.value) && (e[r - 2].value += f.value, e.pop()), e;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function kn(n) {
|
|
119
119
|
return {
|
|
120
120
|
newPos: n.newPos,
|
|
121
121
|
components: n.components.slice(0)
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
return
|
|
124
|
+
var Bn = new ne();
|
|
125
|
+
function $n(n, e, s) {
|
|
126
|
+
return Bn.diff(n, e, s);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Pn(n, e) {
|
|
129
129
|
if (typeof n == "function")
|
|
130
130
|
e.callback = n;
|
|
131
131
|
else if (n)
|
|
132
|
-
for (var
|
|
133
|
-
n.hasOwnProperty(
|
|
132
|
+
for (var s in n)
|
|
133
|
+
n.hasOwnProperty(s) && (e[s] = n[s]);
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
|
-
var We = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Qe = /\S/,
|
|
137
|
-
|
|
136
|
+
var We = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Qe = /\S/, Be = new ne();
|
|
137
|
+
Be.equals = function(n, e) {
|
|
138
138
|
return this.options.ignoreCase && (n = n.toLowerCase(), e = e.toLowerCase()), n === e || this.options.ignoreWhitespace && !Qe.test(n) && !Qe.test(e);
|
|
139
139
|
};
|
|
140
|
-
|
|
141
|
-
for (var e = n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),
|
|
142
|
-
!e[
|
|
140
|
+
Be.tokenize = function(n) {
|
|
141
|
+
for (var e = n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), s = 0; s < e.length - 1; s++)
|
|
142
|
+
!e[s + 1] && e[s + 2] && We.test(e[s]) && We.test(e[s + 2]) && (e[s] += e[s + 2], e.splice(s + 1, 2), s--);
|
|
143
143
|
return e;
|
|
144
144
|
};
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function Un(n, e, s) {
|
|
146
|
+
return s = Pn(s, {
|
|
147
147
|
ignoreWhitespace: !0
|
|
148
|
-
}),
|
|
148
|
+
}), Be.diff(n, e, s);
|
|
149
149
|
}
|
|
150
|
-
var tn = new
|
|
150
|
+
var tn = new ne();
|
|
151
151
|
tn.tokenize = function(n) {
|
|
152
|
-
var e = [],
|
|
153
|
-
|
|
154
|
-
for (var u = 0; u <
|
|
155
|
-
var g =
|
|
152
|
+
var e = [], s = n.split(/(\n|\r\n)/);
|
|
153
|
+
s[s.length - 1] || s.pop();
|
|
154
|
+
for (var u = 0; u < s.length; u++) {
|
|
155
|
+
var g = s[u];
|
|
156
156
|
u % 2 && !this.options.newlineIsToken ? e[e.length - 1] += g : (this.options.ignoreWhitespace && (g = g.trim()), e.push(g));
|
|
157
157
|
}
|
|
158
158
|
return e;
|
|
159
159
|
};
|
|
160
|
-
var
|
|
161
|
-
|
|
160
|
+
var xn = new ne();
|
|
161
|
+
xn.tokenize = function(n) {
|
|
162
162
|
return n.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
163
163
|
};
|
|
164
|
-
var
|
|
165
|
-
|
|
164
|
+
var Hn = new ne();
|
|
165
|
+
Hn.tokenize = function(n) {
|
|
166
166
|
return n.split(/([{}:;,]|\s+)/);
|
|
167
167
|
};
|
|
168
|
-
function
|
|
168
|
+
function Ae(n) {
|
|
169
169
|
"@babel/helpers - typeof";
|
|
170
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
170
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ae = function(e) {
|
|
171
171
|
return typeof e;
|
|
172
|
-
} :
|
|
172
|
+
} : Ae = function(e) {
|
|
173
173
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
174
|
-
},
|
|
174
|
+
}, Ae(n);
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
var e = this.options,
|
|
181
|
-
return typeof r == "undefined" ?
|
|
176
|
+
var Fn = Object.prototype.toString, ge = new ne();
|
|
177
|
+
ge.useLongestToken = !0;
|
|
178
|
+
ge.tokenize = tn.tokenize;
|
|
179
|
+
ge.castInput = function(n) {
|
|
180
|
+
var e = this.options, s = e.undefinedReplacement, u = e.stringifyReplacer, g = u === void 0 ? function(t, r) {
|
|
181
|
+
return typeof r == "undefined" ? s : r;
|
|
182
182
|
} : u;
|
|
183
|
-
return typeof n == "string" ? n : JSON.stringify(
|
|
183
|
+
return typeof n == "string" ? n : JSON.stringify(Ie(n, null, null, g), g, " ");
|
|
184
184
|
};
|
|
185
|
-
|
|
186
|
-
return
|
|
185
|
+
ge.equals = function(n, e) {
|
|
186
|
+
return ne.prototype.equals.call(ge, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
|
|
187
187
|
};
|
|
188
|
-
function
|
|
189
|
-
e = e || [],
|
|
188
|
+
function Ie(n, e, s, u, g) {
|
|
189
|
+
e = e || [], s = s || [], u && (n = u(g, n));
|
|
190
190
|
var t;
|
|
191
191
|
for (t = 0; t < e.length; t += 1)
|
|
192
192
|
if (e[t] === n)
|
|
193
|
-
return
|
|
193
|
+
return s[t];
|
|
194
194
|
var r;
|
|
195
|
-
if (
|
|
196
|
-
for (e.push(n), r = new Array(n.length),
|
|
197
|
-
r[t] =
|
|
198
|
-
return e.pop(),
|
|
195
|
+
if (Fn.call(n) === "[object Array]") {
|
|
196
|
+
for (e.push(n), r = new Array(n.length), s.push(r), t = 0; t < n.length; t += 1)
|
|
197
|
+
r[t] = Ie(n[t], e, s, u, g);
|
|
198
|
+
return e.pop(), s.pop(), r;
|
|
199
199
|
}
|
|
200
|
-
if (n && n.toJSON && (n = n.toJSON()),
|
|
201
|
-
e.push(n), r = {},
|
|
202
|
-
var i = [],
|
|
203
|
-
for (
|
|
204
|
-
n.hasOwnProperty(
|
|
200
|
+
if (n && n.toJSON && (n = n.toJSON()), Ae(n) === "object" && n !== null) {
|
|
201
|
+
e.push(n), r = {}, s.push(r);
|
|
202
|
+
var i = [], a;
|
|
203
|
+
for (a in n)
|
|
204
|
+
n.hasOwnProperty(a) && i.push(a);
|
|
205
205
|
for (i.sort(), t = 0; t < i.length; t += 1)
|
|
206
|
-
|
|
207
|
-
e.pop(),
|
|
206
|
+
a = i[t], r[a] = Ie(n[a], e, s, u, a);
|
|
207
|
+
e.pop(), s.pop();
|
|
208
208
|
} else
|
|
209
209
|
r = n;
|
|
210
210
|
return r;
|
|
211
211
|
}
|
|
212
|
-
var
|
|
213
|
-
|
|
212
|
+
var ke = new ne();
|
|
213
|
+
ke.tokenize = function(n) {
|
|
214
214
|
return n.slice();
|
|
215
215
|
};
|
|
216
|
-
|
|
216
|
+
ke.join = ke.removeEmpty = function(n) {
|
|
217
217
|
return n;
|
|
218
218
|
};
|
|
219
|
-
function
|
|
219
|
+
function zn(n) {
|
|
220
220
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
221
221
|
}
|
|
222
222
|
var rn = { exports: {} };
|
|
223
223
|
(function(n) {
|
|
224
224
|
var e = function() {
|
|
225
225
|
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;
|
|
226
|
-
},
|
|
226
|
+
}, s = -1, u = 1, g = 0;
|
|
227
227
|
e.Diff = function(t, r) {
|
|
228
228
|
return [t, r];
|
|
229
|
-
}, e.prototype.diff_main = function(t, r, i,
|
|
230
|
-
typeof
|
|
231
|
-
var
|
|
229
|
+
}, e.prototype.diff_main = function(t, r, i, a) {
|
|
230
|
+
typeof a == "undefined" && (this.Diff_Timeout <= 0 ? a = Number.MAX_VALUE : a = (/* @__PURE__ */ new Date()).getTime() + this.Diff_Timeout * 1e3);
|
|
231
|
+
var o = a;
|
|
232
232
|
if (t == null || r == null)
|
|
233
233
|
throw new Error("Null input. (diff_main)");
|
|
234
234
|
if (t == r)
|
|
@@ -238,49 +238,49 @@ var rn = { exports: {} };
|
|
|
238
238
|
t = t.substring(c), r = r.substring(c), c = this.diff_commonSuffix(t, r);
|
|
239
239
|
var h = t.substring(t.length - c);
|
|
240
240
|
t = t.substring(0, t.length - c), r = r.substring(0, r.length - c);
|
|
241
|
-
var d = this.diff_compute_(t, r, l,
|
|
241
|
+
var d = this.diff_compute_(t, r, l, o);
|
|
242
242
|
return f && d.unshift(new e.Diff(g, f)), h && d.push(new e.Diff(g, h)), this.diff_cleanupMerge(d), d;
|
|
243
|
-
}, e.prototype.diff_compute_ = function(t, r, i,
|
|
244
|
-
var
|
|
243
|
+
}, e.prototype.diff_compute_ = function(t, r, i, a) {
|
|
244
|
+
var o;
|
|
245
245
|
if (!t)
|
|
246
246
|
return [new e.Diff(u, r)];
|
|
247
247
|
if (!r)
|
|
248
|
-
return [new e.Diff(
|
|
248
|
+
return [new e.Diff(s, t)];
|
|
249
249
|
var l = t.length > r.length ? t : r, c = t.length > r.length ? r : t, f = l.indexOf(c);
|
|
250
250
|
if (f != -1)
|
|
251
|
-
return
|
|
251
|
+
return o = [
|
|
252
252
|
new e.Diff(u, l.substring(0, f)),
|
|
253
253
|
new e.Diff(g, c),
|
|
254
254
|
new e.Diff(
|
|
255
255
|
u,
|
|
256
256
|
l.substring(f + c.length)
|
|
257
257
|
)
|
|
258
|
-
], t.length > r.length && (
|
|
258
|
+
], t.length > r.length && (o[0][0] = o[2][0] = s), o;
|
|
259
259
|
if (c.length == 1)
|
|
260
260
|
return [
|
|
261
|
-
new e.Diff(
|
|
261
|
+
new e.Diff(s, t),
|
|
262
262
|
new e.Diff(u, r)
|
|
263
263
|
];
|
|
264
264
|
var h = this.diff_halfMatch_(t, r);
|
|
265
265
|
if (h) {
|
|
266
|
-
var d = h[0],
|
|
266
|
+
var d = h[0], _ = h[1], p = h[2], v = h[3], E = h[4], w = this.diff_main(d, p, i, a), y = this.diff_main(_, v, i, a);
|
|
267
267
|
return w.concat(
|
|
268
268
|
[new e.Diff(g, E)],
|
|
269
|
-
|
|
269
|
+
y
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
|
-
return i && t.length > 100 && r.length > 100 ? this.diff_lineMode_(t, r,
|
|
272
|
+
return i && t.length > 100 && r.length > 100 ? this.diff_lineMode_(t, r, a) : this.diff_bisect_(t, r, a);
|
|
273
273
|
}, e.prototype.diff_lineMode_ = function(t, r, i) {
|
|
274
|
-
var
|
|
275
|
-
t =
|
|
276
|
-
var
|
|
277
|
-
this.diff_charsToLines_(l,
|
|
278
|
-
for (var c = 0, f = 0, h = 0, d = "",
|
|
274
|
+
var a = this.diff_linesToChars_(t, r);
|
|
275
|
+
t = a.chars1, r = a.chars2;
|
|
276
|
+
var o = a.lineArray, l = this.diff_main(t, r, !1, i);
|
|
277
|
+
this.diff_charsToLines_(l, o), this.diff_cleanupSemantic(l), l.push(new e.Diff(g, ""));
|
|
278
|
+
for (var c = 0, f = 0, h = 0, d = "", _ = ""; c < l.length; ) {
|
|
279
279
|
switch (l[c][0]) {
|
|
280
280
|
case u:
|
|
281
|
-
h++,
|
|
281
|
+
h++, _ += l[c][1];
|
|
282
282
|
break;
|
|
283
|
-
case
|
|
283
|
+
case s:
|
|
284
284
|
f++, d += l[c][1];
|
|
285
285
|
break;
|
|
286
286
|
case g:
|
|
@@ -289,175 +289,175 @@ var rn = { exports: {} };
|
|
|
289
289
|
c - f - h,
|
|
290
290
|
f + h
|
|
291
291
|
), c = c - f - h;
|
|
292
|
-
for (var
|
|
293
|
-
l.splice(c, 0,
|
|
294
|
-
c = c +
|
|
292
|
+
for (var p = this.diff_main(d, _, !1, i), v = p.length - 1; v >= 0; v--)
|
|
293
|
+
l.splice(c, 0, p[v]);
|
|
294
|
+
c = c + p.length;
|
|
295
295
|
}
|
|
296
|
-
h = 0, f = 0, d = "",
|
|
296
|
+
h = 0, f = 0, d = "", _ = "";
|
|
297
297
|
break;
|
|
298
298
|
}
|
|
299
299
|
c++;
|
|
300
300
|
}
|
|
301
301
|
return l.pop(), l;
|
|
302
302
|
}, e.prototype.diff_bisect_ = function(t, r, i) {
|
|
303
|
-
for (var
|
|
304
|
-
h[
|
|
303
|
+
for (var a = t.length, o = r.length, l = Math.ceil((a + o) / 2), c = l, f = 2 * l, h = new Array(f), d = new Array(f), _ = 0; _ < f; _++)
|
|
304
|
+
h[_] = -1, d[_] = -1;
|
|
305
305
|
h[c + 1] = 0, d[c + 1] = 0;
|
|
306
|
-
for (var
|
|
307
|
-
for (var M = -
|
|
306
|
+
for (var p = a - o, v = p % 2 != 0, E = 0, w = 0, y = 0, D = 0, T = 0; T < l && !((/* @__PURE__ */ new Date()).getTime() > i); T++) {
|
|
307
|
+
for (var M = -T + E; M <= T - w; M += 2) {
|
|
308
308
|
var I = c + M, R;
|
|
309
|
-
M == -
|
|
310
|
-
for (var H = R - M; R <
|
|
309
|
+
M == -T || M != T && h[I - 1] < h[I + 1] ? R = h[I + 1] : R = h[I - 1] + 1;
|
|
310
|
+
for (var H = R - M; R < a && H < o && t.charAt(R) == r.charAt(H); )
|
|
311
311
|
R++, H++;
|
|
312
|
-
if (h[I] = R, R >
|
|
312
|
+
if (h[I] = R, R > a)
|
|
313
313
|
w += 2;
|
|
314
|
-
else if (H >
|
|
314
|
+
else if (H > o)
|
|
315
315
|
E += 2;
|
|
316
316
|
else if (v) {
|
|
317
|
-
var
|
|
318
|
-
if (
|
|
319
|
-
var $ =
|
|
317
|
+
var P = c + p - M;
|
|
318
|
+
if (P >= 0 && P < f && d[P] != -1) {
|
|
319
|
+
var $ = a - d[P];
|
|
320
320
|
if (R >= $)
|
|
321
321
|
return this.diff_bisectSplit_(t, r, R, H, i);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
for (var F = -
|
|
326
|
-
var
|
|
327
|
-
F == -
|
|
328
|
-
for (var
|
|
329
|
-
$++,
|
|
330
|
-
if (d[
|
|
331
|
-
|
|
332
|
-
else if (
|
|
333
|
-
|
|
325
|
+
for (var F = -T + y; F <= T - D; F += 2) {
|
|
326
|
+
var P = c + F, $;
|
|
327
|
+
F == -T || F != T && d[P - 1] < d[P + 1] ? $ = d[P + 1] : $ = d[P - 1] + 1;
|
|
328
|
+
for (var W = $ - F; $ < a && W < o && t.charAt(a - $ - 1) == r.charAt(o - W - 1); )
|
|
329
|
+
$++, W++;
|
|
330
|
+
if (d[P] = $, $ > a)
|
|
331
|
+
D += 2;
|
|
332
|
+
else if (W > o)
|
|
333
|
+
y += 2;
|
|
334
334
|
else if (!v) {
|
|
335
|
-
var I = c +
|
|
335
|
+
var I = c + p - F;
|
|
336
336
|
if (I >= 0 && I < f && h[I] != -1) {
|
|
337
337
|
var R = h[I], H = c + R - I;
|
|
338
|
-
if ($ =
|
|
338
|
+
if ($ = a - $, R >= $)
|
|
339
339
|
return this.diff_bisectSplit_(t, r, R, H, i);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
return [
|
|
345
|
-
new e.Diff(
|
|
345
|
+
new e.Diff(s, t),
|
|
346
346
|
new e.Diff(u, r)
|
|
347
347
|
];
|
|
348
|
-
}, e.prototype.diff_bisectSplit_ = function(t, r, i,
|
|
349
|
-
var l = t.substring(0, i), c = r.substring(0,
|
|
350
|
-
return d.concat(
|
|
348
|
+
}, e.prototype.diff_bisectSplit_ = function(t, r, i, a, o) {
|
|
349
|
+
var l = t.substring(0, i), c = r.substring(0, a), f = t.substring(i), h = r.substring(a), d = this.diff_main(l, c, !1, o), _ = this.diff_main(f, h, !1, o);
|
|
350
|
+
return d.concat(_);
|
|
351
351
|
}, e.prototype.diff_linesToChars_ = function(t, r) {
|
|
352
|
-
var i = [],
|
|
352
|
+
var i = [], a = {};
|
|
353
353
|
i[0] = "";
|
|
354
|
-
function
|
|
355
|
-
for (var d = "",
|
|
356
|
-
|
|
357
|
-
`,
|
|
358
|
-
var E = h.substring(
|
|
359
|
-
(
|
|
354
|
+
function o(h) {
|
|
355
|
+
for (var d = "", _ = 0, p = -1, v = i.length; p < h.length - 1; ) {
|
|
356
|
+
p = h.indexOf(`
|
|
357
|
+
`, _), p == -1 && (p = h.length - 1);
|
|
358
|
+
var E = h.substring(_, p + 1);
|
|
359
|
+
(a.hasOwnProperty ? a.hasOwnProperty(E) : a[E] !== void 0) ? d += String.fromCharCode(a[E]) : (v == l && (E = h.substring(_), p = h.length), d += String.fromCharCode(v), a[E] = v, i[v++] = E), _ = p + 1;
|
|
360
360
|
}
|
|
361
361
|
return d;
|
|
362
362
|
}
|
|
363
|
-
var l = 4e4, c =
|
|
363
|
+
var l = 4e4, c = o(t);
|
|
364
364
|
l = 65535;
|
|
365
|
-
var f =
|
|
365
|
+
var f = o(r);
|
|
366
366
|
return { chars1: c, chars2: f, lineArray: i };
|
|
367
367
|
}, e.prototype.diff_charsToLines_ = function(t, r) {
|
|
368
368
|
for (var i = 0; i < t.length; i++) {
|
|
369
|
-
for (var
|
|
370
|
-
|
|
371
|
-
t[i][1] =
|
|
369
|
+
for (var a = t[i][1], o = [], l = 0; l < a.length; l++)
|
|
370
|
+
o[l] = r[a.charCodeAt(l)];
|
|
371
|
+
t[i][1] = o.join("");
|
|
372
372
|
}
|
|
373
373
|
}, e.prototype.diff_commonPrefix = function(t, r) {
|
|
374
374
|
if (!t || !r || t.charAt(0) != r.charAt(0))
|
|
375
375
|
return 0;
|
|
376
|
-
for (var i = 0,
|
|
377
|
-
t.substring(l,
|
|
378
|
-
return
|
|
376
|
+
for (var i = 0, a = Math.min(t.length, r.length), o = a, l = 0; i < o; )
|
|
377
|
+
t.substring(l, o) == r.substring(l, o) ? (i = o, l = i) : a = o, o = Math.floor((a - i) / 2 + i);
|
|
378
|
+
return o;
|
|
379
379
|
}, e.prototype.diff_commonSuffix = function(t, r) {
|
|
380
380
|
if (!t || !r || t.charAt(t.length - 1) != r.charAt(r.length - 1))
|
|
381
381
|
return 0;
|
|
382
|
-
for (var i = 0,
|
|
383
|
-
t.substring(t.length -
|
|
384
|
-
return
|
|
382
|
+
for (var i = 0, a = Math.min(t.length, r.length), o = a, l = 0; i < o; )
|
|
383
|
+
t.substring(t.length - o, t.length - l) == r.substring(r.length - o, r.length - l) ? (i = o, l = i) : a = o, o = Math.floor((a - i) / 2 + i);
|
|
384
|
+
return o;
|
|
385
385
|
}, e.prototype.diff_commonOverlap_ = function(t, r) {
|
|
386
|
-
var i = t.length,
|
|
387
|
-
if (i == 0 ||
|
|
386
|
+
var i = t.length, a = r.length;
|
|
387
|
+
if (i == 0 || a == 0)
|
|
388
388
|
return 0;
|
|
389
|
-
i >
|
|
390
|
-
var
|
|
389
|
+
i > a ? t = t.substring(i - a) : i < a && (r = r.substring(0, i));
|
|
390
|
+
var o = Math.min(i, a);
|
|
391
391
|
if (t == r)
|
|
392
|
-
return
|
|
392
|
+
return o;
|
|
393
393
|
for (var l = 0, c = 1; ; ) {
|
|
394
|
-
var f = t.substring(
|
|
394
|
+
var f = t.substring(o - c), h = r.indexOf(f);
|
|
395
395
|
if (h == -1)
|
|
396
396
|
return l;
|
|
397
|
-
c += h, (h == 0 || t.substring(
|
|
397
|
+
c += h, (h == 0 || t.substring(o - c) == r.substring(0, c)) && (l = c, c++);
|
|
398
398
|
}
|
|
399
399
|
}, e.prototype.diff_halfMatch_ = function(t, r) {
|
|
400
400
|
if (this.Diff_Timeout <= 0)
|
|
401
401
|
return null;
|
|
402
|
-
var i = t.length > r.length ? t : r,
|
|
403
|
-
if (i.length < 4 ||
|
|
402
|
+
var i = t.length > r.length ? t : r, a = t.length > r.length ? r : t;
|
|
403
|
+
if (i.length < 4 || a.length * 2 < i.length)
|
|
404
404
|
return null;
|
|
405
|
-
var
|
|
406
|
-
function l(w,
|
|
407
|
-
for (var
|
|
408
|
-
var F =
|
|
409
|
-
w.substring(
|
|
410
|
-
|
|
411
|
-
),
|
|
412
|
-
w.substring(0,
|
|
413
|
-
|
|
405
|
+
var o = this;
|
|
406
|
+
function l(w, y, D) {
|
|
407
|
+
for (var T = w.substring(D, D + Math.floor(w.length / 4)), M = -1, I = "", R, H, P, $; (M = y.indexOf(T, M + 1)) != -1; ) {
|
|
408
|
+
var F = o.diff_commonPrefix(
|
|
409
|
+
w.substring(D),
|
|
410
|
+
y.substring(M)
|
|
411
|
+
), W = o.diff_commonSuffix(
|
|
412
|
+
w.substring(0, D),
|
|
413
|
+
y.substring(0, M)
|
|
414
414
|
);
|
|
415
|
-
I.length <
|
|
415
|
+
I.length < W + F && (I = y.substring(M - W, M) + y.substring(M, M + F), R = w.substring(0, D - W), H = w.substring(D + F), P = y.substring(0, M - W), $ = y.substring(M + F));
|
|
416
416
|
}
|
|
417
417
|
return I.length * 2 >= w.length ? [
|
|
418
418
|
R,
|
|
419
419
|
H,
|
|
420
|
-
|
|
420
|
+
P,
|
|
421
421
|
$,
|
|
422
422
|
I
|
|
423
423
|
] : null;
|
|
424
424
|
}
|
|
425
425
|
var c = l(
|
|
426
426
|
i,
|
|
427
|
-
|
|
427
|
+
a,
|
|
428
428
|
Math.ceil(i.length / 4)
|
|
429
429
|
), f = l(
|
|
430
430
|
i,
|
|
431
|
-
|
|
431
|
+
a,
|
|
432
432
|
Math.ceil(i.length / 2)
|
|
433
433
|
), h;
|
|
434
434
|
if (!c && !f)
|
|
435
435
|
return null;
|
|
436
436
|
f ? c ? h = c[4].length > f[4].length ? c : f : h = f : h = c;
|
|
437
|
-
var d,
|
|
438
|
-
t.length > r.length ? (d = h[0],
|
|
437
|
+
var d, _, p, v;
|
|
438
|
+
t.length > r.length ? (d = h[0], _ = h[1], p = h[2], v = h[3]) : (p = h[0], v = h[1], d = h[2], _ = h[3]);
|
|
439
439
|
var E = h[4];
|
|
440
|
-
return [d,
|
|
440
|
+
return [d, _, p, v, E];
|
|
441
441
|
}, e.prototype.diff_cleanupSemantic = function(t) {
|
|
442
|
-
for (var r = !1, i = [],
|
|
443
|
-
t[l][0] == g ? (i[
|
|
442
|
+
for (var r = !1, i = [], a = 0, o = null, l = 0, c = 0, f = 0, h = 0, d = 0; l < t.length; )
|
|
443
|
+
t[l][0] == g ? (i[a++] = l, c = h, f = d, h = 0, d = 0, o = t[l][1]) : (t[l][0] == u ? h += t[l][1].length : d += t[l][1].length, o && o.length <= Math.max(c, f) && o.length <= Math.max(
|
|
444
444
|
h,
|
|
445
445
|
d
|
|
446
446
|
) && (t.splice(
|
|
447
|
-
i[
|
|
447
|
+
i[a - 1],
|
|
448
448
|
0,
|
|
449
|
-
new e.Diff(
|
|
450
|
-
), t[i[
|
|
449
|
+
new e.Diff(s, o)
|
|
450
|
+
), t[i[a - 1] + 1][0] = u, a--, a--, l = a > 0 ? i[a - 1] : -1, c = 0, f = 0, h = 0, d = 0, o = null, r = !0)), l++;
|
|
451
451
|
for (r && this.diff_cleanupMerge(t), this.diff_cleanupSemanticLossless(t), l = 1; l < t.length; ) {
|
|
452
|
-
if (t[l - 1][0] ==
|
|
453
|
-
var
|
|
454
|
-
v >= E ? (v >=
|
|
452
|
+
if (t[l - 1][0] == s && t[l][0] == u) {
|
|
453
|
+
var _ = t[l - 1][1], p = t[l][1], v = this.diff_commonOverlap_(_, p), E = this.diff_commonOverlap_(p, _);
|
|
454
|
+
v >= E ? (v >= _.length / 2 || v >= p.length / 2) && (t.splice(l, 0, new e.Diff(
|
|
455
455
|
g,
|
|
456
|
-
|
|
457
|
-
)), t[l - 1][1] =
|
|
456
|
+
p.substring(0, v)
|
|
457
|
+
)), t[l - 1][1] = _.substring(0, _.length - v), t[l + 1][1] = p.substring(v), l++) : (E >= _.length / 2 || E >= p.length / 2) && (t.splice(l, 0, new e.Diff(
|
|
458
458
|
g,
|
|
459
|
-
|
|
460
|
-
)), t[l - 1][0] = u, t[l - 1][1] =
|
|
459
|
+
_.substring(0, E)
|
|
460
|
+
)), t[l - 1][0] = u, t[l - 1][1] = p.substring(0, p.length - E), t[l + 1][0] = s, t[l + 1][1] = _.substring(E), l++), l++;
|
|
461
461
|
}
|
|
462
462
|
l++;
|
|
463
463
|
}
|
|
@@ -465,56 +465,56 @@ var rn = { exports: {} };
|
|
|
465
465
|
function r(E, w) {
|
|
466
466
|
if (!E || !w)
|
|
467
467
|
return 6;
|
|
468
|
-
var
|
|
469
|
-
return $ || F ? 5 : H ||
|
|
468
|
+
var y = E.charAt(E.length - 1), D = w.charAt(0), T = y.match(e.nonAlphaNumericRegex_), M = D.match(e.nonAlphaNumericRegex_), I = T && y.match(e.whitespaceRegex_), R = M && D.match(e.whitespaceRegex_), H = I && y.match(e.linebreakRegex_), P = R && D.match(e.linebreakRegex_), $ = H && E.match(e.blanklineEndRegex_), F = P && w.match(e.blanklineStartRegex_);
|
|
469
|
+
return $ || F ? 5 : H || P ? 4 : T && !I && R ? 3 : I || R ? 2 : T || M ? 1 : 0;
|
|
470
470
|
}
|
|
471
471
|
for (var i = 1; i < t.length - 1; ) {
|
|
472
472
|
if (t[i - 1][0] == g && t[i + 1][0] == g) {
|
|
473
|
-
var
|
|
473
|
+
var a = t[i - 1][1], o = t[i][1], l = t[i + 1][1], c = this.diff_commonSuffix(a, o);
|
|
474
474
|
if (c) {
|
|
475
|
-
var f =
|
|
476
|
-
|
|
475
|
+
var f = o.substring(o.length - c);
|
|
476
|
+
a = a.substring(0, a.length - c), o = f + o.substring(0, o.length - c), l = f + l;
|
|
477
477
|
}
|
|
478
|
-
for (var h =
|
|
479
|
-
|
|
480
|
-
var v = r(
|
|
481
|
-
v >=
|
|
478
|
+
for (var h = a, d = o, _ = l, p = r(a, o) + r(o, l); o.charAt(0) === l.charAt(0); ) {
|
|
479
|
+
a += o.charAt(0), o = o.substring(1) + l.charAt(0), l = l.substring(1);
|
|
480
|
+
var v = r(a, o) + r(o, l);
|
|
481
|
+
v >= p && (p = v, h = a, d = o, _ = l);
|
|
482
482
|
}
|
|
483
|
-
t[i - 1][1] != h && (h ? t[i - 1][1] = h : (t.splice(i - 1, 1), i--), t[i][1] = d,
|
|
483
|
+
t[i - 1][1] != h && (h ? t[i - 1][1] = h : (t.splice(i - 1, 1), i--), t[i][1] = d, _ ? t[i + 1][1] = _ : (t.splice(i + 1, 1), i--));
|
|
484
484
|
}
|
|
485
485
|
i++;
|
|
486
486
|
}
|
|
487
487
|
}, e.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, e.whitespaceRegex_ = /\s/, e.linebreakRegex_ = /[\r\n]/, e.blanklineEndRegex_ = /\n\r?\n$/, e.blanklineStartRegex_ = /^\r?\n\r?\n/, e.prototype.diff_cleanupEfficiency = function(t) {
|
|
488
|
-
for (var r = !1, i = [],
|
|
489
|
-
t[l][0] == g ? (t[l][1].length < this.Diff_EditCost && (h || d) ? (i[
|
|
490
|
-
i[
|
|
488
|
+
for (var r = !1, i = [], a = 0, o = null, l = 0, c = !1, f = !1, h = !1, d = !1; l < t.length; )
|
|
489
|
+
t[l][0] == g ? (t[l][1].length < this.Diff_EditCost && (h || d) ? (i[a++] = l, c = h, f = d, o = t[l][1]) : (a = 0, o = null), h = d = !1) : (t[l][0] == s ? d = !0 : h = !0, o && (c && f && h && d || o.length < this.Diff_EditCost / 2 && c + f + h + d == 3) && (t.splice(
|
|
490
|
+
i[a - 1],
|
|
491
491
|
0,
|
|
492
|
-
new e.Diff(
|
|
493
|
-
), t[i[
|
|
492
|
+
new e.Diff(s, o)
|
|
493
|
+
), t[i[a - 1] + 1][0] = u, a--, o = null, c && f ? (h = d = !0, a = 0) : (a--, l = a > 0 ? i[a - 1] : -1, h = d = !1), r = !0)), l++;
|
|
494
494
|
r && this.diff_cleanupMerge(t);
|
|
495
495
|
}, e.prototype.diff_cleanupMerge = function(t) {
|
|
496
496
|
t.push(new e.Diff(g, ""));
|
|
497
|
-
for (var r = 0, i = 0,
|
|
497
|
+
for (var r = 0, i = 0, a = 0, o = "", l = "", c; r < t.length; )
|
|
498
498
|
switch (t[r][0]) {
|
|
499
499
|
case u:
|
|
500
|
-
|
|
500
|
+
a++, l += t[r][1], r++;
|
|
501
501
|
break;
|
|
502
|
-
case
|
|
503
|
-
i++,
|
|
502
|
+
case s:
|
|
503
|
+
i++, o += t[r][1], r++;
|
|
504
504
|
break;
|
|
505
505
|
case g:
|
|
506
|
-
i +
|
|
506
|
+
i + a > 1 ? (i !== 0 && a !== 0 && (c = this.diff_commonPrefix(l, o), c !== 0 && (r - i - a > 0 && t[r - i - a - 1][0] == g ? t[r - i - a - 1][1] += l.substring(0, c) : (t.splice(0, 0, new e.Diff(
|
|
507
507
|
g,
|
|
508
508
|
l.substring(0, c)
|
|
509
|
-
)), r++), l = l.substring(c),
|
|
509
|
+
)), r++), l = l.substring(c), o = o.substring(c)), c = this.diff_commonSuffix(l, o), c !== 0 && (t[r][1] = l.substring(l.length - c) + t[r][1], l = l.substring(0, l.length - c), o = o.substring(0, o.length - c))), r -= i + a, t.splice(r, i + a), o.length && (t.splice(
|
|
510
510
|
r,
|
|
511
511
|
0,
|
|
512
|
-
new e.Diff(
|
|
512
|
+
new e.Diff(s, o)
|
|
513
513
|
), r++), l.length && (t.splice(
|
|
514
514
|
r,
|
|
515
515
|
0,
|
|
516
516
|
new e.Diff(u, l)
|
|
517
|
-
), r++), r++) : r !== 0 && t[r - 1][0] == g ? (t[r - 1][1] += t[r][1], t.splice(r, 1)) : r++,
|
|
517
|
+
), r++), r++) : r !== 0 && t[r - 1][0] == g ? (t[r - 1][1] += t[r][1], t.splice(r, 1)) : r++, a = 0, i = 0, o = "", l = "";
|
|
518
518
|
break;
|
|
519
519
|
}
|
|
520
520
|
t[t.length - 1][1] === "" && t.pop();
|
|
@@ -523,18 +523,18 @@ var rn = { exports: {} };
|
|
|
523
523
|
t[r - 1][0] == g && t[r + 1][0] == g && (t[r][1].substring(t[r][1].length - t[r - 1][1].length) == t[r - 1][1] ? (t[r][1] = t[r - 1][1] + t[r][1].substring(0, t[r][1].length - t[r - 1][1].length), t[r + 1][1] = t[r - 1][1] + t[r + 1][1], t.splice(r - 1, 1), f = !0) : t[r][1].substring(0, t[r + 1][1].length) == t[r + 1][1] && (t[r - 1][1] += t[r + 1][1], t[r][1] = t[r][1].substring(t[r + 1][1].length) + t[r + 1][1], t.splice(r + 1, 1), f = !0)), r++;
|
|
524
524
|
f && this.diff_cleanupMerge(t);
|
|
525
525
|
}, e.prototype.diff_xIndex = function(t, r) {
|
|
526
|
-
var i = 0,
|
|
527
|
-
for (c = 0; c < t.length && (t[c][0] !== u && (i += t[c][1].length), t[c][0] !==
|
|
528
|
-
|
|
529
|
-
return t.length != c && t[c][0] ===
|
|
526
|
+
var i = 0, a = 0, o = 0, l = 0, c;
|
|
527
|
+
for (c = 0; c < t.length && (t[c][0] !== u && (i += t[c][1].length), t[c][0] !== s && (a += t[c][1].length), !(i > r)); c++)
|
|
528
|
+
o = i, l = a;
|
|
529
|
+
return t.length != c && t[c][0] === s ? l : l + (r - o);
|
|
530
530
|
}, e.prototype.diff_prettyHtml = function(t) {
|
|
531
|
-
for (var r = [], i = /&/g,
|
|
532
|
-
var f = t[c][0], h = t[c][1], d = h.replace(i, "&").replace(
|
|
531
|
+
for (var r = [], i = /&/g, a = /</g, o = />/g, l = /\n/g, c = 0; c < t.length; c++) {
|
|
532
|
+
var f = t[c][0], h = t[c][1], d = h.replace(i, "&").replace(a, "<").replace(o, ">").replace(l, "¶<br>");
|
|
533
533
|
switch (f) {
|
|
534
534
|
case u:
|
|
535
535
|
r[c] = '<ins style="background:#e6ffe6;">' + d + "</ins>";
|
|
536
536
|
break;
|
|
537
|
-
case
|
|
537
|
+
case s:
|
|
538
538
|
r[c] = '<del style="background:#ffe6e6;">' + d + "</del>";
|
|
539
539
|
break;
|
|
540
540
|
case g:
|
|
@@ -549,31 +549,31 @@ var rn = { exports: {} };
|
|
|
549
549
|
return r.join("");
|
|
550
550
|
}, e.prototype.diff_text2 = function(t) {
|
|
551
551
|
for (var r = [], i = 0; i < t.length; i++)
|
|
552
|
-
t[i][0] !==
|
|
552
|
+
t[i][0] !== s && (r[i] = t[i][1]);
|
|
553
553
|
return r.join("");
|
|
554
554
|
}, e.prototype.diff_levenshtein = function(t) {
|
|
555
|
-
for (var r = 0, i = 0,
|
|
556
|
-
var l = t[
|
|
555
|
+
for (var r = 0, i = 0, a = 0, o = 0; o < t.length; o++) {
|
|
556
|
+
var l = t[o][0], c = t[o][1];
|
|
557
557
|
switch (l) {
|
|
558
558
|
case u:
|
|
559
559
|
i += c.length;
|
|
560
560
|
break;
|
|
561
|
-
case
|
|
562
|
-
|
|
561
|
+
case s:
|
|
562
|
+
a += c.length;
|
|
563
563
|
break;
|
|
564
564
|
case g:
|
|
565
|
-
r += Math.max(i,
|
|
565
|
+
r += Math.max(i, a), i = 0, a = 0;
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return r += Math.max(i,
|
|
569
|
+
return r += Math.max(i, a), r;
|
|
570
570
|
}, e.prototype.diff_toDelta = function(t) {
|
|
571
571
|
for (var r = [], i = 0; i < t.length; i++)
|
|
572
572
|
switch (t[i][0]) {
|
|
573
573
|
case u:
|
|
574
574
|
r[i] = "+" + encodeURI(t[i][1]);
|
|
575
575
|
break;
|
|
576
|
-
case
|
|
576
|
+
case s:
|
|
577
577
|
r[i] = "-" + t[i][1].length;
|
|
578
578
|
break;
|
|
579
579
|
case g:
|
|
@@ -582,13 +582,13 @@ var rn = { exports: {} };
|
|
|
582
582
|
}
|
|
583
583
|
return r.join(" ").replace(/%20/g, " ");
|
|
584
584
|
}, e.prototype.diff_fromDelta = function(t, r) {
|
|
585
|
-
for (var i = [],
|
|
585
|
+
for (var i = [], a = 0, o = 0, l = r.split(/\t/g), c = 0; c < l.length; c++) {
|
|
586
586
|
var f = l[c].substring(1);
|
|
587
587
|
switch (l[c].charAt(0)) {
|
|
588
588
|
case "+":
|
|
589
589
|
try {
|
|
590
|
-
i[
|
|
591
|
-
} catch (
|
|
590
|
+
i[a++] = new e.Diff(u, decodeURI(f));
|
|
591
|
+
} catch (_) {
|
|
592
592
|
throw new Error("Illegal escape in diff_fromDelta: " + f);
|
|
593
593
|
}
|
|
594
594
|
break;
|
|
@@ -597,16 +597,16 @@ var rn = { exports: {} };
|
|
|
597
597
|
var h = parseInt(f, 10);
|
|
598
598
|
if (isNaN(h) || h < 0)
|
|
599
599
|
throw new Error("Invalid number in diff_fromDelta: " + f);
|
|
600
|
-
var d = t.substring(
|
|
601
|
-
l[c].charAt(0) == "=" ? i[
|
|
600
|
+
var d = t.substring(o, o += h);
|
|
601
|
+
l[c].charAt(0) == "=" ? i[a++] = new e.Diff(g, d) : i[a++] = new e.Diff(s, d);
|
|
602
602
|
break;
|
|
603
603
|
default:
|
|
604
604
|
if (l[c])
|
|
605
605
|
throw new Error("Invalid diff operation in diff_fromDelta: " + l[c]);
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
if (
|
|
609
|
-
throw new Error("Delta length (" +
|
|
608
|
+
if (o != t.length)
|
|
609
|
+
throw new Error("Delta length (" + o + ") does not equal source text length (" + t.length + ").");
|
|
610
610
|
return i;
|
|
611
611
|
}, e.prototype.match_main = function(t, r, i) {
|
|
612
612
|
if (t == null || r == null || i == null)
|
|
@@ -615,27 +615,27 @@ var rn = { exports: {} };
|
|
|
615
615
|
}, e.prototype.match_bitap_ = function(t, r, i) {
|
|
616
616
|
if (r.length > this.Match_MaxBits)
|
|
617
617
|
throw new Error("Pattern too long for this browser.");
|
|
618
|
-
var
|
|
618
|
+
var a = this.match_alphabet_(r), o = this;
|
|
619
619
|
function l(R, H) {
|
|
620
|
-
var
|
|
621
|
-
return
|
|
620
|
+
var P = R / r.length, $ = Math.abs(i - H);
|
|
621
|
+
return o.Match_Distance ? P + $ / o.Match_Distance : $ ? 1 : P;
|
|
622
622
|
}
|
|
623
623
|
var c = this.Match_Threshold, f = t.indexOf(r, i);
|
|
624
624
|
f != -1 && (c = Math.min(l(0, f), c), f = t.lastIndexOf(r, i + r.length), f != -1 && (c = Math.min(l(0, f), c)));
|
|
625
625
|
var h = 1 << r.length - 1;
|
|
626
626
|
f = -1;
|
|
627
|
-
for (var d,
|
|
628
|
-
for (d = 0,
|
|
629
|
-
l(E, i +
|
|
630
|
-
|
|
631
|
-
var w = Math.max(1, i -
|
|
632
|
-
|
|
633
|
-
for (var
|
|
634
|
-
var M =
|
|
635
|
-
if (E === 0 ? T
|
|
636
|
-
var I = l(E,
|
|
627
|
+
for (var d, _, p = r.length + t.length, v, E = 0; E < r.length; E++) {
|
|
628
|
+
for (d = 0, _ = p; d < _; )
|
|
629
|
+
l(E, i + _) <= c ? d = _ : p = _, _ = Math.floor((p - d) / 2 + d);
|
|
630
|
+
p = _;
|
|
631
|
+
var w = Math.max(1, i - _ + 1), y = Math.min(i + _, t.length) + r.length, D = Array(y + 2);
|
|
632
|
+
D[y + 1] = (1 << E) - 1;
|
|
633
|
+
for (var T = y; T >= w; T--) {
|
|
634
|
+
var M = a[t.charAt(T - 1)];
|
|
635
|
+
if (E === 0 ? D[T] = (D[T + 1] << 1 | 1) & M : D[T] = (D[T + 1] << 1 | 1) & M | ((v[T + 1] | v[T]) << 1 | 1) | v[T + 1], D[T] & h) {
|
|
636
|
+
var I = l(E, T - 1);
|
|
637
637
|
if (I <= c)
|
|
638
|
-
if (c = I, f =
|
|
638
|
+
if (c = I, f = T - 1, f > i)
|
|
639
639
|
w = Math.max(1, 2 * i - f);
|
|
640
640
|
else
|
|
641
641
|
break;
|
|
@@ -643,7 +643,7 @@ var rn = { exports: {} };
|
|
|
643
643
|
}
|
|
644
644
|
if (l(E + 1, i) > c)
|
|
645
645
|
break;
|
|
646
|
-
v =
|
|
646
|
+
v = D;
|
|
647
647
|
}
|
|
648
648
|
return f;
|
|
649
649
|
}, e.prototype.match_alphabet_ = function(t) {
|
|
@@ -656,68 +656,68 @@ var rn = { exports: {} };
|
|
|
656
656
|
if (r.length != 0) {
|
|
657
657
|
if (t.start2 === null)
|
|
658
658
|
throw Error("patch not initialized");
|
|
659
|
-
for (var i = r.substring(t.start2, t.start2 + t.length1),
|
|
660
|
-
|
|
661
|
-
t.start2 -
|
|
662
|
-
t.start2 + t.length1 +
|
|
659
|
+
for (var i = r.substring(t.start2, t.start2 + t.length1), a = 0; r.indexOf(i) != r.lastIndexOf(i) && i.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; )
|
|
660
|
+
a += this.Patch_Margin, i = r.substring(
|
|
661
|
+
t.start2 - a,
|
|
662
|
+
t.start2 + t.length1 + a
|
|
663
663
|
);
|
|
664
|
-
|
|
665
|
-
var
|
|
666
|
-
|
|
664
|
+
a += this.Patch_Margin;
|
|
665
|
+
var o = r.substring(t.start2 - a, t.start2);
|
|
666
|
+
o && t.diffs.unshift(new e.Diff(g, o));
|
|
667
667
|
var l = r.substring(
|
|
668
668
|
t.start2 + t.length1,
|
|
669
|
-
t.start2 + t.length1 +
|
|
669
|
+
t.start2 + t.length1 + a
|
|
670
670
|
);
|
|
671
|
-
l && t.diffs.push(new e.Diff(g, l)), t.start1 -=
|
|
671
|
+
l && t.diffs.push(new e.Diff(g, l)), t.start1 -= o.length, t.start2 -= o.length, t.length1 += o.length + l.length, t.length2 += o.length + l.length;
|
|
672
672
|
}
|
|
673
673
|
}, e.prototype.patch_make = function(t, r, i) {
|
|
674
|
-
var
|
|
674
|
+
var a, o;
|
|
675
675
|
if (typeof t == "string" && typeof r == "string" && typeof i == "undefined")
|
|
676
|
-
|
|
677
|
-
t,
|
|
678
|
-
|
|
676
|
+
a = /** @type {string} */
|
|
677
|
+
t, o = this.diff_main(
|
|
678
|
+
a,
|
|
679
679
|
/** @type {string} */
|
|
680
680
|
r,
|
|
681
681
|
!0
|
|
682
|
-
),
|
|
682
|
+
), o.length > 2 && (this.diff_cleanupSemantic(o), this.diff_cleanupEfficiency(o));
|
|
683
683
|
else if (t && typeof t == "object" && typeof r == "undefined" && typeof i == "undefined")
|
|
684
|
-
|
|
685
|
-
t,
|
|
684
|
+
o = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
685
|
+
t, a = this.diff_text1(o);
|
|
686
686
|
else if (typeof t == "string" && r && typeof r == "object" && typeof i == "undefined")
|
|
687
|
-
|
|
688
|
-
t,
|
|
687
|
+
a = /** @type {string} */
|
|
688
|
+
t, o = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
689
689
|
r;
|
|
690
690
|
else if (typeof t == "string" && typeof r == "string" && i && typeof i == "object")
|
|
691
|
-
|
|
692
|
-
t,
|
|
691
|
+
a = /** @type {string} */
|
|
692
|
+
t, o = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
693
693
|
i;
|
|
694
694
|
else
|
|
695
695
|
throw new Error("Unknown call format to patch_make.");
|
|
696
|
-
if (
|
|
696
|
+
if (o.length === 0)
|
|
697
697
|
return [];
|
|
698
|
-
for (var l = [], c = new e.patch_obj(), f = 0, h = 0, d = 0,
|
|
699
|
-
var E =
|
|
698
|
+
for (var l = [], c = new e.patch_obj(), f = 0, h = 0, d = 0, _ = a, p = a, v = 0; v < o.length; v++) {
|
|
699
|
+
var E = o[v][0], w = o[v][1];
|
|
700
700
|
switch (!f && E !== g && (c.start1 = h, c.start2 = d), E) {
|
|
701
701
|
case u:
|
|
702
|
-
c.diffs[f++] =
|
|
702
|
+
c.diffs[f++] = o[v], c.length2 += w.length, p = p.substring(0, d) + w + p.substring(d);
|
|
703
703
|
break;
|
|
704
|
-
case
|
|
705
|
-
c.length1 += w.length, c.diffs[f++] =
|
|
704
|
+
case s:
|
|
705
|
+
c.length1 += w.length, c.diffs[f++] = o[v], p = p.substring(0, d) + p.substring(d + w.length);
|
|
706
706
|
break;
|
|
707
707
|
case g:
|
|
708
|
-
w.length <= 2 * this.Patch_Margin && f &&
|
|
708
|
+
w.length <= 2 * this.Patch_Margin && f && o.length != v + 1 ? (c.diffs[f++] = o[v], c.length1 += w.length, c.length2 += w.length) : w.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, _), l.push(c), c = new e.patch_obj(), f = 0, _ = p, h = d);
|
|
709
709
|
break;
|
|
710
710
|
}
|
|
711
|
-
E !== u && (h += w.length), E !==
|
|
711
|
+
E !== u && (h += w.length), E !== s && (d += w.length);
|
|
712
712
|
}
|
|
713
|
-
return f && (this.patch_addContext_(c,
|
|
713
|
+
return f && (this.patch_addContext_(c, _), l.push(c)), l;
|
|
714
714
|
}, e.prototype.patch_deepCopy = function(t) {
|
|
715
715
|
for (var r = [], i = 0; i < t.length; i++) {
|
|
716
|
-
var
|
|
717
|
-
|
|
718
|
-
for (var l = 0; l <
|
|
719
|
-
|
|
720
|
-
|
|
716
|
+
var a = t[i], o = new e.patch_obj();
|
|
717
|
+
o.diffs = [];
|
|
718
|
+
for (var l = 0; l < a.diffs.length; l++)
|
|
719
|
+
o.diffs[l] = new e.Diff(a.diffs[l][0], a.diffs[l][1]);
|
|
720
|
+
o.start1 = a.start1, o.start2 = a.start2, o.length1 = a.length1, o.length2 = a.length2, r[i] = o;
|
|
721
721
|
}
|
|
722
722
|
return r;
|
|
723
723
|
}, e.prototype.patch_apply = function(t, r) {
|
|
@@ -726,8 +726,8 @@ var rn = { exports: {} };
|
|
|
726
726
|
t = this.patch_deepCopy(t);
|
|
727
727
|
var i = this.patch_addPadding(t);
|
|
728
728
|
r = i + r + i, this.patch_splitMax(t);
|
|
729
|
-
for (var
|
|
730
|
-
var c = t[l].start2 +
|
|
729
|
+
for (var a = 0, o = [], l = 0; l < t.length; l++) {
|
|
730
|
+
var c = t[l].start2 + a, f = this.diff_text1(t[l].diffs), h, d = -1;
|
|
731
731
|
if (f.length > this.Match_MaxBits ? (h = this.match_main(
|
|
732
732
|
r,
|
|
733
733
|
f.substring(0, this.Match_MaxBits),
|
|
@@ -737,66 +737,66 @@ var rn = { exports: {} };
|
|
|
737
737
|
f.substring(f.length - this.Match_MaxBits),
|
|
738
738
|
c + f.length - this.Match_MaxBits
|
|
739
739
|
), (d == -1 || h >= d) && (h = -1))) : h = this.match_main(r, f, c), h == -1)
|
|
740
|
-
|
|
740
|
+
o[l] = !1, a -= t[l].length2 - t[l].length1;
|
|
741
741
|
else {
|
|
742
|
-
|
|
743
|
-
var
|
|
744
|
-
if (d == -1 ?
|
|
742
|
+
o[l] = !0, a = h - c;
|
|
743
|
+
var _;
|
|
744
|
+
if (d == -1 ? _ = r.substring(h, h + f.length) : _ = r.substring(h, d + this.Match_MaxBits), f == _)
|
|
745
745
|
r = r.substring(0, h) + this.diff_text2(t[l].diffs) + r.substring(h + f.length);
|
|
746
746
|
else {
|
|
747
|
-
var
|
|
748
|
-
if (f.length > this.Match_MaxBits && this.diff_levenshtein(
|
|
749
|
-
|
|
747
|
+
var p = this.diff_main(f, _, !1);
|
|
748
|
+
if (f.length > this.Match_MaxBits && this.diff_levenshtein(p) / f.length > this.Patch_DeleteThreshold)
|
|
749
|
+
o[l] = !1;
|
|
750
750
|
else {
|
|
751
|
-
this.diff_cleanupSemanticLossless(
|
|
751
|
+
this.diff_cleanupSemanticLossless(p);
|
|
752
752
|
for (var v = 0, E, w = 0; w < t[l].diffs.length; w++) {
|
|
753
|
-
var
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
v +
|
|
757
|
-
))),
|
|
753
|
+
var y = t[l].diffs[w];
|
|
754
|
+
y[0] !== g && (E = this.diff_xIndex(p, v)), y[0] === u ? r = r.substring(0, h + E) + y[1] + r.substring(h + E) : y[0] === s && (r = r.substring(0, h + E) + r.substring(h + this.diff_xIndex(
|
|
755
|
+
p,
|
|
756
|
+
v + y[1].length
|
|
757
|
+
))), y[0] !== s && (v += y[1].length);
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
|
-
return r = r.substring(i.length, r.length - i.length), [r,
|
|
763
|
+
return r = r.substring(i.length, r.length - i.length), [r, o];
|
|
764
764
|
}, e.prototype.patch_addPadding = function(t) {
|
|
765
|
-
for (var r = this.Patch_Margin, i = "",
|
|
766
|
-
i += String.fromCharCode(
|
|
767
|
-
for (var
|
|
768
|
-
t[
|
|
769
|
-
var
|
|
765
|
+
for (var r = this.Patch_Margin, i = "", a = 1; a <= r; a++)
|
|
766
|
+
i += String.fromCharCode(a);
|
|
767
|
+
for (var a = 0; a < t.length; a++)
|
|
768
|
+
t[a].start1 += r, t[a].start2 += r;
|
|
769
|
+
var o = t[0], l = o.diffs;
|
|
770
770
|
if (l.length == 0 || l[0][0] != g)
|
|
771
|
-
l.unshift(new e.Diff(g, i)),
|
|
771
|
+
l.unshift(new e.Diff(g, i)), o.start1 -= r, o.start2 -= r, o.length1 += r, o.length2 += r;
|
|
772
772
|
else if (r > l[0][1].length) {
|
|
773
773
|
var c = r - l[0][1].length;
|
|
774
|
-
l[0][1] = i.substring(l[0][1].length) + l[0][1],
|
|
774
|
+
l[0][1] = i.substring(l[0][1].length) + l[0][1], o.start1 -= c, o.start2 -= c, o.length1 += c, o.length2 += c;
|
|
775
775
|
}
|
|
776
|
-
if (
|
|
777
|
-
l.push(new e.Diff(g, i)),
|
|
776
|
+
if (o = t[t.length - 1], l = o.diffs, l.length == 0 || l[l.length - 1][0] != g)
|
|
777
|
+
l.push(new e.Diff(g, i)), o.length1 += r, o.length2 += r;
|
|
778
778
|
else if (r > l[l.length - 1][1].length) {
|
|
779
779
|
var c = r - l[l.length - 1][1].length;
|
|
780
|
-
l[l.length - 1][1] += i.substring(0, c),
|
|
780
|
+
l[l.length - 1][1] += i.substring(0, c), o.length1 += c, o.length2 += c;
|
|
781
781
|
}
|
|
782
782
|
return i;
|
|
783
783
|
}, e.prototype.patch_splitMax = function(t) {
|
|
784
784
|
for (var r = this.Match_MaxBits, i = 0; i < t.length; i++)
|
|
785
785
|
if (!(t[i].length1 <= r)) {
|
|
786
|
-
var
|
|
786
|
+
var a = t[i];
|
|
787
787
|
t.splice(i--, 1);
|
|
788
|
-
for (var
|
|
788
|
+
for (var o = a.start1, l = a.start2, c = ""; a.diffs.length !== 0; ) {
|
|
789
789
|
var f = new e.patch_obj(), h = !0;
|
|
790
|
-
for (f.start1 =
|
|
791
|
-
var d =
|
|
792
|
-
d === u ? (f.length2 +=
|
|
790
|
+
for (f.start1 = o - c.length, f.start2 = l - c.length, c !== "" && (f.length1 = f.length2 = c.length, f.diffs.push(new e.Diff(g, c))); a.diffs.length !== 0 && f.length1 < r - this.Patch_Margin; ) {
|
|
791
|
+
var d = a.diffs[0][0], _ = a.diffs[0][1];
|
|
792
|
+
d === u ? (f.length2 += _.length, l += _.length, f.diffs.push(a.diffs.shift()), h = !1) : d === s && f.diffs.length == 1 && f.diffs[0][0] == g && _.length > 2 * r ? (f.length1 += _.length, o += _.length, h = !1, f.diffs.push(new e.Diff(d, _)), a.diffs.shift()) : (_ = _.substring(
|
|
793
793
|
0,
|
|
794
794
|
r - f.length1 - this.Patch_Margin
|
|
795
|
-
), f.length1 +=
|
|
795
|
+
), f.length1 += _.length, o += _.length, d === g ? (f.length2 += _.length, l += _.length) : h = !1, f.diffs.push(new e.Diff(d, _)), _ == a.diffs[0][1] ? a.diffs.shift() : a.diffs[0][1] = a.diffs[0][1].substring(_.length));
|
|
796
796
|
}
|
|
797
797
|
c = this.diff_text2(f.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
798
|
-
var
|
|
799
|
-
|
|
798
|
+
var p = this.diff_text1(a.diffs).substring(0, this.Patch_Margin);
|
|
799
|
+
p !== "" && (f.length1 += p.length, f.length2 += p.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] === g ? f.diffs[f.diffs.length - 1][1] += p : f.diffs.push(new e.Diff(g, p))), h || t.splice(++i, 0, f);
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
}, e.prototype.patch_toText = function(t) {
|
|
@@ -808,20 +808,20 @@ var rn = { exports: {} };
|
|
|
808
808
|
if (!t)
|
|
809
809
|
return r;
|
|
810
810
|
for (var i = t.split(`
|
|
811
|
-
`),
|
|
812
|
-
var l = i[
|
|
811
|
+
`), a = 0, o = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; a < i.length; ) {
|
|
812
|
+
var l = i[a].match(o);
|
|
813
813
|
if (!l)
|
|
814
|
-
throw new Error("Invalid patch string: " + i[
|
|
814
|
+
throw new Error("Invalid patch string: " + i[a]);
|
|
815
815
|
var c = new e.patch_obj();
|
|
816
|
-
for (r.push(c), c.start1 = parseInt(l[1], 10), l[2] === "" ? (c.start1--, c.length1 = 1) : l[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(l[2], 10)), c.start2 = parseInt(l[3], 10), l[4] === "" ? (c.start2--, c.length2 = 1) : l[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(l[4], 10)),
|
|
817
|
-
var f = i[
|
|
816
|
+
for (r.push(c), c.start1 = parseInt(l[1], 10), l[2] === "" ? (c.start1--, c.length1 = 1) : l[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(l[2], 10)), c.start2 = parseInt(l[3], 10), l[4] === "" ? (c.start2--, c.length2 = 1) : l[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(l[4], 10)), a++; a < i.length; ) {
|
|
817
|
+
var f = i[a].charAt(0);
|
|
818
818
|
try {
|
|
819
|
-
var h = decodeURI(i[
|
|
819
|
+
var h = decodeURI(i[a].substring(1));
|
|
820
820
|
} catch (d) {
|
|
821
821
|
throw new Error("Illegal escape in patch_fromText: " + h);
|
|
822
822
|
}
|
|
823
823
|
if (f == "-")
|
|
824
|
-
c.diffs.push(new e.Diff(
|
|
824
|
+
c.diffs.push(new e.Diff(s, h));
|
|
825
825
|
else if (f == "+")
|
|
826
826
|
c.diffs.push(new e.Diff(u, h));
|
|
827
827
|
else if (f == " ")
|
|
@@ -832,7 +832,7 @@ var rn = { exports: {} };
|
|
|
832
832
|
if (f !== "")
|
|
833
833
|
throw new Error('Invalid patch mode "' + f + '" in: ' + h);
|
|
834
834
|
}
|
|
835
|
-
|
|
835
|
+
a++;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
return r;
|
|
@@ -842,37 +842,35 @@ var rn = { exports: {} };
|
|
|
842
842
|
var t, r;
|
|
843
843
|
this.length1 === 0 ? t = this.start1 + ",0" : this.length1 == 1 ? t = this.start1 + 1 : t = this.start1 + 1 + "," + this.length1, this.length2 === 0 ? r = this.start2 + ",0" : this.length2 == 1 ? r = this.start2 + 1 : r = this.start2 + 1 + "," + this.length2;
|
|
844
844
|
for (var i = ["@@ -" + t + " +" + r + ` @@
|
|
845
|
-
`],
|
|
846
|
-
switch (this.diffs[
|
|
845
|
+
`], a, o = 0; o < this.diffs.length; o++) {
|
|
846
|
+
switch (this.diffs[o][0]) {
|
|
847
847
|
case u:
|
|
848
|
-
|
|
848
|
+
a = "+";
|
|
849
849
|
break;
|
|
850
|
-
case
|
|
851
|
-
|
|
850
|
+
case s:
|
|
851
|
+
a = "-";
|
|
852
852
|
break;
|
|
853
853
|
case g:
|
|
854
|
-
|
|
854
|
+
a = " ";
|
|
855
855
|
break;
|
|
856
856
|
}
|
|
857
|
-
i[
|
|
857
|
+
i[o + 1] = a + encodeURI(this.diffs[o][1]) + `
|
|
858
858
|
`;
|
|
859
859
|
}
|
|
860
860
|
return i.join("").replace(/%20/g, " ");
|
|
861
|
-
}, n.exports = e, n.exports.diff_match_patch = e, n.exports.DIFF_DELETE =
|
|
861
|
+
}, n.exports = e, n.exports.diff_match_patch = e, n.exports.DIFF_DELETE = s, n.exports.DIFF_INSERT = u, n.exports.DIFF_EQUAL = g;
|
|
862
862
|
})(rn);
|
|
863
|
-
var Le = rn.exports
|
|
864
|
-
function
|
|
863
|
+
var Le = rn.exports;
|
|
864
|
+
function sn(n) {
|
|
865
865
|
return n instanceof Map ? n.clear = n.delete = n.set = function() {
|
|
866
866
|
throw new Error("map is read-only");
|
|
867
867
|
} : n instanceof Set && (n.add = n.clear = n.delete = function() {
|
|
868
868
|
throw new Error("set is read-only");
|
|
869
|
-
}), Object.freeze(n), Object.getOwnPropertyNames(n).forEach(
|
|
870
|
-
|
|
871
|
-
|
|
869
|
+
}), Object.freeze(n), Object.getOwnPropertyNames(n).forEach((e) => {
|
|
870
|
+
const s = n[e], u = typeof s;
|
|
871
|
+
(u === "object" || u === "function") && !Object.isFrozen(s) && sn(s);
|
|
872
872
|
}), n;
|
|
873
873
|
}
|
|
874
|
-
Be.exports = $e;
|
|
875
|
-
Be.exports.default = $e;
|
|
876
874
|
class Ve {
|
|
877
875
|
/**
|
|
878
876
|
* @param {CompiledMode} mode
|
|
@@ -884,45 +882,47 @@ class Ve {
|
|
|
884
882
|
this.isMatchIgnored = !0;
|
|
885
883
|
}
|
|
886
884
|
}
|
|
887
|
-
function
|
|
885
|
+
function an(n) {
|
|
888
886
|
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
889
887
|
}
|
|
890
888
|
function te(n, ...e) {
|
|
891
|
-
const
|
|
889
|
+
const s = /* @__PURE__ */ Object.create(null);
|
|
892
890
|
for (const u in n)
|
|
893
|
-
|
|
891
|
+
s[u] = n[u];
|
|
894
892
|
return e.forEach(function(u) {
|
|
895
893
|
for (const g in u)
|
|
896
|
-
|
|
894
|
+
s[g] = u[g];
|
|
897
895
|
}), /** @type {T} */
|
|
898
|
-
|
|
896
|
+
s;
|
|
899
897
|
}
|
|
900
|
-
const
|
|
898
|
+
const Gn = "</span>", Ze = (n) => !!n.scope, Kn = (n, { prefix: e }) => {
|
|
899
|
+
if (n.startsWith("language:"))
|
|
900
|
+
return n.replace("language:", "language-");
|
|
901
901
|
if (n.includes(".")) {
|
|
902
|
-
const
|
|
902
|
+
const s = n.split(".");
|
|
903
903
|
return [
|
|
904
|
-
`${e}${
|
|
905
|
-
...
|
|
904
|
+
`${e}${s.shift()}`,
|
|
905
|
+
...s.map((u, g) => `${u}${"_".repeat(g + 1)}`)
|
|
906
906
|
].join(" ");
|
|
907
907
|
}
|
|
908
908
|
return `${e}${n}`;
|
|
909
909
|
};
|
|
910
|
-
class
|
|
910
|
+
class Wn {
|
|
911
911
|
/**
|
|
912
912
|
* Creates a new HTMLRenderer
|
|
913
913
|
*
|
|
914
914
|
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
|
915
915
|
* @param {{classPrefix: string}} options
|
|
916
916
|
*/
|
|
917
|
-
constructor(e,
|
|
918
|
-
this.buffer = "", this.classPrefix =
|
|
917
|
+
constructor(e, s) {
|
|
918
|
+
this.buffer = "", this.classPrefix = s.classPrefix, e.walk(this);
|
|
919
919
|
}
|
|
920
920
|
/**
|
|
921
921
|
* Adds texts to the output stream
|
|
922
922
|
*
|
|
923
923
|
* @param {string} text */
|
|
924
924
|
addText(e) {
|
|
925
|
-
this.buffer +=
|
|
925
|
+
this.buffer += an(e);
|
|
926
926
|
}
|
|
927
927
|
/**
|
|
928
928
|
* Adds a node open to the output stream (if needed)
|
|
@@ -931,15 +931,18 @@ class Gn {
|
|
|
931
931
|
openNode(e) {
|
|
932
932
|
if (!Ze(e))
|
|
933
933
|
return;
|
|
934
|
-
|
|
935
|
-
|
|
934
|
+
const s = Kn(
|
|
935
|
+
e.scope,
|
|
936
|
+
{ prefix: this.classPrefix }
|
|
937
|
+
);
|
|
938
|
+
this.span(s);
|
|
936
939
|
}
|
|
937
940
|
/**
|
|
938
941
|
* Adds a node close to the output stream (if needed)
|
|
939
942
|
*
|
|
940
943
|
* @param {Node} node */
|
|
941
944
|
closeNode(e) {
|
|
942
|
-
Ze(e) && (this.buffer +=
|
|
945
|
+
Ze(e) && (this.buffer += Gn);
|
|
943
946
|
}
|
|
944
947
|
/**
|
|
945
948
|
* returns the accumulated buffer
|
|
@@ -960,7 +963,7 @@ const Ye = (n = {}) => {
|
|
|
960
963
|
const e = { children: [] };
|
|
961
964
|
return Object.assign(e, n), e;
|
|
962
965
|
};
|
|
963
|
-
class
|
|
966
|
+
class $e {
|
|
964
967
|
constructor() {
|
|
965
968
|
this.rootNode = Ye(), this.stack = [this.rootNode];
|
|
966
969
|
}
|
|
@@ -976,8 +979,8 @@ class Ue {
|
|
|
976
979
|
}
|
|
977
980
|
/** @param {string} scope */
|
|
978
981
|
openNode(e) {
|
|
979
|
-
const
|
|
980
|
-
this.add(
|
|
982
|
+
const s = Ye({ scope: e });
|
|
983
|
+
this.add(s), this.stack.push(s);
|
|
981
984
|
}
|
|
982
985
|
closeNode() {
|
|
983
986
|
if (this.stack.length > 1)
|
|
@@ -1001,101 +1004,101 @@ class Ue {
|
|
|
1001
1004
|
* @param {Renderer} builder
|
|
1002
1005
|
* @param {Node} node
|
|
1003
1006
|
*/
|
|
1004
|
-
static _walk(e,
|
|
1005
|
-
return typeof
|
|
1007
|
+
static _walk(e, s) {
|
|
1008
|
+
return typeof s == "string" ? e.addText(s) : s.children && (e.openNode(s), s.children.forEach((u) => this._walk(e, u)), e.closeNode(s)), e;
|
|
1006
1009
|
}
|
|
1007
1010
|
/**
|
|
1008
1011
|
* @param {Node} node
|
|
1009
1012
|
*/
|
|
1010
1013
|
static _collapse(e) {
|
|
1011
|
-
typeof e != "string" && e.children && (e.children.every((
|
|
1012
|
-
|
|
1014
|
+
typeof e != "string" && e.children && (e.children.every((s) => typeof s == "string") ? e.children = [e.children.join("")] : e.children.forEach((s) => {
|
|
1015
|
+
$e._collapse(s);
|
|
1013
1016
|
}));
|
|
1014
1017
|
}
|
|
1015
1018
|
}
|
|
1016
|
-
class
|
|
1019
|
+
class Qn extends $e {
|
|
1017
1020
|
/**
|
|
1018
1021
|
* @param {*} options
|
|
1019
1022
|
*/
|
|
1020
1023
|
constructor(e) {
|
|
1021
1024
|
super(), this.options = e;
|
|
1022
1025
|
}
|
|
1023
|
-
/**
|
|
1024
|
-
* @param {string} text
|
|
1025
|
-
* @param {string} scope
|
|
1026
|
-
*/
|
|
1027
|
-
addKeyword(e, o) {
|
|
1028
|
-
e !== "" && (this.openNode(o), this.addText(e), this.closeNode());
|
|
1029
|
-
}
|
|
1030
1026
|
/**
|
|
1031
1027
|
* @param {string} text
|
|
1032
1028
|
*/
|
|
1033
1029
|
addText(e) {
|
|
1034
1030
|
e !== "" && this.add(e);
|
|
1035
1031
|
}
|
|
1032
|
+
/** @param {string} scope */
|
|
1033
|
+
startScope(e) {
|
|
1034
|
+
this.openNode(e);
|
|
1035
|
+
}
|
|
1036
|
+
endScope() {
|
|
1037
|
+
this.closeNode();
|
|
1038
|
+
}
|
|
1036
1039
|
/**
|
|
1037
1040
|
* @param {Emitter & {root: DataNode}} emitter
|
|
1038
1041
|
* @param {string} name
|
|
1039
1042
|
*/
|
|
1040
|
-
|
|
1043
|
+
__addSublanguage(e, s) {
|
|
1041
1044
|
const u = e.root;
|
|
1042
|
-
|
|
1045
|
+
s && (u.scope = `language:${s}`), this.add(u);
|
|
1043
1046
|
}
|
|
1044
1047
|
toHTML() {
|
|
1045
|
-
return new
|
|
1048
|
+
return new Wn(this, this.options).value();
|
|
1046
1049
|
}
|
|
1047
1050
|
finalize() {
|
|
1048
|
-
return !0;
|
|
1051
|
+
return this.closeAllNodes(), !0;
|
|
1049
1052
|
}
|
|
1050
1053
|
}
|
|
1051
|
-
function
|
|
1054
|
+
function he(n) {
|
|
1052
1055
|
return n ? typeof n == "string" ? n : n.source : null;
|
|
1053
1056
|
}
|
|
1054
|
-
function
|
|
1057
|
+
function on(n) {
|
|
1055
1058
|
return se("(?=", n, ")");
|
|
1056
1059
|
}
|
|
1057
|
-
function
|
|
1060
|
+
function Vn(n) {
|
|
1058
1061
|
return se("(?:", n, ")*");
|
|
1059
1062
|
}
|
|
1060
|
-
function
|
|
1063
|
+
function Zn(n) {
|
|
1061
1064
|
return se("(?:", n, ")?");
|
|
1062
1065
|
}
|
|
1063
1066
|
function se(...n) {
|
|
1064
|
-
return n.map((
|
|
1067
|
+
return n.map((s) => he(s)).join("");
|
|
1065
1068
|
}
|
|
1066
|
-
function
|
|
1069
|
+
function Yn(n) {
|
|
1067
1070
|
const e = n[n.length - 1];
|
|
1068
1071
|
return typeof e == "object" && e.constructor === Object ? (n.splice(n.length - 1, 1), e) : {};
|
|
1069
1072
|
}
|
|
1070
1073
|
function Pe(...n) {
|
|
1071
|
-
return "(" + (
|
|
1074
|
+
return "(" + (Yn(n).capture ? "" : "?:") + n.map((u) => he(u)).join("|") + ")";
|
|
1072
1075
|
}
|
|
1073
|
-
function
|
|
1076
|
+
function ln(n) {
|
|
1074
1077
|
return new RegExp(n.toString() + "|").exec("").length - 1;
|
|
1075
1078
|
}
|
|
1076
|
-
function
|
|
1077
|
-
const
|
|
1078
|
-
return
|
|
1079
|
+
function Xn(n, e) {
|
|
1080
|
+
const s = n && n.exec(e);
|
|
1081
|
+
return s && s.index === 0;
|
|
1079
1082
|
}
|
|
1080
|
-
const
|
|
1081
|
-
function
|
|
1082
|
-
let
|
|
1083
|
+
const jn = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1084
|
+
function Ue(n, { joinWith: e }) {
|
|
1085
|
+
let s = 0;
|
|
1083
1086
|
return n.map((u) => {
|
|
1084
|
-
|
|
1085
|
-
const g =
|
|
1086
|
-
let t =
|
|
1087
|
+
s += 1;
|
|
1088
|
+
const g = s;
|
|
1089
|
+
let t = he(u), r = "";
|
|
1087
1090
|
for (; t.length > 0; ) {
|
|
1088
|
-
const i =
|
|
1091
|
+
const i = jn.exec(t);
|
|
1089
1092
|
if (!i) {
|
|
1090
1093
|
r += t;
|
|
1091
1094
|
break;
|
|
1092
1095
|
}
|
|
1093
|
-
r += t.substring(0, i.index), t = t.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? r += "\\" + String(Number(i[1]) + g) : (r += i[0], i[0] === "(" &&
|
|
1096
|
+
r += t.substring(0, i.index), t = t.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? r += "\\" + String(Number(i[1]) + g) : (r += i[0], i[0] === "(" && s++);
|
|
1094
1097
|
}
|
|
1095
1098
|
return r;
|
|
1096
1099
|
}).map((u) => `(${u})`).join(e);
|
|
1097
1100
|
}
|
|
1098
|
-
const
|
|
1101
|
+
const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\\d+)?", fn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", gn = "\\b(0b[01]+)", qn = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", et = (n = {}) => {
|
|
1099
1102
|
const e = /^#![ ]*\//;
|
|
1100
1103
|
return n.binary && (n.begin = se(
|
|
1101
1104
|
e,
|
|
@@ -1108,28 +1111,28 @@ const Xn = /\b\B/, ln = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
1108
1111
|
end: /$/,
|
|
1109
1112
|
relevance: 0,
|
|
1110
1113
|
/** @type {ModeCallback} */
|
|
1111
|
-
"on:begin": (
|
|
1112
|
-
|
|
1114
|
+
"on:begin": (s, u) => {
|
|
1115
|
+
s.index !== 0 && u.ignoreMatch();
|
|
1113
1116
|
}
|
|
1114
1117
|
}, n);
|
|
1115
|
-
},
|
|
1118
|
+
}, de = {
|
|
1116
1119
|
begin: "\\\\[\\s\\S]",
|
|
1117
1120
|
relevance: 0
|
|
1118
|
-
},
|
|
1121
|
+
}, nt = {
|
|
1119
1122
|
scope: "string",
|
|
1120
1123
|
begin: "'",
|
|
1121
1124
|
end: "'",
|
|
1122
1125
|
illegal: "\\n",
|
|
1123
|
-
contains: [
|
|
1124
|
-
},
|
|
1126
|
+
contains: [de]
|
|
1127
|
+
}, tt = {
|
|
1125
1128
|
scope: "string",
|
|
1126
1129
|
begin: '"',
|
|
1127
1130
|
end: '"',
|
|
1128
1131
|
illegal: "\\n",
|
|
1129
|
-
contains: [
|
|
1130
|
-
},
|
|
1132
|
+
contains: [de]
|
|
1133
|
+
}, rt = {
|
|
1131
1134
|
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/
|
|
1132
|
-
},
|
|
1135
|
+
}, Se = function(n, e, s = {}) {
|
|
1133
1136
|
const u = te(
|
|
1134
1137
|
{
|
|
1135
1138
|
scope: "comment",
|
|
@@ -1137,7 +1140,7 @@ const Xn = /\b\B/, ln = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
1137
1140
|
end: e,
|
|
1138
1141
|
contains: []
|
|
1139
1142
|
},
|
|
1140
|
-
|
|
1143
|
+
s
|
|
1141
1144
|
);
|
|
1142
1145
|
u.contains.push({
|
|
1143
1146
|
scope: "doctag",
|
|
@@ -1195,132 +1198,122 @@ const Xn = /\b\B/, ln = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
1195
1198
|
// look for 3 words in a row
|
|
1196
1199
|
}
|
|
1197
1200
|
), u;
|
|
1198
|
-
},
|
|
1199
|
-
scope: "number",
|
|
1200
|
-
begin: cn,
|
|
1201
|
-
relevance: 0
|
|
1202
|
-
}, at = {
|
|
1201
|
+
}, it = Se("//", "$"), st = Se("/\\*", "\\*/"), at = Se("#", "$"), ot = {
|
|
1203
1202
|
scope: "number",
|
|
1204
1203
|
begin: un,
|
|
1205
1204
|
relevance: 0
|
|
1206
|
-
},
|
|
1205
|
+
}, lt = {
|
|
1207
1206
|
scope: "number",
|
|
1208
1207
|
begin: fn,
|
|
1209
1208
|
relevance: 0
|
|
1210
|
-
}, lt = {
|
|
1211
|
-
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
|
1212
|
-
// an expression such as:
|
|
1213
|
-
//
|
|
1214
|
-
// 3 / something
|
|
1215
|
-
//
|
|
1216
|
-
// (which will then blow up when regex's `illegal` sees the newline)
|
|
1217
|
-
begin: /(?=\/[^/\n]*\/)/,
|
|
1218
|
-
contains: [{
|
|
1219
|
-
scope: "regexp",
|
|
1220
|
-
begin: /\//,
|
|
1221
|
-
end: /\/[gimuy]*/,
|
|
1222
|
-
illegal: /\n/,
|
|
1223
|
-
contains: [
|
|
1224
|
-
ge,
|
|
1225
|
-
{
|
|
1226
|
-
begin: /\[/,
|
|
1227
|
-
end: /\]/,
|
|
1228
|
-
relevance: 0,
|
|
1229
|
-
contains: [ge]
|
|
1230
|
-
}
|
|
1231
|
-
]
|
|
1232
|
-
}]
|
|
1233
1209
|
}, ct = {
|
|
1234
|
-
scope: "
|
|
1235
|
-
begin:
|
|
1210
|
+
scope: "number",
|
|
1211
|
+
begin: gn,
|
|
1236
1212
|
relevance: 0
|
|
1237
1213
|
}, ut = {
|
|
1214
|
+
scope: "regexp",
|
|
1215
|
+
begin: /\/(?=[^/\n]*\/)/,
|
|
1216
|
+
end: /\/[gimuy]*/,
|
|
1217
|
+
contains: [
|
|
1218
|
+
de,
|
|
1219
|
+
{
|
|
1220
|
+
begin: /\[/,
|
|
1221
|
+
end: /\]/,
|
|
1222
|
+
relevance: 0,
|
|
1223
|
+
contains: [de]
|
|
1224
|
+
}
|
|
1225
|
+
]
|
|
1226
|
+
}, ft = {
|
|
1238
1227
|
scope: "title",
|
|
1239
|
-
begin:
|
|
1228
|
+
begin: cn,
|
|
1240
1229
|
relevance: 0
|
|
1241
|
-
},
|
|
1230
|
+
}, gt = {
|
|
1231
|
+
scope: "title",
|
|
1232
|
+
begin: xe,
|
|
1233
|
+
relevance: 0
|
|
1234
|
+
}, ht = {
|
|
1242
1235
|
// excludes method names from keyword processing
|
|
1243
|
-
begin: "\\.\\s*" +
|
|
1236
|
+
begin: "\\.\\s*" + xe,
|
|
1244
1237
|
relevance: 0
|
|
1245
|
-
},
|
|
1238
|
+
}, dt = function(n) {
|
|
1246
1239
|
return Object.assign(
|
|
1247
1240
|
n,
|
|
1248
1241
|
{
|
|
1249
1242
|
/** @type {ModeCallback} */
|
|
1250
|
-
"on:begin": (e,
|
|
1251
|
-
|
|
1243
|
+
"on:begin": (e, s) => {
|
|
1244
|
+
s.data._beginMatch = e[1];
|
|
1252
1245
|
},
|
|
1253
1246
|
/** @type {ModeCallback} */
|
|
1254
|
-
"on:end": (e,
|
|
1255
|
-
|
|
1247
|
+
"on:end": (e, s) => {
|
|
1248
|
+
s.data._beginMatch !== e[1] && s.ignoreMatch();
|
|
1256
1249
|
}
|
|
1257
1250
|
}
|
|
1258
1251
|
);
|
|
1259
1252
|
};
|
|
1260
|
-
var
|
|
1253
|
+
var ye = /* @__PURE__ */ Object.freeze({
|
|
1261
1254
|
__proto__: null,
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1255
|
+
APOS_STRING_MODE: nt,
|
|
1256
|
+
BACKSLASH_ESCAPE: de,
|
|
1257
|
+
BINARY_NUMBER_MODE: ct,
|
|
1258
|
+
BINARY_NUMBER_RE: gn,
|
|
1259
|
+
COMMENT: Se,
|
|
1260
|
+
C_BLOCK_COMMENT_MODE: st,
|
|
1261
|
+
C_LINE_COMMENT_MODE: it,
|
|
1262
|
+
C_NUMBER_MODE: lt,
|
|
1263
|
+
C_NUMBER_RE: fn,
|
|
1264
|
+
END_SAME_AS_BEGIN: dt,
|
|
1265
|
+
HASH_COMMENT_MODE: at,
|
|
1266
|
+
IDENT_RE: cn,
|
|
1267
|
+
MATCH_NOTHING_RE: Jn,
|
|
1268
|
+
METHOD_GUARD: ht,
|
|
1269
|
+
NUMBER_MODE: ot,
|
|
1270
|
+
NUMBER_RE: un,
|
|
1271
|
+
PHRASAL_WORDS_MODE: rt,
|
|
1272
|
+
QUOTE_STRING_MODE: tt,
|
|
1273
|
+
REGEXP_MODE: ut,
|
|
1274
|
+
RE_STARTERS_RE: qn,
|
|
1275
|
+
SHEBANG: et,
|
|
1276
|
+
TITLE_MODE: ft,
|
|
1277
|
+
UNDERSCORE_IDENT_RE: xe,
|
|
1278
|
+
UNDERSCORE_TITLE_MODE: gt
|
|
1286
1279
|
});
|
|
1287
|
-
function
|
|
1280
|
+
function _t(n, e) {
|
|
1288
1281
|
n.input[n.index - 1] === "." && e.ignoreMatch();
|
|
1289
1282
|
}
|
|
1290
|
-
function
|
|
1283
|
+
function pt(n, e) {
|
|
1291
1284
|
n.className !== void 0 && (n.scope = n.className, delete n.className);
|
|
1292
1285
|
}
|
|
1293
|
-
function
|
|
1294
|
-
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin =
|
|
1286
|
+
function bt(n, e) {
|
|
1287
|
+
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin = _t, n.keywords = n.keywords || n.beginKeywords, delete n.beginKeywords, n.relevance === void 0 && (n.relevance = 0));
|
|
1295
1288
|
}
|
|
1296
|
-
function
|
|
1289
|
+
function vt(n, e) {
|
|
1297
1290
|
Array.isArray(n.illegal) && (n.illegal = Pe(...n.illegal));
|
|
1298
1291
|
}
|
|
1299
|
-
function
|
|
1292
|
+
function Et(n, e) {
|
|
1300
1293
|
if (n.match) {
|
|
1301
1294
|
if (n.begin || n.end)
|
|
1302
1295
|
throw new Error("begin & end are not supported with match");
|
|
1303
1296
|
n.begin = n.match, delete n.match;
|
|
1304
1297
|
}
|
|
1305
1298
|
}
|
|
1306
|
-
function
|
|
1299
|
+
function mt(n, e) {
|
|
1307
1300
|
n.relevance === void 0 && (n.relevance = 1);
|
|
1308
1301
|
}
|
|
1309
|
-
const
|
|
1302
|
+
const yt = (n, e) => {
|
|
1310
1303
|
if (!n.beforeMatch)
|
|
1311
1304
|
return;
|
|
1312
1305
|
if (n.starts)
|
|
1313
1306
|
throw new Error("beforeMatch cannot be used with starts");
|
|
1314
|
-
const
|
|
1307
|
+
const s = Object.assign({}, n);
|
|
1315
1308
|
Object.keys(n).forEach((u) => {
|
|
1316
1309
|
delete n[u];
|
|
1317
|
-
}), n.keywords =
|
|
1310
|
+
}), n.keywords = s.keywords, n.begin = se(s.beforeMatch, on(s.begin)), n.starts = {
|
|
1318
1311
|
relevance: 0,
|
|
1319
1312
|
contains: [
|
|
1320
|
-
Object.assign(
|
|
1313
|
+
Object.assign(s, { endsParent: !0 })
|
|
1321
1314
|
]
|
|
1322
|
-
}, n.relevance = 0, delete
|
|
1323
|
-
},
|
|
1315
|
+
}, n.relevance = 0, delete s.beforeMatch;
|
|
1316
|
+
}, wt = [
|
|
1324
1317
|
"of",
|
|
1325
1318
|
"and",
|
|
1326
1319
|
"for",
|
|
@@ -1335,94 +1328,94 @@ const Et = (n, e) => {
|
|
|
1335
1328
|
// common variable name
|
|
1336
1329
|
"value"
|
|
1337
1330
|
// common variable name
|
|
1338
|
-
],
|
|
1339
|
-
function
|
|
1331
|
+
], Nt = "keyword";
|
|
1332
|
+
function hn(n, e, s = Nt) {
|
|
1340
1333
|
const u = /* @__PURE__ */ Object.create(null);
|
|
1341
|
-
return typeof n == "string" ? g(
|
|
1334
|
+
return typeof n == "string" ? g(s, n.split(" ")) : Array.isArray(n) ? g(s, n) : Object.keys(n).forEach(function(t) {
|
|
1342
1335
|
Object.assign(
|
|
1343
1336
|
u,
|
|
1344
|
-
|
|
1337
|
+
hn(n[t], e, t)
|
|
1345
1338
|
);
|
|
1346
1339
|
}), u;
|
|
1347
1340
|
function g(t, r) {
|
|
1348
1341
|
e && (r = r.map((i) => i.toLowerCase())), r.forEach(function(i) {
|
|
1349
|
-
const
|
|
1350
|
-
u[
|
|
1342
|
+
const a = i.split("|");
|
|
1343
|
+
u[a[0]] = [t, At(a[0], a[1])];
|
|
1351
1344
|
});
|
|
1352
1345
|
}
|
|
1353
1346
|
}
|
|
1354
|
-
function
|
|
1355
|
-
return e ? Number(e) :
|
|
1347
|
+
function At(n, e) {
|
|
1348
|
+
return e ? Number(e) : Mt(n) ? 0 : 1;
|
|
1356
1349
|
}
|
|
1357
|
-
function
|
|
1358
|
-
return
|
|
1350
|
+
function Mt(n) {
|
|
1351
|
+
return wt.includes(n.toLowerCase());
|
|
1359
1352
|
}
|
|
1360
1353
|
const Xe = {}, ie = (n) => {
|
|
1361
1354
|
console.error(n);
|
|
1362
1355
|
}, je = (n, ...e) => {
|
|
1363
1356
|
console.log(`WARN: ${n}`, ...e);
|
|
1364
|
-
},
|
|
1357
|
+
}, oe = (n, e) => {
|
|
1365
1358
|
Xe[`${n}/${e}`] || (console.log(`Deprecated as of ${n}. ${e}`), Xe[`${n}/${e}`] = !0);
|
|
1366
1359
|
}, Me = new Error();
|
|
1367
|
-
function
|
|
1360
|
+
function dn(n, e, { key: s }) {
|
|
1368
1361
|
let u = 0;
|
|
1369
|
-
const g = n[
|
|
1362
|
+
const g = n[s], t = {}, r = {};
|
|
1370
1363
|
for (let i = 1; i <= e.length; i++)
|
|
1371
|
-
r[i + u] = g[i], t[i + u] = !0, u +=
|
|
1372
|
-
n[
|
|
1364
|
+
r[i + u] = g[i], t[i + u] = !0, u += ln(e[i - 1]);
|
|
1365
|
+
n[s] = r, n[s]._emit = t, n[s]._multi = !0;
|
|
1373
1366
|
}
|
|
1374
|
-
function
|
|
1367
|
+
function Tt(n) {
|
|
1375
1368
|
if (Array.isArray(n.begin)) {
|
|
1376
1369
|
if (n.skip || n.excludeBegin || n.returnBegin)
|
|
1377
1370
|
throw ie("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Me;
|
|
1378
1371
|
if (typeof n.beginScope != "object" || n.beginScope === null)
|
|
1379
1372
|
throw ie("beginScope must be object"), Me;
|
|
1380
|
-
|
|
1373
|
+
dn(n, n.begin, { key: "beginScope" }), n.begin = Ue(n.begin, { joinWith: "" });
|
|
1381
1374
|
}
|
|
1382
1375
|
}
|
|
1383
|
-
function
|
|
1376
|
+
function St(n) {
|
|
1384
1377
|
if (Array.isArray(n.end)) {
|
|
1385
1378
|
if (n.skip || n.excludeEnd || n.returnEnd)
|
|
1386
1379
|
throw ie("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Me;
|
|
1387
1380
|
if (typeof n.endScope != "object" || n.endScope === null)
|
|
1388
1381
|
throw ie("endScope must be object"), Me;
|
|
1389
|
-
|
|
1382
|
+
dn(n, n.end, { key: "endScope" }), n.end = Ue(n.end, { joinWith: "" });
|
|
1390
1383
|
}
|
|
1391
1384
|
}
|
|
1392
|
-
function
|
|
1385
|
+
function Dt(n) {
|
|
1393
1386
|
n.scope && typeof n.scope == "object" && n.scope !== null && (n.beginScope = n.scope, delete n.scope);
|
|
1394
1387
|
}
|
|
1395
|
-
function
|
|
1396
|
-
|
|
1388
|
+
function Rt(n) {
|
|
1389
|
+
Dt(n), typeof n.beginScope == "string" && (n.beginScope = { _wrap: n.beginScope }), typeof n.endScope == "string" && (n.endScope = { _wrap: n.endScope }), Tt(n), St(n);
|
|
1397
1390
|
}
|
|
1398
|
-
function
|
|
1391
|
+
function Ct(n) {
|
|
1399
1392
|
function e(r, i) {
|
|
1400
1393
|
return new RegExp(
|
|
1401
|
-
|
|
1394
|
+
he(r),
|
|
1402
1395
|
"m" + (n.case_insensitive ? "i" : "") + (n.unicodeRegex ? "u" : "") + (i ? "g" : "")
|
|
1403
1396
|
);
|
|
1404
1397
|
}
|
|
1405
|
-
class
|
|
1398
|
+
class s {
|
|
1406
1399
|
constructor() {
|
|
1407
1400
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
1408
1401
|
}
|
|
1409
1402
|
// @ts-ignore
|
|
1410
|
-
addRule(i,
|
|
1411
|
-
|
|
1403
|
+
addRule(i, a) {
|
|
1404
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt += ln(i) + 1;
|
|
1412
1405
|
}
|
|
1413
1406
|
compile() {
|
|
1414
1407
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1415
|
-
const i = this.regexes.map((
|
|
1416
|
-
this.matcherRe = e(
|
|
1408
|
+
const i = this.regexes.map((a) => a[1]);
|
|
1409
|
+
this.matcherRe = e(Ue(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1417
1410
|
}
|
|
1418
1411
|
/** @param {string} s */
|
|
1419
1412
|
exec(i) {
|
|
1420
1413
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
1421
|
-
const
|
|
1422
|
-
if (!
|
|
1414
|
+
const a = this.matcherRe.exec(i);
|
|
1415
|
+
if (!a)
|
|
1423
1416
|
return null;
|
|
1424
|
-
const
|
|
1425
|
-
return
|
|
1417
|
+
const o = a.findIndex((c, f) => f > 0 && c !== void 0), l = this.matchIndexes[o];
|
|
1418
|
+
return a.splice(0, o), Object.assign(a, l);
|
|
1426
1419
|
}
|
|
1427
1420
|
}
|
|
1428
1421
|
class u {
|
|
@@ -1433,8 +1426,8 @@ function St(n) {
|
|
|
1433
1426
|
getMatcher(i) {
|
|
1434
1427
|
if (this.multiRegexes[i])
|
|
1435
1428
|
return this.multiRegexes[i];
|
|
1436
|
-
const
|
|
1437
|
-
return this.rules.slice(i).forEach(([
|
|
1429
|
+
const a = new s();
|
|
1430
|
+
return this.rules.slice(i).forEach(([o, l]) => a.addRule(o, l)), a.compile(), this.multiRegexes[i] = a, a;
|
|
1438
1431
|
}
|
|
1439
1432
|
resumingScanAtSamePosition() {
|
|
1440
1433
|
return this.regexIndex !== 0;
|
|
@@ -1443,60 +1436,60 @@ function St(n) {
|
|
|
1443
1436
|
this.regexIndex = 0;
|
|
1444
1437
|
}
|
|
1445
1438
|
// @ts-ignore
|
|
1446
|
-
addRule(i,
|
|
1447
|
-
this.rules.push([i,
|
|
1439
|
+
addRule(i, a) {
|
|
1440
|
+
this.rules.push([i, a]), a.type === "begin" && this.count++;
|
|
1448
1441
|
}
|
|
1449
1442
|
/** @param {string} s */
|
|
1450
1443
|
exec(i) {
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
let
|
|
1454
|
-
if (this.resumingScanAtSamePosition() && !(
|
|
1444
|
+
const a = this.getMatcher(this.regexIndex);
|
|
1445
|
+
a.lastIndex = this.lastIndex;
|
|
1446
|
+
let o = a.exec(i);
|
|
1447
|
+
if (this.resumingScanAtSamePosition() && !(o && o.index === this.lastIndex)) {
|
|
1455
1448
|
const l = this.getMatcher(0);
|
|
1456
|
-
l.lastIndex = this.lastIndex + 1,
|
|
1449
|
+
l.lastIndex = this.lastIndex + 1, o = l.exec(i);
|
|
1457
1450
|
}
|
|
1458
|
-
return
|
|
1451
|
+
return o && (this.regexIndex += o.position + 1, this.regexIndex === this.count && this.considerAll()), o;
|
|
1459
1452
|
}
|
|
1460
1453
|
}
|
|
1461
1454
|
function g(r) {
|
|
1462
1455
|
const i = new u();
|
|
1463
|
-
return r.contains.forEach((
|
|
1456
|
+
return r.contains.forEach((a) => i.addRule(a.begin, { rule: a, type: "begin" })), r.terminatorEnd && i.addRule(r.terminatorEnd, { type: "end" }), r.illegal && i.addRule(r.illegal, { type: "illegal" }), i;
|
|
1464
1457
|
}
|
|
1465
1458
|
function t(r, i) {
|
|
1466
|
-
const
|
|
1459
|
+
const a = (
|
|
1467
1460
|
/** @type CompiledMode */
|
|
1468
1461
|
r
|
|
1469
1462
|
);
|
|
1470
1463
|
if (r.isCompiled)
|
|
1471
|
-
return
|
|
1464
|
+
return a;
|
|
1472
1465
|
[
|
|
1473
|
-
|
|
1466
|
+
pt,
|
|
1474
1467
|
// do this early so compiler extensions generally don't have to worry about
|
|
1475
1468
|
// the distinction between match/begin
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1469
|
+
Et,
|
|
1470
|
+
Rt,
|
|
1471
|
+
yt
|
|
1479
1472
|
].forEach((l) => l(r, i)), n.compilerExtensions.forEach((l) => l(r, i)), r.__beforeBegin = null, [
|
|
1480
|
-
|
|
1473
|
+
bt,
|
|
1481
1474
|
// do this later so compiler extensions that come earlier have access to the
|
|
1482
1475
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1483
|
-
|
|
1476
|
+
vt,
|
|
1484
1477
|
// default to 1 relevance if not specified
|
|
1485
|
-
|
|
1478
|
+
mt
|
|
1486
1479
|
].forEach((l) => l(r, i)), r.isCompiled = !0;
|
|
1487
|
-
let
|
|
1488
|
-
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords),
|
|
1480
|
+
let o = null;
|
|
1481
|
+
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords = hn(r.keywords, n.case_insensitive)), a.keywordPatternRe = e(o, !0), i && (r.begin || (r.begin = /\B|\b/), a.beginRe = e(a.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (a.endRe = e(a.end)), a.terminatorEnd = he(a.end) || "", r.endsWithParent && i.terminatorEnd && (a.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (a.illegalRe = e(
|
|
1489
1482
|
/** @type {RegExp | string} */
|
|
1490
1483
|
r.illegal
|
|
1491
1484
|
)), r.contains || (r.contains = []), r.contains = [].concat(...r.contains.map(function(l) {
|
|
1492
|
-
return
|
|
1485
|
+
return Lt(l === "self" ? r : l);
|
|
1493
1486
|
})), r.contains.forEach(function(l) {
|
|
1494
1487
|
t(
|
|
1495
1488
|
/** @type Mode */
|
|
1496
1489
|
l,
|
|
1497
|
-
|
|
1490
|
+
a
|
|
1498
1491
|
);
|
|
1499
|
-
}), r.starts && t(r.starts, i),
|
|
1492
|
+
}), r.starts && t(r.starts, i), a.matcher = g(a), a;
|
|
1500
1493
|
}
|
|
1501
1494
|
if (n.compilerExtensions || (n.compilerExtensions = []), n.contains && n.contains.includes("self"))
|
|
1502
1495
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -1505,22 +1498,22 @@ function St(n) {
|
|
|
1505
1498
|
n
|
|
1506
1499
|
);
|
|
1507
1500
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return n ? n.endsWithParent ||
|
|
1501
|
+
function _n(n) {
|
|
1502
|
+
return n ? n.endsWithParent || _n(n.starts) : !1;
|
|
1510
1503
|
}
|
|
1511
|
-
function
|
|
1504
|
+
function Lt(n) {
|
|
1512
1505
|
return n.variants && !n.cachedVariants && (n.cachedVariants = n.variants.map(function(e) {
|
|
1513
1506
|
return te(n, { variants: null }, e);
|
|
1514
|
-
})), n.cachedVariants ? n.cachedVariants :
|
|
1507
|
+
})), n.cachedVariants ? n.cachedVariants : _n(n) ? te(n, { starts: n.starts ? te(n.starts) : null }) : Object.isFrozen(n) ? te(n) : n;
|
|
1515
1508
|
}
|
|
1516
|
-
var
|
|
1517
|
-
class
|
|
1518
|
-
constructor(e,
|
|
1519
|
-
super(e), this.name = "HTMLInjectionError", this.html =
|
|
1509
|
+
var Ot = "11.9.0";
|
|
1510
|
+
class It extends Error {
|
|
1511
|
+
constructor(e, s) {
|
|
1512
|
+
super(e), this.name = "HTMLInjectionError", this.html = s;
|
|
1520
1513
|
}
|
|
1521
1514
|
}
|
|
1522
|
-
const Oe =
|
|
1523
|
-
const e = /* @__PURE__ */ Object.create(null),
|
|
1515
|
+
const Oe = an, Je = te, qe = Symbol("nomatch"), kt = 7, pn = function(n) {
|
|
1516
|
+
const e = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null), u = [];
|
|
1524
1517
|
let g = !0;
|
|
1525
1518
|
const t = "Could not find the language '{}', did you forget to load/include a language module?", r = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
1526
1519
|
let i = {
|
|
@@ -1533,204 +1526,212 @@ const Oe = sn, Je = te, qe = Symbol("nomatch"), Ct = 7, It = function(n) {
|
|
|
1533
1526
|
languages: null,
|
|
1534
1527
|
// beta configuration options, subject to change, welcome to discuss
|
|
1535
1528
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1536
|
-
__emitter:
|
|
1529
|
+
__emitter: Qn
|
|
1537
1530
|
};
|
|
1538
|
-
function
|
|
1531
|
+
function a(b) {
|
|
1539
1532
|
return i.noHighlightRe.test(b);
|
|
1540
1533
|
}
|
|
1541
|
-
function
|
|
1534
|
+
function o(b) {
|
|
1542
1535
|
let N = b.className + " ";
|
|
1543
1536
|
N += b.parentNode ? b.parentNode.className : "";
|
|
1544
|
-
const
|
|
1545
|
-
if (
|
|
1546
|
-
const k = R(
|
|
1547
|
-
return k || (je(t.replace("{}",
|
|
1537
|
+
const L = i.languageDetectRe.exec(N);
|
|
1538
|
+
if (L) {
|
|
1539
|
+
const k = R(L[1]);
|
|
1540
|
+
return k || (je(t.replace("{}", L[1])), je("Falling back to no-highlight mode for this block.", b)), k ? L[1] : "no-highlight";
|
|
1548
1541
|
}
|
|
1549
|
-
return N.split(/\s+/).find((k) =>
|
|
1542
|
+
return N.split(/\s+/).find((k) => a(k) || R(k));
|
|
1550
1543
|
}
|
|
1551
|
-
function l(b, N,
|
|
1544
|
+
function l(b, N, L) {
|
|
1552
1545
|
let k = "", x = "";
|
|
1553
|
-
typeof N == "object" ? (k = b,
|
|
1554
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), x = b, k = N),
|
|
1555
|
-
const
|
|
1546
|
+
typeof N == "object" ? (k = b, L = N.ignoreIllegals, x = N.language) : (oe("10.7.0", "highlight(lang, code, ...args) has been deprecated."), oe("10.7.0", `Please use highlight(code, options) instead.
|
|
1547
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), x = b, k = N), L === void 0 && (L = !0);
|
|
1548
|
+
const K = {
|
|
1556
1549
|
code: k,
|
|
1557
1550
|
language: x
|
|
1558
1551
|
};
|
|
1559
|
-
|
|
1560
|
-
const Y =
|
|
1561
|
-
return Y.code =
|
|
1552
|
+
ae("before:highlight", K);
|
|
1553
|
+
const Y = K.result ? K.result : c(K.language, K.code, L);
|
|
1554
|
+
return Y.code = K.code, ae("after:highlight", Y), Y;
|
|
1562
1555
|
}
|
|
1563
|
-
function c(b, N,
|
|
1556
|
+
function c(b, N, L, k) {
|
|
1564
1557
|
const x = /* @__PURE__ */ Object.create(null);
|
|
1565
|
-
function
|
|
1566
|
-
return
|
|
1558
|
+
function K(m, A) {
|
|
1559
|
+
return m.keywords[A];
|
|
1567
1560
|
}
|
|
1568
1561
|
function Y() {
|
|
1569
|
-
if (!
|
|
1570
|
-
z.addText(
|
|
1562
|
+
if (!C.keywords) {
|
|
1563
|
+
z.addText(U);
|
|
1571
1564
|
return;
|
|
1572
1565
|
}
|
|
1573
|
-
let
|
|
1574
|
-
|
|
1575
|
-
let A =
|
|
1566
|
+
let m = 0;
|
|
1567
|
+
C.keywordPatternRe.lastIndex = 0;
|
|
1568
|
+
let A = C.keywordPatternRe.exec(U), O = "";
|
|
1576
1569
|
for (; A; ) {
|
|
1577
|
-
|
|
1578
|
-
const B =
|
|
1579
|
-
if (
|
|
1580
|
-
const [
|
|
1581
|
-
if (z.addText(
|
|
1582
|
-
|
|
1570
|
+
O += U.substring(m, A.index);
|
|
1571
|
+
const B = j.case_insensitive ? A[0].toLowerCase() : A[0], G = K(C, B);
|
|
1572
|
+
if (G) {
|
|
1573
|
+
const [J, Dn] = G;
|
|
1574
|
+
if (z.addText(O), O = "", x[B] = (x[B] || 0) + 1, x[B] <= kt && (me += Dn), J.startsWith("_"))
|
|
1575
|
+
O += A[0];
|
|
1583
1576
|
else {
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1577
|
+
const Rn = j.classNameAliases[J] || J;
|
|
1578
|
+
X(A[0], Rn);
|
|
1586
1579
|
}
|
|
1587
1580
|
} else
|
|
1588
|
-
|
|
1589
|
-
|
|
1581
|
+
O += A[0];
|
|
1582
|
+
m = C.keywordPatternRe.lastIndex, A = C.keywordPatternRe.exec(U);
|
|
1590
1583
|
}
|
|
1591
|
-
|
|
1584
|
+
O += U.substring(m), z.addText(O);
|
|
1592
1585
|
}
|
|
1593
|
-
function
|
|
1594
|
-
if (
|
|
1586
|
+
function ve() {
|
|
1587
|
+
if (U === "")
|
|
1595
1588
|
return;
|
|
1596
|
-
let
|
|
1597
|
-
if (typeof
|
|
1598
|
-
if (!e[
|
|
1599
|
-
z.addText(
|
|
1589
|
+
let m = null;
|
|
1590
|
+
if (typeof C.subLanguage == "string") {
|
|
1591
|
+
if (!e[C.subLanguage]) {
|
|
1592
|
+
z.addText(U);
|
|
1600
1593
|
return;
|
|
1601
1594
|
}
|
|
1602
|
-
|
|
1603
|
-
|
|
1595
|
+
m = c(C.subLanguage, U, !0, Ke[C.subLanguage]), Ke[C.subLanguage] = /** @type {CompiledMode} */
|
|
1596
|
+
m._top;
|
|
1604
1597
|
} else
|
|
1605
|
-
|
|
1606
|
-
|
|
1598
|
+
m = h(U, C.subLanguage.length ? C.subLanguage : null);
|
|
1599
|
+
C.relevance > 0 && (me += m.relevance), z.__addSublanguage(m._emitter, m.language);
|
|
1607
1600
|
}
|
|
1608
1601
|
function Q() {
|
|
1609
|
-
|
|
1602
|
+
C.subLanguage != null ? ve() : Y(), U = "";
|
|
1603
|
+
}
|
|
1604
|
+
function X(m, A) {
|
|
1605
|
+
m !== "" && (z.startScope(A), z.addText(m), z.endScope());
|
|
1610
1606
|
}
|
|
1611
|
-
function
|
|
1612
|
-
let
|
|
1607
|
+
function He(m, A) {
|
|
1608
|
+
let O = 1;
|
|
1613
1609
|
const B = A.length - 1;
|
|
1614
|
-
for (;
|
|
1615
|
-
if (!
|
|
1616
|
-
|
|
1610
|
+
for (; O <= B; ) {
|
|
1611
|
+
if (!m._emit[O]) {
|
|
1612
|
+
O++;
|
|
1617
1613
|
continue;
|
|
1618
1614
|
}
|
|
1619
|
-
const
|
|
1620
|
-
|
|
1615
|
+
const G = j.classNameAliases[m[O]] || m[O], J = A[O];
|
|
1616
|
+
G ? X(J, G) : (U = J, Y(), U = ""), O++;
|
|
1621
1617
|
}
|
|
1622
1618
|
}
|
|
1623
|
-
function Fe(
|
|
1624
|
-
return
|
|
1619
|
+
function Fe(m, A) {
|
|
1620
|
+
return m.scope && typeof m.scope == "string" && z.openNode(j.classNameAliases[m.scope] || m.scope), m.beginScope && (m.beginScope._wrap ? (X(U, j.classNameAliases[m.beginScope._wrap] || m.beginScope._wrap), U = "") : m.beginScope._multi && (He(m.beginScope, A), U = "")), C = Object.create(m, { parent: { value: C } }), C;
|
|
1625
1621
|
}
|
|
1626
|
-
function ze(
|
|
1627
|
-
let B =
|
|
1622
|
+
function ze(m, A, O) {
|
|
1623
|
+
let B = Xn(m.endRe, O);
|
|
1628
1624
|
if (B) {
|
|
1629
|
-
if (
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1625
|
+
if (m["on:end"]) {
|
|
1626
|
+
const G = new Ve(m);
|
|
1627
|
+
m["on:end"](A, G), G.isMatchIgnored && (B = !1);
|
|
1632
1628
|
}
|
|
1633
1629
|
if (B) {
|
|
1634
|
-
for (;
|
|
1635
|
-
|
|
1636
|
-
return
|
|
1630
|
+
for (; m.endsParent && m.parent; )
|
|
1631
|
+
m = m.parent;
|
|
1632
|
+
return m;
|
|
1637
1633
|
}
|
|
1638
1634
|
}
|
|
1639
|
-
if (
|
|
1640
|
-
return ze(
|
|
1635
|
+
if (m.endsWithParent)
|
|
1636
|
+
return ze(m.parent, A, O);
|
|
1641
1637
|
}
|
|
1642
|
-
function
|
|
1643
|
-
return
|
|
1638
|
+
function Nn(m) {
|
|
1639
|
+
return C.matcher.regexIndex === 0 ? (U += m[0], 1) : (Ce = !0, 0);
|
|
1644
1640
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const A =
|
|
1647
|
-
for (const
|
|
1648
|
-
if (
|
|
1649
|
-
return
|
|
1650
|
-
return
|
|
1641
|
+
function An(m) {
|
|
1642
|
+
const A = m[0], O = m.rule, B = new Ve(O), G = [O.__beforeBegin, O["on:begin"]];
|
|
1643
|
+
for (const J of G)
|
|
1644
|
+
if (J && (J(m, B), B.isMatchIgnored))
|
|
1645
|
+
return Nn(A);
|
|
1646
|
+
return O.skip ? U += A : (O.excludeBegin && (U += A), Q(), !O.returnBegin && !O.excludeBegin && (U = A)), Fe(O, m), O.returnBegin ? 0 : A.length;
|
|
1651
1647
|
}
|
|
1652
|
-
function
|
|
1653
|
-
const A =
|
|
1648
|
+
function Mn(m) {
|
|
1649
|
+
const A = m[0], O = N.substring(m.index), B = ze(C, m, O);
|
|
1654
1650
|
if (!B)
|
|
1655
1651
|
return qe;
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1652
|
+
const G = C;
|
|
1653
|
+
C.endScope && C.endScope._wrap ? (Q(), X(A, C.endScope._wrap)) : C.endScope && C.endScope._multi ? (Q(), He(C.endScope, m)) : G.skip ? U += A : (G.returnEnd || G.excludeEnd || (U += A), Q(), G.excludeEnd && (U = A));
|
|
1658
1654
|
do
|
|
1659
|
-
|
|
1660
|
-
while (
|
|
1661
|
-
return B.starts && Fe(B.starts,
|
|
1655
|
+
C.scope && z.closeNode(), !C.skip && !C.subLanguage && (me += C.relevance), C = C.parent;
|
|
1656
|
+
while (C !== B.parent);
|
|
1657
|
+
return B.starts && Fe(B.starts, m), G.returnEnd ? 0 : A.length;
|
|
1662
1658
|
}
|
|
1663
|
-
function
|
|
1664
|
-
const
|
|
1665
|
-
for (let A =
|
|
1666
|
-
A.scope &&
|
|
1667
|
-
|
|
1659
|
+
function Tn() {
|
|
1660
|
+
const m = [];
|
|
1661
|
+
for (let A = C; A !== j; A = A.parent)
|
|
1662
|
+
A.scope && m.unshift(A.scope);
|
|
1663
|
+
m.forEach((A) => z.openNode(A));
|
|
1668
1664
|
}
|
|
1669
|
-
let
|
|
1670
|
-
function Ge(
|
|
1671
|
-
const
|
|
1672
|
-
if (
|
|
1665
|
+
let Ee = {};
|
|
1666
|
+
function Ge(m, A) {
|
|
1667
|
+
const O = A && A[0];
|
|
1668
|
+
if (U += m, O == null)
|
|
1673
1669
|
return Q(), 0;
|
|
1674
|
-
if (
|
|
1675
|
-
if (
|
|
1670
|
+
if (Ee.type === "begin" && A.type === "end" && Ee.index === A.index && O === "") {
|
|
1671
|
+
if (U += N.slice(A.index, A.index + 1), !g) {
|
|
1676
1672
|
const B = new Error(`0 width match regex (${b})`);
|
|
1677
|
-
throw B.languageName = b, B.badRule =
|
|
1673
|
+
throw B.languageName = b, B.badRule = Ee.rule, B;
|
|
1678
1674
|
}
|
|
1679
1675
|
return 1;
|
|
1680
1676
|
}
|
|
1681
|
-
if (
|
|
1682
|
-
return
|
|
1683
|
-
if (A.type === "illegal" && !
|
|
1684
|
-
const B = new Error('Illegal lexeme "' +
|
|
1685
|
-
throw B.mode =
|
|
1677
|
+
if (Ee = A, A.type === "begin")
|
|
1678
|
+
return An(A);
|
|
1679
|
+
if (A.type === "illegal" && !L) {
|
|
1680
|
+
const B = new Error('Illegal lexeme "' + O + '" for mode "' + (C.scope || "<unnamed>") + '"');
|
|
1681
|
+
throw B.mode = C, B;
|
|
1686
1682
|
} else if (A.type === "end") {
|
|
1687
|
-
const B =
|
|
1683
|
+
const B = Mn(A);
|
|
1688
1684
|
if (B !== qe)
|
|
1689
1685
|
return B;
|
|
1690
1686
|
}
|
|
1691
|
-
if (A.type === "illegal" &&
|
|
1687
|
+
if (A.type === "illegal" && O === "")
|
|
1692
1688
|
return 1;
|
|
1693
|
-
if (
|
|
1689
|
+
if (Re > 1e5 && Re > A.index * 3)
|
|
1694
1690
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1695
|
-
return
|
|
1691
|
+
return U += O, O.length;
|
|
1696
1692
|
}
|
|
1697
|
-
const
|
|
1698
|
-
if (!
|
|
1693
|
+
const j = R(b);
|
|
1694
|
+
if (!j)
|
|
1699
1695
|
throw ie(t.replace("{}", b)), new Error('Unknown language: "' + b + '"');
|
|
1700
|
-
const
|
|
1701
|
-
let De = "",
|
|
1696
|
+
const Sn = Ct(j);
|
|
1697
|
+
let De = "", C = k || Sn;
|
|
1702
1698
|
const Ke = {}, z = new i.__emitter(i);
|
|
1703
|
-
|
|
1704
|
-
let
|
|
1699
|
+
Tn();
|
|
1700
|
+
let U = "", me = 0, re = 0, Re = 0, Ce = !1;
|
|
1705
1701
|
try {
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1702
|
+
if (j.__emitTokens)
|
|
1703
|
+
j.__emitTokens(N, z);
|
|
1704
|
+
else {
|
|
1705
|
+
for (C.matcher.considerAll(); ; ) {
|
|
1706
|
+
Re++, Ce ? Ce = !1 : C.matcher.considerAll(), C.matcher.lastIndex = re;
|
|
1707
|
+
const m = C.matcher.exec(N);
|
|
1708
|
+
if (!m)
|
|
1709
|
+
break;
|
|
1710
|
+
const A = N.substring(re, m.index), O = Ge(A, m);
|
|
1711
|
+
re = m.index + O;
|
|
1712
|
+
}
|
|
1713
|
+
Ge(N.substring(re));
|
|
1713
1714
|
}
|
|
1714
|
-
return
|
|
1715
|
+
return z.finalize(), De = z.toHTML(), {
|
|
1715
1716
|
language: b,
|
|
1716
1717
|
value: De,
|
|
1717
|
-
relevance:
|
|
1718
|
+
relevance: me,
|
|
1718
1719
|
illegal: !1,
|
|
1719
1720
|
_emitter: z,
|
|
1720
|
-
_top:
|
|
1721
|
+
_top: C
|
|
1721
1722
|
};
|
|
1722
|
-
} catch (
|
|
1723
|
-
if (
|
|
1723
|
+
} catch (m) {
|
|
1724
|
+
if (m.message && m.message.includes("Illegal"))
|
|
1724
1725
|
return {
|
|
1725
1726
|
language: b,
|
|
1726
1727
|
value: Oe(N),
|
|
1727
1728
|
illegal: !0,
|
|
1728
1729
|
relevance: 0,
|
|
1729
1730
|
_illegalBy: {
|
|
1730
|
-
message:
|
|
1731
|
+
message: m.message,
|
|
1731
1732
|
index: re,
|
|
1732
1733
|
context: N.slice(re - 100, re + 100),
|
|
1733
|
-
mode:
|
|
1734
|
+
mode: m.mode,
|
|
1734
1735
|
resultSoFar: De
|
|
1735
1736
|
},
|
|
1736
1737
|
_emitter: z
|
|
@@ -1741,11 +1742,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), x = b, k = N), O ===
|
|
|
1741
1742
|
value: Oe(N),
|
|
1742
1743
|
illegal: !1,
|
|
1743
1744
|
relevance: 0,
|
|
1744
|
-
errorRaised:
|
|
1745
|
+
errorRaised: m,
|
|
1745
1746
|
_emitter: z,
|
|
1746
|
-
_top:
|
|
1747
|
+
_top: C
|
|
1747
1748
|
};
|
|
1748
|
-
throw
|
|
1749
|
+
throw m;
|
|
1749
1750
|
}
|
|
1750
1751
|
}
|
|
1751
1752
|
function f(b) {
|
|
@@ -1760,43 +1761,47 @@ https://github.com/highlightjs/highlight.js/issues/2277`), x = b, k = N), O ===
|
|
|
1760
1761
|
}
|
|
1761
1762
|
function h(b, N) {
|
|
1762
1763
|
N = N || i.languages || Object.keys(e);
|
|
1763
|
-
const
|
|
1764
|
+
const L = f(b), k = N.filter(R).filter(P).map(
|
|
1764
1765
|
(Q) => c(Q, b, !1)
|
|
1765
1766
|
);
|
|
1766
|
-
k.unshift(
|
|
1767
|
-
const x = k.sort((Q,
|
|
1768
|
-
if (Q.relevance !==
|
|
1769
|
-
return
|
|
1770
|
-
if (Q.language &&
|
|
1771
|
-
if (R(Q.language).supersetOf ===
|
|
1767
|
+
k.unshift(L);
|
|
1768
|
+
const x = k.sort((Q, X) => {
|
|
1769
|
+
if (Q.relevance !== X.relevance)
|
|
1770
|
+
return X.relevance - Q.relevance;
|
|
1771
|
+
if (Q.language && X.language) {
|
|
1772
|
+
if (R(Q.language).supersetOf === X.language)
|
|
1772
1773
|
return 1;
|
|
1773
|
-
if (R(
|
|
1774
|
+
if (R(X.language).supersetOf === Q.language)
|
|
1774
1775
|
return -1;
|
|
1775
1776
|
}
|
|
1776
1777
|
return 0;
|
|
1777
|
-
}), [
|
|
1778
|
-
return
|
|
1778
|
+
}), [K, Y] = x, ve = K;
|
|
1779
|
+
return ve.secondBest = Y, ve;
|
|
1779
1780
|
}
|
|
1780
|
-
function d(b, N,
|
|
1781
|
-
const k = N &&
|
|
1781
|
+
function d(b, N, L) {
|
|
1782
|
+
const k = N && s[N] || L;
|
|
1782
1783
|
b.classList.add("hljs"), b.classList.add(`language-${k}`);
|
|
1783
1784
|
}
|
|
1784
|
-
function
|
|
1785
|
+
function _(b) {
|
|
1785
1786
|
let N = null;
|
|
1786
|
-
const
|
|
1787
|
-
if (
|
|
1787
|
+
const L = o(b);
|
|
1788
|
+
if (a(L))
|
|
1788
1789
|
return;
|
|
1789
|
-
if (
|
|
1790
|
+
if (ae(
|
|
1790
1791
|
"before:highlightElement",
|
|
1791
|
-
{ el: b, language:
|
|
1792
|
-
), b.
|
|
1793
|
-
|
|
1792
|
+
{ el: b, language: L }
|
|
1793
|
+
), b.dataset.highlighted) {
|
|
1794
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", b);
|
|
1795
|
+
return;
|
|
1796
|
+
}
|
|
1797
|
+
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))
|
|
1798
|
+
throw new It(
|
|
1794
1799
|
"One of your code blocks includes unescaped HTML.",
|
|
1795
1800
|
b.innerHTML
|
|
1796
1801
|
);
|
|
1797
1802
|
N = b;
|
|
1798
|
-
const k = N.textContent, x =
|
|
1799
|
-
b.innerHTML = x.value, d(b,
|
|
1803
|
+
const k = N.textContent, x = L ? l(k, { language: L, ignoreIllegals: !0 }) : h(k);
|
|
1804
|
+
b.innerHTML = x.value, b.dataset.highlighted = "yes", d(b, L, x.language), b.result = {
|
|
1800
1805
|
language: x.language,
|
|
1801
1806
|
// TODO: remove with version 11.0
|
|
1802
1807
|
re: x.relevance,
|
|
@@ -1804,59 +1809,59 @@ https://github.com/highlightjs/highlight.js/issues/2277`), x = b, k = N), O ===
|
|
|
1804
1809
|
}, x.secondBest && (b.secondBest = {
|
|
1805
1810
|
language: x.secondBest.language,
|
|
1806
1811
|
relevance: x.secondBest.relevance
|
|
1807
|
-
}),
|
|
1812
|
+
}), ae("after:highlightElement", { el: b, result: x, text: k });
|
|
1808
1813
|
}
|
|
1809
|
-
function
|
|
1814
|
+
function p(b) {
|
|
1810
1815
|
i = Je(i, b);
|
|
1811
1816
|
}
|
|
1812
1817
|
const v = () => {
|
|
1813
|
-
|
|
1818
|
+
y(), oe("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1814
1819
|
};
|
|
1815
1820
|
function E() {
|
|
1816
|
-
|
|
1821
|
+
y(), oe("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1817
1822
|
}
|
|
1818
1823
|
let w = !1;
|
|
1819
|
-
function
|
|
1824
|
+
function y() {
|
|
1820
1825
|
if (document.readyState === "loading") {
|
|
1821
1826
|
w = !0;
|
|
1822
1827
|
return;
|
|
1823
1828
|
}
|
|
1824
|
-
document.querySelectorAll(i.cssSelector).forEach(
|
|
1829
|
+
document.querySelectorAll(i.cssSelector).forEach(_);
|
|
1825
1830
|
}
|
|
1826
|
-
function
|
|
1827
|
-
w &&
|
|
1831
|
+
function D() {
|
|
1832
|
+
w && y();
|
|
1828
1833
|
}
|
|
1829
|
-
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
|
1830
|
-
function
|
|
1831
|
-
let
|
|
1834
|
+
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, !1);
|
|
1835
|
+
function T(b, N) {
|
|
1836
|
+
let L = null;
|
|
1832
1837
|
try {
|
|
1833
|
-
|
|
1838
|
+
L = N(n);
|
|
1834
1839
|
} catch (k) {
|
|
1835
1840
|
if (ie("Language definition for '{}' could not be registered.".replace("{}", b)), g)
|
|
1836
1841
|
ie(k);
|
|
1837
1842
|
else
|
|
1838
1843
|
throw k;
|
|
1839
|
-
|
|
1844
|
+
L = r;
|
|
1840
1845
|
}
|
|
1841
|
-
|
|
1846
|
+
L.name || (L.name = b), e[b] = L, L.rawDefinition = N.bind(null, n), L.aliases && H(L.aliases, { languageName: b });
|
|
1842
1847
|
}
|
|
1843
1848
|
function M(b) {
|
|
1844
1849
|
delete e[b];
|
|
1845
|
-
for (const N of Object.keys(
|
|
1846
|
-
|
|
1850
|
+
for (const N of Object.keys(s))
|
|
1851
|
+
s[N] === b && delete s[N];
|
|
1847
1852
|
}
|
|
1848
1853
|
function I() {
|
|
1849
1854
|
return Object.keys(e);
|
|
1850
1855
|
}
|
|
1851
1856
|
function R(b) {
|
|
1852
|
-
return b = (b || "").toLowerCase(), e[b] || e[
|
|
1857
|
+
return b = (b || "").toLowerCase(), e[b] || e[s[b]];
|
|
1853
1858
|
}
|
|
1854
1859
|
function H(b, { languageName: N }) {
|
|
1855
|
-
typeof b == "string" && (b = [b]), b.forEach((
|
|
1856
|
-
|
|
1860
|
+
typeof b == "string" && (b = [b]), b.forEach((L) => {
|
|
1861
|
+
s[L.toLowerCase()] = N;
|
|
1857
1862
|
});
|
|
1858
1863
|
}
|
|
1859
|
-
function
|
|
1864
|
+
function P(b) {
|
|
1860
1865
|
const N = R(b);
|
|
1861
1866
|
return N && !N.disableAutodetect;
|
|
1862
1867
|
}
|
|
@@ -1874,54 +1879,60 @@ https://github.com/highlightjs/highlight.js/issues/2277`), x = b, k = N), O ===
|
|
|
1874
1879
|
function F(b) {
|
|
1875
1880
|
$(b), u.push(b);
|
|
1876
1881
|
}
|
|
1877
|
-
function
|
|
1878
|
-
const
|
|
1882
|
+
function W(b) {
|
|
1883
|
+
const N = u.indexOf(b);
|
|
1884
|
+
N !== -1 && u.splice(N, 1);
|
|
1885
|
+
}
|
|
1886
|
+
function ae(b, N) {
|
|
1887
|
+
const L = b;
|
|
1879
1888
|
u.forEach(function(k) {
|
|
1880
|
-
k[
|
|
1889
|
+
k[L] && k[L](N);
|
|
1881
1890
|
});
|
|
1882
1891
|
}
|
|
1883
|
-
function
|
|
1884
|
-
return
|
|
1892
|
+
function be(b) {
|
|
1893
|
+
return oe("10.7.0", "highlightBlock will be removed entirely in v12.0"), oe("10.7.0", "Please use highlightElement now."), _(b);
|
|
1885
1894
|
}
|
|
1886
1895
|
Object.assign(n, {
|
|
1887
1896
|
highlight: l,
|
|
1888
1897
|
highlightAuto: h,
|
|
1889
|
-
highlightAll:
|
|
1890
|
-
highlightElement:
|
|
1898
|
+
highlightAll: y,
|
|
1899
|
+
highlightElement: _,
|
|
1891
1900
|
// TODO: Remove with v12 API
|
|
1892
|
-
highlightBlock:
|
|
1893
|
-
configure:
|
|
1901
|
+
highlightBlock: be,
|
|
1902
|
+
configure: p,
|
|
1894
1903
|
initHighlighting: v,
|
|
1895
1904
|
initHighlightingOnLoad: E,
|
|
1896
|
-
registerLanguage:
|
|
1905
|
+
registerLanguage: T,
|
|
1897
1906
|
unregisterLanguage: M,
|
|
1898
1907
|
listLanguages: I,
|
|
1899
1908
|
getLanguage: R,
|
|
1900
1909
|
registerAliases: H,
|
|
1901
|
-
autoDetection:
|
|
1910
|
+
autoDetection: P,
|
|
1902
1911
|
inherit: Je,
|
|
1903
|
-
addPlugin: F
|
|
1912
|
+
addPlugin: F,
|
|
1913
|
+
removePlugin: W
|
|
1904
1914
|
}), n.debugMode = function() {
|
|
1905
1915
|
g = !1;
|
|
1906
1916
|
}, n.safeMode = function() {
|
|
1907
1917
|
g = !0;
|
|
1908
|
-
}, n.versionString =
|
|
1918
|
+
}, n.versionString = Ot, n.regex = {
|
|
1909
1919
|
concat: se,
|
|
1910
|
-
lookahead:
|
|
1920
|
+
lookahead: on,
|
|
1911
1921
|
either: Pe,
|
|
1912
|
-
optional:
|
|
1913
|
-
anyNumberOfTimes:
|
|
1922
|
+
optional: Zn,
|
|
1923
|
+
anyNumberOfTimes: Vn
|
|
1914
1924
|
};
|
|
1915
|
-
for (const b in
|
|
1916
|
-
typeof
|
|
1917
|
-
return Object.assign(n,
|
|
1918
|
-
};
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
+
for (const b in ye)
|
|
1926
|
+
typeof ye[b] == "object" && sn(ye[b]);
|
|
1927
|
+
return Object.assign(n, ye), n;
|
|
1928
|
+
}, ce = pn({});
|
|
1929
|
+
ce.newInstance = () => pn({});
|
|
1930
|
+
var Bt = ce;
|
|
1931
|
+
ce.HighlightJS = ce;
|
|
1932
|
+
ce.default = ce;
|
|
1933
|
+
const Z = /* @__PURE__ */ zn(Bt);
|
|
1934
|
+
function $t(n) {
|
|
1935
|
+
const e = n.regex, s = e.concat(/[\p{L}_]/u, e.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u, g = {
|
|
1925
1936
|
className: "symbol",
|
|
1926
1937
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1927
1938
|
}, t = {
|
|
@@ -1936,7 +1947,7 @@ function Bt(n) {
|
|
|
1936
1947
|
}, r = n.inherit(t, {
|
|
1937
1948
|
begin: /\(/,
|
|
1938
1949
|
end: /\)/
|
|
1939
|
-
}), i = n.inherit(n.APOS_STRING_MODE, { className: "string" }),
|
|
1950
|
+
}), i = n.inherit(n.APOS_STRING_MODE, { className: "string" }), a = n.inherit(n.QUOTE_STRING_MODE, { className: "string" }), o = {
|
|
1940
1951
|
endsWithParent: !0,
|
|
1941
1952
|
illegal: /</,
|
|
1942
1953
|
relevance: 0,
|
|
@@ -1995,7 +2006,7 @@ function Bt(n) {
|
|
|
1995
2006
|
relevance: 10,
|
|
1996
2007
|
contains: [
|
|
1997
2008
|
t,
|
|
1998
|
-
|
|
2009
|
+
a,
|
|
1999
2010
|
i,
|
|
2000
2011
|
r,
|
|
2001
2012
|
{
|
|
@@ -2009,7 +2020,7 @@ function Bt(n) {
|
|
|
2009
2020
|
contains: [
|
|
2010
2021
|
t,
|
|
2011
2022
|
r,
|
|
2012
|
-
|
|
2023
|
+
a,
|
|
2013
2024
|
i
|
|
2014
2025
|
]
|
|
2015
2026
|
}
|
|
@@ -2037,7 +2048,7 @@ function Bt(n) {
|
|
|
2037
2048
|
begin: /<\?xml/,
|
|
2038
2049
|
relevance: 10,
|
|
2039
2050
|
contains: [
|
|
2040
|
-
|
|
2051
|
+
a
|
|
2041
2052
|
]
|
|
2042
2053
|
},
|
|
2043
2054
|
{
|
|
@@ -2055,7 +2066,7 @@ function Bt(n) {
|
|
|
2055
2066
|
begin: /<style(?=\s|>)/,
|
|
2056
2067
|
end: />/,
|
|
2057
2068
|
keywords: { name: "style" },
|
|
2058
|
-
contains: [
|
|
2069
|
+
contains: [o],
|
|
2059
2070
|
starts: {
|
|
2060
2071
|
end: /<\/style>/,
|
|
2061
2072
|
returnEnd: !0,
|
|
@@ -2071,7 +2082,7 @@ function Bt(n) {
|
|
|
2071
2082
|
begin: /<script(?=\s|>)/,
|
|
2072
2083
|
end: />/,
|
|
2073
2084
|
keywords: { name: "script" },
|
|
2074
|
-
contains: [
|
|
2085
|
+
contains: [o],
|
|
2075
2086
|
starts: {
|
|
2076
2087
|
end: /<\/script>/,
|
|
2077
2088
|
returnEnd: !0,
|
|
@@ -2093,7 +2104,7 @@ function Bt(n) {
|
|
|
2093
2104
|
begin: e.concat(
|
|
2094
2105
|
/</,
|
|
2095
2106
|
e.lookahead(e.concat(
|
|
2096
|
-
|
|
2107
|
+
s,
|
|
2097
2108
|
// <tag/>
|
|
2098
2109
|
// <tag>
|
|
2099
2110
|
// <tag ...
|
|
@@ -2104,9 +2115,9 @@ function Bt(n) {
|
|
|
2104
2115
|
contains: [
|
|
2105
2116
|
{
|
|
2106
2117
|
className: "name",
|
|
2107
|
-
begin:
|
|
2118
|
+
begin: s,
|
|
2108
2119
|
relevance: 0,
|
|
2109
|
-
starts:
|
|
2120
|
+
starts: o
|
|
2110
2121
|
}
|
|
2111
2122
|
]
|
|
2112
2123
|
},
|
|
@@ -2116,14 +2127,14 @@ function Bt(n) {
|
|
|
2116
2127
|
begin: e.concat(
|
|
2117
2128
|
/<\//,
|
|
2118
2129
|
e.lookahead(e.concat(
|
|
2119
|
-
|
|
2130
|
+
s,
|
|
2120
2131
|
/>/
|
|
2121
2132
|
))
|
|
2122
2133
|
),
|
|
2123
2134
|
contains: [
|
|
2124
2135
|
{
|
|
2125
2136
|
className: "name",
|
|
2126
|
-
begin:
|
|
2137
|
+
begin: s,
|
|
2127
2138
|
relevance: 0
|
|
2128
2139
|
},
|
|
2129
2140
|
{
|
|
@@ -2136,7 +2147,7 @@ function Bt(n) {
|
|
|
2136
2147
|
]
|
|
2137
2148
|
};
|
|
2138
2149
|
}
|
|
2139
|
-
const en = "[A-Za-z$_][0-9A-Za-z$_]*",
|
|
2150
|
+
const en = "[A-Za-z$_][0-9A-Za-z$_]*", Pt = [
|
|
2140
2151
|
"as",
|
|
2141
2152
|
// for exports
|
|
2142
2153
|
"in",
|
|
@@ -2186,7 +2197,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", $t = [
|
|
|
2186
2197
|
"undefined",
|
|
2187
2198
|
"NaN",
|
|
2188
2199
|
"Infinity"
|
|
2189
|
-
],
|
|
2200
|
+
], bn = [
|
|
2190
2201
|
// Fundamental objects
|
|
2191
2202
|
"Object",
|
|
2192
2203
|
"Function",
|
|
@@ -2236,7 +2247,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", $t = [
|
|
|
2236
2247
|
"Intl",
|
|
2237
2248
|
// WebAssembly
|
|
2238
2249
|
"WebAssembly"
|
|
2239
|
-
],
|
|
2250
|
+
], vn = [
|
|
2240
2251
|
"Error",
|
|
2241
2252
|
"EvalError",
|
|
2242
2253
|
"InternalError",
|
|
@@ -2245,7 +2256,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", $t = [
|
|
|
2245
2256
|
"SyntaxError",
|
|
2246
2257
|
"TypeError",
|
|
2247
2258
|
"URIError"
|
|
2248
|
-
],
|
|
2259
|
+
], En = [
|
|
2249
2260
|
"setInterval",
|
|
2250
2261
|
"setTimeout",
|
|
2251
2262
|
"clearInterval",
|
|
@@ -2263,7 +2274,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", $t = [
|
|
|
2263
2274
|
"encodeURIComponent",
|
|
2264
2275
|
"escape",
|
|
2265
2276
|
"unescape"
|
|
2266
|
-
],
|
|
2277
|
+
], xt = [
|
|
2267
2278
|
"arguments",
|
|
2268
2279
|
"this",
|
|
2269
2280
|
"super",
|
|
@@ -2271,18 +2282,19 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", $t = [
|
|
|
2271
2282
|
"window",
|
|
2272
2283
|
"document",
|
|
2273
2284
|
"localStorage",
|
|
2285
|
+
"sessionStorage",
|
|
2274
2286
|
"module",
|
|
2275
2287
|
"global"
|
|
2276
2288
|
// Node.js
|
|
2277
|
-
],
|
|
2289
|
+
], Ht = [].concat(
|
|
2290
|
+
En,
|
|
2278
2291
|
bn,
|
|
2279
|
-
|
|
2280
|
-
_n
|
|
2292
|
+
vn
|
|
2281
2293
|
);
|
|
2282
|
-
function
|
|
2283
|
-
const e = n.regex,
|
|
2294
|
+
function Ft(n) {
|
|
2295
|
+
const e = n.regex, s = (N, { after: L }) => {
|
|
2284
2296
|
const k = "</" + N[0].slice(1);
|
|
2285
|
-
return N.input.indexOf(k,
|
|
2297
|
+
return N.input.indexOf(k, L) !== -1;
|
|
2286
2298
|
}, u = en, g = {
|
|
2287
2299
|
begin: "<>",
|
|
2288
2300
|
end: "</>"
|
|
@@ -2293,7 +2305,7 @@ function Ht(n) {
|
|
|
2293
2305
|
* @param {RegExpMatchArray} match
|
|
2294
2306
|
* @param {CallbackResponse} response
|
|
2295
2307
|
*/
|
|
2296
|
-
isTrulyOpeningTag: (N,
|
|
2308
|
+
isTrulyOpeningTag: (N, L) => {
|
|
2297
2309
|
const k = N[0].length + N.index, x = N.input[k];
|
|
2298
2310
|
if (
|
|
2299
2311
|
// HTML should not include another raw `<` inside a tag
|
|
@@ -2303,33 +2315,33 @@ function Ht(n) {
|
|
|
2303
2315
|
// `<T, A extends keyof T, V>`
|
|
2304
2316
|
x === ","
|
|
2305
2317
|
) {
|
|
2306
|
-
|
|
2318
|
+
L.ignoreMatch();
|
|
2307
2319
|
return;
|
|
2308
2320
|
}
|
|
2309
|
-
x === ">" && (
|
|
2310
|
-
let
|
|
2321
|
+
x === ">" && (s(N, { after: k }) || L.ignoreMatch());
|
|
2322
|
+
let K;
|
|
2311
2323
|
const Y = N.input.substring(k);
|
|
2312
|
-
if (
|
|
2313
|
-
|
|
2324
|
+
if (K = Y.match(/^\s*=/)) {
|
|
2325
|
+
L.ignoreMatch();
|
|
2314
2326
|
return;
|
|
2315
2327
|
}
|
|
2316
|
-
if ((
|
|
2317
|
-
|
|
2328
|
+
if ((K = Y.match(/^\s+extends\s+/)) && K.index === 0) {
|
|
2329
|
+
L.ignoreMatch();
|
|
2318
2330
|
return;
|
|
2319
2331
|
}
|
|
2320
2332
|
}
|
|
2321
2333
|
}, i = {
|
|
2322
2334
|
$pattern: en,
|
|
2323
|
-
keyword:
|
|
2335
|
+
keyword: Pt,
|
|
2324
2336
|
literal: Ut,
|
|
2325
|
-
built_in:
|
|
2326
|
-
"variable.language":
|
|
2327
|
-
},
|
|
2337
|
+
built_in: Ht,
|
|
2338
|
+
"variable.language": xt
|
|
2339
|
+
}, a = "[0-9](_?[0-9])*", o = `\\.(${a})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2328
2340
|
className: "number",
|
|
2329
2341
|
variants: [
|
|
2330
2342
|
// DecimalLiteral
|
|
2331
|
-
{ begin: `(\\b(${l})((${
|
|
2332
|
-
{ begin: `\\b(${l})\\b((${
|
|
2343
|
+
{ begin: `(\\b(${l})((${o})|\\.)?|(${o}))[eE][+-]?(${a})\\b` },
|
|
2344
|
+
{ begin: `\\b(${l})\\b((${o})\\b|\\.)?|(${o})\\b` },
|
|
2333
2345
|
// DecimalBigIntegerLiteral
|
|
2334
2346
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
2335
2347
|
// NonDecimalIntegerLiteral
|
|
@@ -2372,6 +2384,18 @@ function Ht(n) {
|
|
|
2372
2384
|
],
|
|
2373
2385
|
subLanguage: "css"
|
|
2374
2386
|
}
|
|
2387
|
+
}, _ = {
|
|
2388
|
+
begin: "gql`",
|
|
2389
|
+
end: "",
|
|
2390
|
+
starts: {
|
|
2391
|
+
end: "`",
|
|
2392
|
+
returnEnd: !1,
|
|
2393
|
+
contains: [
|
|
2394
|
+
n.BACKSLASH_ESCAPE,
|
|
2395
|
+
f
|
|
2396
|
+
],
|
|
2397
|
+
subLanguage: "graphql"
|
|
2398
|
+
}
|
|
2375
2399
|
}, p = {
|
|
2376
2400
|
className: "string",
|
|
2377
2401
|
begin: "`",
|
|
@@ -2380,7 +2404,7 @@ function Ht(n) {
|
|
|
2380
2404
|
n.BACKSLASH_ESCAPE,
|
|
2381
2405
|
f
|
|
2382
2406
|
]
|
|
2383
|
-
},
|
|
2407
|
+
}, E = {
|
|
2384
2408
|
className: "comment",
|
|
2385
2409
|
variants: [
|
|
2386
2410
|
n.COMMENT(
|
|
@@ -2425,11 +2449,12 @@ function Ht(n) {
|
|
|
2425
2449
|
n.C_BLOCK_COMMENT_MODE,
|
|
2426
2450
|
n.C_LINE_COMMENT_MODE
|
|
2427
2451
|
]
|
|
2428
|
-
},
|
|
2452
|
+
}, w = [
|
|
2429
2453
|
n.APOS_STRING_MODE,
|
|
2430
2454
|
n.QUOTE_STRING_MODE,
|
|
2431
2455
|
h,
|
|
2432
2456
|
d,
|
|
2457
|
+
_,
|
|
2433
2458
|
p,
|
|
2434
2459
|
// Skip numbers when they are part of a variable name
|
|
2435
2460
|
{ match: /\$\d+/ },
|
|
@@ -2438,7 +2463,7 @@ function Ht(n) {
|
|
|
2438
2463
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
2439
2464
|
// hljs.REGEXP_MODE
|
|
2440
2465
|
];
|
|
2441
|
-
f.contains =
|
|
2466
|
+
f.contains = w.concat({
|
|
2442
2467
|
// we need to pair up {} inside our subst to prevent
|
|
2443
2468
|
// it from ending too early by matching another }
|
|
2444
2469
|
begin: /\{/,
|
|
@@ -2446,15 +2471,15 @@ function Ht(n) {
|
|
|
2446
2471
|
keywords: i,
|
|
2447
2472
|
contains: [
|
|
2448
2473
|
"self"
|
|
2449
|
-
].concat(
|
|
2474
|
+
].concat(w)
|
|
2450
2475
|
});
|
|
2451
|
-
const
|
|
2476
|
+
const y = [].concat(E, f.contains), D = y.concat([
|
|
2452
2477
|
// eat recursive parens in sub expressions
|
|
2453
2478
|
{
|
|
2454
2479
|
begin: /\(/,
|
|
2455
2480
|
end: /\)/,
|
|
2456
2481
|
keywords: i,
|
|
2457
|
-
contains: ["self"].concat(
|
|
2482
|
+
contains: ["self"].concat(y)
|
|
2458
2483
|
}
|
|
2459
2484
|
]), T = {
|
|
2460
2485
|
className: "params",
|
|
@@ -2463,8 +2488,8 @@ function Ht(n) {
|
|
|
2463
2488
|
excludeBegin: !0,
|
|
2464
2489
|
excludeEnd: !0,
|
|
2465
2490
|
keywords: i,
|
|
2466
|
-
contains:
|
|
2467
|
-
},
|
|
2491
|
+
contains: D
|
|
2492
|
+
}, M = {
|
|
2468
2493
|
variants: [
|
|
2469
2494
|
// class Car extends vehicle
|
|
2470
2495
|
{
|
|
@@ -2497,7 +2522,7 @@ function Ht(n) {
|
|
|
2497
2522
|
}
|
|
2498
2523
|
}
|
|
2499
2524
|
]
|
|
2500
|
-
},
|
|
2525
|
+
}, I = {
|
|
2501
2526
|
relevance: 0,
|
|
2502
2527
|
match: e.either(
|
|
2503
2528
|
// Hard coded exceptions
|
|
@@ -2517,16 +2542,16 @@ function Ht(n) {
|
|
|
2517
2542
|
keywords: {
|
|
2518
2543
|
_: [
|
|
2519
2544
|
// se we still get relevance credit for JS library classes
|
|
2520
|
-
...
|
|
2521
|
-
...
|
|
2545
|
+
...bn,
|
|
2546
|
+
...vn
|
|
2522
2547
|
]
|
|
2523
2548
|
}
|
|
2524
|
-
},
|
|
2549
|
+
}, R = {
|
|
2525
2550
|
label: "use_strict",
|
|
2526
2551
|
className: "meta",
|
|
2527
2552
|
relevance: 10,
|
|
2528
2553
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
2529
|
-
},
|
|
2554
|
+
}, H = {
|
|
2530
2555
|
variants: [
|
|
2531
2556
|
{
|
|
2532
2557
|
match: [
|
|
@@ -2551,19 +2576,19 @@ function Ht(n) {
|
|
|
2551
2576
|
label: "func.def",
|
|
2552
2577
|
contains: [T],
|
|
2553
2578
|
illegal: /%/
|
|
2554
|
-
},
|
|
2579
|
+
}, P = {
|
|
2555
2580
|
relevance: 0,
|
|
2556
2581
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
2557
2582
|
className: "variable.constant"
|
|
2558
2583
|
};
|
|
2559
|
-
function
|
|
2584
|
+
function $(N) {
|
|
2560
2585
|
return e.concat("(?!", N.join("|"), ")");
|
|
2561
2586
|
}
|
|
2562
|
-
const
|
|
2587
|
+
const F = {
|
|
2563
2588
|
match: e.concat(
|
|
2564
2589
|
/\b/,
|
|
2565
|
-
|
|
2566
|
-
...
|
|
2590
|
+
$([
|
|
2591
|
+
...En,
|
|
2567
2592
|
"super",
|
|
2568
2593
|
"import"
|
|
2569
2594
|
]),
|
|
@@ -2572,7 +2597,7 @@ function Ht(n) {
|
|
|
2572
2597
|
),
|
|
2573
2598
|
className: "title.function",
|
|
2574
2599
|
relevance: 0
|
|
2575
|
-
},
|
|
2600
|
+
}, W = {
|
|
2576
2601
|
begin: e.concat(/\./, e.lookahead(
|
|
2577
2602
|
e.concat(u, /(?![0-9A-Za-z$_(])/)
|
|
2578
2603
|
)),
|
|
@@ -2581,7 +2606,7 @@ function Ht(n) {
|
|
|
2581
2606
|
keywords: "prototype",
|
|
2582
2607
|
className: "property",
|
|
2583
2608
|
relevance: 0
|
|
2584
|
-
},
|
|
2609
|
+
}, ae = {
|
|
2585
2610
|
match: [
|
|
2586
2611
|
/get|set/,
|
|
2587
2612
|
/\s+/,
|
|
@@ -2599,7 +2624,7 @@ function Ht(n) {
|
|
|
2599
2624
|
},
|
|
2600
2625
|
T
|
|
2601
2626
|
]
|
|
2602
|
-
},
|
|
2627
|
+
}, be = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + n.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
|
|
2603
2628
|
match: [
|
|
2604
2629
|
/const|var|let/,
|
|
2605
2630
|
/\s+/,
|
|
@@ -2608,7 +2633,7 @@ function Ht(n) {
|
|
|
2608
2633
|
/=\s*/,
|
|
2609
2634
|
/(async\s*)?/,
|
|
2610
2635
|
// async is optional
|
|
2611
|
-
e.lookahead(
|
|
2636
|
+
e.lookahead(be)
|
|
2612
2637
|
],
|
|
2613
2638
|
keywords: "async",
|
|
2614
2639
|
className: {
|
|
@@ -2620,11 +2645,11 @@ function Ht(n) {
|
|
|
2620
2645
|
]
|
|
2621
2646
|
};
|
|
2622
2647
|
return {
|
|
2623
|
-
name: "
|
|
2648
|
+
name: "JavaScript",
|
|
2624
2649
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
2625
2650
|
keywords: i,
|
|
2626
2651
|
// this will be extended by TypeScript
|
|
2627
|
-
exports: { PARAMS_CONTAINS:
|
|
2652
|
+
exports: { PARAMS_CONTAINS: D, CLASS_REFERENCE: I },
|
|
2628
2653
|
illegal: /#(?![$_A-z])/,
|
|
2629
2654
|
contains: [
|
|
2630
2655
|
n.SHEBANG({
|
|
@@ -2632,17 +2657,18 @@ function Ht(n) {
|
|
|
2632
2657
|
binary: "node",
|
|
2633
2658
|
relevance: 5
|
|
2634
2659
|
}),
|
|
2635
|
-
|
|
2660
|
+
R,
|
|
2636
2661
|
n.APOS_STRING_MODE,
|
|
2637
2662
|
n.QUOTE_STRING_MODE,
|
|
2638
2663
|
h,
|
|
2639
2664
|
d,
|
|
2665
|
+
_,
|
|
2640
2666
|
p,
|
|
2641
|
-
|
|
2667
|
+
E,
|
|
2642
2668
|
// Skip numbers when they are part of a variable name
|
|
2643
2669
|
{ match: /\$\d+/ },
|
|
2644
2670
|
c,
|
|
2645
|
-
|
|
2671
|
+
I,
|
|
2646
2672
|
{
|
|
2647
2673
|
className: "attr",
|
|
2648
2674
|
begin: u + e.lookahead(":"),
|
|
@@ -2655,14 +2681,14 @@ function Ht(n) {
|
|
|
2655
2681
|
keywords: "return throw case",
|
|
2656
2682
|
relevance: 0,
|
|
2657
2683
|
contains: [
|
|
2658
|
-
|
|
2684
|
+
E,
|
|
2659
2685
|
n.REGEXP_MODE,
|
|
2660
2686
|
{
|
|
2661
2687
|
className: "function",
|
|
2662
2688
|
// we have to count the parens to make sure we actually have the
|
|
2663
2689
|
// correct bounding ( ) before the =>. There could be any number of
|
|
2664
2690
|
// sub-expressions inside also surrounded by parens.
|
|
2665
|
-
begin:
|
|
2691
|
+
begin: be,
|
|
2666
2692
|
returnBegin: !0,
|
|
2667
2693
|
end: "\\s*=>",
|
|
2668
2694
|
contains: [
|
|
@@ -2684,7 +2710,7 @@ function Ht(n) {
|
|
|
2684
2710
|
excludeBegin: !0,
|
|
2685
2711
|
excludeEnd: !0,
|
|
2686
2712
|
keywords: i,
|
|
2687
|
-
contains:
|
|
2713
|
+
contains: D
|
|
2688
2714
|
}
|
|
2689
2715
|
]
|
|
2690
2716
|
}
|
|
@@ -2724,7 +2750,7 @@ function Ht(n) {
|
|
|
2724
2750
|
}
|
|
2725
2751
|
]
|
|
2726
2752
|
},
|
|
2727
|
-
|
|
2753
|
+
H,
|
|
2728
2754
|
{
|
|
2729
2755
|
// prevent this from getting swallowed up by function
|
|
2730
2756
|
// since they appear "function like"
|
|
@@ -2748,7 +2774,7 @@ function Ht(n) {
|
|
|
2748
2774
|
match: /\.\.\./,
|
|
2749
2775
|
relevance: 0
|
|
2750
2776
|
},
|
|
2751
|
-
|
|
2777
|
+
W,
|
|
2752
2778
|
// hack: prevents detection of keywords in some circumstances
|
|
2753
2779
|
// .keyword()
|
|
2754
2780
|
// $keyword = x
|
|
@@ -2761,10 +2787,10 @@ function Ht(n) {
|
|
|
2761
2787
|
className: { 1: "title.function" },
|
|
2762
2788
|
contains: [T]
|
|
2763
2789
|
},
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2790
|
+
F,
|
|
2791
|
+
P,
|
|
2792
|
+
M,
|
|
2793
|
+
ae,
|
|
2768
2794
|
{
|
|
2769
2795
|
match: /\$[(.]/
|
|
2770
2796
|
// relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
|
@@ -2772,12 +2798,12 @@ function Ht(n) {
|
|
|
2772
2798
|
]
|
|
2773
2799
|
};
|
|
2774
2800
|
}
|
|
2775
|
-
function
|
|
2801
|
+
function zt(n) {
|
|
2776
2802
|
const e = {
|
|
2777
2803
|
className: "attr",
|
|
2778
2804
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
2779
2805
|
relevance: 1.01
|
|
2780
|
-
},
|
|
2806
|
+
}, s = {
|
|
2781
2807
|
match: /[{}[\],:]/,
|
|
2782
2808
|
className: "punctuation",
|
|
2783
2809
|
relevance: 0
|
|
@@ -2796,7 +2822,7 @@ function Ft(n) {
|
|
|
2796
2822
|
},
|
|
2797
2823
|
contains: [
|
|
2798
2824
|
e,
|
|
2799
|
-
|
|
2825
|
+
s,
|
|
2800
2826
|
n.QUOTE_STRING_MODE,
|
|
2801
2827
|
g,
|
|
2802
2828
|
n.C_NUMBER_MODE,
|
|
@@ -2806,8 +2832,8 @@ function Ft(n) {
|
|
|
2806
2832
|
illegal: "\\S"
|
|
2807
2833
|
};
|
|
2808
2834
|
}
|
|
2809
|
-
function
|
|
2810
|
-
const e = "true false yes no null",
|
|
2835
|
+
function Gt(n) {
|
|
2836
|
+
const e = "true false yes no null", s = "[\\w#;/?:@&=+$,.~*'()[\\]]+", u = {
|
|
2811
2837
|
className: "attr",
|
|
2812
2838
|
variants: [
|
|
2813
2839
|
{ begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
|
|
@@ -2862,9 +2888,9 @@ function zt(n) {
|
|
|
2862
2888
|
end: /"/
|
|
2863
2889
|
},
|
|
2864
2890
|
{ begin: /[^\s,{}[\]]+/ }
|
|
2865
|
-
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}",
|
|
2891
|
+
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", o = "(\\.[0-9]*)?", l = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", c = {
|
|
2866
2892
|
className: "number",
|
|
2867
|
-
begin: "\\b" + i +
|
|
2893
|
+
begin: "\\b" + i + a + o + l + "\\b"
|
|
2868
2894
|
}, f = {
|
|
2869
2895
|
end: ",",
|
|
2870
2896
|
endsWithParent: !0,
|
|
@@ -2883,7 +2909,7 @@ function zt(n) {
|
|
|
2883
2909
|
contains: [f],
|
|
2884
2910
|
illegal: "\\n",
|
|
2885
2911
|
relevance: 0
|
|
2886
|
-
},
|
|
2912
|
+
}, _ = [
|
|
2887
2913
|
u,
|
|
2888
2914
|
{
|
|
2889
2915
|
className: "meta",
|
|
@@ -2911,23 +2937,23 @@ function zt(n) {
|
|
|
2911
2937
|
{
|
|
2912
2938
|
// named tags
|
|
2913
2939
|
className: "type",
|
|
2914
|
-
begin: "!\\w+!" +
|
|
2940
|
+
begin: "!\\w+!" + s
|
|
2915
2941
|
},
|
|
2916
2942
|
// https://yaml.org/spec/1.2/spec.html#id2784064
|
|
2917
2943
|
{
|
|
2918
2944
|
// verbatim tags
|
|
2919
2945
|
className: "type",
|
|
2920
|
-
begin: "!<" +
|
|
2946
|
+
begin: "!<" + s + ">"
|
|
2921
2947
|
},
|
|
2922
2948
|
{
|
|
2923
2949
|
// primary tags
|
|
2924
2950
|
className: "type",
|
|
2925
|
-
begin: "!" +
|
|
2951
|
+
begin: "!" + s
|
|
2926
2952
|
},
|
|
2927
2953
|
{
|
|
2928
2954
|
// secondary tags
|
|
2929
2955
|
className: "type",
|
|
2930
|
-
begin: "!!" +
|
|
2956
|
+
begin: "!!" + s
|
|
2931
2957
|
},
|
|
2932
2958
|
{
|
|
2933
2959
|
// fragment id &ref
|
|
@@ -2962,15 +2988,15 @@ function zt(n) {
|
|
|
2962
2988
|
h,
|
|
2963
2989
|
d,
|
|
2964
2990
|
t
|
|
2965
|
-
],
|
|
2966
|
-
return
|
|
2991
|
+
], p = [..._];
|
|
2992
|
+
return p.pop(), p.push(r), f.contains = p, {
|
|
2967
2993
|
name: "YAML",
|
|
2968
2994
|
case_insensitive: !0,
|
|
2969
2995
|
aliases: ["yml"],
|
|
2970
|
-
contains:
|
|
2996
|
+
contains: _
|
|
2971
2997
|
};
|
|
2972
2998
|
}
|
|
2973
|
-
function
|
|
2999
|
+
function Kt(n) {
|
|
2974
3000
|
return {
|
|
2975
3001
|
name: "Plain text",
|
|
2976
3002
|
aliases: [
|
|
@@ -2980,8 +3006,8 @@ function Gt(n) {
|
|
|
2980
3006
|
disableAutodetect: !0
|
|
2981
3007
|
};
|
|
2982
3008
|
}
|
|
2983
|
-
function
|
|
2984
|
-
const e = n.regex,
|
|
3009
|
+
function Wt(n) {
|
|
3010
|
+
const e = n.regex, s = /[\p{XID_Start}_]\p{XID_Continue}*/u, u = [
|
|
2985
3011
|
"and",
|
|
2986
3012
|
"as",
|
|
2987
3013
|
"assert",
|
|
@@ -3113,10 +3139,10 @@ function Kt(n) {
|
|
|
3113
3139
|
"Type",
|
|
3114
3140
|
"Union"
|
|
3115
3141
|
]
|
|
3116
|
-
},
|
|
3142
|
+
}, a = {
|
|
3117
3143
|
className: "meta",
|
|
3118
3144
|
begin: /^(>>>|\.\.\.) /
|
|
3119
|
-
},
|
|
3145
|
+
}, o = {
|
|
3120
3146
|
className: "subst",
|
|
3121
3147
|
begin: /\{/,
|
|
3122
3148
|
end: /\}/,
|
|
@@ -3134,7 +3160,7 @@ function Kt(n) {
|
|
|
3134
3160
|
end: /'''/,
|
|
3135
3161
|
contains: [
|
|
3136
3162
|
n.BACKSLASH_ESCAPE,
|
|
3137
|
-
|
|
3163
|
+
a
|
|
3138
3164
|
],
|
|
3139
3165
|
relevance: 10
|
|
3140
3166
|
},
|
|
@@ -3143,7 +3169,7 @@ function Kt(n) {
|
|
|
3143
3169
|
end: /"""/,
|
|
3144
3170
|
contains: [
|
|
3145
3171
|
n.BACKSLASH_ESCAPE,
|
|
3146
|
-
|
|
3172
|
+
a
|
|
3147
3173
|
],
|
|
3148
3174
|
relevance: 10
|
|
3149
3175
|
},
|
|
@@ -3152,9 +3178,9 @@ function Kt(n) {
|
|
|
3152
3178
|
end: /'''/,
|
|
3153
3179
|
contains: [
|
|
3154
3180
|
n.BACKSLASH_ESCAPE,
|
|
3155
|
-
|
|
3181
|
+
a,
|
|
3156
3182
|
l,
|
|
3157
|
-
|
|
3183
|
+
o
|
|
3158
3184
|
]
|
|
3159
3185
|
},
|
|
3160
3186
|
{
|
|
@@ -3162,9 +3188,9 @@ function Kt(n) {
|
|
|
3162
3188
|
end: /"""/,
|
|
3163
3189
|
contains: [
|
|
3164
3190
|
n.BACKSLASH_ESCAPE,
|
|
3165
|
-
|
|
3191
|
+
a,
|
|
3166
3192
|
l,
|
|
3167
|
-
|
|
3193
|
+
o
|
|
3168
3194
|
]
|
|
3169
3195
|
},
|
|
3170
3196
|
{
|
|
@@ -3191,7 +3217,7 @@ function Kt(n) {
|
|
|
3191
3217
|
contains: [
|
|
3192
3218
|
n.BACKSLASH_ESCAPE,
|
|
3193
3219
|
l,
|
|
3194
|
-
|
|
3220
|
+
o
|
|
3195
3221
|
]
|
|
3196
3222
|
},
|
|
3197
3223
|
{
|
|
@@ -3200,13 +3226,13 @@ function Kt(n) {
|
|
|
3200
3226
|
contains: [
|
|
3201
3227
|
n.BACKSLASH_ESCAPE,
|
|
3202
3228
|
l,
|
|
3203
|
-
|
|
3229
|
+
o
|
|
3204
3230
|
]
|
|
3205
3231
|
},
|
|
3206
3232
|
n.APOS_STRING_MODE,
|
|
3207
3233
|
n.QUOTE_STRING_MODE
|
|
3208
3234
|
]
|
|
3209
|
-
}, f = "[0-9](_?[0-9])*", h = `(\\b(${f}))?\\.(${f})|\\b(${f})\\.`, d = `\\b|${u.join("|")}`,
|
|
3235
|
+
}, f = "[0-9](_?[0-9])*", h = `(\\b(${f}))?\\.(${f})|\\b(${f})\\.`, d = `\\b|${u.join("|")}`, _ = {
|
|
3210
3236
|
className: "number",
|
|
3211
3237
|
relevance: 0,
|
|
3212
3238
|
variants: [
|
|
@@ -3250,7 +3276,7 @@ function Kt(n) {
|
|
|
3250
3276
|
begin: `\\b(${f})[jJ](?=${d})`
|
|
3251
3277
|
}
|
|
3252
3278
|
]
|
|
3253
|
-
},
|
|
3279
|
+
}, p = {
|
|
3254
3280
|
className: "comment",
|
|
3255
3281
|
begin: e.lookahead(/# type:/),
|
|
3256
3282
|
end: /$/,
|
|
@@ -3284,18 +3310,18 @@ function Kt(n) {
|
|
|
3284
3310
|
keywords: i,
|
|
3285
3311
|
contains: [
|
|
3286
3312
|
"self",
|
|
3287
|
-
|
|
3288
|
-
|
|
3313
|
+
a,
|
|
3314
|
+
_,
|
|
3289
3315
|
c,
|
|
3290
3316
|
n.HASH_COMMENT_MODE
|
|
3291
3317
|
]
|
|
3292
3318
|
}
|
|
3293
3319
|
]
|
|
3294
3320
|
};
|
|
3295
|
-
return
|
|
3321
|
+
return o.contains = [
|
|
3296
3322
|
c,
|
|
3297
|
-
|
|
3298
|
-
|
|
3323
|
+
_,
|
|
3324
|
+
a
|
|
3299
3325
|
], {
|
|
3300
3326
|
name: "Python",
|
|
3301
3327
|
aliases: [
|
|
@@ -3305,10 +3331,10 @@ function Kt(n) {
|
|
|
3305
3331
|
],
|
|
3306
3332
|
unicodeRegex: !0,
|
|
3307
3333
|
keywords: i,
|
|
3308
|
-
illegal: /(
|
|
3334
|
+
illegal: /(<\/|\?)|=>/,
|
|
3309
3335
|
contains: [
|
|
3310
|
-
|
|
3311
|
-
|
|
3336
|
+
a,
|
|
3337
|
+
_,
|
|
3312
3338
|
{
|
|
3313
3339
|
// very common convention
|
|
3314
3340
|
begin: /\bself\b/
|
|
@@ -3320,13 +3346,13 @@ function Kt(n) {
|
|
|
3320
3346
|
relevance: 0
|
|
3321
3347
|
},
|
|
3322
3348
|
c,
|
|
3323
|
-
|
|
3349
|
+
p,
|
|
3324
3350
|
n.HASH_COMMENT_MODE,
|
|
3325
3351
|
{
|
|
3326
3352
|
match: [
|
|
3327
3353
|
/\bdef/,
|
|
3328
3354
|
/\s+/,
|
|
3329
|
-
|
|
3355
|
+
s
|
|
3330
3356
|
],
|
|
3331
3357
|
scope: {
|
|
3332
3358
|
1: "keyword",
|
|
@@ -3340,10 +3366,10 @@ function Kt(n) {
|
|
|
3340
3366
|
match: [
|
|
3341
3367
|
/\bclass/,
|
|
3342
3368
|
/\s+/,
|
|
3343
|
-
|
|
3369
|
+
s,
|
|
3344
3370
|
/\s*/,
|
|
3345
3371
|
/\(\s*/,
|
|
3346
|
-
|
|
3372
|
+
s,
|
|
3347
3373
|
/\s*\)/
|
|
3348
3374
|
]
|
|
3349
3375
|
},
|
|
@@ -3351,7 +3377,7 @@ function Kt(n) {
|
|
|
3351
3377
|
match: [
|
|
3352
3378
|
/\bclass/,
|
|
3353
3379
|
/\s+/,
|
|
3354
|
-
|
|
3380
|
+
s
|
|
3355
3381
|
]
|
|
3356
3382
|
}
|
|
3357
3383
|
],
|
|
@@ -3366,7 +3392,7 @@ function Kt(n) {
|
|
|
3366
3392
|
begin: /^[\t ]*@/,
|
|
3367
3393
|
end: /(?=#)|$/,
|
|
3368
3394
|
contains: [
|
|
3369
|
-
|
|
3395
|
+
_,
|
|
3370
3396
|
v,
|
|
3371
3397
|
c
|
|
3372
3398
|
]
|
|
@@ -3374,22 +3400,22 @@ function Kt(n) {
|
|
|
3374
3400
|
]
|
|
3375
3401
|
};
|
|
3376
3402
|
}
|
|
3377
|
-
var
|
|
3403
|
+
var le = "[0-9](_*[0-9])*", we = `\\.(${le})`, Ne = "[0-9a-fA-F](_*[0-9a-fA-F])*", nn = {
|
|
3378
3404
|
className: "number",
|
|
3379
3405
|
variants: [
|
|
3380
3406
|
// DecimalFloatingPointLiteral
|
|
3381
3407
|
// including ExponentPart
|
|
3382
|
-
{ begin: `(\\b(${
|
|
3408
|
+
{ begin: `(\\b(${le})((${we})|\\.)?|(${we}))[eE][+-]?(${le})[fFdD]?\\b` },
|
|
3383
3409
|
// excluding ExponentPart
|
|
3384
|
-
{ begin: `\\b(${
|
|
3385
|
-
{ begin: `(${
|
|
3386
|
-
{ begin: `\\b(${
|
|
3410
|
+
{ begin: `\\b(${le})((${we})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
3411
|
+
{ begin: `(${we})[fFdD]?\\b` },
|
|
3412
|
+
{ begin: `\\b(${le})[fFdD]\\b` },
|
|
3387
3413
|
// HexadecimalFloatingPointLiteral
|
|
3388
|
-
{ begin: `\\b0[xX]((${
|
|
3414
|
+
{ begin: `\\b0[xX]((${Ne})\\.?|(${Ne})?\\.(${Ne}))[pP][+-]?(${le})[fFdD]?\\b` },
|
|
3389
3415
|
// DecimalIntegerLiteral
|
|
3390
3416
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
3391
3417
|
// HexIntegerLiteral
|
|
3392
|
-
{ begin: `\\b0[xX](${
|
|
3418
|
+
{ begin: `\\b0[xX](${Ne})[lL]?\\b` },
|
|
3393
3419
|
// OctalIntegerLiteral
|
|
3394
3420
|
{ begin: "\\b0(_*[0-7])*[lL]?\\b" },
|
|
3395
3421
|
// BinaryIntegerLiteral
|
|
@@ -3397,11 +3423,11 @@ var oe = "[0-9](_*[0-9])*", ye = `\\.(${oe})`, we = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3397
3423
|
],
|
|
3398
3424
|
relevance: 0
|
|
3399
3425
|
};
|
|
3400
|
-
function
|
|
3401
|
-
return
|
|
3426
|
+
function mn(n, e, s) {
|
|
3427
|
+
return s === -1 ? "" : n.replace(e, (u) => mn(n, e, s - 1));
|
|
3402
3428
|
}
|
|
3403
|
-
function
|
|
3404
|
-
const e = n.regex,
|
|
3429
|
+
function Qt(n) {
|
|
3430
|
+
const e = n.regex, s = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = s + mn("(?:<" + s + "~~~(?:\\s*,\\s*" + s + "~~~)*>)?", /~~~/g, 2), a = {
|
|
3405
3431
|
keyword: [
|
|
3406
3432
|
"synchronized",
|
|
3407
3433
|
"abstract",
|
|
@@ -3465,9 +3491,9 @@ function Wt(n) {
|
|
|
3465
3491
|
"super",
|
|
3466
3492
|
"this"
|
|
3467
3493
|
]
|
|
3468
|
-
},
|
|
3494
|
+
}, o = {
|
|
3469
3495
|
className: "meta",
|
|
3470
|
-
begin: "@" +
|
|
3496
|
+
begin: "@" + s,
|
|
3471
3497
|
contains: [
|
|
3472
3498
|
{
|
|
3473
3499
|
begin: /\(/,
|
|
@@ -3480,7 +3506,7 @@ function Wt(n) {
|
|
|
3480
3506
|
className: "params",
|
|
3481
3507
|
begin: /\(/,
|
|
3482
3508
|
end: /\)/,
|
|
3483
|
-
keywords:
|
|
3509
|
+
keywords: a,
|
|
3484
3510
|
relevance: 0,
|
|
3485
3511
|
contains: [n.C_BLOCK_COMMENT_MODE],
|
|
3486
3512
|
endsParent: !0
|
|
@@ -3488,7 +3514,7 @@ function Wt(n) {
|
|
|
3488
3514
|
return {
|
|
3489
3515
|
name: "Java",
|
|
3490
3516
|
aliases: ["jsp"],
|
|
3491
|
-
keywords:
|
|
3517
|
+
keywords: a,
|
|
3492
3518
|
illegal: /<\/|#/,
|
|
3493
3519
|
contains: [
|
|
3494
3520
|
n.COMMENT(
|
|
@@ -3529,7 +3555,7 @@ function Wt(n) {
|
|
|
3529
3555
|
match: [
|
|
3530
3556
|
/\b(?:class|interface|enum|extends|implements|new)/,
|
|
3531
3557
|
/\s+/,
|
|
3532
|
-
|
|
3558
|
+
s
|
|
3533
3559
|
],
|
|
3534
3560
|
className: {
|
|
3535
3561
|
1: "keyword",
|
|
@@ -3543,9 +3569,9 @@ function Wt(n) {
|
|
|
3543
3569
|
},
|
|
3544
3570
|
{
|
|
3545
3571
|
begin: [
|
|
3546
|
-
e.concat(/(?!else)/,
|
|
3572
|
+
e.concat(/(?!else)/, s),
|
|
3547
3573
|
/\s+/,
|
|
3548
|
-
|
|
3574
|
+
s,
|
|
3549
3575
|
/\s+/,
|
|
3550
3576
|
/=(?!=)/
|
|
3551
3577
|
],
|
|
@@ -3559,7 +3585,7 @@ function Wt(n) {
|
|
|
3559
3585
|
begin: [
|
|
3560
3586
|
/record/,
|
|
3561
3587
|
/\s+/,
|
|
3562
|
-
|
|
3588
|
+
s
|
|
3563
3589
|
],
|
|
3564
3590
|
className: {
|
|
3565
3591
|
1: "keyword",
|
|
@@ -3584,16 +3610,16 @@ function Wt(n) {
|
|
|
3584
3610
|
/\s*(?=\()/
|
|
3585
3611
|
],
|
|
3586
3612
|
className: { 2: "title.function" },
|
|
3587
|
-
keywords:
|
|
3613
|
+
keywords: a,
|
|
3588
3614
|
contains: [
|
|
3589
3615
|
{
|
|
3590
3616
|
className: "params",
|
|
3591
3617
|
begin: /\(/,
|
|
3592
3618
|
end: /\)/,
|
|
3593
|
-
keywords:
|
|
3619
|
+
keywords: a,
|
|
3594
3620
|
relevance: 0,
|
|
3595
3621
|
contains: [
|
|
3596
|
-
|
|
3622
|
+
o,
|
|
3597
3623
|
n.APOS_STRING_MODE,
|
|
3598
3624
|
n.QUOTE_STRING_MODE,
|
|
3599
3625
|
nn,
|
|
@@ -3605,24 +3631,24 @@ function Wt(n) {
|
|
|
3605
3631
|
]
|
|
3606
3632
|
},
|
|
3607
3633
|
nn,
|
|
3608
|
-
|
|
3634
|
+
o
|
|
3609
3635
|
]
|
|
3610
3636
|
};
|
|
3611
3637
|
}
|
|
3612
|
-
function
|
|
3613
|
-
const e = n.regex,
|
|
3638
|
+
function Vt(n) {
|
|
3639
|
+
const e = n.regex, s = {}, u = {
|
|
3614
3640
|
begin: /\$\{/,
|
|
3615
3641
|
end: /\}/,
|
|
3616
3642
|
contains: [
|
|
3617
3643
|
"self",
|
|
3618
3644
|
{
|
|
3619
3645
|
begin: /:-/,
|
|
3620
|
-
contains: [
|
|
3646
|
+
contains: [s]
|
|
3621
3647
|
}
|
|
3622
3648
|
// default values
|
|
3623
3649
|
]
|
|
3624
3650
|
};
|
|
3625
|
-
Object.assign(
|
|
3651
|
+
Object.assign(s, {
|
|
3626
3652
|
className: "variable",
|
|
3627
3653
|
variants: [
|
|
3628
3654
|
{ begin: e.concat(
|
|
@@ -3654,19 +3680,20 @@ function Qt(n) {
|
|
|
3654
3680
|
end: /"/,
|
|
3655
3681
|
contains: [
|
|
3656
3682
|
n.BACKSLASH_ESCAPE,
|
|
3657
|
-
|
|
3683
|
+
s,
|
|
3658
3684
|
g
|
|
3659
3685
|
]
|
|
3660
3686
|
};
|
|
3661
3687
|
g.contains.push(r);
|
|
3662
3688
|
const i = {
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
}, s = {
|
|
3689
|
+
match: /\\"/
|
|
3690
|
+
}, a = {
|
|
3666
3691
|
className: "string",
|
|
3667
3692
|
begin: /'/,
|
|
3668
3693
|
end: /'/
|
|
3669
|
-
},
|
|
3694
|
+
}, o = {
|
|
3695
|
+
match: /\\'/
|
|
3696
|
+
}, l = {
|
|
3670
3697
|
begin: /\$?\(\(/,
|
|
3671
3698
|
end: /\)\)/,
|
|
3672
3699
|
contains: [
|
|
@@ -3675,9 +3702,9 @@ function Qt(n) {
|
|
|
3675
3702
|
className: "number"
|
|
3676
3703
|
},
|
|
3677
3704
|
n.NUMBER_MODE,
|
|
3678
|
-
|
|
3705
|
+
s
|
|
3679
3706
|
]
|
|
3680
|
-
},
|
|
3707
|
+
}, c = [
|
|
3681
3708
|
"fish",
|
|
3682
3709
|
"bash",
|
|
3683
3710
|
"zsh",
|
|
@@ -3687,16 +3714,16 @@ function Qt(n) {
|
|
|
3687
3714
|
"tcsh",
|
|
3688
3715
|
"dash",
|
|
3689
3716
|
"scsh"
|
|
3690
|
-
],
|
|
3691
|
-
binary: `(${
|
|
3717
|
+
], f = n.SHEBANG({
|
|
3718
|
+
binary: `(${c.join("|")})`,
|
|
3692
3719
|
relevance: 10
|
|
3693
|
-
}),
|
|
3720
|
+
}), h = {
|
|
3694
3721
|
className: "function",
|
|
3695
3722
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3696
3723
|
returnBegin: !0,
|
|
3697
3724
|
contains: [n.inherit(n.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
3698
3725
|
relevance: 0
|
|
3699
|
-
},
|
|
3726
|
+
}, d = [
|
|
3700
3727
|
"if",
|
|
3701
3728
|
"then",
|
|
3702
3729
|
"else",
|
|
@@ -3704,16 +3731,18 @@ function Qt(n) {
|
|
|
3704
3731
|
"fi",
|
|
3705
3732
|
"for",
|
|
3706
3733
|
"while",
|
|
3734
|
+
"until",
|
|
3707
3735
|
"in",
|
|
3708
3736
|
"do",
|
|
3709
3737
|
"done",
|
|
3710
3738
|
"case",
|
|
3711
3739
|
"esac",
|
|
3712
|
-
"function"
|
|
3713
|
-
|
|
3740
|
+
"function",
|
|
3741
|
+
"select"
|
|
3742
|
+
], _ = [
|
|
3714
3743
|
"true",
|
|
3715
3744
|
"false"
|
|
3716
|
-
], p = { match: /(\/[a-z._-]+)+/ },
|
|
3745
|
+
], p = { match: /(\/[a-z._-]+)+/ }, v = [
|
|
3717
3746
|
"break",
|
|
3718
3747
|
"cd",
|
|
3719
3748
|
"continue",
|
|
@@ -3732,7 +3761,7 @@ function Qt(n) {
|
|
|
3732
3761
|
"trap",
|
|
3733
3762
|
"umask",
|
|
3734
3763
|
"unset"
|
|
3735
|
-
],
|
|
3764
|
+
], E = [
|
|
3736
3765
|
"alias",
|
|
3737
3766
|
"bind",
|
|
3738
3767
|
"builtin",
|
|
@@ -3754,7 +3783,7 @@ function Qt(n) {
|
|
|
3754
3783
|
"typeset",
|
|
3755
3784
|
"ulimit",
|
|
3756
3785
|
"unalias"
|
|
3757
|
-
],
|
|
3786
|
+
], w = [
|
|
3758
3787
|
"autoload",
|
|
3759
3788
|
"bg",
|
|
3760
3789
|
"bindkey",
|
|
@@ -3823,7 +3852,7 @@ function Qt(n) {
|
|
|
3823
3852
|
"zsocket",
|
|
3824
3853
|
"zstyle",
|
|
3825
3854
|
"ztcp"
|
|
3826
|
-
],
|
|
3855
|
+
], y = [
|
|
3827
3856
|
"chcon",
|
|
3828
3857
|
"chgrp",
|
|
3829
3858
|
"chown",
|
|
@@ -3933,37 +3962,38 @@ function Qt(n) {
|
|
|
3933
3962
|
aliases: ["sh"],
|
|
3934
3963
|
keywords: {
|
|
3935
3964
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3936
|
-
keyword:
|
|
3937
|
-
literal:
|
|
3965
|
+
keyword: d,
|
|
3966
|
+
literal: _,
|
|
3938
3967
|
built_in: [
|
|
3939
|
-
..._,
|
|
3940
3968
|
...v,
|
|
3969
|
+
...E,
|
|
3941
3970
|
// Shell modifiers
|
|
3942
3971
|
"set",
|
|
3943
3972
|
"shopt",
|
|
3944
|
-
...
|
|
3945
|
-
...
|
|
3973
|
+
...w,
|
|
3974
|
+
...y
|
|
3946
3975
|
]
|
|
3947
3976
|
},
|
|
3948
3977
|
contains: [
|
|
3949
|
-
|
|
3978
|
+
f,
|
|
3950
3979
|
// to catch known shells and boost relevancy
|
|
3951
3980
|
n.SHEBANG(),
|
|
3952
3981
|
// to catch unknown shells but still highlight the shebang
|
|
3953
|
-
|
|
3954
|
-
|
|
3982
|
+
h,
|
|
3983
|
+
l,
|
|
3955
3984
|
n.HASH_COMMENT_MODE,
|
|
3956
3985
|
t,
|
|
3957
3986
|
p,
|
|
3958
3987
|
r,
|
|
3959
3988
|
i,
|
|
3960
|
-
|
|
3961
|
-
o
|
|
3989
|
+
a,
|
|
3990
|
+
o,
|
|
3991
|
+
s
|
|
3962
3992
|
]
|
|
3963
3993
|
};
|
|
3964
3994
|
}
|
|
3965
|
-
function
|
|
3966
|
-
const e = n.regex,
|
|
3995
|
+
function Zt(n) {
|
|
3996
|
+
const e = n.regex, s = n.COMMENT("--", "$"), u = {
|
|
3967
3997
|
className: "string",
|
|
3968
3998
|
variants: [
|
|
3969
3999
|
{
|
|
@@ -4016,7 +4046,7 @@ function Vt(n) {
|
|
|
4016
4046
|
"varying",
|
|
4017
4047
|
// modifier (character varying)
|
|
4018
4048
|
"varbinary"
|
|
4019
|
-
],
|
|
4049
|
+
], a = [
|
|
4020
4050
|
"add",
|
|
4021
4051
|
"asc",
|
|
4022
4052
|
"collation",
|
|
@@ -4025,7 +4055,7 @@ function Vt(n) {
|
|
|
4025
4055
|
"first",
|
|
4026
4056
|
"last",
|
|
4027
4057
|
"view"
|
|
4028
|
-
],
|
|
4058
|
+
], o = [
|
|
4029
4059
|
"abs",
|
|
4030
4060
|
"acos",
|
|
4031
4061
|
"all",
|
|
@@ -4512,12 +4542,12 @@ function Vt(n) {
|
|
|
4512
4542
|
"depth first",
|
|
4513
4543
|
"breadth first"
|
|
4514
4544
|
], h = l, d = [
|
|
4515
|
-
...
|
|
4516
|
-
...
|
|
4517
|
-
].filter((w) => !l.includes(w)),
|
|
4545
|
+
...o,
|
|
4546
|
+
...a
|
|
4547
|
+
].filter((w) => !l.includes(w)), _ = {
|
|
4518
4548
|
className: "variable",
|
|
4519
|
-
begin: /@[a-z0-9]
|
|
4520
|
-
},
|
|
4549
|
+
begin: /@[a-z0-9][a-z0-9_]*/
|
|
4550
|
+
}, p = {
|
|
4521
4551
|
className: "operator",
|
|
4522
4552
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4523
4553
|
relevance: 0
|
|
@@ -4527,11 +4557,11 @@ function Vt(n) {
|
|
|
4527
4557
|
keywords: { built_in: h }
|
|
4528
4558
|
};
|
|
4529
4559
|
function E(w, {
|
|
4530
|
-
exceptions:
|
|
4531
|
-
when:
|
|
4560
|
+
exceptions: y,
|
|
4561
|
+
when: D
|
|
4532
4562
|
} = {}) {
|
|
4533
|
-
const
|
|
4534
|
-
return
|
|
4563
|
+
const T = D;
|
|
4564
|
+
return y = y || [], w.map((M) => M.match(/\|\d+$/) || y.includes(M) ? M : T(M) ? `${M}|0` : M);
|
|
4535
4565
|
}
|
|
4536
4566
|
return {
|
|
4537
4567
|
name: "SQL",
|
|
@@ -4561,260 +4591,260 @@ function Vt(n) {
|
|
|
4561
4591
|
begin: e.either(...r)
|
|
4562
4592
|
},
|
|
4563
4593
|
v,
|
|
4564
|
-
|
|
4594
|
+
_,
|
|
4565
4595
|
u,
|
|
4566
4596
|
g,
|
|
4567
4597
|
n.C_NUMBER_MODE,
|
|
4568
4598
|
n.C_BLOCK_COMMENT_MODE,
|
|
4569
|
-
|
|
4570
|
-
|
|
4599
|
+
s,
|
|
4600
|
+
p
|
|
4571
4601
|
]
|
|
4572
4602
|
};
|
|
4573
4603
|
}
|
|
4574
|
-
Z.registerLanguage("xml",
|
|
4575
|
-
Z.registerLanguage("javascript",
|
|
4576
|
-
Z.registerLanguage("json",
|
|
4577
|
-
Z.registerLanguage("yaml",
|
|
4578
|
-
Z.registerLanguage("plaintext",
|
|
4579
|
-
Z.registerLanguage("python",
|
|
4580
|
-
Z.registerLanguage("java",
|
|
4581
|
-
Z.registerLanguage("bash",
|
|
4582
|
-
Z.registerLanguage("sql",
|
|
4604
|
+
Z.registerLanguage("xml", $t);
|
|
4605
|
+
Z.registerLanguage("javascript", Ft);
|
|
4606
|
+
Z.registerLanguage("json", zt);
|
|
4607
|
+
Z.registerLanguage("yaml", Gt);
|
|
4608
|
+
Z.registerLanguage("plaintext", Kt);
|
|
4609
|
+
Z.registerLanguage("python", Wt);
|
|
4610
|
+
Z.registerLanguage("java", Qt);
|
|
4611
|
+
Z.registerLanguage("bash", Vt);
|
|
4612
|
+
Z.registerLanguage("sql", Zt);
|
|
4583
4613
|
var S = /* @__PURE__ */ ((n) => (n.EQUAL = "equal", n.DELETE = "removed", n.ADD = "added", n.EMPTY = "empty", n))(S || {});
|
|
4584
|
-
const
|
|
4585
|
-
function
|
|
4614
|
+
const q = "<code-diff-modified>", ee = "</code-diff-modified>", Yt = q.replace("<", "<").replace(">", ">"), Xt = ee.replace("<", "<").replace(">", ">");
|
|
4615
|
+
function ue(n) {
|
|
4586
4616
|
return n === void 0 ? S.EQUAL : n.added ? S.ADD : n.removed ? S.DELETE : S.EQUAL;
|
|
4587
4617
|
}
|
|
4588
|
-
function
|
|
4589
|
-
return typeof n == "undefined" ? e : typeof e == "undefined" ? n : (
|
|
4590
|
-
(g) =>
|
|
4618
|
+
function Te(n, e, s = "word") {
|
|
4619
|
+
return typeof n == "undefined" ? e : typeof e == "undefined" ? n : (s === "char" ? $n : Un)(n, e).filter((g) => ue(g) !== S.DELETE).map(
|
|
4620
|
+
(g) => ue(g) === S.ADD ? `${q}${g.value}${ee}` : g.value
|
|
4591
4621
|
).join("");
|
|
4592
4622
|
}
|
|
4593
|
-
function
|
|
4594
|
-
const
|
|
4595
|
-
return
|
|
4596
|
-
const [
|
|
4623
|
+
function yn(n, e) {
|
|
4624
|
+
const s = new Le.diff_match_patch(), u = s.diff_linesToChars_(n, e), g = u.chars1, t = u.chars2, r = u.lineArray, i = s.diff_main(g, t, !1);
|
|
4625
|
+
return s.diff_charsToLines_(i, r), i.map((a) => {
|
|
4626
|
+
const [o, l] = a;
|
|
4597
4627
|
return {
|
|
4598
4628
|
count: l.replace(/\n$/, "").split(`
|
|
4599
4629
|
`).length,
|
|
4600
4630
|
value: l,
|
|
4601
|
-
removed:
|
|
4602
|
-
added:
|
|
4631
|
+
removed: o === Le.DIFF_DELETE,
|
|
4632
|
+
added: o === Le.DIFF_INSERT
|
|
4603
4633
|
};
|
|
4604
4634
|
});
|
|
4605
4635
|
}
|
|
4606
4636
|
function V(n, e) {
|
|
4607
|
-
if (!e.match(new RegExp(`(${
|
|
4637
|
+
if (!e.match(new RegExp(`(${q}|${ee})`, "g")))
|
|
4608
4638
|
return Z.highlight(e, { language: n }).value;
|
|
4609
4639
|
let u = e;
|
|
4610
|
-
const g = e.replace(new RegExp(`(${
|
|
4640
|
+
const g = e.replace(new RegExp(`(${q}|${ee})`, "g"), ""), t = document.createElement("div");
|
|
4611
4641
|
t.innerHTML = Z.highlight(g, { language: n }).value;
|
|
4612
4642
|
let r = !1;
|
|
4613
|
-
const i = (
|
|
4614
|
-
|
|
4615
|
-
if (
|
|
4616
|
-
if (!
|
|
4643
|
+
const i = (a) => {
|
|
4644
|
+
a.childNodes.forEach((o) => {
|
|
4645
|
+
if (o.nodeType === Node.ELEMENT_NODE && i(o), o.nodeType === Node.TEXT_NODE) {
|
|
4646
|
+
if (!o.textContent)
|
|
4617
4647
|
return;
|
|
4618
|
-
let l =
|
|
4619
|
-
for (r && (c = c +
|
|
4620
|
-
if (u.startsWith(
|
|
4621
|
-
u = u.slice(
|
|
4648
|
+
let l = o.textContent, c = "";
|
|
4649
|
+
for (r && (c = c + q); l.length; ) {
|
|
4650
|
+
if (u.startsWith(q)) {
|
|
4651
|
+
u = u.slice(q.length), c = c + q, r = !0;
|
|
4622
4652
|
continue;
|
|
4623
4653
|
}
|
|
4624
|
-
if (u.startsWith(
|
|
4625
|
-
u = u.slice(
|
|
4654
|
+
if (u.startsWith(ee)) {
|
|
4655
|
+
u = u.slice(ee.length), c = c + ee, r = !1;
|
|
4626
4656
|
continue;
|
|
4627
4657
|
}
|
|
4628
|
-
const f = u.match(new RegExp(`(${
|
|
4658
|
+
const f = u.match(new RegExp(`(${q}|${ee})`)), h = f && f.index ? f.index : u.length, d = Math.min(h, l.length);
|
|
4629
4659
|
c = c + u.substring(0, d), u = u.slice(d), l = l.slice(d);
|
|
4630
4660
|
}
|
|
4631
|
-
r && (c = c +
|
|
4661
|
+
r && (c = c + ee), o.textContent = c;
|
|
4632
4662
|
}
|
|
4633
4663
|
});
|
|
4634
4664
|
};
|
|
4635
|
-
return i(t), t.innerHTML.replace(new RegExp(
|
|
4665
|
+
return i(t), t.innerHTML.replace(new RegExp(Yt, "g"), '<span class="x">').replace(new RegExp(Xt, "g"), "</span>");
|
|
4636
4666
|
}
|
|
4637
|
-
function
|
|
4667
|
+
function wn(n) {
|
|
4638
4668
|
const e = (g, t) => (g.match(new RegExp(t, "g")) || []).length;
|
|
4639
|
-
let
|
|
4669
|
+
let s = 0, u = 0;
|
|
4640
4670
|
for (const g of n)
|
|
4641
|
-
g.added && (
|
|
4671
|
+
g.added && (s += e(g.value.trim(), `
|
|
4642
4672
|
`) + 1), g.removed && (u += e(g.value.trim(), `
|
|
4643
4673
|
`) + 1);
|
|
4644
|
-
return { additionsNum:
|
|
4674
|
+
return { additionsNum: s, deletionsNum: u };
|
|
4645
4675
|
}
|
|
4646
|
-
function
|
|
4647
|
-
const t = () => ({ type: S.EMPTY }), r = (
|
|
4648
|
-
let
|
|
4676
|
+
function jt(n, e, s = "plaintext", u = "word", g = 10) {
|
|
4677
|
+
const t = () => ({ type: S.EMPTY }), r = (_, p, v) => ({ type: _, num: p, code: v }), i = yn(n, e);
|
|
4678
|
+
let a = 0, o = 0, l = !1;
|
|
4649
4679
|
const c = [], f = {
|
|
4650
4680
|
changes: c,
|
|
4651
4681
|
collector: [],
|
|
4652
|
-
stat:
|
|
4682
|
+
stat: wn(i)
|
|
4653
4683
|
};
|
|
4654
|
-
for (let
|
|
4684
|
+
for (let _ = 0; _ < i.length; _++) {
|
|
4655
4685
|
if (l) {
|
|
4656
4686
|
l = !1;
|
|
4657
4687
|
continue;
|
|
4658
4688
|
}
|
|
4659
|
-
const [
|
|
4689
|
+
const [p, v] = [i[_], i[_ + 1]], [E, w] = [ue(p), ue(v)], y = p.value.replace(/\n$/, "").split(`
|
|
4660
4690
|
`);
|
|
4661
4691
|
if (v === void 0) {
|
|
4662
|
-
for (const
|
|
4692
|
+
for (const T of y) {
|
|
4663
4693
|
let M = t(), I = t();
|
|
4664
|
-
const R = V(
|
|
4665
|
-
E === S.EQUAL && (
|
|
4694
|
+
const R = V(s, T);
|
|
4695
|
+
E === S.EQUAL && (a++, o++, M = r(S.EQUAL, a, R), I = r(S.EQUAL, o, R)), E === S.DELETE && (a++, M = r(S.DELETE, a, R), I = t()), E === S.ADD && (o++, M = t(), I = r(S.ADD, o, R)), c.push({ left: M, right: I });
|
|
4666
4696
|
}
|
|
4667
4697
|
break;
|
|
4668
4698
|
}
|
|
4669
4699
|
if (E === S.EQUAL)
|
|
4670
|
-
for (const
|
|
4671
|
-
|
|
4672
|
-
const M = V(
|
|
4700
|
+
for (const T of y) {
|
|
4701
|
+
a++, o++;
|
|
4702
|
+
const M = V(s, T);
|
|
4673
4703
|
c.push({
|
|
4674
|
-
left: r(S.EQUAL,
|
|
4675
|
-
right: r(S.EQUAL,
|
|
4704
|
+
left: r(S.EQUAL, a, M),
|
|
4705
|
+
right: r(S.EQUAL, o, M)
|
|
4676
4706
|
});
|
|
4677
4707
|
}
|
|
4678
|
-
const
|
|
4708
|
+
const D = v.value.replace(/\n$/, "").split(`
|
|
4679
4709
|
`);
|
|
4680
4710
|
if (E === S.DELETE) {
|
|
4681
4711
|
if (w === S.EQUAL)
|
|
4682
|
-
for (const
|
|
4683
|
-
|
|
4684
|
-
left: r(S.DELETE,
|
|
4712
|
+
for (const T of y)
|
|
4713
|
+
a++, c.push({
|
|
4714
|
+
left: r(S.DELETE, a, V(s, T)),
|
|
4685
4715
|
right: t()
|
|
4686
4716
|
});
|
|
4687
4717
|
if (w === S.ADD) {
|
|
4688
4718
|
l = !0;
|
|
4689
|
-
const
|
|
4690
|
-
for (let M = 0; M <
|
|
4691
|
-
M <
|
|
4692
|
-
const [I, R] = [
|
|
4719
|
+
const T = Math.max(p.count, v.count);
|
|
4720
|
+
for (let M = 0; M < T; M++) {
|
|
4721
|
+
M < p.count && a++, M < v.count && o++;
|
|
4722
|
+
const [I, R] = [y[M], D[M]], H = y.length === D.length ? Te(R, I, u) : I, P = y.length === D.length ? Te(I, R, u) : R, $ = M < p.count ? r(S.DELETE, a, V(s, H)) : t(), F = M < v.count ? r(S.ADD, o, V(s, P)) : t();
|
|
4693
4723
|
c.push({ left: $, right: F });
|
|
4694
4724
|
}
|
|
4695
4725
|
}
|
|
4696
4726
|
}
|
|
4697
4727
|
if (E === S.ADD)
|
|
4698
|
-
for (const
|
|
4699
|
-
|
|
4728
|
+
for (const T of y)
|
|
4729
|
+
o++, c.push({
|
|
4700
4730
|
left: t(),
|
|
4701
|
-
right: r(S.ADD,
|
|
4731
|
+
right: r(S.ADD, o, V(s, T))
|
|
4702
4732
|
});
|
|
4703
4733
|
}
|
|
4704
4734
|
if (n === e) {
|
|
4705
|
-
for (let
|
|
4706
|
-
c[
|
|
4735
|
+
for (let _ = 0; _ < c.length; _++)
|
|
4736
|
+
c[_].fold = !1;
|
|
4707
4737
|
return f;
|
|
4708
4738
|
}
|
|
4709
|
-
for (let
|
|
4710
|
-
const
|
|
4711
|
-
if (
|
|
4712
|
-
const [v, E] = [Math.max(
|
|
4739
|
+
for (let _ = 0; _ < c.length; _++) {
|
|
4740
|
+
const p = c[_];
|
|
4741
|
+
if (p.left.type === S.DELETE || p.right.type === S.ADD) {
|
|
4742
|
+
const [v, E] = [Math.max(_ - g, 0), Math.min(_ + g + 1, c.length)];
|
|
4713
4743
|
for (let w = v; w < E; w++)
|
|
4714
4744
|
c[w].fold = !1;
|
|
4715
4745
|
}
|
|
4716
|
-
|
|
4746
|
+
p.fold === void 0 && (p.fold = !0);
|
|
4717
4747
|
}
|
|
4718
4748
|
const h = [];
|
|
4719
4749
|
let d = [];
|
|
4720
|
-
for (let
|
|
4721
|
-
const
|
|
4722
|
-
if (
|
|
4750
|
+
for (let _ = 0; _ < c.length; _++) {
|
|
4751
|
+
const p = c[_];
|
|
4752
|
+
if (p.fold === !1) {
|
|
4723
4753
|
d.length && (d[0].hideIndex = f.collector.length, f.collector.push({
|
|
4724
4754
|
lines: d,
|
|
4725
4755
|
fold: !0
|
|
4726
|
-
}), d = []), h.push(
|
|
4756
|
+
}), d = []), h.push(p);
|
|
4727
4757
|
continue;
|
|
4728
4758
|
}
|
|
4729
|
-
|
|
4759
|
+
p.hide = !0, d.push(p), h.push(p);
|
|
4730
4760
|
}
|
|
4731
4761
|
return d.length && (d[0].hideIndex = f.collector.length, f.collector.push({
|
|
4732
4762
|
lines: d,
|
|
4733
4763
|
fold: !0
|
|
4734
4764
|
}), d = []), f.changes = h, f;
|
|
4735
4765
|
}
|
|
4736
|
-
function
|
|
4737
|
-
const t =
|
|
4738
|
-
let r = 0, i = 0,
|
|
4739
|
-
const
|
|
4740
|
-
changes:
|
|
4766
|
+
function Jt(n, e, s = "plaintext", u = "word", g = 10) {
|
|
4767
|
+
const t = yn(n, e);
|
|
4768
|
+
let r = 0, i = 0, a = !1;
|
|
4769
|
+
const o = [], l = {
|
|
4770
|
+
changes: o,
|
|
4741
4771
|
collector: [],
|
|
4742
|
-
stat:
|
|
4772
|
+
stat: wn(t)
|
|
4743
4773
|
};
|
|
4744
4774
|
for (let h = 0; h < t.length; h++) {
|
|
4745
|
-
if (
|
|
4746
|
-
|
|
4775
|
+
if (a) {
|
|
4776
|
+
a = !1;
|
|
4747
4777
|
continue;
|
|
4748
4778
|
}
|
|
4749
|
-
const [d,
|
|
4779
|
+
const [d, _] = [t[h], t[h + 1]], [p, v] = [ue(d), ue(_)], E = d.value.replace(/\n$/, "").split(`
|
|
4750
4780
|
`);
|
|
4751
|
-
if (
|
|
4752
|
-
for (const
|
|
4753
|
-
|
|
4754
|
-
const
|
|
4755
|
-
|
|
4756
|
-
type:
|
|
4757
|
-
code:
|
|
4758
|
-
addNum:
|
|
4759
|
-
delNum:
|
|
4781
|
+
if (_ === void 0) {
|
|
4782
|
+
for (const y of E) {
|
|
4783
|
+
p === S.EQUAL && (r++, i++), p === S.DELETE && r++, p === S.ADD && i++;
|
|
4784
|
+
const D = V(s, y);
|
|
4785
|
+
o.push({
|
|
4786
|
+
type: p,
|
|
4787
|
+
code: D,
|
|
4788
|
+
addNum: p === S.DELETE ? void 0 : i,
|
|
4789
|
+
delNum: p === S.ADD ? void 0 : r
|
|
4760
4790
|
});
|
|
4761
4791
|
}
|
|
4762
4792
|
break;
|
|
4763
4793
|
}
|
|
4764
|
-
if (
|
|
4765
|
-
for (const
|
|
4794
|
+
if (p === S.EQUAL)
|
|
4795
|
+
for (const y of E) {
|
|
4766
4796
|
r++, i++;
|
|
4767
|
-
const
|
|
4768
|
-
|
|
4797
|
+
const D = V(s, y);
|
|
4798
|
+
o.push({ type: S.EQUAL, code: D, delNum: r, addNum: i });
|
|
4769
4799
|
}
|
|
4770
|
-
const w =
|
|
4800
|
+
const w = _.value.replace(/\n$/, "").split(`
|
|
4771
4801
|
`);
|
|
4772
|
-
if (
|
|
4802
|
+
if (p === S.DELETE)
|
|
4773
4803
|
if (v === S.ADD && E.length === w.length) {
|
|
4774
|
-
for (let
|
|
4775
|
-
const
|
|
4804
|
+
for (let y = 0; y < E.length; y++) {
|
|
4805
|
+
const D = E[y], T = w[y];
|
|
4776
4806
|
r++;
|
|
4777
|
-
const M = V(
|
|
4778
|
-
|
|
4807
|
+
const M = V(s, Te(T, D, u));
|
|
4808
|
+
o.push({ type: S.DELETE, code: M, delNum: r });
|
|
4779
4809
|
}
|
|
4780
|
-
for (let
|
|
4781
|
-
const
|
|
4810
|
+
for (let y = 0; y < w.length; y++) {
|
|
4811
|
+
const D = E[y], T = w[y];
|
|
4782
4812
|
i++;
|
|
4783
|
-
const M = V(
|
|
4784
|
-
|
|
4813
|
+
const M = V(s, Te(D, T, u));
|
|
4814
|
+
o.push({ type: S.ADD, code: M, addNum: i });
|
|
4785
4815
|
}
|
|
4786
|
-
|
|
4816
|
+
a = !0;
|
|
4787
4817
|
} else
|
|
4788
|
-
for (const
|
|
4818
|
+
for (const y of E) {
|
|
4789
4819
|
r++;
|
|
4790
|
-
const
|
|
4791
|
-
|
|
4820
|
+
const D = V(s, y);
|
|
4821
|
+
o.push({ type: S.DELETE, code: D, delNum: r });
|
|
4792
4822
|
}
|
|
4793
|
-
if (
|
|
4794
|
-
for (const
|
|
4823
|
+
if (p === S.ADD)
|
|
4824
|
+
for (const y of E) {
|
|
4795
4825
|
i++;
|
|
4796
|
-
const
|
|
4797
|
-
|
|
4826
|
+
const D = V(s, y);
|
|
4827
|
+
o.push({ type: S.ADD, code: D, addNum: i });
|
|
4798
4828
|
}
|
|
4799
4829
|
}
|
|
4800
|
-
for (let h = 0; h <
|
|
4801
|
-
const d =
|
|
4830
|
+
for (let h = 0; h < o.length; h++) {
|
|
4831
|
+
const d = o[h];
|
|
4802
4832
|
if (d.type === S.DELETE || d.type === S.ADD) {
|
|
4803
|
-
const [
|
|
4804
|
-
for (let v =
|
|
4805
|
-
|
|
4833
|
+
const [_, p] = [Math.max(h - g, 0), Math.min(h + g + 1, o.length)];
|
|
4834
|
+
for (let v = _; v < p; v++)
|
|
4835
|
+
o[v].fold = !1;
|
|
4806
4836
|
}
|
|
4807
4837
|
d.fold === void 0 && (d.fold = !0);
|
|
4808
4838
|
}
|
|
4809
4839
|
if (n === e) {
|
|
4810
|
-
for (let h = 0; h <
|
|
4811
|
-
|
|
4840
|
+
for (let h = 0; h < o.length; h++)
|
|
4841
|
+
o[h].fold = !1;
|
|
4812
4842
|
return l;
|
|
4813
4843
|
}
|
|
4814
4844
|
const c = [];
|
|
4815
4845
|
let f = [];
|
|
4816
|
-
for (let h = 0; h <
|
|
4817
|
-
const d =
|
|
4846
|
+
for (let h = 0; h < o.length; h++) {
|
|
4847
|
+
const d = o[h];
|
|
4818
4848
|
if (d.fold === !1) {
|
|
4819
4849
|
f.length && (f[0].hideIndex = l.collector.length, l.collector.push({
|
|
4820
4850
|
lines: f,
|
|
@@ -4829,117 +4859,117 @@ function jt(n, e, o = "plaintext", u = "word", g = 10) {
|
|
|
4829
4859
|
fold: !0
|
|
4830
4860
|
}), f = []), l.changes = c, l;
|
|
4831
4861
|
}
|
|
4832
|
-
const
|
|
4862
|
+
const qt = /* @__PURE__ */ _e({
|
|
4833
4863
|
__name: "UnifiedLine",
|
|
4834
4864
|
props: {
|
|
4835
4865
|
line: null
|
|
4836
4866
|
},
|
|
4837
4867
|
emits: ["expand"],
|
|
4838
4868
|
setup(n, { emit: e }) {
|
|
4839
|
-
function
|
|
4869
|
+
function s(u) {
|
|
4840
4870
|
return u === S.DELETE ? "-" : u === S.ADD ? "+" : "";
|
|
4841
4871
|
}
|
|
4842
|
-
return { __sfc: !0, emit: e, getCodeMarker:
|
|
4872
|
+
return { __sfc: !0, emit: e, getCodeMarker: s, DiffType: S };
|
|
4843
4873
|
}
|
|
4844
4874
|
});
|
|
4845
|
-
function pe(n, e,
|
|
4846
|
-
var
|
|
4847
|
-
e && (
|
|
4848
|
-
var
|
|
4849
|
-
if (r ? (
|
|
4875
|
+
function pe(n, e, s, u, g, t, r, i) {
|
|
4876
|
+
var a = typeof n == "function" ? n.options : n;
|
|
4877
|
+
e && (a.render = e, a.staticRenderFns = s, a._compiled = !0), u && (a.functional = !0), t && (a._scopeId = "data-v-" + t);
|
|
4878
|
+
var o;
|
|
4879
|
+
if (r ? (o = function(f) {
|
|
4850
4880
|
f = f || // cached call
|
|
4851
4881
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
4852
4882
|
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ != "undefined" && (f = __VUE_SSR_CONTEXT__), g && g.call(this, f), f && f._registeredComponents && f._registeredComponents.add(r);
|
|
4853
|
-
},
|
|
4883
|
+
}, a._ssrRegister = o) : g && (o = i ? function() {
|
|
4854
4884
|
g.call(
|
|
4855
4885
|
this,
|
|
4856
|
-
(
|
|
4886
|
+
(a.functional ? this.parent : this).$root.$options.shadowRoot
|
|
4857
4887
|
);
|
|
4858
|
-
} : g),
|
|
4859
|
-
if (
|
|
4860
|
-
|
|
4861
|
-
var l =
|
|
4862
|
-
|
|
4863
|
-
return
|
|
4888
|
+
} : g), o)
|
|
4889
|
+
if (a.functional) {
|
|
4890
|
+
a._injectStyles = o;
|
|
4891
|
+
var l = a.render;
|
|
4892
|
+
a.render = function(h, d) {
|
|
4893
|
+
return o.call(d), l(h, d);
|
|
4864
4894
|
};
|
|
4865
4895
|
} else {
|
|
4866
|
-
var c =
|
|
4867
|
-
|
|
4896
|
+
var c = a.beforeCreate;
|
|
4897
|
+
a.beforeCreate = c ? [].concat(c, o) : [o];
|
|
4868
4898
|
}
|
|
4869
4899
|
return {
|
|
4870
4900
|
exports: n,
|
|
4871
|
-
options:
|
|
4901
|
+
options: a
|
|
4872
4902
|
};
|
|
4873
4903
|
}
|
|
4874
|
-
var
|
|
4875
|
-
var e = this,
|
|
4876
|
-
return e.line.hideIndex !== void 0 && e.line.hide ?
|
|
4904
|
+
var er = function() {
|
|
4905
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4906
|
+
return e.line.hideIndex !== void 0 && e.line.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk text-center", attrs: { colspan: "2" }, on: { click: function(g) {
|
|
4877
4907
|
return u.emit("expand", e.line);
|
|
4878
|
-
} } }, [e._v(" > ")]),
|
|
4908
|
+
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-hunk", attrs: { align: "left" } }, [e._v(" ⋯ ")])]) : e.line.hide ? e._e() : s("tr", [s("td", { staticClass: "blob-num", class: {
|
|
4879
4909
|
"blob-num-deletion": e.line.type === u.DiffType.DELETE,
|
|
4880
4910
|
"blob-num-addition": e.line.type === u.DiffType.ADD,
|
|
4881
4911
|
"blob-num-context": e.line.type === u.DiffType.EQUAL,
|
|
4882
4912
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4883
|
-
} }, [e._v(" " + e._s(e.line.delNum) + " ")]),
|
|
4913
|
+
} }, [e._v(" " + e._s(e.line.delNum) + " ")]), s("td", { staticClass: "blob-num", class: {
|
|
4884
4914
|
"blob-num-deletion": e.line.type === u.DiffType.DELETE,
|
|
4885
4915
|
"blob-num-addition": e.line.type === u.DiffType.ADD,
|
|
4886
4916
|
"blob-num-context": e.line.type === u.DiffType.EQUAL,
|
|
4887
4917
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4888
|
-
} }, [e._v(" " + e._s(e.line.addNum) + " ")]),
|
|
4918
|
+
} }, [e._v(" " + e._s(e.line.addNum) + " ")]), s("td", { staticClass: "blob-code", class: {
|
|
4889
4919
|
"blob-code-deletion": e.line.type === u.DiffType.DELETE,
|
|
4890
4920
|
"blob-code-addition": e.line.type === u.DiffType.ADD,
|
|
4891
4921
|
"blob-code-context": e.line.type === u.DiffType.EQUAL,
|
|
4892
4922
|
"blob-code-hunk": e.line.hide !== void 0
|
|
4893
|
-
} }, [
|
|
4894
|
-
},
|
|
4895
|
-
Jt,
|
|
4923
|
+
} }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(e.line.type) }, domProps: { innerHTML: e._s(e.line.code) } })])]);
|
|
4924
|
+
}, nr = [], tr = /* @__PURE__ */ pe(
|
|
4896
4925
|
qt,
|
|
4897
4926
|
er,
|
|
4927
|
+
nr,
|
|
4898
4928
|
!1,
|
|
4899
4929
|
null,
|
|
4900
4930
|
null,
|
|
4901
4931
|
null,
|
|
4902
4932
|
null
|
|
4903
4933
|
);
|
|
4904
|
-
const
|
|
4934
|
+
const rr = tr.exports, ir = /* @__PURE__ */ _e({
|
|
4905
4935
|
__name: "UnifiedViewer",
|
|
4906
4936
|
props: {
|
|
4907
4937
|
diffChange: null
|
|
4908
4938
|
},
|
|
4909
4939
|
setup(n) {
|
|
4910
4940
|
const e = n;
|
|
4911
|
-
function
|
|
4941
|
+
function s({ hideIndex: u }) {
|
|
4912
4942
|
u !== void 0 && e.diffChange.collector[u].lines.forEach((g) => {
|
|
4913
4943
|
g.hide = !1, g.fold = !1;
|
|
4914
4944
|
});
|
|
4915
4945
|
}
|
|
4916
|
-
return { __sfc: !0, props: e, expandHandler:
|
|
4946
|
+
return { __sfc: !0, props: e, expandHandler: s, UnifiedLine: rr };
|
|
4917
4947
|
}
|
|
4918
4948
|
});
|
|
4919
|
-
var
|
|
4949
|
+
var sr = function() {
|
|
4920
4950
|
var g;
|
|
4921
|
-
var e = this,
|
|
4922
|
-
return
|
|
4923
|
-
return
|
|
4951
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4952
|
+
return s("table", { staticClass: "diff-table" }, [s("tbody", e._l((g = e.diffChange) == null ? void 0 : g.changes, function(t, r) {
|
|
4953
|
+
return s(u.UnifiedLine, { key: r, attrs: { line: t }, on: { expand: u.expandHandler } });
|
|
4924
4954
|
}), 1)]);
|
|
4925
|
-
},
|
|
4926
|
-
rr,
|
|
4955
|
+
}, ar = [], or = /* @__PURE__ */ pe(
|
|
4927
4956
|
ir,
|
|
4928
4957
|
sr,
|
|
4958
|
+
ar,
|
|
4929
4959
|
!1,
|
|
4930
4960
|
null,
|
|
4931
4961
|
"238e1326",
|
|
4932
4962
|
null,
|
|
4933
4963
|
null
|
|
4934
4964
|
);
|
|
4935
|
-
const
|
|
4965
|
+
const lr = or.exports, cr = /* @__PURE__ */ _e({
|
|
4936
4966
|
__name: "SplitLine",
|
|
4937
4967
|
props: {
|
|
4938
4968
|
splitLine: null
|
|
4939
4969
|
},
|
|
4940
4970
|
emits: ["expand"],
|
|
4941
4971
|
setup(n, { emit: e }) {
|
|
4942
|
-
function
|
|
4972
|
+
function s(g) {
|
|
4943
4973
|
return g === S.DELETE ? "-" : g === S.ADD ? "+" : "";
|
|
4944
4974
|
}
|
|
4945
4975
|
function u(g) {
|
|
@@ -4950,20 +4980,20 @@ const or = ar.exports, lr = /* @__PURE__ */ de({
|
|
|
4950
4980
|
for (const i of t)
|
|
4951
4981
|
i.classList.toggle("no-select", g === "right");
|
|
4952
4982
|
}
|
|
4953
|
-
return { __sfc: !0, emit: e, getCodeMarker:
|
|
4983
|
+
return { __sfc: !0, emit: e, getCodeMarker: s, onSplitLineMousedown: u, DiffType: S };
|
|
4954
4984
|
}
|
|
4955
4985
|
});
|
|
4956
|
-
var
|
|
4957
|
-
var e = this,
|
|
4958
|
-
return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ?
|
|
4986
|
+
var ur = function() {
|
|
4987
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4988
|
+
return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk", attrs: { colspan: "1" }, on: { click: function(g) {
|
|
4959
4989
|
return u.emit("expand", e.splitLine);
|
|
4960
|
-
} } }, [e._v(" > ")]),
|
|
4961
|
-
return [g.type === u.DiffType.EMPTY ? [
|
|
4990
|
+
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-inner blob-code-hunk", attrs: { colspan: "3", align: "left" } }, [e._v(" ⋯ ")])]) : e.splitLine.hide ? e._e() : s("tr", [e._l([e.splitLine.left, e.splitLine.right], function(g, t) {
|
|
4991
|
+
return [g.type === u.DiffType.EMPTY ? [s("td", { staticClass: "blob-num blob-num-empty empty-cell" }), s("td", { staticClass: "blob-code blob-code-empty empty-cell" })] : [s("td", { staticClass: "blob-num", class: {
|
|
4962
4992
|
"blob-num-deletion": g.type === u.DiffType.DELETE,
|
|
4963
4993
|
"blob-num-addition": g.type === u.DiffType.ADD,
|
|
4964
4994
|
"blob-num-context": g.type === u.DiffType.EQUAL,
|
|
4965
4995
|
"blob-num-hunk": e.splitLine.hide !== void 0
|
|
4966
|
-
} }, [e._v(" " + e._s(g.num) + " ")]),
|
|
4996
|
+
} }, [e._v(" " + e._s(g.num) + " ")]), s("td", { staticClass: "blob-code", class: {
|
|
4967
4997
|
"blob-code-deletion": g.type === u.DiffType.DELETE,
|
|
4968
4998
|
"blob-code-addition": g.type === u.DiffType.ADD,
|
|
4969
4999
|
"blob-code-context": g.type === u.DiffType.EQUAL,
|
|
@@ -4972,45 +5002,45 @@ var cr = function() {
|
|
|
4972
5002
|
"split-side-right": t === 1
|
|
4973
5003
|
}, on: { mousedown: function(r) {
|
|
4974
5004
|
return u.onSplitLineMousedown(t === 0 ? "left" : "right");
|
|
4975
|
-
} } }, [
|
|
5005
|
+
} } }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(g.type) }, domProps: { innerHTML: e._s(g.code) } })])]];
|
|
4976
5006
|
})], 2);
|
|
4977
|
-
},
|
|
4978
|
-
lr,
|
|
5007
|
+
}, fr = [], gr = /* @__PURE__ */ pe(
|
|
4979
5008
|
cr,
|
|
4980
5009
|
ur,
|
|
5010
|
+
fr,
|
|
4981
5011
|
!1,
|
|
4982
5012
|
null,
|
|
4983
5013
|
null,
|
|
4984
5014
|
null,
|
|
4985
5015
|
null
|
|
4986
5016
|
);
|
|
4987
|
-
const
|
|
5017
|
+
const hr = gr.exports, dr = /* @__PURE__ */ _e({
|
|
4988
5018
|
__name: "SplitViewer",
|
|
4989
5019
|
props: {
|
|
4990
5020
|
diffChange: null
|
|
4991
5021
|
},
|
|
4992
5022
|
setup(n) {
|
|
4993
5023
|
const e = n;
|
|
4994
|
-
function
|
|
5024
|
+
function s({ hideIndex: u }) {
|
|
4995
5025
|
u !== void 0 && e.diffChange.collector[u].lines.forEach((g) => {
|
|
4996
5026
|
g.hide = !1, g.fold = !1;
|
|
4997
5027
|
});
|
|
4998
5028
|
}
|
|
4999
|
-
return { __sfc: !0, props: e, expandHandler:
|
|
5029
|
+
return { __sfc: !0, props: e, expandHandler: s, SplitLine: hr };
|
|
5000
5030
|
}
|
|
5001
5031
|
});
|
|
5002
|
-
var
|
|
5032
|
+
var _r = function() {
|
|
5003
5033
|
var g;
|
|
5004
|
-
var e = this,
|
|
5005
|
-
return
|
|
5006
|
-
return
|
|
5034
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5035
|
+
return s("table", { staticClass: "file-diff-split diff-table" }, [e._m(0), s("tbody", e._l((g = e.diffChange) == null ? void 0 : g.changes, function(t, r) {
|
|
5036
|
+
return s(u.SplitLine, { key: r, attrs: { "split-line": t }, on: { expand: u.expandHandler } });
|
|
5007
5037
|
}), 1)]);
|
|
5008
5038
|
}, pr = [function() {
|
|
5009
5039
|
var n = this, e = n._self._c;
|
|
5010
5040
|
return n._self._setupProxy, e("colgroup", [e("col", { attrs: { width: "44" } }), e("col"), e("col", { attrs: { width: "44" } }), e("col")]);
|
|
5011
|
-
}],
|
|
5012
|
-
hr,
|
|
5041
|
+
}], br = /* @__PURE__ */ pe(
|
|
5013
5042
|
dr,
|
|
5043
|
+
_r,
|
|
5014
5044
|
pr,
|
|
5015
5045
|
!1,
|
|
5016
5046
|
null,
|
|
@@ -5018,8 +5048,8 @@ var dr = function() {
|
|
|
5018
5048
|
null,
|
|
5019
5049
|
null
|
|
5020
5050
|
);
|
|
5021
|
-
const
|
|
5022
|
-
const
|
|
5051
|
+
const vr = br.exports;
|
|
5052
|
+
const Er = /* @__PURE__ */ _e({
|
|
5023
5053
|
__name: "CodeDiff",
|
|
5024
5054
|
props: {
|
|
5025
5055
|
newString: null,
|
|
@@ -5032,55 +5062,61 @@ const vr = /* @__PURE__ */ de({
|
|
|
5032
5062
|
noDiffLineFeed: { type: Boolean, default: !1 },
|
|
5033
5063
|
maxHeight: { default: void 0 },
|
|
5034
5064
|
filename: { default: void 0 },
|
|
5065
|
+
newFilename: { default: void 0 },
|
|
5035
5066
|
hideHeader: { type: Boolean, default: !1 },
|
|
5036
|
-
hideStat: { type: Boolean, default: !1 }
|
|
5067
|
+
hideStat: { type: Boolean, default: !1 },
|
|
5068
|
+
theme: { default: "light" }
|
|
5037
5069
|
},
|
|
5038
5070
|
emits: ["diff"],
|
|
5039
5071
|
setup(n, { emit: e }) {
|
|
5040
|
-
const
|
|
5041
|
-
let
|
|
5042
|
-
return
|
|
5043
|
-
`) :
|
|
5044
|
-
}), t =
|
|
5045
|
-
let
|
|
5046
|
-
return
|
|
5047
|
-
`) :
|
|
5048
|
-
}), r =
|
|
5049
|
-
() => u.value ?
|
|
5050
|
-
), i =
|
|
5051
|
-
return
|
|
5072
|
+
const s = n, u = fe(() => s.outputFormat === "line-by-line"), g = fe(() => {
|
|
5073
|
+
let o = s.oldString || "";
|
|
5074
|
+
return o = s.trim ? o.trim() : o, o = s.noDiffLineFeed ? o.replace(/(\r\n)/g, `
|
|
5075
|
+
`) : o, o;
|
|
5076
|
+
}), t = fe(() => {
|
|
5077
|
+
let o = s.newString || "";
|
|
5078
|
+
return o = s.trim ? o.trim() : o, o = s.noDiffLineFeed ? o.replace(/(\r\n)/g, `
|
|
5079
|
+
`) : o, o;
|
|
5080
|
+
}), r = fe(
|
|
5081
|
+
() => u.value ? Jt(g.value, t.value, s.language, s.diffStyle, s.context) : jt(g.value, t.value, s.language, s.diffStyle, s.context)
|
|
5082
|
+
), i = Ln(r.value), a = fe(() => i.value.stat.additionsNum === 0 && i.value.stat.deletionsNum === 0);
|
|
5083
|
+
return On(() => s, () => {
|
|
5052
5084
|
i.value = r.value, e("diff", {
|
|
5053
5085
|
stat: {
|
|
5054
|
-
isChanged: !
|
|
5086
|
+
isChanged: !a.value,
|
|
5055
5087
|
addNum: i.value.stat.additionsNum,
|
|
5056
5088
|
delNum: i.value.stat.deletionsNum
|
|
5057
5089
|
}
|
|
5058
5090
|
});
|
|
5059
|
-
}, { deep: !0, immediate: !0 }), { __sfc: !0, props:
|
|
5091
|
+
}, { deep: !0, immediate: !0 }), { __sfc: !0, props: s, emits: e, isUnifiedViewer: u, oldString: g, newString: t, raw: r, diffChange: i, isNotChanged: a, UnifiedViewer: lr, SplitViewer: vr };
|
|
5060
5092
|
}
|
|
5061
5093
|
});
|
|
5062
|
-
var
|
|
5063
|
-
var e = this,
|
|
5064
|
-
return
|
|
5065
|
-
},
|
|
5066
|
-
|
|
5094
|
+
var mr = function() {
|
|
5095
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5096
|
+
return s("div", { staticClass: "code-diff-view", style: { maxHeight: e.maxHeight }, attrs: { theme: e.theme } }, [e.hideHeader ? e._e() : s("div", { staticClass: "file-header" }, [u.isUnifiedViewer ? s("div", { staticClass: "file-info" }, [s("span", [s("div", { staticClass: "info-left" }, [e._v(e._s(e.filename))]), s("div", { staticClass: "info-left" }, [e._v(e._s(e.newFilename))])]), e.hideStat ? e._e() : s("span", { staticClass: "diff-stat" }, [e._t("stat", function() {
|
|
5097
|
+
return [s("span", { staticClass: "diff-stat-added" }, [e._v("+" + e._s(u.diffChange.stat.additionsNum) + " additions")]), s("span", { staticClass: "diff-stat-deleted", staticStyle: { "margin-left": "8px" } }, [e._v("-" + e._s(u.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5098
|
+
})], 2)]) : s("div", { staticClass: "file-info" }, [s("span", { staticClass: "info-left" }, [e._v(e._s(e.filename))]), s("span", { staticClass: "info-right" }, [s("span", { staticStyle: { "margin-left": "20px" } }, [e._v(e._s(e.newFilename))]), e.hideStat ? e._e() : s("span", { staticClass: "diff-stat" }, [e._t("stat", function() {
|
|
5099
|
+
return [s("span", { staticClass: "diff-stat-added" }, [e._v("+" + e._s(u.diffChange.stat.additionsNum) + " additions")]), s("span", { staticClass: "diff-stat-deleted", staticStyle: { "margin-left": "8px" } }, [e._v("-" + e._s(u.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5100
|
+
})], 2)])])]), u.isUnifiedViewer ? s(u.UnifiedViewer, { attrs: { "diff-change": u.diffChange } }) : s(u.SplitViewer, { attrs: { "diff-change": u.diffChange } })], 1);
|
|
5101
|
+
}, yr = [], wr = /* @__PURE__ */ pe(
|
|
5067
5102
|
Er,
|
|
5068
5103
|
mr,
|
|
5104
|
+
yr,
|
|
5069
5105
|
!1,
|
|
5070
5106
|
null,
|
|
5071
5107
|
null,
|
|
5072
5108
|
null,
|
|
5073
5109
|
null
|
|
5074
5110
|
);
|
|
5075
|
-
const
|
|
5076
|
-
function
|
|
5077
|
-
n.component("CodeDiff",
|
|
5111
|
+
const Nr = wr.exports;
|
|
5112
|
+
function Ar(n) {
|
|
5113
|
+
n.component("CodeDiff", Nr);
|
|
5078
5114
|
}
|
|
5079
|
-
const
|
|
5080
|
-
install:
|
|
5115
|
+
const Tr = {
|
|
5116
|
+
install: Ar,
|
|
5081
5117
|
hljs: Z
|
|
5082
5118
|
};
|
|
5083
5119
|
export {
|
|
5084
|
-
|
|
5085
|
-
|
|
5120
|
+
Nr as CodeDiff,
|
|
5121
|
+
Tr as default
|
|
5086
5122
|
};
|