v-code-diff 1.1.0 → 1.2.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 +9 -5
- package/dist/v2/index.cjs.js +11 -9
- package/dist/v2/index.es.js +925 -889
- package/dist/v2.7/index.cjs.js +11 -9
- package/dist/v2.7/index.es.js +897 -881
- package/dist/v3/index.cjs.js +11 -9
- package/dist/v3/index.es.js +840 -812
- package/package.json +3 -1
- package/scripts/postinstall.js +2 -2
- package/src/CodeDiff.vue +13 -2
- package/src/split/SplitLine.vue +2 -2
- package/src/style.scss +36 -0
- package/src/types.ts +13 -2
- package/src/unified/UnifiedLine.vue +3 -3
- package/src/utils.ts +69 -42
package/dist/v2.7/index.es.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
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}.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 .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import
|
|
3
|
-
|
|
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}.code-diff-view .file-header{background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .filename{font-size:13px;color:var(--color-fg-default)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import Sn, { defineComponent as ge, computed as me } from "vue";
|
|
3
|
+
Sn.util.warn;
|
|
4
4
|
function Z() {
|
|
5
5
|
}
|
|
6
6
|
Z.prototype = {
|
|
7
7
|
diff: function(n, t) {
|
|
8
|
-
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
9
|
-
typeof s == "function" && (
|
|
8
|
+
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = s.callback;
|
|
9
|
+
typeof s == "function" && (o = s, s = {}), this.options = s;
|
|
10
10
|
var l = this;
|
|
11
|
-
function
|
|
12
|
-
return
|
|
13
|
-
|
|
11
|
+
function i(g) {
|
|
12
|
+
return o ? (setTimeout(function() {
|
|
13
|
+
o(void 0, g);
|
|
14
14
|
}, 0), !0) : g;
|
|
15
15
|
}
|
|
16
16
|
n = this.castInput(n), t = this.castInput(t), n = this.removeEmpty(this.tokenize(n)), t = this.removeEmpty(this.tokenize(t));
|
|
17
|
-
var
|
|
17
|
+
var r = t.length, a = n.length, c = 1, p = r + a;
|
|
18
18
|
s.maxEditLength && (p = Math.min(p, s.maxEditLength));
|
|
19
|
-
var
|
|
19
|
+
var d = [{
|
|
20
20
|
newPos: -1,
|
|
21
21
|
components: []
|
|
22
|
-
}],
|
|
23
|
-
if (
|
|
24
|
-
return
|
|
22
|
+
}], b = this.extractCommon(d[0], t, n, 0);
|
|
23
|
+
if (d[0].newPos + 1 >= r && b + 1 >= a)
|
|
24
|
+
return i([{
|
|
25
25
|
value: this.join(t),
|
|
26
26
|
count: t.length
|
|
27
27
|
}]);
|
|
28
|
-
function
|
|
29
|
-
for (var g = -1 *
|
|
30
|
-
var
|
|
31
|
-
S && (
|
|
32
|
-
var
|
|
33
|
-
if (!
|
|
34
|
-
|
|
28
|
+
function E() {
|
|
29
|
+
for (var g = -1 * c; g <= c; g += 2) {
|
|
30
|
+
var m = void 0, S = d[g - 1], R = d[g + 1], x = (R ? R.newPos : 0) - g;
|
|
31
|
+
S && (d[g - 1] = void 0);
|
|
32
|
+
var A = S && S.newPos + 1 < r, L = R && 0 <= x && x < a;
|
|
33
|
+
if (!A && !L) {
|
|
34
|
+
d[g] = void 0;
|
|
35
35
|
continue;
|
|
36
36
|
}
|
|
37
|
-
if (!
|
|
38
|
-
return
|
|
39
|
-
|
|
37
|
+
if (!A || L && S.newPos < R.newPos ? (m = Mn(R), l.pushComponent(m.components, void 0, !0)) : (m = S, m.newPos++, l.pushComponent(m.components, !0, void 0)), x = l.extractCommon(m, t, n, g), m.newPos + 1 >= r && x + 1 >= a)
|
|
38
|
+
return i(Rn(l, m.components, t, n, l.useLongestToken));
|
|
39
|
+
d[g] = m;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
c++;
|
|
42
42
|
}
|
|
43
|
-
if (
|
|
43
|
+
if (o)
|
|
44
44
|
(function g() {
|
|
45
45
|
setTimeout(function() {
|
|
46
|
-
if (
|
|
47
|
-
return
|
|
48
|
-
|
|
46
|
+
if (c > p)
|
|
47
|
+
return o();
|
|
48
|
+
E() || g();
|
|
49
49
|
}, 0);
|
|
50
50
|
})();
|
|
51
51
|
else
|
|
52
|
-
for (;
|
|
53
|
-
var
|
|
54
|
-
if (
|
|
55
|
-
return
|
|
52
|
+
for (; c <= p; ) {
|
|
53
|
+
var v = E();
|
|
54
|
+
if (v)
|
|
55
|
+
return v;
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
pushComponent: function(n, t, s) {
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
count:
|
|
59
|
+
var o = n[n.length - 1];
|
|
60
|
+
o && o.added === t && o.removed === s ? n[n.length - 1] = {
|
|
61
|
+
count: o.count + 1,
|
|
62
62
|
added: t,
|
|
63
63
|
removed: s
|
|
64
64
|
} : n.push({
|
|
@@ -67,12 +67,12 @@ Z.prototype = {
|
|
|
67
67
|
removed: s
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
|
-
extractCommon: function(n, t, s,
|
|
71
|
-
for (var l = t.length,
|
|
72
|
-
|
|
73
|
-
return
|
|
74
|
-
count:
|
|
75
|
-
}), n.newPos =
|
|
70
|
+
extractCommon: function(n, t, s, o) {
|
|
71
|
+
for (var l = t.length, i = s.length, r = n.newPos, a = r - o, c = 0; r + 1 < l && a + 1 < i && this.equals(t[r + 1], s[a + 1]); )
|
|
72
|
+
r++, a++, c++;
|
|
73
|
+
return c && n.components.push({
|
|
74
|
+
count: c
|
|
75
|
+
}), n.newPos = r, a;
|
|
76
76
|
},
|
|
77
77
|
equals: function(n, t) {
|
|
78
78
|
return this.options.comparator ? this.options.comparator(n, t) : n === t || this.options.ignoreCase && n.toLowerCase() === t.toLowerCase();
|
|
@@ -92,40 +92,40 @@ Z.prototype = {
|
|
|
92
92
|
return n.join("");
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
for (var l = 0,
|
|
97
|
-
var
|
|
98
|
-
if (
|
|
99
|
-
if (
|
|
100
|
-
var
|
|
101
|
-
n[l - 1] = n[l], n[l] =
|
|
95
|
+
function Rn(e, n, t, s, o) {
|
|
96
|
+
for (var l = 0, i = n.length, r = 0, a = 0; l < i; l++) {
|
|
97
|
+
var c = n[l];
|
|
98
|
+
if (c.removed) {
|
|
99
|
+
if (c.value = e.join(s.slice(a, a + c.count)), a += c.count, l && n[l - 1].added) {
|
|
100
|
+
var d = n[l - 1];
|
|
101
|
+
n[l - 1] = n[l], n[l] = d;
|
|
102
102
|
}
|
|
103
103
|
} else {
|
|
104
|
-
if (!
|
|
105
|
-
var p = t.slice(
|
|
106
|
-
p = p.map(function(
|
|
107
|
-
var g = s[a +
|
|
108
|
-
return g.length >
|
|
109
|
-
}),
|
|
104
|
+
if (!c.added && o) {
|
|
105
|
+
var p = t.slice(r, r + c.count);
|
|
106
|
+
p = p.map(function(E, v) {
|
|
107
|
+
var g = s[a + v];
|
|
108
|
+
return g.length > E.length ? g : E;
|
|
109
|
+
}), c.value = e.join(p);
|
|
110
110
|
} else
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
c.value = e.join(t.slice(r, r + c.count));
|
|
112
|
+
r += c.count, c.added || (a += c.count);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
var
|
|
116
|
-
return
|
|
115
|
+
var b = n[i - 1];
|
|
116
|
+
return i > 1 && typeof b.value == "string" && (b.added || b.removed) && e.equals("", b.value) && (n[i - 2].value += b.value, n.pop()), n;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Mn(e) {
|
|
119
119
|
return {
|
|
120
120
|
newPos: e.newPos,
|
|
121
121
|
components: e.components.slice(0)
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
return
|
|
124
|
+
var On = new Z();
|
|
125
|
+
function xn(e, n, t) {
|
|
126
|
+
return On.diff(e, n, t);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Cn(e, n) {
|
|
129
129
|
if (typeof e == "function")
|
|
130
130
|
n.callback = e;
|
|
131
131
|
else if (e)
|
|
@@ -133,27 +133,27 @@ function xn(e, n) {
|
|
|
133
133
|
e.hasOwnProperty(t) && (n[t] = e[t]);
|
|
134
134
|
return n;
|
|
135
135
|
}
|
|
136
|
-
var We = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Ve = /\S/,
|
|
137
|
-
|
|
136
|
+
var We = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Ve = /\S/, De = new Z();
|
|
137
|
+
De.equals = function(e, n) {
|
|
138
138
|
return this.options.ignoreCase && (e = e.toLowerCase(), n = n.toLowerCase()), e === n || this.options.ignoreWhitespace && !Ve.test(e) && !Ve.test(n);
|
|
139
139
|
};
|
|
140
|
-
|
|
140
|
+
De.tokenize = function(e) {
|
|
141
141
|
for (var n = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), t = 0; t < n.length - 1; t++)
|
|
142
142
|
!n[t + 1] && n[t + 2] && We.test(n[t]) && We.test(n[t + 2]) && (n[t] += n[t + 2], n.splice(t + 1, 2), t--);
|
|
143
143
|
return n;
|
|
144
144
|
};
|
|
145
145
|
function Ln(e, n, t) {
|
|
146
|
-
return t =
|
|
146
|
+
return t = Cn(t, {
|
|
147
147
|
ignoreWhitespace: !0
|
|
148
|
-
}),
|
|
148
|
+
}), De.diff(e, n, t);
|
|
149
149
|
}
|
|
150
150
|
var Ie = new Z();
|
|
151
151
|
Ie.tokenize = function(e) {
|
|
152
152
|
var n = [], t = e.split(/(\n|\r\n)/);
|
|
153
153
|
t[t.length - 1] || t.pop();
|
|
154
154
|
for (var s = 0; s < t.length; s++) {
|
|
155
|
-
var
|
|
156
|
-
s % 2 && !this.options.newlineIsToken ? n[n.length - 1] +=
|
|
155
|
+
var o = t[s];
|
|
156
|
+
s % 2 && !this.options.newlineIsToken ? n[n.length - 1] += o : (this.options.ignoreWhitespace && (o = o.trim()), n.push(o));
|
|
157
157
|
}
|
|
158
158
|
return n;
|
|
159
159
|
};
|
|
@@ -164,58 +164,58 @@ var Dn = new Z();
|
|
|
164
164
|
Dn.tokenize = function(e) {
|
|
165
165
|
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
166
166
|
};
|
|
167
|
-
var
|
|
168
|
-
|
|
167
|
+
var In = new Z();
|
|
168
|
+
In.tokenize = function(e) {
|
|
169
169
|
return e.split(/([{}:;,]|\s+)/);
|
|
170
170
|
};
|
|
171
|
-
function
|
|
172
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
171
|
+
function Te(e) {
|
|
172
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Te = function(n) {
|
|
173
173
|
return typeof n;
|
|
174
|
-
} :
|
|
174
|
+
} : Te = function(n) {
|
|
175
175
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
176
|
-
},
|
|
176
|
+
}, Te(e);
|
|
177
177
|
}
|
|
178
|
-
var
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
var n = this.options, t = n.undefinedReplacement, s = n.stringifyReplacer,
|
|
183
|
-
return typeof
|
|
178
|
+
var kn = Object.prototype.toString, le = new Z();
|
|
179
|
+
le.useLongestToken = !0;
|
|
180
|
+
le.tokenize = Ie.tokenize;
|
|
181
|
+
le.castInput = function(e) {
|
|
182
|
+
var n = this.options, t = n.undefinedReplacement, s = n.stringifyReplacer, o = s === void 0 ? function(l, i) {
|
|
183
|
+
return typeof i > "u" ? t : i;
|
|
184
184
|
} : s;
|
|
185
|
-
return typeof e == "string" ? e : JSON.stringify(
|
|
185
|
+
return typeof e == "string" ? e : JSON.stringify(Ce(e, null, null, o), o, " ");
|
|
186
186
|
};
|
|
187
|
-
|
|
188
|
-
return Z.prototype.equals.call(
|
|
187
|
+
le.equals = function(e, n) {
|
|
188
|
+
return Z.prototype.equals.call(le, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"));
|
|
189
189
|
};
|
|
190
|
-
function
|
|
191
|
-
n = n || [], t = t || [], s && (e = s(
|
|
190
|
+
function Ce(e, n, t, s, o) {
|
|
191
|
+
n = n || [], t = t || [], s && (e = s(o, e));
|
|
192
192
|
var l;
|
|
193
193
|
for (l = 0; l < n.length; l += 1)
|
|
194
194
|
if (n[l] === e)
|
|
195
195
|
return t[l];
|
|
196
|
-
var
|
|
197
|
-
if (
|
|
198
|
-
for (n.push(e),
|
|
199
|
-
|
|
200
|
-
return n.pop(), t.pop(),
|
|
196
|
+
var i;
|
|
197
|
+
if (kn.call(e) === "[object Array]") {
|
|
198
|
+
for (n.push(e), i = new Array(e.length), t.push(i), l = 0; l < e.length; l += 1)
|
|
199
|
+
i[l] = Ce(e[l], n, t, s, o);
|
|
200
|
+
return n.pop(), t.pop(), i;
|
|
201
201
|
}
|
|
202
|
-
if (e && e.toJSON && (e = e.toJSON()),
|
|
203
|
-
n.push(e),
|
|
204
|
-
var
|
|
202
|
+
if (e && e.toJSON && (e = e.toJSON()), Te(e) === "object" && e !== null) {
|
|
203
|
+
n.push(e), i = {}, t.push(i);
|
|
204
|
+
var r = [], a;
|
|
205
205
|
for (a in e)
|
|
206
|
-
e.hasOwnProperty(a) &&
|
|
207
|
-
for (
|
|
208
|
-
a =
|
|
206
|
+
e.hasOwnProperty(a) && r.push(a);
|
|
207
|
+
for (r.sort(), l = 0; l < r.length; l += 1)
|
|
208
|
+
a = r[l], i[a] = Ce(e[a], n, t, s, a);
|
|
209
209
|
n.pop(), t.pop();
|
|
210
210
|
} else
|
|
211
|
-
|
|
212
|
-
return
|
|
211
|
+
i = e;
|
|
212
|
+
return i;
|
|
213
213
|
}
|
|
214
|
-
var
|
|
215
|
-
|
|
214
|
+
var Le = new Z();
|
|
215
|
+
Le.tokenize = function(e) {
|
|
216
216
|
return e.slice();
|
|
217
217
|
};
|
|
218
|
-
|
|
218
|
+
Le.join = Le.removeEmpty = function(e) {
|
|
219
219
|
return e;
|
|
220
220
|
};
|
|
221
221
|
var ke = { exports: {} };
|
|
@@ -250,22 +250,22 @@ function q(e, ...n) {
|
|
|
250
250
|
for (const s in e)
|
|
251
251
|
t[s] = e[s];
|
|
252
252
|
return n.forEach(function(s) {
|
|
253
|
-
for (const
|
|
254
|
-
t[
|
|
253
|
+
for (const o in s)
|
|
254
|
+
t[o] = s[o];
|
|
255
255
|
}), /** @type {T} */
|
|
256
256
|
t;
|
|
257
257
|
}
|
|
258
|
-
const
|
|
258
|
+
const Bn = "</span>", Ze = (e) => !!e.scope || e.sublanguage && e.language, $n = (e, { prefix: n }) => {
|
|
259
259
|
if (e.includes(".")) {
|
|
260
260
|
const t = e.split(".");
|
|
261
261
|
return [
|
|
262
262
|
`${n}${t.shift()}`,
|
|
263
|
-
...t.map((s,
|
|
263
|
+
...t.map((s, o) => `${s}${"_".repeat(o + 1)}`)
|
|
264
264
|
].join(" ");
|
|
265
265
|
}
|
|
266
266
|
return `${n}${e}`;
|
|
267
267
|
};
|
|
268
|
-
class
|
|
268
|
+
class Un {
|
|
269
269
|
/**
|
|
270
270
|
* Creates a new HTMLRenderer
|
|
271
271
|
*
|
|
@@ -290,14 +290,14 @@ class $n {
|
|
|
290
290
|
if (!Ze(n))
|
|
291
291
|
return;
|
|
292
292
|
let t = "";
|
|
293
|
-
n.sublanguage ? t = `language-${n.language}` : t =
|
|
293
|
+
n.sublanguage ? t = `language-${n.language}` : t = $n(n.scope, { prefix: this.classPrefix }), this.span(t);
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* Adds a node close to the output stream (if needed)
|
|
297
297
|
*
|
|
298
298
|
* @param {Node} node */
|
|
299
299
|
closeNode(n) {
|
|
300
|
-
Ze(n) && (this.buffer +=
|
|
300
|
+
Ze(n) && (this.buffer += Bn);
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
303
303
|
* returns the accumulated buffer
|
|
@@ -371,7 +371,7 @@ class $e {
|
|
|
371
371
|
}));
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
class
|
|
374
|
+
class Pn extends $e {
|
|
375
375
|
/**
|
|
376
376
|
* @param {*} options
|
|
377
377
|
*/
|
|
@@ -400,60 +400,60 @@ class Un extends $e {
|
|
|
400
400
|
s.sublanguage = !0, s.language = t, this.add(s);
|
|
401
401
|
}
|
|
402
402
|
toHTML() {
|
|
403
|
-
return new
|
|
403
|
+
return new Un(this, this.options).value();
|
|
404
404
|
}
|
|
405
405
|
finalize() {
|
|
406
406
|
return !0;
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function ue(e) {
|
|
410
410
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
411
411
|
}
|
|
412
412
|
function rn(e) {
|
|
413
413
|
return ee("(?=", e, ")");
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Hn(e) {
|
|
416
416
|
return ee("(?:", e, ")*");
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function zn(e) {
|
|
419
419
|
return ee("(?:", e, ")?");
|
|
420
420
|
}
|
|
421
421
|
function ee(...e) {
|
|
422
|
-
return e.map((t) =>
|
|
422
|
+
return e.map((t) => ue(t)).join("");
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Fn(e) {
|
|
425
425
|
const n = e[e.length - 1];
|
|
426
426
|
return typeof n == "object" && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
|
|
427
427
|
}
|
|
428
428
|
function Ue(...e) {
|
|
429
|
-
return "(" + (
|
|
429
|
+
return "(" + (Fn(e).capture ? "" : "?:") + e.map((s) => ue(s)).join("|") + ")";
|
|
430
430
|
}
|
|
431
431
|
function an(e) {
|
|
432
432
|
return new RegExp(e.toString() + "|").exec("").length - 1;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Gn(e, n) {
|
|
435
435
|
const t = e && e.exec(n);
|
|
436
436
|
return t && t.index === 0;
|
|
437
437
|
}
|
|
438
|
-
const
|
|
438
|
+
const Kn = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
439
439
|
function Pe(e, { joinWith: n }) {
|
|
440
440
|
let t = 0;
|
|
441
441
|
return e.map((s) => {
|
|
442
442
|
t += 1;
|
|
443
|
-
const
|
|
444
|
-
let l =
|
|
443
|
+
const o = t;
|
|
444
|
+
let l = ue(s), i = "";
|
|
445
445
|
for (; l.length > 0; ) {
|
|
446
|
-
const
|
|
447
|
-
if (!
|
|
448
|
-
|
|
446
|
+
const r = Kn.exec(l);
|
|
447
|
+
if (!r) {
|
|
448
|
+
i += l;
|
|
449
449
|
break;
|
|
450
450
|
}
|
|
451
|
-
|
|
451
|
+
i += l.substring(0, r.index), l = l.substring(r.index + r[0].length), r[0][0] === "\\" && r[1] ? i += "\\" + String(Number(r[1]) + o) : (i += r[0], r[0] === "(" && t++);
|
|
452
452
|
}
|
|
453
|
-
return
|
|
453
|
+
return i;
|
|
454
454
|
}).map((s) => `(${s})`).join(n);
|
|
455
455
|
}
|
|
456
|
-
const
|
|
456
|
+
const Wn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\\d+)?", ln = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", un = "\\b(0b[01]+)", Vn = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Yn = (e = {}) => {
|
|
457
457
|
const n = /^#![ ]*\//;
|
|
458
458
|
return e.binary && (e.begin = ee(
|
|
459
459
|
n,
|
|
@@ -470,24 +470,24 @@ const Kn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
470
470
|
t.index !== 0 && s.ignoreMatch();
|
|
471
471
|
}
|
|
472
472
|
}, e);
|
|
473
|
-
},
|
|
473
|
+
}, fe = {
|
|
474
474
|
begin: "\\\\[\\s\\S]",
|
|
475
475
|
relevance: 0
|
|
476
|
-
},
|
|
476
|
+
}, Zn = {
|
|
477
477
|
scope: "string",
|
|
478
478
|
begin: "'",
|
|
479
479
|
end: "'",
|
|
480
480
|
illegal: "\\n",
|
|
481
|
-
contains: [
|
|
482
|
-
},
|
|
481
|
+
contains: [fe]
|
|
482
|
+
}, Qn = {
|
|
483
483
|
scope: "string",
|
|
484
484
|
begin: '"',
|
|
485
485
|
end: '"',
|
|
486
486
|
illegal: "\\n",
|
|
487
|
-
contains: [
|
|
488
|
-
},
|
|
487
|
+
contains: [fe]
|
|
488
|
+
}, Xn = {
|
|
489
489
|
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/
|
|
490
|
-
},
|
|
490
|
+
}, Se = function(e, n, t = {}) {
|
|
491
491
|
const s = q(
|
|
492
492
|
{
|
|
493
493
|
scope: "comment",
|
|
@@ -506,7 +506,7 @@ const Kn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
506
506
|
excludeBegin: !0,
|
|
507
507
|
relevance: 0
|
|
508
508
|
});
|
|
509
|
-
const
|
|
509
|
+
const o = Ue(
|
|
510
510
|
// list of common 1 and 2 letter words in English
|
|
511
511
|
"I",
|
|
512
512
|
"a",
|
|
@@ -546,26 +546,26 @@ const Kn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
546
546
|
/[ ]+/,
|
|
547
547
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
548
548
|
"(",
|
|
549
|
-
|
|
549
|
+
o,
|
|
550
550
|
/[.]?[:]?([.][ ]|[ ])/,
|
|
551
551
|
"){3}"
|
|
552
552
|
)
|
|
553
553
|
// look for 3 words in a row
|
|
554
554
|
}
|
|
555
555
|
), s;
|
|
556
|
-
},
|
|
556
|
+
}, qn = Se("//", "$"), jn = Se("/\\*", "\\*/"), Jn = Se("#", "$"), et = {
|
|
557
557
|
scope: "number",
|
|
558
558
|
begin: cn,
|
|
559
559
|
relevance: 0
|
|
560
|
-
},
|
|
560
|
+
}, nt = {
|
|
561
561
|
scope: "number",
|
|
562
562
|
begin: ln,
|
|
563
563
|
relevance: 0
|
|
564
|
-
},
|
|
564
|
+
}, tt = {
|
|
565
565
|
scope: "number",
|
|
566
566
|
begin: un,
|
|
567
567
|
relevance: 0
|
|
568
|
-
},
|
|
568
|
+
}, st = {
|
|
569
569
|
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
|
570
570
|
// an expression such as:
|
|
571
571
|
//
|
|
@@ -579,16 +579,16 @@ const Kn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
579
579
|
end: /\/[gimuy]*/,
|
|
580
580
|
illegal: /\n/,
|
|
581
581
|
contains: [
|
|
582
|
-
|
|
582
|
+
fe,
|
|
583
583
|
{
|
|
584
584
|
begin: /\[/,
|
|
585
585
|
end: /\]/,
|
|
586
586
|
relevance: 0,
|
|
587
|
-
contains: [
|
|
587
|
+
contains: [fe]
|
|
588
588
|
}
|
|
589
589
|
]
|
|
590
590
|
}]
|
|
591
|
-
},
|
|
591
|
+
}, it = {
|
|
592
592
|
scope: "title",
|
|
593
593
|
begin: on,
|
|
594
594
|
relevance: 0
|
|
@@ -596,11 +596,11 @@ const Kn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
596
596
|
scope: "title",
|
|
597
597
|
begin: He,
|
|
598
598
|
relevance: 0
|
|
599
|
-
},
|
|
599
|
+
}, at = {
|
|
600
600
|
// excludes method names from keyword processing
|
|
601
601
|
begin: "\\.\\s*" + He,
|
|
602
602
|
relevance: 0
|
|
603
|
-
},
|
|
603
|
+
}, ot = function(e) {
|
|
604
604
|
return Object.assign(
|
|
605
605
|
e,
|
|
606
606
|
{
|
|
@@ -615,56 +615,56 @@ const Kn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\
|
|
|
615
615
|
}
|
|
616
616
|
);
|
|
617
617
|
};
|
|
618
|
-
var
|
|
618
|
+
var ye = /* @__PURE__ */ Object.freeze({
|
|
619
619
|
__proto__: null,
|
|
620
|
-
MATCH_NOTHING_RE:
|
|
620
|
+
MATCH_NOTHING_RE: Wn,
|
|
621
621
|
IDENT_RE: on,
|
|
622
622
|
UNDERSCORE_IDENT_RE: He,
|
|
623
623
|
NUMBER_RE: cn,
|
|
624
624
|
C_NUMBER_RE: ln,
|
|
625
625
|
BINARY_NUMBER_RE: un,
|
|
626
|
-
RE_STARTERS_RE:
|
|
627
|
-
SHEBANG:
|
|
628
|
-
BACKSLASH_ESCAPE:
|
|
629
|
-
APOS_STRING_MODE:
|
|
630
|
-
QUOTE_STRING_MODE:
|
|
631
|
-
PHRASAL_WORDS_MODE:
|
|
632
|
-
COMMENT:
|
|
633
|
-
C_LINE_COMMENT_MODE:
|
|
634
|
-
C_BLOCK_COMMENT_MODE:
|
|
635
|
-
HASH_COMMENT_MODE:
|
|
636
|
-
NUMBER_MODE:
|
|
637
|
-
C_NUMBER_MODE:
|
|
638
|
-
BINARY_NUMBER_MODE:
|
|
639
|
-
REGEXP_MODE:
|
|
640
|
-
TITLE_MODE:
|
|
626
|
+
RE_STARTERS_RE: Vn,
|
|
627
|
+
SHEBANG: Yn,
|
|
628
|
+
BACKSLASH_ESCAPE: fe,
|
|
629
|
+
APOS_STRING_MODE: Zn,
|
|
630
|
+
QUOTE_STRING_MODE: Qn,
|
|
631
|
+
PHRASAL_WORDS_MODE: Xn,
|
|
632
|
+
COMMENT: Se,
|
|
633
|
+
C_LINE_COMMENT_MODE: qn,
|
|
634
|
+
C_BLOCK_COMMENT_MODE: jn,
|
|
635
|
+
HASH_COMMENT_MODE: Jn,
|
|
636
|
+
NUMBER_MODE: et,
|
|
637
|
+
C_NUMBER_MODE: nt,
|
|
638
|
+
BINARY_NUMBER_MODE: tt,
|
|
639
|
+
REGEXP_MODE: st,
|
|
640
|
+
TITLE_MODE: it,
|
|
641
641
|
UNDERSCORE_TITLE_MODE: rt,
|
|
642
|
-
METHOD_GUARD:
|
|
643
|
-
END_SAME_AS_BEGIN:
|
|
642
|
+
METHOD_GUARD: at,
|
|
643
|
+
END_SAME_AS_BEGIN: ot
|
|
644
644
|
});
|
|
645
|
-
function ot(e, n) {
|
|
646
|
-
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
647
|
-
}
|
|
648
645
|
function ct(e, n) {
|
|
649
|
-
e.
|
|
646
|
+
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
650
647
|
}
|
|
651
648
|
function lt(e, n) {
|
|
652
|
-
|
|
649
|
+
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
653
650
|
}
|
|
654
651
|
function ut(e, n) {
|
|
655
|
-
|
|
652
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = ct, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
656
653
|
}
|
|
657
654
|
function ft(e, n) {
|
|
655
|
+
Array.isArray(e.illegal) && (e.illegal = Ue(...e.illegal));
|
|
656
|
+
}
|
|
657
|
+
function dt(e, n) {
|
|
658
658
|
if (e.match) {
|
|
659
659
|
if (e.begin || e.end)
|
|
660
660
|
throw new Error("begin & end are not supported with match");
|
|
661
661
|
e.begin = e.match, delete e.match;
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function gt(e, n) {
|
|
665
665
|
e.relevance === void 0 && (e.relevance = 1);
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const pt = (e, n) => {
|
|
668
668
|
if (!e.beforeMatch)
|
|
669
669
|
return;
|
|
670
670
|
if (e.starts)
|
|
@@ -678,7 +678,7 @@ const gt = (e, n) => {
|
|
|
678
678
|
Object.assign(t, { endsParent: !0 })
|
|
679
679
|
]
|
|
680
680
|
}, e.relevance = 0, delete t.beforeMatch;
|
|
681
|
-
},
|
|
681
|
+
}, _t = [
|
|
682
682
|
"of",
|
|
683
683
|
"and",
|
|
684
684
|
"for",
|
|
@@ -693,71 +693,71 @@ const gt = (e, n) => {
|
|
|
693
693
|
// common variable name
|
|
694
694
|
"value"
|
|
695
695
|
// common variable name
|
|
696
|
-
],
|
|
697
|
-
function fn(e, n, t =
|
|
696
|
+
], ht = "keyword";
|
|
697
|
+
function fn(e, n, t = ht) {
|
|
698
698
|
const s = /* @__PURE__ */ Object.create(null);
|
|
699
|
-
return typeof e == "string" ?
|
|
699
|
+
return typeof e == "string" ? o(t, e.split(" ")) : Array.isArray(e) ? o(t, e) : Object.keys(e).forEach(function(l) {
|
|
700
700
|
Object.assign(
|
|
701
701
|
s,
|
|
702
702
|
fn(e[l], n, l)
|
|
703
703
|
);
|
|
704
704
|
}), s;
|
|
705
|
-
function
|
|
706
|
-
n && (
|
|
707
|
-
const a =
|
|
705
|
+
function o(l, i) {
|
|
706
|
+
n && (i = i.map((r) => r.toLowerCase())), i.forEach(function(r) {
|
|
707
|
+
const a = r.split("|");
|
|
708
708
|
s[a[0]] = [l, bt(a[0], a[1])];
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
function bt(e, n) {
|
|
713
|
-
return n ? Number(n) :
|
|
713
|
+
return n ? Number(n) : Et(e) ? 0 : 1;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
return
|
|
715
|
+
function Et(e) {
|
|
716
|
+
return _t.includes(e.toLowerCase());
|
|
717
717
|
}
|
|
718
718
|
const Xe = {}, J = (e) => {
|
|
719
719
|
console.error(e);
|
|
720
720
|
}, qe = (e, ...n) => {
|
|
721
721
|
console.log(`WARN: ${e}`, ...n);
|
|
722
|
-
},
|
|
722
|
+
}, ie = (e, n) => {
|
|
723
723
|
Xe[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), Xe[`${e}/${n}`] = !0);
|
|
724
|
-
},
|
|
724
|
+
}, Ae = new Error();
|
|
725
725
|
function dn(e, n, { key: t }) {
|
|
726
726
|
let s = 0;
|
|
727
|
-
const
|
|
728
|
-
for (let
|
|
729
|
-
r
|
|
730
|
-
e[t] =
|
|
727
|
+
const o = e[t], l = {}, i = {};
|
|
728
|
+
for (let r = 1; r <= n.length; r++)
|
|
729
|
+
i[r + s] = o[r], l[r + s] = !0, s += an(n[r - 1]);
|
|
730
|
+
e[t] = i, e[t]._emit = l, e[t]._multi = !0;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function mt(e) {
|
|
733
733
|
if (Array.isArray(e.begin)) {
|
|
734
734
|
if (e.skip || e.excludeBegin || e.returnBegin)
|
|
735
|
-
throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
|
|
735
|
+
throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Ae;
|
|
736
736
|
if (typeof e.beginScope != "object" || e.beginScope === null)
|
|
737
|
-
throw J("beginScope must be object"),
|
|
737
|
+
throw J("beginScope must be object"), Ae;
|
|
738
738
|
dn(e, e.begin, { key: "beginScope" }), e.begin = Pe(e.begin, { joinWith: "" });
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function yt(e) {
|
|
742
742
|
if (Array.isArray(e.end)) {
|
|
743
743
|
if (e.skip || e.excludeEnd || e.returnEnd)
|
|
744
|
-
throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
|
|
744
|
+
throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Ae;
|
|
745
745
|
if (typeof e.endScope != "object" || e.endScope === null)
|
|
746
|
-
throw J("endScope must be object"),
|
|
746
|
+
throw J("endScope must be object"), Ae;
|
|
747
747
|
dn(e, e.end, { key: "endScope" }), e.end = Pe(e.end, { joinWith: "" });
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
function yt(e) {
|
|
751
|
-
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
752
|
-
}
|
|
753
750
|
function vt(e) {
|
|
754
|
-
|
|
751
|
+
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
755
752
|
}
|
|
756
753
|
function Nt(e) {
|
|
757
|
-
|
|
754
|
+
vt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), mt(e), yt(e);
|
|
755
|
+
}
|
|
756
|
+
function Tt(e) {
|
|
757
|
+
function n(i, r) {
|
|
758
758
|
return new RegExp(
|
|
759
|
-
|
|
760
|
-
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (
|
|
759
|
+
ue(i),
|
|
760
|
+
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : "")
|
|
761
761
|
);
|
|
762
762
|
}
|
|
763
763
|
class t {
|
|
@@ -765,22 +765,22 @@ function Nt(e) {
|
|
|
765
765
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
766
766
|
}
|
|
767
767
|
// @ts-ignore
|
|
768
|
-
addRule(
|
|
769
|
-
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a,
|
|
768
|
+
addRule(r, a) {
|
|
769
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, r]), this.matchAt += an(r) + 1;
|
|
770
770
|
}
|
|
771
771
|
compile() {
|
|
772
772
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
773
|
-
const
|
|
774
|
-
this.matcherRe = n(Pe(
|
|
773
|
+
const r = this.regexes.map((a) => a[1]);
|
|
774
|
+
this.matcherRe = n(Pe(r, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
775
775
|
}
|
|
776
776
|
/** @param {string} s */
|
|
777
|
-
exec(
|
|
777
|
+
exec(r) {
|
|
778
778
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
779
|
-
const a = this.matcherRe.exec(
|
|
779
|
+
const a = this.matcherRe.exec(r);
|
|
780
780
|
if (!a)
|
|
781
781
|
return null;
|
|
782
|
-
const
|
|
783
|
-
return a.splice(0,
|
|
782
|
+
const c = a.findIndex((d, b) => b > 0 && d !== void 0), p = this.matchIndexes[c];
|
|
783
|
+
return a.splice(0, c), Object.assign(a, p);
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
class s {
|
|
@@ -788,11 +788,11 @@ function Nt(e) {
|
|
|
788
788
|
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
789
789
|
}
|
|
790
790
|
// @ts-ignore
|
|
791
|
-
getMatcher(
|
|
792
|
-
if (this.multiRegexes[
|
|
793
|
-
return this.multiRegexes[
|
|
791
|
+
getMatcher(r) {
|
|
792
|
+
if (this.multiRegexes[r])
|
|
793
|
+
return this.multiRegexes[r];
|
|
794
794
|
const a = new t();
|
|
795
|
-
return this.rules.slice(
|
|
795
|
+
return this.rules.slice(r).forEach(([c, p]) => a.addRule(c, p)), a.compile(), this.multiRegexes[r] = a, a;
|
|
796
796
|
}
|
|
797
797
|
resumingScanAtSamePosition() {
|
|
798
798
|
return this.regexIndex !== 0;
|
|
@@ -801,60 +801,60 @@ function Nt(e) {
|
|
|
801
801
|
this.regexIndex = 0;
|
|
802
802
|
}
|
|
803
803
|
// @ts-ignore
|
|
804
|
-
addRule(
|
|
805
|
-
this.rules.push([
|
|
804
|
+
addRule(r, a) {
|
|
805
|
+
this.rules.push([r, a]), a.type === "begin" && this.count++;
|
|
806
806
|
}
|
|
807
807
|
/** @param {string} s */
|
|
808
|
-
exec(
|
|
808
|
+
exec(r) {
|
|
809
809
|
const a = this.getMatcher(this.regexIndex);
|
|
810
810
|
a.lastIndex = this.lastIndex;
|
|
811
|
-
let
|
|
812
|
-
if (this.resumingScanAtSamePosition() && !(
|
|
811
|
+
let c = a.exec(r);
|
|
812
|
+
if (this.resumingScanAtSamePosition() && !(c && c.index === this.lastIndex)) {
|
|
813
813
|
const p = this.getMatcher(0);
|
|
814
|
-
p.lastIndex = this.lastIndex + 1,
|
|
814
|
+
p.lastIndex = this.lastIndex + 1, c = p.exec(r);
|
|
815
815
|
}
|
|
816
|
-
return
|
|
816
|
+
return c && (this.regexIndex += c.position + 1, this.regexIndex === this.count && this.considerAll()), c;
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
function
|
|
820
|
-
const
|
|
821
|
-
return
|
|
819
|
+
function o(i) {
|
|
820
|
+
const r = new s();
|
|
821
|
+
return i.contains.forEach((a) => r.addRule(a.begin, { rule: a, type: "begin" })), i.terminatorEnd && r.addRule(i.terminatorEnd, { type: "end" }), i.illegal && r.addRule(i.illegal, { type: "illegal" }), r;
|
|
822
822
|
}
|
|
823
|
-
function l(
|
|
823
|
+
function l(i, r) {
|
|
824
824
|
const a = (
|
|
825
825
|
/** @type CompiledMode */
|
|
826
|
-
|
|
826
|
+
i
|
|
827
827
|
);
|
|
828
|
-
if (
|
|
828
|
+
if (i.isCompiled)
|
|
829
829
|
return a;
|
|
830
830
|
[
|
|
831
|
-
|
|
831
|
+
lt,
|
|
832
832
|
// do this early so compiler extensions generally don't have to worry about
|
|
833
833
|
// the distinction between match/begin
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
].forEach((p) => p(
|
|
838
|
-
|
|
834
|
+
dt,
|
|
835
|
+
Nt,
|
|
836
|
+
pt
|
|
837
|
+
].forEach((p) => p(i, r)), e.compilerExtensions.forEach((p) => p(i, r)), i.__beforeBegin = null, [
|
|
838
|
+
ut,
|
|
839
839
|
// do this later so compiler extensions that come earlier have access to the
|
|
840
840
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
841
|
-
|
|
841
|
+
ft,
|
|
842
842
|
// default to 1 relevance if not specified
|
|
843
|
-
|
|
844
|
-
].forEach((p) => p(
|
|
845
|
-
let
|
|
846
|
-
return typeof
|
|
843
|
+
gt
|
|
844
|
+
].forEach((p) => p(i, r)), i.isCompiled = !0;
|
|
845
|
+
let c = null;
|
|
846
|
+
return typeof i.keywords == "object" && i.keywords.$pattern && (i.keywords = Object.assign({}, i.keywords), c = i.keywords.$pattern, delete i.keywords.$pattern), c = c || /\w+/, i.keywords && (i.keywords = fn(i.keywords, e.case_insensitive)), a.keywordPatternRe = n(c, !0), r && (i.begin || (i.begin = /\B|\b/), a.beginRe = n(a.begin), !i.end && !i.endsWithParent && (i.end = /\B|\b/), i.end && (a.endRe = n(a.end)), a.terminatorEnd = ue(a.end) || "", i.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (i.end ? "|" : "") + r.terminatorEnd)), i.illegal && (a.illegalRe = n(
|
|
847
847
|
/** @type {RegExp | string} */
|
|
848
|
-
|
|
849
|
-
)),
|
|
850
|
-
return
|
|
851
|
-
})),
|
|
848
|
+
i.illegal
|
|
849
|
+
)), i.contains || (i.contains = []), i.contains = [].concat(...i.contains.map(function(p) {
|
|
850
|
+
return At(p === "self" ? i : p);
|
|
851
|
+
})), i.contains.forEach(function(p) {
|
|
852
852
|
l(
|
|
853
853
|
/** @type Mode */
|
|
854
854
|
p,
|
|
855
855
|
a
|
|
856
856
|
);
|
|
857
|
-
}),
|
|
857
|
+
}), i.starts && l(i.starts, r), a.matcher = o(a), a;
|
|
858
858
|
}
|
|
859
859
|
if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
|
|
860
860
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -866,22 +866,22 @@ function Nt(e) {
|
|
|
866
866
|
function gn(e) {
|
|
867
867
|
return e ? e.endsWithParent || gn(e.starts) : !1;
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function At(e) {
|
|
870
870
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
871
871
|
return q(e, { variants: null }, n);
|
|
872
872
|
})), e.cachedVariants ? e.cachedVariants : gn(e) ? q(e, { starts: e.starts ? q(e.starts) : null }) : Object.isFrozen(e) ? q(e) : e;
|
|
873
873
|
}
|
|
874
|
-
var
|
|
875
|
-
class
|
|
874
|
+
var wt = "11.7.0";
|
|
875
|
+
class St extends Error {
|
|
876
876
|
constructor(n, t) {
|
|
877
877
|
super(n), this.name = "HTMLInjectionError", this.html = t;
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
const xe = sn, je = q, Je = Symbol("nomatch"),
|
|
880
|
+
const xe = sn, je = q, Je = Symbol("nomatch"), Rt = 7, Mt = function(e) {
|
|
881
881
|
const n = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null), s = [];
|
|
882
|
-
let
|
|
883
|
-
const l = "Could not find the language '{}', did you forget to load/include a language module?",
|
|
884
|
-
let
|
|
882
|
+
let o = !0;
|
|
883
|
+
const l = "Could not find the language '{}', did you forget to load/include a language module?", i = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
884
|
+
let r = {
|
|
885
885
|
ignoreUnescapedHTML: !1,
|
|
886
886
|
throwUnescapedHTML: !1,
|
|
887
887
|
noHighlightRe: /^(no-?highlight)$/i,
|
|
@@ -891,270 +891,270 @@ const xe = sn, je = q, Je = Symbol("nomatch"), St = 7, Rt = function(e) {
|
|
|
891
891
|
languages: null,
|
|
892
892
|
// beta configuration options, subject to change, welcome to discuss
|
|
893
893
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
894
|
-
__emitter:
|
|
894
|
+
__emitter: Pn
|
|
895
895
|
};
|
|
896
896
|
function a(u) {
|
|
897
|
-
return
|
|
897
|
+
return r.noHighlightRe.test(u);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
let
|
|
901
|
-
|
|
902
|
-
const T =
|
|
899
|
+
function c(u) {
|
|
900
|
+
let _ = u.className + " ";
|
|
901
|
+
_ += u.parentNode ? u.parentNode.className : "";
|
|
902
|
+
const T = r.languageDetectRe.exec(_);
|
|
903
903
|
if (T) {
|
|
904
|
-
const
|
|
905
|
-
return
|
|
904
|
+
const O = B(T[1]);
|
|
905
|
+
return O || (qe(l.replace("{}", T[1])), qe("Falling back to no-highlight mode for this block.", u)), O ? T[1] : "no-highlight";
|
|
906
906
|
}
|
|
907
|
-
return
|
|
907
|
+
return _.split(/\s+/).find((O) => a(O) || B(O));
|
|
908
908
|
}
|
|
909
|
-
function p(u,
|
|
910
|
-
let
|
|
911
|
-
typeof
|
|
912
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), I = u,
|
|
913
|
-
const
|
|
914
|
-
code:
|
|
909
|
+
function p(u, _, T) {
|
|
910
|
+
let O = "", I = "";
|
|
911
|
+
typeof _ == "object" ? (O = u, T = _.ignoreIllegals, I = _.language) : (ie("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ie("10.7.0", `Please use highlight(code, options) instead.
|
|
912
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), I = u, O = _), T === void 0 && (T = !0);
|
|
913
|
+
const P = {
|
|
914
|
+
code: O,
|
|
915
915
|
language: I
|
|
916
916
|
};
|
|
917
|
-
se("before:highlight",
|
|
918
|
-
const K =
|
|
919
|
-
return K.code =
|
|
917
|
+
se("before:highlight", P);
|
|
918
|
+
const K = P.result ? P.result : d(P.language, P.code, T);
|
|
919
|
+
return K.code = P.code, se("after:highlight", K), K;
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function d(u, _, T, O) {
|
|
922
922
|
const I = /* @__PURE__ */ Object.create(null);
|
|
923
|
-
function
|
|
924
|
-
return
|
|
923
|
+
function P(f, h) {
|
|
924
|
+
return f.keywords[h];
|
|
925
925
|
}
|
|
926
926
|
function K() {
|
|
927
|
-
if (!
|
|
928
|
-
|
|
927
|
+
if (!N.keywords) {
|
|
928
|
+
$.addText(D);
|
|
929
929
|
return;
|
|
930
930
|
}
|
|
931
|
-
let
|
|
932
|
-
|
|
933
|
-
let
|
|
934
|
-
for (;
|
|
935
|
-
w +=
|
|
936
|
-
const
|
|
937
|
-
if (
|
|
938
|
-
const [W,
|
|
939
|
-
if (
|
|
940
|
-
w +=
|
|
931
|
+
let f = 0;
|
|
932
|
+
N.keywordPatternRe.lastIndex = 0;
|
|
933
|
+
let h = N.keywordPatternRe.exec(D), w = "";
|
|
934
|
+
for (; h; ) {
|
|
935
|
+
w += D.substring(f, h.index);
|
|
936
|
+
const C = X.case_insensitive ? h[0].toLowerCase() : h[0], U = P(N, C);
|
|
937
|
+
if (U) {
|
|
938
|
+
const [W, An] = U;
|
|
939
|
+
if ($.addText(w), w = "", I[C] = (I[C] || 0) + 1, I[C] <= Rt && (Ee += An), W.startsWith("_"))
|
|
940
|
+
w += h[0];
|
|
941
941
|
else {
|
|
942
|
-
const
|
|
943
|
-
|
|
942
|
+
const wn = X.classNameAliases[W] || W;
|
|
943
|
+
$.addKeyword(h[0], wn);
|
|
944
944
|
}
|
|
945
945
|
} else
|
|
946
|
-
w +=
|
|
947
|
-
|
|
946
|
+
w += h[0];
|
|
947
|
+
f = N.keywordPatternRe.lastIndex, h = N.keywordPatternRe.exec(D);
|
|
948
948
|
}
|
|
949
|
-
w +=
|
|
949
|
+
w += D.substring(f), $.addText(w);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
952
|
-
if (
|
|
951
|
+
function he() {
|
|
952
|
+
if (D === "")
|
|
953
953
|
return;
|
|
954
|
-
let
|
|
955
|
-
if (typeof
|
|
956
|
-
if (!n[
|
|
957
|
-
|
|
954
|
+
let f = null;
|
|
955
|
+
if (typeof N.subLanguage == "string") {
|
|
956
|
+
if (!n[N.subLanguage]) {
|
|
957
|
+
$.addText(D);
|
|
958
958
|
return;
|
|
959
959
|
}
|
|
960
|
-
|
|
961
|
-
|
|
960
|
+
f = d(N.subLanguage, D, !0, Ke[N.subLanguage]), Ke[N.subLanguage] = /** @type {CompiledMode} */
|
|
961
|
+
f._top;
|
|
962
962
|
} else
|
|
963
|
-
|
|
964
|
-
|
|
963
|
+
f = E(D, N.subLanguage.length ? N.subLanguage : null);
|
|
964
|
+
N.relevance > 0 && (Ee += f.relevance), $.addSublanguage(f._emitter, f.language);
|
|
965
965
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
966
|
+
function H() {
|
|
967
|
+
N.subLanguage != null ? he() : K(), D = "";
|
|
968
968
|
}
|
|
969
|
-
function Q(
|
|
969
|
+
function Q(f, h) {
|
|
970
970
|
let w = 1;
|
|
971
|
-
const
|
|
972
|
-
for (; w <=
|
|
973
|
-
if (!
|
|
971
|
+
const C = h.length - 1;
|
|
972
|
+
for (; w <= C; ) {
|
|
973
|
+
if (!f._emit[w]) {
|
|
974
974
|
w++;
|
|
975
975
|
continue;
|
|
976
976
|
}
|
|
977
|
-
const
|
|
978
|
-
|
|
977
|
+
const U = X.classNameAliases[f[w]] || f[w], W = h[w];
|
|
978
|
+
U ? $.addKeyword(W, U) : (D = W, K(), D = ""), w++;
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
|
-
function ze(
|
|
982
|
-
return
|
|
981
|
+
function ze(f, h) {
|
|
982
|
+
return f.scope && typeof f.scope == "string" && $.openNode(X.classNameAliases[f.scope] || f.scope), f.beginScope && (f.beginScope._wrap ? ($.addKeyword(D, X.classNameAliases[f.beginScope._wrap] || f.beginScope._wrap), D = "") : f.beginScope._multi && (Q(f.beginScope, h), D = "")), N = Object.create(f, { parent: { value: N } }), N;
|
|
983
983
|
}
|
|
984
|
-
function Fe(
|
|
985
|
-
let
|
|
986
|
-
if (
|
|
987
|
-
if (
|
|
988
|
-
const
|
|
989
|
-
|
|
984
|
+
function Fe(f, h, w) {
|
|
985
|
+
let C = Gn(f.endRe, w);
|
|
986
|
+
if (C) {
|
|
987
|
+
if (f["on:end"]) {
|
|
988
|
+
const U = new Ye(f);
|
|
989
|
+
f["on:end"](h, U), U.isMatchIgnored && (C = !1);
|
|
990
990
|
}
|
|
991
|
-
if (
|
|
992
|
-
for (;
|
|
993
|
-
|
|
994
|
-
return
|
|
991
|
+
if (C) {
|
|
992
|
+
for (; f.endsParent && f.parent; )
|
|
993
|
+
f = f.parent;
|
|
994
|
+
return f;
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
|
-
if (
|
|
998
|
-
return Fe(
|
|
997
|
+
if (f.endsWithParent)
|
|
998
|
+
return Fe(f.parent, h, w);
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1001
|
-
return
|
|
1000
|
+
function mn(f) {
|
|
1001
|
+
return N.matcher.regexIndex === 0 ? (D += f[0], 1) : (Oe = !0, 0);
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1004
|
-
const
|
|
1005
|
-
for (const W of
|
|
1006
|
-
if (W && (W(
|
|
1007
|
-
return
|
|
1008
|
-
return w.skip ?
|
|
1003
|
+
function yn(f) {
|
|
1004
|
+
const h = f[0], w = f.rule, C = new Ye(w), U = [w.__beforeBegin, w["on:begin"]];
|
|
1005
|
+
for (const W of U)
|
|
1006
|
+
if (W && (W(f, C), C.isMatchIgnored))
|
|
1007
|
+
return mn(h);
|
|
1008
|
+
return w.skip ? D += h : (w.excludeBegin && (D += h), H(), !w.returnBegin && !w.excludeBegin && (D = h)), ze(w, f), w.returnBegin ? 0 : h.length;
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1011
|
-
const
|
|
1012
|
-
if (!
|
|
1010
|
+
function vn(f) {
|
|
1011
|
+
const h = f[0], w = _.substring(f.index), C = Fe(N, f, w);
|
|
1012
|
+
if (!C)
|
|
1013
1013
|
return Je;
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1014
|
+
const U = N;
|
|
1015
|
+
N.endScope && N.endScope._wrap ? (H(), $.addKeyword(h, N.endScope._wrap)) : N.endScope && N.endScope._multi ? (H(), Q(N.endScope, f)) : U.skip ? D += h : (U.returnEnd || U.excludeEnd || (D += h), H(), U.excludeEnd && (D = h));
|
|
1016
1016
|
do
|
|
1017
|
-
|
|
1018
|
-
while (
|
|
1019
|
-
return
|
|
1017
|
+
N.scope && $.closeNode(), !N.skip && !N.subLanguage && (Ee += N.relevance), N = N.parent;
|
|
1018
|
+
while (N !== C.parent);
|
|
1019
|
+
return C.starts && ze(C.starts, f), U.returnEnd ? 0 : h.length;
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1022
|
-
const
|
|
1023
|
-
for (let
|
|
1024
|
-
|
|
1025
|
-
|
|
1021
|
+
function Nn() {
|
|
1022
|
+
const f = [];
|
|
1023
|
+
for (let h = N; h !== X; h = h.parent)
|
|
1024
|
+
h.scope && f.unshift(h.scope);
|
|
1025
|
+
f.forEach((h) => $.openNode(h));
|
|
1026
1026
|
}
|
|
1027
1027
|
let be = {};
|
|
1028
|
-
function Ge(
|
|
1029
|
-
const w =
|
|
1030
|
-
if (
|
|
1031
|
-
return
|
|
1032
|
-
if (be.type === "begin" &&
|
|
1033
|
-
if (
|
|
1034
|
-
const
|
|
1035
|
-
throw
|
|
1028
|
+
function Ge(f, h) {
|
|
1029
|
+
const w = h && h[0];
|
|
1030
|
+
if (D += f, w == null)
|
|
1031
|
+
return H(), 0;
|
|
1032
|
+
if (be.type === "begin" && h.type === "end" && be.index === h.index && w === "") {
|
|
1033
|
+
if (D += _.slice(h.index, h.index + 1), !o) {
|
|
1034
|
+
const C = new Error(`0 width match regex (${u})`);
|
|
1035
|
+
throw C.languageName = u, C.badRule = be.rule, C;
|
|
1036
1036
|
}
|
|
1037
1037
|
return 1;
|
|
1038
1038
|
}
|
|
1039
|
-
if (be =
|
|
1040
|
-
return
|
|
1041
|
-
if (
|
|
1042
|
-
const
|
|
1043
|
-
throw
|
|
1044
|
-
} else if (
|
|
1045
|
-
const
|
|
1046
|
-
if (
|
|
1047
|
-
return
|
|
1039
|
+
if (be = h, h.type === "begin")
|
|
1040
|
+
return yn(h);
|
|
1041
|
+
if (h.type === "illegal" && !T) {
|
|
1042
|
+
const C = new Error('Illegal lexeme "' + w + '" for mode "' + (N.scope || "<unnamed>") + '"');
|
|
1043
|
+
throw C.mode = N, C;
|
|
1044
|
+
} else if (h.type === "end") {
|
|
1045
|
+
const C = vn(h);
|
|
1046
|
+
if (C !== Je)
|
|
1047
|
+
return C;
|
|
1048
1048
|
}
|
|
1049
|
-
if (
|
|
1049
|
+
if (h.type === "illegal" && w === "")
|
|
1050
1050
|
return 1;
|
|
1051
|
-
if (Me > 1e5 && Me >
|
|
1051
|
+
if (Me > 1e5 && Me > h.index * 3)
|
|
1052
1052
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1053
|
-
return
|
|
1053
|
+
return D += w, w.length;
|
|
1054
1054
|
}
|
|
1055
|
-
const X =
|
|
1055
|
+
const X = B(u);
|
|
1056
1056
|
if (!X)
|
|
1057
1057
|
throw J(l.replace("{}", u)), new Error('Unknown language: "' + u + '"');
|
|
1058
|
-
const
|
|
1059
|
-
let Re = "",
|
|
1060
|
-
const Ke = {},
|
|
1061
|
-
|
|
1062
|
-
let
|
|
1058
|
+
const Tn = Tt(X);
|
|
1059
|
+
let Re = "", N = O || Tn;
|
|
1060
|
+
const Ke = {}, $ = new r.__emitter(r);
|
|
1061
|
+
Nn();
|
|
1062
|
+
let D = "", Ee = 0, j = 0, Me = 0, Oe = !1;
|
|
1063
1063
|
try {
|
|
1064
|
-
for (
|
|
1065
|
-
Me++, Oe ? Oe = !1 :
|
|
1066
|
-
const
|
|
1067
|
-
if (!
|
|
1064
|
+
for (N.matcher.considerAll(); ; ) {
|
|
1065
|
+
Me++, Oe ? Oe = !1 : N.matcher.considerAll(), N.matcher.lastIndex = j;
|
|
1066
|
+
const f = N.matcher.exec(_);
|
|
1067
|
+
if (!f)
|
|
1068
1068
|
break;
|
|
1069
|
-
const
|
|
1070
|
-
j =
|
|
1069
|
+
const h = _.substring(j, f.index), w = Ge(h, f);
|
|
1070
|
+
j = f.index + w;
|
|
1071
1071
|
}
|
|
1072
|
-
return Ge(
|
|
1072
|
+
return Ge(_.substring(j)), $.closeAllNodes(), $.finalize(), Re = $.toHTML(), {
|
|
1073
1073
|
language: u,
|
|
1074
1074
|
value: Re,
|
|
1075
|
-
relevance:
|
|
1075
|
+
relevance: Ee,
|
|
1076
1076
|
illegal: !1,
|
|
1077
|
-
_emitter:
|
|
1078
|
-
_top:
|
|
1077
|
+
_emitter: $,
|
|
1078
|
+
_top: N
|
|
1079
1079
|
};
|
|
1080
|
-
} catch (
|
|
1081
|
-
if (
|
|
1080
|
+
} catch (f) {
|
|
1081
|
+
if (f.message && f.message.includes("Illegal"))
|
|
1082
1082
|
return {
|
|
1083
1083
|
language: u,
|
|
1084
|
-
value: xe(
|
|
1084
|
+
value: xe(_),
|
|
1085
1085
|
illegal: !0,
|
|
1086
1086
|
relevance: 0,
|
|
1087
1087
|
_illegalBy: {
|
|
1088
|
-
message:
|
|
1088
|
+
message: f.message,
|
|
1089
1089
|
index: j,
|
|
1090
|
-
context:
|
|
1091
|
-
mode:
|
|
1090
|
+
context: _.slice(j - 100, j + 100),
|
|
1091
|
+
mode: f.mode,
|
|
1092
1092
|
resultSoFar: Re
|
|
1093
1093
|
},
|
|
1094
|
-
_emitter:
|
|
1094
|
+
_emitter: $
|
|
1095
1095
|
};
|
|
1096
|
-
if (
|
|
1096
|
+
if (o)
|
|
1097
1097
|
return {
|
|
1098
1098
|
language: u,
|
|
1099
|
-
value: xe(
|
|
1099
|
+
value: xe(_),
|
|
1100
1100
|
illegal: !1,
|
|
1101
1101
|
relevance: 0,
|
|
1102
|
-
errorRaised:
|
|
1103
|
-
_emitter:
|
|
1104
|
-
_top:
|
|
1102
|
+
errorRaised: f,
|
|
1103
|
+
_emitter: $,
|
|
1104
|
+
_top: N
|
|
1105
1105
|
};
|
|
1106
|
-
throw
|
|
1106
|
+
throw f;
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1110
|
-
const
|
|
1109
|
+
function b(u) {
|
|
1110
|
+
const _ = {
|
|
1111
1111
|
value: xe(u),
|
|
1112
1112
|
illegal: !1,
|
|
1113
1113
|
relevance: 0,
|
|
1114
|
-
_top:
|
|
1115
|
-
_emitter: new
|
|
1114
|
+
_top: i,
|
|
1115
|
+
_emitter: new r.__emitter(r)
|
|
1116
1116
|
};
|
|
1117
|
-
return
|
|
1117
|
+
return _._emitter.addText(u), _;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1121
|
-
const T =
|
|
1122
|
-
(
|
|
1119
|
+
function E(u, _) {
|
|
1120
|
+
_ = _ || r.languages || Object.keys(n);
|
|
1121
|
+
const T = b(u), O = _.filter(B).filter(te).map(
|
|
1122
|
+
(H) => d(H, u, !1)
|
|
1123
1123
|
);
|
|
1124
|
-
|
|
1125
|
-
const I =
|
|
1126
|
-
if (
|
|
1127
|
-
return Q.relevance -
|
|
1128
|
-
if (
|
|
1129
|
-
if (
|
|
1124
|
+
O.unshift(T);
|
|
1125
|
+
const I = O.sort((H, Q) => {
|
|
1126
|
+
if (H.relevance !== Q.relevance)
|
|
1127
|
+
return Q.relevance - H.relevance;
|
|
1128
|
+
if (H.language && Q.language) {
|
|
1129
|
+
if (B(H.language).supersetOf === Q.language)
|
|
1130
1130
|
return 1;
|
|
1131
|
-
if (
|
|
1131
|
+
if (B(Q.language).supersetOf === H.language)
|
|
1132
1132
|
return -1;
|
|
1133
1133
|
}
|
|
1134
1134
|
return 0;
|
|
1135
|
-
}), [
|
|
1136
|
-
return
|
|
1135
|
+
}), [P, K] = I, he = P;
|
|
1136
|
+
return he.secondBest = K, he;
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1139
|
-
const
|
|
1140
|
-
u.classList.add("hljs"), u.classList.add(`language-${
|
|
1138
|
+
function v(u, _, T) {
|
|
1139
|
+
const O = _ && t[_] || T;
|
|
1140
|
+
u.classList.add("hljs"), u.classList.add(`language-${O}`);
|
|
1141
1141
|
}
|
|
1142
1142
|
function g(u) {
|
|
1143
|
-
let
|
|
1144
|
-
const T =
|
|
1143
|
+
let _ = null;
|
|
1144
|
+
const T = c(u);
|
|
1145
1145
|
if (a(T))
|
|
1146
1146
|
return;
|
|
1147
1147
|
if (se(
|
|
1148
1148
|
"before:highlightElement",
|
|
1149
1149
|
{ el: u, language: T }
|
|
1150
|
-
), u.children.length > 0 && (
|
|
1151
|
-
throw new
|
|
1150
|
+
), u.children.length > 0 && (r.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(u)), r.throwUnescapedHTML))
|
|
1151
|
+
throw new St(
|
|
1152
1152
|
"One of your code blocks includes unescaped HTML.",
|
|
1153
1153
|
u.innerHTML
|
|
1154
1154
|
);
|
|
1155
|
-
|
|
1156
|
-
const
|
|
1157
|
-
u.innerHTML = I.value,
|
|
1155
|
+
_ = u;
|
|
1156
|
+
const O = _.textContent, I = T ? p(O, { language: T, ignoreIllegals: !0 }) : E(O);
|
|
1157
|
+
u.innerHTML = I.value, v(u, T, I.language), u.result = {
|
|
1158
1158
|
language: I.language,
|
|
1159
1159
|
// TODO: remove with version 11.0
|
|
1160
1160
|
re: I.relevance,
|
|
@@ -1162,124 +1162,124 @@ https://github.com/highlightjs/highlight.js/issues/2277`), I = u, R = b), T ===
|
|
|
1162
1162
|
}, I.secondBest && (u.secondBest = {
|
|
1163
1163
|
language: I.secondBest.language,
|
|
1164
1164
|
relevance: I.secondBest.relevance
|
|
1165
|
-
}), se("after:highlightElement", { el: u, result: I, text:
|
|
1165
|
+
}), se("after:highlightElement", { el: u, result: I, text: O });
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1168
|
-
|
|
1167
|
+
function m(u) {
|
|
1168
|
+
r = je(r, u);
|
|
1169
1169
|
}
|
|
1170
1170
|
const S = () => {
|
|
1171
|
-
|
|
1171
|
+
A(), ie("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1172
1172
|
};
|
|
1173
|
-
function
|
|
1174
|
-
|
|
1173
|
+
function R() {
|
|
1174
|
+
A(), ie("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1175
1175
|
}
|
|
1176
|
-
let
|
|
1177
|
-
function
|
|
1176
|
+
let x = !1;
|
|
1177
|
+
function A() {
|
|
1178
1178
|
if (document.readyState === "loading") {
|
|
1179
|
-
|
|
1179
|
+
x = !0;
|
|
1180
1180
|
return;
|
|
1181
1181
|
}
|
|
1182
|
-
document.querySelectorAll(
|
|
1182
|
+
document.querySelectorAll(r.cssSelector).forEach(g);
|
|
1183
1183
|
}
|
|
1184
1184
|
function L() {
|
|
1185
|
-
|
|
1185
|
+
x && A();
|
|
1186
1186
|
}
|
|
1187
1187
|
typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", L, !1);
|
|
1188
|
-
function
|
|
1188
|
+
function k(u, _) {
|
|
1189
1189
|
let T = null;
|
|
1190
1190
|
try {
|
|
1191
|
-
T =
|
|
1192
|
-
} catch (
|
|
1193
|
-
if (J("Language definition for '{}' could not be registered.".replace("{}", u)),
|
|
1194
|
-
J(
|
|
1191
|
+
T = _(e);
|
|
1192
|
+
} catch (O) {
|
|
1193
|
+
if (J("Language definition for '{}' could not be registered.".replace("{}", u)), o)
|
|
1194
|
+
J(O);
|
|
1195
1195
|
else
|
|
1196
|
-
throw
|
|
1197
|
-
T =
|
|
1196
|
+
throw O;
|
|
1197
|
+
T = i;
|
|
1198
1198
|
}
|
|
1199
|
-
T.name || (T.name = u), n[u] = T, T.rawDefinition =
|
|
1199
|
+
T.name || (T.name = u), n[u] = T, T.rawDefinition = _.bind(null, e), T.aliases && ne(T.aliases, { languageName: u });
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function M(u) {
|
|
1202
1202
|
delete n[u];
|
|
1203
|
-
for (const
|
|
1204
|
-
t[
|
|
1203
|
+
for (const _ of Object.keys(t))
|
|
1204
|
+
t[_] === u && delete t[_];
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function z() {
|
|
1207
1207
|
return Object.keys(n);
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1209
|
+
function B(u) {
|
|
1210
1210
|
return u = (u || "").toLowerCase(), n[u] || n[t[u]];
|
|
1211
1211
|
}
|
|
1212
|
-
function ne(u, { languageName:
|
|
1212
|
+
function ne(u, { languageName: _ }) {
|
|
1213
1213
|
typeof u == "string" && (u = [u]), u.forEach((T) => {
|
|
1214
|
-
t[T.toLowerCase()] =
|
|
1214
|
+
t[T.toLowerCase()] = _;
|
|
1215
1215
|
});
|
|
1216
1216
|
}
|
|
1217
1217
|
function te(u) {
|
|
1218
|
-
const
|
|
1219
|
-
return
|
|
1218
|
+
const _ = B(u);
|
|
1219
|
+
return _ && !_.disableAutodetect;
|
|
1220
1220
|
}
|
|
1221
1221
|
function oe(u) {
|
|
1222
|
-
u["before:highlightBlock"] && !u["before:highlightElement"] && (u["before:highlightElement"] = (
|
|
1222
|
+
u["before:highlightBlock"] && !u["before:highlightElement"] && (u["before:highlightElement"] = (_) => {
|
|
1223
1223
|
u["before:highlightBlock"](
|
|
1224
|
-
Object.assign({ block:
|
|
1224
|
+
Object.assign({ block: _.el }, _)
|
|
1225
1225
|
);
|
|
1226
|
-
}), u["after:highlightBlock"] && !u["after:highlightElement"] && (u["after:highlightElement"] = (
|
|
1226
|
+
}), u["after:highlightBlock"] && !u["after:highlightElement"] && (u["after:highlightElement"] = (_) => {
|
|
1227
1227
|
u["after:highlightBlock"](
|
|
1228
|
-
Object.assign({ block:
|
|
1228
|
+
Object.assign({ block: _.el }, _)
|
|
1229
1229
|
);
|
|
1230
1230
|
});
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function ce(u) {
|
|
1233
1233
|
oe(u), s.push(u);
|
|
1234
1234
|
}
|
|
1235
|
-
function se(u,
|
|
1235
|
+
function se(u, _) {
|
|
1236
1236
|
const T = u;
|
|
1237
|
-
s.forEach(function(
|
|
1238
|
-
|
|
1237
|
+
s.forEach(function(O) {
|
|
1238
|
+
O[T] && O[T](_);
|
|
1239
1239
|
});
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
return
|
|
1241
|
+
function _e(u) {
|
|
1242
|
+
return ie("10.7.0", "highlightBlock will be removed entirely in v12.0"), ie("10.7.0", "Please use highlightElement now."), g(u);
|
|
1243
1243
|
}
|
|
1244
1244
|
Object.assign(e, {
|
|
1245
1245
|
highlight: p,
|
|
1246
|
-
highlightAuto:
|
|
1247
|
-
highlightAll:
|
|
1246
|
+
highlightAuto: E,
|
|
1247
|
+
highlightAll: A,
|
|
1248
1248
|
highlightElement: g,
|
|
1249
1249
|
// TODO: Remove with v12 API
|
|
1250
|
-
highlightBlock:
|
|
1251
|
-
configure:
|
|
1250
|
+
highlightBlock: _e,
|
|
1251
|
+
configure: m,
|
|
1252
1252
|
initHighlighting: S,
|
|
1253
|
-
initHighlightingOnLoad:
|
|
1254
|
-
registerLanguage:
|
|
1255
|
-
unregisterLanguage:
|
|
1256
|
-
listLanguages:
|
|
1257
|
-
getLanguage:
|
|
1253
|
+
initHighlightingOnLoad: R,
|
|
1254
|
+
registerLanguage: k,
|
|
1255
|
+
unregisterLanguage: M,
|
|
1256
|
+
listLanguages: z,
|
|
1257
|
+
getLanguage: B,
|
|
1258
1258
|
registerAliases: ne,
|
|
1259
1259
|
autoDetection: te,
|
|
1260
1260
|
inherit: je,
|
|
1261
|
-
addPlugin:
|
|
1261
|
+
addPlugin: ce
|
|
1262
1262
|
}), e.debugMode = function() {
|
|
1263
|
-
|
|
1263
|
+
o = !1;
|
|
1264
1264
|
}, e.safeMode = function() {
|
|
1265
|
-
|
|
1266
|
-
}, e.versionString =
|
|
1265
|
+
o = !0;
|
|
1266
|
+
}, e.versionString = wt, e.regex = {
|
|
1267
1267
|
concat: ee,
|
|
1268
1268
|
lookahead: rn,
|
|
1269
1269
|
either: Ue,
|
|
1270
|
-
optional:
|
|
1271
|
-
anyNumberOfTimes:
|
|
1270
|
+
optional: zn,
|
|
1271
|
+
anyNumberOfTimes: Hn
|
|
1272
1272
|
};
|
|
1273
|
-
for (const u in
|
|
1274
|
-
typeof
|
|
1275
|
-
return Object.assign(e,
|
|
1273
|
+
for (const u in ye)
|
|
1274
|
+
typeof ye[u] == "object" && ke.exports(ye[u]);
|
|
1275
|
+
return Object.assign(e, ye), e;
|
|
1276
1276
|
};
|
|
1277
|
-
var
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
const G =
|
|
1281
|
-
function
|
|
1282
|
-
const n = e.regex, t = n.concat(/[\p{L}_]/u, n.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), s = /[\p{L}0-9._:-]+/u,
|
|
1277
|
+
var de = Mt({}), Ot = de;
|
|
1278
|
+
de.HighlightJS = de;
|
|
1279
|
+
de.default = de;
|
|
1280
|
+
const G = Ot;
|
|
1281
|
+
function xt(e) {
|
|
1282
|
+
const n = e.regex, t = n.concat(/[\p{L}_]/u, n.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), s = /[\p{L}0-9._:-]+/u, o = {
|
|
1283
1283
|
className: "symbol",
|
|
1284
1284
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1285
1285
|
}, l = {
|
|
@@ -1291,10 +1291,10 @@ function Ot(e) {
|
|
|
1291
1291
|
illegal: /\n/
|
|
1292
1292
|
}
|
|
1293
1293
|
]
|
|
1294
|
-
},
|
|
1294
|
+
}, i = e.inherit(l, {
|
|
1295
1295
|
begin: /\(/,
|
|
1296
1296
|
end: /\)/
|
|
1297
|
-
}),
|
|
1297
|
+
}), r = e.inherit(e.APOS_STRING_MODE, { className: "string" }), a = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), c = {
|
|
1298
1298
|
endsWithParent: !0,
|
|
1299
1299
|
illegal: /</,
|
|
1300
1300
|
relevance: 0,
|
|
@@ -1315,12 +1315,12 @@ function Ot(e) {
|
|
|
1315
1315
|
{
|
|
1316
1316
|
begin: /"/,
|
|
1317
1317
|
end: /"/,
|
|
1318
|
-
contains: [
|
|
1318
|
+
contains: [o]
|
|
1319
1319
|
},
|
|
1320
1320
|
{
|
|
1321
1321
|
begin: /'/,
|
|
1322
1322
|
end: /'/,
|
|
1323
|
-
contains: [
|
|
1323
|
+
contains: [o]
|
|
1324
1324
|
},
|
|
1325
1325
|
{ begin: /[^\s"'=<>`]+/ }
|
|
1326
1326
|
]
|
|
@@ -1354,8 +1354,8 @@ function Ot(e) {
|
|
|
1354
1354
|
contains: [
|
|
1355
1355
|
l,
|
|
1356
1356
|
a,
|
|
1357
|
-
i,
|
|
1358
1357
|
r,
|
|
1358
|
+
i,
|
|
1359
1359
|
{
|
|
1360
1360
|
begin: /\[/,
|
|
1361
1361
|
end: /\]/,
|
|
@@ -1366,9 +1366,9 @@ function Ot(e) {
|
|
|
1366
1366
|
end: />/,
|
|
1367
1367
|
contains: [
|
|
1368
1368
|
l,
|
|
1369
|
-
|
|
1369
|
+
i,
|
|
1370
1370
|
a,
|
|
1371
|
-
|
|
1371
|
+
r
|
|
1372
1372
|
]
|
|
1373
1373
|
}
|
|
1374
1374
|
]
|
|
@@ -1385,7 +1385,7 @@ function Ot(e) {
|
|
|
1385
1385
|
end: /\]\]>/,
|
|
1386
1386
|
relevance: 10
|
|
1387
1387
|
},
|
|
1388
|
-
|
|
1388
|
+
o,
|
|
1389
1389
|
// xml processing instructions
|
|
1390
1390
|
{
|
|
1391
1391
|
className: "meta",
|
|
@@ -1413,7 +1413,7 @@ function Ot(e) {
|
|
|
1413
1413
|
begin: /<style(?=\s|>)/,
|
|
1414
1414
|
end: />/,
|
|
1415
1415
|
keywords: { name: "style" },
|
|
1416
|
-
contains: [
|
|
1416
|
+
contains: [c],
|
|
1417
1417
|
starts: {
|
|
1418
1418
|
end: /<\/style>/,
|
|
1419
1419
|
returnEnd: !0,
|
|
@@ -1429,7 +1429,7 @@ function Ot(e) {
|
|
|
1429
1429
|
begin: /<script(?=\s|>)/,
|
|
1430
1430
|
end: />/,
|
|
1431
1431
|
keywords: { name: "script" },
|
|
1432
|
-
contains: [
|
|
1432
|
+
contains: [c],
|
|
1433
1433
|
starts: {
|
|
1434
1434
|
end: /<\/script>/,
|
|
1435
1435
|
returnEnd: !0,
|
|
@@ -1464,7 +1464,7 @@ function Ot(e) {
|
|
|
1464
1464
|
className: "name",
|
|
1465
1465
|
begin: t,
|
|
1466
1466
|
relevance: 0,
|
|
1467
|
-
starts:
|
|
1467
|
+
starts: c
|
|
1468
1468
|
}
|
|
1469
1469
|
]
|
|
1470
1470
|
},
|
|
@@ -1494,7 +1494,7 @@ function Ot(e) {
|
|
|
1494
1494
|
]
|
|
1495
1495
|
};
|
|
1496
1496
|
}
|
|
1497
|
-
const en = "[A-Za-z$_][0-9A-Za-z$_]*",
|
|
1497
|
+
const en = "[A-Za-z$_][0-9A-Za-z$_]*", Ct = [
|
|
1498
1498
|
"as",
|
|
1499
1499
|
// for exports
|
|
1500
1500
|
"in",
|
|
@@ -1603,7 +1603,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
|
1603
1603
|
"SyntaxError",
|
|
1604
1604
|
"TypeError",
|
|
1605
1605
|
"URIError"
|
|
1606
|
-
],
|
|
1606
|
+
], hn = [
|
|
1607
1607
|
"setInterval",
|
|
1608
1608
|
"setTimeout",
|
|
1609
1609
|
"clearInterval",
|
|
@@ -1632,27 +1632,27 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
|
1632
1632
|
"module",
|
|
1633
1633
|
"global"
|
|
1634
1634
|
// Node.js
|
|
1635
|
-
],
|
|
1636
|
-
|
|
1635
|
+
], It = [].concat(
|
|
1636
|
+
hn,
|
|
1637
1637
|
pn,
|
|
1638
1638
|
_n
|
|
1639
1639
|
);
|
|
1640
|
-
function
|
|
1641
|
-
const n = e.regex, t = (
|
|
1642
|
-
const
|
|
1643
|
-
return
|
|
1644
|
-
}, s = en,
|
|
1640
|
+
function kt(e) {
|
|
1641
|
+
const n = e.regex, t = (_, { after: T }) => {
|
|
1642
|
+
const O = "</" + _[0].slice(1);
|
|
1643
|
+
return _.input.indexOf(O, T) !== -1;
|
|
1644
|
+
}, s = en, o = {
|
|
1645
1645
|
begin: "<>",
|
|
1646
1646
|
end: "</>"
|
|
1647
|
-
}, l = /<[A-Za-z0-9\\._:-]+\s*\/>/,
|
|
1647
|
+
}, l = /<[A-Za-z0-9\\._:-]+\s*\/>/, i = {
|
|
1648
1648
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
1649
1649
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
1650
1650
|
/**
|
|
1651
1651
|
* @param {RegExpMatchArray} match
|
|
1652
1652
|
* @param {CallbackResponse} response
|
|
1653
1653
|
*/
|
|
1654
|
-
isTrulyOpeningTag: (
|
|
1655
|
-
const
|
|
1654
|
+
isTrulyOpeningTag: (_, T) => {
|
|
1655
|
+
const O = _[0].length + _.index, I = _.input[O];
|
|
1656
1656
|
if (
|
|
1657
1657
|
// HTML should not include another raw `<` inside a tag
|
|
1658
1658
|
// nested type?
|
|
@@ -1664,30 +1664,30 @@ function It(e) {
|
|
|
1664
1664
|
T.ignoreMatch();
|
|
1665
1665
|
return;
|
|
1666
1666
|
}
|
|
1667
|
-
I === ">" && (t(
|
|
1668
|
-
let
|
|
1669
|
-
const K =
|
|
1670
|
-
if (
|
|
1667
|
+
I === ">" && (t(_, { after: O }) || T.ignoreMatch());
|
|
1668
|
+
let P;
|
|
1669
|
+
const K = _.input.substring(O);
|
|
1670
|
+
if (P = K.match(/^\s*=/)) {
|
|
1671
1671
|
T.ignoreMatch();
|
|
1672
1672
|
return;
|
|
1673
1673
|
}
|
|
1674
|
-
if ((
|
|
1674
|
+
if ((P = K.match(/^\s+extends\s+/)) && P.index === 0) {
|
|
1675
1675
|
T.ignoreMatch();
|
|
1676
1676
|
return;
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
|
-
},
|
|
1679
|
+
}, r = {
|
|
1680
1680
|
$pattern: en,
|
|
1681
|
-
keyword:
|
|
1681
|
+
keyword: Ct,
|
|
1682
1682
|
literal: Lt,
|
|
1683
|
-
built_in:
|
|
1683
|
+
built_in: It,
|
|
1684
1684
|
"variable.language": Dt
|
|
1685
|
-
}, a = "[0-9](_?[0-9])*",
|
|
1685
|
+
}, a = "[0-9](_?[0-9])*", c = `\\.(${a})`, p = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", d = {
|
|
1686
1686
|
className: "number",
|
|
1687
1687
|
variants: [
|
|
1688
1688
|
// DecimalLiteral
|
|
1689
|
-
{ begin: `(\\b(${p})((${
|
|
1690
|
-
{ begin: `\\b(${p})\\b((${
|
|
1689
|
+
{ begin: `(\\b(${p})((${c})|\\.)?|(${c}))[eE][+-]?(${a})\\b` },
|
|
1690
|
+
{ begin: `\\b(${p})\\b((${c})\\b|\\.)?|(${c})\\b` },
|
|
1691
1691
|
// DecimalBigIntegerLiteral
|
|
1692
1692
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
1693
1693
|
// NonDecimalIntegerLiteral
|
|
@@ -1699,14 +1699,14 @@ function It(e) {
|
|
|
1699
1699
|
{ begin: "\\b0[0-7]+n?\\b" }
|
|
1700
1700
|
],
|
|
1701
1701
|
relevance: 0
|
|
1702
|
-
},
|
|
1702
|
+
}, b = {
|
|
1703
1703
|
className: "subst",
|
|
1704
1704
|
begin: "\\$\\{",
|
|
1705
1705
|
end: "\\}",
|
|
1706
|
-
keywords:
|
|
1706
|
+
keywords: r,
|
|
1707
1707
|
contains: []
|
|
1708
1708
|
// defined later
|
|
1709
|
-
},
|
|
1709
|
+
}, E = {
|
|
1710
1710
|
begin: "html`",
|
|
1711
1711
|
end: "",
|
|
1712
1712
|
starts: {
|
|
@@ -1714,11 +1714,11 @@ function It(e) {
|
|
|
1714
1714
|
returnEnd: !1,
|
|
1715
1715
|
contains: [
|
|
1716
1716
|
e.BACKSLASH_ESCAPE,
|
|
1717
|
-
|
|
1717
|
+
b
|
|
1718
1718
|
],
|
|
1719
1719
|
subLanguage: "xml"
|
|
1720
1720
|
}
|
|
1721
|
-
},
|
|
1721
|
+
}, v = {
|
|
1722
1722
|
begin: "css`",
|
|
1723
1723
|
end: "",
|
|
1724
1724
|
starts: {
|
|
@@ -1726,7 +1726,7 @@ function It(e) {
|
|
|
1726
1726
|
returnEnd: !1,
|
|
1727
1727
|
contains: [
|
|
1728
1728
|
e.BACKSLASH_ESCAPE,
|
|
1729
|
-
|
|
1729
|
+
b
|
|
1730
1730
|
],
|
|
1731
1731
|
subLanguage: "css"
|
|
1732
1732
|
}
|
|
@@ -1736,7 +1736,7 @@ function It(e) {
|
|
|
1736
1736
|
end: "`",
|
|
1737
1737
|
contains: [
|
|
1738
1738
|
e.BACKSLASH_ESCAPE,
|
|
1739
|
-
|
|
1739
|
+
b
|
|
1740
1740
|
]
|
|
1741
1741
|
}, S = {
|
|
1742
1742
|
className: "comment",
|
|
@@ -1783,36 +1783,36 @@ function It(e) {
|
|
|
1783
1783
|
e.C_BLOCK_COMMENT_MODE,
|
|
1784
1784
|
e.C_LINE_COMMENT_MODE
|
|
1785
1785
|
]
|
|
1786
|
-
},
|
|
1786
|
+
}, R = [
|
|
1787
1787
|
e.APOS_STRING_MODE,
|
|
1788
1788
|
e.QUOTE_STRING_MODE,
|
|
1789
|
-
|
|
1790
|
-
|
|
1789
|
+
E,
|
|
1790
|
+
v,
|
|
1791
1791
|
g,
|
|
1792
1792
|
// Skip numbers when they are part of a variable name
|
|
1793
1793
|
{ match: /\$\d+/ },
|
|
1794
|
-
|
|
1794
|
+
d
|
|
1795
1795
|
// This is intentional:
|
|
1796
1796
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
1797
1797
|
// hljs.REGEXP_MODE
|
|
1798
1798
|
];
|
|
1799
|
-
|
|
1799
|
+
b.contains = R.concat({
|
|
1800
1800
|
// we need to pair up {} inside our subst to prevent
|
|
1801
1801
|
// it from ending too early by matching another }
|
|
1802
1802
|
begin: /\{/,
|
|
1803
1803
|
end: /\}/,
|
|
1804
|
-
keywords:
|
|
1804
|
+
keywords: r,
|
|
1805
1805
|
contains: [
|
|
1806
1806
|
"self"
|
|
1807
|
-
].concat(
|
|
1807
|
+
].concat(R)
|
|
1808
1808
|
});
|
|
1809
|
-
const
|
|
1809
|
+
const x = [].concat(S, b.contains), A = x.concat([
|
|
1810
1810
|
// eat recursive parens in sub expressions
|
|
1811
1811
|
{
|
|
1812
1812
|
begin: /\(/,
|
|
1813
1813
|
end: /\)/,
|
|
1814
|
-
keywords:
|
|
1815
|
-
contains: ["self"].concat(
|
|
1814
|
+
keywords: r,
|
|
1815
|
+
contains: ["self"].concat(x)
|
|
1816
1816
|
}
|
|
1817
1817
|
]), L = {
|
|
1818
1818
|
className: "params",
|
|
@@ -1820,9 +1820,9 @@ function It(e) {
|
|
|
1820
1820
|
end: /\)/,
|
|
1821
1821
|
excludeBegin: !0,
|
|
1822
1822
|
excludeEnd: !0,
|
|
1823
|
-
keywords:
|
|
1824
|
-
contains:
|
|
1825
|
-
},
|
|
1823
|
+
keywords: r,
|
|
1824
|
+
contains: A
|
|
1825
|
+
}, k = {
|
|
1826
1826
|
variants: [
|
|
1827
1827
|
// class Car extends vehicle
|
|
1828
1828
|
{
|
|
@@ -1855,7 +1855,7 @@ function It(e) {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
1857
|
]
|
|
1858
|
-
},
|
|
1858
|
+
}, M = {
|
|
1859
1859
|
relevance: 0,
|
|
1860
1860
|
match: n.either(
|
|
1861
1861
|
// Hard coded exceptions
|
|
@@ -1879,12 +1879,12 @@ function It(e) {
|
|
|
1879
1879
|
..._n
|
|
1880
1880
|
]
|
|
1881
1881
|
}
|
|
1882
|
-
},
|
|
1882
|
+
}, z = {
|
|
1883
1883
|
label: "use_strict",
|
|
1884
1884
|
className: "meta",
|
|
1885
1885
|
relevance: 10,
|
|
1886
1886
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
1887
|
-
},
|
|
1887
|
+
}, B = {
|
|
1888
1888
|
variants: [
|
|
1889
1889
|
{
|
|
1890
1890
|
match: [
|
|
@@ -1914,14 +1914,14 @@ function It(e) {
|
|
|
1914
1914
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
1915
1915
|
className: "variable.constant"
|
|
1916
1916
|
};
|
|
1917
|
-
function te(
|
|
1918
|
-
return n.concat("(?!",
|
|
1917
|
+
function te(_) {
|
|
1918
|
+
return n.concat("(?!", _.join("|"), ")");
|
|
1919
1919
|
}
|
|
1920
1920
|
const oe = {
|
|
1921
1921
|
match: n.concat(
|
|
1922
1922
|
/\b/,
|
|
1923
1923
|
te([
|
|
1924
|
-
...
|
|
1924
|
+
...hn,
|
|
1925
1925
|
"super",
|
|
1926
1926
|
"import"
|
|
1927
1927
|
]),
|
|
@@ -1930,7 +1930,7 @@ function It(e) {
|
|
|
1930
1930
|
),
|
|
1931
1931
|
className: "title.function",
|
|
1932
1932
|
relevance: 0
|
|
1933
|
-
},
|
|
1933
|
+
}, ce = {
|
|
1934
1934
|
begin: n.concat(/\./, n.lookahead(
|
|
1935
1935
|
n.concat(s, /(?![0-9A-Za-z$_(])/)
|
|
1936
1936
|
)),
|
|
@@ -1957,7 +1957,7 @@ function It(e) {
|
|
|
1957
1957
|
},
|
|
1958
1958
|
L
|
|
1959
1959
|
]
|
|
1960
|
-
},
|
|
1960
|
+
}, _e = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", u = {
|
|
1961
1961
|
match: [
|
|
1962
1962
|
/const|var|let/,
|
|
1963
1963
|
/\s+/,
|
|
@@ -1966,7 +1966,7 @@ function It(e) {
|
|
|
1966
1966
|
/=\s*/,
|
|
1967
1967
|
/(async\s*)?/,
|
|
1968
1968
|
// async is optional
|
|
1969
|
-
n.lookahead(
|
|
1969
|
+
n.lookahead(_e)
|
|
1970
1970
|
],
|
|
1971
1971
|
keywords: "async",
|
|
1972
1972
|
className: {
|
|
@@ -1980,9 +1980,9 @@ function It(e) {
|
|
|
1980
1980
|
return {
|
|
1981
1981
|
name: "Javascript",
|
|
1982
1982
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
1983
|
-
keywords:
|
|
1983
|
+
keywords: r,
|
|
1984
1984
|
// this will be extended by TypeScript
|
|
1985
|
-
exports: { PARAMS_CONTAINS:
|
|
1985
|
+
exports: { PARAMS_CONTAINS: A, CLASS_REFERENCE: M },
|
|
1986
1986
|
illegal: /#(?![$_A-z])/,
|
|
1987
1987
|
contains: [
|
|
1988
1988
|
e.SHEBANG({
|
|
@@ -1990,17 +1990,17 @@ function It(e) {
|
|
|
1990
1990
|
binary: "node",
|
|
1991
1991
|
relevance: 5
|
|
1992
1992
|
}),
|
|
1993
|
-
|
|
1993
|
+
z,
|
|
1994
1994
|
e.APOS_STRING_MODE,
|
|
1995
1995
|
e.QUOTE_STRING_MODE,
|
|
1996
|
-
|
|
1997
|
-
|
|
1996
|
+
E,
|
|
1997
|
+
v,
|
|
1998
1998
|
g,
|
|
1999
1999
|
S,
|
|
2000
2000
|
// Skip numbers when they are part of a variable name
|
|
2001
2001
|
{ match: /\$\d+/ },
|
|
2002
|
-
|
|
2003
|
-
|
|
2002
|
+
d,
|
|
2003
|
+
M,
|
|
2004
2004
|
{
|
|
2005
2005
|
className: "attr",
|
|
2006
2006
|
begin: s + n.lookahead(":"),
|
|
@@ -2020,7 +2020,7 @@ function It(e) {
|
|
|
2020
2020
|
// we have to count the parens to make sure we actually have the
|
|
2021
2021
|
// correct bounding ( ) before the =>. There could be any number of
|
|
2022
2022
|
// sub-expressions inside also surrounded by parens.
|
|
2023
|
-
begin:
|
|
2023
|
+
begin: _e,
|
|
2024
2024
|
returnBegin: !0,
|
|
2025
2025
|
end: "\\s*=>",
|
|
2026
2026
|
contains: [
|
|
@@ -2041,8 +2041,8 @@ function It(e) {
|
|
|
2041
2041
|
end: /\)/,
|
|
2042
2042
|
excludeBegin: !0,
|
|
2043
2043
|
excludeEnd: !0,
|
|
2044
|
-
keywords:
|
|
2045
|
-
contains:
|
|
2044
|
+
keywords: r,
|
|
2045
|
+
contains: A
|
|
2046
2046
|
}
|
|
2047
2047
|
]
|
|
2048
2048
|
}
|
|
@@ -2060,21 +2060,21 @@ function It(e) {
|
|
|
2060
2060
|
{
|
|
2061
2061
|
// JSX
|
|
2062
2062
|
variants: [
|
|
2063
|
-
{ begin:
|
|
2063
|
+
{ begin: o.begin, end: o.end },
|
|
2064
2064
|
{ match: l },
|
|
2065
2065
|
{
|
|
2066
|
-
begin:
|
|
2066
|
+
begin: i.begin,
|
|
2067
2067
|
// we carefully check the opening tag to see if it truly
|
|
2068
2068
|
// is a tag and not a false positive
|
|
2069
|
-
"on:begin":
|
|
2070
|
-
end:
|
|
2069
|
+
"on:begin": i.isTrulyOpeningTag,
|
|
2070
|
+
end: i.end
|
|
2071
2071
|
}
|
|
2072
2072
|
],
|
|
2073
2073
|
subLanguage: "xml",
|
|
2074
2074
|
contains: [
|
|
2075
2075
|
{
|
|
2076
|
-
begin:
|
|
2077
|
-
end:
|
|
2076
|
+
begin: i.begin,
|
|
2077
|
+
end: i.end,
|
|
2078
2078
|
skip: !0,
|
|
2079
2079
|
contains: ["self"]
|
|
2080
2080
|
}
|
|
@@ -2082,7 +2082,7 @@ function It(e) {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
]
|
|
2084
2084
|
},
|
|
2085
|
-
|
|
2085
|
+
B,
|
|
2086
2086
|
{
|
|
2087
2087
|
// prevent this from getting swallowed up by function
|
|
2088
2088
|
// since they appear "function like"
|
|
@@ -2106,7 +2106,7 @@ function It(e) {
|
|
|
2106
2106
|
match: /\.\.\./,
|
|
2107
2107
|
relevance: 0
|
|
2108
2108
|
},
|
|
2109
|
-
|
|
2109
|
+
ce,
|
|
2110
2110
|
// hack: prevents detection of keywords in some circumstances
|
|
2111
2111
|
// .keyword()
|
|
2112
2112
|
// $keyword = x
|
|
@@ -2121,7 +2121,7 @@ function It(e) {
|
|
|
2121
2121
|
},
|
|
2122
2122
|
oe,
|
|
2123
2123
|
ne,
|
|
2124
|
-
|
|
2124
|
+
k,
|
|
2125
2125
|
se,
|
|
2126
2126
|
{
|
|
2127
2127
|
match: /\$[(.]/
|
|
@@ -2130,7 +2130,7 @@ function It(e) {
|
|
|
2130
2130
|
]
|
|
2131
2131
|
};
|
|
2132
2132
|
}
|
|
2133
|
-
function
|
|
2133
|
+
function Bt(e) {
|
|
2134
2134
|
const n = {
|
|
2135
2135
|
className: "attr",
|
|
2136
2136
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
@@ -2143,7 +2143,7 @@ function kt(e) {
|
|
|
2143
2143
|
"true",
|
|
2144
2144
|
"false",
|
|
2145
2145
|
"null"
|
|
2146
|
-
],
|
|
2146
|
+
], o = {
|
|
2147
2147
|
scope: "literal",
|
|
2148
2148
|
beginKeywords: s.join(" ")
|
|
2149
2149
|
};
|
|
@@ -2156,7 +2156,7 @@ function kt(e) {
|
|
|
2156
2156
|
n,
|
|
2157
2157
|
t,
|
|
2158
2158
|
e.QUOTE_STRING_MODE,
|
|
2159
|
-
|
|
2159
|
+
o,
|
|
2160
2160
|
e.C_NUMBER_MODE,
|
|
2161
2161
|
e.C_LINE_COMMENT_MODE,
|
|
2162
2162
|
e.C_BLOCK_COMMENT_MODE
|
|
@@ -2164,7 +2164,7 @@ function kt(e) {
|
|
|
2164
2164
|
illegal: "\\S"
|
|
2165
2165
|
};
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2167
|
+
function $t(e) {
|
|
2168
2168
|
const n = "true false yes no null", t = "[\\w#;/?:@&=+$,.~*'()[\\]]+", s = {
|
|
2169
2169
|
className: "attr",
|
|
2170
2170
|
variants: [
|
|
@@ -2178,7 +2178,7 @@ function Bt(e) {
|
|
|
2178
2178
|
begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
|
|
2179
2179
|
}
|
|
2180
2180
|
]
|
|
2181
|
-
},
|
|
2181
|
+
}, o = {
|
|
2182
2182
|
className: "template-variable",
|
|
2183
2183
|
variants: [
|
|
2184
2184
|
{
|
|
@@ -2208,9 +2208,9 @@ function Bt(e) {
|
|
|
2208
2208
|
],
|
|
2209
2209
|
contains: [
|
|
2210
2210
|
e.BACKSLASH_ESCAPE,
|
|
2211
|
-
|
|
2211
|
+
o
|
|
2212
2212
|
]
|
|
2213
|
-
},
|
|
2213
|
+
}, i = e.inherit(l, { variants: [
|
|
2214
2214
|
{
|
|
2215
2215
|
begin: /'/,
|
|
2216
2216
|
end: /'/
|
|
@@ -2220,25 +2220,25 @@ function Bt(e) {
|
|
|
2220
2220
|
end: /"/
|
|
2221
2221
|
},
|
|
2222
2222
|
{ begin: /[^\s,{}[\]]+/ }
|
|
2223
|
-
] }),
|
|
2223
|
+
] }), r = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", c = "(\\.[0-9]*)?", p = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", d = {
|
|
2224
2224
|
className: "number",
|
|
2225
|
-
begin: "\\b" +
|
|
2226
|
-
},
|
|
2225
|
+
begin: "\\b" + r + a + c + p + "\\b"
|
|
2226
|
+
}, b = {
|
|
2227
2227
|
end: ",",
|
|
2228
2228
|
endsWithParent: !0,
|
|
2229
2229
|
excludeEnd: !0,
|
|
2230
2230
|
keywords: n,
|
|
2231
2231
|
relevance: 0
|
|
2232
|
-
},
|
|
2232
|
+
}, E = {
|
|
2233
2233
|
begin: /\{/,
|
|
2234
2234
|
end: /\}/,
|
|
2235
|
-
contains: [
|
|
2235
|
+
contains: [b],
|
|
2236
2236
|
illegal: "\\n",
|
|
2237
2237
|
relevance: 0
|
|
2238
|
-
},
|
|
2238
|
+
}, v = {
|
|
2239
2239
|
begin: "\\[",
|
|
2240
2240
|
end: "\\]",
|
|
2241
|
-
contains: [
|
|
2241
|
+
contains: [b],
|
|
2242
2242
|
illegal: "\\n",
|
|
2243
2243
|
relevance: 0
|
|
2244
2244
|
}, g = [
|
|
@@ -2309,7 +2309,7 @@ function Bt(e) {
|
|
|
2309
2309
|
beginKeywords: n,
|
|
2310
2310
|
keywords: { literal: n }
|
|
2311
2311
|
},
|
|
2312
|
-
|
|
2312
|
+
d,
|
|
2313
2313
|
// numbers are any valid C-style number that
|
|
2314
2314
|
// sit isolated from other words
|
|
2315
2315
|
{
|
|
@@ -2317,18 +2317,18 @@ function Bt(e) {
|
|
|
2317
2317
|
begin: e.C_NUMBER_RE + "\\b",
|
|
2318
2318
|
relevance: 0
|
|
2319
2319
|
},
|
|
2320
|
-
|
|
2321
|
-
|
|
2320
|
+
E,
|
|
2321
|
+
v,
|
|
2322
2322
|
l
|
|
2323
|
-
],
|
|
2324
|
-
return
|
|
2323
|
+
], m = [...g];
|
|
2324
|
+
return m.pop(), m.push(i), b.contains = m, {
|
|
2325
2325
|
name: "YAML",
|
|
2326
2326
|
case_insensitive: !0,
|
|
2327
2327
|
aliases: ["yml"],
|
|
2328
2328
|
contains: g
|
|
2329
2329
|
};
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2331
|
+
function Ut(e) {
|
|
2332
2332
|
return {
|
|
2333
2333
|
name: "Plain text",
|
|
2334
2334
|
aliases: [
|
|
@@ -2338,7 +2338,7 @@ function $t(e) {
|
|
|
2338
2338
|
disableAutodetect: !0
|
|
2339
2339
|
};
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function Pt(e) {
|
|
2342
2342
|
const n = e.regex, t = /[\p{XID_Start}_]\p{XID_Continue}*/u, s = [
|
|
2343
2343
|
"and",
|
|
2344
2344
|
"as",
|
|
@@ -2374,7 +2374,7 @@ function Ut(e) {
|
|
|
2374
2374
|
"while",
|
|
2375
2375
|
"with",
|
|
2376
2376
|
"yield"
|
|
2377
|
-
],
|
|
2377
|
+
], r = {
|
|
2378
2378
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
2379
2379
|
keyword: s,
|
|
2380
2380
|
built_in: [
|
|
@@ -2474,16 +2474,16 @@ function Ut(e) {
|
|
|
2474
2474
|
}, a = {
|
|
2475
2475
|
className: "meta",
|
|
2476
2476
|
begin: /^(>>>|\.\.\.) /
|
|
2477
|
-
},
|
|
2477
|
+
}, c = {
|
|
2478
2478
|
className: "subst",
|
|
2479
2479
|
begin: /\{/,
|
|
2480
2480
|
end: /\}/,
|
|
2481
|
-
keywords:
|
|
2481
|
+
keywords: r,
|
|
2482
2482
|
illegal: /#/
|
|
2483
2483
|
}, p = {
|
|
2484
2484
|
begin: /\{\{/,
|
|
2485
2485
|
relevance: 0
|
|
2486
|
-
},
|
|
2486
|
+
}, d = {
|
|
2487
2487
|
className: "string",
|
|
2488
2488
|
contains: [e.BACKSLASH_ESCAPE],
|
|
2489
2489
|
variants: [
|
|
@@ -2512,7 +2512,7 @@ function Ut(e) {
|
|
|
2512
2512
|
e.BACKSLASH_ESCAPE,
|
|
2513
2513
|
a,
|
|
2514
2514
|
p,
|
|
2515
|
-
|
|
2515
|
+
c
|
|
2516
2516
|
]
|
|
2517
2517
|
},
|
|
2518
2518
|
{
|
|
@@ -2522,7 +2522,7 @@ function Ut(e) {
|
|
|
2522
2522
|
e.BACKSLASH_ESCAPE,
|
|
2523
2523
|
a,
|
|
2524
2524
|
p,
|
|
2525
|
-
|
|
2525
|
+
c
|
|
2526
2526
|
]
|
|
2527
2527
|
},
|
|
2528
2528
|
{
|
|
@@ -2549,7 +2549,7 @@ function Ut(e) {
|
|
|
2549
2549
|
contains: [
|
|
2550
2550
|
e.BACKSLASH_ESCAPE,
|
|
2551
2551
|
p,
|
|
2552
|
-
|
|
2552
|
+
c
|
|
2553
2553
|
]
|
|
2554
2554
|
},
|
|
2555
2555
|
{
|
|
@@ -2558,13 +2558,13 @@ function Ut(e) {
|
|
|
2558
2558
|
contains: [
|
|
2559
2559
|
e.BACKSLASH_ESCAPE,
|
|
2560
2560
|
p,
|
|
2561
|
-
|
|
2561
|
+
c
|
|
2562
2562
|
]
|
|
2563
2563
|
},
|
|
2564
2564
|
e.APOS_STRING_MODE,
|
|
2565
2565
|
e.QUOTE_STRING_MODE
|
|
2566
2566
|
]
|
|
2567
|
-
},
|
|
2567
|
+
}, b = "[0-9](_?[0-9])*", E = `(\\b(${b}))?\\.(${b})|\\b(${b})\\.`, v = `\\b|${s.join("|")}`, g = {
|
|
2568
2568
|
className: "number",
|
|
2569
2569
|
relevance: 0,
|
|
2570
2570
|
variants: [
|
|
@@ -2579,10 +2579,10 @@ function Ut(e) {
|
|
|
2579
2579
|
// because both MUST contain a decimal point and so cannot be confused with
|
|
2580
2580
|
// the interior part of an identifier
|
|
2581
2581
|
{
|
|
2582
|
-
begin: `(\\b(${
|
|
2582
|
+
begin: `(\\b(${b})|(${E}))[eE][+-]?(${b})[jJ]?(?=${v})`
|
|
2583
2583
|
},
|
|
2584
2584
|
{
|
|
2585
|
-
begin: `(${
|
|
2585
|
+
begin: `(${E})[jJ]?`
|
|
2586
2586
|
},
|
|
2587
2587
|
// decinteger, bininteger, octinteger, hexinteger
|
|
2588
2588
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
|
|
@@ -2591,28 +2591,28 @@ function Ut(e) {
|
|
|
2591
2591
|
// decinteger is optionally imaginary
|
|
2592
2592
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
2593
2593
|
{
|
|
2594
|
-
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${
|
|
2594
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${v})`
|
|
2595
2595
|
},
|
|
2596
2596
|
{
|
|
2597
|
-
begin: `\\b0[bB](_?[01])+[lL]?(?=${
|
|
2597
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${v})`
|
|
2598
2598
|
},
|
|
2599
2599
|
{
|
|
2600
|
-
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${
|
|
2600
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${v})`
|
|
2601
2601
|
},
|
|
2602
2602
|
{
|
|
2603
|
-
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${
|
|
2603
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${v})`
|
|
2604
2604
|
},
|
|
2605
2605
|
// imagnumber (digitpart-based)
|
|
2606
2606
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
2607
2607
|
{
|
|
2608
|
-
begin: `\\b(${
|
|
2608
|
+
begin: `\\b(${b})[jJ](?=${v})`
|
|
2609
2609
|
}
|
|
2610
2610
|
]
|
|
2611
|
-
},
|
|
2611
|
+
}, m = {
|
|
2612
2612
|
className: "comment",
|
|
2613
2613
|
begin: n.lookahead(/# type:/),
|
|
2614
2614
|
end: /$/,
|
|
2615
|
-
keywords:
|
|
2615
|
+
keywords: r,
|
|
2616
2616
|
contains: [
|
|
2617
2617
|
{
|
|
2618
2618
|
// prevent keywords from coloring `type`
|
|
@@ -2639,19 +2639,19 @@ function Ut(e) {
|
|
|
2639
2639
|
end: /\)/,
|
|
2640
2640
|
excludeBegin: !0,
|
|
2641
2641
|
excludeEnd: !0,
|
|
2642
|
-
keywords:
|
|
2642
|
+
keywords: r,
|
|
2643
2643
|
contains: [
|
|
2644
2644
|
"self",
|
|
2645
2645
|
a,
|
|
2646
2646
|
g,
|
|
2647
|
-
|
|
2647
|
+
d,
|
|
2648
2648
|
e.HASH_COMMENT_MODE
|
|
2649
2649
|
]
|
|
2650
2650
|
}
|
|
2651
2651
|
]
|
|
2652
2652
|
};
|
|
2653
|
-
return
|
|
2654
|
-
|
|
2653
|
+
return c.contains = [
|
|
2654
|
+
d,
|
|
2655
2655
|
g,
|
|
2656
2656
|
a
|
|
2657
2657
|
], {
|
|
@@ -2662,7 +2662,7 @@ function Ut(e) {
|
|
|
2662
2662
|
"ipython"
|
|
2663
2663
|
],
|
|
2664
2664
|
unicodeRegex: !0,
|
|
2665
|
-
keywords:
|
|
2665
|
+
keywords: r,
|
|
2666
2666
|
illegal: /(<\/|->|\?)|=>/,
|
|
2667
2667
|
contains: [
|
|
2668
2668
|
a,
|
|
@@ -2677,8 +2677,8 @@ function Ut(e) {
|
|
|
2677
2677
|
beginKeywords: "if",
|
|
2678
2678
|
relevance: 0
|
|
2679
2679
|
},
|
|
2680
|
-
|
|
2681
|
-
|
|
2680
|
+
d,
|
|
2681
|
+
m,
|
|
2682
2682
|
e.HASH_COMMENT_MODE,
|
|
2683
2683
|
{
|
|
2684
2684
|
match: [
|
|
@@ -2726,28 +2726,28 @@ function Ut(e) {
|
|
|
2726
2726
|
contains: [
|
|
2727
2727
|
g,
|
|
2728
2728
|
S,
|
|
2729
|
-
|
|
2729
|
+
d
|
|
2730
2730
|
]
|
|
2731
2731
|
}
|
|
2732
2732
|
]
|
|
2733
2733
|
};
|
|
2734
2734
|
}
|
|
2735
|
-
var
|
|
2735
|
+
var re = "[0-9](_*[0-9])*", ve = `\\.(${re})`, Ne = "[0-9a-fA-F](_*[0-9a-fA-F])*", nn = {
|
|
2736
2736
|
className: "number",
|
|
2737
2737
|
variants: [
|
|
2738
2738
|
// DecimalFloatingPointLiteral
|
|
2739
2739
|
// including ExponentPart
|
|
2740
|
-
{ begin: `(\\b(${
|
|
2740
|
+
{ begin: `(\\b(${re})((${ve})|\\.)?|(${ve}))[eE][+-]?(${re})[fFdD]?\\b` },
|
|
2741
2741
|
// excluding ExponentPart
|
|
2742
|
-
{ begin: `\\b(${
|
|
2743
|
-
{ begin: `(${
|
|
2744
|
-
{ begin: `\\b(${
|
|
2742
|
+
{ begin: `\\b(${re})((${ve})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
2743
|
+
{ begin: `(${ve})[fFdD]?\\b` },
|
|
2744
|
+
{ begin: `\\b(${re})[fFdD]\\b` },
|
|
2745
2745
|
// HexadecimalFloatingPointLiteral
|
|
2746
|
-
{ begin: `\\b0[xX]((${
|
|
2746
|
+
{ begin: `\\b0[xX]((${Ne})\\.?|(${Ne})?\\.(${Ne}))[pP][+-]?(${re})[fFdD]?\\b` },
|
|
2747
2747
|
// DecimalIntegerLiteral
|
|
2748
2748
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
2749
2749
|
// HexIntegerLiteral
|
|
2750
|
-
{ begin: `\\b0[xX](${
|
|
2750
|
+
{ begin: `\\b0[xX](${Ne})[lL]?\\b` },
|
|
2751
2751
|
// OctalIntegerLiteral
|
|
2752
2752
|
{ begin: "\\b0(_*[0-7])*[lL]?\\b" },
|
|
2753
2753
|
// BinaryIntegerLiteral
|
|
@@ -2755,11 +2755,11 @@ var ie = "[0-9](_*[0-9])*", ye = `\\.(${ie})`, ve = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
2755
2755
|
],
|
|
2756
2756
|
relevance: 0
|
|
2757
2757
|
};
|
|
2758
|
-
function
|
|
2759
|
-
return t === -1 ? "" : e.replace(n, (s) =>
|
|
2758
|
+
function bn(e, n, t) {
|
|
2759
|
+
return t === -1 ? "" : e.replace(n, (s) => bn(e, n, t - 1));
|
|
2760
2760
|
}
|
|
2761
|
-
function
|
|
2762
|
-
const n = e.regex, t = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", s = t +
|
|
2761
|
+
function Ht(e) {
|
|
2762
|
+
const n = e.regex, t = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", s = t + bn("(?:<" + t + "~~~(?:\\s*,\\s*" + t + "~~~)*>)?", /~~~/g, 2), a = {
|
|
2763
2763
|
keyword: [
|
|
2764
2764
|
"synchronized",
|
|
2765
2765
|
"abstract",
|
|
@@ -2823,7 +2823,7 @@ function Pt(e) {
|
|
|
2823
2823
|
"super",
|
|
2824
2824
|
"this"
|
|
2825
2825
|
]
|
|
2826
|
-
},
|
|
2826
|
+
}, c = {
|
|
2827
2827
|
className: "meta",
|
|
2828
2828
|
begin: "@" + t,
|
|
2829
2829
|
contains: [
|
|
@@ -2951,7 +2951,7 @@ function Pt(e) {
|
|
|
2951
2951
|
keywords: a,
|
|
2952
2952
|
relevance: 0,
|
|
2953
2953
|
contains: [
|
|
2954
|
-
|
|
2954
|
+
c,
|
|
2955
2955
|
e.APOS_STRING_MODE,
|
|
2956
2956
|
e.QUOTE_STRING_MODE,
|
|
2957
2957
|
nn,
|
|
@@ -2963,11 +2963,11 @@ function Pt(e) {
|
|
|
2963
2963
|
]
|
|
2964
2964
|
},
|
|
2965
2965
|
nn,
|
|
2966
|
-
|
|
2966
|
+
c
|
|
2967
2967
|
]
|
|
2968
2968
|
};
|
|
2969
2969
|
}
|
|
2970
|
-
function
|
|
2970
|
+
function zt(e) {
|
|
2971
2971
|
const n = e.regex, t = {}, s = {
|
|
2972
2972
|
begin: /\$\{/,
|
|
2973
2973
|
end: /\}/,
|
|
@@ -2992,7 +2992,7 @@ function Ht(e) {
|
|
|
2992
2992
|
s
|
|
2993
2993
|
]
|
|
2994
2994
|
});
|
|
2995
|
-
const
|
|
2995
|
+
const o = {
|
|
2996
2996
|
className: "subst",
|
|
2997
2997
|
begin: /\$\(/,
|
|
2998
2998
|
end: /\)/,
|
|
@@ -3006,25 +3006,25 @@ function Ht(e) {
|
|
|
3006
3006
|
className: "string"
|
|
3007
3007
|
})
|
|
3008
3008
|
] }
|
|
3009
|
-
},
|
|
3009
|
+
}, i = {
|
|
3010
3010
|
className: "string",
|
|
3011
3011
|
begin: /"/,
|
|
3012
3012
|
end: /"/,
|
|
3013
3013
|
contains: [
|
|
3014
3014
|
e.BACKSLASH_ESCAPE,
|
|
3015
3015
|
t,
|
|
3016
|
-
|
|
3016
|
+
o
|
|
3017
3017
|
]
|
|
3018
3018
|
};
|
|
3019
|
-
|
|
3020
|
-
const
|
|
3019
|
+
o.contains.push(i);
|
|
3020
|
+
const r = {
|
|
3021
3021
|
className: "",
|
|
3022
3022
|
begin: /\\"/
|
|
3023
3023
|
}, a = {
|
|
3024
3024
|
className: "string",
|
|
3025
3025
|
begin: /'/,
|
|
3026
3026
|
end: /'/
|
|
3027
|
-
},
|
|
3027
|
+
}, c = {
|
|
3028
3028
|
begin: /\$?\(\(/,
|
|
3029
3029
|
end: /\)\)/,
|
|
3030
3030
|
contains: [
|
|
@@ -3045,16 +3045,16 @@ function Ht(e) {
|
|
|
3045
3045
|
"tcsh",
|
|
3046
3046
|
"dash",
|
|
3047
3047
|
"scsh"
|
|
3048
|
-
],
|
|
3048
|
+
], d = e.SHEBANG({
|
|
3049
3049
|
binary: `(${p.join("|")})`,
|
|
3050
3050
|
relevance: 10
|
|
3051
|
-
}),
|
|
3051
|
+
}), b = {
|
|
3052
3052
|
className: "function",
|
|
3053
3053
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3054
3054
|
returnBegin: !0,
|
|
3055
3055
|
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
3056
3056
|
relevance: 0
|
|
3057
|
-
},
|
|
3057
|
+
}, E = [
|
|
3058
3058
|
"if",
|
|
3059
3059
|
"then",
|
|
3060
3060
|
"else",
|
|
@@ -3068,10 +3068,10 @@ function Ht(e) {
|
|
|
3068
3068
|
"case",
|
|
3069
3069
|
"esac",
|
|
3070
3070
|
"function"
|
|
3071
|
-
],
|
|
3071
|
+
], v = [
|
|
3072
3072
|
"true",
|
|
3073
3073
|
"false"
|
|
3074
|
-
], g = { match: /(\/[a-z._-]+)+/ },
|
|
3074
|
+
], g = { match: /(\/[a-z._-]+)+/ }, m = [
|
|
3075
3075
|
"break",
|
|
3076
3076
|
"cd",
|
|
3077
3077
|
"continue",
|
|
@@ -3112,7 +3112,7 @@ function Ht(e) {
|
|
|
3112
3112
|
"typeset",
|
|
3113
3113
|
"ulimit",
|
|
3114
3114
|
"unalias"
|
|
3115
|
-
],
|
|
3115
|
+
], R = [
|
|
3116
3116
|
"autoload",
|
|
3117
3117
|
"bg",
|
|
3118
3118
|
"bindkey",
|
|
@@ -3181,7 +3181,7 @@ function Ht(e) {
|
|
|
3181
3181
|
"zsocket",
|
|
3182
3182
|
"zstyle",
|
|
3183
3183
|
"ztcp"
|
|
3184
|
-
],
|
|
3184
|
+
], x = [
|
|
3185
3185
|
"chcon",
|
|
3186
3186
|
"chgrp",
|
|
3187
3187
|
"chown",
|
|
@@ -3291,36 +3291,36 @@ function Ht(e) {
|
|
|
3291
3291
|
aliases: ["sh"],
|
|
3292
3292
|
keywords: {
|
|
3293
3293
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3294
|
-
keyword:
|
|
3295
|
-
literal:
|
|
3294
|
+
keyword: E,
|
|
3295
|
+
literal: v,
|
|
3296
3296
|
built_in: [
|
|
3297
|
-
...
|
|
3297
|
+
...m,
|
|
3298
3298
|
...S,
|
|
3299
3299
|
// Shell modifiers
|
|
3300
3300
|
"set",
|
|
3301
3301
|
"shopt",
|
|
3302
|
-
...
|
|
3303
|
-
...
|
|
3302
|
+
...R,
|
|
3303
|
+
...x
|
|
3304
3304
|
]
|
|
3305
3305
|
},
|
|
3306
3306
|
contains: [
|
|
3307
|
-
|
|
3307
|
+
d,
|
|
3308
3308
|
// to catch known shells and boost relevancy
|
|
3309
3309
|
e.SHEBANG(),
|
|
3310
3310
|
// to catch unknown shells but still highlight the shebang
|
|
3311
|
-
|
|
3312
|
-
|
|
3311
|
+
b,
|
|
3312
|
+
c,
|
|
3313
3313
|
e.HASH_COMMENT_MODE,
|
|
3314
3314
|
l,
|
|
3315
3315
|
g,
|
|
3316
|
-
r,
|
|
3317
3316
|
i,
|
|
3317
|
+
r,
|
|
3318
3318
|
a,
|
|
3319
3319
|
t
|
|
3320
3320
|
]
|
|
3321
3321
|
};
|
|
3322
3322
|
}
|
|
3323
|
-
function
|
|
3323
|
+
function Ft(e) {
|
|
3324
3324
|
const n = e.regex, t = e.COMMENT("--", "$"), s = {
|
|
3325
3325
|
className: "string",
|
|
3326
3326
|
variants: [
|
|
@@ -3330,7 +3330,7 @@ function zt(e) {
|
|
|
3330
3330
|
contains: [{ begin: /''/ }]
|
|
3331
3331
|
}
|
|
3332
3332
|
]
|
|
3333
|
-
},
|
|
3333
|
+
}, o = {
|
|
3334
3334
|
begin: /"/,
|
|
3335
3335
|
end: /"/,
|
|
3336
3336
|
contains: [{ begin: /""/ }]
|
|
@@ -3340,12 +3340,12 @@ function zt(e) {
|
|
|
3340
3340
|
// Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
|
|
3341
3341
|
// "null",
|
|
3342
3342
|
"unknown"
|
|
3343
|
-
],
|
|
3343
|
+
], i = [
|
|
3344
3344
|
"double precision",
|
|
3345
3345
|
"large object",
|
|
3346
3346
|
"with timezone",
|
|
3347
3347
|
"without timezone"
|
|
3348
|
-
],
|
|
3348
|
+
], r = [
|
|
3349
3349
|
"bigint",
|
|
3350
3350
|
"binary",
|
|
3351
3351
|
"blob",
|
|
@@ -3383,7 +3383,7 @@ function zt(e) {
|
|
|
3383
3383
|
"first",
|
|
3384
3384
|
"last",
|
|
3385
3385
|
"view"
|
|
3386
|
-
],
|
|
3386
|
+
], c = [
|
|
3387
3387
|
"abs",
|
|
3388
3388
|
"acos",
|
|
3389
3389
|
"all",
|
|
@@ -3836,7 +3836,7 @@ function zt(e) {
|
|
|
3836
3836
|
"var_pop",
|
|
3837
3837
|
"var_samp",
|
|
3838
3838
|
"width_bucket"
|
|
3839
|
-
],
|
|
3839
|
+
], d = [
|
|
3840
3840
|
"current_catalog",
|
|
3841
3841
|
"current_date",
|
|
3842
3842
|
"current_default_transform_group",
|
|
@@ -3852,7 +3852,7 @@ function zt(e) {
|
|
|
3852
3852
|
"localtime",
|
|
3853
3853
|
"current_timestamp",
|
|
3854
3854
|
"localtimestamp"
|
|
3855
|
-
],
|
|
3855
|
+
], b = [
|
|
3856
3856
|
"create table",
|
|
3857
3857
|
"insert into",
|
|
3858
3858
|
"primary key",
|
|
@@ -3869,27 +3869,27 @@ function zt(e) {
|
|
|
3869
3869
|
"nulls last",
|
|
3870
3870
|
"depth first",
|
|
3871
3871
|
"breadth first"
|
|
3872
|
-
],
|
|
3873
|
-
...
|
|
3872
|
+
], E = p, v = [
|
|
3873
|
+
...c,
|
|
3874
3874
|
...a
|
|
3875
|
-
].filter((
|
|
3875
|
+
].filter((x) => !p.includes(x)), g = {
|
|
3876
3876
|
className: "variable",
|
|
3877
3877
|
begin: /@[a-z0-9]+/
|
|
3878
|
-
},
|
|
3878
|
+
}, m = {
|
|
3879
3879
|
className: "operator",
|
|
3880
3880
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
3881
3881
|
relevance: 0
|
|
3882
3882
|
}, S = {
|
|
3883
|
-
begin: n.concat(/\b/, n.either(...
|
|
3883
|
+
begin: n.concat(/\b/, n.either(...E), /\s*\(/),
|
|
3884
3884
|
relevance: 0,
|
|
3885
|
-
keywords: { built_in:
|
|
3885
|
+
keywords: { built_in: E }
|
|
3886
3886
|
};
|
|
3887
|
-
function x
|
|
3888
|
-
exceptions:
|
|
3887
|
+
function R(x, {
|
|
3888
|
+
exceptions: A,
|
|
3889
3889
|
when: L
|
|
3890
3890
|
} = {}) {
|
|
3891
|
-
const
|
|
3892
|
-
return
|
|
3891
|
+
const k = L;
|
|
3892
|
+
return A = A || [], x.map((M) => M.match(/\|\d+$/) || A.includes(M) ? M : k(M) ? `${M}|0` : M);
|
|
3893
3893
|
}
|
|
3894
3894
|
return {
|
|
3895
3895
|
name: "SQL",
|
|
@@ -3898,287 +3898,302 @@ function zt(e) {
|
|
|
3898
3898
|
illegal: /[{}]|<\//,
|
|
3899
3899
|
keywords: {
|
|
3900
3900
|
$pattern: /\b[\w\.]+/,
|
|
3901
|
-
keyword:
|
|
3901
|
+
keyword: R(v, { when: (x) => x.length < 3 }),
|
|
3902
3902
|
literal: l,
|
|
3903
|
-
type:
|
|
3904
|
-
built_in:
|
|
3903
|
+
type: r,
|
|
3904
|
+
built_in: d
|
|
3905
3905
|
},
|
|
3906
3906
|
contains: [
|
|
3907
3907
|
{
|
|
3908
|
-
begin: n.either(...
|
|
3908
|
+
begin: n.either(...b),
|
|
3909
3909
|
relevance: 0,
|
|
3910
3910
|
keywords: {
|
|
3911
3911
|
$pattern: /[\w\.]+/,
|
|
3912
|
-
keyword:
|
|
3912
|
+
keyword: v.concat(b),
|
|
3913
3913
|
literal: l,
|
|
3914
|
-
type:
|
|
3914
|
+
type: r
|
|
3915
3915
|
}
|
|
3916
3916
|
},
|
|
3917
3917
|
{
|
|
3918
3918
|
className: "type",
|
|
3919
|
-
begin: n.either(...
|
|
3919
|
+
begin: n.either(...i)
|
|
3920
3920
|
},
|
|
3921
3921
|
S,
|
|
3922
3922
|
g,
|
|
3923
3923
|
s,
|
|
3924
|
-
|
|
3924
|
+
o,
|
|
3925
3925
|
e.C_NUMBER_MODE,
|
|
3926
3926
|
e.C_BLOCK_COMMENT_MODE,
|
|
3927
3927
|
t,
|
|
3928
|
-
|
|
3928
|
+
m
|
|
3929
3929
|
]
|
|
3930
3930
|
};
|
|
3931
3931
|
}
|
|
3932
|
-
G.registerLanguage("xml",
|
|
3933
|
-
G.registerLanguage("javascript",
|
|
3934
|
-
G.registerLanguage("json",
|
|
3935
|
-
G.registerLanguage("yaml",
|
|
3936
|
-
G.registerLanguage("plaintext",
|
|
3937
|
-
G.registerLanguage("python",
|
|
3938
|
-
G.registerLanguage("java",
|
|
3939
|
-
G.registerLanguage("bash",
|
|
3940
|
-
G.registerLanguage("sql",
|
|
3941
|
-
var
|
|
3942
|
-
const V = "<code-diff-modified>", Y = "</code-diff-modified>",
|
|
3943
|
-
(
|
|
3932
|
+
G.registerLanguage("xml", xt);
|
|
3933
|
+
G.registerLanguage("javascript", kt);
|
|
3934
|
+
G.registerLanguage("json", Bt);
|
|
3935
|
+
G.registerLanguage("yaml", $t);
|
|
3936
|
+
G.registerLanguage("plaintext", Ut);
|
|
3937
|
+
G.registerLanguage("python", Pt);
|
|
3938
|
+
G.registerLanguage("java", Ht);
|
|
3939
|
+
G.registerLanguage("bash", zt);
|
|
3940
|
+
G.registerLanguage("sql", Ft);
|
|
3941
|
+
var y = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(y || {});
|
|
3942
|
+
const V = "<code-diff-modified>", Y = "</code-diff-modified>", Gt = V.replace("<", "<").replace(">", ">"), Kt = Y.replace("<", "<").replace(">", ">"), ae = (e) => e === void 0 ? y.EQUAL : e.added ? y.ADD : e.removed ? y.DELETE : y.EQUAL, we = (e, n, t = "word") => typeof e > "u" ? n : typeof n > "u" ? e : (t === "char" ? xn : Ln)(e, n).filter((o) => ae(o) !== y.DELETE).map(
|
|
3943
|
+
(o) => ae(o) === y.ADD ? `${V}${o.value}${Y}` : o.value
|
|
3944
3944
|
).join(""), F = (e, n) => {
|
|
3945
3945
|
if (!n.match(new RegExp(`(${V}|${Y})`, "g")))
|
|
3946
3946
|
return G.highlight(n, { language: e }).value;
|
|
3947
3947
|
let s = n;
|
|
3948
|
-
const
|
|
3949
|
-
l.innerHTML = G.highlight(
|
|
3950
|
-
let
|
|
3951
|
-
const
|
|
3952
|
-
a.childNodes.forEach((
|
|
3953
|
-
if (
|
|
3954
|
-
if (!
|
|
3948
|
+
const o = n.replace(new RegExp(`(${V}|${Y})`, "g"), ""), l = document.createElement("div");
|
|
3949
|
+
l.innerHTML = G.highlight(o, { language: e }).value;
|
|
3950
|
+
let i = !1;
|
|
3951
|
+
const r = (a) => {
|
|
3952
|
+
a.childNodes.forEach((c) => {
|
|
3953
|
+
if (c.nodeType === Node.ELEMENT_NODE && r(c), c.nodeType === Node.TEXT_NODE) {
|
|
3954
|
+
if (!c.textContent)
|
|
3955
3955
|
return;
|
|
3956
|
-
let p =
|
|
3957
|
-
for (
|
|
3956
|
+
let p = c.textContent, d = "";
|
|
3957
|
+
for (i && (d = d + V); p.length; ) {
|
|
3958
3958
|
if (s.startsWith(V)) {
|
|
3959
|
-
s = s.slice(V.length),
|
|
3959
|
+
s = s.slice(V.length), d = d + V, i = !0;
|
|
3960
3960
|
continue;
|
|
3961
3961
|
}
|
|
3962
3962
|
if (s.startsWith(Y)) {
|
|
3963
|
-
s = s.slice(Y.length),
|
|
3963
|
+
s = s.slice(Y.length), d = d + Y, i = !1;
|
|
3964
3964
|
continue;
|
|
3965
3965
|
}
|
|
3966
|
-
const
|
|
3967
|
-
|
|
3966
|
+
const b = s.match(new RegExp(`(${V}|${Y})`)), E = b && b.index ? b.index : s.length, v = Math.min(E, p.length);
|
|
3967
|
+
d = d + s.substring(0, v), s = s.slice(v), p = p.slice(v);
|
|
3968
3968
|
}
|
|
3969
|
-
|
|
3969
|
+
i && (d = d + Y), c.textContent = d;
|
|
3970
3970
|
}
|
|
3971
3971
|
});
|
|
3972
3972
|
};
|
|
3973
|
-
return
|
|
3973
|
+
return r(l), l.innerHTML.replace(new RegExp(Gt, "g"), '<span class="x">').replace(new RegExp(Kt, "g"), "</span>");
|
|
3974
3974
|
};
|
|
3975
|
-
function
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3975
|
+
function En(e) {
|
|
3976
|
+
const n = (o, l) => (o.match(new RegExp(l, "g")) || []).length;
|
|
3977
|
+
let t = 0, s = 0;
|
|
3978
|
+
for (const o of e)
|
|
3979
|
+
o.added && (t += n(o.value.trim(), `
|
|
3980
|
+
`) + 1), o.removed && (s += n(o.value.trim(), `
|
|
3981
|
+
`) + 1);
|
|
3982
|
+
return { additionsNum: t, deletionsNum: s };
|
|
3983
|
+
}
|
|
3984
|
+
function Wt(e, n, t = "plaintext", s = "word", o = 10) {
|
|
3985
|
+
var v;
|
|
3986
|
+
const l = () => ({ type: y.EMPTY }), i = (g, m, S) => ({ type: g, num: m, code: S }), r = tn(e, n);
|
|
3987
|
+
let a = 0, c = 0, p = !1;
|
|
3988
|
+
const d = [], b = {
|
|
3989
|
+
changes: d,
|
|
3990
|
+
stat: En(r)
|
|
3991
|
+
};
|
|
3992
|
+
for (let g = 0; g < r.length; g++) {
|
|
3981
3993
|
if (p) {
|
|
3982
3994
|
p = !1;
|
|
3983
3995
|
continue;
|
|
3984
3996
|
}
|
|
3985
|
-
const [
|
|
3997
|
+
const [m, S] = [r[g], r[g + 1]], [R, x] = [ae(m), ae(S)], A = m.value.replace(/\n$/, "").split(`
|
|
3986
3998
|
`);
|
|
3987
|
-
if (
|
|
3988
|
-
for (const
|
|
3989
|
-
let
|
|
3990
|
-
const
|
|
3991
|
-
|
|
3999
|
+
if (S === void 0) {
|
|
4000
|
+
for (const k of A) {
|
|
4001
|
+
let M = l(), z = l();
|
|
4002
|
+
const B = F(t, k);
|
|
4003
|
+
R === y.EQUAL && (a++, c++, M = i(y.EQUAL, a, B), z = i(y.EQUAL, c, B)), R === y.DELETE && (a++, M = i(y.DELETE, a, B), z = l()), R === y.ADD && (c++, M = l(), z = i(y.ADD, c, B)), d.push({ left: M, right: z });
|
|
3992
4004
|
}
|
|
3993
4005
|
break;
|
|
3994
4006
|
}
|
|
3995
|
-
if (
|
|
3996
|
-
for (const
|
|
3997
|
-
a++,
|
|
3998
|
-
const
|
|
3999
|
-
|
|
4000
|
-
left:
|
|
4001
|
-
right:
|
|
4007
|
+
if (R === y.EQUAL)
|
|
4008
|
+
for (const k of A) {
|
|
4009
|
+
a++, c++;
|
|
4010
|
+
const M = F(t, k);
|
|
4011
|
+
d.push({
|
|
4012
|
+
left: i(y.EQUAL, a, M),
|
|
4013
|
+
right: i(y.EQUAL, c, M)
|
|
4002
4014
|
});
|
|
4003
4015
|
}
|
|
4004
|
-
const
|
|
4016
|
+
const L = S.value.replace(/\n$/, "").split(`
|
|
4005
4017
|
`);
|
|
4006
|
-
if (
|
|
4007
|
-
if (x ===
|
|
4008
|
-
for (const
|
|
4009
|
-
a++,
|
|
4010
|
-
left:
|
|
4018
|
+
if (R === y.DELETE) {
|
|
4019
|
+
if (x === y.EQUAL)
|
|
4020
|
+
for (const k of A)
|
|
4021
|
+
a++, d.push({
|
|
4022
|
+
left: i(y.DELETE, a, F(t, k)),
|
|
4011
4023
|
right: l()
|
|
4012
4024
|
});
|
|
4013
|
-
if (x ===
|
|
4025
|
+
if (x === y.ADD) {
|
|
4014
4026
|
p = !0;
|
|
4015
|
-
const
|
|
4016
|
-
for (let
|
|
4017
|
-
|
|
4018
|
-
const [
|
|
4019
|
-
|
|
4027
|
+
const k = Math.max(m.count, S.count);
|
|
4028
|
+
for (let M = 0; M < k; M++) {
|
|
4029
|
+
M < m.count && a++, M < S.count && c++;
|
|
4030
|
+
const [z, B] = [A[M], L[M]], ne = A.length === L.length ? we(B, z, s) : z, te = A.length === L.length ? we(z, B, s) : B, oe = M < m.count ? i(y.DELETE, a, F(t, ne)) : l(), ce = M < S.count ? i(y.ADD, c, F(t, te)) : l();
|
|
4031
|
+
d.push({ left: oe, right: ce });
|
|
4020
4032
|
}
|
|
4021
4033
|
}
|
|
4022
4034
|
}
|
|
4023
|
-
if (
|
|
4024
|
-
for (const
|
|
4025
|
-
|
|
4035
|
+
if (R === y.ADD)
|
|
4036
|
+
for (const k of A)
|
|
4037
|
+
c++, d.push({
|
|
4026
4038
|
left: l(),
|
|
4027
|
-
right:
|
|
4039
|
+
right: i(y.ADD, c, F(t, k))
|
|
4028
4040
|
});
|
|
4029
4041
|
}
|
|
4030
4042
|
if (e === n) {
|
|
4031
|
-
for (let
|
|
4032
|
-
|
|
4033
|
-
return
|
|
4043
|
+
for (let g = 0; g < d.length; g++)
|
|
4044
|
+
d[g].fold = !1;
|
|
4045
|
+
return b;
|
|
4034
4046
|
}
|
|
4035
|
-
for (let
|
|
4036
|
-
const
|
|
4037
|
-
if (
|
|
4038
|
-
const [
|
|
4039
|
-
for (let x =
|
|
4040
|
-
|
|
4047
|
+
for (let g = 0; g < d.length; g++) {
|
|
4048
|
+
const m = d[g];
|
|
4049
|
+
if (m.left.type === y.DELETE || m.right.type === y.ADD) {
|
|
4050
|
+
const [S, R] = [Math.max(g - o, 0), Math.min(g + o + 1, d.length)];
|
|
4051
|
+
for (let x = S; x < R; x++)
|
|
4052
|
+
d[x].fold = !1;
|
|
4041
4053
|
}
|
|
4042
|
-
|
|
4054
|
+
m.fold === void 0 && (m.fold = !0);
|
|
4043
4055
|
}
|
|
4044
|
-
const
|
|
4045
|
-
for (let
|
|
4046
|
-
const
|
|
4047
|
-
if (
|
|
4048
|
-
|
|
4056
|
+
const E = [];
|
|
4057
|
+
for (let g = 0; g < d.length; g++) {
|
|
4058
|
+
const m = d[g];
|
|
4059
|
+
if (m.fold === !1) {
|
|
4060
|
+
E.push(m);
|
|
4049
4061
|
continue;
|
|
4050
4062
|
}
|
|
4051
|
-
|
|
4063
|
+
m.fold === !0 && ((v = E[E.length - 1]) == null ? void 0 : v.fold) !== !0 && E.push(m);
|
|
4052
4064
|
}
|
|
4053
|
-
return
|
|
4065
|
+
return b.changes = E, b;
|
|
4054
4066
|
}
|
|
4055
|
-
function
|
|
4056
|
-
var
|
|
4067
|
+
function Vt(e, n, t = "plaintext", s = "word", o = 2) {
|
|
4068
|
+
var b;
|
|
4057
4069
|
const l = tn(e, n);
|
|
4058
|
-
let
|
|
4059
|
-
const
|
|
4060
|
-
|
|
4070
|
+
let i = 0, r = 0, a = !1;
|
|
4071
|
+
const c = [], p = {
|
|
4072
|
+
changes: c,
|
|
4073
|
+
stat: En(l)
|
|
4074
|
+
};
|
|
4075
|
+
for (let E = 0; E < l.length; E++) {
|
|
4061
4076
|
if (a) {
|
|
4062
4077
|
a = !1;
|
|
4063
4078
|
continue;
|
|
4064
4079
|
}
|
|
4065
|
-
const [
|
|
4080
|
+
const [v, g] = [l[E], l[E + 1]], [m, S] = [ae(v), ae(g)], R = v.value.replace(/\n$/, "").split(`
|
|
4066
4081
|
`);
|
|
4067
|
-
if (
|
|
4068
|
-
for (const
|
|
4069
|
-
|
|
4070
|
-
const
|
|
4071
|
-
|
|
4072
|
-
type:
|
|
4073
|
-
code:
|
|
4074
|
-
addNum:
|
|
4075
|
-
delNum:
|
|
4082
|
+
if (g === void 0) {
|
|
4083
|
+
for (const A of R) {
|
|
4084
|
+
m === y.EQUAL && (i++, r++), m === y.DELETE && i++, m === y.ADD && r++;
|
|
4085
|
+
const L = F(t, A);
|
|
4086
|
+
c.push({
|
|
4087
|
+
type: m,
|
|
4088
|
+
code: L,
|
|
4089
|
+
addNum: m === y.DELETE ? void 0 : r,
|
|
4090
|
+
delNum: m === y.ADD ? void 0 : i
|
|
4076
4091
|
});
|
|
4077
4092
|
}
|
|
4078
4093
|
break;
|
|
4079
4094
|
}
|
|
4080
|
-
if (
|
|
4081
|
-
for (const
|
|
4082
|
-
|
|
4083
|
-
const
|
|
4084
|
-
|
|
4095
|
+
if (m === y.EQUAL)
|
|
4096
|
+
for (const A of R) {
|
|
4097
|
+
i++, r++;
|
|
4098
|
+
const L = F(t, A);
|
|
4099
|
+
c.push({ type: y.EQUAL, code: L, delNum: i, addNum: r });
|
|
4085
4100
|
}
|
|
4086
|
-
const x =
|
|
4101
|
+
const x = g.value.replace(/\n$/, "").split(`
|
|
4087
4102
|
`);
|
|
4088
|
-
if (
|
|
4089
|
-
if (
|
|
4090
|
-
for (let
|
|
4091
|
-
const
|
|
4092
|
-
r++;
|
|
4093
|
-
const D = F(t, Ae(L, M, s));
|
|
4094
|
-
o.push({ type: m.DELETE, code: D, delNum: r });
|
|
4095
|
-
}
|
|
4096
|
-
for (let y = 0; y < x.length; y++) {
|
|
4097
|
-
const M = S[y], L = x[y];
|
|
4103
|
+
if (m === y.DELETE)
|
|
4104
|
+
if (S === y.ADD && R.length === x.length) {
|
|
4105
|
+
for (let A = 0; A < R.length; A++) {
|
|
4106
|
+
const L = R[A], k = x[A];
|
|
4098
4107
|
i++;
|
|
4099
|
-
const
|
|
4100
|
-
|
|
4108
|
+
const M = F(t, we(k, L, s));
|
|
4109
|
+
c.push({ type: y.DELETE, code: M, delNum: i });
|
|
4110
|
+
}
|
|
4111
|
+
for (let A = 0; A < x.length; A++) {
|
|
4112
|
+
const L = R[A], k = x[A];
|
|
4113
|
+
r++;
|
|
4114
|
+
const M = F(t, we(L, k, s));
|
|
4115
|
+
c.push({ type: y.ADD, code: M, addNum: r });
|
|
4101
4116
|
}
|
|
4102
4117
|
a = !0;
|
|
4103
4118
|
} else
|
|
4104
|
-
for (const
|
|
4105
|
-
|
|
4106
|
-
const
|
|
4107
|
-
|
|
4119
|
+
for (const A of R) {
|
|
4120
|
+
i++;
|
|
4121
|
+
const L = F(t, A);
|
|
4122
|
+
c.push({ type: y.DELETE, code: L, delNum: i });
|
|
4108
4123
|
}
|
|
4109
|
-
if (
|
|
4110
|
-
for (const
|
|
4111
|
-
|
|
4112
|
-
const
|
|
4113
|
-
|
|
4124
|
+
if (m === y.ADD)
|
|
4125
|
+
for (const A of R) {
|
|
4126
|
+
r++;
|
|
4127
|
+
const L = F(t, A);
|
|
4128
|
+
c.push({ type: y.ADD, code: L, addNum: r });
|
|
4114
4129
|
}
|
|
4115
4130
|
}
|
|
4116
|
-
for (let
|
|
4117
|
-
const
|
|
4118
|
-
if (
|
|
4119
|
-
const [
|
|
4120
|
-
for (let
|
|
4121
|
-
|
|
4131
|
+
for (let E = 0; E < c.length; E++) {
|
|
4132
|
+
const v = c[E];
|
|
4133
|
+
if (v.type === y.DELETE || v.type === y.ADD) {
|
|
4134
|
+
const [g, m] = [Math.max(E - o, 0), Math.min(E + o + 1, c.length)];
|
|
4135
|
+
for (let S = g; S < m; S++)
|
|
4136
|
+
c[S].fold = !1;
|
|
4122
4137
|
}
|
|
4123
|
-
|
|
4138
|
+
v.fold === void 0 && (v.fold = !0);
|
|
4124
4139
|
}
|
|
4125
4140
|
if (e === n) {
|
|
4126
|
-
for (let
|
|
4127
|
-
|
|
4128
|
-
return
|
|
4141
|
+
for (let E = 0; E < c.length; E++)
|
|
4142
|
+
c[E].fold = !1;
|
|
4143
|
+
return p;
|
|
4129
4144
|
}
|
|
4130
|
-
const
|
|
4131
|
-
for (let
|
|
4132
|
-
const
|
|
4133
|
-
if (
|
|
4134
|
-
|
|
4145
|
+
const d = [];
|
|
4146
|
+
for (let E = 0; E < c.length; E++) {
|
|
4147
|
+
const v = c[E];
|
|
4148
|
+
if (v.fold === !1) {
|
|
4149
|
+
d.push(v);
|
|
4135
4150
|
continue;
|
|
4136
4151
|
}
|
|
4137
|
-
|
|
4152
|
+
v.fold === !0 && (E === 0 || ((b = d[d.length - 1]) == null ? void 0 : b.fold) !== !0) && d.push(v);
|
|
4138
4153
|
}
|
|
4139
|
-
return p;
|
|
4154
|
+
return p.changes = d, p;
|
|
4140
4155
|
}
|
|
4141
|
-
const
|
|
4156
|
+
const Yt = /* @__PURE__ */ ge({
|
|
4142
4157
|
__name: "UnifiedLine",
|
|
4143
4158
|
props: {
|
|
4144
4159
|
line: null
|
|
4145
4160
|
},
|
|
4146
4161
|
setup(e) {
|
|
4147
|
-
return { __sfc: !0, props: e, getCodeMarker: (s) => s ===
|
|
4162
|
+
return { __sfc: !0, props: e, getCodeMarker: (s) => s === y.DELETE ? "-" : s === y.ADD ? "+" : "", DiffType: y };
|
|
4148
4163
|
}
|
|
4149
4164
|
});
|
|
4150
|
-
function
|
|
4165
|
+
function pe(e, n, t, s, o, l, i, r) {
|
|
4151
4166
|
var a = typeof e == "function" ? e.options : e;
|
|
4152
4167
|
n && (a.render = n, a.staticRenderFns = t, a._compiled = !0), s && (a.functional = !0), l && (a._scopeId = "data-v-" + l);
|
|
4153
|
-
var
|
|
4154
|
-
if (
|
|
4155
|
-
|
|
4168
|
+
var c;
|
|
4169
|
+
if (i ? (c = function(b) {
|
|
4170
|
+
b = b || // cached call
|
|
4156
4171
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
4157
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !
|
|
4158
|
-
}, a._ssrRegister =
|
|
4159
|
-
|
|
4172
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !b && typeof __VUE_SSR_CONTEXT__ < "u" && (b = __VUE_SSR_CONTEXT__), o && o.call(this, b), b && b._registeredComponents && b._registeredComponents.add(i);
|
|
4173
|
+
}, a._ssrRegister = c) : o && (c = r ? function() {
|
|
4174
|
+
o.call(
|
|
4160
4175
|
this,
|
|
4161
4176
|
(a.functional ? this.parent : this).$root.$options.shadowRoot
|
|
4162
4177
|
);
|
|
4163
|
-
} :
|
|
4178
|
+
} : o), c)
|
|
4164
4179
|
if (a.functional) {
|
|
4165
|
-
a._injectStyles =
|
|
4180
|
+
a._injectStyles = c;
|
|
4166
4181
|
var p = a.render;
|
|
4167
|
-
a.render = function(
|
|
4168
|
-
return
|
|
4182
|
+
a.render = function(E, v) {
|
|
4183
|
+
return c.call(v), p(E, v);
|
|
4169
4184
|
};
|
|
4170
4185
|
} else {
|
|
4171
|
-
var
|
|
4172
|
-
a.beforeCreate =
|
|
4186
|
+
var d = a.beforeCreate;
|
|
4187
|
+
a.beforeCreate = d ? [].concat(d, c) : [c];
|
|
4173
4188
|
}
|
|
4174
4189
|
return {
|
|
4175
4190
|
exports: e,
|
|
4176
4191
|
options: a
|
|
4177
4192
|
};
|
|
4178
4193
|
}
|
|
4179
|
-
var
|
|
4194
|
+
var Zt = function() {
|
|
4180
4195
|
var n = this, t = n._self._c, s = n._self._setupProxy;
|
|
4181
|
-
return n.line.fold ? t("tr", [t("td", { staticClass: "blob-num blob-num-
|
|
4196
|
+
return n.line.fold ? t("tr", [t("td", { staticClass: "blob-num blob-num-hunk" }, [n._v(" > ")]), t("td", { staticClass: "blob-num blob-num-hunk" }, [n._v(" > ")]), t("td", { staticClass: "blob-code blob-code-hunk", attrs: { align: "left" } }, [n._v(" ⋯ ")])]) : t("tr", [t("td", { staticClass: "blob-num", class: {
|
|
4182
4197
|
"blob-num-deletion": n.line.type === s.DiffType.DELETE,
|
|
4183
4198
|
"blob-num-addition": n.line.type === s.DiffType.ADD,
|
|
4184
4199
|
"blob-num-context": n.line.type === s.DiffType.EQUAL
|
|
@@ -4191,65 +4206,65 @@ var Yt = function() {
|
|
|
4191
4206
|
"blob-code-addition": n.line.type === s.DiffType.ADD,
|
|
4192
4207
|
"blob-code-context": n.line.type === s.DiffType.EQUAL
|
|
4193
4208
|
} }, [t("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": s.getCodeMarker(n.line.type) }, domProps: { innerHTML: n._s(n.line.code) } })])]);
|
|
4194
|
-
},
|
|
4195
|
-
Vt,
|
|
4209
|
+
}, Qt = [], Xt = /* @__PURE__ */ pe(
|
|
4196
4210
|
Yt,
|
|
4197
4211
|
Zt,
|
|
4212
|
+
Qt,
|
|
4198
4213
|
!1,
|
|
4199
4214
|
null,
|
|
4200
4215
|
null,
|
|
4201
4216
|
null,
|
|
4202
4217
|
null
|
|
4203
4218
|
);
|
|
4204
|
-
const
|
|
4219
|
+
const qt = Xt.exports, jt = /* @__PURE__ */ ge({
|
|
4205
4220
|
__name: "UnifiedViewer",
|
|
4206
4221
|
props: {
|
|
4207
4222
|
diffChange: null
|
|
4208
4223
|
},
|
|
4209
4224
|
setup(e) {
|
|
4210
|
-
return { __sfc: !0, props: e, UnifiedLine:
|
|
4225
|
+
return { __sfc: !0, props: e, UnifiedLine: qt };
|
|
4211
4226
|
}
|
|
4212
4227
|
});
|
|
4213
|
-
var
|
|
4228
|
+
var Jt = function() {
|
|
4214
4229
|
var n = this, t = n._self._c, s = n._self._setupProxy;
|
|
4215
|
-
return t("table", { staticClass: "diff-table" }, [t("tbody", n._l(n.diffChange, function(
|
|
4216
|
-
return t(s.UnifiedLine, { key: l, attrs: { line:
|
|
4230
|
+
return t("table", { staticClass: "diff-table" }, [t("tbody", n._l(n.diffChange, function(o, l) {
|
|
4231
|
+
return t(s.UnifiedLine, { key: l, attrs: { line: o } });
|
|
4217
4232
|
}), 1)]);
|
|
4218
|
-
},
|
|
4219
|
-
qt,
|
|
4233
|
+
}, es = [], ns = /* @__PURE__ */ pe(
|
|
4220
4234
|
jt,
|
|
4221
4235
|
Jt,
|
|
4236
|
+
es,
|
|
4222
4237
|
!1,
|
|
4223
4238
|
null,
|
|
4224
4239
|
"76069310",
|
|
4225
4240
|
null,
|
|
4226
4241
|
null
|
|
4227
4242
|
);
|
|
4228
|
-
const
|
|
4243
|
+
const ts = ns.exports, ss = /* @__PURE__ */ ge({
|
|
4229
4244
|
__name: "SplitLine",
|
|
4230
4245
|
props: {
|
|
4231
4246
|
splitLine: null
|
|
4232
4247
|
},
|
|
4233
4248
|
setup(e) {
|
|
4234
|
-
return { __sfc: !0, props: e, getCodeMarker: (s) => s ===
|
|
4249
|
+
return { __sfc: !0, props: e, getCodeMarker: (s) => s === y.DELETE ? "-" : s === y.ADD ? "+" : "", DiffType: y };
|
|
4235
4250
|
}
|
|
4236
4251
|
});
|
|
4237
|
-
var
|
|
4252
|
+
var is = function() {
|
|
4238
4253
|
var n = this, t = n._self._c, s = n._self._setupProxy;
|
|
4239
|
-
return n.splitLine.fold ? t("tr", [t("td", { staticClass: "blob-num blob-num-
|
|
4240
|
-
return [
|
|
4241
|
-
"blob-num-deletion":
|
|
4242
|
-
"blob-num-addition":
|
|
4243
|
-
"blob-num-context":
|
|
4244
|
-
} }, [n._v(" " + n._s(
|
|
4245
|
-
"blob-code-deletion":
|
|
4246
|
-
"blob-code-addition":
|
|
4247
|
-
"blob-code-context":
|
|
4248
|
-
} }, [t("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": s.getCodeMarker(
|
|
4254
|
+
return n.splitLine.fold ? t("tr", [t("td", { staticClass: "blob-num blob-num-hunk", attrs: { colspan: "1" } }, [n._v(" > ")]), t("td", { staticClass: "blob-code blob-code-inner blob-code-hunk", attrs: { colspan: "3", align: "left" } }, [n._v(" ⋯ ")])]) : t("tr", [n._l([n.splitLine.left, n.splitLine.right], function(o) {
|
|
4255
|
+
return [o.type === s.DiffType.EMPTY ? [t("td", { staticClass: "blob-num blob-num-empty empty-cell" }), t("td", { staticClass: "blob-code blob-code-empty empty-cell" })] : [t("td", { staticClass: "blob-num", class: {
|
|
4256
|
+
"blob-num-deletion": o.type === s.DiffType.DELETE,
|
|
4257
|
+
"blob-num-addition": o.type === s.DiffType.ADD,
|
|
4258
|
+
"blob-num-context": o.type === s.DiffType.EQUAL
|
|
4259
|
+
} }, [n._v(" " + n._s(o.num) + " ")]), t("td", { staticClass: "blob-code", class: {
|
|
4260
|
+
"blob-code-deletion": o.type === s.DiffType.DELETE,
|
|
4261
|
+
"blob-code-addition": o.type === s.DiffType.ADD,
|
|
4262
|
+
"blob-code-context": o.type === s.DiffType.EQUAL
|
|
4263
|
+
} }, [t("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": s.getCodeMarker(o.type) }, domProps: { innerHTML: n._s(o.code) } })])]];
|
|
4249
4264
|
})], 2);
|
|
4250
|
-
}, rs = [],
|
|
4251
|
-
ts,
|
|
4265
|
+
}, rs = [], as = /* @__PURE__ */ pe(
|
|
4252
4266
|
ss,
|
|
4267
|
+
is,
|
|
4253
4268
|
rs,
|
|
4254
4269
|
!1,
|
|
4255
4270
|
null,
|
|
@@ -4257,35 +4272,35 @@ var ss = function() {
|
|
|
4257
4272
|
null,
|
|
4258
4273
|
null
|
|
4259
4274
|
);
|
|
4260
|
-
const
|
|
4275
|
+
const os = as.exports, cs = /* @__PURE__ */ ge({
|
|
4261
4276
|
__name: "SplitViewer",
|
|
4262
4277
|
props: {
|
|
4263
4278
|
diffChange: null
|
|
4264
4279
|
},
|
|
4265
4280
|
setup(e) {
|
|
4266
|
-
return { __sfc: !0, props: e, SplitLine:
|
|
4281
|
+
return { __sfc: !0, props: e, SplitLine: os };
|
|
4267
4282
|
}
|
|
4268
4283
|
});
|
|
4269
|
-
var
|
|
4284
|
+
var ls = function() {
|
|
4270
4285
|
var n = this, t = n._self._c, s = n._self._setupProxy;
|
|
4271
|
-
return t("table", { staticClass: "file-diff-split diff-table" }, [n._m(0), t("tbody", n._l(n.diffChange, function(
|
|
4272
|
-
return t(s.SplitLine, { key: l, attrs: { "split-line":
|
|
4286
|
+
return t("table", { staticClass: "file-diff-split diff-table" }, [n._m(0), t("tbody", n._l(n.diffChange, function(o, l) {
|
|
4287
|
+
return t(s.SplitLine, { key: l, attrs: { "split-line": o } });
|
|
4273
4288
|
}), 1)]);
|
|
4274
|
-
},
|
|
4289
|
+
}, us = [function() {
|
|
4275
4290
|
var e = this, n = e._self._c;
|
|
4276
4291
|
return e._self._setupProxy, n("colgroup", [n("col", { attrs: { width: "44" } }), n("col"), n("col", { attrs: { width: "44" } }), n("col")]);
|
|
4277
|
-
}],
|
|
4278
|
-
os,
|
|
4292
|
+
}], fs = /* @__PURE__ */ pe(
|
|
4279
4293
|
cs,
|
|
4280
4294
|
ls,
|
|
4295
|
+
us,
|
|
4281
4296
|
!1,
|
|
4282
4297
|
null,
|
|
4283
4298
|
"0c23c064",
|
|
4284
4299
|
null,
|
|
4285
4300
|
null
|
|
4286
4301
|
);
|
|
4287
|
-
const
|
|
4288
|
-
const
|
|
4302
|
+
const ds = fs.exports;
|
|
4303
|
+
const gs = /* @__PURE__ */ ge({
|
|
4289
4304
|
__name: "CodeDiff",
|
|
4290
4305
|
props: {
|
|
4291
4306
|
newString: null,
|
|
@@ -4296,43 +4311,44 @@ const ds = /* @__PURE__ */ de({
|
|
|
4296
4311
|
outputFormat: { default: "line-by-line" },
|
|
4297
4312
|
trim: { type: Boolean, default: !1 },
|
|
4298
4313
|
noDiffLineFeed: { type: Boolean, default: !1 },
|
|
4299
|
-
maxHeight: { default: void 0 }
|
|
4314
|
+
maxHeight: { default: void 0 },
|
|
4315
|
+
filename: { default: void 0 }
|
|
4300
4316
|
},
|
|
4301
4317
|
setup(e) {
|
|
4302
|
-
const n = e, t =
|
|
4303
|
-
const
|
|
4304
|
-
return n.noDiffLineFeed ?
|
|
4305
|
-
`) :
|
|
4306
|
-
}),
|
|
4307
|
-
const
|
|
4308
|
-
return n.noDiffLineFeed ?
|
|
4309
|
-
`) :
|
|
4310
|
-
}), l =
|
|
4311
|
-
() => t.value ?
|
|
4318
|
+
const n = e, t = me(() => n.outputFormat === "line-by-line"), s = me(() => {
|
|
4319
|
+
const i = n.trim ? n.oldString.trim() : n.oldString;
|
|
4320
|
+
return n.noDiffLineFeed ? i.replace(/(\r\n)/g, `
|
|
4321
|
+
`) : i;
|
|
4322
|
+
}), o = me(() => {
|
|
4323
|
+
const i = n.trim ? n.newString.trim() : n.newString;
|
|
4324
|
+
return n.noDiffLineFeed ? i.replace(/(\r\n)/g, `
|
|
4325
|
+
`) : i;
|
|
4326
|
+
}), l = me(
|
|
4327
|
+
() => t.value ? Vt(s.value, o.value, n.language, n.diffStyle, n.context) : Wt(s.value, o.value, n.language, n.diffStyle, n.context)
|
|
4312
4328
|
);
|
|
4313
|
-
return { __sfc: !0, props: n, isUnifiedViewer: t, oldString: s, newString:
|
|
4329
|
+
return { __sfc: !0, props: n, isUnifiedViewer: t, oldString: s, newString: o, diffChange: l, UnifiedViewer: ts, SplitViewer: ds };
|
|
4314
4330
|
}
|
|
4315
4331
|
});
|
|
4316
|
-
var
|
|
4332
|
+
var ps = function() {
|
|
4317
4333
|
var n = this, t = n._self._c, s = n._self._setupProxy;
|
|
4318
|
-
return t("div", { staticClass: "code-diff-view", style: { maxHeight: n.maxHeight } }, [s.isUnifiedViewer ? t(s.UnifiedViewer, { attrs: { "diff-change": s.diffChange } }) : t(s.SplitViewer, { attrs: { "diff-change": s.diffChange } })], 1);
|
|
4319
|
-
},
|
|
4320
|
-
ds,
|
|
4334
|
+
return t("div", { staticClass: "code-diff-view", style: { maxHeight: n.maxHeight } }, [t("div", { staticClass: "file-header" }, [t("div", { staticClass: "file-info" }, [t("span", { staticClass: "filename" }, [n._v(n._s(n.filename))]), t("span", { staticClass: "diff-stat" }, [t("span", { staticClass: "diff-stat-added" }, [n._v("+" + n._s(s.diffChange.stat.additionsNum) + " additions")]), t("span", { staticClass: "diff-stat-deleted", staticStyle: { "margin-left": "8px" } }, [n._v("-" + n._s(s.diffChange.stat.deletionsNum) + " deletions")])])])]), s.isUnifiedViewer ? t(s.UnifiedViewer, { attrs: { "diff-change": s.diffChange.changes } }) : t(s.SplitViewer, { attrs: { "diff-change": s.diffChange.changes } })], 1);
|
|
4335
|
+
}, _s = [], hs = /* @__PURE__ */ pe(
|
|
4321
4336
|
gs,
|
|
4322
4337
|
ps,
|
|
4338
|
+
_s,
|
|
4323
4339
|
!1,
|
|
4324
4340
|
null,
|
|
4325
4341
|
null,
|
|
4326
4342
|
null,
|
|
4327
4343
|
null
|
|
4328
4344
|
);
|
|
4329
|
-
const bs =
|
|
4345
|
+
const bs = hs.exports, Es = (e) => {
|
|
4330
4346
|
e.component("CodeDiff", bs);
|
|
4331
|
-
},
|
|
4332
|
-
install:
|
|
4347
|
+
}, ys = {
|
|
4348
|
+
install: Es,
|
|
4333
4349
|
hljs: G
|
|
4334
4350
|
};
|
|
4335
4351
|
export {
|
|
4336
4352
|
bs as CodeDiff,
|
|
4337
|
-
|
|
4353
|
+
ys as default
|
|
4338
4354
|
};
|