inline-chat-kit 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2111 -0
- package/LICENSE +21 -0
- package/README.md +1430 -0
- package/dist/AnswerActions/AnswerActions.d.ts +35 -0
- package/dist/Approval/Approval.d.ts +42 -0
- package/dist/Artifact/ArtifactCard.d.ts +45 -0
- package/dist/Artifact/ArtifactPane.d.ts +50 -0
- package/dist/Artifact/ChatLayout.d.ts +35 -0
- package/dist/Artifact/useArtifacts.d.ts +21 -0
- package/dist/Attachments/Attachments.d.ts +50 -0
- package/dist/Branch/Branch.d.ts +28 -0
- package/dist/Button/Button.d.ts +23 -0
- package/dist/ChainOfThought/ChainOfThought.d.ts +49 -0
- package/dist/ChatHeader/ChatHeader.d.ts +89 -0
- package/dist/ChatInput/AddCardsOverlay.d.ts +11 -0
- package/dist/ChatInput/ChatInput.d.ts +118 -0
- package/dist/ChatInput/HoverActionsRow.d.ts +13 -0
- package/dist/ChatInput/MorphGlyph.d.ts +15 -0
- package/dist/ChatTurnRow/ChatTurnRow.d.ts +115 -0
- package/dist/Chip/Chip.d.ts +7 -0
- package/dist/CodeBlock/CodeBlock.d.ts +24 -0
- package/dist/CodeBlock/grammars.d.ts +16 -0
- package/dist/CodeBlock/highlight.d.ts +38 -0
- package/dist/Context/Context.d.ts +36 -0
- package/dist/Conversation/Conversation.d.ts +64 -0
- package/dist/CustomCursor/CustomCursor.d.ts +1 -0
- package/dist/EmptyState/EmptyState.d.ts +24 -0
- package/dist/GlassButton/GlassButton.d.ts +19 -0
- package/dist/InlineCitation/InlineCitation.d.ts +30 -0
- package/dist/Loader/Loader.d.ts +23 -0
- package/dist/QuestionCard/QuestionCard.d.ts +32 -0
- package/dist/QuestionCard/parts.d.ts +84 -0
- package/dist/QuestionCard/types.d.ts +54 -0
- package/dist/QuestionGroup/QuestionGroup.d.ts +87 -0
- package/dist/Reasoning/Reasoning.d.ts +37 -0
- package/dist/ReplyThreadPopup/ReplyThreadPopup.d.ts +18 -0
- package/dist/Sources/Sources.d.ts +46 -0
- package/dist/SystemMessage/SystemMessage.d.ts +39 -0
- package/dist/TaskList/TaskList.d.ts +42 -0
- package/dist/TextHighlighter/TextHighlighter.d.ts +17 -0
- package/dist/Tool/Tool.d.ts +41 -0
- package/dist/announce/announce.d.ts +27 -0
- package/dist/disclosure/DisclosureBody.d.ts +22 -0
- package/dist/disclosure/DisclosureHeader.d.ts +42 -0
- package/dist/disclosure/useDisclosure.d.ts +30 -0
- package/dist/duration/formatDuration.d.ts +9 -0
- package/dist/grammars-B19jp7qm.js +3181 -0
- package/dist/grammars-B19jp7qm.js.map +1 -0
- package/dist/index.d.ts +80 -0
- package/dist/inline-chat-kit.css +2 -0
- package/dist/inline-chat-kit.js +5314 -0
- package/dist/inline-chat-kit.js.map +1 -0
- package/dist/markdown/parse.d.ts +105 -0
- package/dist/markdown/parseMarkdown.d.ts +47 -0
- package/dist/radiusCorrection/useCorrectedRadius.d.ts +24 -0
- package/dist/reducedMotion/reducedMotion.d.ts +3 -0
- package/dist/stateGlyph/StateGlyph.d.ts +23 -0
- package/dist/turnParts/turnParts.d.ts +156 -0
- package/dist/useChatTurns/useChatTurns.d.ts +127 -0
- package/dist/voice/useVoiceInput.d.ts +79 -0
- package/package.json +95 -0
- package/theming.md +234 -0
|
@@ -0,0 +1,3181 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
4
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
5
|
+
get: ((e) => i[e]).bind(null, d),
|
|
6
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
7
|
+
});
|
|
8
|
+
return e;
|
|
9
|
+
}, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
10
|
+
value: n,
|
|
11
|
+
enumerable: !0
|
|
12
|
+
}) : o, n));
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region ../../node_modules/highlight.js/es/languages/bash.js
|
|
15
|
+
function l(e) {
|
|
16
|
+
let t = e.regex, n = {}, r = {
|
|
17
|
+
begin: /\$\{/,
|
|
18
|
+
end: /\}/,
|
|
19
|
+
contains: ["self", {
|
|
20
|
+
begin: /:-/,
|
|
21
|
+
contains: [n]
|
|
22
|
+
}]
|
|
23
|
+
};
|
|
24
|
+
Object.assign(n, {
|
|
25
|
+
className: "variable",
|
|
26
|
+
variants: [{ begin: t.concat(/\$[\w\d#@][\w\d_]*/, "(?![\\w\\d])(?![$])") }, r]
|
|
27
|
+
});
|
|
28
|
+
let i = {
|
|
29
|
+
className: "subst",
|
|
30
|
+
begin: /\$\(/,
|
|
31
|
+
end: /\)/,
|
|
32
|
+
contains: [e.BACKSLASH_ESCAPE]
|
|
33
|
+
}, a = e.inherit(e.COMMENT(), {
|
|
34
|
+
match: [/(^|\s)/, /#.*$/],
|
|
35
|
+
scope: { 2: "comment" }
|
|
36
|
+
}), o = {
|
|
37
|
+
begin: /<<-?\s*(?=\w+)/,
|
|
38
|
+
starts: { contains: [e.END_SAME_AS_BEGIN({
|
|
39
|
+
begin: /(\w+)/,
|
|
40
|
+
end: /(\w+)/,
|
|
41
|
+
className: "string"
|
|
42
|
+
})] }
|
|
43
|
+
}, s = {
|
|
44
|
+
className: "string",
|
|
45
|
+
begin: /"/,
|
|
46
|
+
end: /"/,
|
|
47
|
+
contains: [
|
|
48
|
+
e.BACKSLASH_ESCAPE,
|
|
49
|
+
n,
|
|
50
|
+
i
|
|
51
|
+
]
|
|
52
|
+
};
|
|
53
|
+
i.contains.push(s);
|
|
54
|
+
let c = { match: /\\"/ }, l = {
|
|
55
|
+
className: "string",
|
|
56
|
+
begin: /'/,
|
|
57
|
+
end: /'/
|
|
58
|
+
}, u = { match: /\\'/ }, d = {
|
|
59
|
+
begin: /\$?\(\(/,
|
|
60
|
+
end: /\)\)/,
|
|
61
|
+
contains: [
|
|
62
|
+
{
|
|
63
|
+
begin: /\d+#[0-9a-f]+/,
|
|
64
|
+
className: "number"
|
|
65
|
+
},
|
|
66
|
+
e.NUMBER_MODE,
|
|
67
|
+
n
|
|
68
|
+
]
|
|
69
|
+
}, f = e.SHEBANG({
|
|
70
|
+
binary: `(${[
|
|
71
|
+
"fish",
|
|
72
|
+
"bash",
|
|
73
|
+
"zsh",
|
|
74
|
+
"sh",
|
|
75
|
+
"csh",
|
|
76
|
+
"ksh",
|
|
77
|
+
"tcsh",
|
|
78
|
+
"dash",
|
|
79
|
+
"scsh"
|
|
80
|
+
].join("|")})`,
|
|
81
|
+
relevance: 10
|
|
82
|
+
}), p = {
|
|
83
|
+
className: "function",
|
|
84
|
+
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
85
|
+
returnBegin: !0,
|
|
86
|
+
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
87
|
+
relevance: 0
|
|
88
|
+
}, m = [
|
|
89
|
+
"if",
|
|
90
|
+
"then",
|
|
91
|
+
"else",
|
|
92
|
+
"elif",
|
|
93
|
+
"fi",
|
|
94
|
+
"time",
|
|
95
|
+
"for",
|
|
96
|
+
"while",
|
|
97
|
+
"until",
|
|
98
|
+
"in",
|
|
99
|
+
"do",
|
|
100
|
+
"done",
|
|
101
|
+
"case",
|
|
102
|
+
"esac",
|
|
103
|
+
"coproc",
|
|
104
|
+
"function",
|
|
105
|
+
"select"
|
|
106
|
+
], h = ["true", "false"], g = { match: /(\/[a-z._-]+)+/ }, _ = [
|
|
107
|
+
"break",
|
|
108
|
+
"cd",
|
|
109
|
+
"continue",
|
|
110
|
+
"eval",
|
|
111
|
+
"exec",
|
|
112
|
+
"exit",
|
|
113
|
+
"export",
|
|
114
|
+
"getopts",
|
|
115
|
+
"hash",
|
|
116
|
+
"pwd",
|
|
117
|
+
"readonly",
|
|
118
|
+
"return",
|
|
119
|
+
"shift",
|
|
120
|
+
"test",
|
|
121
|
+
"times",
|
|
122
|
+
"trap",
|
|
123
|
+
"umask",
|
|
124
|
+
"unset"
|
|
125
|
+
], v = [
|
|
126
|
+
"alias",
|
|
127
|
+
"bind",
|
|
128
|
+
"builtin",
|
|
129
|
+
"caller",
|
|
130
|
+
"command",
|
|
131
|
+
"declare",
|
|
132
|
+
"echo",
|
|
133
|
+
"enable",
|
|
134
|
+
"help",
|
|
135
|
+
"let",
|
|
136
|
+
"local",
|
|
137
|
+
"logout",
|
|
138
|
+
"mapfile",
|
|
139
|
+
"printf",
|
|
140
|
+
"read",
|
|
141
|
+
"readarray",
|
|
142
|
+
"source",
|
|
143
|
+
"sudo",
|
|
144
|
+
"type",
|
|
145
|
+
"typeset",
|
|
146
|
+
"ulimit",
|
|
147
|
+
"unalias"
|
|
148
|
+
], y = /* @__PURE__ */ "autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp".split("."), b = /* @__PURE__ */ "chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes".split(".");
|
|
149
|
+
return {
|
|
150
|
+
name: "Bash",
|
|
151
|
+
aliases: ["sh", "zsh"],
|
|
152
|
+
keywords: {
|
|
153
|
+
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
154
|
+
keyword: m,
|
|
155
|
+
literal: h,
|
|
156
|
+
built_in: [
|
|
157
|
+
..._,
|
|
158
|
+
...v,
|
|
159
|
+
"set",
|
|
160
|
+
"shopt",
|
|
161
|
+
...y,
|
|
162
|
+
...b
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
contains: [
|
|
166
|
+
f,
|
|
167
|
+
e.SHEBANG(),
|
|
168
|
+
p,
|
|
169
|
+
d,
|
|
170
|
+
a,
|
|
171
|
+
o,
|
|
172
|
+
g,
|
|
173
|
+
s,
|
|
174
|
+
c,
|
|
175
|
+
l,
|
|
176
|
+
u,
|
|
177
|
+
n
|
|
178
|
+
]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region ../../node_modules/highlight.js/es/languages/css.js
|
|
183
|
+
var u = (e) => ({
|
|
184
|
+
IMPORTANT: {
|
|
185
|
+
scope: "meta",
|
|
186
|
+
begin: "!important"
|
|
187
|
+
},
|
|
188
|
+
BLOCK_COMMENT: e.C_BLOCK_COMMENT_MODE,
|
|
189
|
+
HEXCOLOR: {
|
|
190
|
+
scope: "number",
|
|
191
|
+
begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/
|
|
192
|
+
},
|
|
193
|
+
UNICODE_RANGE: {
|
|
194
|
+
scope: "number",
|
|
195
|
+
begin: /\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/
|
|
196
|
+
},
|
|
197
|
+
FUNCTION_DISPATCH: {
|
|
198
|
+
className: "built_in",
|
|
199
|
+
begin: /[\w-]+(?=\()/
|
|
200
|
+
},
|
|
201
|
+
ATTRIBUTE_SELECTOR_MODE: {
|
|
202
|
+
scope: "selector-attr",
|
|
203
|
+
begin: /\[/,
|
|
204
|
+
end: /\]/,
|
|
205
|
+
illegal: "$",
|
|
206
|
+
contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE]
|
|
207
|
+
},
|
|
208
|
+
CSS_NUMBER_MODE: {
|
|
209
|
+
scope: "number",
|
|
210
|
+
begin: e.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
|
|
211
|
+
relevance: 0
|
|
212
|
+
},
|
|
213
|
+
CSS_VARIABLE: {
|
|
214
|
+
className: "attr",
|
|
215
|
+
begin: /--[A-Za-z_][A-Za-z0-9_-]*/
|
|
216
|
+
}
|
|
217
|
+
}), d = /* @__PURE__ */ "a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video".split("."), f = /* @__PURE__ */ "defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath".split("."), p = [...d, ...f], m = (/* @__PURE__ */ "any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height".split(".")).sort().reverse(), h = (/* @__PURE__ */ "active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where".split(".")).sort().reverse(), g = [
|
|
218
|
+
"after",
|
|
219
|
+
"backdrop",
|
|
220
|
+
"before",
|
|
221
|
+
"cue",
|
|
222
|
+
"cue-region",
|
|
223
|
+
"first-letter",
|
|
224
|
+
"first-line",
|
|
225
|
+
"grammar-error",
|
|
226
|
+
"marker",
|
|
227
|
+
"part",
|
|
228
|
+
"placeholder",
|
|
229
|
+
"selection",
|
|
230
|
+
"slotted",
|
|
231
|
+
"spelling-error"
|
|
232
|
+
].sort().reverse(), _ = (/* @__PURE__ */ "accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom".split(".")).sort().reverse();
|
|
233
|
+
function v(e) {
|
|
234
|
+
let t = e.regex, n = u(e), r = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ }, i = /@-?\w[\w]*(-\w+)*/, a = [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE];
|
|
235
|
+
return {
|
|
236
|
+
name: "CSS",
|
|
237
|
+
case_insensitive: !0,
|
|
238
|
+
illegal: /[=|'\$]/,
|
|
239
|
+
keywords: { keyframePosition: "from to" },
|
|
240
|
+
classNameAliases: { keyframePosition: "selector-tag" },
|
|
241
|
+
contains: [
|
|
242
|
+
n.BLOCK_COMMENT,
|
|
243
|
+
r,
|
|
244
|
+
n.CSS_NUMBER_MODE,
|
|
245
|
+
{
|
|
246
|
+
className: "selector-id",
|
|
247
|
+
begin: /#[A-Za-z0-9_-]+/,
|
|
248
|
+
relevance: 0
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
className: "selector-class",
|
|
252
|
+
begin: "\\.[a-zA-Z-][a-zA-Z0-9_-]*",
|
|
253
|
+
relevance: 0
|
|
254
|
+
},
|
|
255
|
+
n.ATTRIBUTE_SELECTOR_MODE,
|
|
256
|
+
{
|
|
257
|
+
className: "selector-pseudo",
|
|
258
|
+
variants: [{ begin: ":(" + h.join("|") + ")" }, { begin: ":(:)?(" + g.join("|") + ")" }]
|
|
259
|
+
},
|
|
260
|
+
n.CSS_VARIABLE,
|
|
261
|
+
{
|
|
262
|
+
className: "attribute",
|
|
263
|
+
begin: "\\b(" + _.join("|") + ")\\b"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
begin: /:/,
|
|
267
|
+
end: /[;}{]/,
|
|
268
|
+
contains: [
|
|
269
|
+
n.BLOCK_COMMENT,
|
|
270
|
+
n.HEXCOLOR,
|
|
271
|
+
n.IMPORTANT,
|
|
272
|
+
n.CSS_NUMBER_MODE,
|
|
273
|
+
n.UNICODE_RANGE,
|
|
274
|
+
...a,
|
|
275
|
+
{
|
|
276
|
+
begin: /(url|data-uri)\(/,
|
|
277
|
+
end: /\)/,
|
|
278
|
+
relevance: 0,
|
|
279
|
+
keywords: { built_in: "url data-uri" },
|
|
280
|
+
contains: [...a, {
|
|
281
|
+
className: "string",
|
|
282
|
+
begin: /[^)]/,
|
|
283
|
+
endsWithParent: !0,
|
|
284
|
+
excludeEnd: !0
|
|
285
|
+
}]
|
|
286
|
+
},
|
|
287
|
+
n.FUNCTION_DISPATCH
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
begin: t.lookahead(/@/),
|
|
292
|
+
end: "[{;]",
|
|
293
|
+
relevance: 0,
|
|
294
|
+
illegal: /:/,
|
|
295
|
+
contains: [{
|
|
296
|
+
className: "keyword",
|
|
297
|
+
begin: i
|
|
298
|
+
}, {
|
|
299
|
+
begin: /\s/,
|
|
300
|
+
endsWithParent: !0,
|
|
301
|
+
excludeEnd: !0,
|
|
302
|
+
relevance: 0,
|
|
303
|
+
keywords: {
|
|
304
|
+
$pattern: /[a-z-]+/,
|
|
305
|
+
keyword: "and or not only",
|
|
306
|
+
attribute: m.join(" ")
|
|
307
|
+
},
|
|
308
|
+
contains: [
|
|
309
|
+
{
|
|
310
|
+
begin: /[a-z-]+(?=:)/,
|
|
311
|
+
className: "attribute"
|
|
312
|
+
},
|
|
313
|
+
...a,
|
|
314
|
+
n.CSS_NUMBER_MODE
|
|
315
|
+
]
|
|
316
|
+
}]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
className: "selector-tag",
|
|
320
|
+
begin: "\\b(" + p.join("|") + ")\\b"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region ../../node_modules/highlight.js/es/languages/diff.js
|
|
327
|
+
function y(e) {
|
|
328
|
+
let t = e.regex;
|
|
329
|
+
return {
|
|
330
|
+
name: "Diff",
|
|
331
|
+
aliases: ["patch"],
|
|
332
|
+
contains: [
|
|
333
|
+
{
|
|
334
|
+
className: "meta",
|
|
335
|
+
relevance: 10,
|
|
336
|
+
match: t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/, /^@@ +-\d+ +\+\d+,\d+ +@@/, /^@@ +-\d+,\d+ +\+\d+ +@@/, /^@@ +-\d+ +\+\d+ +@@/, /^\*\*\* +\d+,\d+ +\*\*\*\*$/, /^--- +\d+,\d+ +----$/)
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
className: "comment",
|
|
340
|
+
variants: [{
|
|
341
|
+
begin: t.either(/Index: /, /^index/, /={3,}/, /^-{3}/, /^\*{3} /, /^\+{3}/, /^diff --git/),
|
|
342
|
+
end: /$/
|
|
343
|
+
}, { match: /^\*{15}$/ }]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
className: "addition",
|
|
347
|
+
begin: /^\+/,
|
|
348
|
+
end: /$/
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
className: "deletion",
|
|
352
|
+
begin: /^-/,
|
|
353
|
+
end: /$/
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
className: "addition",
|
|
357
|
+
begin: /^!/,
|
|
358
|
+
end: /$/
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region ../../node_modules/highlight.js/es/languages/javascript.js
|
|
365
|
+
var b = "[A-Za-z$_][0-9A-Za-z$_]*", x = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), S = [
|
|
366
|
+
"true",
|
|
367
|
+
"false",
|
|
368
|
+
"null",
|
|
369
|
+
"undefined",
|
|
370
|
+
"NaN",
|
|
371
|
+
"Infinity"
|
|
372
|
+
], C = /* @__PURE__ */ "Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly".split("."), w = [
|
|
373
|
+
"Error",
|
|
374
|
+
"EvalError",
|
|
375
|
+
"InternalError",
|
|
376
|
+
"RangeError",
|
|
377
|
+
"ReferenceError",
|
|
378
|
+
"SyntaxError",
|
|
379
|
+
"TypeError",
|
|
380
|
+
"URIError"
|
|
381
|
+
], T = [
|
|
382
|
+
"setInterval",
|
|
383
|
+
"setTimeout",
|
|
384
|
+
"clearInterval",
|
|
385
|
+
"clearTimeout",
|
|
386
|
+
"require",
|
|
387
|
+
"exports",
|
|
388
|
+
"eval",
|
|
389
|
+
"isFinite",
|
|
390
|
+
"isNaN",
|
|
391
|
+
"parseFloat",
|
|
392
|
+
"parseInt",
|
|
393
|
+
"decodeURI",
|
|
394
|
+
"decodeURIComponent",
|
|
395
|
+
"encodeURI",
|
|
396
|
+
"encodeURIComponent",
|
|
397
|
+
"escape",
|
|
398
|
+
"unescape"
|
|
399
|
+
], E = [
|
|
400
|
+
"arguments",
|
|
401
|
+
"this",
|
|
402
|
+
"super",
|
|
403
|
+
"console",
|
|
404
|
+
"window",
|
|
405
|
+
"document",
|
|
406
|
+
"localStorage",
|
|
407
|
+
"sessionStorage",
|
|
408
|
+
"module",
|
|
409
|
+
"global"
|
|
410
|
+
], D = [].concat(T, C, w);
|
|
411
|
+
function O(e) {
|
|
412
|
+
let t = e.regex, n = (e, { after: t }) => {
|
|
413
|
+
let n = "</" + e[0].slice(1);
|
|
414
|
+
return e.input.indexOf(n, t) !== -1;
|
|
415
|
+
}, r = b, i = {
|
|
416
|
+
begin: "<>",
|
|
417
|
+
end: "</>"
|
|
418
|
+
}, a = /<[A-Za-z0-9\\._:-]+\s*\/>/, o = {
|
|
419
|
+
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
420
|
+
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
421
|
+
isTrulyOpeningTag: (e, t) => {
|
|
422
|
+
let r = e[0].length + e.index, i = e.input[r];
|
|
423
|
+
if (i === "<" || i === ",") {
|
|
424
|
+
t.ignoreMatch();
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
i === ">" && (n(e, { after: r }) || t.ignoreMatch());
|
|
428
|
+
let a, o = e.input.substring(r);
|
|
429
|
+
if (a = o.match(/^\s*=/)) {
|
|
430
|
+
t.ignoreMatch();
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
if ((a = o.match(/^\s+extends\s+/)) && a.index === 0) {
|
|
434
|
+
t.ignoreMatch();
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}, s = {
|
|
439
|
+
$pattern: b,
|
|
440
|
+
keyword: x,
|
|
441
|
+
literal: S,
|
|
442
|
+
built_in: D,
|
|
443
|
+
"variable.language": E
|
|
444
|
+
}, c = "[0-9](_?[0-9])*", l = `\\.(${c})`, u = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", d = {
|
|
445
|
+
className: "number",
|
|
446
|
+
variants: [
|
|
447
|
+
{ begin: `(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b` },
|
|
448
|
+
{ begin: `\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b` },
|
|
449
|
+
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
450
|
+
{ begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
|
|
451
|
+
{ begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
|
|
452
|
+
{ begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
|
|
453
|
+
{ begin: "\\b0[0-7]+n?\\b" }
|
|
454
|
+
],
|
|
455
|
+
relevance: 0
|
|
456
|
+
}, f = {
|
|
457
|
+
className: "subst",
|
|
458
|
+
begin: "\\$\\{",
|
|
459
|
+
end: "\\}",
|
|
460
|
+
keywords: s,
|
|
461
|
+
contains: []
|
|
462
|
+
}, p = {
|
|
463
|
+
begin: ".?html`",
|
|
464
|
+
end: "",
|
|
465
|
+
starts: {
|
|
466
|
+
end: "`",
|
|
467
|
+
returnEnd: !1,
|
|
468
|
+
contains: [e.BACKSLASH_ESCAPE, f],
|
|
469
|
+
subLanguage: "xml"
|
|
470
|
+
}
|
|
471
|
+
}, m = {
|
|
472
|
+
begin: ".?css`",
|
|
473
|
+
end: "",
|
|
474
|
+
starts: {
|
|
475
|
+
end: "`",
|
|
476
|
+
returnEnd: !1,
|
|
477
|
+
contains: [e.BACKSLASH_ESCAPE, f],
|
|
478
|
+
subLanguage: "css"
|
|
479
|
+
}
|
|
480
|
+
}, h = {
|
|
481
|
+
begin: ".?gql`",
|
|
482
|
+
end: "",
|
|
483
|
+
starts: {
|
|
484
|
+
end: "`",
|
|
485
|
+
returnEnd: !1,
|
|
486
|
+
contains: [e.BACKSLASH_ESCAPE, f],
|
|
487
|
+
subLanguage: "graphql"
|
|
488
|
+
}
|
|
489
|
+
}, g = {
|
|
490
|
+
className: "string",
|
|
491
|
+
begin: "`",
|
|
492
|
+
end: "`",
|
|
493
|
+
contains: [e.BACKSLASH_ESCAPE, f]
|
|
494
|
+
}, _ = {
|
|
495
|
+
className: "comment",
|
|
496
|
+
variants: [
|
|
497
|
+
e.COMMENT(/\/\*\*(?!\/)/, "\\*/", {
|
|
498
|
+
relevance: 0,
|
|
499
|
+
contains: [{
|
|
500
|
+
begin: "(?=@[A-Za-z]+)",
|
|
501
|
+
relevance: 0,
|
|
502
|
+
contains: [
|
|
503
|
+
{
|
|
504
|
+
className: "doctag",
|
|
505
|
+
begin: "@[A-Za-z]+"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
className: "type",
|
|
509
|
+
begin: "\\{",
|
|
510
|
+
end: "\\}",
|
|
511
|
+
excludeEnd: !0,
|
|
512
|
+
excludeBegin: !0,
|
|
513
|
+
relevance: 0
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
className: "variable",
|
|
517
|
+
begin: r + "(?=\\s*(-)|$)",
|
|
518
|
+
endsParent: !0,
|
|
519
|
+
relevance: 0
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
begin: /(?=[^\n])\s/,
|
|
523
|
+
relevance: 0
|
|
524
|
+
}
|
|
525
|
+
]
|
|
526
|
+
}]
|
|
527
|
+
}),
|
|
528
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
529
|
+
e.C_LINE_COMMENT_MODE
|
|
530
|
+
]
|
|
531
|
+
}, v = [
|
|
532
|
+
e.APOS_STRING_MODE,
|
|
533
|
+
e.QUOTE_STRING_MODE,
|
|
534
|
+
p,
|
|
535
|
+
m,
|
|
536
|
+
h,
|
|
537
|
+
g,
|
|
538
|
+
{ match: /\$\d+/ },
|
|
539
|
+
d
|
|
540
|
+
];
|
|
541
|
+
f.contains = v.concat({
|
|
542
|
+
begin: /\{/,
|
|
543
|
+
end: /\}/,
|
|
544
|
+
keywords: s,
|
|
545
|
+
contains: ["self"].concat(v)
|
|
546
|
+
});
|
|
547
|
+
let y = [].concat(_, f.contains), O = y.concat([{
|
|
548
|
+
begin: /(\s*)\(/,
|
|
549
|
+
end: /\)/,
|
|
550
|
+
keywords: s,
|
|
551
|
+
contains: ["self"].concat(y)
|
|
552
|
+
}]), k = {
|
|
553
|
+
className: "params",
|
|
554
|
+
begin: /(\s*)\(/,
|
|
555
|
+
end: /\)/,
|
|
556
|
+
excludeBegin: !0,
|
|
557
|
+
excludeEnd: !0,
|
|
558
|
+
keywords: s,
|
|
559
|
+
contains: O
|
|
560
|
+
}, A = { variants: [{
|
|
561
|
+
match: [
|
|
562
|
+
/class/,
|
|
563
|
+
/\s+/,
|
|
564
|
+
r,
|
|
565
|
+
/\s+/,
|
|
566
|
+
/extends/,
|
|
567
|
+
/\s+/,
|
|
568
|
+
t.concat(r, "(", t.concat(/\./, r), ")*")
|
|
569
|
+
],
|
|
570
|
+
scope: {
|
|
571
|
+
1: "keyword",
|
|
572
|
+
3: "title.class",
|
|
573
|
+
5: "keyword",
|
|
574
|
+
7: "title.class.inherited"
|
|
575
|
+
}
|
|
576
|
+
}, {
|
|
577
|
+
match: [
|
|
578
|
+
/class/,
|
|
579
|
+
/\s+/,
|
|
580
|
+
r
|
|
581
|
+
],
|
|
582
|
+
scope: {
|
|
583
|
+
1: "keyword",
|
|
584
|
+
3: "title.class"
|
|
585
|
+
}
|
|
586
|
+
}] }, j = {
|
|
587
|
+
relevance: 0,
|
|
588
|
+
match: t.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
|
|
589
|
+
className: "title.class",
|
|
590
|
+
keywords: { _: [...C, ...w] }
|
|
591
|
+
}, M = {
|
|
592
|
+
label: "use_strict",
|
|
593
|
+
className: "meta",
|
|
594
|
+
relevance: 10,
|
|
595
|
+
begin: /^\s*['"]use (strict|asm)['"]/
|
|
596
|
+
}, N = {
|
|
597
|
+
variants: [{ match: [
|
|
598
|
+
/function/,
|
|
599
|
+
/\s+/,
|
|
600
|
+
r,
|
|
601
|
+
/(?=\s*\()/
|
|
602
|
+
] }, { match: [/function/, /\s*(?=\()/] }],
|
|
603
|
+
className: {
|
|
604
|
+
1: "keyword",
|
|
605
|
+
3: "title.function"
|
|
606
|
+
},
|
|
607
|
+
label: "func.def",
|
|
608
|
+
contains: [k],
|
|
609
|
+
illegal: /%/
|
|
610
|
+
}, P = {
|
|
611
|
+
relevance: 0,
|
|
612
|
+
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
613
|
+
className: "variable.constant"
|
|
614
|
+
};
|
|
615
|
+
function F(e) {
|
|
616
|
+
return t.concat("(?!", e.join("|"), ")");
|
|
617
|
+
}
|
|
618
|
+
let I = {
|
|
619
|
+
match: t.concat(/\b/, F([
|
|
620
|
+
...T,
|
|
621
|
+
"super",
|
|
622
|
+
"import",
|
|
623
|
+
"await"
|
|
624
|
+
].map((e) => `${e}\\s*\\(`)), r, t.lookahead(/\s*\(/)),
|
|
625
|
+
className: "title.function",
|
|
626
|
+
relevance: 0
|
|
627
|
+
}, L = {
|
|
628
|
+
begin: t.concat(/\./, t.lookahead(t.concat(r, /(?![0-9A-Za-z$_(])/))),
|
|
629
|
+
end: r,
|
|
630
|
+
excludeBegin: !0,
|
|
631
|
+
keywords: "prototype",
|
|
632
|
+
className: "property",
|
|
633
|
+
relevance: 0
|
|
634
|
+
}, R = {
|
|
635
|
+
match: [
|
|
636
|
+
/get|set/,
|
|
637
|
+
/\s+/,
|
|
638
|
+
r,
|
|
639
|
+
/(?=\()/
|
|
640
|
+
],
|
|
641
|
+
className: {
|
|
642
|
+
1: "keyword",
|
|
643
|
+
3: "title.function"
|
|
644
|
+
},
|
|
645
|
+
contains: [{ begin: /\(\)/ }, k]
|
|
646
|
+
}, z = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", B = {
|
|
647
|
+
match: [
|
|
648
|
+
/const|var|let/,
|
|
649
|
+
/\s+/,
|
|
650
|
+
r,
|
|
651
|
+
/\s*/,
|
|
652
|
+
/=\s*/,
|
|
653
|
+
/(async\s*)?/,
|
|
654
|
+
t.lookahead(z)
|
|
655
|
+
],
|
|
656
|
+
keywords: "async",
|
|
657
|
+
className: {
|
|
658
|
+
1: "keyword",
|
|
659
|
+
3: "title.function"
|
|
660
|
+
},
|
|
661
|
+
contains: [k]
|
|
662
|
+
};
|
|
663
|
+
return {
|
|
664
|
+
name: "JavaScript",
|
|
665
|
+
aliases: [
|
|
666
|
+
"js",
|
|
667
|
+
"jsx",
|
|
668
|
+
"mjs",
|
|
669
|
+
"cjs"
|
|
670
|
+
],
|
|
671
|
+
keywords: s,
|
|
672
|
+
exports: {
|
|
673
|
+
PARAMS_CONTAINS: O,
|
|
674
|
+
CLASS_REFERENCE: j
|
|
675
|
+
},
|
|
676
|
+
illegal: /#(?![$_A-Za-z])/,
|
|
677
|
+
contains: [
|
|
678
|
+
e.SHEBANG({
|
|
679
|
+
label: "shebang",
|
|
680
|
+
binary: "node",
|
|
681
|
+
relevance: 5
|
|
682
|
+
}),
|
|
683
|
+
M,
|
|
684
|
+
e.APOS_STRING_MODE,
|
|
685
|
+
e.QUOTE_STRING_MODE,
|
|
686
|
+
p,
|
|
687
|
+
m,
|
|
688
|
+
h,
|
|
689
|
+
g,
|
|
690
|
+
_,
|
|
691
|
+
{ match: /\$\d+/ },
|
|
692
|
+
d,
|
|
693
|
+
j,
|
|
694
|
+
{
|
|
695
|
+
scope: "attr",
|
|
696
|
+
match: r + t.lookahead(":"),
|
|
697
|
+
relevance: 0
|
|
698
|
+
},
|
|
699
|
+
B,
|
|
700
|
+
{
|
|
701
|
+
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
702
|
+
keywords: "return throw case",
|
|
703
|
+
relevance: 0,
|
|
704
|
+
contains: [
|
|
705
|
+
_,
|
|
706
|
+
e.REGEXP_MODE,
|
|
707
|
+
{
|
|
708
|
+
className: "function",
|
|
709
|
+
begin: z,
|
|
710
|
+
returnBegin: !0,
|
|
711
|
+
end: "\\s*=>",
|
|
712
|
+
contains: [{
|
|
713
|
+
className: "params",
|
|
714
|
+
variants: [
|
|
715
|
+
{
|
|
716
|
+
begin: e.UNDERSCORE_IDENT_RE,
|
|
717
|
+
relevance: 0
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
className: null,
|
|
721
|
+
begin: /\(\s*\)/,
|
|
722
|
+
skip: !0
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
begin: /(\s*)\(/,
|
|
726
|
+
end: /\)/,
|
|
727
|
+
excludeBegin: !0,
|
|
728
|
+
excludeEnd: !0,
|
|
729
|
+
keywords: s,
|
|
730
|
+
contains: O
|
|
731
|
+
}
|
|
732
|
+
]
|
|
733
|
+
}]
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
begin: /,/,
|
|
737
|
+
relevance: 0
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
match: /\s+/,
|
|
741
|
+
relevance: 0
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
variants: [
|
|
745
|
+
{
|
|
746
|
+
begin: i.begin,
|
|
747
|
+
end: i.end
|
|
748
|
+
},
|
|
749
|
+
{ match: a },
|
|
750
|
+
{
|
|
751
|
+
begin: o.begin,
|
|
752
|
+
"on:begin": o.isTrulyOpeningTag,
|
|
753
|
+
end: o.end
|
|
754
|
+
}
|
|
755
|
+
],
|
|
756
|
+
subLanguage: "xml",
|
|
757
|
+
contains: [{
|
|
758
|
+
begin: o.begin,
|
|
759
|
+
end: o.end,
|
|
760
|
+
skip: !0,
|
|
761
|
+
contains: ["self"]
|
|
762
|
+
}]
|
|
763
|
+
}
|
|
764
|
+
]
|
|
765
|
+
},
|
|
766
|
+
N,
|
|
767
|
+
{ beginKeywords: "while if switch catch for" },
|
|
768
|
+
{
|
|
769
|
+
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
770
|
+
returnBegin: !0,
|
|
771
|
+
label: "func.def",
|
|
772
|
+
contains: [k, e.inherit(e.TITLE_MODE, {
|
|
773
|
+
begin: r,
|
|
774
|
+
className: "title.function"
|
|
775
|
+
})]
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
match: /\.\.\./,
|
|
779
|
+
relevance: 0
|
|
780
|
+
},
|
|
781
|
+
L,
|
|
782
|
+
{
|
|
783
|
+
match: "\\$" + r,
|
|
784
|
+
relevance: 0
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
match: [/\bconstructor(?=\s*\()/],
|
|
788
|
+
className: { 1: "title.function" },
|
|
789
|
+
contains: [k]
|
|
790
|
+
},
|
|
791
|
+
I,
|
|
792
|
+
P,
|
|
793
|
+
A,
|
|
794
|
+
R,
|
|
795
|
+
{ match: /\$[(.]/ }
|
|
796
|
+
]
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
//#endregion
|
|
800
|
+
//#region ../../node_modules/highlight.js/es/languages/json.js
|
|
801
|
+
var k = {
|
|
802
|
+
scope: "number",
|
|
803
|
+
match: "([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",
|
|
804
|
+
relevance: 0
|
|
805
|
+
};
|
|
806
|
+
function A(e) {
|
|
807
|
+
let t = {
|
|
808
|
+
className: "attr",
|
|
809
|
+
begin: /(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,
|
|
810
|
+
relevance: 1.01
|
|
811
|
+
}, n = {
|
|
812
|
+
match: /[{}[\],:]/,
|
|
813
|
+
className: "punctuation",
|
|
814
|
+
relevance: 0
|
|
815
|
+
}, r = [
|
|
816
|
+
"true",
|
|
817
|
+
"false",
|
|
818
|
+
"null"
|
|
819
|
+
], i = {
|
|
820
|
+
scope: "literal",
|
|
821
|
+
beginKeywords: r.join(" ")
|
|
822
|
+
};
|
|
823
|
+
return {
|
|
824
|
+
name: "JSON",
|
|
825
|
+
aliases: ["jsonc", "json5"],
|
|
826
|
+
keywords: { literal: r },
|
|
827
|
+
contains: [
|
|
828
|
+
t,
|
|
829
|
+
n,
|
|
830
|
+
e.APOS_STRING_MODE,
|
|
831
|
+
e.QUOTE_STRING_MODE,
|
|
832
|
+
i,
|
|
833
|
+
k,
|
|
834
|
+
e.C_LINE_COMMENT_MODE,
|
|
835
|
+
e.C_BLOCK_COMMENT_MODE
|
|
836
|
+
],
|
|
837
|
+
illegal: "\\S"
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
//#endregion
|
|
841
|
+
//#region ../../node_modules/highlight.js/es/languages/markdown.js
|
|
842
|
+
function j(e) {
|
|
843
|
+
let t = e.regex, n = {
|
|
844
|
+
begin: /<\/?[A-Za-z_]/,
|
|
845
|
+
end: ">",
|
|
846
|
+
subLanguage: "xml",
|
|
847
|
+
relevance: 0
|
|
848
|
+
}, r = {
|
|
849
|
+
begin: "^[-\\*]{3,}",
|
|
850
|
+
end: "$"
|
|
851
|
+
}, i = {
|
|
852
|
+
className: "code",
|
|
853
|
+
variants: [
|
|
854
|
+
{ begin: "(`{3,})[^`](.|\\n)*?\\1`*[ ]*" },
|
|
855
|
+
{ begin: "(~{3,})[^~](.|\\n)*?\\1~*[ ]*" },
|
|
856
|
+
{
|
|
857
|
+
begin: "```",
|
|
858
|
+
end: "```+[ ]*$"
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
begin: "~~~",
|
|
862
|
+
end: "~~~+[ ]*$"
|
|
863
|
+
},
|
|
864
|
+
{ begin: "`.+?`" },
|
|
865
|
+
{
|
|
866
|
+
begin: "(?=^( {4}|\\t))",
|
|
867
|
+
contains: [{
|
|
868
|
+
begin: "^( {4}|\\t)",
|
|
869
|
+
end: "(\\n)$"
|
|
870
|
+
}],
|
|
871
|
+
relevance: 0
|
|
872
|
+
}
|
|
873
|
+
]
|
|
874
|
+
}, a = {
|
|
875
|
+
className: "bullet",
|
|
876
|
+
begin: "^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",
|
|
877
|
+
end: "\\s+",
|
|
878
|
+
excludeEnd: !0
|
|
879
|
+
}, o = {
|
|
880
|
+
begin: /^\[[^\n]+\]:/,
|
|
881
|
+
returnBegin: !0,
|
|
882
|
+
contains: [{
|
|
883
|
+
className: "symbol",
|
|
884
|
+
begin: /\[/,
|
|
885
|
+
end: /\]/,
|
|
886
|
+
excludeBegin: !0,
|
|
887
|
+
excludeEnd: !0
|
|
888
|
+
}, {
|
|
889
|
+
className: "link",
|
|
890
|
+
begin: /:\s*/,
|
|
891
|
+
end: /$/,
|
|
892
|
+
excludeBegin: !0
|
|
893
|
+
}]
|
|
894
|
+
}, s = {
|
|
895
|
+
variants: [
|
|
896
|
+
{
|
|
897
|
+
begin: /\[.+?\]\[.*?\]/,
|
|
898
|
+
relevance: 0
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,
|
|
902
|
+
relevance: 2
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
begin: t.concat(/\[.+?\]\(/, /[A-Za-z][A-Za-z0-9+.-]*/, /:\/\/.*?\)/),
|
|
906
|
+
relevance: 2
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
begin: /\[.+?\]\([./?&#].*?\)/,
|
|
910
|
+
relevance: 1
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
begin: /\[.*?\]\(.*?\)/,
|
|
914
|
+
relevance: 0
|
|
915
|
+
}
|
|
916
|
+
],
|
|
917
|
+
returnBegin: !0,
|
|
918
|
+
contains: [
|
|
919
|
+
{ match: /\[(?=\])/ },
|
|
920
|
+
{
|
|
921
|
+
className: "string",
|
|
922
|
+
relevance: 0,
|
|
923
|
+
begin: "\\[",
|
|
924
|
+
end: "\\]",
|
|
925
|
+
excludeBegin: !0,
|
|
926
|
+
returnEnd: !0
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
className: "link",
|
|
930
|
+
relevance: 0,
|
|
931
|
+
begin: "\\]\\(",
|
|
932
|
+
end: "\\)",
|
|
933
|
+
excludeBegin: !0,
|
|
934
|
+
excludeEnd: !0
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
className: "symbol",
|
|
938
|
+
relevance: 0,
|
|
939
|
+
begin: "\\]\\[",
|
|
940
|
+
end: "\\]",
|
|
941
|
+
excludeBegin: !0,
|
|
942
|
+
excludeEnd: !0
|
|
943
|
+
}
|
|
944
|
+
]
|
|
945
|
+
}, c = {
|
|
946
|
+
className: "strong",
|
|
947
|
+
contains: [],
|
|
948
|
+
variants: [{
|
|
949
|
+
begin: /_{2}(?!\s)/,
|
|
950
|
+
end: /_{2}/
|
|
951
|
+
}, {
|
|
952
|
+
begin: /\*{2}(?!\s)/,
|
|
953
|
+
end: /\*{2}/
|
|
954
|
+
}]
|
|
955
|
+
}, l = {
|
|
956
|
+
className: "emphasis",
|
|
957
|
+
contains: [],
|
|
958
|
+
variants: [{
|
|
959
|
+
begin: /\*(?![*\s])/,
|
|
960
|
+
end: /\*/
|
|
961
|
+
}, {
|
|
962
|
+
begin: /_(?![_\s])/,
|
|
963
|
+
end: /_/,
|
|
964
|
+
relevance: 0
|
|
965
|
+
}]
|
|
966
|
+
}, u = e.inherit(c, { contains: [] }), d = e.inherit(l, { contains: [] });
|
|
967
|
+
c.contains.push(d), l.contains.push(u);
|
|
968
|
+
let f = [n, s];
|
|
969
|
+
return [
|
|
970
|
+
c,
|
|
971
|
+
l,
|
|
972
|
+
u,
|
|
973
|
+
d
|
|
974
|
+
].forEach((e) => {
|
|
975
|
+
e.contains = e.contains.concat(f);
|
|
976
|
+
}), f = f.concat(c, l), {
|
|
977
|
+
name: "Markdown",
|
|
978
|
+
aliases: [
|
|
979
|
+
"md",
|
|
980
|
+
"mkdown",
|
|
981
|
+
"mkd"
|
|
982
|
+
],
|
|
983
|
+
contains: [
|
|
984
|
+
{
|
|
985
|
+
className: "section",
|
|
986
|
+
variants: [{
|
|
987
|
+
begin: "^#{1,6}",
|
|
988
|
+
end: "$",
|
|
989
|
+
contains: f
|
|
990
|
+
}, {
|
|
991
|
+
begin: "(?=^.+?\\n[=-]{2,}$)",
|
|
992
|
+
contains: [{ begin: "^[=-]*$" }, {
|
|
993
|
+
begin: "^",
|
|
994
|
+
end: "\\n",
|
|
995
|
+
contains: f
|
|
996
|
+
}]
|
|
997
|
+
}]
|
|
998
|
+
},
|
|
999
|
+
n,
|
|
1000
|
+
a,
|
|
1001
|
+
c,
|
|
1002
|
+
l,
|
|
1003
|
+
{
|
|
1004
|
+
className: "quote",
|
|
1005
|
+
begin: "^>\\s+",
|
|
1006
|
+
contains: f,
|
|
1007
|
+
end: "$"
|
|
1008
|
+
},
|
|
1009
|
+
i,
|
|
1010
|
+
r,
|
|
1011
|
+
s,
|
|
1012
|
+
o,
|
|
1013
|
+
{
|
|
1014
|
+
scope: "literal",
|
|
1015
|
+
match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/
|
|
1016
|
+
}
|
|
1017
|
+
]
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
//#endregion
|
|
1021
|
+
//#region ../../node_modules/highlight.js/es/languages/python.js
|
|
1022
|
+
function M(e) {
|
|
1023
|
+
let t = e.regex, n = /[\p{XID_Start}_]\p{XID_Continue}*/u, r = /* @__PURE__ */ "and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield".split("."), i = {
|
|
1024
|
+
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
1025
|
+
keyword: r,
|
|
1026
|
+
built_in: /* @__PURE__ */ "__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip".split("."),
|
|
1027
|
+
literal: [
|
|
1028
|
+
"__debug__",
|
|
1029
|
+
"Ellipsis",
|
|
1030
|
+
"False",
|
|
1031
|
+
"None",
|
|
1032
|
+
"NotImplemented",
|
|
1033
|
+
"True"
|
|
1034
|
+
],
|
|
1035
|
+
type: [
|
|
1036
|
+
"Any",
|
|
1037
|
+
"Callable",
|
|
1038
|
+
"Coroutine",
|
|
1039
|
+
"Dict",
|
|
1040
|
+
"List",
|
|
1041
|
+
"Literal",
|
|
1042
|
+
"Generic",
|
|
1043
|
+
"Optional",
|
|
1044
|
+
"Sequence",
|
|
1045
|
+
"Set",
|
|
1046
|
+
"Tuple",
|
|
1047
|
+
"Type",
|
|
1048
|
+
"Union"
|
|
1049
|
+
]
|
|
1050
|
+
}, a = {
|
|
1051
|
+
className: "meta",
|
|
1052
|
+
begin: /^(>>>|\.\.\.) /
|
|
1053
|
+
}, o = {
|
|
1054
|
+
className: "subst",
|
|
1055
|
+
begin: /\{/,
|
|
1056
|
+
end: /\}/,
|
|
1057
|
+
keywords: i,
|
|
1058
|
+
illegal: /#/
|
|
1059
|
+
}, s = {
|
|
1060
|
+
begin: /\{\{/,
|
|
1061
|
+
relevance: 0
|
|
1062
|
+
}, c = {
|
|
1063
|
+
className: "string",
|
|
1064
|
+
contains: [e.BACKSLASH_ESCAPE],
|
|
1065
|
+
variants: [
|
|
1066
|
+
{
|
|
1067
|
+
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
|
|
1068
|
+
end: /'''/,
|
|
1069
|
+
contains: [e.BACKSLASH_ESCAPE, a],
|
|
1070
|
+
relevance: 10
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
|
|
1074
|
+
end: /"""/,
|
|
1075
|
+
contains: [e.BACKSLASH_ESCAPE, a],
|
|
1076
|
+
relevance: 10
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
begin: /([fF][rR]|[rR][fF]|[fF])'''/,
|
|
1080
|
+
end: /'''/,
|
|
1081
|
+
contains: [
|
|
1082
|
+
e.BACKSLASH_ESCAPE,
|
|
1083
|
+
a,
|
|
1084
|
+
s,
|
|
1085
|
+
o
|
|
1086
|
+
]
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
begin: /([fF][rR]|[rR][fF]|[fF])"""/,
|
|
1090
|
+
end: /"""/,
|
|
1091
|
+
contains: [
|
|
1092
|
+
e.BACKSLASH_ESCAPE,
|
|
1093
|
+
a,
|
|
1094
|
+
s,
|
|
1095
|
+
o
|
|
1096
|
+
]
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
begin: /([uU]|[rR])'/,
|
|
1100
|
+
end: /'/,
|
|
1101
|
+
relevance: 10
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
begin: /([uU]|[rR])"/,
|
|
1105
|
+
end: /"/,
|
|
1106
|
+
relevance: 10
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
begin: /([bB]|[bB][rR]|[rR][bB])'/,
|
|
1110
|
+
end: /'/
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
begin: /([bB]|[bB][rR]|[rR][bB])"/,
|
|
1114
|
+
end: /"/
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
begin: /([fF][rR]|[rR][fF]|[fF])'/,
|
|
1118
|
+
end: /'/,
|
|
1119
|
+
contains: [
|
|
1120
|
+
e.BACKSLASH_ESCAPE,
|
|
1121
|
+
s,
|
|
1122
|
+
o
|
|
1123
|
+
]
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
begin: /([fF][rR]|[rR][fF]|[fF])"/,
|
|
1127
|
+
end: /"/,
|
|
1128
|
+
contains: [
|
|
1129
|
+
e.BACKSLASH_ESCAPE,
|
|
1130
|
+
s,
|
|
1131
|
+
o
|
|
1132
|
+
]
|
|
1133
|
+
},
|
|
1134
|
+
e.APOS_STRING_MODE,
|
|
1135
|
+
e.QUOTE_STRING_MODE
|
|
1136
|
+
]
|
|
1137
|
+
}, l = "[0-9](_?[0-9])*", u = `(\\b(${l}))?\\.(${l})|\\b(${l})\\.`, d = `\\b|${r.join("|")}`, f = {
|
|
1138
|
+
className: "number",
|
|
1139
|
+
relevance: 0,
|
|
1140
|
+
variants: [
|
|
1141
|
+
{ begin: `(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})` },
|
|
1142
|
+
{ begin: `(${u})[jJ]?` },
|
|
1143
|
+
{ begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})` },
|
|
1144
|
+
{ begin: `\\b0[bB](_?[01])+[lL]?(?=${d})` },
|
|
1145
|
+
{ begin: `\\b0[oO](_?[0-7])+[lL]?(?=${d})` },
|
|
1146
|
+
{ begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})` },
|
|
1147
|
+
{ begin: `\\b(${l})[jJ](?=${d})` }
|
|
1148
|
+
]
|
|
1149
|
+
}, p = {
|
|
1150
|
+
className: "comment",
|
|
1151
|
+
begin: t.lookahead(/# type:/),
|
|
1152
|
+
end: /$/,
|
|
1153
|
+
keywords: i,
|
|
1154
|
+
contains: [{ begin: /# type:/ }, {
|
|
1155
|
+
begin: /#/,
|
|
1156
|
+
end: /\b\B/,
|
|
1157
|
+
endsWithParent: !0
|
|
1158
|
+
}]
|
|
1159
|
+
}, m = {
|
|
1160
|
+
className: "params",
|
|
1161
|
+
variants: [{
|
|
1162
|
+
className: "",
|
|
1163
|
+
begin: /\(\s*\)/,
|
|
1164
|
+
skip: !0
|
|
1165
|
+
}, {
|
|
1166
|
+
begin: /\(/,
|
|
1167
|
+
end: /\)/,
|
|
1168
|
+
excludeBegin: !0,
|
|
1169
|
+
excludeEnd: !0,
|
|
1170
|
+
keywords: i,
|
|
1171
|
+
contains: [
|
|
1172
|
+
"self",
|
|
1173
|
+
a,
|
|
1174
|
+
f,
|
|
1175
|
+
c,
|
|
1176
|
+
e.HASH_COMMENT_MODE
|
|
1177
|
+
]
|
|
1178
|
+
}]
|
|
1179
|
+
};
|
|
1180
|
+
return o.contains = [
|
|
1181
|
+
c,
|
|
1182
|
+
f,
|
|
1183
|
+
a
|
|
1184
|
+
], {
|
|
1185
|
+
name: "Python",
|
|
1186
|
+
aliases: [
|
|
1187
|
+
"py",
|
|
1188
|
+
"gyp",
|
|
1189
|
+
"ipython"
|
|
1190
|
+
],
|
|
1191
|
+
unicodeRegex: !0,
|
|
1192
|
+
keywords: i,
|
|
1193
|
+
illegal: /(<\/|\?)|=>/,
|
|
1194
|
+
contains: [
|
|
1195
|
+
a,
|
|
1196
|
+
f,
|
|
1197
|
+
{
|
|
1198
|
+
scope: "variable.language",
|
|
1199
|
+
match: /\bself\b/
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
beginKeywords: "if",
|
|
1203
|
+
relevance: 0
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
match: /\bor\b/,
|
|
1207
|
+
scope: "keyword"
|
|
1208
|
+
},
|
|
1209
|
+
c,
|
|
1210
|
+
p,
|
|
1211
|
+
e.HASH_COMMENT_MODE,
|
|
1212
|
+
{
|
|
1213
|
+
match: [
|
|
1214
|
+
/\bdef/,
|
|
1215
|
+
/\s+/,
|
|
1216
|
+
n
|
|
1217
|
+
],
|
|
1218
|
+
scope: {
|
|
1219
|
+
1: "keyword",
|
|
1220
|
+
3: "title.function"
|
|
1221
|
+
},
|
|
1222
|
+
contains: [m]
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
variants: [{ match: [
|
|
1226
|
+
/\bclass/,
|
|
1227
|
+
/\s+/,
|
|
1228
|
+
n,
|
|
1229
|
+
/\s*/,
|
|
1230
|
+
/\(\s*/,
|
|
1231
|
+
n,
|
|
1232
|
+
/\s*\)/
|
|
1233
|
+
] }, { match: [
|
|
1234
|
+
/\bclass/,
|
|
1235
|
+
/\s+/,
|
|
1236
|
+
n
|
|
1237
|
+
] }],
|
|
1238
|
+
scope: {
|
|
1239
|
+
1: "keyword",
|
|
1240
|
+
3: "title.class",
|
|
1241
|
+
6: "title.class.inherited"
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
className: "meta",
|
|
1246
|
+
begin: /^[\t ]*@/,
|
|
1247
|
+
end: /(?=#)|$/,
|
|
1248
|
+
contains: [
|
|
1249
|
+
f,
|
|
1250
|
+
m,
|
|
1251
|
+
c
|
|
1252
|
+
]
|
|
1253
|
+
}
|
|
1254
|
+
]
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region ../../node_modules/highlight.js/es/languages/sql.js
|
|
1259
|
+
function N(e) {
|
|
1260
|
+
let t = e.regex, n = e.COMMENT("--", "$"), r = {
|
|
1261
|
+
scope: "string",
|
|
1262
|
+
variants: [{
|
|
1263
|
+
begin: /'/,
|
|
1264
|
+
end: /'/,
|
|
1265
|
+
contains: [{ match: /''/ }]
|
|
1266
|
+
}]
|
|
1267
|
+
}, i = {
|
|
1268
|
+
begin: /"/,
|
|
1269
|
+
end: /"/,
|
|
1270
|
+
contains: [{ match: /""/ }]
|
|
1271
|
+
}, a = [
|
|
1272
|
+
"true",
|
|
1273
|
+
"false",
|
|
1274
|
+
"unknown"
|
|
1275
|
+
], o = [
|
|
1276
|
+
"double precision",
|
|
1277
|
+
"large object",
|
|
1278
|
+
"with timezone",
|
|
1279
|
+
"without timezone"
|
|
1280
|
+
], s = /* @__PURE__ */ "bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary".split("."), c = [
|
|
1281
|
+
"add",
|
|
1282
|
+
"asc",
|
|
1283
|
+
"collation",
|
|
1284
|
+
"desc",
|
|
1285
|
+
"final",
|
|
1286
|
+
"first",
|
|
1287
|
+
"last",
|
|
1288
|
+
"view"
|
|
1289
|
+
], l = /* @__PURE__ */ "abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year".split("."), u = /* @__PURE__ */ "abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket".split("."), d = [
|
|
1290
|
+
"current_catalog",
|
|
1291
|
+
"current_date",
|
|
1292
|
+
"current_default_transform_group",
|
|
1293
|
+
"current_path",
|
|
1294
|
+
"current_role",
|
|
1295
|
+
"current_schema",
|
|
1296
|
+
"current_transform_group_for_type",
|
|
1297
|
+
"current_user",
|
|
1298
|
+
"session_user",
|
|
1299
|
+
"system_time",
|
|
1300
|
+
"system_user",
|
|
1301
|
+
"current_time",
|
|
1302
|
+
"localtime",
|
|
1303
|
+
"current_timestamp",
|
|
1304
|
+
"localtimestamp"
|
|
1305
|
+
], f = [
|
|
1306
|
+
"create table",
|
|
1307
|
+
"insert into",
|
|
1308
|
+
"primary key",
|
|
1309
|
+
"foreign key",
|
|
1310
|
+
"not null",
|
|
1311
|
+
"alter table",
|
|
1312
|
+
"add constraint",
|
|
1313
|
+
"grouping sets",
|
|
1314
|
+
"on overflow",
|
|
1315
|
+
"character set",
|
|
1316
|
+
"respect nulls",
|
|
1317
|
+
"ignore nulls",
|
|
1318
|
+
"nulls first",
|
|
1319
|
+
"nulls last",
|
|
1320
|
+
"depth first",
|
|
1321
|
+
"breadth first"
|
|
1322
|
+
], p = u, m = [...l, ...c].filter((e) => !u.includes(e)), h = {
|
|
1323
|
+
scope: "variable",
|
|
1324
|
+
match: /@[a-z0-9][a-z0-9_]*/
|
|
1325
|
+
}, g = {
|
|
1326
|
+
scope: "operator",
|
|
1327
|
+
match: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
1328
|
+
relevance: 0
|
|
1329
|
+
}, _ = {
|
|
1330
|
+
match: t.concat(/\b/, t.either(...p), /\s*\(/),
|
|
1331
|
+
relevance: 0,
|
|
1332
|
+
keywords: { built_in: p }
|
|
1333
|
+
};
|
|
1334
|
+
function v(e) {
|
|
1335
|
+
return t.concat(/\b/, t.either(...e.map((e) => e.replace(/\s+/, "\\s+"))), /\b/);
|
|
1336
|
+
}
|
|
1337
|
+
let y = {
|
|
1338
|
+
scope: "keyword",
|
|
1339
|
+
match: v(f),
|
|
1340
|
+
relevance: 0
|
|
1341
|
+
};
|
|
1342
|
+
function b(e, { exceptions: t, when: n } = {}) {
|
|
1343
|
+
let r = n;
|
|
1344
|
+
return t ||= [], e.map((e) => e.match(/\|\d+$/) || t.includes(e) ? e : r(e) ? `${e}|0` : e);
|
|
1345
|
+
}
|
|
1346
|
+
return {
|
|
1347
|
+
name: "SQL",
|
|
1348
|
+
case_insensitive: !0,
|
|
1349
|
+
illegal: /[{}]|<\//,
|
|
1350
|
+
keywords: {
|
|
1351
|
+
$pattern: /\b[\w\.]+/,
|
|
1352
|
+
keyword: b(m, { when: (e) => e.length < 3 }),
|
|
1353
|
+
literal: a,
|
|
1354
|
+
type: s,
|
|
1355
|
+
built_in: d
|
|
1356
|
+
},
|
|
1357
|
+
contains: [
|
|
1358
|
+
{
|
|
1359
|
+
scope: "type",
|
|
1360
|
+
match: v(o)
|
|
1361
|
+
},
|
|
1362
|
+
y,
|
|
1363
|
+
_,
|
|
1364
|
+
h,
|
|
1365
|
+
r,
|
|
1366
|
+
i,
|
|
1367
|
+
e.C_NUMBER_MODE,
|
|
1368
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
1369
|
+
n,
|
|
1370
|
+
g
|
|
1371
|
+
]
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
//#endregion
|
|
1375
|
+
//#region ../../node_modules/highlight.js/es/languages/typescript.js
|
|
1376
|
+
var P = "[A-Za-z$_][0-9A-Za-z$_]*", F = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), I = [
|
|
1377
|
+
"true",
|
|
1378
|
+
"false",
|
|
1379
|
+
"null",
|
|
1380
|
+
"undefined",
|
|
1381
|
+
"NaN",
|
|
1382
|
+
"Infinity"
|
|
1383
|
+
], L = /* @__PURE__ */ "Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly".split("."), R = [
|
|
1384
|
+
"Error",
|
|
1385
|
+
"EvalError",
|
|
1386
|
+
"InternalError",
|
|
1387
|
+
"RangeError",
|
|
1388
|
+
"ReferenceError",
|
|
1389
|
+
"SyntaxError",
|
|
1390
|
+
"TypeError",
|
|
1391
|
+
"URIError"
|
|
1392
|
+
], z = [
|
|
1393
|
+
"setInterval",
|
|
1394
|
+
"setTimeout",
|
|
1395
|
+
"clearInterval",
|
|
1396
|
+
"clearTimeout",
|
|
1397
|
+
"require",
|
|
1398
|
+
"exports",
|
|
1399
|
+
"eval",
|
|
1400
|
+
"isFinite",
|
|
1401
|
+
"isNaN",
|
|
1402
|
+
"parseFloat",
|
|
1403
|
+
"parseInt",
|
|
1404
|
+
"decodeURI",
|
|
1405
|
+
"decodeURIComponent",
|
|
1406
|
+
"encodeURI",
|
|
1407
|
+
"encodeURIComponent",
|
|
1408
|
+
"escape",
|
|
1409
|
+
"unescape"
|
|
1410
|
+
], B = [
|
|
1411
|
+
"arguments",
|
|
1412
|
+
"this",
|
|
1413
|
+
"super",
|
|
1414
|
+
"console",
|
|
1415
|
+
"window",
|
|
1416
|
+
"document",
|
|
1417
|
+
"localStorage",
|
|
1418
|
+
"sessionStorage",
|
|
1419
|
+
"module",
|
|
1420
|
+
"global"
|
|
1421
|
+
], V = [].concat(z, L, R);
|
|
1422
|
+
function H(e) {
|
|
1423
|
+
let t = e.regex, n = (e, { after: t }) => {
|
|
1424
|
+
let n = "</" + e[0].slice(1);
|
|
1425
|
+
return e.input.indexOf(n, t) !== -1;
|
|
1426
|
+
}, r = P, i = {
|
|
1427
|
+
begin: "<>",
|
|
1428
|
+
end: "</>"
|
|
1429
|
+
}, a = /<[A-Za-z0-9\\._:-]+\s*\/>/, o = {
|
|
1430
|
+
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
1431
|
+
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
1432
|
+
isTrulyOpeningTag: (e, t) => {
|
|
1433
|
+
let r = e[0].length + e.index, i = e.input[r];
|
|
1434
|
+
if (i === "<" || i === ",") {
|
|
1435
|
+
t.ignoreMatch();
|
|
1436
|
+
return;
|
|
1437
|
+
}
|
|
1438
|
+
i === ">" && (n(e, { after: r }) || t.ignoreMatch());
|
|
1439
|
+
let a, o = e.input.substring(r);
|
|
1440
|
+
if (a = o.match(/^\s*=/)) {
|
|
1441
|
+
t.ignoreMatch();
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
if ((a = o.match(/^\s+extends\s+/)) && a.index === 0) {
|
|
1445
|
+
t.ignoreMatch();
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
}, s = {
|
|
1450
|
+
$pattern: P,
|
|
1451
|
+
keyword: F,
|
|
1452
|
+
literal: I,
|
|
1453
|
+
built_in: V,
|
|
1454
|
+
"variable.language": B
|
|
1455
|
+
}, c = "[0-9](_?[0-9])*", l = `\\.(${c})`, u = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", d = {
|
|
1456
|
+
className: "number",
|
|
1457
|
+
variants: [
|
|
1458
|
+
{ begin: `(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b` },
|
|
1459
|
+
{ begin: `\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b` },
|
|
1460
|
+
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
1461
|
+
{ begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
|
|
1462
|
+
{ begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
|
|
1463
|
+
{ begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
|
|
1464
|
+
{ begin: "\\b0[0-7]+n?\\b" }
|
|
1465
|
+
],
|
|
1466
|
+
relevance: 0
|
|
1467
|
+
}, f = {
|
|
1468
|
+
className: "subst",
|
|
1469
|
+
begin: "\\$\\{",
|
|
1470
|
+
end: "\\}",
|
|
1471
|
+
keywords: s,
|
|
1472
|
+
contains: []
|
|
1473
|
+
}, p = {
|
|
1474
|
+
begin: ".?html`",
|
|
1475
|
+
end: "",
|
|
1476
|
+
starts: {
|
|
1477
|
+
end: "`",
|
|
1478
|
+
returnEnd: !1,
|
|
1479
|
+
contains: [e.BACKSLASH_ESCAPE, f],
|
|
1480
|
+
subLanguage: "xml"
|
|
1481
|
+
}
|
|
1482
|
+
}, m = {
|
|
1483
|
+
begin: ".?css`",
|
|
1484
|
+
end: "",
|
|
1485
|
+
starts: {
|
|
1486
|
+
end: "`",
|
|
1487
|
+
returnEnd: !1,
|
|
1488
|
+
contains: [e.BACKSLASH_ESCAPE, f],
|
|
1489
|
+
subLanguage: "css"
|
|
1490
|
+
}
|
|
1491
|
+
}, h = {
|
|
1492
|
+
begin: ".?gql`",
|
|
1493
|
+
end: "",
|
|
1494
|
+
starts: {
|
|
1495
|
+
end: "`",
|
|
1496
|
+
returnEnd: !1,
|
|
1497
|
+
contains: [e.BACKSLASH_ESCAPE, f],
|
|
1498
|
+
subLanguage: "graphql"
|
|
1499
|
+
}
|
|
1500
|
+
}, g = {
|
|
1501
|
+
className: "string",
|
|
1502
|
+
begin: "`",
|
|
1503
|
+
end: "`",
|
|
1504
|
+
contains: [e.BACKSLASH_ESCAPE, f]
|
|
1505
|
+
}, _ = {
|
|
1506
|
+
className: "comment",
|
|
1507
|
+
variants: [
|
|
1508
|
+
e.COMMENT(/\/\*\*(?!\/)/, "\\*/", {
|
|
1509
|
+
relevance: 0,
|
|
1510
|
+
contains: [{
|
|
1511
|
+
begin: "(?=@[A-Za-z]+)",
|
|
1512
|
+
relevance: 0,
|
|
1513
|
+
contains: [
|
|
1514
|
+
{
|
|
1515
|
+
className: "doctag",
|
|
1516
|
+
begin: "@[A-Za-z]+"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
className: "type",
|
|
1520
|
+
begin: "\\{",
|
|
1521
|
+
end: "\\}",
|
|
1522
|
+
excludeEnd: !0,
|
|
1523
|
+
excludeBegin: !0,
|
|
1524
|
+
relevance: 0
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
className: "variable",
|
|
1528
|
+
begin: r + "(?=\\s*(-)|$)",
|
|
1529
|
+
endsParent: !0,
|
|
1530
|
+
relevance: 0
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
begin: /(?=[^\n])\s/,
|
|
1534
|
+
relevance: 0
|
|
1535
|
+
}
|
|
1536
|
+
]
|
|
1537
|
+
}]
|
|
1538
|
+
}),
|
|
1539
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
1540
|
+
e.C_LINE_COMMENT_MODE
|
|
1541
|
+
]
|
|
1542
|
+
}, v = [
|
|
1543
|
+
e.APOS_STRING_MODE,
|
|
1544
|
+
e.QUOTE_STRING_MODE,
|
|
1545
|
+
p,
|
|
1546
|
+
m,
|
|
1547
|
+
h,
|
|
1548
|
+
g,
|
|
1549
|
+
{ match: /\$\d+/ },
|
|
1550
|
+
d
|
|
1551
|
+
];
|
|
1552
|
+
f.contains = v.concat({
|
|
1553
|
+
begin: /\{/,
|
|
1554
|
+
end: /\}/,
|
|
1555
|
+
keywords: s,
|
|
1556
|
+
contains: ["self"].concat(v)
|
|
1557
|
+
});
|
|
1558
|
+
let y = [].concat(_, f.contains), b = y.concat([{
|
|
1559
|
+
begin: /(\s*)\(/,
|
|
1560
|
+
end: /\)/,
|
|
1561
|
+
keywords: s,
|
|
1562
|
+
contains: ["self"].concat(y)
|
|
1563
|
+
}]), x = {
|
|
1564
|
+
className: "params",
|
|
1565
|
+
begin: /(\s*)\(/,
|
|
1566
|
+
end: /\)/,
|
|
1567
|
+
excludeBegin: !0,
|
|
1568
|
+
excludeEnd: !0,
|
|
1569
|
+
keywords: s,
|
|
1570
|
+
contains: b
|
|
1571
|
+
}, S = { variants: [{
|
|
1572
|
+
match: [
|
|
1573
|
+
/class/,
|
|
1574
|
+
/\s+/,
|
|
1575
|
+
r,
|
|
1576
|
+
/\s+/,
|
|
1577
|
+
/extends/,
|
|
1578
|
+
/\s+/,
|
|
1579
|
+
t.concat(r, "(", t.concat(/\./, r), ")*")
|
|
1580
|
+
],
|
|
1581
|
+
scope: {
|
|
1582
|
+
1: "keyword",
|
|
1583
|
+
3: "title.class",
|
|
1584
|
+
5: "keyword",
|
|
1585
|
+
7: "title.class.inherited"
|
|
1586
|
+
}
|
|
1587
|
+
}, {
|
|
1588
|
+
match: [
|
|
1589
|
+
/class/,
|
|
1590
|
+
/\s+/,
|
|
1591
|
+
r
|
|
1592
|
+
],
|
|
1593
|
+
scope: {
|
|
1594
|
+
1: "keyword",
|
|
1595
|
+
3: "title.class"
|
|
1596
|
+
}
|
|
1597
|
+
}] }, C = {
|
|
1598
|
+
relevance: 0,
|
|
1599
|
+
match: t.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
|
|
1600
|
+
className: "title.class",
|
|
1601
|
+
keywords: { _: [...L, ...R] }
|
|
1602
|
+
}, w = {
|
|
1603
|
+
label: "use_strict",
|
|
1604
|
+
className: "meta",
|
|
1605
|
+
relevance: 10,
|
|
1606
|
+
begin: /^\s*['"]use (strict|asm)['"]/
|
|
1607
|
+
}, T = {
|
|
1608
|
+
variants: [{ match: [
|
|
1609
|
+
/function/,
|
|
1610
|
+
/\s+/,
|
|
1611
|
+
r,
|
|
1612
|
+
/(?=\s*\()/
|
|
1613
|
+
] }, { match: [/function/, /\s*(?=\()/] }],
|
|
1614
|
+
className: {
|
|
1615
|
+
1: "keyword",
|
|
1616
|
+
3: "title.function"
|
|
1617
|
+
},
|
|
1618
|
+
label: "func.def",
|
|
1619
|
+
contains: [x],
|
|
1620
|
+
illegal: /%/
|
|
1621
|
+
}, E = {
|
|
1622
|
+
relevance: 0,
|
|
1623
|
+
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
1624
|
+
className: "variable.constant"
|
|
1625
|
+
};
|
|
1626
|
+
function D(e) {
|
|
1627
|
+
return t.concat("(?!", e.join("|"), ")");
|
|
1628
|
+
}
|
|
1629
|
+
let O = {
|
|
1630
|
+
match: t.concat(/\b/, D([
|
|
1631
|
+
...z,
|
|
1632
|
+
"super",
|
|
1633
|
+
"import",
|
|
1634
|
+
"await"
|
|
1635
|
+
].map((e) => `${e}\\s*\\(`)), r, t.lookahead(/\s*\(/)),
|
|
1636
|
+
className: "title.function",
|
|
1637
|
+
relevance: 0
|
|
1638
|
+
}, k = {
|
|
1639
|
+
begin: t.concat(/\./, t.lookahead(t.concat(r, /(?![0-9A-Za-z$_(])/))),
|
|
1640
|
+
end: r,
|
|
1641
|
+
excludeBegin: !0,
|
|
1642
|
+
keywords: "prototype",
|
|
1643
|
+
className: "property",
|
|
1644
|
+
relevance: 0
|
|
1645
|
+
}, A = {
|
|
1646
|
+
match: [
|
|
1647
|
+
/get|set/,
|
|
1648
|
+
/\s+/,
|
|
1649
|
+
r,
|
|
1650
|
+
/(?=\()/
|
|
1651
|
+
],
|
|
1652
|
+
className: {
|
|
1653
|
+
1: "keyword",
|
|
1654
|
+
3: "title.function"
|
|
1655
|
+
},
|
|
1656
|
+
contains: [{ begin: /\(\)/ }, x]
|
|
1657
|
+
}, j = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", M = {
|
|
1658
|
+
match: [
|
|
1659
|
+
/const|var|let/,
|
|
1660
|
+
/\s+/,
|
|
1661
|
+
r,
|
|
1662
|
+
/\s*/,
|
|
1663
|
+
/=\s*/,
|
|
1664
|
+
/(async\s*)?/,
|
|
1665
|
+
t.lookahead(j)
|
|
1666
|
+
],
|
|
1667
|
+
keywords: "async",
|
|
1668
|
+
className: {
|
|
1669
|
+
1: "keyword",
|
|
1670
|
+
3: "title.function"
|
|
1671
|
+
},
|
|
1672
|
+
contains: [x]
|
|
1673
|
+
};
|
|
1674
|
+
return {
|
|
1675
|
+
name: "JavaScript",
|
|
1676
|
+
aliases: [
|
|
1677
|
+
"js",
|
|
1678
|
+
"jsx",
|
|
1679
|
+
"mjs",
|
|
1680
|
+
"cjs"
|
|
1681
|
+
],
|
|
1682
|
+
keywords: s,
|
|
1683
|
+
exports: {
|
|
1684
|
+
PARAMS_CONTAINS: b,
|
|
1685
|
+
CLASS_REFERENCE: C
|
|
1686
|
+
},
|
|
1687
|
+
illegal: /#(?![$_A-Za-z])/,
|
|
1688
|
+
contains: [
|
|
1689
|
+
e.SHEBANG({
|
|
1690
|
+
label: "shebang",
|
|
1691
|
+
binary: "node",
|
|
1692
|
+
relevance: 5
|
|
1693
|
+
}),
|
|
1694
|
+
w,
|
|
1695
|
+
e.APOS_STRING_MODE,
|
|
1696
|
+
e.QUOTE_STRING_MODE,
|
|
1697
|
+
p,
|
|
1698
|
+
m,
|
|
1699
|
+
h,
|
|
1700
|
+
g,
|
|
1701
|
+
_,
|
|
1702
|
+
{ match: /\$\d+/ },
|
|
1703
|
+
d,
|
|
1704
|
+
C,
|
|
1705
|
+
{
|
|
1706
|
+
scope: "attr",
|
|
1707
|
+
match: r + t.lookahead(":"),
|
|
1708
|
+
relevance: 0
|
|
1709
|
+
},
|
|
1710
|
+
M,
|
|
1711
|
+
{
|
|
1712
|
+
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
1713
|
+
keywords: "return throw case",
|
|
1714
|
+
relevance: 0,
|
|
1715
|
+
contains: [
|
|
1716
|
+
_,
|
|
1717
|
+
e.REGEXP_MODE,
|
|
1718
|
+
{
|
|
1719
|
+
className: "function",
|
|
1720
|
+
begin: j,
|
|
1721
|
+
returnBegin: !0,
|
|
1722
|
+
end: "\\s*=>",
|
|
1723
|
+
contains: [{
|
|
1724
|
+
className: "params",
|
|
1725
|
+
variants: [
|
|
1726
|
+
{
|
|
1727
|
+
begin: e.UNDERSCORE_IDENT_RE,
|
|
1728
|
+
relevance: 0
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
className: null,
|
|
1732
|
+
begin: /\(\s*\)/,
|
|
1733
|
+
skip: !0
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
begin: /(\s*)\(/,
|
|
1737
|
+
end: /\)/,
|
|
1738
|
+
excludeBegin: !0,
|
|
1739
|
+
excludeEnd: !0,
|
|
1740
|
+
keywords: s,
|
|
1741
|
+
contains: b
|
|
1742
|
+
}
|
|
1743
|
+
]
|
|
1744
|
+
}]
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
begin: /,/,
|
|
1748
|
+
relevance: 0
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
match: /\s+/,
|
|
1752
|
+
relevance: 0
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
variants: [
|
|
1756
|
+
{
|
|
1757
|
+
begin: i.begin,
|
|
1758
|
+
end: i.end
|
|
1759
|
+
},
|
|
1760
|
+
{ match: a },
|
|
1761
|
+
{
|
|
1762
|
+
begin: o.begin,
|
|
1763
|
+
"on:begin": o.isTrulyOpeningTag,
|
|
1764
|
+
end: o.end
|
|
1765
|
+
}
|
|
1766
|
+
],
|
|
1767
|
+
subLanguage: "xml",
|
|
1768
|
+
contains: [{
|
|
1769
|
+
begin: o.begin,
|
|
1770
|
+
end: o.end,
|
|
1771
|
+
skip: !0,
|
|
1772
|
+
contains: ["self"]
|
|
1773
|
+
}]
|
|
1774
|
+
}
|
|
1775
|
+
]
|
|
1776
|
+
},
|
|
1777
|
+
T,
|
|
1778
|
+
{ beginKeywords: "while if switch catch for" },
|
|
1779
|
+
{
|
|
1780
|
+
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
1781
|
+
returnBegin: !0,
|
|
1782
|
+
label: "func.def",
|
|
1783
|
+
contains: [x, e.inherit(e.TITLE_MODE, {
|
|
1784
|
+
begin: r,
|
|
1785
|
+
className: "title.function"
|
|
1786
|
+
})]
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
match: /\.\.\./,
|
|
1790
|
+
relevance: 0
|
|
1791
|
+
},
|
|
1792
|
+
k,
|
|
1793
|
+
{
|
|
1794
|
+
match: "\\$" + r,
|
|
1795
|
+
relevance: 0
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
match: [/\bconstructor(?=\s*\()/],
|
|
1799
|
+
className: { 1: "title.function" },
|
|
1800
|
+
contains: [x]
|
|
1801
|
+
},
|
|
1802
|
+
O,
|
|
1803
|
+
E,
|
|
1804
|
+
S,
|
|
1805
|
+
A,
|
|
1806
|
+
{ match: /\$[(.]/ }
|
|
1807
|
+
]
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
function ee(e) {
|
|
1811
|
+
let t = e.regex, n = H(e), r = P, i = [
|
|
1812
|
+
"any",
|
|
1813
|
+
"void",
|
|
1814
|
+
"number",
|
|
1815
|
+
"boolean",
|
|
1816
|
+
"string",
|
|
1817
|
+
"object",
|
|
1818
|
+
"never",
|
|
1819
|
+
"symbol",
|
|
1820
|
+
"bigint",
|
|
1821
|
+
"unknown"
|
|
1822
|
+
], a = {
|
|
1823
|
+
begin: [
|
|
1824
|
+
/namespace/,
|
|
1825
|
+
/\s+/,
|
|
1826
|
+
e.IDENT_RE
|
|
1827
|
+
],
|
|
1828
|
+
beginScope: {
|
|
1829
|
+
1: "keyword",
|
|
1830
|
+
3: "title.class"
|
|
1831
|
+
}
|
|
1832
|
+
}, o = {
|
|
1833
|
+
beginKeywords: "interface",
|
|
1834
|
+
end: /\{/,
|
|
1835
|
+
excludeEnd: !0,
|
|
1836
|
+
keywords: {
|
|
1837
|
+
keyword: "interface extends",
|
|
1838
|
+
built_in: i
|
|
1839
|
+
},
|
|
1840
|
+
contains: [n.exports.CLASS_REFERENCE]
|
|
1841
|
+
}, s = {
|
|
1842
|
+
className: "meta",
|
|
1843
|
+
relevance: 10,
|
|
1844
|
+
begin: /^\s*['"]use strict['"]/
|
|
1845
|
+
}, c = {
|
|
1846
|
+
$pattern: P,
|
|
1847
|
+
keyword: F.concat([
|
|
1848
|
+
"type",
|
|
1849
|
+
"interface",
|
|
1850
|
+
"public",
|
|
1851
|
+
"private",
|
|
1852
|
+
"protected",
|
|
1853
|
+
"implements",
|
|
1854
|
+
"declare",
|
|
1855
|
+
"abstract",
|
|
1856
|
+
"readonly",
|
|
1857
|
+
"enum",
|
|
1858
|
+
"override",
|
|
1859
|
+
"satisfies"
|
|
1860
|
+
]),
|
|
1861
|
+
literal: I,
|
|
1862
|
+
built_in: V.concat(i),
|
|
1863
|
+
"variable.language": B
|
|
1864
|
+
}, l = {
|
|
1865
|
+
className: "meta",
|
|
1866
|
+
begin: "@" + r
|
|
1867
|
+
}, u = (e, t, n) => {
|
|
1868
|
+
let r = e.contains.findIndex((e) => e.label === t);
|
|
1869
|
+
if (r === -1) throw Error("can not find mode to replace");
|
|
1870
|
+
e.contains.splice(r, 1, n);
|
|
1871
|
+
};
|
|
1872
|
+
Object.assign(n.keywords, c), n.exports.PARAMS_CONTAINS.push(l);
|
|
1873
|
+
let d = n.contains.find((e) => e.scope === "attr"), f = Object.assign({}, d, { match: t.concat(r, t.lookahead(/\s*\?:/)) });
|
|
1874
|
+
n.exports.PARAMS_CONTAINS.push([
|
|
1875
|
+
n.exports.CLASS_REFERENCE,
|
|
1876
|
+
d,
|
|
1877
|
+
f
|
|
1878
|
+
]), n.contains = n.contains.concat([
|
|
1879
|
+
l,
|
|
1880
|
+
a,
|
|
1881
|
+
o,
|
|
1882
|
+
f
|
|
1883
|
+
]), u(n, "shebang", e.SHEBANG()), u(n, "use_strict", s);
|
|
1884
|
+
let p = n.contains.find((e) => e.label === "func.def");
|
|
1885
|
+
return p.relevance = 0, Object.assign(n, {
|
|
1886
|
+
name: "TypeScript",
|
|
1887
|
+
aliases: [
|
|
1888
|
+
"ts",
|
|
1889
|
+
"tsx",
|
|
1890
|
+
"mts",
|
|
1891
|
+
"cts"
|
|
1892
|
+
]
|
|
1893
|
+
}), n;
|
|
1894
|
+
}
|
|
1895
|
+
//#endregion
|
|
1896
|
+
//#region ../../node_modules/highlight.js/es/languages/xml.js
|
|
1897
|
+
function te(e) {
|
|
1898
|
+
let t = e.regex, n = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, i = {
|
|
1899
|
+
className: "symbol",
|
|
1900
|
+
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1901
|
+
}, a = {
|
|
1902
|
+
begin: /\s/,
|
|
1903
|
+
contains: [{
|
|
1904
|
+
className: "keyword",
|
|
1905
|
+
begin: /#?[a-z_][a-z1-9_-]+/,
|
|
1906
|
+
illegal: /\n/
|
|
1907
|
+
}]
|
|
1908
|
+
}, o = e.inherit(a, {
|
|
1909
|
+
begin: /\(/,
|
|
1910
|
+
end: /\)/
|
|
1911
|
+
}), s = e.inherit(e.APOS_STRING_MODE, { className: "string" }), c = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), l = {
|
|
1912
|
+
endsWithParent: !0,
|
|
1913
|
+
illegal: /</,
|
|
1914
|
+
relevance: 0,
|
|
1915
|
+
contains: [{
|
|
1916
|
+
className: "attr",
|
|
1917
|
+
begin: r,
|
|
1918
|
+
relevance: 0
|
|
1919
|
+
}, {
|
|
1920
|
+
begin: /=\s*/,
|
|
1921
|
+
relevance: 0,
|
|
1922
|
+
contains: [{
|
|
1923
|
+
className: "string",
|
|
1924
|
+
endsParent: !0,
|
|
1925
|
+
variants: [
|
|
1926
|
+
{
|
|
1927
|
+
begin: /"/,
|
|
1928
|
+
end: /"/,
|
|
1929
|
+
contains: [i]
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
begin: /'/,
|
|
1933
|
+
end: /'/,
|
|
1934
|
+
contains: [i]
|
|
1935
|
+
},
|
|
1936
|
+
{ begin: /[^\s"'=<>`]+/ }
|
|
1937
|
+
]
|
|
1938
|
+
}]
|
|
1939
|
+
}]
|
|
1940
|
+
};
|
|
1941
|
+
return {
|
|
1942
|
+
name: "HTML, XML",
|
|
1943
|
+
aliases: [
|
|
1944
|
+
"html",
|
|
1945
|
+
"xhtml",
|
|
1946
|
+
"rss",
|
|
1947
|
+
"atom",
|
|
1948
|
+
"xjb",
|
|
1949
|
+
"xsd",
|
|
1950
|
+
"xsl",
|
|
1951
|
+
"plist",
|
|
1952
|
+
"wsf",
|
|
1953
|
+
"svg"
|
|
1954
|
+
],
|
|
1955
|
+
case_insensitive: !0,
|
|
1956
|
+
unicodeRegex: !0,
|
|
1957
|
+
contains: [
|
|
1958
|
+
{
|
|
1959
|
+
className: "meta",
|
|
1960
|
+
begin: /<![a-z]/,
|
|
1961
|
+
end: />/,
|
|
1962
|
+
relevance: 10,
|
|
1963
|
+
contains: [
|
|
1964
|
+
a,
|
|
1965
|
+
c,
|
|
1966
|
+
s,
|
|
1967
|
+
o,
|
|
1968
|
+
{
|
|
1969
|
+
begin: /\[/,
|
|
1970
|
+
end: /\]/,
|
|
1971
|
+
contains: [{
|
|
1972
|
+
className: "meta",
|
|
1973
|
+
begin: /<![a-z]/,
|
|
1974
|
+
end: />/,
|
|
1975
|
+
contains: [
|
|
1976
|
+
a,
|
|
1977
|
+
o,
|
|
1978
|
+
c,
|
|
1979
|
+
s
|
|
1980
|
+
]
|
|
1981
|
+
}]
|
|
1982
|
+
}
|
|
1983
|
+
]
|
|
1984
|
+
},
|
|
1985
|
+
e.COMMENT(/<!--/, /-->/, { relevance: 10 }),
|
|
1986
|
+
{
|
|
1987
|
+
begin: /<!\[CDATA\[/,
|
|
1988
|
+
end: /\]\]>/,
|
|
1989
|
+
relevance: 10
|
|
1990
|
+
},
|
|
1991
|
+
i,
|
|
1992
|
+
{
|
|
1993
|
+
className: "meta",
|
|
1994
|
+
end: /\?>/,
|
|
1995
|
+
variants: [{
|
|
1996
|
+
begin: /<\?xml/,
|
|
1997
|
+
relevance: 10,
|
|
1998
|
+
contains: [c]
|
|
1999
|
+
}, { begin: /<\?[a-z][a-z0-9]+/ }]
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
className: "tag",
|
|
2003
|
+
begin: /<style(?=\s|>)/,
|
|
2004
|
+
end: />/,
|
|
2005
|
+
keywords: { name: "style" },
|
|
2006
|
+
contains: [l],
|
|
2007
|
+
starts: {
|
|
2008
|
+
end: /<\/style>/,
|
|
2009
|
+
returnEnd: !0,
|
|
2010
|
+
subLanguage: ["css", "xml"]
|
|
2011
|
+
}
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
className: "tag",
|
|
2015
|
+
begin: /<script(?=\s|>)/,
|
|
2016
|
+
end: />/,
|
|
2017
|
+
keywords: { name: "script" },
|
|
2018
|
+
contains: [l],
|
|
2019
|
+
starts: {
|
|
2020
|
+
end: /<\/script>/,
|
|
2021
|
+
returnEnd: !0,
|
|
2022
|
+
subLanguage: [
|
|
2023
|
+
"javascript",
|
|
2024
|
+
"handlebars",
|
|
2025
|
+
"xml"
|
|
2026
|
+
]
|
|
2027
|
+
}
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
className: "tag",
|
|
2031
|
+
begin: /<>|<\/>/
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
className: "tag",
|
|
2035
|
+
begin: t.concat(/</, t.lookahead(t.concat(n, t.either(/\/>/, />/, /\s/)))),
|
|
2036
|
+
end: /\/?>/,
|
|
2037
|
+
contains: [{
|
|
2038
|
+
className: "name",
|
|
2039
|
+
begin: n,
|
|
2040
|
+
relevance: 0,
|
|
2041
|
+
starts: l
|
|
2042
|
+
}]
|
|
2043
|
+
},
|
|
2044
|
+
{
|
|
2045
|
+
className: "tag",
|
|
2046
|
+
begin: t.concat(/<\//, t.lookahead(t.concat(n, />/))),
|
|
2047
|
+
contains: [{
|
|
2048
|
+
className: "name",
|
|
2049
|
+
begin: n,
|
|
2050
|
+
relevance: 0
|
|
2051
|
+
}, {
|
|
2052
|
+
begin: />/,
|
|
2053
|
+
relevance: 0,
|
|
2054
|
+
endsParent: !0
|
|
2055
|
+
}]
|
|
2056
|
+
}
|
|
2057
|
+
]
|
|
2058
|
+
};
|
|
2059
|
+
}
|
|
2060
|
+
//#endregion
|
|
2061
|
+
//#region ../../node_modules/highlight.js/es/languages/yaml.js
|
|
2062
|
+
function ne(e) {
|
|
2063
|
+
let t = "true false yes no null", n = "[\\w#;/?:@&=+$,.~*'()[\\]]+", r = {
|
|
2064
|
+
className: "attr",
|
|
2065
|
+
variants: [
|
|
2066
|
+
{ begin: /[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/ },
|
|
2067
|
+
{ begin: /"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/ },
|
|
2068
|
+
{ begin: /'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/ }
|
|
2069
|
+
]
|
|
2070
|
+
}, i = {
|
|
2071
|
+
className: "template-variable",
|
|
2072
|
+
variants: [{
|
|
2073
|
+
begin: /\{\{/,
|
|
2074
|
+
end: /\}\}/
|
|
2075
|
+
}, {
|
|
2076
|
+
begin: /%\{/,
|
|
2077
|
+
end: /\}/
|
|
2078
|
+
}]
|
|
2079
|
+
}, a = {
|
|
2080
|
+
className: "string",
|
|
2081
|
+
relevance: 0,
|
|
2082
|
+
begin: /'/,
|
|
2083
|
+
end: /'/,
|
|
2084
|
+
contains: [{
|
|
2085
|
+
match: /''/,
|
|
2086
|
+
scope: "char.escape",
|
|
2087
|
+
relevance: 0
|
|
2088
|
+
}]
|
|
2089
|
+
}, o = {
|
|
2090
|
+
className: "string",
|
|
2091
|
+
relevance: 0,
|
|
2092
|
+
variants: [{
|
|
2093
|
+
begin: /"/,
|
|
2094
|
+
end: /"/
|
|
2095
|
+
}, { begin: /\S+/ }],
|
|
2096
|
+
contains: [e.BACKSLASH_ESCAPE, i]
|
|
2097
|
+
}, s = e.inherit(o, { variants: [
|
|
2098
|
+
{
|
|
2099
|
+
begin: /'/,
|
|
2100
|
+
end: /'/,
|
|
2101
|
+
contains: [{
|
|
2102
|
+
begin: /''/,
|
|
2103
|
+
relevance: 0
|
|
2104
|
+
}]
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
begin: /"/,
|
|
2108
|
+
end: /"/
|
|
2109
|
+
},
|
|
2110
|
+
{ begin: /[^\s,{}[\]]+/ }
|
|
2111
|
+
] }), c = {
|
|
2112
|
+
className: "number",
|
|
2113
|
+
begin: "\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"
|
|
2114
|
+
}, l = {
|
|
2115
|
+
end: ",",
|
|
2116
|
+
endsWithParent: !0,
|
|
2117
|
+
excludeEnd: !0,
|
|
2118
|
+
keywords: t,
|
|
2119
|
+
relevance: 0
|
|
2120
|
+
}, u = {
|
|
2121
|
+
begin: /\{/,
|
|
2122
|
+
end: /\}/,
|
|
2123
|
+
contains: [l],
|
|
2124
|
+
illegal: "\\n",
|
|
2125
|
+
relevance: 0
|
|
2126
|
+
}, d = {
|
|
2127
|
+
begin: "\\[",
|
|
2128
|
+
end: "\\]",
|
|
2129
|
+
contains: [l],
|
|
2130
|
+
illegal: "\\n",
|
|
2131
|
+
relevance: 0
|
|
2132
|
+
}, f = [
|
|
2133
|
+
r,
|
|
2134
|
+
{
|
|
2135
|
+
className: "meta",
|
|
2136
|
+
begin: "^---\\s*$",
|
|
2137
|
+
relevance: 10
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
className: "string",
|
|
2141
|
+
begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
begin: "<%[%=-]?",
|
|
2145
|
+
end: "[%-]?%>",
|
|
2146
|
+
subLanguage: "ruby",
|
|
2147
|
+
excludeBegin: !0,
|
|
2148
|
+
excludeEnd: !0,
|
|
2149
|
+
relevance: 0
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
className: "type",
|
|
2153
|
+
begin: "!\\w+!" + n
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
className: "type",
|
|
2157
|
+
begin: "!<" + n + ">"
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
className: "type",
|
|
2161
|
+
begin: "!" + n
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
className: "type",
|
|
2165
|
+
begin: "!!" + n
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
className: "meta",
|
|
2169
|
+
begin: "&" + e.UNDERSCORE_IDENT_RE + "$"
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
className: "meta",
|
|
2173
|
+
begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$"
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
className: "bullet",
|
|
2177
|
+
begin: "-(?=[ ]|$)",
|
|
2178
|
+
relevance: 0
|
|
2179
|
+
},
|
|
2180
|
+
e.HASH_COMMENT_MODE,
|
|
2181
|
+
{
|
|
2182
|
+
beginKeywords: t,
|
|
2183
|
+
keywords: { literal: t }
|
|
2184
|
+
},
|
|
2185
|
+
c,
|
|
2186
|
+
{
|
|
2187
|
+
className: "number",
|
|
2188
|
+
begin: e.C_NUMBER_RE + "\\b",
|
|
2189
|
+
relevance: 0
|
|
2190
|
+
},
|
|
2191
|
+
u,
|
|
2192
|
+
d,
|
|
2193
|
+
a,
|
|
2194
|
+
o
|
|
2195
|
+
], p = [...f];
|
|
2196
|
+
return p.pop(), p.push(s), l.contains = p, {
|
|
2197
|
+
name: "YAML",
|
|
2198
|
+
case_insensitive: !0,
|
|
2199
|
+
aliases: ["yml"],
|
|
2200
|
+
contains: f
|
|
2201
|
+
};
|
|
2202
|
+
}
|
|
2203
|
+
var U = (/* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
2204
|
+
function n(e) {
|
|
2205
|
+
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
2206
|
+
throw Error("map is read-only");
|
|
2207
|
+
} : e instanceof Set && (e.add = e.clear = e.delete = function() {
|
|
2208
|
+
throw Error("set is read-only");
|
|
2209
|
+
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((t) => {
|
|
2210
|
+
let r = e[t], i = typeof r;
|
|
2211
|
+
(i === "object" || i === "function") && !Object.isFrozen(r) && n(r);
|
|
2212
|
+
}), e;
|
|
2213
|
+
}
|
|
2214
|
+
var r = class {
|
|
2215
|
+
constructor(e) {
|
|
2216
|
+
e.data === void 0 && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1;
|
|
2217
|
+
}
|
|
2218
|
+
ignoreMatch() {
|
|
2219
|
+
this.isMatchIgnored = !0;
|
|
2220
|
+
}
|
|
2221
|
+
};
|
|
2222
|
+
function i(e) {
|
|
2223
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2224
|
+
}
|
|
2225
|
+
function a(e, ...t) {
|
|
2226
|
+
let n = Object.create(null);
|
|
2227
|
+
for (let t in e) n[t] = e[t];
|
|
2228
|
+
return t.forEach(function(e) {
|
|
2229
|
+
for (let t in e) n[t] = e[t];
|
|
2230
|
+
}), n;
|
|
2231
|
+
}
|
|
2232
|
+
var o = "</span>", s = (e) => !!e.scope, c = (e, { prefix: t }) => {
|
|
2233
|
+
if (e.startsWith("language:")) return e.replace("language:", "language-");
|
|
2234
|
+
if (e.includes(".")) {
|
|
2235
|
+
let n = e.split(".");
|
|
2236
|
+
return [`${t}${n.shift()}`, ...n.map((e, t) => `${e}${"_".repeat(t + 1)}`)].join(" ");
|
|
2237
|
+
}
|
|
2238
|
+
return `${t}${e}`;
|
|
2239
|
+
}, l = class {
|
|
2240
|
+
constructor(e, t) {
|
|
2241
|
+
this.buffer = "", this.classPrefix = t.classPrefix, e.walk(this);
|
|
2242
|
+
}
|
|
2243
|
+
addText(e) {
|
|
2244
|
+
this.buffer += i(e);
|
|
2245
|
+
}
|
|
2246
|
+
openNode(e) {
|
|
2247
|
+
if (!s(e)) return;
|
|
2248
|
+
let t = c(e.scope, { prefix: this.classPrefix });
|
|
2249
|
+
this.span(t);
|
|
2250
|
+
}
|
|
2251
|
+
closeNode(e) {
|
|
2252
|
+
s(e) && (this.buffer += o);
|
|
2253
|
+
}
|
|
2254
|
+
value() {
|
|
2255
|
+
return this.buffer;
|
|
2256
|
+
}
|
|
2257
|
+
span(e) {
|
|
2258
|
+
this.buffer += `<span class="${e}">`;
|
|
2259
|
+
}
|
|
2260
|
+
}, u = (e = {}) => {
|
|
2261
|
+
let t = { children: [] };
|
|
2262
|
+
return Object.assign(t, e), t;
|
|
2263
|
+
}, d = class e {
|
|
2264
|
+
constructor() {
|
|
2265
|
+
this.rootNode = u(), this.stack = [this.rootNode];
|
|
2266
|
+
}
|
|
2267
|
+
get top() {
|
|
2268
|
+
return this.stack[this.stack.length - 1];
|
|
2269
|
+
}
|
|
2270
|
+
get root() {
|
|
2271
|
+
return this.rootNode;
|
|
2272
|
+
}
|
|
2273
|
+
add(e) {
|
|
2274
|
+
this.top.children.push(e);
|
|
2275
|
+
}
|
|
2276
|
+
openNode(e) {
|
|
2277
|
+
let t = u({ scope: e });
|
|
2278
|
+
this.add(t), this.stack.push(t);
|
|
2279
|
+
}
|
|
2280
|
+
closeNode() {
|
|
2281
|
+
if (this.stack.length > 1) return this.stack.pop();
|
|
2282
|
+
}
|
|
2283
|
+
closeAllNodes() {
|
|
2284
|
+
for (; this.closeNode(););
|
|
2285
|
+
}
|
|
2286
|
+
toJSON() {
|
|
2287
|
+
return JSON.stringify(this.rootNode, null, 4);
|
|
2288
|
+
}
|
|
2289
|
+
walk(e) {
|
|
2290
|
+
return this.constructor._walk(e, this.rootNode);
|
|
2291
|
+
}
|
|
2292
|
+
static _walk(e, t) {
|
|
2293
|
+
return typeof t == "string" ? e.addText(t) : t.children && (e.openNode(t), t.children.forEach((t) => this._walk(e, t)), e.closeNode(t)), e;
|
|
2294
|
+
}
|
|
2295
|
+
static _collapse(t) {
|
|
2296
|
+
typeof t != "string" && t.children && (t.children.every((e) => typeof e == "string") ? t.children = [t.children.join("")] : t.children.forEach((t) => {
|
|
2297
|
+
e._collapse(t);
|
|
2298
|
+
}));
|
|
2299
|
+
}
|
|
2300
|
+
}, f = class extends d {
|
|
2301
|
+
constructor(e) {
|
|
2302
|
+
super(), this.options = e;
|
|
2303
|
+
}
|
|
2304
|
+
addText(e) {
|
|
2305
|
+
e !== "" && this.add(e);
|
|
2306
|
+
}
|
|
2307
|
+
startScope(e) {
|
|
2308
|
+
this.openNode(e);
|
|
2309
|
+
}
|
|
2310
|
+
endScope() {
|
|
2311
|
+
this.closeNode();
|
|
2312
|
+
}
|
|
2313
|
+
__addSublanguage(e, t) {
|
|
2314
|
+
let n = e.root;
|
|
2315
|
+
t && (n.scope = `language:${t}`), this.add(n);
|
|
2316
|
+
}
|
|
2317
|
+
toHTML() {
|
|
2318
|
+
return new l(this, this.options).value();
|
|
2319
|
+
}
|
|
2320
|
+
finalize() {
|
|
2321
|
+
return this.closeAllNodes(), !0;
|
|
2322
|
+
}
|
|
2323
|
+
};
|
|
2324
|
+
function p(e) {
|
|
2325
|
+
return e ? typeof e == "string" ? e : e.source : null;
|
|
2326
|
+
}
|
|
2327
|
+
function m(e) {
|
|
2328
|
+
return _("(?=", e, ")");
|
|
2329
|
+
}
|
|
2330
|
+
function h(e) {
|
|
2331
|
+
return _("(?:", e, ")*");
|
|
2332
|
+
}
|
|
2333
|
+
function g(e) {
|
|
2334
|
+
return _("(?:", e, ")?");
|
|
2335
|
+
}
|
|
2336
|
+
function _(...e) {
|
|
2337
|
+
return e.map((e) => p(e)).join("");
|
|
2338
|
+
}
|
|
2339
|
+
function v(e) {
|
|
2340
|
+
let t = e[e.length - 1];
|
|
2341
|
+
return typeof t == "object" && t.constructor === Object ? (e.splice(e.length - 1, 1), t) : {};
|
|
2342
|
+
}
|
|
2343
|
+
function y(...e) {
|
|
2344
|
+
return "(" + (v(e).capture ? "" : "?:") + e.map((e) => p(e)).join("|") + ")";
|
|
2345
|
+
}
|
|
2346
|
+
function b(e) {
|
|
2347
|
+
return RegExp(e.toString() + "|").exec("").length - 1;
|
|
2348
|
+
}
|
|
2349
|
+
function x(e, t) {
|
|
2350
|
+
let n = e && e.exec(t);
|
|
2351
|
+
return n && n.index === 0;
|
|
2352
|
+
}
|
|
2353
|
+
var S = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
2354
|
+
function C(e, { joinWith: t }) {
|
|
2355
|
+
let n = 0;
|
|
2356
|
+
return e.map((e) => {
|
|
2357
|
+
n += 1;
|
|
2358
|
+
let t = n, r = p(e), i = "";
|
|
2359
|
+
for (; r.length > 0;) {
|
|
2360
|
+
let e = S.exec(r);
|
|
2361
|
+
if (!e) {
|
|
2362
|
+
i += r;
|
|
2363
|
+
break;
|
|
2364
|
+
}
|
|
2365
|
+
i += r.substring(0, e.index), r = r.substring(e.index + e[0].length), e[0][0] === "\\" && e[1] ? i += "\\" + String(Number(e[1]) + t) : (i += e[0], e[0] === "(" && n++);
|
|
2366
|
+
}
|
|
2367
|
+
return i;
|
|
2368
|
+
}).map((e) => `(${e})`).join(t);
|
|
2369
|
+
}
|
|
2370
|
+
var w = /\b\B/, T = "[a-zA-Z]\\w*", E = "[a-zA-Z_]\\w*", D = "\\b\\d+(\\.\\d+)?", O = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", k = "\\b(0b[01]+)", A = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", j = (e = {}) => {
|
|
2371
|
+
let t = /^#![ ]*\//;
|
|
2372
|
+
return e.binary && (e.begin = _(t, /.*\b/, e.binary, /\b.*/)), a({
|
|
2373
|
+
scope: "meta",
|
|
2374
|
+
begin: t,
|
|
2375
|
+
end: /$/,
|
|
2376
|
+
relevance: 0,
|
|
2377
|
+
"on:begin": (e, t) => {
|
|
2378
|
+
e.index !== 0 && t.ignoreMatch();
|
|
2379
|
+
}
|
|
2380
|
+
}, e);
|
|
2381
|
+
}, M = {
|
|
2382
|
+
begin: "\\\\[\\s\\S]",
|
|
2383
|
+
relevance: 0
|
|
2384
|
+
}, N = {
|
|
2385
|
+
scope: "string",
|
|
2386
|
+
begin: "'",
|
|
2387
|
+
end: "'",
|
|
2388
|
+
illegal: "\\n",
|
|
2389
|
+
contains: [M]
|
|
2390
|
+
}, P = {
|
|
2391
|
+
scope: "string",
|
|
2392
|
+
begin: "\"",
|
|
2393
|
+
end: "\"",
|
|
2394
|
+
illegal: "\\n",
|
|
2395
|
+
contains: [M]
|
|
2396
|
+
}, F = { 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/ }, I = function(e, t, n = {}) {
|
|
2397
|
+
let r = a({
|
|
2398
|
+
scope: "comment",
|
|
2399
|
+
begin: e,
|
|
2400
|
+
end: t,
|
|
2401
|
+
contains: []
|
|
2402
|
+
}, n);
|
|
2403
|
+
r.contains.push({
|
|
2404
|
+
scope: "doctag",
|
|
2405
|
+
begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
|
|
2406
|
+
end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
|
|
2407
|
+
excludeBegin: !0,
|
|
2408
|
+
relevance: 0
|
|
2409
|
+
});
|
|
2410
|
+
let i = y("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
|
|
2411
|
+
return r.contains.push({ begin: _(/[ ]+/, "(", i, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), r;
|
|
2412
|
+
}, L = I("//", "$"), R = I("/\\*", "\\*/"), z = I("#", "$"), B = /*#__PURE__*/ Object.freeze({
|
|
2413
|
+
__proto__: null,
|
|
2414
|
+
APOS_STRING_MODE: N,
|
|
2415
|
+
BACKSLASH_ESCAPE: M,
|
|
2416
|
+
BINARY_NUMBER_MODE: {
|
|
2417
|
+
scope: "number",
|
|
2418
|
+
begin: k,
|
|
2419
|
+
relevance: 0
|
|
2420
|
+
},
|
|
2421
|
+
BINARY_NUMBER_RE: k,
|
|
2422
|
+
COMMENT: I,
|
|
2423
|
+
C_BLOCK_COMMENT_MODE: R,
|
|
2424
|
+
C_LINE_COMMENT_MODE: L,
|
|
2425
|
+
C_NUMBER_MODE: {
|
|
2426
|
+
scope: "number",
|
|
2427
|
+
begin: O,
|
|
2428
|
+
relevance: 0
|
|
2429
|
+
},
|
|
2430
|
+
C_NUMBER_RE: O,
|
|
2431
|
+
END_SAME_AS_BEGIN: function(e) {
|
|
2432
|
+
return Object.assign(e, {
|
|
2433
|
+
"on:begin": (e, t) => {
|
|
2434
|
+
t.data._beginMatch = e[1];
|
|
2435
|
+
},
|
|
2436
|
+
"on:end": (e, t) => {
|
|
2437
|
+
t.data._beginMatch !== e[1] && t.ignoreMatch();
|
|
2438
|
+
}
|
|
2439
|
+
});
|
|
2440
|
+
},
|
|
2441
|
+
HASH_COMMENT_MODE: z,
|
|
2442
|
+
IDENT_RE: T,
|
|
2443
|
+
MATCH_NOTHING_RE: w,
|
|
2444
|
+
METHOD_GUARD: {
|
|
2445
|
+
begin: "\\.\\s*[a-zA-Z_]\\w*",
|
|
2446
|
+
relevance: 0
|
|
2447
|
+
},
|
|
2448
|
+
NUMBER_MODE: {
|
|
2449
|
+
scope: "number",
|
|
2450
|
+
begin: D,
|
|
2451
|
+
relevance: 0
|
|
2452
|
+
},
|
|
2453
|
+
NUMBER_RE: D,
|
|
2454
|
+
PHRASAL_WORDS_MODE: F,
|
|
2455
|
+
QUOTE_STRING_MODE: P,
|
|
2456
|
+
REGEXP_MODE: {
|
|
2457
|
+
scope: "regexp",
|
|
2458
|
+
begin: /\/(?=[^/\n]*\/)/,
|
|
2459
|
+
end: /\/[gimuy]*/,
|
|
2460
|
+
contains: [M, {
|
|
2461
|
+
begin: /\[/,
|
|
2462
|
+
end: /\]/,
|
|
2463
|
+
relevance: 0,
|
|
2464
|
+
contains: [M]
|
|
2465
|
+
}]
|
|
2466
|
+
},
|
|
2467
|
+
RE_STARTERS_RE: A,
|
|
2468
|
+
SHEBANG: j,
|
|
2469
|
+
TITLE_MODE: {
|
|
2470
|
+
scope: "title",
|
|
2471
|
+
begin: T,
|
|
2472
|
+
relevance: 0
|
|
2473
|
+
},
|
|
2474
|
+
UNDERSCORE_IDENT_RE: E,
|
|
2475
|
+
UNDERSCORE_TITLE_MODE: {
|
|
2476
|
+
scope: "title",
|
|
2477
|
+
begin: E,
|
|
2478
|
+
relevance: 0
|
|
2479
|
+
}
|
|
2480
|
+
});
|
|
2481
|
+
function V(e, t) {
|
|
2482
|
+
e.input[e.index - 1] === "." && t.ignoreMatch();
|
|
2483
|
+
}
|
|
2484
|
+
function H(e, t) {
|
|
2485
|
+
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
2486
|
+
}
|
|
2487
|
+
function ee(e, t) {
|
|
2488
|
+
t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = V, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
2489
|
+
}
|
|
2490
|
+
function te(e, t) {
|
|
2491
|
+
Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
|
|
2492
|
+
}
|
|
2493
|
+
function ne(e, t) {
|
|
2494
|
+
if (e.match) {
|
|
2495
|
+
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
2496
|
+
e.begin = e.match, delete e.match;
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
function U(e, t) {
|
|
2500
|
+
e.relevance === void 0 && (e.relevance = 1);
|
|
2501
|
+
}
|
|
2502
|
+
var W = (e, t) => {
|
|
2503
|
+
if (!e.beforeMatch) return;
|
|
2504
|
+
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
2505
|
+
let n = Object.assign({}, e);
|
|
2506
|
+
Object.keys(e).forEach((t) => {
|
|
2507
|
+
delete e[t];
|
|
2508
|
+
}), e.keywords = n.keywords, e.begin = _(n.beforeMatch, m(n.begin)), e.starts = {
|
|
2509
|
+
relevance: 0,
|
|
2510
|
+
contains: [Object.assign(n, { endsParent: !0 })]
|
|
2511
|
+
}, e.relevance = 0, delete n.beforeMatch;
|
|
2512
|
+
}, G = [
|
|
2513
|
+
"of",
|
|
2514
|
+
"and",
|
|
2515
|
+
"for",
|
|
2516
|
+
"in",
|
|
2517
|
+
"not",
|
|
2518
|
+
"or",
|
|
2519
|
+
"if",
|
|
2520
|
+
"then",
|
|
2521
|
+
"parent",
|
|
2522
|
+
"list",
|
|
2523
|
+
"value"
|
|
2524
|
+
], K = "keyword";
|
|
2525
|
+
function q(e, t, n = K) {
|
|
2526
|
+
let r = Object.create(null);
|
|
2527
|
+
return typeof e == "string" ? i(n, e.split(" ")) : Array.isArray(e) ? i(n, e) : Object.keys(e).forEach(function(n) {
|
|
2528
|
+
Object.assign(r, q(e[n], t, n));
|
|
2529
|
+
}), r;
|
|
2530
|
+
function i(e, n) {
|
|
2531
|
+
t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
|
|
2532
|
+
let n = t.split("|");
|
|
2533
|
+
r[n[0]] = [e, J(n[0], n[1])];
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
function J(e, t) {
|
|
2538
|
+
return t ? Number(t) : +!re(e);
|
|
2539
|
+
}
|
|
2540
|
+
function re(e) {
|
|
2541
|
+
return G.includes(e.toLowerCase());
|
|
2542
|
+
}
|
|
2543
|
+
var ie = {}, Y = (e) => {
|
|
2544
|
+
console.error(e);
|
|
2545
|
+
}, ae = (e, ...t) => {
|
|
2546
|
+
console.log(`WARN: ${e}`, ...t);
|
|
2547
|
+
}, X = (e, t) => {
|
|
2548
|
+
ie[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), ie[`${e}/${t}`] = !0);
|
|
2549
|
+
}, Z = /* @__PURE__ */ Error();
|
|
2550
|
+
function oe(e, t, { key: n }) {
|
|
2551
|
+
let r = 0, i = e[n], a = {}, o = {};
|
|
2552
|
+
for (let e = 1; e <= t.length; e++) o[e + r] = i[e], a[e + r] = !0, r += b(t[e - 1]);
|
|
2553
|
+
e[n] = o, e[n]._emit = a, e[n]._multi = !0;
|
|
2554
|
+
}
|
|
2555
|
+
function se(e) {
|
|
2556
|
+
if (Array.isArray(e.begin)) {
|
|
2557
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw Y("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Z;
|
|
2558
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw Y("beginScope must be object"), Z;
|
|
2559
|
+
oe(e, e.begin, { key: "beginScope" }), e.begin = C(e.begin, { joinWith: "" });
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
function ce(e) {
|
|
2563
|
+
if (Array.isArray(e.end)) {
|
|
2564
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw Y("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Z;
|
|
2565
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw Y("endScope must be object"), Z;
|
|
2566
|
+
oe(e, e.end, { key: "endScope" }), e.end = C(e.end, { joinWith: "" });
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
function le(e) {
|
|
2570
|
+
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
2571
|
+
}
|
|
2572
|
+
function ue(e) {
|
|
2573
|
+
le(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), se(e), ce(e);
|
|
2574
|
+
}
|
|
2575
|
+
function de(e) {
|
|
2576
|
+
function t(t, n) {
|
|
2577
|
+
return new RegExp(p(t), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (n ? "g" : ""));
|
|
2578
|
+
}
|
|
2579
|
+
class n {
|
|
2580
|
+
constructor() {
|
|
2581
|
+
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
2582
|
+
}
|
|
2583
|
+
addRule(e, t) {
|
|
2584
|
+
t.position = this.position++, this.matchIndexes[this.matchAt] = t, this.regexes.push([t, e]), this.matchAt += b(e) + 1;
|
|
2585
|
+
}
|
|
2586
|
+
compile() {
|
|
2587
|
+
this.regexes.length === 0 && (this.exec = () => null);
|
|
2588
|
+
let e = this.regexes.map((e) => e[1]);
|
|
2589
|
+
this.matcherRe = t(C(e, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
2590
|
+
}
|
|
2591
|
+
exec(e) {
|
|
2592
|
+
this.matcherRe.lastIndex = this.lastIndex;
|
|
2593
|
+
let t = this.matcherRe.exec(e);
|
|
2594
|
+
if (!t) return null;
|
|
2595
|
+
let n = t.findIndex((e, t) => t > 0 && e !== void 0), r = this.matchIndexes[n];
|
|
2596
|
+
return t.splice(0, n), Object.assign(t, r);
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2599
|
+
class r {
|
|
2600
|
+
constructor() {
|
|
2601
|
+
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
2602
|
+
}
|
|
2603
|
+
getMatcher(e) {
|
|
2604
|
+
if (this.multiRegexes[e]) return this.multiRegexes[e];
|
|
2605
|
+
let t = new n();
|
|
2606
|
+
return this.rules.slice(e).forEach(([e, n]) => t.addRule(e, n)), t.compile(), this.multiRegexes[e] = t, t;
|
|
2607
|
+
}
|
|
2608
|
+
resumingScanAtSamePosition() {
|
|
2609
|
+
return this.regexIndex !== 0;
|
|
2610
|
+
}
|
|
2611
|
+
considerAll() {
|
|
2612
|
+
this.regexIndex = 0;
|
|
2613
|
+
}
|
|
2614
|
+
addRule(e, t) {
|
|
2615
|
+
this.rules.push([e, t]), t.type === "begin" && this.count++;
|
|
2616
|
+
}
|
|
2617
|
+
exec(e) {
|
|
2618
|
+
let t = this.getMatcher(this.regexIndex);
|
|
2619
|
+
t.lastIndex = this.lastIndex;
|
|
2620
|
+
let n = t.exec(e);
|
|
2621
|
+
if (this.resumingScanAtSamePosition() && !(n && n.index === this.lastIndex)) {
|
|
2622
|
+
let t = this.getMatcher(0);
|
|
2623
|
+
t.lastIndex = this.lastIndex + 1, n = t.exec(e);
|
|
2624
|
+
}
|
|
2625
|
+
return n && (this.regexIndex += n.position + 1, this.regexIndex === this.count && this.considerAll()), n;
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
function i(e) {
|
|
2629
|
+
let t = new r();
|
|
2630
|
+
return e.contains.forEach((e) => t.addRule(e.begin, {
|
|
2631
|
+
rule: e,
|
|
2632
|
+
type: "begin"
|
|
2633
|
+
})), e.terminatorEnd && t.addRule(e.terminatorEnd, { type: "end" }), e.illegal && t.addRule(e.illegal, { type: "illegal" }), t;
|
|
2634
|
+
}
|
|
2635
|
+
function o(n, r) {
|
|
2636
|
+
let a = n;
|
|
2637
|
+
if (n.isCompiled) return a;
|
|
2638
|
+
[
|
|
2639
|
+
H,
|
|
2640
|
+
ne,
|
|
2641
|
+
ue,
|
|
2642
|
+
W
|
|
2643
|
+
].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
|
|
2644
|
+
ee,
|
|
2645
|
+
te,
|
|
2646
|
+
U
|
|
2647
|
+
].forEach((e) => e(n, r)), n.isCompiled = !0;
|
|
2648
|
+
let s = null;
|
|
2649
|
+
return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= q(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
|
|
2650
|
+
return pe(e === "self" ? n : e);
|
|
2651
|
+
})), n.contains.forEach(function(e) {
|
|
2652
|
+
o(e, a);
|
|
2653
|
+
}), n.starts && o(n.starts, r), a.matcher = i(a), a;
|
|
2654
|
+
}
|
|
2655
|
+
if (e.compilerExtensions ||= [], e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
2656
|
+
return e.classNameAliases = a(e.classNameAliases || {}), o(e);
|
|
2657
|
+
}
|
|
2658
|
+
function fe(e) {
|
|
2659
|
+
return e ? e.endsWithParent || fe(e.starts) : !1;
|
|
2660
|
+
}
|
|
2661
|
+
function pe(e) {
|
|
2662
|
+
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(t) {
|
|
2663
|
+
return a(e, { variants: null }, t);
|
|
2664
|
+
})), e.cachedVariants ? e.cachedVariants : fe(e) ? a(e, { starts: e.starts ? a(e.starts) : null }) : Object.isFrozen(e) ? a(e) : e;
|
|
2665
|
+
}
|
|
2666
|
+
var me = "11.11.2", he = class extends Error {
|
|
2667
|
+
constructor(e, t) {
|
|
2668
|
+
super(e), this.name = "HTMLInjectionError", this.html = t;
|
|
2669
|
+
}
|
|
2670
|
+
}, Q = i, ge = a, _e = Symbol("nomatch"), ve = 7, ye = function(e) {
|
|
2671
|
+
let t = Object.create(null), i = Object.create(null), a = [], o = !0, s = "Could not find the language '{}', did you forget to load/include a language module?", c = {
|
|
2672
|
+
disableAutodetect: !0,
|
|
2673
|
+
name: "Plain text",
|
|
2674
|
+
contains: []
|
|
2675
|
+
}, l = {
|
|
2676
|
+
ignoreUnescapedHTML: !1,
|
|
2677
|
+
throwUnescapedHTML: !1,
|
|
2678
|
+
noHighlightRe: /^(no-?highlight)$/i,
|
|
2679
|
+
languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
|
|
2680
|
+
classPrefix: "hljs-",
|
|
2681
|
+
cssSelector: "pre code",
|
|
2682
|
+
languages: null,
|
|
2683
|
+
__emitter: f
|
|
2684
|
+
};
|
|
2685
|
+
function u(e) {
|
|
2686
|
+
return l.noHighlightRe.test(e);
|
|
2687
|
+
}
|
|
2688
|
+
function d(e) {
|
|
2689
|
+
let t = e.className + " ";
|
|
2690
|
+
t += e.parentNode ? e.parentNode.className : "";
|
|
2691
|
+
let n = l.languageDetectRe.exec(t);
|
|
2692
|
+
if (n) {
|
|
2693
|
+
let t = N(n[1]);
|
|
2694
|
+
return t || (ae(s.replace("{}", n[1])), ae("Falling back to no-highlight mode for this block.", e)), t ? n[1] : "no-highlight";
|
|
2695
|
+
}
|
|
2696
|
+
return t.split(/\s+/).find((e) => u(e) || N(e));
|
|
2697
|
+
}
|
|
2698
|
+
function p(e, t, n) {
|
|
2699
|
+
let r = "", i = "";
|
|
2700
|
+
typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (X("10.7.0", "highlight(lang, code, ...args) has been deprecated."), X("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), i = e, r = t), n === void 0 && (n = !0);
|
|
2701
|
+
let a = {
|
|
2702
|
+
code: r,
|
|
2703
|
+
language: i
|
|
2704
|
+
};
|
|
2705
|
+
z("before:highlight", a);
|
|
2706
|
+
let o = a.result ? a.result : v(a.language, a.code, n);
|
|
2707
|
+
return o.code = a.code, z("after:highlight", o), o;
|
|
2708
|
+
}
|
|
2709
|
+
function v(e, n, i, a) {
|
|
2710
|
+
let c = Object.create(null);
|
|
2711
|
+
function u(e, t) {
|
|
2712
|
+
return e.keywords[t];
|
|
2713
|
+
}
|
|
2714
|
+
function d() {
|
|
2715
|
+
if (!A.keywords) {
|
|
2716
|
+
M.addText(P);
|
|
2717
|
+
return;
|
|
2718
|
+
}
|
|
2719
|
+
let e = 0;
|
|
2720
|
+
A.keywordPatternRe.lastIndex = 0;
|
|
2721
|
+
let t = A.keywordPatternRe.exec(P), n = "";
|
|
2722
|
+
for (; t;) {
|
|
2723
|
+
n += P.substring(e, t.index);
|
|
2724
|
+
let r = D.case_insensitive ? t[0].toLowerCase() : t[0], i = u(A, r);
|
|
2725
|
+
if (i) {
|
|
2726
|
+
let [e, a] = i;
|
|
2727
|
+
if (M.addText(n), n = "", c[r] = (c[r] || 0) + 1, c[r] <= ve && (F += a), e.startsWith("_")) n += t[0];
|
|
2728
|
+
else {
|
|
2729
|
+
let n = D.classNameAliases[e] || e;
|
|
2730
|
+
m(t[0], n);
|
|
2731
|
+
}
|
|
2732
|
+
} else n += t[0];
|
|
2733
|
+
e = A.keywordPatternRe.lastIndex, t = A.keywordPatternRe.exec(P);
|
|
2734
|
+
}
|
|
2735
|
+
n += P.substring(e), M.addText(n);
|
|
2736
|
+
}
|
|
2737
|
+
function f() {
|
|
2738
|
+
if (P === "") return;
|
|
2739
|
+
let e = null;
|
|
2740
|
+
if (typeof A.subLanguage == "string") {
|
|
2741
|
+
if (!t[A.subLanguage]) {
|
|
2742
|
+
M.addText(P);
|
|
2743
|
+
return;
|
|
2744
|
+
}
|
|
2745
|
+
e = v(A.subLanguage, P, !0, j[A.subLanguage]), j[A.subLanguage] = e._top;
|
|
2746
|
+
} else e = S(P, A.subLanguage.length ? A.subLanguage : null);
|
|
2747
|
+
A.relevance > 0 && (F += e.relevance), M.__addSublanguage(e._emitter, e.language);
|
|
2748
|
+
}
|
|
2749
|
+
function p() {
|
|
2750
|
+
A.subLanguage == null ? d() : f(), P = "";
|
|
2751
|
+
}
|
|
2752
|
+
function m(e, t) {
|
|
2753
|
+
e !== "" && (M.startScope(t), M.addText(e), M.endScope());
|
|
2754
|
+
}
|
|
2755
|
+
function h(e, t) {
|
|
2756
|
+
let n = 1, r = t.length - 1;
|
|
2757
|
+
for (; n <= r;) {
|
|
2758
|
+
if (!e._emit[n]) {
|
|
2759
|
+
n++;
|
|
2760
|
+
continue;
|
|
2761
|
+
}
|
|
2762
|
+
let r = D.classNameAliases[e[n]] || e[n], i = t[n];
|
|
2763
|
+
r ? m(i, r) : (P = i, d(), P = ""), n++;
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
function g(e, t) {
|
|
2767
|
+
return e.scope && typeof e.scope == "string" && M.openNode(D.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (m(P, D.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), P = "") : e.beginScope._multi && (h(e.beginScope, t), P = "")), A = Object.create(e, { parent: { value: A } }), A;
|
|
2768
|
+
}
|
|
2769
|
+
function _(e, t, n) {
|
|
2770
|
+
let i = x(e.endRe, n);
|
|
2771
|
+
if (i) {
|
|
2772
|
+
if (e["on:end"]) {
|
|
2773
|
+
let n = new r(e);
|
|
2774
|
+
e["on:end"](t, n), n.isMatchIgnored && (i = !1);
|
|
2775
|
+
}
|
|
2776
|
+
if (i) {
|
|
2777
|
+
for (; e.endsParent && e.parent;) e = e.parent;
|
|
2778
|
+
return e;
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
if (e.endsWithParent) return _(e.parent, t, n);
|
|
2782
|
+
}
|
|
2783
|
+
function y(e) {
|
|
2784
|
+
return A.matcher.regexIndex === 0 ? (P += e[0], 1) : (R = !0, 0);
|
|
2785
|
+
}
|
|
2786
|
+
function b(e) {
|
|
2787
|
+
let t = e[0], n = e.rule, i = new r(n), a = [n.__beforeBegin, n["on:begin"]];
|
|
2788
|
+
for (let n of a) if (n && (n(e, i), i.isMatchIgnored)) return y(t);
|
|
2789
|
+
return n.skip ? P += t : (n.excludeBegin && (P += t), p(), !n.returnBegin && !n.excludeBegin && (P = t)), g(n, e), n.returnBegin ? 0 : t.length;
|
|
2790
|
+
}
|
|
2791
|
+
function C(e) {
|
|
2792
|
+
let t = e[0], r = n.substring(e.index), i = _(A, e, r);
|
|
2793
|
+
if (!i) return _e;
|
|
2794
|
+
let a = A;
|
|
2795
|
+
A.endScope && A.endScope._wrap ? (p(), m(t, A.endScope._wrap)) : A.endScope && A.endScope._multi ? (p(), h(A.endScope, e)) : a.skip ? P += t : (a.returnEnd || a.excludeEnd || (P += t), p(), a.excludeEnd && (P = t));
|
|
2796
|
+
do
|
|
2797
|
+
A.scope && M.closeNode(), !A.skip && !A.subLanguage && (F += A.relevance), A = A.parent;
|
|
2798
|
+
while (A !== i.parent);
|
|
2799
|
+
return i.starts && g(i.starts, e), a.returnEnd ? 0 : t.length;
|
|
2800
|
+
}
|
|
2801
|
+
function w() {
|
|
2802
|
+
let e = [];
|
|
2803
|
+
for (let t = A; t !== D; t = t.parent) t.scope && e.unshift(t.scope);
|
|
2804
|
+
e.forEach((e) => M.openNode(e));
|
|
2805
|
+
}
|
|
2806
|
+
let T = {};
|
|
2807
|
+
function E(t, r) {
|
|
2808
|
+
let a = r && r[0];
|
|
2809
|
+
if (P += t, a == null) return p(), 0;
|
|
2810
|
+
if (T.type === "begin" && r.type === "end" && T.index === r.index && a === "") {
|
|
2811
|
+
if (P += n.slice(r.index, r.index + 1), !o) {
|
|
2812
|
+
let t = /* @__PURE__ */ Error(`0 width match regex (${e})`);
|
|
2813
|
+
throw t.languageName = e, t.badRule = T.rule, t;
|
|
2814
|
+
}
|
|
2815
|
+
return 1;
|
|
2816
|
+
}
|
|
2817
|
+
if (T = r, r.type === "begin") return b(r);
|
|
2818
|
+
if (r.type === "illegal" && !i) {
|
|
2819
|
+
let e = /* @__PURE__ */ Error("Illegal lexeme \"" + a + "\" for mode \"" + (A.scope || "<unnamed>") + "\"");
|
|
2820
|
+
throw e.mode = A, e;
|
|
2821
|
+
}
|
|
2822
|
+
if (r.type === "end") {
|
|
2823
|
+
let e = C(r);
|
|
2824
|
+
if (e !== _e) return e;
|
|
2825
|
+
}
|
|
2826
|
+
if (r.type === "illegal" && a === "") return r.index === n.length || (P += "\n"), 1;
|
|
2827
|
+
if (L > 1e5 && L > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
2828
|
+
return P += a, a.length;
|
|
2829
|
+
}
|
|
2830
|
+
let D = N(e);
|
|
2831
|
+
if (!D) throw Y(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
2832
|
+
let O = de(D), k = "", A = a || O, j = {}, M = new l.__emitter(l);
|
|
2833
|
+
w();
|
|
2834
|
+
let P = "", F = 0, I = 0, L = 0, R = !1;
|
|
2835
|
+
try {
|
|
2836
|
+
if (D.__emitTokens) D.__emitTokens(n, M);
|
|
2837
|
+
else {
|
|
2838
|
+
for (A.matcher.considerAll();;) {
|
|
2839
|
+
L++, R ? R = !1 : A.matcher.considerAll(), A.matcher.lastIndex = I;
|
|
2840
|
+
let e = A.matcher.exec(n);
|
|
2841
|
+
if (!e) break;
|
|
2842
|
+
let t = E(n.substring(I, e.index), e);
|
|
2843
|
+
I = e.index + t;
|
|
2844
|
+
}
|
|
2845
|
+
E(n.substring(I));
|
|
2846
|
+
}
|
|
2847
|
+
return M.finalize(), k = M.toHTML(), {
|
|
2848
|
+
language: e,
|
|
2849
|
+
value: k,
|
|
2850
|
+
relevance: F,
|
|
2851
|
+
illegal: !1,
|
|
2852
|
+
_emitter: M,
|
|
2853
|
+
_top: A
|
|
2854
|
+
};
|
|
2855
|
+
} catch (t) {
|
|
2856
|
+
if (t.message && t.message.includes("Illegal")) return {
|
|
2857
|
+
language: e,
|
|
2858
|
+
value: Q(n),
|
|
2859
|
+
illegal: !0,
|
|
2860
|
+
relevance: 0,
|
|
2861
|
+
_illegalBy: {
|
|
2862
|
+
message: t.message,
|
|
2863
|
+
index: I,
|
|
2864
|
+
context: n.slice(I - 100, I + 100),
|
|
2865
|
+
mode: t.mode,
|
|
2866
|
+
resultSoFar: k
|
|
2867
|
+
},
|
|
2868
|
+
_emitter: M
|
|
2869
|
+
};
|
|
2870
|
+
if (o) return {
|
|
2871
|
+
language: e,
|
|
2872
|
+
value: Q(n),
|
|
2873
|
+
illegal: !1,
|
|
2874
|
+
relevance: 0,
|
|
2875
|
+
errorRaised: t,
|
|
2876
|
+
_emitter: M,
|
|
2877
|
+
_top: A
|
|
2878
|
+
};
|
|
2879
|
+
throw t;
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
function b(e) {
|
|
2883
|
+
let t = {
|
|
2884
|
+
value: Q(e),
|
|
2885
|
+
illegal: !1,
|
|
2886
|
+
relevance: 0,
|
|
2887
|
+
_top: c,
|
|
2888
|
+
_emitter: new l.__emitter(l)
|
|
2889
|
+
};
|
|
2890
|
+
return t._emitter.addText(e), t;
|
|
2891
|
+
}
|
|
2892
|
+
function S(e, n) {
|
|
2893
|
+
n = n || l.languages || Object.keys(t);
|
|
2894
|
+
let r = b(e), i = n.filter(N).filter(F).map((t) => v(t, e, !1));
|
|
2895
|
+
i.unshift(r);
|
|
2896
|
+
let [a, o] = i.sort((e, t) => {
|
|
2897
|
+
if (e.relevance !== t.relevance) return t.relevance - e.relevance;
|
|
2898
|
+
if (e.language && t.language) {
|
|
2899
|
+
if (N(e.language).supersetOf === t.language) return 1;
|
|
2900
|
+
if (N(t.language).supersetOf === e.language) return -1;
|
|
2901
|
+
}
|
|
2902
|
+
return 0;
|
|
2903
|
+
}), s = a;
|
|
2904
|
+
return s.secondBest = o, s;
|
|
2905
|
+
}
|
|
2906
|
+
function C(e, t, n) {
|
|
2907
|
+
let r = t && i[t] || n;
|
|
2908
|
+
e.classList.add("hljs"), e.classList.add(`language-${r}`);
|
|
2909
|
+
}
|
|
2910
|
+
function w(e) {
|
|
2911
|
+
let t = null, n = d(e);
|
|
2912
|
+
if (u(n)) return;
|
|
2913
|
+
if (z("before:highlightElement", {
|
|
2914
|
+
el: e,
|
|
2915
|
+
language: n
|
|
2916
|
+
}), e.dataset.highlighted) {
|
|
2917
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
2918
|
+
return;
|
|
2919
|
+
}
|
|
2920
|
+
if (e.children.length > 0 && (l.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(e)), l.throwUnescapedHTML)) throw new he("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
2921
|
+
t = e;
|
|
2922
|
+
let r = t.textContent, i = n ? p(r, {
|
|
2923
|
+
language: n,
|
|
2924
|
+
ignoreIllegals: !0
|
|
2925
|
+
}) : S(r);
|
|
2926
|
+
e.innerHTML = i.value, e.dataset.highlighted = "yes", C(e, n, i.language), e.result = {
|
|
2927
|
+
language: i.language,
|
|
2928
|
+
re: i.relevance,
|
|
2929
|
+
relevance: i.relevance
|
|
2930
|
+
}, i.secondBest && (e.secondBest = {
|
|
2931
|
+
language: i.secondBest.language,
|
|
2932
|
+
relevance: i.secondBest.relevance
|
|
2933
|
+
}), z("after:highlightElement", {
|
|
2934
|
+
el: e,
|
|
2935
|
+
result: i,
|
|
2936
|
+
text: r
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
function T(e) {
|
|
2940
|
+
l = ge(l, e);
|
|
2941
|
+
}
|
|
2942
|
+
let E = () => {
|
|
2943
|
+
k(), X("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
2944
|
+
};
|
|
2945
|
+
function D() {
|
|
2946
|
+
k(), X("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
2947
|
+
}
|
|
2948
|
+
let O = !1;
|
|
2949
|
+
function k() {
|
|
2950
|
+
function e() {
|
|
2951
|
+
k();
|
|
2952
|
+
}
|
|
2953
|
+
if (document.readyState === "loading") {
|
|
2954
|
+
O || window.addEventListener("DOMContentLoaded", e, !1), O = !0;
|
|
2955
|
+
return;
|
|
2956
|
+
}
|
|
2957
|
+
document.querySelectorAll(l.cssSelector).forEach(w);
|
|
2958
|
+
}
|
|
2959
|
+
function A(n, r) {
|
|
2960
|
+
let i = null;
|
|
2961
|
+
try {
|
|
2962
|
+
i = r(e);
|
|
2963
|
+
} catch (e) {
|
|
2964
|
+
if (Y("Language definition for '{}' could not be registered.".replace("{}", n)), o) Y(e);
|
|
2965
|
+
else throw e;
|
|
2966
|
+
i = c;
|
|
2967
|
+
}
|
|
2968
|
+
i.name || (i.name = n), t[n] = i, i.rawDefinition = r.bind(null, e), i.aliases && P(i.aliases, { languageName: n });
|
|
2969
|
+
}
|
|
2970
|
+
function j(e) {
|
|
2971
|
+
delete t[e];
|
|
2972
|
+
for (let t of Object.keys(i)) i[t] === e && delete i[t];
|
|
2973
|
+
}
|
|
2974
|
+
function M() {
|
|
2975
|
+
return Object.keys(t);
|
|
2976
|
+
}
|
|
2977
|
+
function N(e) {
|
|
2978
|
+
return e = (e || "").toLowerCase(), t[e] || t[i[e]];
|
|
2979
|
+
}
|
|
2980
|
+
function P(e, { languageName: t }) {
|
|
2981
|
+
typeof e == "string" && (e = [e]), e.forEach((e) => {
|
|
2982
|
+
i[e.toLowerCase()] = t;
|
|
2983
|
+
});
|
|
2984
|
+
}
|
|
2985
|
+
function F(e) {
|
|
2986
|
+
let t = N(e);
|
|
2987
|
+
return t && !t.disableAutodetect;
|
|
2988
|
+
}
|
|
2989
|
+
function I(e) {
|
|
2990
|
+
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (t) => {
|
|
2991
|
+
e["before:highlightBlock"](Object.assign({ block: t.el }, t));
|
|
2992
|
+
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (t) => {
|
|
2993
|
+
e["after:highlightBlock"](Object.assign({ block: t.el }, t));
|
|
2994
|
+
});
|
|
2995
|
+
}
|
|
2996
|
+
function L(e) {
|
|
2997
|
+
I(e), a.push(e);
|
|
2998
|
+
}
|
|
2999
|
+
function R(e) {
|
|
3000
|
+
let t = a.indexOf(e);
|
|
3001
|
+
t !== -1 && a.splice(t, 1);
|
|
3002
|
+
}
|
|
3003
|
+
function z(e, t) {
|
|
3004
|
+
let n = e;
|
|
3005
|
+
a.forEach(function(e) {
|
|
3006
|
+
e[n] && e[n](t);
|
|
3007
|
+
});
|
|
3008
|
+
}
|
|
3009
|
+
function V(e) {
|
|
3010
|
+
return X("10.7.0", "highlightBlock will be removed entirely in v12.0"), X("10.7.0", "Please use highlightElement now."), w(e);
|
|
3011
|
+
}
|
|
3012
|
+
Object.assign(e, {
|
|
3013
|
+
highlight: p,
|
|
3014
|
+
highlightAuto: S,
|
|
3015
|
+
highlightAll: k,
|
|
3016
|
+
highlightElement: w,
|
|
3017
|
+
highlightBlock: V,
|
|
3018
|
+
configure: T,
|
|
3019
|
+
initHighlighting: E,
|
|
3020
|
+
initHighlightingOnLoad: D,
|
|
3021
|
+
registerLanguage: A,
|
|
3022
|
+
unregisterLanguage: j,
|
|
3023
|
+
listLanguages: M,
|
|
3024
|
+
getLanguage: N,
|
|
3025
|
+
registerAliases: P,
|
|
3026
|
+
autoDetection: F,
|
|
3027
|
+
inherit: ge,
|
|
3028
|
+
addPlugin: L,
|
|
3029
|
+
removePlugin: R
|
|
3030
|
+
}), e.debugMode = function() {
|
|
3031
|
+
o = !1;
|
|
3032
|
+
}, e.safeMode = function() {
|
|
3033
|
+
o = !0;
|
|
3034
|
+
}, e.versionString = me, e.regex = {
|
|
3035
|
+
concat: _,
|
|
3036
|
+
lookahead: m,
|
|
3037
|
+
either: y,
|
|
3038
|
+
optional: g,
|
|
3039
|
+
anyNumberOfTimes: h
|
|
3040
|
+
};
|
|
3041
|
+
for (let e in B) typeof B[e] == "object" && n(B[e]);
|
|
3042
|
+
return Object.assign(e, B), e;
|
|
3043
|
+
}, $ = ye({});
|
|
3044
|
+
$.newInstance = () => ye({}), t.exports = $, $.HighlightJS = $, $.default = $;
|
|
3045
|
+
})))())).default, W = {}, G = "hljs-";
|
|
3046
|
+
function K(e) {
|
|
3047
|
+
let t = U.newInstance();
|
|
3048
|
+
return e && a(e), {
|
|
3049
|
+
highlight: n,
|
|
3050
|
+
highlightAuto: r,
|
|
3051
|
+
listLanguages: i,
|
|
3052
|
+
register: a,
|
|
3053
|
+
registerAlias: o,
|
|
3054
|
+
registered: s
|
|
3055
|
+
};
|
|
3056
|
+
function n(e, n, r) {
|
|
3057
|
+
let i = r || W, a = typeof i.prefix == "string" ? i.prefix : G;
|
|
3058
|
+
if (!t.getLanguage(e)) throw Error("Unknown language: `" + e + "` is not registered");
|
|
3059
|
+
t.configure({
|
|
3060
|
+
__emitter: q,
|
|
3061
|
+
classPrefix: a
|
|
3062
|
+
});
|
|
3063
|
+
let o = t.highlight(n, {
|
|
3064
|
+
ignoreIllegals: !0,
|
|
3065
|
+
language: e
|
|
3066
|
+
});
|
|
3067
|
+
/* c8 ignore next 5 */
|
|
3068
|
+
if (o.errorRaised) throw Error("Could not highlight with `Highlight.js`", { cause: o.errorRaised });
|
|
3069
|
+
let s = o._emitter.root, c = s.data;
|
|
3070
|
+
return c.language = o.language, c.relevance = o.relevance, s;
|
|
3071
|
+
}
|
|
3072
|
+
function r(e, r) {
|
|
3073
|
+
let a = (r || W).subset || i(), o = -1, s = 0, c;
|
|
3074
|
+
for (; ++o < a.length;) {
|
|
3075
|
+
let i = a[o];
|
|
3076
|
+
if (!t.getLanguage(i)) continue;
|
|
3077
|
+
let l = n(i, e, r);
|
|
3078
|
+
l.data && l.data.relevance !== void 0 && l.data.relevance > s && (s = l.data.relevance, c = l);
|
|
3079
|
+
}
|
|
3080
|
+
return c || {
|
|
3081
|
+
type: "root",
|
|
3082
|
+
children: [],
|
|
3083
|
+
data: {
|
|
3084
|
+
language: void 0,
|
|
3085
|
+
relevance: s
|
|
3086
|
+
}
|
|
3087
|
+
};
|
|
3088
|
+
}
|
|
3089
|
+
function i() {
|
|
3090
|
+
return t.listLanguages();
|
|
3091
|
+
}
|
|
3092
|
+
function a(e, n) {
|
|
3093
|
+
if (typeof e == "string") t.registerLanguage(e, n);
|
|
3094
|
+
else {
|
|
3095
|
+
let n;
|
|
3096
|
+
for (n in e) Object.hasOwn(e, n) && t.registerLanguage(n, e[n]);
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
function o(e, n) {
|
|
3100
|
+
if (typeof e == "string") t.registerAliases(typeof n == "string" ? n : [...n], { languageName: e });
|
|
3101
|
+
else {
|
|
3102
|
+
let n;
|
|
3103
|
+
for (n in e) if (Object.hasOwn(e, n)) {
|
|
3104
|
+
let r = e[n];
|
|
3105
|
+
t.registerAliases(typeof r == "string" ? r : [...r], { languageName: n });
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
function s(e) {
|
|
3110
|
+
return !!t.getLanguage(e);
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
var q = class {
|
|
3114
|
+
constructor(e) {
|
|
3115
|
+
this.options = e, this.root = {
|
|
3116
|
+
type: "root",
|
|
3117
|
+
children: [],
|
|
3118
|
+
data: {
|
|
3119
|
+
language: void 0,
|
|
3120
|
+
relevance: 0
|
|
3121
|
+
}
|
|
3122
|
+
}, this.stack = [this.root];
|
|
3123
|
+
}
|
|
3124
|
+
addText(e) {
|
|
3125
|
+
if (e === "") return;
|
|
3126
|
+
let t = this.stack[this.stack.length - 1], n = t.children[t.children.length - 1];
|
|
3127
|
+
n && n.type === "text" ? n.value += e : t.children.push({
|
|
3128
|
+
type: "text",
|
|
3129
|
+
value: e
|
|
3130
|
+
});
|
|
3131
|
+
}
|
|
3132
|
+
startScope(e) {
|
|
3133
|
+
this.openNode(String(e));
|
|
3134
|
+
}
|
|
3135
|
+
endScope() {
|
|
3136
|
+
this.closeNode();
|
|
3137
|
+
}
|
|
3138
|
+
__addSublanguage(e, t) {
|
|
3139
|
+
let n = this.stack[this.stack.length - 1], r = e.root.children;
|
|
3140
|
+
t ? n.children.push({
|
|
3141
|
+
type: "element",
|
|
3142
|
+
tagName: "span",
|
|
3143
|
+
properties: { className: [t] },
|
|
3144
|
+
children: r
|
|
3145
|
+
}) : n.children.push(...r);
|
|
3146
|
+
}
|
|
3147
|
+
openNode(e) {
|
|
3148
|
+
let t = this, n = e.split(".").map(function(e, n) {
|
|
3149
|
+
return n ? e + "_".repeat(n) : t.options.classPrefix + e;
|
|
3150
|
+
}), r = this.stack[this.stack.length - 1], i = {
|
|
3151
|
+
type: "element",
|
|
3152
|
+
tagName: "span",
|
|
3153
|
+
properties: { className: n },
|
|
3154
|
+
children: []
|
|
3155
|
+
};
|
|
3156
|
+
r.children.push(i), this.stack.push(i);
|
|
3157
|
+
}
|
|
3158
|
+
closeNode() {
|
|
3159
|
+
this.stack.pop();
|
|
3160
|
+
}
|
|
3161
|
+
finalize() {}
|
|
3162
|
+
toHTML() {
|
|
3163
|
+
return "";
|
|
3164
|
+
}
|
|
3165
|
+
}, J = () => K({
|
|
3166
|
+
bash: l,
|
|
3167
|
+
css: v,
|
|
3168
|
+
diff: y,
|
|
3169
|
+
javascript: O,
|
|
3170
|
+
json: A,
|
|
3171
|
+
markdown: j,
|
|
3172
|
+
python: M,
|
|
3173
|
+
sql: N,
|
|
3174
|
+
typescript: ee,
|
|
3175
|
+
xml: te,
|
|
3176
|
+
yaml: ne
|
|
3177
|
+
});
|
|
3178
|
+
//#endregion
|
|
3179
|
+
export { J as createHighlighter };
|
|
3180
|
+
|
|
3181
|
+
//# sourceMappingURL=grammars-B19jp7qm.js.map
|