v-code-diff 0.3.12 → 1.0.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.
@@ -0,0 +1,4315 @@
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".file{--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:static}.code-diff-view .file{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:2px}.code-diff-view .file table{border-spacing:0}.code-diff-view .file .diff-table{width:100%}.code-diff-view .file .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 .file .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 .file .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 .file .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .file .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 .file .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .file .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 .file .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .file .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 .file .diff-table .blob-code-context,.code-diff-view .file .diff-table .blob-code-addition,.code-diff-view .file .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .file .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .file .file-diff-split{table-layout:fixed}.code-diff-view .file .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { defineComponent as _e, openBlock as P, createElementBlock as G, createElementVNode as k, normalizeClass as ge, unref as $, toDisplayString as $e, Fragment as ue, renderList as He, createBlock as Re, computed as ve } from "vue";
3
+ function j() {
4
+ }
5
+ j.prototype = {
6
+ diff: function(n, t) {
7
+ var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = s.callback;
8
+ typeof s == "function" && (c = s, s = {}), this.options = s;
9
+ var l = this;
10
+ function i(d) {
11
+ return c ? (setTimeout(function() {
12
+ c(void 0, d);
13
+ }, 0), !0) : d;
14
+ }
15
+ n = this.castInput(n), t = this.castInput(t), n = this.removeEmpty(this.tokenize(n)), t = this.removeEmpty(this.tokenize(t));
16
+ var r = t.length, a = n.length, o = 1, b = r + a;
17
+ s.maxEditLength && (b = Math.min(b, s.maxEditLength));
18
+ var E = [{
19
+ newPos: -1,
20
+ components: []
21
+ }], p = this.extractCommon(E[0], t, n, 0);
22
+ if (E[0].newPos + 1 >= r && p + 1 >= a)
23
+ return i([{
24
+ value: this.join(t),
25
+ count: t.length
26
+ }]);
27
+ function v() {
28
+ for (var d = -1 * o; d <= o; d += 2) {
29
+ var T = void 0, S = E[d - 1], x = E[d + 1], y = (x ? x.newPos : 0) - d;
30
+ S && (E[d - 1] = void 0);
31
+ var R = S && S.newPos + 1 < r, L = x && 0 <= y && y < a;
32
+ if (!R && !L) {
33
+ E[d] = void 0;
34
+ continue;
35
+ }
36
+ if (!R || L && S.newPos < x.newPos ? (T = In(x), l.pushComponent(T.components, void 0, !0)) : (T = S, T.newPos++, l.pushComponent(T.components, !0, void 0)), y = l.extractCommon(T, t, n, d), T.newPos + 1 >= r && y + 1 >= a)
37
+ return i(Cn(l, T.components, t, n, l.useLongestToken));
38
+ E[d] = T;
39
+ }
40
+ o++;
41
+ }
42
+ if (c)
43
+ (function d() {
44
+ setTimeout(function() {
45
+ if (o > b)
46
+ return c();
47
+ v() || d();
48
+ }, 0);
49
+ })();
50
+ else
51
+ for (; o <= b; ) {
52
+ var m = v();
53
+ if (m)
54
+ return m;
55
+ }
56
+ },
57
+ pushComponent: function(n, t, s) {
58
+ var c = n[n.length - 1];
59
+ c && c.added === t && c.removed === s ? n[n.length - 1] = {
60
+ count: c.count + 1,
61
+ added: t,
62
+ removed: s
63
+ } : n.push({
64
+ count: 1,
65
+ added: t,
66
+ removed: s
67
+ });
68
+ },
69
+ extractCommon: function(n, t, s, c) {
70
+ for (var l = t.length, i = s.length, r = n.newPos, a = r - c, o = 0; r + 1 < l && a + 1 < i && this.equals(t[r + 1], s[a + 1]); )
71
+ r++, a++, o++;
72
+ return o && n.components.push({
73
+ count: o
74
+ }), n.newPos = r, a;
75
+ },
76
+ equals: function(n, t) {
77
+ return this.options.comparator ? this.options.comparator(n, t) : n === t || this.options.ignoreCase && n.toLowerCase() === t.toLowerCase();
78
+ },
79
+ removeEmpty: function(n) {
80
+ for (var t = [], s = 0; s < n.length; s++)
81
+ n[s] && t.push(n[s]);
82
+ return t;
83
+ },
84
+ castInput: function(n) {
85
+ return n;
86
+ },
87
+ tokenize: function(n) {
88
+ return n.split("");
89
+ },
90
+ join: function(n) {
91
+ return n.join("");
92
+ }
93
+ };
94
+ function Cn(e, n, t, s, c) {
95
+ for (var l = 0, i = n.length, r = 0, a = 0; l < i; l++) {
96
+ var o = n[l];
97
+ if (o.removed) {
98
+ if (o.value = e.join(s.slice(a, a + o.count)), a += o.count, l && n[l - 1].added) {
99
+ var E = n[l - 1];
100
+ n[l - 1] = n[l], n[l] = E;
101
+ }
102
+ } else {
103
+ if (!o.added && c) {
104
+ var b = t.slice(r, r + o.count);
105
+ b = b.map(function(v, m) {
106
+ var d = s[a + m];
107
+ return d.length > v.length ? d : v;
108
+ }), o.value = e.join(b);
109
+ } else
110
+ o.value = e.join(t.slice(r, r + o.count));
111
+ r += o.count, o.added || (a += o.count);
112
+ }
113
+ }
114
+ var p = n[i - 1];
115
+ return i > 1 && typeof p.value == "string" && (p.added || p.removed) && e.equals("", p.value) && (n[i - 2].value += p.value, n.pop()), n;
116
+ }
117
+ function In(e) {
118
+ return {
119
+ newPos: e.newPos,
120
+ components: e.components.slice(0)
121
+ };
122
+ }
123
+ var kn = new j();
124
+ function Bn(e, n, t) {
125
+ return kn.diff(e, n, t);
126
+ }
127
+ function $n(e, n) {
128
+ if (typeof e == "function")
129
+ n.callback = e;
130
+ else if (e)
131
+ for (var t in e)
132
+ e.hasOwnProperty(t) && (n[t] = e[t]);
133
+ return n;
134
+ }
135
+ var Je = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, en = /\S/, ze = new j();
136
+ ze.equals = function(e, n) {
137
+ return this.options.ignoreCase && (e = e.toLowerCase(), n = n.toLowerCase()), e === n || this.options.ignoreWhitespace && !en.test(e) && !en.test(n);
138
+ };
139
+ ze.tokenize = function(e) {
140
+ for (var n = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), t = 0; t < n.length - 1; t++)
141
+ !n[t + 1] && n[t + 2] && Je.test(n[t]) && Je.test(n[t + 2]) && (n[t] += n[t + 2], n.splice(t + 1, 2), t--);
142
+ return n;
143
+ };
144
+ function Un(e, n, t) {
145
+ return t = $n(t, {
146
+ ignoreWhitespace: !0
147
+ }), ze.diff(e, n, t);
148
+ }
149
+ var Fe = new j();
150
+ Fe.tokenize = function(e) {
151
+ var n = [], t = e.split(/(\n|\r\n)/);
152
+ t[t.length - 1] || t.pop();
153
+ for (var s = 0; s < t.length; s++) {
154
+ var c = t[s];
155
+ s % 2 && !this.options.newlineIsToken ? n[n.length - 1] += c : (this.options.ignoreWhitespace && (c = c.trim()), n.push(c));
156
+ }
157
+ return n;
158
+ };
159
+ function fn(e, n, t) {
160
+ return Fe.diff(e, n, t);
161
+ }
162
+ var Pn = new j();
163
+ Pn.tokenize = function(e) {
164
+ return e.split(/(\S.+?[.!?])(?=\s+|$)/);
165
+ };
166
+ var Hn = new j();
167
+ Hn.tokenize = function(e) {
168
+ return e.split(/([{}:;,]|\s+)/);
169
+ };
170
+ function Me(e) {
171
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Me = function(n) {
172
+ return typeof n;
173
+ } : Me = function(n) {
174
+ return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
175
+ }, Me(e);
176
+ }
177
+ var zn = Object.prototype.toString, pe = new j();
178
+ pe.useLongestToken = !0;
179
+ pe.tokenize = Fe.tokenize;
180
+ pe.castInput = function(e) {
181
+ var n = this.options, t = n.undefinedReplacement, s = n.stringifyReplacer, c = s === void 0 ? function(l, i) {
182
+ return typeof i > "u" ? t : i;
183
+ } : s;
184
+ return typeof e == "string" ? e : JSON.stringify(Ue(e, null, null, c), c, " ");
185
+ };
186
+ pe.equals = function(e, n) {
187
+ return j.prototype.equals.call(pe, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"));
188
+ };
189
+ function Ue(e, n, t, s, c) {
190
+ n = n || [], t = t || [], s && (e = s(c, e));
191
+ var l;
192
+ for (l = 0; l < n.length; l += 1)
193
+ if (n[l] === e)
194
+ return t[l];
195
+ var i;
196
+ if (zn.call(e) === "[object Array]") {
197
+ for (n.push(e), i = new Array(e.length), t.push(i), l = 0; l < e.length; l += 1)
198
+ i[l] = Ue(e[l], n, t, s, c);
199
+ return n.pop(), t.pop(), i;
200
+ }
201
+ if (e && e.toJSON && (e = e.toJSON()), Me(e) === "object" && e !== null) {
202
+ n.push(e), i = {}, t.push(i);
203
+ var r = [], a;
204
+ for (a in e)
205
+ e.hasOwnProperty(a) && r.push(a);
206
+ for (r.sort(), l = 0; l < r.length; l += 1)
207
+ a = r[l], i[a] = Ue(e[a], n, t, s, a);
208
+ n.pop(), t.pop();
209
+ } else
210
+ i = e;
211
+ return i;
212
+ }
213
+ var Pe = new j();
214
+ Pe.tokenize = function(e) {
215
+ return e.slice();
216
+ };
217
+ Pe.join = Pe.removeEmpty = function(e) {
218
+ return e;
219
+ };
220
+ var Ge = { exports: {} };
221
+ function Ke(e) {
222
+ return e instanceof Map ? e.clear = e.delete = e.set = function() {
223
+ throw new Error("map is read-only");
224
+ } : e instanceof Set && (e.add = e.clear = e.delete = function() {
225
+ throw new Error("set is read-only");
226
+ }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach(function(n) {
227
+ var t = e[n];
228
+ typeof t == "object" && !Object.isFrozen(t) && Ke(t);
229
+ }), e;
230
+ }
231
+ Ge.exports = Ke;
232
+ Ge.exports.default = Ke;
233
+ class nn {
234
+ /**
235
+ * @param {CompiledMode} mode
236
+ */
237
+ constructor(n) {
238
+ n.data === void 0 && (n.data = {}), this.data = n.data, this.isMatchIgnored = !1;
239
+ }
240
+ ignoreMatch() {
241
+ this.isMatchIgnored = !0;
242
+ }
243
+ }
244
+ function dn(e) {
245
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
246
+ }
247
+ function ne(e, ...n) {
248
+ const t = /* @__PURE__ */ Object.create(null);
249
+ for (const s in e)
250
+ t[s] = e[s];
251
+ return n.forEach(function(s) {
252
+ for (const c in s)
253
+ t[c] = s[c];
254
+ }), /** @type {T} */
255
+ t;
256
+ }
257
+ const Fn = "</span>", tn = (e) => !!e.scope || e.sublanguage && e.language, Gn = (e, { prefix: n }) => {
258
+ if (e.includes(".")) {
259
+ const t = e.split(".");
260
+ return [
261
+ `${n}${t.shift()}`,
262
+ ...t.map((s, c) => `${s}${"_".repeat(c + 1)}`)
263
+ ].join(" ");
264
+ }
265
+ return `${n}${e}`;
266
+ };
267
+ class Kn {
268
+ /**
269
+ * Creates a new HTMLRenderer
270
+ *
271
+ * @param {Tree} parseTree - the parse tree (must support `walk` API)
272
+ * @param {{classPrefix: string}} options
273
+ */
274
+ constructor(n, t) {
275
+ this.buffer = "", this.classPrefix = t.classPrefix, n.walk(this);
276
+ }
277
+ /**
278
+ * Adds texts to the output stream
279
+ *
280
+ * @param {string} text */
281
+ addText(n) {
282
+ this.buffer += dn(n);
283
+ }
284
+ /**
285
+ * Adds a node open to the output stream (if needed)
286
+ *
287
+ * @param {Node} node */
288
+ openNode(n) {
289
+ if (!tn(n))
290
+ return;
291
+ let t = "";
292
+ n.sublanguage ? t = `language-${n.language}` : t = Gn(n.scope, { prefix: this.classPrefix }), this.span(t);
293
+ }
294
+ /**
295
+ * Adds a node close to the output stream (if needed)
296
+ *
297
+ * @param {Node} node */
298
+ closeNode(n) {
299
+ tn(n) && (this.buffer += Fn);
300
+ }
301
+ /**
302
+ * returns the accumulated buffer
303
+ */
304
+ value() {
305
+ return this.buffer;
306
+ }
307
+ // helpers
308
+ /**
309
+ * Builds a span element
310
+ *
311
+ * @param {string} className */
312
+ span(n) {
313
+ this.buffer += `<span class="${n}">`;
314
+ }
315
+ }
316
+ const sn = (e = {}) => {
317
+ const n = { children: [] };
318
+ return Object.assign(n, e), n;
319
+ };
320
+ class We {
321
+ constructor() {
322
+ this.rootNode = sn(), this.stack = [this.rootNode];
323
+ }
324
+ get top() {
325
+ return this.stack[this.stack.length - 1];
326
+ }
327
+ get root() {
328
+ return this.rootNode;
329
+ }
330
+ /** @param {Node} node */
331
+ add(n) {
332
+ this.top.children.push(n);
333
+ }
334
+ /** @param {string} scope */
335
+ openNode(n) {
336
+ const t = sn({ scope: n });
337
+ this.add(t), this.stack.push(t);
338
+ }
339
+ closeNode() {
340
+ if (this.stack.length > 1)
341
+ return this.stack.pop();
342
+ }
343
+ closeAllNodes() {
344
+ for (; this.closeNode(); )
345
+ ;
346
+ }
347
+ toJSON() {
348
+ return JSON.stringify(this.rootNode, null, 4);
349
+ }
350
+ /**
351
+ * @typedef { import("./html_renderer").Renderer } Renderer
352
+ * @param {Renderer} builder
353
+ */
354
+ walk(n) {
355
+ return this.constructor._walk(n, this.rootNode);
356
+ }
357
+ /**
358
+ * @param {Renderer} builder
359
+ * @param {Node} node
360
+ */
361
+ static _walk(n, t) {
362
+ return typeof t == "string" ? n.addText(t) : t.children && (n.openNode(t), t.children.forEach((s) => this._walk(n, s)), n.closeNode(t)), n;
363
+ }
364
+ /**
365
+ * @param {Node} node
366
+ */
367
+ static _collapse(n) {
368
+ typeof n != "string" && n.children && (n.children.every((t) => typeof t == "string") ? n.children = [n.children.join("")] : n.children.forEach((t) => {
369
+ We._collapse(t);
370
+ }));
371
+ }
372
+ }
373
+ class Wn extends We {
374
+ /**
375
+ * @param {*} options
376
+ */
377
+ constructor(n) {
378
+ super(), this.options = n;
379
+ }
380
+ /**
381
+ * @param {string} text
382
+ * @param {string} scope
383
+ */
384
+ addKeyword(n, t) {
385
+ n !== "" && (this.openNode(t), this.addText(n), this.closeNode());
386
+ }
387
+ /**
388
+ * @param {string} text
389
+ */
390
+ addText(n) {
391
+ n !== "" && this.add(n);
392
+ }
393
+ /**
394
+ * @param {Emitter & {root: DataNode}} emitter
395
+ * @param {string} name
396
+ */
397
+ addSublanguage(n, t) {
398
+ const s = n.root;
399
+ s.sublanguage = !0, s.language = t, this.add(s);
400
+ }
401
+ toHTML() {
402
+ return new Kn(this, this.options).value();
403
+ }
404
+ finalize() {
405
+ return !0;
406
+ }
407
+ }
408
+ function be(e) {
409
+ return e ? typeof e == "string" ? e : e.source : null;
410
+ }
411
+ function gn(e) {
412
+ return ie("(?=", e, ")");
413
+ }
414
+ function Yn(e) {
415
+ return ie("(?:", e, ")*");
416
+ }
417
+ function Zn(e) {
418
+ return ie("(?:", e, ")?");
419
+ }
420
+ function ie(...e) {
421
+ return e.map((t) => be(t)).join("");
422
+ }
423
+ function Qn(e) {
424
+ const n = e[e.length - 1];
425
+ return typeof n == "object" && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
426
+ }
427
+ function Ye(...e) {
428
+ return "(" + (Qn(e).capture ? "" : "?:") + e.map((s) => be(s)).join("|") + ")";
429
+ }
430
+ function pn(e) {
431
+ return new RegExp(e.toString() + "|").exec("").length - 1;
432
+ }
433
+ function qn(e, n) {
434
+ const t = e && e.exec(n);
435
+ return t && t.index === 0;
436
+ }
437
+ const Xn = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
438
+ function Ze(e, { joinWith: n }) {
439
+ let t = 0;
440
+ return e.map((s) => {
441
+ t += 1;
442
+ const c = t;
443
+ let l = be(s), i = "";
444
+ for (; l.length > 0; ) {
445
+ const r = Xn.exec(l);
446
+ if (!r) {
447
+ i += l;
448
+ break;
449
+ }
450
+ i += l.substring(0, r.index), l = l.substring(r.index + r[0].length), r[0][0] === "\\" && r[1] ? i += "\\" + String(Number(r[1]) + c) : (i += r[0], r[0] === "(" && t++);
451
+ }
452
+ return i;
453
+ }).map((s) => `(${s})`).join(n);
454
+ }
455
+ const Vn = /\b\B/, bn = "[a-zA-Z]\\w*", Qe = "[a-zA-Z_]\\w*", hn = "\\b\\d+(\\.\\d+)?", En = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", _n = "\\b(0b[01]+)", jn = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Jn = (e = {}) => {
456
+ const n = /^#![ ]*\//;
457
+ return e.binary && (e.begin = ie(
458
+ n,
459
+ /.*\b/,
460
+ e.binary,
461
+ /\b.*/
462
+ )), ne({
463
+ scope: "meta",
464
+ begin: n,
465
+ end: /$/,
466
+ relevance: 0,
467
+ /** @type {ModeCallback} */
468
+ "on:begin": (t, s) => {
469
+ t.index !== 0 && s.ignoreMatch();
470
+ }
471
+ }, e);
472
+ }, he = {
473
+ begin: "\\\\[\\s\\S]",
474
+ relevance: 0
475
+ }, et = {
476
+ scope: "string",
477
+ begin: "'",
478
+ end: "'",
479
+ illegal: "\\n",
480
+ contains: [he]
481
+ }, nt = {
482
+ scope: "string",
483
+ begin: '"',
484
+ end: '"',
485
+ illegal: "\\n",
486
+ contains: [he]
487
+ }, tt = {
488
+ 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/
489
+ }, Le = function(e, n, t = {}) {
490
+ const s = ne(
491
+ {
492
+ scope: "comment",
493
+ begin: e,
494
+ end: n,
495
+ contains: []
496
+ },
497
+ t
498
+ );
499
+ s.contains.push({
500
+ scope: "doctag",
501
+ // hack to avoid the space from being included. the space is necessary to
502
+ // match here to prevent the plain text rule below from gobbling up doctags
503
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
504
+ end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
505
+ excludeBegin: !0,
506
+ relevance: 0
507
+ });
508
+ const c = Ye(
509
+ // list of common 1 and 2 letter words in English
510
+ "I",
511
+ "a",
512
+ "is",
513
+ "so",
514
+ "us",
515
+ "to",
516
+ "at",
517
+ "if",
518
+ "in",
519
+ "it",
520
+ "on",
521
+ // note: this is not an exhaustive list of contractions, just popular ones
522
+ /[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
523
+ // contractions - can't we'd they're let's, etc
524
+ /[A-Za-z]+[-][a-z]+/,
525
+ // `no-way`, etc.
526
+ /[A-Za-z][a-z]{2,}/
527
+ // allow capitalized words at beginning of sentences
528
+ );
529
+ return s.contains.push(
530
+ {
531
+ // TODO: how to include ", (, ) without breaking grammars that use these for
532
+ // comment delimiters?
533
+ // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
534
+ // ---
535
+ // this tries to find sequences of 3 english words in a row (without any
536
+ // "programming" type syntax) this gives us a strong signal that we've
537
+ // TRULY found a comment - vs perhaps scanning with the wrong language.
538
+ // It's possible to find something that LOOKS like the start of the
539
+ // comment - but then if there is no readable text - good chance it is a
540
+ // false match and not a comment.
541
+ //
542
+ // for a visual example please see:
543
+ // https://github.com/highlightjs/highlight.js/issues/2827
544
+ begin: ie(
545
+ /[ ]+/,
546
+ // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
547
+ "(",
548
+ c,
549
+ /[.]?[:]?([.][ ]|[ ])/,
550
+ "){3}"
551
+ )
552
+ // look for 3 words in a row
553
+ }
554
+ ), s;
555
+ }, st = Le("//", "$"), it = Le("/\\*", "\\*/"), rt = Le("#", "$"), at = {
556
+ scope: "number",
557
+ begin: hn,
558
+ relevance: 0
559
+ }, ot = {
560
+ scope: "number",
561
+ begin: En,
562
+ relevance: 0
563
+ }, ct = {
564
+ scope: "number",
565
+ begin: _n,
566
+ relevance: 0
567
+ }, lt = {
568
+ // this outer rule makes sure we actually have a WHOLE regex and not simply
569
+ // an expression such as:
570
+ //
571
+ // 3 / something
572
+ //
573
+ // (which will then blow up when regex's `illegal` sees the newline)
574
+ begin: /(?=\/[^/\n]*\/)/,
575
+ contains: [{
576
+ scope: "regexp",
577
+ begin: /\//,
578
+ end: /\/[gimuy]*/,
579
+ illegal: /\n/,
580
+ contains: [
581
+ he,
582
+ {
583
+ begin: /\[/,
584
+ end: /\]/,
585
+ relevance: 0,
586
+ contains: [he]
587
+ }
588
+ ]
589
+ }]
590
+ }, ut = {
591
+ scope: "title",
592
+ begin: bn,
593
+ relevance: 0
594
+ }, ft = {
595
+ scope: "title",
596
+ begin: Qe,
597
+ relevance: 0
598
+ }, dt = {
599
+ // excludes method names from keyword processing
600
+ begin: "\\.\\s*" + Qe,
601
+ relevance: 0
602
+ }, gt = function(e) {
603
+ return Object.assign(
604
+ e,
605
+ {
606
+ /** @type {ModeCallback} */
607
+ "on:begin": (n, t) => {
608
+ t.data._beginMatch = n[1];
609
+ },
610
+ /** @type {ModeCallback} */
611
+ "on:end": (n, t) => {
612
+ t.data._beginMatch !== n[1] && t.ignoreMatch();
613
+ }
614
+ }
615
+ );
616
+ };
617
+ var Te = /* @__PURE__ */ Object.freeze({
618
+ __proto__: null,
619
+ MATCH_NOTHING_RE: Vn,
620
+ IDENT_RE: bn,
621
+ UNDERSCORE_IDENT_RE: Qe,
622
+ NUMBER_RE: hn,
623
+ C_NUMBER_RE: En,
624
+ BINARY_NUMBER_RE: _n,
625
+ RE_STARTERS_RE: jn,
626
+ SHEBANG: Jn,
627
+ BACKSLASH_ESCAPE: he,
628
+ APOS_STRING_MODE: et,
629
+ QUOTE_STRING_MODE: nt,
630
+ PHRASAL_WORDS_MODE: tt,
631
+ COMMENT: Le,
632
+ C_LINE_COMMENT_MODE: st,
633
+ C_BLOCK_COMMENT_MODE: it,
634
+ HASH_COMMENT_MODE: rt,
635
+ NUMBER_MODE: at,
636
+ C_NUMBER_MODE: ot,
637
+ BINARY_NUMBER_MODE: ct,
638
+ REGEXP_MODE: lt,
639
+ TITLE_MODE: ut,
640
+ UNDERSCORE_TITLE_MODE: ft,
641
+ METHOD_GUARD: dt,
642
+ END_SAME_AS_BEGIN: gt
643
+ });
644
+ function pt(e, n) {
645
+ e.input[e.index - 1] === "." && n.ignoreMatch();
646
+ }
647
+ function bt(e, n) {
648
+ e.className !== void 0 && (e.scope = e.className, delete e.className);
649
+ }
650
+ function ht(e, n) {
651
+ n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = pt, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
652
+ }
653
+ function Et(e, n) {
654
+ Array.isArray(e.illegal) && (e.illegal = Ye(...e.illegal));
655
+ }
656
+ function _t(e, n) {
657
+ if (e.match) {
658
+ if (e.begin || e.end)
659
+ throw new Error("begin & end are not supported with match");
660
+ e.begin = e.match, delete e.match;
661
+ }
662
+ }
663
+ function mt(e, n) {
664
+ e.relevance === void 0 && (e.relevance = 1);
665
+ }
666
+ const yt = (e, n) => {
667
+ if (!e.beforeMatch)
668
+ return;
669
+ if (e.starts)
670
+ throw new Error("beforeMatch cannot be used with starts");
671
+ const t = Object.assign({}, e);
672
+ Object.keys(e).forEach((s) => {
673
+ delete e[s];
674
+ }), e.keywords = t.keywords, e.begin = ie(t.beforeMatch, gn(t.begin)), e.starts = {
675
+ relevance: 0,
676
+ contains: [
677
+ Object.assign(t, { endsParent: !0 })
678
+ ]
679
+ }, e.relevance = 0, delete t.beforeMatch;
680
+ }, Nt = [
681
+ "of",
682
+ "and",
683
+ "for",
684
+ "in",
685
+ "not",
686
+ "or",
687
+ "if",
688
+ "then",
689
+ "parent",
690
+ // common variable name
691
+ "list",
692
+ // common variable name
693
+ "value"
694
+ // common variable name
695
+ ], At = "keyword";
696
+ function mn(e, n, t = At) {
697
+ const s = /* @__PURE__ */ Object.create(null);
698
+ return typeof e == "string" ? c(t, e.split(" ")) : Array.isArray(e) ? c(t, e) : Object.keys(e).forEach(function(l) {
699
+ Object.assign(
700
+ s,
701
+ mn(e[l], n, l)
702
+ );
703
+ }), s;
704
+ function c(l, i) {
705
+ n && (i = i.map((r) => r.toLowerCase())), i.forEach(function(r) {
706
+ const a = r.split("|");
707
+ s[a[0]] = [l, vt(a[0], a[1])];
708
+ });
709
+ }
710
+ }
711
+ function vt(e, n) {
712
+ return n ? Number(n) : Tt(e) ? 0 : 1;
713
+ }
714
+ function Tt(e) {
715
+ return Nt.includes(e.toLowerCase());
716
+ }
717
+ const rn = {}, se = (e) => {
718
+ console.error(e);
719
+ }, an = (e, ...n) => {
720
+ console.log(`WARN: ${e}`, ...n);
721
+ }, ce = (e, n) => {
722
+ rn[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), rn[`${e}/${n}`] = !0);
723
+ }, Oe = new Error();
724
+ function yn(e, n, { key: t }) {
725
+ let s = 0;
726
+ const c = e[t], l = {}, i = {};
727
+ for (let r = 1; r <= n.length; r++)
728
+ i[r + s] = c[r], l[r + s] = !0, s += pn(n[r - 1]);
729
+ e[t] = i, e[t]._emit = l, e[t]._multi = !0;
730
+ }
731
+ function wt(e) {
732
+ if (Array.isArray(e.begin)) {
733
+ if (e.skip || e.excludeBegin || e.returnBegin)
734
+ throw se("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Oe;
735
+ if (typeof e.beginScope != "object" || e.beginScope === null)
736
+ throw se("beginScope must be object"), Oe;
737
+ yn(e, e.begin, { key: "beginScope" }), e.begin = Ze(e.begin, { joinWith: "" });
738
+ }
739
+ }
740
+ function St(e) {
741
+ if (Array.isArray(e.end)) {
742
+ if (e.skip || e.excludeEnd || e.returnEnd)
743
+ throw se("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Oe;
744
+ if (typeof e.endScope != "object" || e.endScope === null)
745
+ throw se("endScope must be object"), Oe;
746
+ yn(e, e.end, { key: "endScope" }), e.end = Ze(e.end, { joinWith: "" });
747
+ }
748
+ }
749
+ function Mt(e) {
750
+ e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
751
+ }
752
+ function Rt(e) {
753
+ Mt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), wt(e), St(e);
754
+ }
755
+ function Ot(e) {
756
+ function n(i, r) {
757
+ return new RegExp(
758
+ be(i),
759
+ "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : "")
760
+ );
761
+ }
762
+ class t {
763
+ constructor() {
764
+ this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
765
+ }
766
+ // @ts-ignore
767
+ addRule(r, a) {
768
+ a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, r]), this.matchAt += pn(r) + 1;
769
+ }
770
+ compile() {
771
+ this.regexes.length === 0 && (this.exec = () => null);
772
+ const r = this.regexes.map((a) => a[1]);
773
+ this.matcherRe = n(Ze(r, { joinWith: "|" }), !0), this.lastIndex = 0;
774
+ }
775
+ /** @param {string} s */
776
+ exec(r) {
777
+ this.matcherRe.lastIndex = this.lastIndex;
778
+ const a = this.matcherRe.exec(r);
779
+ if (!a)
780
+ return null;
781
+ const o = a.findIndex((E, p) => p > 0 && E !== void 0), b = this.matchIndexes[o];
782
+ return a.splice(0, o), Object.assign(a, b);
783
+ }
784
+ }
785
+ class s {
786
+ constructor() {
787
+ this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
788
+ }
789
+ // @ts-ignore
790
+ getMatcher(r) {
791
+ if (this.multiRegexes[r])
792
+ return this.multiRegexes[r];
793
+ const a = new t();
794
+ return this.rules.slice(r).forEach(([o, b]) => a.addRule(o, b)), a.compile(), this.multiRegexes[r] = a, a;
795
+ }
796
+ resumingScanAtSamePosition() {
797
+ return this.regexIndex !== 0;
798
+ }
799
+ considerAll() {
800
+ this.regexIndex = 0;
801
+ }
802
+ // @ts-ignore
803
+ addRule(r, a) {
804
+ this.rules.push([r, a]), a.type === "begin" && this.count++;
805
+ }
806
+ /** @param {string} s */
807
+ exec(r) {
808
+ const a = this.getMatcher(this.regexIndex);
809
+ a.lastIndex = this.lastIndex;
810
+ let o = a.exec(r);
811
+ if (this.resumingScanAtSamePosition() && !(o && o.index === this.lastIndex)) {
812
+ const b = this.getMatcher(0);
813
+ b.lastIndex = this.lastIndex + 1, o = b.exec(r);
814
+ }
815
+ return o && (this.regexIndex += o.position + 1, this.regexIndex === this.count && this.considerAll()), o;
816
+ }
817
+ }
818
+ function c(i) {
819
+ const r = new s();
820
+ 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;
821
+ }
822
+ function l(i, r) {
823
+ const a = (
824
+ /** @type CompiledMode */
825
+ i
826
+ );
827
+ if (i.isCompiled)
828
+ return a;
829
+ [
830
+ bt,
831
+ // do this early so compiler extensions generally don't have to worry about
832
+ // the distinction between match/begin
833
+ _t,
834
+ Rt,
835
+ yt
836
+ ].forEach((b) => b(i, r)), e.compilerExtensions.forEach((b) => b(i, r)), i.__beforeBegin = null, [
837
+ ht,
838
+ // do this later so compiler extensions that come earlier have access to the
839
+ // raw array if they wanted to perhaps manipulate it, etc.
840
+ Et,
841
+ // default to 1 relevance if not specified
842
+ mt
843
+ ].forEach((b) => b(i, r)), i.isCompiled = !0;
844
+ let o = null;
845
+ return typeof i.keywords == "object" && i.keywords.$pattern && (i.keywords = Object.assign({}, i.keywords), o = i.keywords.$pattern, delete i.keywords.$pattern), o = o || /\w+/, i.keywords && (i.keywords = mn(i.keywords, e.case_insensitive)), a.keywordPatternRe = n(o, !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 = be(a.end) || "", i.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (i.end ? "|" : "") + r.terminatorEnd)), i.illegal && (a.illegalRe = n(
846
+ /** @type {RegExp | string} */
847
+ i.illegal
848
+ )), i.contains || (i.contains = []), i.contains = [].concat(...i.contains.map(function(b) {
849
+ return xt(b === "self" ? i : b);
850
+ })), i.contains.forEach(function(b) {
851
+ l(
852
+ /** @type Mode */
853
+ b,
854
+ a
855
+ );
856
+ }), i.starts && l(i.starts, r), a.matcher = c(a), a;
857
+ }
858
+ if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
859
+ throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
860
+ return e.classNameAliases = ne(e.classNameAliases || {}), l(
861
+ /** @type Mode */
862
+ e
863
+ );
864
+ }
865
+ function Nn(e) {
866
+ return e ? e.endsWithParent || Nn(e.starts) : !1;
867
+ }
868
+ function xt(e) {
869
+ return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
870
+ return ne(e, { variants: null }, n);
871
+ })), e.cachedVariants ? e.cachedVariants : Nn(e) ? ne(e, { starts: e.starts ? ne(e.starts) : null }) : Object.isFrozen(e) ? ne(e) : e;
872
+ }
873
+ var Lt = "11.7.0";
874
+ class Dt extends Error {
875
+ constructor(n, t) {
876
+ super(n), this.name = "HTMLInjectionError", this.html = t;
877
+ }
878
+ }
879
+ const Be = dn, on = ne, cn = Symbol("nomatch"), Ct = 7, It = function(e) {
880
+ const n = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null), s = [];
881
+ let c = !0;
882
+ const l = "Could not find the language '{}', did you forget to load/include a language module?", i = { disableAutodetect: !0, name: "Plain text", contains: [] };
883
+ let r = {
884
+ ignoreUnescapedHTML: !1,
885
+ throwUnescapedHTML: !1,
886
+ noHighlightRe: /^(no-?highlight)$/i,
887
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
888
+ classPrefix: "hljs-",
889
+ cssSelector: "pre code",
890
+ languages: null,
891
+ // beta configuration options, subject to change, welcome to discuss
892
+ // https://github.com/highlightjs/highlight.js/issues/1086
893
+ __emitter: Wn
894
+ };
895
+ function a(u) {
896
+ return r.noHighlightRe.test(u);
897
+ }
898
+ function o(u) {
899
+ let h = u.className + " ";
900
+ h += u.parentNode ? u.parentNode.className : "";
901
+ const A = r.languageDetectRe.exec(h);
902
+ if (A) {
903
+ const M = W(A[1]);
904
+ return M || (an(l.replace("{}", A[1])), an("Falling back to no-highlight mode for this block.", u)), M ? A[1] : "no-highlight";
905
+ }
906
+ return h.split(/\s+/).find((M) => a(M) || W(M));
907
+ }
908
+ function b(u, h, A) {
909
+ let M = "", I = "";
910
+ typeof h == "object" ? (M = u, A = h.ignoreIllegals, I = h.language) : (ce("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ce("10.7.0", `Please use highlight(code, options) instead.
911
+ https://github.com/highlightjs/highlight.js/issues/2277`), I = u, M = h), A === void 0 && (A = !0);
912
+ const z = {
913
+ code: M,
914
+ language: I
915
+ };
916
+ oe("before:highlight", z);
917
+ const Q = z.result ? z.result : E(z.language, z.code, A);
918
+ return Q.code = z.code, oe("after:highlight", Q), Q;
919
+ }
920
+ function E(u, h, A, M) {
921
+ const I = /* @__PURE__ */ Object.create(null);
922
+ function z(f, _) {
923
+ return f.keywords[_];
924
+ }
925
+ function Q() {
926
+ if (!N.keywords) {
927
+ U.addText(C);
928
+ return;
929
+ }
930
+ let f = 0;
931
+ N.keywordPatternRe.lastIndex = 0;
932
+ let _ = N.keywordPatternRe.exec(C), w = "";
933
+ for (; _; ) {
934
+ w += C.substring(f, _.index);
935
+ const O = ee.case_insensitive ? _[0].toLowerCase() : _[0], H = z(N, O);
936
+ if (H) {
937
+ const [q, Ln] = H;
938
+ if (U.addText(w), w = "", I[O] = (I[O] || 0) + 1, I[O] <= Ct && (Ae += Ln), q.startsWith("_"))
939
+ w += _[0];
940
+ else {
941
+ const Dn = ee.classNameAliases[q] || q;
942
+ U.addKeyword(_[0], Dn);
943
+ }
944
+ } else
945
+ w += _[0];
946
+ f = N.keywordPatternRe.lastIndex, _ = N.keywordPatternRe.exec(C);
947
+ }
948
+ w += C.substring(f), U.addText(w);
949
+ }
950
+ function ye() {
951
+ if (C === "")
952
+ return;
953
+ let f = null;
954
+ if (typeof N.subLanguage == "string") {
955
+ if (!n[N.subLanguage]) {
956
+ U.addText(C);
957
+ return;
958
+ }
959
+ f = E(N.subLanguage, C, !0, je[N.subLanguage]), je[N.subLanguage] = /** @type {CompiledMode} */
960
+ f._top;
961
+ } else
962
+ f = v(C, N.subLanguage.length ? N.subLanguage : null);
963
+ N.relevance > 0 && (Ae += f.relevance), U.addSublanguage(f._emitter, f.language);
964
+ }
965
+ function F() {
966
+ N.subLanguage != null ? ye() : Q(), C = "";
967
+ }
968
+ function J(f, _) {
969
+ let w = 1;
970
+ const O = _.length - 1;
971
+ for (; w <= O; ) {
972
+ if (!f._emit[w]) {
973
+ w++;
974
+ continue;
975
+ }
976
+ const H = ee.classNameAliases[f[w]] || f[w], q = _[w];
977
+ H ? U.addKeyword(q, H) : (C = q, Q(), C = ""), w++;
978
+ }
979
+ }
980
+ function qe(f, _) {
981
+ return f.scope && typeof f.scope == "string" && U.openNode(ee.classNameAliases[f.scope] || f.scope), f.beginScope && (f.beginScope._wrap ? (U.addKeyword(C, ee.classNameAliases[f.beginScope._wrap] || f.beginScope._wrap), C = "") : f.beginScope._multi && (J(f.beginScope, _), C = "")), N = Object.create(f, { parent: { value: N } }), N;
982
+ }
983
+ function Xe(f, _, w) {
984
+ let O = qn(f.endRe, w);
985
+ if (O) {
986
+ if (f["on:end"]) {
987
+ const H = new nn(f);
988
+ f["on:end"](_, H), H.isMatchIgnored && (O = !1);
989
+ }
990
+ if (O) {
991
+ for (; f.endsParent && f.parent; )
992
+ f = f.parent;
993
+ return f;
994
+ }
995
+ }
996
+ if (f.endsWithParent)
997
+ return Xe(f.parent, _, w);
998
+ }
999
+ function Sn(f) {
1000
+ return N.matcher.regexIndex === 0 ? (C += f[0], 1) : (ke = !0, 0);
1001
+ }
1002
+ function Mn(f) {
1003
+ const _ = f[0], w = f.rule, O = new nn(w), H = [w.__beforeBegin, w["on:begin"]];
1004
+ for (const q of H)
1005
+ if (q && (q(f, O), O.isMatchIgnored))
1006
+ return Sn(_);
1007
+ return w.skip ? C += _ : (w.excludeBegin && (C += _), F(), !w.returnBegin && !w.excludeBegin && (C = _)), qe(w, f), w.returnBegin ? 0 : _.length;
1008
+ }
1009
+ function Rn(f) {
1010
+ const _ = f[0], w = h.substring(f.index), O = Xe(N, f, w);
1011
+ if (!O)
1012
+ return cn;
1013
+ const H = N;
1014
+ N.endScope && N.endScope._wrap ? (F(), U.addKeyword(_, N.endScope._wrap)) : N.endScope && N.endScope._multi ? (F(), J(N.endScope, f)) : H.skip ? C += _ : (H.returnEnd || H.excludeEnd || (C += _), F(), H.excludeEnd && (C = _));
1015
+ do
1016
+ N.scope && U.closeNode(), !N.skip && !N.subLanguage && (Ae += N.relevance), N = N.parent;
1017
+ while (N !== O.parent);
1018
+ return O.starts && qe(O.starts, f), H.returnEnd ? 0 : _.length;
1019
+ }
1020
+ function On() {
1021
+ const f = [];
1022
+ for (let _ = N; _ !== ee; _ = _.parent)
1023
+ _.scope && f.unshift(_.scope);
1024
+ f.forEach((_) => U.openNode(_));
1025
+ }
1026
+ let Ne = {};
1027
+ function Ve(f, _) {
1028
+ const w = _ && _[0];
1029
+ if (C += f, w == null)
1030
+ return F(), 0;
1031
+ if (Ne.type === "begin" && _.type === "end" && Ne.index === _.index && w === "") {
1032
+ if (C += h.slice(_.index, _.index + 1), !c) {
1033
+ const O = new Error(`0 width match regex (${u})`);
1034
+ throw O.languageName = u, O.badRule = Ne.rule, O;
1035
+ }
1036
+ return 1;
1037
+ }
1038
+ if (Ne = _, _.type === "begin")
1039
+ return Mn(_);
1040
+ if (_.type === "illegal" && !A) {
1041
+ const O = new Error('Illegal lexeme "' + w + '" for mode "' + (N.scope || "<unnamed>") + '"');
1042
+ throw O.mode = N, O;
1043
+ } else if (_.type === "end") {
1044
+ const O = Rn(_);
1045
+ if (O !== cn)
1046
+ return O;
1047
+ }
1048
+ if (_.type === "illegal" && w === "")
1049
+ return 1;
1050
+ if (Ie > 1e5 && Ie > _.index * 3)
1051
+ throw new Error("potential infinite loop, way more iterations than matches");
1052
+ return C += w, w.length;
1053
+ }
1054
+ const ee = W(u);
1055
+ if (!ee)
1056
+ throw se(l.replace("{}", u)), new Error('Unknown language: "' + u + '"');
1057
+ const xn = Ot(ee);
1058
+ let Ce = "", N = M || xn;
1059
+ const je = {}, U = new r.__emitter(r);
1060
+ On();
1061
+ let C = "", Ae = 0, te = 0, Ie = 0, ke = !1;
1062
+ try {
1063
+ for (N.matcher.considerAll(); ; ) {
1064
+ Ie++, ke ? ke = !1 : N.matcher.considerAll(), N.matcher.lastIndex = te;
1065
+ const f = N.matcher.exec(h);
1066
+ if (!f)
1067
+ break;
1068
+ const _ = h.substring(te, f.index), w = Ve(_, f);
1069
+ te = f.index + w;
1070
+ }
1071
+ return Ve(h.substring(te)), U.closeAllNodes(), U.finalize(), Ce = U.toHTML(), {
1072
+ language: u,
1073
+ value: Ce,
1074
+ relevance: Ae,
1075
+ illegal: !1,
1076
+ _emitter: U,
1077
+ _top: N
1078
+ };
1079
+ } catch (f) {
1080
+ if (f.message && f.message.includes("Illegal"))
1081
+ return {
1082
+ language: u,
1083
+ value: Be(h),
1084
+ illegal: !0,
1085
+ relevance: 0,
1086
+ _illegalBy: {
1087
+ message: f.message,
1088
+ index: te,
1089
+ context: h.slice(te - 100, te + 100),
1090
+ mode: f.mode,
1091
+ resultSoFar: Ce
1092
+ },
1093
+ _emitter: U
1094
+ };
1095
+ if (c)
1096
+ return {
1097
+ language: u,
1098
+ value: Be(h),
1099
+ illegal: !1,
1100
+ relevance: 0,
1101
+ errorRaised: f,
1102
+ _emitter: U,
1103
+ _top: N
1104
+ };
1105
+ throw f;
1106
+ }
1107
+ }
1108
+ function p(u) {
1109
+ const h = {
1110
+ value: Be(u),
1111
+ illegal: !1,
1112
+ relevance: 0,
1113
+ _top: i,
1114
+ _emitter: new r.__emitter(r)
1115
+ };
1116
+ return h._emitter.addText(u), h;
1117
+ }
1118
+ function v(u, h) {
1119
+ h = h || r.languages || Object.keys(n);
1120
+ const A = p(u), M = h.filter(W).filter(ae).map(
1121
+ (F) => E(F, u, !1)
1122
+ );
1123
+ M.unshift(A);
1124
+ const I = M.sort((F, J) => {
1125
+ if (F.relevance !== J.relevance)
1126
+ return J.relevance - F.relevance;
1127
+ if (F.language && J.language) {
1128
+ if (W(F.language).supersetOf === J.language)
1129
+ return 1;
1130
+ if (W(J.language).supersetOf === F.language)
1131
+ return -1;
1132
+ }
1133
+ return 0;
1134
+ }), [z, Q] = I, ye = z;
1135
+ return ye.secondBest = Q, ye;
1136
+ }
1137
+ function m(u, h, A) {
1138
+ const M = h && t[h] || A;
1139
+ u.classList.add("hljs"), u.classList.add(`language-${M}`);
1140
+ }
1141
+ function d(u) {
1142
+ let h = null;
1143
+ const A = o(u);
1144
+ if (a(A))
1145
+ return;
1146
+ if (oe(
1147
+ "before:highlightElement",
1148
+ { el: u, language: A }
1149
+ ), 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))
1150
+ throw new Dt(
1151
+ "One of your code blocks includes unescaped HTML.",
1152
+ u.innerHTML
1153
+ );
1154
+ h = u;
1155
+ const M = h.textContent, I = A ? b(M, { language: A, ignoreIllegals: !0 }) : v(M);
1156
+ u.innerHTML = I.value, m(u, A, I.language), u.result = {
1157
+ language: I.language,
1158
+ // TODO: remove with version 11.0
1159
+ re: I.relevance,
1160
+ relevance: I.relevance
1161
+ }, I.secondBest && (u.secondBest = {
1162
+ language: I.secondBest.language,
1163
+ relevance: I.secondBest.relevance
1164
+ }), oe("after:highlightElement", { el: u, result: I, text: M });
1165
+ }
1166
+ function T(u) {
1167
+ r = on(r, u);
1168
+ }
1169
+ const S = () => {
1170
+ R(), ce("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
1171
+ };
1172
+ function x() {
1173
+ R(), ce("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
1174
+ }
1175
+ let y = !1;
1176
+ function R() {
1177
+ if (document.readyState === "loading") {
1178
+ y = !0;
1179
+ return;
1180
+ }
1181
+ document.querySelectorAll(r.cssSelector).forEach(d);
1182
+ }
1183
+ function L() {
1184
+ y && R();
1185
+ }
1186
+ typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", L, !1);
1187
+ function D(u, h) {
1188
+ let A = null;
1189
+ try {
1190
+ A = h(e);
1191
+ } catch (M) {
1192
+ if (se("Language definition for '{}' could not be registered.".replace("{}", u)), c)
1193
+ se(M);
1194
+ else
1195
+ throw M;
1196
+ A = i;
1197
+ }
1198
+ A.name || (A.name = u), n[u] = A, A.rawDefinition = h.bind(null, e), A.aliases && re(A.aliases, { languageName: u });
1199
+ }
1200
+ function B(u) {
1201
+ delete n[u];
1202
+ for (const h of Object.keys(t))
1203
+ t[h] === u && delete t[h];
1204
+ }
1205
+ function K() {
1206
+ return Object.keys(n);
1207
+ }
1208
+ function W(u) {
1209
+ return u = (u || "").toLowerCase(), n[u] || n[t[u]];
1210
+ }
1211
+ function re(u, { languageName: h }) {
1212
+ typeof u == "string" && (u = [u]), u.forEach((A) => {
1213
+ t[A.toLowerCase()] = h;
1214
+ });
1215
+ }
1216
+ function ae(u) {
1217
+ const h = W(u);
1218
+ return h && !h.disableAutodetect;
1219
+ }
1220
+ function de(u) {
1221
+ u["before:highlightBlock"] && !u["before:highlightElement"] && (u["before:highlightElement"] = (h) => {
1222
+ u["before:highlightBlock"](
1223
+ Object.assign({ block: h.el }, h)
1224
+ );
1225
+ }), u["after:highlightBlock"] && !u["after:highlightElement"] && (u["after:highlightElement"] = (h) => {
1226
+ u["after:highlightBlock"](
1227
+ Object.assign({ block: h.el }, h)
1228
+ );
1229
+ });
1230
+ }
1231
+ function De(u) {
1232
+ de(u), s.push(u);
1233
+ }
1234
+ function oe(u, h) {
1235
+ const A = u;
1236
+ s.forEach(function(M) {
1237
+ M[A] && M[A](h);
1238
+ });
1239
+ }
1240
+ function me(u) {
1241
+ return ce("10.7.0", "highlightBlock will be removed entirely in v12.0"), ce("10.7.0", "Please use highlightElement now."), d(u);
1242
+ }
1243
+ Object.assign(e, {
1244
+ highlight: b,
1245
+ highlightAuto: v,
1246
+ highlightAll: R,
1247
+ highlightElement: d,
1248
+ // TODO: Remove with v12 API
1249
+ highlightBlock: me,
1250
+ configure: T,
1251
+ initHighlighting: S,
1252
+ initHighlightingOnLoad: x,
1253
+ registerLanguage: D,
1254
+ unregisterLanguage: B,
1255
+ listLanguages: K,
1256
+ getLanguage: W,
1257
+ registerAliases: re,
1258
+ autoDetection: ae,
1259
+ inherit: on,
1260
+ addPlugin: De
1261
+ }), e.debugMode = function() {
1262
+ c = !1;
1263
+ }, e.safeMode = function() {
1264
+ c = !0;
1265
+ }, e.versionString = Lt, e.regex = {
1266
+ concat: ie,
1267
+ lookahead: gn,
1268
+ either: Ye,
1269
+ optional: Zn,
1270
+ anyNumberOfTimes: Yn
1271
+ };
1272
+ for (const u in Te)
1273
+ typeof Te[u] == "object" && Ge.exports(Te[u]);
1274
+ return Object.assign(e, Te), e;
1275
+ };
1276
+ var Ee = It({}), kt = Ee;
1277
+ Ee.HighlightJS = Ee;
1278
+ Ee.default = Ee;
1279
+ const Z = kt;
1280
+ function Bt(e) {
1281
+ 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, c = {
1282
+ className: "symbol",
1283
+ begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
1284
+ }, l = {
1285
+ begin: /\s/,
1286
+ contains: [
1287
+ {
1288
+ className: "keyword",
1289
+ begin: /#?[a-z_][a-z1-9_-]+/,
1290
+ illegal: /\n/
1291
+ }
1292
+ ]
1293
+ }, i = e.inherit(l, {
1294
+ begin: /\(/,
1295
+ end: /\)/
1296
+ }), r = e.inherit(e.APOS_STRING_MODE, { className: "string" }), a = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), o = {
1297
+ endsWithParent: !0,
1298
+ illegal: /</,
1299
+ relevance: 0,
1300
+ contains: [
1301
+ {
1302
+ className: "attr",
1303
+ begin: s,
1304
+ relevance: 0
1305
+ },
1306
+ {
1307
+ begin: /=\s*/,
1308
+ relevance: 0,
1309
+ contains: [
1310
+ {
1311
+ className: "string",
1312
+ endsParent: !0,
1313
+ variants: [
1314
+ {
1315
+ begin: /"/,
1316
+ end: /"/,
1317
+ contains: [c]
1318
+ },
1319
+ {
1320
+ begin: /'/,
1321
+ end: /'/,
1322
+ contains: [c]
1323
+ },
1324
+ { begin: /[^\s"'=<>`]+/ }
1325
+ ]
1326
+ }
1327
+ ]
1328
+ }
1329
+ ]
1330
+ };
1331
+ return {
1332
+ name: "HTML, XML",
1333
+ aliases: [
1334
+ "html",
1335
+ "xhtml",
1336
+ "rss",
1337
+ "atom",
1338
+ "xjb",
1339
+ "xsd",
1340
+ "xsl",
1341
+ "plist",
1342
+ "wsf",
1343
+ "svg"
1344
+ ],
1345
+ case_insensitive: !0,
1346
+ unicodeRegex: !0,
1347
+ contains: [
1348
+ {
1349
+ className: "meta",
1350
+ begin: /<![a-z]/,
1351
+ end: />/,
1352
+ relevance: 10,
1353
+ contains: [
1354
+ l,
1355
+ a,
1356
+ r,
1357
+ i,
1358
+ {
1359
+ begin: /\[/,
1360
+ end: /\]/,
1361
+ contains: [
1362
+ {
1363
+ className: "meta",
1364
+ begin: /<![a-z]/,
1365
+ end: />/,
1366
+ contains: [
1367
+ l,
1368
+ i,
1369
+ a,
1370
+ r
1371
+ ]
1372
+ }
1373
+ ]
1374
+ }
1375
+ ]
1376
+ },
1377
+ e.COMMENT(
1378
+ /<!--/,
1379
+ /-->/,
1380
+ { relevance: 10 }
1381
+ ),
1382
+ {
1383
+ begin: /<!\[CDATA\[/,
1384
+ end: /\]\]>/,
1385
+ relevance: 10
1386
+ },
1387
+ c,
1388
+ // xml processing instructions
1389
+ {
1390
+ className: "meta",
1391
+ end: /\?>/,
1392
+ variants: [
1393
+ {
1394
+ begin: /<\?xml/,
1395
+ relevance: 10,
1396
+ contains: [
1397
+ a
1398
+ ]
1399
+ },
1400
+ {
1401
+ begin: /<\?[a-z][a-z0-9]+/
1402
+ }
1403
+ ]
1404
+ },
1405
+ {
1406
+ className: "tag",
1407
+ /*
1408
+ The lookahead pattern (?=...) ensures that 'begin' only matches
1409
+ '<style' as a single word, followed by a whitespace or an
1410
+ ending bracket.
1411
+ */
1412
+ begin: /<style(?=\s|>)/,
1413
+ end: />/,
1414
+ keywords: { name: "style" },
1415
+ contains: [o],
1416
+ starts: {
1417
+ end: /<\/style>/,
1418
+ returnEnd: !0,
1419
+ subLanguage: [
1420
+ "css",
1421
+ "xml"
1422
+ ]
1423
+ }
1424
+ },
1425
+ {
1426
+ className: "tag",
1427
+ // See the comment in the <style tag about the lookahead pattern
1428
+ begin: /<script(?=\s|>)/,
1429
+ end: />/,
1430
+ keywords: { name: "script" },
1431
+ contains: [o],
1432
+ starts: {
1433
+ end: /<\/script>/,
1434
+ returnEnd: !0,
1435
+ subLanguage: [
1436
+ "javascript",
1437
+ "handlebars",
1438
+ "xml"
1439
+ ]
1440
+ }
1441
+ },
1442
+ // we need this for now for jSX
1443
+ {
1444
+ className: "tag",
1445
+ begin: /<>|<\/>/
1446
+ },
1447
+ // open tag
1448
+ {
1449
+ className: "tag",
1450
+ begin: n.concat(
1451
+ /</,
1452
+ n.lookahead(n.concat(
1453
+ t,
1454
+ // <tag/>
1455
+ // <tag>
1456
+ // <tag ...
1457
+ n.either(/\/>/, />/, /\s/)
1458
+ ))
1459
+ ),
1460
+ end: /\/?>/,
1461
+ contains: [
1462
+ {
1463
+ className: "name",
1464
+ begin: t,
1465
+ relevance: 0,
1466
+ starts: o
1467
+ }
1468
+ ]
1469
+ },
1470
+ // close tag
1471
+ {
1472
+ className: "tag",
1473
+ begin: n.concat(
1474
+ /<\//,
1475
+ n.lookahead(n.concat(
1476
+ t,
1477
+ />/
1478
+ ))
1479
+ ),
1480
+ contains: [
1481
+ {
1482
+ className: "name",
1483
+ begin: t,
1484
+ relevance: 0
1485
+ },
1486
+ {
1487
+ begin: />/,
1488
+ relevance: 0,
1489
+ endsParent: !0
1490
+ }
1491
+ ]
1492
+ }
1493
+ ]
1494
+ };
1495
+ }
1496
+ const ln = "[A-Za-z$_][0-9A-Za-z$_]*", $t = [
1497
+ "as",
1498
+ // for exports
1499
+ "in",
1500
+ "of",
1501
+ "if",
1502
+ "for",
1503
+ "while",
1504
+ "finally",
1505
+ "var",
1506
+ "new",
1507
+ "function",
1508
+ "do",
1509
+ "return",
1510
+ "void",
1511
+ "else",
1512
+ "break",
1513
+ "catch",
1514
+ "instanceof",
1515
+ "with",
1516
+ "throw",
1517
+ "case",
1518
+ "default",
1519
+ "try",
1520
+ "switch",
1521
+ "continue",
1522
+ "typeof",
1523
+ "delete",
1524
+ "let",
1525
+ "yield",
1526
+ "const",
1527
+ "class",
1528
+ // JS handles these with a special rule
1529
+ // "get",
1530
+ // "set",
1531
+ "debugger",
1532
+ "async",
1533
+ "await",
1534
+ "static",
1535
+ "import",
1536
+ "from",
1537
+ "export",
1538
+ "extends"
1539
+ ], Ut = [
1540
+ "true",
1541
+ "false",
1542
+ "null",
1543
+ "undefined",
1544
+ "NaN",
1545
+ "Infinity"
1546
+ ], An = [
1547
+ // Fundamental objects
1548
+ "Object",
1549
+ "Function",
1550
+ "Boolean",
1551
+ "Symbol",
1552
+ // numbers and dates
1553
+ "Math",
1554
+ "Date",
1555
+ "Number",
1556
+ "BigInt",
1557
+ // text
1558
+ "String",
1559
+ "RegExp",
1560
+ // Indexed collections
1561
+ "Array",
1562
+ "Float32Array",
1563
+ "Float64Array",
1564
+ "Int8Array",
1565
+ "Uint8Array",
1566
+ "Uint8ClampedArray",
1567
+ "Int16Array",
1568
+ "Int32Array",
1569
+ "Uint16Array",
1570
+ "Uint32Array",
1571
+ "BigInt64Array",
1572
+ "BigUint64Array",
1573
+ // Keyed collections
1574
+ "Set",
1575
+ "Map",
1576
+ "WeakSet",
1577
+ "WeakMap",
1578
+ // Structured data
1579
+ "ArrayBuffer",
1580
+ "SharedArrayBuffer",
1581
+ "Atomics",
1582
+ "DataView",
1583
+ "JSON",
1584
+ // Control abstraction objects
1585
+ "Promise",
1586
+ "Generator",
1587
+ "GeneratorFunction",
1588
+ "AsyncFunction",
1589
+ // Reflection
1590
+ "Reflect",
1591
+ "Proxy",
1592
+ // Internationalization
1593
+ "Intl",
1594
+ // WebAssembly
1595
+ "WebAssembly"
1596
+ ], vn = [
1597
+ "Error",
1598
+ "EvalError",
1599
+ "InternalError",
1600
+ "RangeError",
1601
+ "ReferenceError",
1602
+ "SyntaxError",
1603
+ "TypeError",
1604
+ "URIError"
1605
+ ], Tn = [
1606
+ "setInterval",
1607
+ "setTimeout",
1608
+ "clearInterval",
1609
+ "clearTimeout",
1610
+ "require",
1611
+ "exports",
1612
+ "eval",
1613
+ "isFinite",
1614
+ "isNaN",
1615
+ "parseFloat",
1616
+ "parseInt",
1617
+ "decodeURI",
1618
+ "decodeURIComponent",
1619
+ "encodeURI",
1620
+ "encodeURIComponent",
1621
+ "escape",
1622
+ "unescape"
1623
+ ], Pt = [
1624
+ "arguments",
1625
+ "this",
1626
+ "super",
1627
+ "console",
1628
+ "window",
1629
+ "document",
1630
+ "localStorage",
1631
+ "module",
1632
+ "global"
1633
+ // Node.js
1634
+ ], Ht = [].concat(
1635
+ Tn,
1636
+ An,
1637
+ vn
1638
+ );
1639
+ function zt(e) {
1640
+ const n = e.regex, t = (h, { after: A }) => {
1641
+ const M = "</" + h[0].slice(1);
1642
+ return h.input.indexOf(M, A) !== -1;
1643
+ }, s = ln, c = {
1644
+ begin: "<>",
1645
+ end: "</>"
1646
+ }, l = /<[A-Za-z0-9\\._:-]+\s*\/>/, i = {
1647
+ begin: /<[A-Za-z0-9\\._:-]+/,
1648
+ end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
1649
+ /**
1650
+ * @param {RegExpMatchArray} match
1651
+ * @param {CallbackResponse} response
1652
+ */
1653
+ isTrulyOpeningTag: (h, A) => {
1654
+ const M = h[0].length + h.index, I = h.input[M];
1655
+ if (
1656
+ // HTML should not include another raw `<` inside a tag
1657
+ // nested type?
1658
+ // `<Array<Array<number>>`, etc.
1659
+ I === "<" || // the , gives away that this is not HTML
1660
+ // `<T, A extends keyof T, V>`
1661
+ I === ","
1662
+ ) {
1663
+ A.ignoreMatch();
1664
+ return;
1665
+ }
1666
+ I === ">" && (t(h, { after: M }) || A.ignoreMatch());
1667
+ let z;
1668
+ const Q = h.input.substring(M);
1669
+ if (z = Q.match(/^\s*=/)) {
1670
+ A.ignoreMatch();
1671
+ return;
1672
+ }
1673
+ if ((z = Q.match(/^\s+extends\s+/)) && z.index === 0) {
1674
+ A.ignoreMatch();
1675
+ return;
1676
+ }
1677
+ }
1678
+ }, r = {
1679
+ $pattern: ln,
1680
+ keyword: $t,
1681
+ literal: Ut,
1682
+ built_in: Ht,
1683
+ "variable.language": Pt
1684
+ }, a = "[0-9](_?[0-9])*", o = `\\.(${a})`, b = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", E = {
1685
+ className: "number",
1686
+ variants: [
1687
+ // DecimalLiteral
1688
+ { begin: `(\\b(${b})((${o})|\\.)?|(${o}))[eE][+-]?(${a})\\b` },
1689
+ { begin: `\\b(${b})\\b((${o})\\b|\\.)?|(${o})\\b` },
1690
+ // DecimalBigIntegerLiteral
1691
+ { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
1692
+ // NonDecimalIntegerLiteral
1693
+ { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
1694
+ { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
1695
+ { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
1696
+ // LegacyOctalIntegerLiteral (does not include underscore separators)
1697
+ // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
1698
+ { begin: "\\b0[0-7]+n?\\b" }
1699
+ ],
1700
+ relevance: 0
1701
+ }, p = {
1702
+ className: "subst",
1703
+ begin: "\\$\\{",
1704
+ end: "\\}",
1705
+ keywords: r,
1706
+ contains: []
1707
+ // defined later
1708
+ }, v = {
1709
+ begin: "html`",
1710
+ end: "",
1711
+ starts: {
1712
+ end: "`",
1713
+ returnEnd: !1,
1714
+ contains: [
1715
+ e.BACKSLASH_ESCAPE,
1716
+ p
1717
+ ],
1718
+ subLanguage: "xml"
1719
+ }
1720
+ }, m = {
1721
+ begin: "css`",
1722
+ end: "",
1723
+ starts: {
1724
+ end: "`",
1725
+ returnEnd: !1,
1726
+ contains: [
1727
+ e.BACKSLASH_ESCAPE,
1728
+ p
1729
+ ],
1730
+ subLanguage: "css"
1731
+ }
1732
+ }, d = {
1733
+ className: "string",
1734
+ begin: "`",
1735
+ end: "`",
1736
+ contains: [
1737
+ e.BACKSLASH_ESCAPE,
1738
+ p
1739
+ ]
1740
+ }, S = {
1741
+ className: "comment",
1742
+ variants: [
1743
+ e.COMMENT(
1744
+ /\/\*\*(?!\/)/,
1745
+ "\\*/",
1746
+ {
1747
+ relevance: 0,
1748
+ contains: [
1749
+ {
1750
+ begin: "(?=@[A-Za-z]+)",
1751
+ relevance: 0,
1752
+ contains: [
1753
+ {
1754
+ className: "doctag",
1755
+ begin: "@[A-Za-z]+"
1756
+ },
1757
+ {
1758
+ className: "type",
1759
+ begin: "\\{",
1760
+ end: "\\}",
1761
+ excludeEnd: !0,
1762
+ excludeBegin: !0,
1763
+ relevance: 0
1764
+ },
1765
+ {
1766
+ className: "variable",
1767
+ begin: s + "(?=\\s*(-)|$)",
1768
+ endsParent: !0,
1769
+ relevance: 0
1770
+ },
1771
+ // eat spaces (not newlines) so we can find
1772
+ // types or variables
1773
+ {
1774
+ begin: /(?=[^\n])\s/,
1775
+ relevance: 0
1776
+ }
1777
+ ]
1778
+ }
1779
+ ]
1780
+ }
1781
+ ),
1782
+ e.C_BLOCK_COMMENT_MODE,
1783
+ e.C_LINE_COMMENT_MODE
1784
+ ]
1785
+ }, x = [
1786
+ e.APOS_STRING_MODE,
1787
+ e.QUOTE_STRING_MODE,
1788
+ v,
1789
+ m,
1790
+ d,
1791
+ // Skip numbers when they are part of a variable name
1792
+ { match: /\$\d+/ },
1793
+ E
1794
+ // This is intentional:
1795
+ // See https://github.com/highlightjs/highlight.js/issues/3288
1796
+ // hljs.REGEXP_MODE
1797
+ ];
1798
+ p.contains = x.concat({
1799
+ // we need to pair up {} inside our subst to prevent
1800
+ // it from ending too early by matching another }
1801
+ begin: /\{/,
1802
+ end: /\}/,
1803
+ keywords: r,
1804
+ contains: [
1805
+ "self"
1806
+ ].concat(x)
1807
+ });
1808
+ const y = [].concat(S, p.contains), R = y.concat([
1809
+ // eat recursive parens in sub expressions
1810
+ {
1811
+ begin: /\(/,
1812
+ end: /\)/,
1813
+ keywords: r,
1814
+ contains: ["self"].concat(y)
1815
+ }
1816
+ ]), L = {
1817
+ className: "params",
1818
+ begin: /\(/,
1819
+ end: /\)/,
1820
+ excludeBegin: !0,
1821
+ excludeEnd: !0,
1822
+ keywords: r,
1823
+ contains: R
1824
+ }, D = {
1825
+ variants: [
1826
+ // class Car extends vehicle
1827
+ {
1828
+ match: [
1829
+ /class/,
1830
+ /\s+/,
1831
+ s,
1832
+ /\s+/,
1833
+ /extends/,
1834
+ /\s+/,
1835
+ n.concat(s, "(", n.concat(/\./, s), ")*")
1836
+ ],
1837
+ scope: {
1838
+ 1: "keyword",
1839
+ 3: "title.class",
1840
+ 5: "keyword",
1841
+ 7: "title.class.inherited"
1842
+ }
1843
+ },
1844
+ // class Car
1845
+ {
1846
+ match: [
1847
+ /class/,
1848
+ /\s+/,
1849
+ s
1850
+ ],
1851
+ scope: {
1852
+ 1: "keyword",
1853
+ 3: "title.class"
1854
+ }
1855
+ }
1856
+ ]
1857
+ }, B = {
1858
+ relevance: 0,
1859
+ match: n.either(
1860
+ // Hard coded exceptions
1861
+ /\bJSON/,
1862
+ // Float32Array, OutT
1863
+ /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
1864
+ // CSSFactory, CSSFactoryT
1865
+ /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
1866
+ // FPs, FPsT
1867
+ /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
1868
+ // P
1869
+ // single letters are not highlighted
1870
+ // BLAH
1871
+ // this will be flagged as a UPPER_CASE_CONSTANT instead
1872
+ ),
1873
+ className: "title.class",
1874
+ keywords: {
1875
+ _: [
1876
+ // se we still get relevance credit for JS library classes
1877
+ ...An,
1878
+ ...vn
1879
+ ]
1880
+ }
1881
+ }, K = {
1882
+ label: "use_strict",
1883
+ className: "meta",
1884
+ relevance: 10,
1885
+ begin: /^\s*['"]use (strict|asm)['"]/
1886
+ }, W = {
1887
+ variants: [
1888
+ {
1889
+ match: [
1890
+ /function/,
1891
+ /\s+/,
1892
+ s,
1893
+ /(?=\s*\()/
1894
+ ]
1895
+ },
1896
+ // anonymous function
1897
+ {
1898
+ match: [
1899
+ /function/,
1900
+ /\s*(?=\()/
1901
+ ]
1902
+ }
1903
+ ],
1904
+ className: {
1905
+ 1: "keyword",
1906
+ 3: "title.function"
1907
+ },
1908
+ label: "func.def",
1909
+ contains: [L],
1910
+ illegal: /%/
1911
+ }, re = {
1912
+ relevance: 0,
1913
+ match: /\b[A-Z][A-Z_0-9]+\b/,
1914
+ className: "variable.constant"
1915
+ };
1916
+ function ae(h) {
1917
+ return n.concat("(?!", h.join("|"), ")");
1918
+ }
1919
+ const de = {
1920
+ match: n.concat(
1921
+ /\b/,
1922
+ ae([
1923
+ ...Tn,
1924
+ "super",
1925
+ "import"
1926
+ ]),
1927
+ s,
1928
+ n.lookahead(/\(/)
1929
+ ),
1930
+ className: "title.function",
1931
+ relevance: 0
1932
+ }, De = {
1933
+ begin: n.concat(/\./, n.lookahead(
1934
+ n.concat(s, /(?![0-9A-Za-z$_(])/)
1935
+ )),
1936
+ end: s,
1937
+ excludeBegin: !0,
1938
+ keywords: "prototype",
1939
+ className: "property",
1940
+ relevance: 0
1941
+ }, oe = {
1942
+ match: [
1943
+ /get|set/,
1944
+ /\s+/,
1945
+ s,
1946
+ /(?=\()/
1947
+ ],
1948
+ className: {
1949
+ 1: "keyword",
1950
+ 3: "title.function"
1951
+ },
1952
+ contains: [
1953
+ {
1954
+ // eat to avoid empty params
1955
+ begin: /\(\)/
1956
+ },
1957
+ L
1958
+ ]
1959
+ }, me = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", u = {
1960
+ match: [
1961
+ /const|var|let/,
1962
+ /\s+/,
1963
+ s,
1964
+ /\s*/,
1965
+ /=\s*/,
1966
+ /(async\s*)?/,
1967
+ // async is optional
1968
+ n.lookahead(me)
1969
+ ],
1970
+ keywords: "async",
1971
+ className: {
1972
+ 1: "keyword",
1973
+ 3: "title.function"
1974
+ },
1975
+ contains: [
1976
+ L
1977
+ ]
1978
+ };
1979
+ return {
1980
+ name: "Javascript",
1981
+ aliases: ["js", "jsx", "mjs", "cjs"],
1982
+ keywords: r,
1983
+ // this will be extended by TypeScript
1984
+ exports: { PARAMS_CONTAINS: R, CLASS_REFERENCE: B },
1985
+ illegal: /#(?![$_A-z])/,
1986
+ contains: [
1987
+ e.SHEBANG({
1988
+ label: "shebang",
1989
+ binary: "node",
1990
+ relevance: 5
1991
+ }),
1992
+ K,
1993
+ e.APOS_STRING_MODE,
1994
+ e.QUOTE_STRING_MODE,
1995
+ v,
1996
+ m,
1997
+ d,
1998
+ S,
1999
+ // Skip numbers when they are part of a variable name
2000
+ { match: /\$\d+/ },
2001
+ E,
2002
+ B,
2003
+ {
2004
+ className: "attr",
2005
+ begin: s + n.lookahead(":"),
2006
+ relevance: 0
2007
+ },
2008
+ u,
2009
+ {
2010
+ // "value" container
2011
+ begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
2012
+ keywords: "return throw case",
2013
+ relevance: 0,
2014
+ contains: [
2015
+ S,
2016
+ e.REGEXP_MODE,
2017
+ {
2018
+ className: "function",
2019
+ // we have to count the parens to make sure we actually have the
2020
+ // correct bounding ( ) before the =>. There could be any number of
2021
+ // sub-expressions inside also surrounded by parens.
2022
+ begin: me,
2023
+ returnBegin: !0,
2024
+ end: "\\s*=>",
2025
+ contains: [
2026
+ {
2027
+ className: "params",
2028
+ variants: [
2029
+ {
2030
+ begin: e.UNDERSCORE_IDENT_RE,
2031
+ relevance: 0
2032
+ },
2033
+ {
2034
+ className: null,
2035
+ begin: /\(\s*\)/,
2036
+ skip: !0
2037
+ },
2038
+ {
2039
+ begin: /\(/,
2040
+ end: /\)/,
2041
+ excludeBegin: !0,
2042
+ excludeEnd: !0,
2043
+ keywords: r,
2044
+ contains: R
2045
+ }
2046
+ ]
2047
+ }
2048
+ ]
2049
+ },
2050
+ {
2051
+ // could be a comma delimited list of params to a function call
2052
+ begin: /,/,
2053
+ relevance: 0
2054
+ },
2055
+ {
2056
+ match: /\s+/,
2057
+ relevance: 0
2058
+ },
2059
+ {
2060
+ // JSX
2061
+ variants: [
2062
+ { begin: c.begin, end: c.end },
2063
+ { match: l },
2064
+ {
2065
+ begin: i.begin,
2066
+ // we carefully check the opening tag to see if it truly
2067
+ // is a tag and not a false positive
2068
+ "on:begin": i.isTrulyOpeningTag,
2069
+ end: i.end
2070
+ }
2071
+ ],
2072
+ subLanguage: "xml",
2073
+ contains: [
2074
+ {
2075
+ begin: i.begin,
2076
+ end: i.end,
2077
+ skip: !0,
2078
+ contains: ["self"]
2079
+ }
2080
+ ]
2081
+ }
2082
+ ]
2083
+ },
2084
+ W,
2085
+ {
2086
+ // prevent this from getting swallowed up by function
2087
+ // since they appear "function like"
2088
+ beginKeywords: "while if switch catch for"
2089
+ },
2090
+ {
2091
+ // we have to count the parens to make sure we actually have the correct
2092
+ // bounding ( ). There could be any number of sub-expressions inside
2093
+ // also surrounded by parens.
2094
+ begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
2095
+ // end parens
2096
+ returnBegin: !0,
2097
+ label: "func.def",
2098
+ contains: [
2099
+ L,
2100
+ e.inherit(e.TITLE_MODE, { begin: s, className: "title.function" })
2101
+ ]
2102
+ },
2103
+ // catch ... so it won't trigger the property rule below
2104
+ {
2105
+ match: /\.\.\./,
2106
+ relevance: 0
2107
+ },
2108
+ De,
2109
+ // hack: prevents detection of keywords in some circumstances
2110
+ // .keyword()
2111
+ // $keyword = x
2112
+ {
2113
+ match: "\\$" + s,
2114
+ relevance: 0
2115
+ },
2116
+ {
2117
+ match: [/\bconstructor(?=\s*\()/],
2118
+ className: { 1: "title.function" },
2119
+ contains: [L]
2120
+ },
2121
+ de,
2122
+ re,
2123
+ D,
2124
+ oe,
2125
+ {
2126
+ match: /\$[(.]/
2127
+ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
2128
+ }
2129
+ ]
2130
+ };
2131
+ }
2132
+ function Ft(e) {
2133
+ const n = {
2134
+ className: "attr",
2135
+ begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
2136
+ relevance: 1.01
2137
+ }, t = {
2138
+ match: /[{}[\],:]/,
2139
+ className: "punctuation",
2140
+ relevance: 0
2141
+ }, s = [
2142
+ "true",
2143
+ "false",
2144
+ "null"
2145
+ ], c = {
2146
+ scope: "literal",
2147
+ beginKeywords: s.join(" ")
2148
+ };
2149
+ return {
2150
+ name: "JSON",
2151
+ keywords: {
2152
+ literal: s
2153
+ },
2154
+ contains: [
2155
+ n,
2156
+ t,
2157
+ e.QUOTE_STRING_MODE,
2158
+ c,
2159
+ e.C_NUMBER_MODE,
2160
+ e.C_LINE_COMMENT_MODE,
2161
+ e.C_BLOCK_COMMENT_MODE
2162
+ ],
2163
+ illegal: "\\S"
2164
+ };
2165
+ }
2166
+ function Gt(e) {
2167
+ const n = "true false yes no null", t = "[\\w#;/?:@&=+$,.~*'()[\\]]+", s = {
2168
+ className: "attr",
2169
+ variants: [
2170
+ { begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
2171
+ {
2172
+ // double quoted keys
2173
+ begin: '"\\w[\\w :\\/.-]*":(?=[ ]|$)'
2174
+ },
2175
+ {
2176
+ // single quoted keys
2177
+ begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
2178
+ }
2179
+ ]
2180
+ }, c = {
2181
+ className: "template-variable",
2182
+ variants: [
2183
+ {
2184
+ // jinja templates Ansible
2185
+ begin: /\{\{/,
2186
+ end: /\}\}/
2187
+ },
2188
+ {
2189
+ // Ruby i18n
2190
+ begin: /%\{/,
2191
+ end: /\}/
2192
+ }
2193
+ ]
2194
+ }, l = {
2195
+ className: "string",
2196
+ relevance: 0,
2197
+ variants: [
2198
+ {
2199
+ begin: /'/,
2200
+ end: /'/
2201
+ },
2202
+ {
2203
+ begin: /"/,
2204
+ end: /"/
2205
+ },
2206
+ { begin: /\S+/ }
2207
+ ],
2208
+ contains: [
2209
+ e.BACKSLASH_ESCAPE,
2210
+ c
2211
+ ]
2212
+ }, i = e.inherit(l, { variants: [
2213
+ {
2214
+ begin: /'/,
2215
+ end: /'/
2216
+ },
2217
+ {
2218
+ begin: /"/,
2219
+ end: /"/
2220
+ },
2221
+ { begin: /[^\s,{}[\]]+/ }
2222
+ ] }), r = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", o = "(\\.[0-9]*)?", b = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", E = {
2223
+ className: "number",
2224
+ begin: "\\b" + r + a + o + b + "\\b"
2225
+ }, p = {
2226
+ end: ",",
2227
+ endsWithParent: !0,
2228
+ excludeEnd: !0,
2229
+ keywords: n,
2230
+ relevance: 0
2231
+ }, v = {
2232
+ begin: /\{/,
2233
+ end: /\}/,
2234
+ contains: [p],
2235
+ illegal: "\\n",
2236
+ relevance: 0
2237
+ }, m = {
2238
+ begin: "\\[",
2239
+ end: "\\]",
2240
+ contains: [p],
2241
+ illegal: "\\n",
2242
+ relevance: 0
2243
+ }, d = [
2244
+ s,
2245
+ {
2246
+ className: "meta",
2247
+ begin: "^---\\s*$",
2248
+ relevance: 10
2249
+ },
2250
+ {
2251
+ // multi line string
2252
+ // Blocks start with a | or > followed by a newline
2253
+ //
2254
+ // Indentation of subsequent lines must be the same to
2255
+ // be considered part of the block
2256
+ className: "string",
2257
+ begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
2258
+ },
2259
+ {
2260
+ // Ruby/Rails erb
2261
+ begin: "<%[%=-]?",
2262
+ end: "[%-]?%>",
2263
+ subLanguage: "ruby",
2264
+ excludeBegin: !0,
2265
+ excludeEnd: !0,
2266
+ relevance: 0
2267
+ },
2268
+ {
2269
+ // named tags
2270
+ className: "type",
2271
+ begin: "!\\w+!" + t
2272
+ },
2273
+ // https://yaml.org/spec/1.2/spec.html#id2784064
2274
+ {
2275
+ // verbatim tags
2276
+ className: "type",
2277
+ begin: "!<" + t + ">"
2278
+ },
2279
+ {
2280
+ // primary tags
2281
+ className: "type",
2282
+ begin: "!" + t
2283
+ },
2284
+ {
2285
+ // secondary tags
2286
+ className: "type",
2287
+ begin: "!!" + t
2288
+ },
2289
+ {
2290
+ // fragment id &ref
2291
+ className: "meta",
2292
+ begin: "&" + e.UNDERSCORE_IDENT_RE + "$"
2293
+ },
2294
+ {
2295
+ // fragment reference *ref
2296
+ className: "meta",
2297
+ begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$"
2298
+ },
2299
+ {
2300
+ // array listing
2301
+ className: "bullet",
2302
+ // TODO: remove |$ hack when we have proper look-ahead support
2303
+ begin: "-(?=[ ]|$)",
2304
+ relevance: 0
2305
+ },
2306
+ e.HASH_COMMENT_MODE,
2307
+ {
2308
+ beginKeywords: n,
2309
+ keywords: { literal: n }
2310
+ },
2311
+ E,
2312
+ // numbers are any valid C-style number that
2313
+ // sit isolated from other words
2314
+ {
2315
+ className: "number",
2316
+ begin: e.C_NUMBER_RE + "\\b",
2317
+ relevance: 0
2318
+ },
2319
+ v,
2320
+ m,
2321
+ l
2322
+ ], T = [...d];
2323
+ return T.pop(), T.push(i), p.contains = T, {
2324
+ name: "YAML",
2325
+ case_insensitive: !0,
2326
+ aliases: ["yml"],
2327
+ contains: d
2328
+ };
2329
+ }
2330
+ function Kt(e) {
2331
+ return {
2332
+ name: "Plain text",
2333
+ aliases: [
2334
+ "text",
2335
+ "txt"
2336
+ ],
2337
+ disableAutodetect: !0
2338
+ };
2339
+ }
2340
+ function Wt(e) {
2341
+ const n = e.regex, t = /[\p{XID_Start}_]\p{XID_Continue}*/u, s = [
2342
+ "and",
2343
+ "as",
2344
+ "assert",
2345
+ "async",
2346
+ "await",
2347
+ "break",
2348
+ "case",
2349
+ "class",
2350
+ "continue",
2351
+ "def",
2352
+ "del",
2353
+ "elif",
2354
+ "else",
2355
+ "except",
2356
+ "finally",
2357
+ "for",
2358
+ "from",
2359
+ "global",
2360
+ "if",
2361
+ "import",
2362
+ "in",
2363
+ "is",
2364
+ "lambda",
2365
+ "match",
2366
+ "nonlocal|10",
2367
+ "not",
2368
+ "or",
2369
+ "pass",
2370
+ "raise",
2371
+ "return",
2372
+ "try",
2373
+ "while",
2374
+ "with",
2375
+ "yield"
2376
+ ], r = {
2377
+ $pattern: /[A-Za-z]\w+|__\w+__/,
2378
+ keyword: s,
2379
+ built_in: [
2380
+ "__import__",
2381
+ "abs",
2382
+ "all",
2383
+ "any",
2384
+ "ascii",
2385
+ "bin",
2386
+ "bool",
2387
+ "breakpoint",
2388
+ "bytearray",
2389
+ "bytes",
2390
+ "callable",
2391
+ "chr",
2392
+ "classmethod",
2393
+ "compile",
2394
+ "complex",
2395
+ "delattr",
2396
+ "dict",
2397
+ "dir",
2398
+ "divmod",
2399
+ "enumerate",
2400
+ "eval",
2401
+ "exec",
2402
+ "filter",
2403
+ "float",
2404
+ "format",
2405
+ "frozenset",
2406
+ "getattr",
2407
+ "globals",
2408
+ "hasattr",
2409
+ "hash",
2410
+ "help",
2411
+ "hex",
2412
+ "id",
2413
+ "input",
2414
+ "int",
2415
+ "isinstance",
2416
+ "issubclass",
2417
+ "iter",
2418
+ "len",
2419
+ "list",
2420
+ "locals",
2421
+ "map",
2422
+ "max",
2423
+ "memoryview",
2424
+ "min",
2425
+ "next",
2426
+ "object",
2427
+ "oct",
2428
+ "open",
2429
+ "ord",
2430
+ "pow",
2431
+ "print",
2432
+ "property",
2433
+ "range",
2434
+ "repr",
2435
+ "reversed",
2436
+ "round",
2437
+ "set",
2438
+ "setattr",
2439
+ "slice",
2440
+ "sorted",
2441
+ "staticmethod",
2442
+ "str",
2443
+ "sum",
2444
+ "super",
2445
+ "tuple",
2446
+ "type",
2447
+ "vars",
2448
+ "zip"
2449
+ ],
2450
+ literal: [
2451
+ "__debug__",
2452
+ "Ellipsis",
2453
+ "False",
2454
+ "None",
2455
+ "NotImplemented",
2456
+ "True"
2457
+ ],
2458
+ type: [
2459
+ "Any",
2460
+ "Callable",
2461
+ "Coroutine",
2462
+ "Dict",
2463
+ "List",
2464
+ "Literal",
2465
+ "Generic",
2466
+ "Optional",
2467
+ "Sequence",
2468
+ "Set",
2469
+ "Tuple",
2470
+ "Type",
2471
+ "Union"
2472
+ ]
2473
+ }, a = {
2474
+ className: "meta",
2475
+ begin: /^(>>>|\.\.\.) /
2476
+ }, o = {
2477
+ className: "subst",
2478
+ begin: /\{/,
2479
+ end: /\}/,
2480
+ keywords: r,
2481
+ illegal: /#/
2482
+ }, b = {
2483
+ begin: /\{\{/,
2484
+ relevance: 0
2485
+ }, E = {
2486
+ className: "string",
2487
+ contains: [e.BACKSLASH_ESCAPE],
2488
+ variants: [
2489
+ {
2490
+ begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
2491
+ end: /'''/,
2492
+ contains: [
2493
+ e.BACKSLASH_ESCAPE,
2494
+ a
2495
+ ],
2496
+ relevance: 10
2497
+ },
2498
+ {
2499
+ begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
2500
+ end: /"""/,
2501
+ contains: [
2502
+ e.BACKSLASH_ESCAPE,
2503
+ a
2504
+ ],
2505
+ relevance: 10
2506
+ },
2507
+ {
2508
+ begin: /([fF][rR]|[rR][fF]|[fF])'''/,
2509
+ end: /'''/,
2510
+ contains: [
2511
+ e.BACKSLASH_ESCAPE,
2512
+ a,
2513
+ b,
2514
+ o
2515
+ ]
2516
+ },
2517
+ {
2518
+ begin: /([fF][rR]|[rR][fF]|[fF])"""/,
2519
+ end: /"""/,
2520
+ contains: [
2521
+ e.BACKSLASH_ESCAPE,
2522
+ a,
2523
+ b,
2524
+ o
2525
+ ]
2526
+ },
2527
+ {
2528
+ begin: /([uU]|[rR])'/,
2529
+ end: /'/,
2530
+ relevance: 10
2531
+ },
2532
+ {
2533
+ begin: /([uU]|[rR])"/,
2534
+ end: /"/,
2535
+ relevance: 10
2536
+ },
2537
+ {
2538
+ begin: /([bB]|[bB][rR]|[rR][bB])'/,
2539
+ end: /'/
2540
+ },
2541
+ {
2542
+ begin: /([bB]|[bB][rR]|[rR][bB])"/,
2543
+ end: /"/
2544
+ },
2545
+ {
2546
+ begin: /([fF][rR]|[rR][fF]|[fF])'/,
2547
+ end: /'/,
2548
+ contains: [
2549
+ e.BACKSLASH_ESCAPE,
2550
+ b,
2551
+ o
2552
+ ]
2553
+ },
2554
+ {
2555
+ begin: /([fF][rR]|[rR][fF]|[fF])"/,
2556
+ end: /"/,
2557
+ contains: [
2558
+ e.BACKSLASH_ESCAPE,
2559
+ b,
2560
+ o
2561
+ ]
2562
+ },
2563
+ e.APOS_STRING_MODE,
2564
+ e.QUOTE_STRING_MODE
2565
+ ]
2566
+ }, p = "[0-9](_?[0-9])*", v = `(\\b(${p}))?\\.(${p})|\\b(${p})\\.`, m = `\\b|${s.join("|")}`, d = {
2567
+ className: "number",
2568
+ relevance: 0,
2569
+ variants: [
2570
+ // exponentfloat, pointfloat
2571
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
2572
+ // optionally imaginary
2573
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
2574
+ // Note: no leading \b because floats can start with a decimal point
2575
+ // and we don't want to mishandle e.g. `fn(.5)`,
2576
+ // no trailing \b for pointfloat because it can end with a decimal point
2577
+ // and we don't want to mishandle e.g. `0..hex()`; this should be safe
2578
+ // because both MUST contain a decimal point and so cannot be confused with
2579
+ // the interior part of an identifier
2580
+ {
2581
+ begin: `(\\b(${p})|(${v}))[eE][+-]?(${p})[jJ]?(?=${m})`
2582
+ },
2583
+ {
2584
+ begin: `(${v})[jJ]?`
2585
+ },
2586
+ // decinteger, bininteger, octinteger, hexinteger
2587
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
2588
+ // optionally "long" in Python 2
2589
+ // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
2590
+ // decinteger is optionally imaginary
2591
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
2592
+ {
2593
+ begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`
2594
+ },
2595
+ {
2596
+ begin: `\\b0[bB](_?[01])+[lL]?(?=${m})`
2597
+ },
2598
+ {
2599
+ begin: `\\b0[oO](_?[0-7])+[lL]?(?=${m})`
2600
+ },
2601
+ {
2602
+ begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`
2603
+ },
2604
+ // imagnumber (digitpart-based)
2605
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
2606
+ {
2607
+ begin: `\\b(${p})[jJ](?=${m})`
2608
+ }
2609
+ ]
2610
+ }, T = {
2611
+ className: "comment",
2612
+ begin: n.lookahead(/# type:/),
2613
+ end: /$/,
2614
+ keywords: r,
2615
+ contains: [
2616
+ {
2617
+ // prevent keywords from coloring `type`
2618
+ begin: /# type:/
2619
+ },
2620
+ // comment within a datatype comment includes no keywords
2621
+ {
2622
+ begin: /#/,
2623
+ end: /\b\B/,
2624
+ endsWithParent: !0
2625
+ }
2626
+ ]
2627
+ }, S = {
2628
+ className: "params",
2629
+ variants: [
2630
+ // Exclude params in functions without params
2631
+ {
2632
+ className: "",
2633
+ begin: /\(\s*\)/,
2634
+ skip: !0
2635
+ },
2636
+ {
2637
+ begin: /\(/,
2638
+ end: /\)/,
2639
+ excludeBegin: !0,
2640
+ excludeEnd: !0,
2641
+ keywords: r,
2642
+ contains: [
2643
+ "self",
2644
+ a,
2645
+ d,
2646
+ E,
2647
+ e.HASH_COMMENT_MODE
2648
+ ]
2649
+ }
2650
+ ]
2651
+ };
2652
+ return o.contains = [
2653
+ E,
2654
+ d,
2655
+ a
2656
+ ], {
2657
+ name: "Python",
2658
+ aliases: [
2659
+ "py",
2660
+ "gyp",
2661
+ "ipython"
2662
+ ],
2663
+ unicodeRegex: !0,
2664
+ keywords: r,
2665
+ illegal: /(<\/|->|\?)|=>/,
2666
+ contains: [
2667
+ a,
2668
+ d,
2669
+ {
2670
+ // very common convention
2671
+ begin: /\bself\b/
2672
+ },
2673
+ {
2674
+ // eat "if" prior to string so that it won't accidentally be
2675
+ // labeled as an f-string
2676
+ beginKeywords: "if",
2677
+ relevance: 0
2678
+ },
2679
+ E,
2680
+ T,
2681
+ e.HASH_COMMENT_MODE,
2682
+ {
2683
+ match: [
2684
+ /\bdef/,
2685
+ /\s+/,
2686
+ t
2687
+ ],
2688
+ scope: {
2689
+ 1: "keyword",
2690
+ 3: "title.function"
2691
+ },
2692
+ contains: [S]
2693
+ },
2694
+ {
2695
+ variants: [
2696
+ {
2697
+ match: [
2698
+ /\bclass/,
2699
+ /\s+/,
2700
+ t,
2701
+ /\s*/,
2702
+ /\(\s*/,
2703
+ t,
2704
+ /\s*\)/
2705
+ ]
2706
+ },
2707
+ {
2708
+ match: [
2709
+ /\bclass/,
2710
+ /\s+/,
2711
+ t
2712
+ ]
2713
+ }
2714
+ ],
2715
+ scope: {
2716
+ 1: "keyword",
2717
+ 3: "title.class",
2718
+ 6: "title.class.inherited"
2719
+ }
2720
+ },
2721
+ {
2722
+ className: "meta",
2723
+ begin: /^[\t ]*@/,
2724
+ end: /(?=#)|$/,
2725
+ contains: [
2726
+ d,
2727
+ S,
2728
+ E
2729
+ ]
2730
+ }
2731
+ ]
2732
+ };
2733
+ }
2734
+ var le = "[0-9](_*[0-9])*", we = `\\.(${le})`, Se = "[0-9a-fA-F](_*[0-9a-fA-F])*", un = {
2735
+ className: "number",
2736
+ variants: [
2737
+ // DecimalFloatingPointLiteral
2738
+ // including ExponentPart
2739
+ { begin: `(\\b(${le})((${we})|\\.)?|(${we}))[eE][+-]?(${le})[fFdD]?\\b` },
2740
+ // excluding ExponentPart
2741
+ { begin: `\\b(${le})((${we})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
2742
+ { begin: `(${we})[fFdD]?\\b` },
2743
+ { begin: `\\b(${le})[fFdD]\\b` },
2744
+ // HexadecimalFloatingPointLiteral
2745
+ { begin: `\\b0[xX]((${Se})\\.?|(${Se})?\\.(${Se}))[pP][+-]?(${le})[fFdD]?\\b` },
2746
+ // DecimalIntegerLiteral
2747
+ { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
2748
+ // HexIntegerLiteral
2749
+ { begin: `\\b0[xX](${Se})[lL]?\\b` },
2750
+ // OctalIntegerLiteral
2751
+ { begin: "\\b0(_*[0-7])*[lL]?\\b" },
2752
+ // BinaryIntegerLiteral
2753
+ { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
2754
+ ],
2755
+ relevance: 0
2756
+ };
2757
+ function wn(e, n, t) {
2758
+ return t === -1 ? "" : e.replace(n, (s) => wn(e, n, t - 1));
2759
+ }
2760
+ function Yt(e) {
2761
+ const n = e.regex, t = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", s = t + wn("(?:<" + t + "~~~(?:\\s*,\\s*" + t + "~~~)*>)?", /~~~/g, 2), a = {
2762
+ keyword: [
2763
+ "synchronized",
2764
+ "abstract",
2765
+ "private",
2766
+ "var",
2767
+ "static",
2768
+ "if",
2769
+ "const ",
2770
+ "for",
2771
+ "while",
2772
+ "strictfp",
2773
+ "finally",
2774
+ "protected",
2775
+ "import",
2776
+ "native",
2777
+ "final",
2778
+ "void",
2779
+ "enum",
2780
+ "else",
2781
+ "break",
2782
+ "transient",
2783
+ "catch",
2784
+ "instanceof",
2785
+ "volatile",
2786
+ "case",
2787
+ "assert",
2788
+ "package",
2789
+ "default",
2790
+ "public",
2791
+ "try",
2792
+ "switch",
2793
+ "continue",
2794
+ "throws",
2795
+ "protected",
2796
+ "public",
2797
+ "private",
2798
+ "module",
2799
+ "requires",
2800
+ "exports",
2801
+ "do",
2802
+ "sealed",
2803
+ "yield",
2804
+ "permits"
2805
+ ],
2806
+ literal: [
2807
+ "false",
2808
+ "true",
2809
+ "null"
2810
+ ],
2811
+ type: [
2812
+ "char",
2813
+ "boolean",
2814
+ "long",
2815
+ "float",
2816
+ "int",
2817
+ "byte",
2818
+ "short",
2819
+ "double"
2820
+ ],
2821
+ built_in: [
2822
+ "super",
2823
+ "this"
2824
+ ]
2825
+ }, o = {
2826
+ className: "meta",
2827
+ begin: "@" + t,
2828
+ contains: [
2829
+ {
2830
+ begin: /\(/,
2831
+ end: /\)/,
2832
+ contains: ["self"]
2833
+ // allow nested () inside our annotation
2834
+ }
2835
+ ]
2836
+ }, b = {
2837
+ className: "params",
2838
+ begin: /\(/,
2839
+ end: /\)/,
2840
+ keywords: a,
2841
+ relevance: 0,
2842
+ contains: [e.C_BLOCK_COMMENT_MODE],
2843
+ endsParent: !0
2844
+ };
2845
+ return {
2846
+ name: "Java",
2847
+ aliases: ["jsp"],
2848
+ keywords: a,
2849
+ illegal: /<\/|#/,
2850
+ contains: [
2851
+ e.COMMENT(
2852
+ "/\\*\\*",
2853
+ "\\*/",
2854
+ {
2855
+ relevance: 0,
2856
+ contains: [
2857
+ {
2858
+ // eat up @'s in emails to prevent them to be recognized as doctags
2859
+ begin: /\w+@/,
2860
+ relevance: 0
2861
+ },
2862
+ {
2863
+ className: "doctag",
2864
+ begin: "@[A-Za-z]+"
2865
+ }
2866
+ ]
2867
+ }
2868
+ ),
2869
+ // relevance boost
2870
+ {
2871
+ begin: /import java\.[a-z]+\./,
2872
+ keywords: "import",
2873
+ relevance: 2
2874
+ },
2875
+ e.C_LINE_COMMENT_MODE,
2876
+ e.C_BLOCK_COMMENT_MODE,
2877
+ {
2878
+ begin: /"""/,
2879
+ end: /"""/,
2880
+ className: "string",
2881
+ contains: [e.BACKSLASH_ESCAPE]
2882
+ },
2883
+ e.APOS_STRING_MODE,
2884
+ e.QUOTE_STRING_MODE,
2885
+ {
2886
+ match: [
2887
+ /\b(?:class|interface|enum|extends|implements|new)/,
2888
+ /\s+/,
2889
+ t
2890
+ ],
2891
+ className: {
2892
+ 1: "keyword",
2893
+ 3: "title.class"
2894
+ }
2895
+ },
2896
+ {
2897
+ // Exceptions for hyphenated keywords
2898
+ match: /non-sealed/,
2899
+ scope: "keyword"
2900
+ },
2901
+ {
2902
+ begin: [
2903
+ n.concat(/(?!else)/, t),
2904
+ /\s+/,
2905
+ t,
2906
+ /\s+/,
2907
+ /=(?!=)/
2908
+ ],
2909
+ className: {
2910
+ 1: "type",
2911
+ 3: "variable",
2912
+ 5: "operator"
2913
+ }
2914
+ },
2915
+ {
2916
+ begin: [
2917
+ /record/,
2918
+ /\s+/,
2919
+ t
2920
+ ],
2921
+ className: {
2922
+ 1: "keyword",
2923
+ 3: "title.class"
2924
+ },
2925
+ contains: [
2926
+ b,
2927
+ e.C_LINE_COMMENT_MODE,
2928
+ e.C_BLOCK_COMMENT_MODE
2929
+ ]
2930
+ },
2931
+ {
2932
+ // Expression keywords prevent 'keyword Name(...)' from being
2933
+ // recognized as a function definition
2934
+ beginKeywords: "new throw return else",
2935
+ relevance: 0
2936
+ },
2937
+ {
2938
+ begin: [
2939
+ "(?:" + s + "\\s+)",
2940
+ e.UNDERSCORE_IDENT_RE,
2941
+ /\s*(?=\()/
2942
+ ],
2943
+ className: { 2: "title.function" },
2944
+ keywords: a,
2945
+ contains: [
2946
+ {
2947
+ className: "params",
2948
+ begin: /\(/,
2949
+ end: /\)/,
2950
+ keywords: a,
2951
+ relevance: 0,
2952
+ contains: [
2953
+ o,
2954
+ e.APOS_STRING_MODE,
2955
+ e.QUOTE_STRING_MODE,
2956
+ un,
2957
+ e.C_BLOCK_COMMENT_MODE
2958
+ ]
2959
+ },
2960
+ e.C_LINE_COMMENT_MODE,
2961
+ e.C_BLOCK_COMMENT_MODE
2962
+ ]
2963
+ },
2964
+ un,
2965
+ o
2966
+ ]
2967
+ };
2968
+ }
2969
+ function Zt(e) {
2970
+ const n = e.regex, t = {}, s = {
2971
+ begin: /\$\{/,
2972
+ end: /\}/,
2973
+ contains: [
2974
+ "self",
2975
+ {
2976
+ begin: /:-/,
2977
+ contains: [t]
2978
+ }
2979
+ // default values
2980
+ ]
2981
+ };
2982
+ Object.assign(t, {
2983
+ className: "variable",
2984
+ variants: [
2985
+ { begin: n.concat(
2986
+ /\$[\w\d#@][\w\d_]*/,
2987
+ // negative look-ahead tries to avoid matching patterns that are not
2988
+ // Perl at all like $ident$, @ident@, etc.
2989
+ "(?![\\w\\d])(?![$])"
2990
+ ) },
2991
+ s
2992
+ ]
2993
+ });
2994
+ const c = {
2995
+ className: "subst",
2996
+ begin: /\$\(/,
2997
+ end: /\)/,
2998
+ contains: [e.BACKSLASH_ESCAPE]
2999
+ }, l = {
3000
+ begin: /<<-?\s*(?=\w+)/,
3001
+ starts: { contains: [
3002
+ e.END_SAME_AS_BEGIN({
3003
+ begin: /(\w+)/,
3004
+ end: /(\w+)/,
3005
+ className: "string"
3006
+ })
3007
+ ] }
3008
+ }, i = {
3009
+ className: "string",
3010
+ begin: /"/,
3011
+ end: /"/,
3012
+ contains: [
3013
+ e.BACKSLASH_ESCAPE,
3014
+ t,
3015
+ c
3016
+ ]
3017
+ };
3018
+ c.contains.push(i);
3019
+ const r = {
3020
+ className: "",
3021
+ begin: /\\"/
3022
+ }, a = {
3023
+ className: "string",
3024
+ begin: /'/,
3025
+ end: /'/
3026
+ }, o = {
3027
+ begin: /\$?\(\(/,
3028
+ end: /\)\)/,
3029
+ contains: [
3030
+ {
3031
+ begin: /\d+#[0-9a-f]+/,
3032
+ className: "number"
3033
+ },
3034
+ e.NUMBER_MODE,
3035
+ t
3036
+ ]
3037
+ }, b = [
3038
+ "fish",
3039
+ "bash",
3040
+ "zsh",
3041
+ "sh",
3042
+ "csh",
3043
+ "ksh",
3044
+ "tcsh",
3045
+ "dash",
3046
+ "scsh"
3047
+ ], E = e.SHEBANG({
3048
+ binary: `(${b.join("|")})`,
3049
+ relevance: 10
3050
+ }), p = {
3051
+ className: "function",
3052
+ begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
3053
+ returnBegin: !0,
3054
+ contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
3055
+ relevance: 0
3056
+ }, v = [
3057
+ "if",
3058
+ "then",
3059
+ "else",
3060
+ "elif",
3061
+ "fi",
3062
+ "for",
3063
+ "while",
3064
+ "in",
3065
+ "do",
3066
+ "done",
3067
+ "case",
3068
+ "esac",
3069
+ "function"
3070
+ ], m = [
3071
+ "true",
3072
+ "false"
3073
+ ], d = { match: /(\/[a-z._-]+)+/ }, T = [
3074
+ "break",
3075
+ "cd",
3076
+ "continue",
3077
+ "eval",
3078
+ "exec",
3079
+ "exit",
3080
+ "export",
3081
+ "getopts",
3082
+ "hash",
3083
+ "pwd",
3084
+ "readonly",
3085
+ "return",
3086
+ "shift",
3087
+ "test",
3088
+ "times",
3089
+ "trap",
3090
+ "umask",
3091
+ "unset"
3092
+ ], S = [
3093
+ "alias",
3094
+ "bind",
3095
+ "builtin",
3096
+ "caller",
3097
+ "command",
3098
+ "declare",
3099
+ "echo",
3100
+ "enable",
3101
+ "help",
3102
+ "let",
3103
+ "local",
3104
+ "logout",
3105
+ "mapfile",
3106
+ "printf",
3107
+ "read",
3108
+ "readarray",
3109
+ "source",
3110
+ "type",
3111
+ "typeset",
3112
+ "ulimit",
3113
+ "unalias"
3114
+ ], x = [
3115
+ "autoload",
3116
+ "bg",
3117
+ "bindkey",
3118
+ "bye",
3119
+ "cap",
3120
+ "chdir",
3121
+ "clone",
3122
+ "comparguments",
3123
+ "compcall",
3124
+ "compctl",
3125
+ "compdescribe",
3126
+ "compfiles",
3127
+ "compgroups",
3128
+ "compquote",
3129
+ "comptags",
3130
+ "comptry",
3131
+ "compvalues",
3132
+ "dirs",
3133
+ "disable",
3134
+ "disown",
3135
+ "echotc",
3136
+ "echoti",
3137
+ "emulate",
3138
+ "fc",
3139
+ "fg",
3140
+ "float",
3141
+ "functions",
3142
+ "getcap",
3143
+ "getln",
3144
+ "history",
3145
+ "integer",
3146
+ "jobs",
3147
+ "kill",
3148
+ "limit",
3149
+ "log",
3150
+ "noglob",
3151
+ "popd",
3152
+ "print",
3153
+ "pushd",
3154
+ "pushln",
3155
+ "rehash",
3156
+ "sched",
3157
+ "setcap",
3158
+ "setopt",
3159
+ "stat",
3160
+ "suspend",
3161
+ "ttyctl",
3162
+ "unfunction",
3163
+ "unhash",
3164
+ "unlimit",
3165
+ "unsetopt",
3166
+ "vared",
3167
+ "wait",
3168
+ "whence",
3169
+ "where",
3170
+ "which",
3171
+ "zcompile",
3172
+ "zformat",
3173
+ "zftp",
3174
+ "zle",
3175
+ "zmodload",
3176
+ "zparseopts",
3177
+ "zprof",
3178
+ "zpty",
3179
+ "zregexparse",
3180
+ "zsocket",
3181
+ "zstyle",
3182
+ "ztcp"
3183
+ ], y = [
3184
+ "chcon",
3185
+ "chgrp",
3186
+ "chown",
3187
+ "chmod",
3188
+ "cp",
3189
+ "dd",
3190
+ "df",
3191
+ "dir",
3192
+ "dircolors",
3193
+ "ln",
3194
+ "ls",
3195
+ "mkdir",
3196
+ "mkfifo",
3197
+ "mknod",
3198
+ "mktemp",
3199
+ "mv",
3200
+ "realpath",
3201
+ "rm",
3202
+ "rmdir",
3203
+ "shred",
3204
+ "sync",
3205
+ "touch",
3206
+ "truncate",
3207
+ "vdir",
3208
+ "b2sum",
3209
+ "base32",
3210
+ "base64",
3211
+ "cat",
3212
+ "cksum",
3213
+ "comm",
3214
+ "csplit",
3215
+ "cut",
3216
+ "expand",
3217
+ "fmt",
3218
+ "fold",
3219
+ "head",
3220
+ "join",
3221
+ "md5sum",
3222
+ "nl",
3223
+ "numfmt",
3224
+ "od",
3225
+ "paste",
3226
+ "ptx",
3227
+ "pr",
3228
+ "sha1sum",
3229
+ "sha224sum",
3230
+ "sha256sum",
3231
+ "sha384sum",
3232
+ "sha512sum",
3233
+ "shuf",
3234
+ "sort",
3235
+ "split",
3236
+ "sum",
3237
+ "tac",
3238
+ "tail",
3239
+ "tr",
3240
+ "tsort",
3241
+ "unexpand",
3242
+ "uniq",
3243
+ "wc",
3244
+ "arch",
3245
+ "basename",
3246
+ "chroot",
3247
+ "date",
3248
+ "dirname",
3249
+ "du",
3250
+ "echo",
3251
+ "env",
3252
+ "expr",
3253
+ "factor",
3254
+ // "false", // keyword literal already
3255
+ "groups",
3256
+ "hostid",
3257
+ "id",
3258
+ "link",
3259
+ "logname",
3260
+ "nice",
3261
+ "nohup",
3262
+ "nproc",
3263
+ "pathchk",
3264
+ "pinky",
3265
+ "printenv",
3266
+ "printf",
3267
+ "pwd",
3268
+ "readlink",
3269
+ "runcon",
3270
+ "seq",
3271
+ "sleep",
3272
+ "stat",
3273
+ "stdbuf",
3274
+ "stty",
3275
+ "tee",
3276
+ "test",
3277
+ "timeout",
3278
+ // "true", // keyword literal already
3279
+ "tty",
3280
+ "uname",
3281
+ "unlink",
3282
+ "uptime",
3283
+ "users",
3284
+ "who",
3285
+ "whoami",
3286
+ "yes"
3287
+ ];
3288
+ return {
3289
+ name: "Bash",
3290
+ aliases: ["sh"],
3291
+ keywords: {
3292
+ $pattern: /\b[a-z][a-z0-9._-]+\b/,
3293
+ keyword: v,
3294
+ literal: m,
3295
+ built_in: [
3296
+ ...T,
3297
+ ...S,
3298
+ // Shell modifiers
3299
+ "set",
3300
+ "shopt",
3301
+ ...x,
3302
+ ...y
3303
+ ]
3304
+ },
3305
+ contains: [
3306
+ E,
3307
+ // to catch known shells and boost relevancy
3308
+ e.SHEBANG(),
3309
+ // to catch unknown shells but still highlight the shebang
3310
+ p,
3311
+ o,
3312
+ e.HASH_COMMENT_MODE,
3313
+ l,
3314
+ d,
3315
+ i,
3316
+ r,
3317
+ a,
3318
+ t
3319
+ ]
3320
+ };
3321
+ }
3322
+ function Qt(e) {
3323
+ const n = e.regex, t = e.COMMENT("--", "$"), s = {
3324
+ className: "string",
3325
+ variants: [
3326
+ {
3327
+ begin: /'/,
3328
+ end: /'/,
3329
+ contains: [{ begin: /''/ }]
3330
+ }
3331
+ ]
3332
+ }, c = {
3333
+ begin: /"/,
3334
+ end: /"/,
3335
+ contains: [{ begin: /""/ }]
3336
+ }, l = [
3337
+ "true",
3338
+ "false",
3339
+ // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
3340
+ // "null",
3341
+ "unknown"
3342
+ ], i = [
3343
+ "double precision",
3344
+ "large object",
3345
+ "with timezone",
3346
+ "without timezone"
3347
+ ], r = [
3348
+ "bigint",
3349
+ "binary",
3350
+ "blob",
3351
+ "boolean",
3352
+ "char",
3353
+ "character",
3354
+ "clob",
3355
+ "date",
3356
+ "dec",
3357
+ "decfloat",
3358
+ "decimal",
3359
+ "float",
3360
+ "int",
3361
+ "integer",
3362
+ "interval",
3363
+ "nchar",
3364
+ "nclob",
3365
+ "national",
3366
+ "numeric",
3367
+ "real",
3368
+ "row",
3369
+ "smallint",
3370
+ "time",
3371
+ "timestamp",
3372
+ "varchar",
3373
+ "varying",
3374
+ // modifier (character varying)
3375
+ "varbinary"
3376
+ ], a = [
3377
+ "add",
3378
+ "asc",
3379
+ "collation",
3380
+ "desc",
3381
+ "final",
3382
+ "first",
3383
+ "last",
3384
+ "view"
3385
+ ], o = [
3386
+ "abs",
3387
+ "acos",
3388
+ "all",
3389
+ "allocate",
3390
+ "alter",
3391
+ "and",
3392
+ "any",
3393
+ "are",
3394
+ "array",
3395
+ "array_agg",
3396
+ "array_max_cardinality",
3397
+ "as",
3398
+ "asensitive",
3399
+ "asin",
3400
+ "asymmetric",
3401
+ "at",
3402
+ "atan",
3403
+ "atomic",
3404
+ "authorization",
3405
+ "avg",
3406
+ "begin",
3407
+ "begin_frame",
3408
+ "begin_partition",
3409
+ "between",
3410
+ "bigint",
3411
+ "binary",
3412
+ "blob",
3413
+ "boolean",
3414
+ "both",
3415
+ "by",
3416
+ "call",
3417
+ "called",
3418
+ "cardinality",
3419
+ "cascaded",
3420
+ "case",
3421
+ "cast",
3422
+ "ceil",
3423
+ "ceiling",
3424
+ "char",
3425
+ "char_length",
3426
+ "character",
3427
+ "character_length",
3428
+ "check",
3429
+ "classifier",
3430
+ "clob",
3431
+ "close",
3432
+ "coalesce",
3433
+ "collate",
3434
+ "collect",
3435
+ "column",
3436
+ "commit",
3437
+ "condition",
3438
+ "connect",
3439
+ "constraint",
3440
+ "contains",
3441
+ "convert",
3442
+ "copy",
3443
+ "corr",
3444
+ "corresponding",
3445
+ "cos",
3446
+ "cosh",
3447
+ "count",
3448
+ "covar_pop",
3449
+ "covar_samp",
3450
+ "create",
3451
+ "cross",
3452
+ "cube",
3453
+ "cume_dist",
3454
+ "current",
3455
+ "current_catalog",
3456
+ "current_date",
3457
+ "current_default_transform_group",
3458
+ "current_path",
3459
+ "current_role",
3460
+ "current_row",
3461
+ "current_schema",
3462
+ "current_time",
3463
+ "current_timestamp",
3464
+ "current_path",
3465
+ "current_role",
3466
+ "current_transform_group_for_type",
3467
+ "current_user",
3468
+ "cursor",
3469
+ "cycle",
3470
+ "date",
3471
+ "day",
3472
+ "deallocate",
3473
+ "dec",
3474
+ "decimal",
3475
+ "decfloat",
3476
+ "declare",
3477
+ "default",
3478
+ "define",
3479
+ "delete",
3480
+ "dense_rank",
3481
+ "deref",
3482
+ "describe",
3483
+ "deterministic",
3484
+ "disconnect",
3485
+ "distinct",
3486
+ "double",
3487
+ "drop",
3488
+ "dynamic",
3489
+ "each",
3490
+ "element",
3491
+ "else",
3492
+ "empty",
3493
+ "end",
3494
+ "end_frame",
3495
+ "end_partition",
3496
+ "end-exec",
3497
+ "equals",
3498
+ "escape",
3499
+ "every",
3500
+ "except",
3501
+ "exec",
3502
+ "execute",
3503
+ "exists",
3504
+ "exp",
3505
+ "external",
3506
+ "extract",
3507
+ "false",
3508
+ "fetch",
3509
+ "filter",
3510
+ "first_value",
3511
+ "float",
3512
+ "floor",
3513
+ "for",
3514
+ "foreign",
3515
+ "frame_row",
3516
+ "free",
3517
+ "from",
3518
+ "full",
3519
+ "function",
3520
+ "fusion",
3521
+ "get",
3522
+ "global",
3523
+ "grant",
3524
+ "group",
3525
+ "grouping",
3526
+ "groups",
3527
+ "having",
3528
+ "hold",
3529
+ "hour",
3530
+ "identity",
3531
+ "in",
3532
+ "indicator",
3533
+ "initial",
3534
+ "inner",
3535
+ "inout",
3536
+ "insensitive",
3537
+ "insert",
3538
+ "int",
3539
+ "integer",
3540
+ "intersect",
3541
+ "intersection",
3542
+ "interval",
3543
+ "into",
3544
+ "is",
3545
+ "join",
3546
+ "json_array",
3547
+ "json_arrayagg",
3548
+ "json_exists",
3549
+ "json_object",
3550
+ "json_objectagg",
3551
+ "json_query",
3552
+ "json_table",
3553
+ "json_table_primitive",
3554
+ "json_value",
3555
+ "lag",
3556
+ "language",
3557
+ "large",
3558
+ "last_value",
3559
+ "lateral",
3560
+ "lead",
3561
+ "leading",
3562
+ "left",
3563
+ "like",
3564
+ "like_regex",
3565
+ "listagg",
3566
+ "ln",
3567
+ "local",
3568
+ "localtime",
3569
+ "localtimestamp",
3570
+ "log",
3571
+ "log10",
3572
+ "lower",
3573
+ "match",
3574
+ "match_number",
3575
+ "match_recognize",
3576
+ "matches",
3577
+ "max",
3578
+ "member",
3579
+ "merge",
3580
+ "method",
3581
+ "min",
3582
+ "minute",
3583
+ "mod",
3584
+ "modifies",
3585
+ "module",
3586
+ "month",
3587
+ "multiset",
3588
+ "national",
3589
+ "natural",
3590
+ "nchar",
3591
+ "nclob",
3592
+ "new",
3593
+ "no",
3594
+ "none",
3595
+ "normalize",
3596
+ "not",
3597
+ "nth_value",
3598
+ "ntile",
3599
+ "null",
3600
+ "nullif",
3601
+ "numeric",
3602
+ "octet_length",
3603
+ "occurrences_regex",
3604
+ "of",
3605
+ "offset",
3606
+ "old",
3607
+ "omit",
3608
+ "on",
3609
+ "one",
3610
+ "only",
3611
+ "open",
3612
+ "or",
3613
+ "order",
3614
+ "out",
3615
+ "outer",
3616
+ "over",
3617
+ "overlaps",
3618
+ "overlay",
3619
+ "parameter",
3620
+ "partition",
3621
+ "pattern",
3622
+ "per",
3623
+ "percent",
3624
+ "percent_rank",
3625
+ "percentile_cont",
3626
+ "percentile_disc",
3627
+ "period",
3628
+ "portion",
3629
+ "position",
3630
+ "position_regex",
3631
+ "power",
3632
+ "precedes",
3633
+ "precision",
3634
+ "prepare",
3635
+ "primary",
3636
+ "procedure",
3637
+ "ptf",
3638
+ "range",
3639
+ "rank",
3640
+ "reads",
3641
+ "real",
3642
+ "recursive",
3643
+ "ref",
3644
+ "references",
3645
+ "referencing",
3646
+ "regr_avgx",
3647
+ "regr_avgy",
3648
+ "regr_count",
3649
+ "regr_intercept",
3650
+ "regr_r2",
3651
+ "regr_slope",
3652
+ "regr_sxx",
3653
+ "regr_sxy",
3654
+ "regr_syy",
3655
+ "release",
3656
+ "result",
3657
+ "return",
3658
+ "returns",
3659
+ "revoke",
3660
+ "right",
3661
+ "rollback",
3662
+ "rollup",
3663
+ "row",
3664
+ "row_number",
3665
+ "rows",
3666
+ "running",
3667
+ "savepoint",
3668
+ "scope",
3669
+ "scroll",
3670
+ "search",
3671
+ "second",
3672
+ "seek",
3673
+ "select",
3674
+ "sensitive",
3675
+ "session_user",
3676
+ "set",
3677
+ "show",
3678
+ "similar",
3679
+ "sin",
3680
+ "sinh",
3681
+ "skip",
3682
+ "smallint",
3683
+ "some",
3684
+ "specific",
3685
+ "specifictype",
3686
+ "sql",
3687
+ "sqlexception",
3688
+ "sqlstate",
3689
+ "sqlwarning",
3690
+ "sqrt",
3691
+ "start",
3692
+ "static",
3693
+ "stddev_pop",
3694
+ "stddev_samp",
3695
+ "submultiset",
3696
+ "subset",
3697
+ "substring",
3698
+ "substring_regex",
3699
+ "succeeds",
3700
+ "sum",
3701
+ "symmetric",
3702
+ "system",
3703
+ "system_time",
3704
+ "system_user",
3705
+ "table",
3706
+ "tablesample",
3707
+ "tan",
3708
+ "tanh",
3709
+ "then",
3710
+ "time",
3711
+ "timestamp",
3712
+ "timezone_hour",
3713
+ "timezone_minute",
3714
+ "to",
3715
+ "trailing",
3716
+ "translate",
3717
+ "translate_regex",
3718
+ "translation",
3719
+ "treat",
3720
+ "trigger",
3721
+ "trim",
3722
+ "trim_array",
3723
+ "true",
3724
+ "truncate",
3725
+ "uescape",
3726
+ "union",
3727
+ "unique",
3728
+ "unknown",
3729
+ "unnest",
3730
+ "update",
3731
+ "upper",
3732
+ "user",
3733
+ "using",
3734
+ "value",
3735
+ "values",
3736
+ "value_of",
3737
+ "var_pop",
3738
+ "var_samp",
3739
+ "varbinary",
3740
+ "varchar",
3741
+ "varying",
3742
+ "versioning",
3743
+ "when",
3744
+ "whenever",
3745
+ "where",
3746
+ "width_bucket",
3747
+ "window",
3748
+ "with",
3749
+ "within",
3750
+ "without",
3751
+ "year"
3752
+ ], b = [
3753
+ "abs",
3754
+ "acos",
3755
+ "array_agg",
3756
+ "asin",
3757
+ "atan",
3758
+ "avg",
3759
+ "cast",
3760
+ "ceil",
3761
+ "ceiling",
3762
+ "coalesce",
3763
+ "corr",
3764
+ "cos",
3765
+ "cosh",
3766
+ "count",
3767
+ "covar_pop",
3768
+ "covar_samp",
3769
+ "cume_dist",
3770
+ "dense_rank",
3771
+ "deref",
3772
+ "element",
3773
+ "exp",
3774
+ "extract",
3775
+ "first_value",
3776
+ "floor",
3777
+ "json_array",
3778
+ "json_arrayagg",
3779
+ "json_exists",
3780
+ "json_object",
3781
+ "json_objectagg",
3782
+ "json_query",
3783
+ "json_table",
3784
+ "json_table_primitive",
3785
+ "json_value",
3786
+ "lag",
3787
+ "last_value",
3788
+ "lead",
3789
+ "listagg",
3790
+ "ln",
3791
+ "log",
3792
+ "log10",
3793
+ "lower",
3794
+ "max",
3795
+ "min",
3796
+ "mod",
3797
+ "nth_value",
3798
+ "ntile",
3799
+ "nullif",
3800
+ "percent_rank",
3801
+ "percentile_cont",
3802
+ "percentile_disc",
3803
+ "position",
3804
+ "position_regex",
3805
+ "power",
3806
+ "rank",
3807
+ "regr_avgx",
3808
+ "regr_avgy",
3809
+ "regr_count",
3810
+ "regr_intercept",
3811
+ "regr_r2",
3812
+ "regr_slope",
3813
+ "regr_sxx",
3814
+ "regr_sxy",
3815
+ "regr_syy",
3816
+ "row_number",
3817
+ "sin",
3818
+ "sinh",
3819
+ "sqrt",
3820
+ "stddev_pop",
3821
+ "stddev_samp",
3822
+ "substring",
3823
+ "substring_regex",
3824
+ "sum",
3825
+ "tan",
3826
+ "tanh",
3827
+ "translate",
3828
+ "translate_regex",
3829
+ "treat",
3830
+ "trim",
3831
+ "trim_array",
3832
+ "unnest",
3833
+ "upper",
3834
+ "value_of",
3835
+ "var_pop",
3836
+ "var_samp",
3837
+ "width_bucket"
3838
+ ], E = [
3839
+ "current_catalog",
3840
+ "current_date",
3841
+ "current_default_transform_group",
3842
+ "current_path",
3843
+ "current_role",
3844
+ "current_schema",
3845
+ "current_transform_group_for_type",
3846
+ "current_user",
3847
+ "session_user",
3848
+ "system_time",
3849
+ "system_user",
3850
+ "current_time",
3851
+ "localtime",
3852
+ "current_timestamp",
3853
+ "localtimestamp"
3854
+ ], p = [
3855
+ "create table",
3856
+ "insert into",
3857
+ "primary key",
3858
+ "foreign key",
3859
+ "not null",
3860
+ "alter table",
3861
+ "add constraint",
3862
+ "grouping sets",
3863
+ "on overflow",
3864
+ "character set",
3865
+ "respect nulls",
3866
+ "ignore nulls",
3867
+ "nulls first",
3868
+ "nulls last",
3869
+ "depth first",
3870
+ "breadth first"
3871
+ ], v = b, m = [
3872
+ ...o,
3873
+ ...a
3874
+ ].filter((y) => !b.includes(y)), d = {
3875
+ className: "variable",
3876
+ begin: /@[a-z0-9]+/
3877
+ }, T = {
3878
+ className: "operator",
3879
+ begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
3880
+ relevance: 0
3881
+ }, S = {
3882
+ begin: n.concat(/\b/, n.either(...v), /\s*\(/),
3883
+ relevance: 0,
3884
+ keywords: { built_in: v }
3885
+ };
3886
+ function x(y, {
3887
+ exceptions: R,
3888
+ when: L
3889
+ } = {}) {
3890
+ const D = L;
3891
+ return R = R || [], y.map((B) => B.match(/\|\d+$/) || R.includes(B) ? B : D(B) ? `${B}|0` : B);
3892
+ }
3893
+ return {
3894
+ name: "SQL",
3895
+ case_insensitive: !0,
3896
+ // does not include {} or HTML tags `</`
3897
+ illegal: /[{}]|<\//,
3898
+ keywords: {
3899
+ $pattern: /\b[\w\.]+/,
3900
+ keyword: x(m, { when: (y) => y.length < 3 }),
3901
+ literal: l,
3902
+ type: r,
3903
+ built_in: E
3904
+ },
3905
+ contains: [
3906
+ {
3907
+ begin: n.either(...p),
3908
+ relevance: 0,
3909
+ keywords: {
3910
+ $pattern: /[\w\.]+/,
3911
+ keyword: m.concat(p),
3912
+ literal: l,
3913
+ type: r
3914
+ }
3915
+ },
3916
+ {
3917
+ className: "type",
3918
+ begin: n.either(...i)
3919
+ },
3920
+ S,
3921
+ d,
3922
+ s,
3923
+ c,
3924
+ e.C_NUMBER_MODE,
3925
+ e.C_BLOCK_COMMENT_MODE,
3926
+ t,
3927
+ T
3928
+ ]
3929
+ };
3930
+ }
3931
+ Z.registerLanguage("xml", Bt);
3932
+ Z.registerLanguage("javascript", zt);
3933
+ Z.registerLanguage("json", Ft);
3934
+ Z.registerLanguage("yaml", Gt);
3935
+ Z.registerLanguage("plaintext", Kt);
3936
+ Z.registerLanguage("python", Wt);
3937
+ Z.registerLanguage("java", Yt);
3938
+ Z.registerLanguage("bash", Zt);
3939
+ Z.registerLanguage("sql", Qt);
3940
+ var g = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(g || {});
3941
+ const X = "<code-diff-modified>", V = "</code-diff-modified>", qt = X.replace("<", "&lt;").replace(">", "&gt;"), Xt = V.replace("<", "&lt;").replace(">", "&gt;"), fe = (e) => e === void 0 ? g.EQUAL : e.added ? g.ADD : e.removed ? g.DELETE : g.EQUAL, xe = (e, n, t = "word") => typeof e > "u" ? n : typeof n > "u" ? e : (t === "char" ? Bn : Un)(e, n).filter((c) => fe(c) !== g.DELETE).map(
3942
+ (c) => fe(c) === g.ADD ? `${X}${c.value}${V}` : c.value
3943
+ ).join(""), Y = (e, n) => {
3944
+ if (!n.match(new RegExp(`(${X}|${V})`, "g")))
3945
+ return Z.highlight(n, { language: e }).value;
3946
+ let s = n;
3947
+ const c = n.replace(new RegExp(`(${X}|${V})`, "g"), ""), l = document.createElement("div");
3948
+ l.innerHTML = Z.highlight(c, { language: e }).value;
3949
+ let i = !1;
3950
+ const r = (a) => {
3951
+ a.childNodes.forEach((o) => {
3952
+ if (o.nodeType === Node.ELEMENT_NODE && r(o), o.nodeType === Node.TEXT_NODE) {
3953
+ if (!o.textContent)
3954
+ return;
3955
+ let b = o.textContent, E = "";
3956
+ for (i && (E = E + X); b.length; ) {
3957
+ if (s.startsWith(X)) {
3958
+ s = s.slice(X.length), E = E + X, i = !0;
3959
+ continue;
3960
+ }
3961
+ if (s.startsWith(V)) {
3962
+ s = s.slice(V.length), E = E + V, i = !1;
3963
+ continue;
3964
+ }
3965
+ const p = s.match(new RegExp(`(${X}|${V})`)), v = p && p.index ? p.index : s.length, m = Math.min(v, b.length);
3966
+ E = E + s.substring(0, m), s = s.slice(m), b = b.slice(m);
3967
+ }
3968
+ i && (E = E + V), o.textContent = E;
3969
+ }
3970
+ });
3971
+ };
3972
+ return r(l), l.innerHTML.replace(new RegExp(qt, "g"), '<span class="x">').replace(new RegExp(Xt, "g"), "</span>");
3973
+ };
3974
+ function Vt(e, n, t = "plaintext", s = "word", c = 10) {
3975
+ var v;
3976
+ const l = () => ({ type: g.EMPTY }), i = (m, d, T) => ({ type: m, num: d, code: T }), r = fn(e, n);
3977
+ let a = 0, o = 0, b = !1;
3978
+ const E = [];
3979
+ for (let m = 0; m < r.length; m++) {
3980
+ if (b) {
3981
+ b = !1;
3982
+ continue;
3983
+ }
3984
+ const [d, T] = [r[m], r[m + 1]], [S, x] = [fe(d), fe(T)], y = d.value.replace(/\n$/, "").split(`
3985
+ `);
3986
+ if (T === void 0) {
3987
+ for (const L of y) {
3988
+ let D = l(), B = l();
3989
+ const K = Y(t, L);
3990
+ S === g.EQUAL && (a++, o++, D = i(g.EQUAL, a, K), B = i(g.EQUAL, o, K)), S === g.DELETE && (a++, D = i(g.DELETE, a, K), B = l()), S === g.ADD && (o++, D = l(), B = i(g.ADD, o, K)), E.push({ left: D, right: B });
3991
+ }
3992
+ break;
3993
+ }
3994
+ if (S === g.EQUAL)
3995
+ for (const L of y) {
3996
+ a++, o++;
3997
+ const D = Y(t, L);
3998
+ E.push({
3999
+ left: i(g.EQUAL, a, D),
4000
+ right: i(g.EQUAL, o, D)
4001
+ });
4002
+ }
4003
+ const R = T.value.replace(/\n$/, "").split(`
4004
+ `);
4005
+ if (S === g.DELETE) {
4006
+ if (x === g.EQUAL)
4007
+ for (const L of y)
4008
+ a++, E.push({
4009
+ left: i(g.DELETE, a, Y(t, L)),
4010
+ right: l()
4011
+ });
4012
+ if (x === g.ADD) {
4013
+ b = !0;
4014
+ const L = Math.max(d.count, T.count);
4015
+ for (let D = 0; D < L; D++) {
4016
+ D < d.count && a++, D < T.count && o++;
4017
+ const [B, K] = [y[D], R[D]], W = y.length === R.length ? xe(K, B, s) : B, re = y.length === R.length ? xe(B, K, s) : K, ae = D < d.count ? i(g.DELETE, a, Y(t, W)) : l(), de = D < T.count ? i(g.ADD, o, Y(t, re)) : l();
4018
+ E.push({ left: ae, right: de });
4019
+ }
4020
+ }
4021
+ }
4022
+ if (S === g.ADD)
4023
+ for (const L of y)
4024
+ o++, E.push({
4025
+ left: l(),
4026
+ right: i(g.ADD, o, Y(t, L))
4027
+ });
4028
+ }
4029
+ if (e === n) {
4030
+ for (let m = 0; m < E.length; m++)
4031
+ E[m].fold = !1;
4032
+ return E;
4033
+ }
4034
+ for (let m = 0; m < E.length; m++) {
4035
+ const d = E[m];
4036
+ if (d.left.type === g.DELETE || d.right.type === g.ADD) {
4037
+ const [T, S] = [Math.max(m - c, 0), Math.min(m + c + 1, E.length)];
4038
+ for (let x = T; x < S; x++)
4039
+ E[x].fold = !1;
4040
+ }
4041
+ d.fold === void 0 && (d.fold = !0);
4042
+ }
4043
+ const p = [];
4044
+ for (let m = 0; m < E.length; m++) {
4045
+ const d = E[m];
4046
+ if (d.fold === !1) {
4047
+ p.push(d);
4048
+ continue;
4049
+ }
4050
+ d.fold === !0 && ((v = p[p.length - 1]) == null ? void 0 : v.fold) !== !0 && p.push(d);
4051
+ }
4052
+ return p;
4053
+ }
4054
+ function jt(e, n, t = "plaintext", s = "word", c = 2) {
4055
+ var E;
4056
+ const l = fn(e, n);
4057
+ let i = 0, r = 0, a = !1;
4058
+ const o = [];
4059
+ for (let p = 0; p < l.length; p++) {
4060
+ if (a) {
4061
+ a = !1;
4062
+ continue;
4063
+ }
4064
+ const [v, m] = [l[p], l[p + 1]], [d, T] = [fe(v), fe(m)], S = v.value.replace(/\n$/, "").split(`
4065
+ `);
4066
+ if (m === void 0) {
4067
+ for (const y of S) {
4068
+ d === g.EQUAL && (i++, r++), d === g.DELETE && i++, d === g.ADD && r++;
4069
+ const R = Y(t, y);
4070
+ o.push({
4071
+ type: d,
4072
+ code: R,
4073
+ addNum: d === g.DELETE ? void 0 : r,
4074
+ delNum: d === g.ADD ? void 0 : i
4075
+ });
4076
+ }
4077
+ break;
4078
+ }
4079
+ if (d === g.EQUAL)
4080
+ for (const y of S) {
4081
+ i++, r++;
4082
+ const R = Y(t, y);
4083
+ o.push({ type: g.EQUAL, code: R, delNum: i, addNum: r });
4084
+ }
4085
+ const x = m.value.replace(/\n$/, "").split(`
4086
+ `);
4087
+ if (d === g.DELETE)
4088
+ if (T === g.ADD && S.length === x.length) {
4089
+ for (let y = 0; y < S.length; y++) {
4090
+ const R = S[y], L = x[y];
4091
+ i++;
4092
+ const D = Y(t, xe(L, R, s));
4093
+ o.push({ type: g.DELETE, code: D, delNum: i });
4094
+ }
4095
+ for (let y = 0; y < x.length; y++) {
4096
+ const R = S[y], L = x[y];
4097
+ r++;
4098
+ const D = Y(t, xe(R, L, s));
4099
+ o.push({ type: g.ADD, code: D, addNum: r });
4100
+ }
4101
+ a = !0;
4102
+ } else
4103
+ for (const y of S) {
4104
+ i++;
4105
+ const R = Y(t, y);
4106
+ o.push({ type: g.DELETE, code: R, delNum: i });
4107
+ }
4108
+ if (d === g.ADD)
4109
+ for (const y of S) {
4110
+ r++;
4111
+ const R = Y(t, y);
4112
+ o.push({ type: g.ADD, code: R, addNum: r });
4113
+ }
4114
+ }
4115
+ for (let p = 0; p < o.length; p++) {
4116
+ const v = o[p];
4117
+ if (v.type === g.DELETE || v.type === g.ADD) {
4118
+ const [m, d] = [Math.max(p - c, 0), Math.min(p + c + 1, o.length)];
4119
+ for (let T = m; T < d; T++)
4120
+ o[T].fold = !1;
4121
+ }
4122
+ v.fold === void 0 && (v.fold = !0);
4123
+ }
4124
+ if (e === n) {
4125
+ for (let p = 0; p < o.length; p++)
4126
+ o[p].fold = !1;
4127
+ return o;
4128
+ }
4129
+ const b = [];
4130
+ for (let p = 0; p < o.length; p++) {
4131
+ const v = o[p];
4132
+ if (v.fold === !1) {
4133
+ b.push(v);
4134
+ continue;
4135
+ }
4136
+ v.fold === !0 && (p === 0 || ((E = b[b.length - 1]) == null ? void 0 : E.fold) !== !0) && b.push(v);
4137
+ }
4138
+ return b;
4139
+ }
4140
+ const Jt = { key: 0 }, es = /* @__PURE__ */ k("td", { class: "blob-num blob-num-empty empty-cell" }, " > ", -1), ns = /* @__PURE__ */ k("td", { class: "blob-num blob-num-empty empty-cell" }, " > ", -1), ts = /* @__PURE__ */ k("td", {
4141
+ class: "blob-code blob-code-empty empty-cell",
4142
+ align: "left"
4143
+ }, " ⋯ ", -1), ss = [
4144
+ es,
4145
+ ns,
4146
+ ts
4147
+ ], is = { key: 1 }, rs = ["data-code-marker", "innerHTML"], as = /* @__PURE__ */ _e({
4148
+ __name: "UnifiedLine",
4149
+ props: {
4150
+ line: null
4151
+ },
4152
+ setup(e) {
4153
+ const n = (t) => t === g.DELETE ? "-" : t === g.ADD ? "+" : "";
4154
+ return (t, s) => e.line.fold ? (P(), G("tr", Jt, ss)) : (P(), G("tr", is, [
4155
+ k("td", {
4156
+ class: ge(["blob-num", {
4157
+ "blob-num-deletion": e.line.type === $(g).DELETE,
4158
+ "blob-num-addition": e.line.type === $(g).ADD,
4159
+ "blob-num-context": e.line.type === $(g).EQUAL
4160
+ }])
4161
+ }, $e(e.line.delNum), 3),
4162
+ k("td", {
4163
+ class: ge(["blob-num", {
4164
+ "blob-num-deletion": e.line.type === $(g).DELETE,
4165
+ "blob-num-addition": e.line.type === $(g).ADD,
4166
+ "blob-num-context": e.line.type === $(g).EQUAL
4167
+ }])
4168
+ }, $e(e.line.addNum), 3),
4169
+ k("td", {
4170
+ class: ge(["blob-code", {
4171
+ "blob-code-deletion": e.line.type === $(g).DELETE,
4172
+ "blob-code-addition": e.line.type === $(g).ADD,
4173
+ "blob-code-context": e.line.type === $(g).EQUAL
4174
+ }])
4175
+ }, [
4176
+ k("span", {
4177
+ class: "blob-code-inner blob-code-marker",
4178
+ "data-code-marker": n(e.line.type),
4179
+ innerHTML: e.line.code
4180
+ }, null, 8, rs)
4181
+ ], 2)
4182
+ ]));
4183
+ }
4184
+ }), os = { class: "file" }, cs = { class: "diff-table" }, ls = /* @__PURE__ */ _e({
4185
+ __name: "UnifiedViewer",
4186
+ props: {
4187
+ diffChange: null
4188
+ },
4189
+ setup(e) {
4190
+ return (n, t) => (P(), G("div", os, [
4191
+ k("table", cs, [
4192
+ k("tbody", null, [
4193
+ (P(!0), G(ue, null, He(e.diffChange, (s, c) => (P(), Re(as, {
4194
+ key: c,
4195
+ line: s
4196
+ }, null, 8, ["line"]))), 128))
4197
+ ])
4198
+ ])
4199
+ ]));
4200
+ }
4201
+ }), us = { key: 0 }, fs = /* @__PURE__ */ k("td", {
4202
+ class: "blob-num blob-num-empty empty-cell",
4203
+ colspan: "1"
4204
+ }, " > ", -1), ds = /* @__PURE__ */ k("td", {
4205
+ class: "blob-code blob-code-empty empty-cell",
4206
+ colspan: "3",
4207
+ align: "left"
4208
+ }, " ⋯ ", -1), gs = [
4209
+ fs,
4210
+ ds
4211
+ ], ps = { key: 1 }, bs = /* @__PURE__ */ k("td", { class: "blob-num blob-num-empty empty-cell" }, null, -1), hs = /* @__PURE__ */ k("td", { class: "blob-code blob-code-empty empty-cell" }, null, -1), Es = ["data-code-marker", "innerHTML"], _s = /* @__PURE__ */ _e({
4212
+ __name: "SplitLine",
4213
+ props: {
4214
+ splitLine: null
4215
+ },
4216
+ setup(e) {
4217
+ const n = (t) => t === g.DELETE ? "-" : t === g.ADD ? "+" : "";
4218
+ return (t, s) => e.splitLine.fold ? (P(), G("tr", us, gs)) : (P(), G("tr", ps, [
4219
+ (P(!0), G(ue, null, He([e.splitLine.left, e.splitLine.right], (c) => (P(), G(ue, null, [
4220
+ c.type === $(g).EMPTY ? (P(), G(ue, { key: 0 }, [
4221
+ bs,
4222
+ hs
4223
+ ], 64)) : (P(), G(ue, { key: 1 }, [
4224
+ k("td", {
4225
+ class: ge(["blob-num", {
4226
+ "blob-num-deletion": c.type === $(g).DELETE,
4227
+ "blob-num-addition": c.type === $(g).ADD,
4228
+ "blob-num-context": c.type === $(g).EQUAL
4229
+ }])
4230
+ }, $e(c.num), 3),
4231
+ k("td", {
4232
+ class: ge(["blob-code", {
4233
+ "blob-code-deletion": c.type === $(g).DELETE,
4234
+ "blob-code-addition": c.type === $(g).ADD,
4235
+ "blob-code-context": c.type === $(g).EQUAL
4236
+ }])
4237
+ }, [
4238
+ k("span", {
4239
+ class: "blob-code-inner blob-code-marker",
4240
+ "data-code-marker": n(c.type),
4241
+ innerHTML: c.code
4242
+ }, null, 8, Es)
4243
+ ], 2)
4244
+ ], 64))
4245
+ ], 64))), 256))
4246
+ ]));
4247
+ }
4248
+ }), ms = { class: "file" }, ys = { class: "file-diff-split diff-table" }, Ns = /* @__PURE__ */ k("colgroup", null, [
4249
+ /* @__PURE__ */ k("col", { width: "44" }),
4250
+ /* @__PURE__ */ k("col"),
4251
+ /* @__PURE__ */ k("col", { width: "44" }),
4252
+ /* @__PURE__ */ k("col")
4253
+ ], -1), As = /* @__PURE__ */ _e({
4254
+ __name: "SplitViewer",
4255
+ props: {
4256
+ diffChange: null
4257
+ },
4258
+ setup(e) {
4259
+ return (n, t) => (P(), G("div", ms, [
4260
+ k("table", ys, [
4261
+ Ns,
4262
+ k("tbody", null, [
4263
+ (P(!0), G(ue, null, He(e.diffChange, (s, c) => (P(), Re(_s, {
4264
+ key: c,
4265
+ "split-line": s
4266
+ }, null, 8, ["split-line"]))), 128))
4267
+ ])
4268
+ ])
4269
+ ]));
4270
+ }
4271
+ });
4272
+ const vs = { class: "code-diff-view" }, Ts = /* @__PURE__ */ _e({
4273
+ __name: "CodeDiff",
4274
+ props: {
4275
+ newString: null,
4276
+ oldString: null,
4277
+ language: { default: "plaintext" },
4278
+ context: { default: 10 },
4279
+ diffStyle: { default: "word" },
4280
+ outputFormat: { default: "line-by-line" },
4281
+ trim: { type: Boolean, default: !1 },
4282
+ noDiffLineFeed: { type: Boolean, default: !1 }
4283
+ },
4284
+ setup(e) {
4285
+ const n = e, t = ve(() => n.outputFormat === "line-by-line"), s = ve(() => {
4286
+ const i = n.trim ? n.oldString.trim() : n.oldString;
4287
+ return n.noDiffLineFeed ? i.replace(/(\r\n)/g, `
4288
+ `) : i;
4289
+ }), c = ve(() => {
4290
+ const i = n.trim ? n.newString.trim() : n.newString;
4291
+ return n.noDiffLineFeed ? i.replace(/(\r\n)/g, `
4292
+ `) : i;
4293
+ }), l = ve(
4294
+ () => t.value ? jt(s.value, c.value, n.language, n.diffStyle, n.context) : Vt(s.value, c.value, n.language, n.diffStyle, n.context)
4295
+ );
4296
+ return (i, r) => (P(), G("div", vs, [
4297
+ $(t) ? (P(), Re(ls, {
4298
+ key: 0,
4299
+ "diff-change": $(l)
4300
+ }, null, 8, ["diff-change"])) : (P(), Re(As, {
4301
+ key: 1,
4302
+ "diff-change": $(l)
4303
+ }, null, 8, ["diff-change"]))
4304
+ ]));
4305
+ }
4306
+ }), ws = (e) => {
4307
+ e.component("CodeDiff", Ts);
4308
+ }, Ms = {
4309
+ install: ws,
4310
+ hljs: Z
4311
+ };
4312
+ export {
4313
+ Ts as CodeDiff,
4314
+ Ms as default
4315
+ };