rj-editor 1.3.0 → 1.3.1
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/dist/LexicalCodePrism.prod-aiocbvfq.js +1416 -0
- package/dist/plugins/CodeHighlightPlugin.d.ts +0 -6
- package/dist/prism-2TqtsDnJ.js +1917 -0
- package/dist/prism-bash-HogikaHd.js +175 -0
- package/dist/prism-docker-DI1lriSm.js +75 -0
- package/dist/prism-json-CPmaNewv.js +25 -0
- package/dist/prism-jsx-DCSoxYIa.js +46 -0
- package/dist/prism-tsx-BRUTQfCu.js +8 -0
- package/dist/prism-yaml-D6c5M_c9.js +68 -0
- package/dist/rj-editor.js +3604 -7300
- package/dist/rj-editor.umd.cjs +10 -10
- package/package.json +1 -1
|
@@ -0,0 +1,1416 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./prism-2TqtsDnJ.js";
|
|
2
|
+
import { $createLineBreakNode as h, $createPoint as g, $createTabNode as _, $createTextNode as v, $getCaretRange as y, $getCaretRangeInDirection as ee, $getNodeByKey as b, $getRoot as x, $getSelection as S, $getSiblingCaret as C, $getTextPointCaret as w, $insertNodes as T, $isLineBreakNode as E, $isRangeSelection as D, $isTabNode as O, $isTextNode as te, $normalizeCaret as ne, $onUpdate as re, $setSelectionFromCaretRange as ie, COMMAND_PRIORITY_LOW as k, INDENT_CONTENT_COMMAND as A, INSERT_TAB_COMMAND as j, KEY_ARROW_DOWN_COMMAND as M, KEY_ARROW_UP_COMMAND as N, KEY_TAB_COMMAND as P, MOVE_TO_END as F, MOVE_TO_START as I, OUTDENT_CONTENT_COMMAND as L, TextNode as R, defineExtension as z, mergeRegister as ae, safeCast as oe } from "lexical";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region node_modules/prismjs/components/prism-cpp.js
|
|
5
|
+
p(), globalThis.Prism.languages.clike = {
|
|
6
|
+
comment: [{
|
|
7
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
8
|
+
lookbehind: !0,
|
|
9
|
+
greedy: !0
|
|
10
|
+
}, {
|
|
11
|
+
pattern: /(^|[^\\:])\/\/.*/,
|
|
12
|
+
lookbehind: !0,
|
|
13
|
+
greedy: !0
|
|
14
|
+
}],
|
|
15
|
+
string: {
|
|
16
|
+
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
17
|
+
greedy: !0
|
|
18
|
+
},
|
|
19
|
+
"class-name": {
|
|
20
|
+
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
|
|
21
|
+
lookbehind: !0,
|
|
22
|
+
inside: { punctuation: /[.\\]/ }
|
|
23
|
+
},
|
|
24
|
+
keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
|
|
25
|
+
boolean: /\b(?:false|true)\b/,
|
|
26
|
+
function: /\b\w+(?=\()/,
|
|
27
|
+
number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
|
28
|
+
operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
|
|
29
|
+
punctuation: /[{}[\];(),.:]/
|
|
30
|
+
}, globalThis.Prism.languages.javascript = globalThis.Prism.languages.extend("clike", {
|
|
31
|
+
"class-name": [globalThis.Prism.languages.clike["class-name"], {
|
|
32
|
+
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
|
33
|
+
lookbehind: !0
|
|
34
|
+
}],
|
|
35
|
+
keyword: [{
|
|
36
|
+
pattern: /((?:^|\})\s*)catch\b/,
|
|
37
|
+
lookbehind: !0
|
|
38
|
+
}, {
|
|
39
|
+
pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
|
|
40
|
+
lookbehind: !0
|
|
41
|
+
}],
|
|
42
|
+
function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
|
43
|
+
number: {
|
|
44
|
+
pattern: RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),
|
|
45
|
+
lookbehind: !0
|
|
46
|
+
},
|
|
47
|
+
operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
|
|
48
|
+
}), globalThis.Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, globalThis.Prism.languages.insertBefore("javascript", "keyword", {
|
|
49
|
+
regex: {
|
|
50
|
+
pattern: RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))"),
|
|
51
|
+
lookbehind: !0,
|
|
52
|
+
greedy: !0,
|
|
53
|
+
inside: {
|
|
54
|
+
"regex-source": {
|
|
55
|
+
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
|
|
56
|
+
lookbehind: !0,
|
|
57
|
+
alias: "language-regex",
|
|
58
|
+
inside: globalThis.Prism.languages.regex
|
|
59
|
+
},
|
|
60
|
+
"regex-delimiter": /^\/|\/$/,
|
|
61
|
+
"regex-flags": /^[a-z]+$/
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"function-variable": {
|
|
65
|
+
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
|
|
66
|
+
alias: "function"
|
|
67
|
+
},
|
|
68
|
+
parameter: [
|
|
69
|
+
{
|
|
70
|
+
pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
|
|
71
|
+
lookbehind: !0,
|
|
72
|
+
inside: globalThis.Prism.languages.javascript
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
|
|
76
|
+
lookbehind: !0,
|
|
77
|
+
inside: globalThis.Prism.languages.javascript
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
|
|
81
|
+
lookbehind: !0,
|
|
82
|
+
inside: globalThis.Prism.languages.javascript
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
|
|
86
|
+
lookbehind: !0,
|
|
87
|
+
inside: globalThis.Prism.languages.javascript
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
|
|
91
|
+
}), globalThis.Prism.languages.insertBefore("javascript", "string", {
|
|
92
|
+
hashbang: {
|
|
93
|
+
pattern: /^#!.*/,
|
|
94
|
+
greedy: !0,
|
|
95
|
+
alias: "comment"
|
|
96
|
+
},
|
|
97
|
+
"template-string": {
|
|
98
|
+
pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
|
99
|
+
greedy: !0,
|
|
100
|
+
inside: {
|
|
101
|
+
"template-punctuation": {
|
|
102
|
+
pattern: /^`|`$/,
|
|
103
|
+
alias: "string"
|
|
104
|
+
},
|
|
105
|
+
interpolation: {
|
|
106
|
+
pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
107
|
+
lookbehind: !0,
|
|
108
|
+
inside: {
|
|
109
|
+
"interpolation-punctuation": {
|
|
110
|
+
pattern: /^\$\{|\}$/,
|
|
111
|
+
alias: "punctuation"
|
|
112
|
+
},
|
|
113
|
+
rest: globalThis.Prism.languages.javascript
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
string: /[\s\S]+/
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"string-property": {
|
|
120
|
+
pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
|
121
|
+
lookbehind: !0,
|
|
122
|
+
greedy: !0,
|
|
123
|
+
alias: "property"
|
|
124
|
+
}
|
|
125
|
+
}), globalThis.Prism.languages.insertBefore("javascript", "operator", { "literal-property": {
|
|
126
|
+
pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
|
127
|
+
lookbehind: !0,
|
|
128
|
+
alias: "property"
|
|
129
|
+
} }), globalThis.Prism.languages.markup && (globalThis.Prism.languages.markup.tag.addInlined("script", "javascript"), globalThis.Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), globalThis.Prism.languages.js = globalThis.Prism.languages.javascript, globalThis.Prism.languages.markup = {
|
|
130
|
+
comment: {
|
|
131
|
+
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
132
|
+
greedy: !0
|
|
133
|
+
},
|
|
134
|
+
prolog: {
|
|
135
|
+
pattern: /<\?[\s\S]+?\?>/,
|
|
136
|
+
greedy: !0
|
|
137
|
+
},
|
|
138
|
+
doctype: {
|
|
139
|
+
pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
|
|
140
|
+
greedy: !0,
|
|
141
|
+
inside: {
|
|
142
|
+
"internal-subset": {
|
|
143
|
+
pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
|
|
144
|
+
lookbehind: !0,
|
|
145
|
+
greedy: !0,
|
|
146
|
+
inside: null
|
|
147
|
+
},
|
|
148
|
+
string: {
|
|
149
|
+
pattern: /"[^"]*"|'[^']*'/,
|
|
150
|
+
greedy: !0
|
|
151
|
+
},
|
|
152
|
+
punctuation: /^<!|>$|[[\]]/,
|
|
153
|
+
"doctype-tag": /^DOCTYPE/i,
|
|
154
|
+
name: /[^\s<>'"]+/
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
cdata: {
|
|
158
|
+
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
159
|
+
greedy: !0
|
|
160
|
+
},
|
|
161
|
+
tag: {
|
|
162
|
+
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
|
|
163
|
+
greedy: !0,
|
|
164
|
+
inside: {
|
|
165
|
+
tag: {
|
|
166
|
+
pattern: /^<\/?[^\s>\/]+/,
|
|
167
|
+
inside: {
|
|
168
|
+
punctuation: /^<\/?/,
|
|
169
|
+
namespace: /^[^\s>\/:]+:/
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"special-attr": [],
|
|
173
|
+
"attr-value": {
|
|
174
|
+
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
|
|
175
|
+
inside: { punctuation: [{
|
|
176
|
+
pattern: /^=/,
|
|
177
|
+
alias: "attr-equals"
|
|
178
|
+
}, {
|
|
179
|
+
pattern: /^(\s*)["']|["']$/,
|
|
180
|
+
lookbehind: !0
|
|
181
|
+
}] }
|
|
182
|
+
},
|
|
183
|
+
punctuation: /\/?>/,
|
|
184
|
+
"attr-name": {
|
|
185
|
+
pattern: /[^\s>\/]+/,
|
|
186
|
+
inside: { namespace: /^[^\s>\/:]+:/ }
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
entity: [{
|
|
191
|
+
pattern: /&[\da-z]{1,8};/i,
|
|
192
|
+
alias: "named-entity"
|
|
193
|
+
}, /&#x?[\da-f]{1,8};/i]
|
|
194
|
+
}, globalThis.Prism.languages.markup.tag.inside["attr-value"].inside.entity = globalThis.Prism.languages.markup.entity, globalThis.Prism.languages.markup.doctype.inside["internal-subset"].inside = globalThis.Prism.languages.markup, globalThis.Prism.hooks.add("wrap", function(e) {
|
|
195
|
+
e.type === "entity" && (e.attributes.title = e.content.replace(/&/, "&"));
|
|
196
|
+
}), Object.defineProperty(globalThis.Prism.languages.markup.tag, "addInlined", { value: function(e, t) {
|
|
197
|
+
var n = {};
|
|
198
|
+
n["language-" + t] = {
|
|
199
|
+
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
200
|
+
lookbehind: !0,
|
|
201
|
+
inside: globalThis.Prism.languages[t]
|
|
202
|
+
}, n.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
203
|
+
var r = { "included-cdata": {
|
|
204
|
+
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
205
|
+
inside: n
|
|
206
|
+
} };
|
|
207
|
+
r["language-" + t] = {
|
|
208
|
+
pattern: /[\s\S]+/,
|
|
209
|
+
inside: globalThis.Prism.languages[t]
|
|
210
|
+
};
|
|
211
|
+
var i = {};
|
|
212
|
+
i[e] = {
|
|
213
|
+
pattern: RegExp("(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)".replace(/__/g, function() {
|
|
214
|
+
return e;
|
|
215
|
+
}), "i"),
|
|
216
|
+
lookbehind: !0,
|
|
217
|
+
greedy: !0,
|
|
218
|
+
inside: r
|
|
219
|
+
}, globalThis.Prism.languages.insertBefore("markup", "cdata", i);
|
|
220
|
+
} }), Object.defineProperty(globalThis.Prism.languages.markup.tag, "addAttribute", { value: function(e, t) {
|
|
221
|
+
globalThis.Prism.languages.markup.tag.inside["special-attr"].push({
|
|
222
|
+
pattern: RegExp("(^|[\"'\\s])(?:" + e + ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))", "i"),
|
|
223
|
+
lookbehind: !0,
|
|
224
|
+
inside: {
|
|
225
|
+
"attr-name": /^[^\s=]+/,
|
|
226
|
+
"attr-value": {
|
|
227
|
+
pattern: /=[\s\S]+/,
|
|
228
|
+
inside: {
|
|
229
|
+
value: {
|
|
230
|
+
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
231
|
+
lookbehind: !0,
|
|
232
|
+
alias: [t, "language-" + t],
|
|
233
|
+
inside: globalThis.Prism.languages[t]
|
|
234
|
+
},
|
|
235
|
+
punctuation: [{
|
|
236
|
+
pattern: /^=/,
|
|
237
|
+
alias: "attr-equals"
|
|
238
|
+
}, /"|'/]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
} }), globalThis.Prism.languages.html = globalThis.Prism.languages.markup, globalThis.Prism.languages.mathml = globalThis.Prism.languages.markup, globalThis.Prism.languages.svg = globalThis.Prism.languages.markup, globalThis.Prism.languages.xml = globalThis.Prism.languages.extend("markup", {}), globalThis.Prism.languages.ssml = globalThis.Prism.languages.xml, globalThis.Prism.languages.atom = globalThis.Prism.languages.xml, globalThis.Prism.languages.rss = globalThis.Prism.languages.xml, (function(e) {
|
|
244
|
+
var t = "(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))";
|
|
245
|
+
function n(e) {
|
|
246
|
+
return e = e.replace(/<inner>/g, function() {
|
|
247
|
+
return t;
|
|
248
|
+
}), RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:" + e + ")");
|
|
249
|
+
}
|
|
250
|
+
var r = "(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+", i = "\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))".replace(/__/g, function() {
|
|
251
|
+
return r;
|
|
252
|
+
}), a = "\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)";
|
|
253
|
+
globalThis.Prism.languages.markdown = globalThis.Prism.languages.extend("markup", {}), globalThis.Prism.languages.insertBefore("markdown", "prolog", {
|
|
254
|
+
"front-matter-block": {
|
|
255
|
+
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
|
256
|
+
lookbehind: !0,
|
|
257
|
+
greedy: !0,
|
|
258
|
+
inside: {
|
|
259
|
+
punctuation: /^---|---$/,
|
|
260
|
+
"front-matter": {
|
|
261
|
+
pattern: /\S+(?:\s+\S+)*/,
|
|
262
|
+
alias: ["yaml", "language-yaml"],
|
|
263
|
+
inside: globalThis.Prism.languages.yaml
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
blockquote: {
|
|
268
|
+
pattern: /^>(?:[\t ]*>)*/m,
|
|
269
|
+
alias: "punctuation"
|
|
270
|
+
},
|
|
271
|
+
table: {
|
|
272
|
+
pattern: RegExp("^" + i + a + "(?:" + i + ")*", "m"),
|
|
273
|
+
inside: {
|
|
274
|
+
"table-data-rows": {
|
|
275
|
+
pattern: RegExp("^(" + i + a + ")(?:" + i + ")*$"),
|
|
276
|
+
lookbehind: !0,
|
|
277
|
+
inside: {
|
|
278
|
+
"table-data": {
|
|
279
|
+
pattern: RegExp(r),
|
|
280
|
+
inside: globalThis.Prism.languages.markdown
|
|
281
|
+
},
|
|
282
|
+
punctuation: /\|/
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"table-line": {
|
|
286
|
+
pattern: RegExp("^(" + i + ")" + a + "$"),
|
|
287
|
+
lookbehind: !0,
|
|
288
|
+
inside: { punctuation: /\||:?-{3,}:?/ }
|
|
289
|
+
},
|
|
290
|
+
"table-header-row": {
|
|
291
|
+
pattern: RegExp("^" + i + "$"),
|
|
292
|
+
inside: {
|
|
293
|
+
"table-header": {
|
|
294
|
+
pattern: RegExp(r),
|
|
295
|
+
alias: "important",
|
|
296
|
+
inside: globalThis.Prism.languages.markdown
|
|
297
|
+
},
|
|
298
|
+
punctuation: /\|/
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
code: [{
|
|
304
|
+
pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
|
|
305
|
+
lookbehind: !0,
|
|
306
|
+
alias: "keyword"
|
|
307
|
+
}, {
|
|
308
|
+
pattern: /^```[\s\S]*?^```$/m,
|
|
309
|
+
greedy: !0,
|
|
310
|
+
inside: {
|
|
311
|
+
"code-block": {
|
|
312
|
+
pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
|
|
313
|
+
lookbehind: !0
|
|
314
|
+
},
|
|
315
|
+
"code-language": {
|
|
316
|
+
pattern: /^(```).+/,
|
|
317
|
+
lookbehind: !0
|
|
318
|
+
},
|
|
319
|
+
punctuation: /```/
|
|
320
|
+
}
|
|
321
|
+
}],
|
|
322
|
+
title: [{
|
|
323
|
+
pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
|
|
324
|
+
alias: "important",
|
|
325
|
+
inside: { punctuation: /==+$|--+$/ }
|
|
326
|
+
}, {
|
|
327
|
+
pattern: /(^\s*)#.+/m,
|
|
328
|
+
lookbehind: !0,
|
|
329
|
+
alias: "important",
|
|
330
|
+
inside: { punctuation: /^#+|#+$/ }
|
|
331
|
+
}],
|
|
332
|
+
hr: {
|
|
333
|
+
pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
|
|
334
|
+
lookbehind: !0,
|
|
335
|
+
alias: "punctuation"
|
|
336
|
+
},
|
|
337
|
+
list: {
|
|
338
|
+
pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
|
|
339
|
+
lookbehind: !0,
|
|
340
|
+
alias: "punctuation"
|
|
341
|
+
},
|
|
342
|
+
"url-reference": {
|
|
343
|
+
pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
|
|
344
|
+
inside: {
|
|
345
|
+
variable: {
|
|
346
|
+
pattern: /^(!?\[)[^\]]+/,
|
|
347
|
+
lookbehind: !0
|
|
348
|
+
},
|
|
349
|
+
string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
|
|
350
|
+
punctuation: /^[\[\]!:]|[<>]/
|
|
351
|
+
},
|
|
352
|
+
alias: "url"
|
|
353
|
+
},
|
|
354
|
+
bold: {
|
|
355
|
+
pattern: n("\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*"),
|
|
356
|
+
lookbehind: !0,
|
|
357
|
+
greedy: !0,
|
|
358
|
+
inside: {
|
|
359
|
+
content: {
|
|
360
|
+
pattern: /(^..)[\s\S]+(?=..$)/,
|
|
361
|
+
lookbehind: !0,
|
|
362
|
+
inside: {}
|
|
363
|
+
},
|
|
364
|
+
punctuation: /\*\*|__/
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
italic: {
|
|
368
|
+
pattern: n("\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*"),
|
|
369
|
+
lookbehind: !0,
|
|
370
|
+
greedy: !0,
|
|
371
|
+
inside: {
|
|
372
|
+
content: {
|
|
373
|
+
pattern: /(^.)[\s\S]+(?=.$)/,
|
|
374
|
+
lookbehind: !0,
|
|
375
|
+
inside: {}
|
|
376
|
+
},
|
|
377
|
+
punctuation: /[*_]/
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
strike: {
|
|
381
|
+
pattern: n("(~~?)(?:(?!~)<inner>)+\\2"),
|
|
382
|
+
lookbehind: !0,
|
|
383
|
+
greedy: !0,
|
|
384
|
+
inside: {
|
|
385
|
+
content: {
|
|
386
|
+
pattern: /(^~~?)[\s\S]+(?=\1$)/,
|
|
387
|
+
lookbehind: !0,
|
|
388
|
+
inside: {}
|
|
389
|
+
},
|
|
390
|
+
punctuation: /~~?/
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"code-snippet": {
|
|
394
|
+
pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
|
|
395
|
+
lookbehind: !0,
|
|
396
|
+
greedy: !0,
|
|
397
|
+
alias: ["code", "keyword"]
|
|
398
|
+
},
|
|
399
|
+
url: {
|
|
400
|
+
pattern: n("!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+\"(?:\\\\.|[^\"\\\\])*\")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])"),
|
|
401
|
+
lookbehind: !0,
|
|
402
|
+
greedy: !0,
|
|
403
|
+
inside: {
|
|
404
|
+
operator: /^!/,
|
|
405
|
+
content: {
|
|
406
|
+
pattern: /(^\[)[^\]]+(?=\])/,
|
|
407
|
+
lookbehind: !0,
|
|
408
|
+
inside: {}
|
|
409
|
+
},
|
|
410
|
+
variable: {
|
|
411
|
+
pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
|
|
412
|
+
lookbehind: !0
|
|
413
|
+
},
|
|
414
|
+
url: {
|
|
415
|
+
pattern: /(^\]\()[^\s)]+/,
|
|
416
|
+
lookbehind: !0
|
|
417
|
+
},
|
|
418
|
+
string: {
|
|
419
|
+
pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
|
|
420
|
+
lookbehind: !0
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}), [
|
|
425
|
+
"url",
|
|
426
|
+
"bold",
|
|
427
|
+
"italic",
|
|
428
|
+
"strike"
|
|
429
|
+
].forEach(function(e) {
|
|
430
|
+
[
|
|
431
|
+
"url",
|
|
432
|
+
"bold",
|
|
433
|
+
"italic",
|
|
434
|
+
"strike",
|
|
435
|
+
"code-snippet"
|
|
436
|
+
].forEach(function(t) {
|
|
437
|
+
e !== t && (globalThis.Prism.languages.markdown[e].inside.content.inside[t] = globalThis.Prism.languages.markdown[t]);
|
|
438
|
+
});
|
|
439
|
+
}), globalThis.Prism.hooks.add("after-tokenize", function(e) {
|
|
440
|
+
if (e.language !== "markdown" && e.language !== "md") return;
|
|
441
|
+
function t(e) {
|
|
442
|
+
if (!(!e || typeof e == "string")) for (var n = 0, r = e.length; n < r; n++) {
|
|
443
|
+
var i = e[n];
|
|
444
|
+
if (i.type !== "code") {
|
|
445
|
+
t(i.content);
|
|
446
|
+
continue;
|
|
447
|
+
}
|
|
448
|
+
var a = i.content[1], o = i.content[3];
|
|
449
|
+
if (a && o && a.type === "code-language" && o.type === "code-block" && typeof a.content == "string") {
|
|
450
|
+
var s = a.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
|
451
|
+
s = (/[a-z][\w-]*/i.exec(s) || [""])[0].toLowerCase();
|
|
452
|
+
var c = "language-" + s;
|
|
453
|
+
o.alias ? typeof o.alias == "string" ? o.alias = [o.alias, c] : o.alias.push(c) : o.alias = [c];
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
t(e.tokens);
|
|
458
|
+
}), globalThis.Prism.hooks.add("wrap", function(e) {
|
|
459
|
+
if (e.type === "code-block") {
|
|
460
|
+
for (var t = "", n = 0, r = e.classes.length; n < r; n++) {
|
|
461
|
+
var i = e.classes[n], a = /language-(.+)/.exec(i);
|
|
462
|
+
if (a) {
|
|
463
|
+
t = a[1];
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
var o = globalThis.Prism.languages[t];
|
|
468
|
+
if (o) e.content = globalThis.Prism.highlight(l(e.content), o, t);
|
|
469
|
+
else if (t && t !== "none" && globalThis.Prism.plugins.autoloader) {
|
|
470
|
+
var s = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 0x2386f26fc10000);
|
|
471
|
+
e.attributes.id = s, globalThis.Prism.plugins.autoloader.loadLanguages(t, function() {
|
|
472
|
+
var e = document.getElementById(s);
|
|
473
|
+
e && (e.innerHTML = globalThis.Prism.highlight(e.textContent, globalThis.Prism.languages[t], t));
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
var o = RegExp(globalThis.Prism.languages.markup.tag.pattern.source, "gi"), s = {
|
|
479
|
+
amp: "&",
|
|
480
|
+
lt: "<",
|
|
481
|
+
gt: ">",
|
|
482
|
+
quot: "\""
|
|
483
|
+
}, c = String.fromCodePoint || String.fromCharCode;
|
|
484
|
+
function l(e) {
|
|
485
|
+
var t = e.replace(o, "");
|
|
486
|
+
return t = t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(e, t) {
|
|
487
|
+
return t = t.toLowerCase(), t[0] === "#" ? c(t[1] === "x" ? parseInt(t.slice(2), 16) : Number(t.slice(1))) : s[t] || e;
|
|
488
|
+
}), t;
|
|
489
|
+
}
|
|
490
|
+
globalThis.Prism.languages.md = globalThis.Prism.languages.markdown;
|
|
491
|
+
})(globalThis.Prism), globalThis.Prism.languages.c = globalThis.Prism.languages.extend("clike", {
|
|
492
|
+
comment: {
|
|
493
|
+
pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
494
|
+
greedy: !0
|
|
495
|
+
},
|
|
496
|
+
string: {
|
|
497
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
498
|
+
greedy: !0
|
|
499
|
+
},
|
|
500
|
+
"class-name": {
|
|
501
|
+
pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
|
|
502
|
+
lookbehind: !0
|
|
503
|
+
},
|
|
504
|
+
keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
|
|
505
|
+
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
506
|
+
number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
|
|
507
|
+
operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
|
|
508
|
+
}), globalThis.Prism.languages.insertBefore("c", "string", { char: {
|
|
509
|
+
pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
|
|
510
|
+
greedy: !0
|
|
511
|
+
} }), globalThis.Prism.languages.insertBefore("c", "string", { macro: {
|
|
512
|
+
pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
|
|
513
|
+
lookbehind: !0,
|
|
514
|
+
greedy: !0,
|
|
515
|
+
alias: "property",
|
|
516
|
+
inside: {
|
|
517
|
+
string: [{
|
|
518
|
+
pattern: /^(#\s*include\s*)<[^>]+>/,
|
|
519
|
+
lookbehind: !0
|
|
520
|
+
}, globalThis.Prism.languages.c.string],
|
|
521
|
+
char: globalThis.Prism.languages.c.char,
|
|
522
|
+
comment: globalThis.Prism.languages.c.comment,
|
|
523
|
+
"macro-name": [{
|
|
524
|
+
pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
|
|
525
|
+
lookbehind: !0
|
|
526
|
+
}, {
|
|
527
|
+
pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
|
|
528
|
+
lookbehind: !0,
|
|
529
|
+
alias: "function"
|
|
530
|
+
}],
|
|
531
|
+
directive: {
|
|
532
|
+
pattern: /^(#\s*)[a-z]+/,
|
|
533
|
+
lookbehind: !0,
|
|
534
|
+
alias: "keyword"
|
|
535
|
+
},
|
|
536
|
+
"directive-hash": /^#/,
|
|
537
|
+
punctuation: /##|\\(?=[\r\n])/,
|
|
538
|
+
expression: {
|
|
539
|
+
pattern: /\S[\s\S]*/,
|
|
540
|
+
inside: globalThis.Prism.languages.c
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
} }), globalThis.Prism.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete globalThis.Prism.languages.c.boolean, (function(e) {
|
|
544
|
+
var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
545
|
+
globalThis.Prism.languages.css = {
|
|
546
|
+
comment: /\/\*[\s\S]*?\*\//,
|
|
547
|
+
atrule: {
|
|
548
|
+
pattern: RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|" + t.source + ")*?(?:;|(?=\\s*\\{))"),
|
|
549
|
+
inside: {
|
|
550
|
+
rule: /^@[\w-]+/,
|
|
551
|
+
"selector-function-argument": {
|
|
552
|
+
pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
|
|
553
|
+
lookbehind: !0,
|
|
554
|
+
alias: "selector"
|
|
555
|
+
},
|
|
556
|
+
keyword: {
|
|
557
|
+
pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
|
|
558
|
+
lookbehind: !0
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
url: {
|
|
563
|
+
pattern: RegExp("\\burl\\((?:" + t.source + "|(?:[^\\\\\\r\\n()\"']|\\\\[\\s\\S])*)\\)", "i"),
|
|
564
|
+
greedy: !0,
|
|
565
|
+
inside: {
|
|
566
|
+
function: /^url/i,
|
|
567
|
+
punctuation: /^\(|\)$/,
|
|
568
|
+
string: {
|
|
569
|
+
pattern: RegExp("^" + t.source + "$"),
|
|
570
|
+
alias: "url"
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
selector: {
|
|
575
|
+
pattern: RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + t.source + ")*(?=\\s*\\{)"),
|
|
576
|
+
lookbehind: !0
|
|
577
|
+
},
|
|
578
|
+
string: {
|
|
579
|
+
pattern: t,
|
|
580
|
+
greedy: !0
|
|
581
|
+
},
|
|
582
|
+
property: {
|
|
583
|
+
pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
|
|
584
|
+
lookbehind: !0
|
|
585
|
+
},
|
|
586
|
+
important: /!important\b/i,
|
|
587
|
+
function: {
|
|
588
|
+
pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
|
|
589
|
+
lookbehind: !0
|
|
590
|
+
},
|
|
591
|
+
punctuation: /[(){};:,]/
|
|
592
|
+
}, globalThis.Prism.languages.css.atrule.inside.rest = globalThis.Prism.languages.css;
|
|
593
|
+
var n = globalThis.Prism.languages.markup;
|
|
594
|
+
n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
|
|
595
|
+
})(globalThis.Prism), globalThis.Prism.languages.objectivec = globalThis.Prism.languages.extend("c", {
|
|
596
|
+
string: {
|
|
597
|
+
pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
598
|
+
greedy: !0
|
|
599
|
+
},
|
|
600
|
+
keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,
|
|
601
|
+
operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
|
|
602
|
+
}), delete globalThis.Prism.languages.objectivec["class-name"], globalThis.Prism.languages.objc = globalThis.Prism.languages.objectivec, globalThis.Prism.languages.sql = {
|
|
603
|
+
comment: {
|
|
604
|
+
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
|
|
605
|
+
lookbehind: !0
|
|
606
|
+
},
|
|
607
|
+
variable: [{
|
|
608
|
+
pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
|
|
609
|
+
greedy: !0
|
|
610
|
+
}, /@[\w.$]+/],
|
|
611
|
+
string: {
|
|
612
|
+
pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
|
|
613
|
+
greedy: !0,
|
|
614
|
+
lookbehind: !0
|
|
615
|
+
},
|
|
616
|
+
identifier: {
|
|
617
|
+
pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
|
|
618
|
+
greedy: !0,
|
|
619
|
+
lookbehind: !0,
|
|
620
|
+
inside: { punctuation: /^`|`$/ }
|
|
621
|
+
},
|
|
622
|
+
function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,
|
|
623
|
+
keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
|
|
624
|
+
boolean: /\b(?:FALSE|NULL|TRUE)\b/i,
|
|
625
|
+
number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
|
|
626
|
+
operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
|
|
627
|
+
punctuation: /[;[\]()`,.]/
|
|
628
|
+
}, (function(e) {
|
|
629
|
+
var t = globalThis.Prism.languages.powershell = {
|
|
630
|
+
comment: [{
|
|
631
|
+
pattern: /(^|[^`])<#[\s\S]*?#>/,
|
|
632
|
+
lookbehind: !0
|
|
633
|
+
}, {
|
|
634
|
+
pattern: /(^|[^`])#.*/,
|
|
635
|
+
lookbehind: !0
|
|
636
|
+
}],
|
|
637
|
+
string: [{
|
|
638
|
+
pattern: /"(?:`[\s\S]|[^`"])*"/,
|
|
639
|
+
greedy: !0,
|
|
640
|
+
inside: null
|
|
641
|
+
}, {
|
|
642
|
+
pattern: /'(?:[^']|'')*'/,
|
|
643
|
+
greedy: !0
|
|
644
|
+
}],
|
|
645
|
+
namespace: /\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,
|
|
646
|
+
boolean: /\$(?:false|true)\b/i,
|
|
647
|
+
variable: /\$\w+\b/,
|
|
648
|
+
function: [/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i, /\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],
|
|
649
|
+
keyword: /\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,
|
|
650
|
+
operator: {
|
|
651
|
+
pattern: /(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,
|
|
652
|
+
lookbehind: !0
|
|
653
|
+
},
|
|
654
|
+
punctuation: /[|{}[\];(),.]/
|
|
655
|
+
};
|
|
656
|
+
t.string[0].inside = {
|
|
657
|
+
function: {
|
|
658
|
+
pattern: /(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,
|
|
659
|
+
lookbehind: !0,
|
|
660
|
+
inside: t
|
|
661
|
+
},
|
|
662
|
+
boolean: t.boolean,
|
|
663
|
+
variable: t.variable
|
|
664
|
+
};
|
|
665
|
+
})(globalThis.Prism), globalThis.Prism.languages.python = {
|
|
666
|
+
comment: {
|
|
667
|
+
pattern: /(^|[^\\])#.*/,
|
|
668
|
+
lookbehind: !0,
|
|
669
|
+
greedy: !0
|
|
670
|
+
},
|
|
671
|
+
"string-interpolation": {
|
|
672
|
+
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
|
|
673
|
+
greedy: !0,
|
|
674
|
+
inside: {
|
|
675
|
+
interpolation: {
|
|
676
|
+
pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
|
|
677
|
+
lookbehind: !0,
|
|
678
|
+
inside: {
|
|
679
|
+
"format-spec": {
|
|
680
|
+
pattern: /(:)[^:(){}]+(?=\}$)/,
|
|
681
|
+
lookbehind: !0
|
|
682
|
+
},
|
|
683
|
+
"conversion-option": {
|
|
684
|
+
pattern: //,
|
|
685
|
+
alias: "punctuation"
|
|
686
|
+
},
|
|
687
|
+
rest: null
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
string: /[\s\S]+/
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
"triple-quoted-string": {
|
|
694
|
+
pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
|
|
695
|
+
greedy: !0,
|
|
696
|
+
alias: "string"
|
|
697
|
+
},
|
|
698
|
+
string: {
|
|
699
|
+
pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
|
|
700
|
+
greedy: !0
|
|
701
|
+
},
|
|
702
|
+
function: {
|
|
703
|
+
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
|
|
704
|
+
lookbehind: !0
|
|
705
|
+
},
|
|
706
|
+
"class-name": {
|
|
707
|
+
pattern: /(\bclass\s+)\w+/i,
|
|
708
|
+
lookbehind: !0
|
|
709
|
+
},
|
|
710
|
+
decorator: {
|
|
711
|
+
pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
|
|
712
|
+
lookbehind: !0,
|
|
713
|
+
alias: ["annotation", "punctuation"],
|
|
714
|
+
inside: { punctuation: /\./ }
|
|
715
|
+
},
|
|
716
|
+
keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
|
|
717
|
+
builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
|
|
718
|
+
boolean: /\b(?:False|None|True)\b/,
|
|
719
|
+
number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
|
|
720
|
+
operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
721
|
+
punctuation: /[{}[\];(),.:]/
|
|
722
|
+
}, globalThis.Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = globalThis.Prism.languages.python, globalThis.Prism.languages.py = globalThis.Prism.languages.python, (function(e) {
|
|
723
|
+
for (var t = "\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/", n = 0; n < 2; n++) t = t.replace(/<self>/g, function() {
|
|
724
|
+
return t;
|
|
725
|
+
});
|
|
726
|
+
t = t.replace(/<self>/g, function() {
|
|
727
|
+
return "[^\\s\\S]";
|
|
728
|
+
}), globalThis.Prism.languages.rust = {
|
|
729
|
+
comment: [{
|
|
730
|
+
pattern: RegExp("(^|[^\\\\])" + t),
|
|
731
|
+
lookbehind: !0,
|
|
732
|
+
greedy: !0
|
|
733
|
+
}, {
|
|
734
|
+
pattern: /(^|[^\\:])\/\/.*/,
|
|
735
|
+
lookbehind: !0,
|
|
736
|
+
greedy: !0
|
|
737
|
+
}],
|
|
738
|
+
string: {
|
|
739
|
+
pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,
|
|
740
|
+
greedy: !0
|
|
741
|
+
},
|
|
742
|
+
char: {
|
|
743
|
+
pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,
|
|
744
|
+
greedy: !0
|
|
745
|
+
},
|
|
746
|
+
attribute: {
|
|
747
|
+
pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,
|
|
748
|
+
greedy: !0,
|
|
749
|
+
alias: "attr-name",
|
|
750
|
+
inside: { string: null }
|
|
751
|
+
},
|
|
752
|
+
"closure-params": {
|
|
753
|
+
pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,
|
|
754
|
+
lookbehind: !0,
|
|
755
|
+
greedy: !0,
|
|
756
|
+
inside: {
|
|
757
|
+
"closure-punctuation": {
|
|
758
|
+
pattern: /^\||\|$/,
|
|
759
|
+
alias: "punctuation"
|
|
760
|
+
},
|
|
761
|
+
rest: null
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
"lifetime-annotation": {
|
|
765
|
+
pattern: /'\w+/,
|
|
766
|
+
alias: "symbol"
|
|
767
|
+
},
|
|
768
|
+
"fragment-specifier": {
|
|
769
|
+
pattern: /(\$\w+:)[a-z]+/,
|
|
770
|
+
lookbehind: !0,
|
|
771
|
+
alias: "punctuation"
|
|
772
|
+
},
|
|
773
|
+
variable: /\$\w+/,
|
|
774
|
+
"function-definition": {
|
|
775
|
+
pattern: /(\bfn\s+)\w+/,
|
|
776
|
+
lookbehind: !0,
|
|
777
|
+
alias: "function"
|
|
778
|
+
},
|
|
779
|
+
"type-definition": {
|
|
780
|
+
pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
|
|
781
|
+
lookbehind: !0,
|
|
782
|
+
alias: "class-name"
|
|
783
|
+
},
|
|
784
|
+
"module-declaration": [{
|
|
785
|
+
pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
|
|
786
|
+
lookbehind: !0,
|
|
787
|
+
alias: "namespace"
|
|
788
|
+
}, {
|
|
789
|
+
pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
|
|
790
|
+
lookbehind: !0,
|
|
791
|
+
alias: "namespace",
|
|
792
|
+
inside: { punctuation: /::/ }
|
|
793
|
+
}],
|
|
794
|
+
keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],
|
|
795
|
+
function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
|
|
796
|
+
macro: {
|
|
797
|
+
pattern: /\b\w+!/,
|
|
798
|
+
alias: "property"
|
|
799
|
+
},
|
|
800
|
+
constant: /\b[A-Z_][A-Z_\d]+\b/,
|
|
801
|
+
"class-name": /\b[A-Z]\w*\b/,
|
|
802
|
+
namespace: {
|
|
803
|
+
pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
|
|
804
|
+
inside: { punctuation: /::/ }
|
|
805
|
+
},
|
|
806
|
+
number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
|
|
807
|
+
boolean: /\b(?:false|true)\b/,
|
|
808
|
+
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
809
|
+
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
810
|
+
}, globalThis.Prism.languages.rust["closure-params"].inside.rest = globalThis.Prism.languages.rust, globalThis.Prism.languages.rust.attribute.inside.string = globalThis.Prism.languages.rust.string;
|
|
811
|
+
})(globalThis.Prism), globalThis.Prism.languages.swift = {
|
|
812
|
+
comment: {
|
|
813
|
+
pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
|
|
814
|
+
lookbehind: !0,
|
|
815
|
+
greedy: !0
|
|
816
|
+
},
|
|
817
|
+
"string-literal": [{
|
|
818
|
+
pattern: RegExp("(^|[^\"#])(?:\"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n\"])*\"|\"\"\"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\\"]|\"(?!\"\"))*\"\"\")(?![\"#])"),
|
|
819
|
+
lookbehind: !0,
|
|
820
|
+
greedy: !0,
|
|
821
|
+
inside: {
|
|
822
|
+
interpolation: {
|
|
823
|
+
pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/,
|
|
824
|
+
lookbehind: !0,
|
|
825
|
+
inside: null
|
|
826
|
+
},
|
|
827
|
+
"interpolation-punctuation": {
|
|
828
|
+
pattern: /^\)|\\\($/,
|
|
829
|
+
alias: "punctuation"
|
|
830
|
+
},
|
|
831
|
+
punctuation: /\\(?=[\r\n])/,
|
|
832
|
+
string: /[\s\S]+/
|
|
833
|
+
}
|
|
834
|
+
}, {
|
|
835
|
+
pattern: RegExp("(^|[^\"#])(#+)(?:\"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?\"|\"\"\"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?\"\"\")\\2"),
|
|
836
|
+
lookbehind: !0,
|
|
837
|
+
greedy: !0,
|
|
838
|
+
inside: {
|
|
839
|
+
interpolation: {
|
|
840
|
+
pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,
|
|
841
|
+
lookbehind: !0,
|
|
842
|
+
inside: null
|
|
843
|
+
},
|
|
844
|
+
"interpolation-punctuation": {
|
|
845
|
+
pattern: /^\)|\\#+\($/,
|
|
846
|
+
alias: "punctuation"
|
|
847
|
+
},
|
|
848
|
+
string: /[\s\S]+/
|
|
849
|
+
}
|
|
850
|
+
}],
|
|
851
|
+
directive: {
|
|
852
|
+
pattern: RegExp("#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),
|
|
853
|
+
alias: "property",
|
|
854
|
+
inside: {
|
|
855
|
+
"directive-name": /^#\w+/,
|
|
856
|
+
boolean: /\b(?:false|true)\b/,
|
|
857
|
+
number: /\b\d+(?:\.\d+)*\b/,
|
|
858
|
+
operator: /!|&&|\|\||[<>]=?/,
|
|
859
|
+
punctuation: /[(),]/
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
literal: {
|
|
863
|
+
pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,
|
|
864
|
+
alias: "constant"
|
|
865
|
+
},
|
|
866
|
+
"other-directive": {
|
|
867
|
+
pattern: /#\w+\b/,
|
|
868
|
+
alias: "property"
|
|
869
|
+
},
|
|
870
|
+
attribute: {
|
|
871
|
+
pattern: /@\w+/,
|
|
872
|
+
alias: "atrule"
|
|
873
|
+
},
|
|
874
|
+
"function-definition": {
|
|
875
|
+
pattern: /(\bfunc\s+)\w+/,
|
|
876
|
+
lookbehind: !0,
|
|
877
|
+
alias: "function"
|
|
878
|
+
},
|
|
879
|
+
label: {
|
|
880
|
+
pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,
|
|
881
|
+
lookbehind: !0,
|
|
882
|
+
alias: "important"
|
|
883
|
+
},
|
|
884
|
+
keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
|
|
885
|
+
boolean: /\b(?:false|true)\b/,
|
|
886
|
+
nil: {
|
|
887
|
+
pattern: /\bnil\b/,
|
|
888
|
+
alias: "constant"
|
|
889
|
+
},
|
|
890
|
+
"short-argument": /\$\d+\b/,
|
|
891
|
+
omit: {
|
|
892
|
+
pattern: /\b_\b/,
|
|
893
|
+
alias: "keyword"
|
|
894
|
+
},
|
|
895
|
+
number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
|
|
896
|
+
"class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,
|
|
897
|
+
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
898
|
+
constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
|
|
899
|
+
operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,
|
|
900
|
+
punctuation: /[{}[\]();,.:\\]/
|
|
901
|
+
}, globalThis.Prism.languages.swift["string-literal"].forEach(function(e) {
|
|
902
|
+
e.inside.interpolation.inside = globalThis.Prism.languages.swift;
|
|
903
|
+
}), (function(e) {
|
|
904
|
+
globalThis.Prism.languages.typescript = globalThis.Prism.languages.extend("javascript", {
|
|
905
|
+
"class-name": {
|
|
906
|
+
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
|
|
907
|
+
lookbehind: !0,
|
|
908
|
+
greedy: !0,
|
|
909
|
+
inside: null
|
|
910
|
+
},
|
|
911
|
+
builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
|
|
912
|
+
}), globalThis.Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete globalThis.Prism.languages.typescript.parameter, delete globalThis.Prism.languages.typescript["literal-property"];
|
|
913
|
+
var t = globalThis.Prism.languages.extend("typescript", {});
|
|
914
|
+
delete t["class-name"], globalThis.Prism.languages.typescript["class-name"].inside = t, globalThis.Prism.languages.insertBefore("typescript", "function", {
|
|
915
|
+
decorator: {
|
|
916
|
+
pattern: /@[$\w\xA0-\uFFFF]+/,
|
|
917
|
+
inside: {
|
|
918
|
+
at: {
|
|
919
|
+
pattern: /^@/,
|
|
920
|
+
alias: "operator"
|
|
921
|
+
},
|
|
922
|
+
function: /^[\s\S]+/
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"generic-function": {
|
|
926
|
+
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
|
|
927
|
+
greedy: !0,
|
|
928
|
+
inside: {
|
|
929
|
+
function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
|
|
930
|
+
generic: {
|
|
931
|
+
pattern: /<[\s\S]+/,
|
|
932
|
+
alias: "class-name",
|
|
933
|
+
inside: t
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}), globalThis.Prism.languages.ts = globalThis.Prism.languages.typescript;
|
|
938
|
+
})(globalThis.Prism), (function(e) {
|
|
939
|
+
var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = "(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*", r = {
|
|
940
|
+
pattern: RegExp("(^|[^\\w.])" + n + "[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),
|
|
941
|
+
lookbehind: !0,
|
|
942
|
+
inside: {
|
|
943
|
+
namespace: {
|
|
944
|
+
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
|
945
|
+
inside: { punctuation: /\./ }
|
|
946
|
+
},
|
|
947
|
+
punctuation: /\./
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
globalThis.Prism.languages.java = globalThis.Prism.languages.extend("clike", {
|
|
951
|
+
string: {
|
|
952
|
+
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
|
953
|
+
lookbehind: !0,
|
|
954
|
+
greedy: !0
|
|
955
|
+
},
|
|
956
|
+
"class-name": [
|
|
957
|
+
r,
|
|
958
|
+
{
|
|
959
|
+
pattern: RegExp("(^|[^\\w.])" + n + "[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)"),
|
|
960
|
+
lookbehind: !0,
|
|
961
|
+
inside: r.inside
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
pattern: RegExp("(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)" + n + "[A-Z]\\w*\\b"),
|
|
965
|
+
lookbehind: !0,
|
|
966
|
+
inside: r.inside
|
|
967
|
+
}
|
|
968
|
+
],
|
|
969
|
+
keyword: t,
|
|
970
|
+
function: [globalThis.Prism.languages.clike.function, {
|
|
971
|
+
pattern: /(::\s*)[a-z_]\w*/,
|
|
972
|
+
lookbehind: !0
|
|
973
|
+
}],
|
|
974
|
+
number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
|
|
975
|
+
operator: {
|
|
976
|
+
pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
|
|
977
|
+
lookbehind: !0
|
|
978
|
+
},
|
|
979
|
+
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
980
|
+
}), globalThis.Prism.languages.insertBefore("java", "string", {
|
|
981
|
+
"triple-quoted-string": {
|
|
982
|
+
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
983
|
+
greedy: !0,
|
|
984
|
+
alias: "string"
|
|
985
|
+
},
|
|
986
|
+
char: {
|
|
987
|
+
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
|
988
|
+
greedy: !0
|
|
989
|
+
}
|
|
990
|
+
}), globalThis.Prism.languages.insertBefore("java", "class-name", {
|
|
991
|
+
annotation: {
|
|
992
|
+
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
993
|
+
lookbehind: !0,
|
|
994
|
+
alias: "punctuation"
|
|
995
|
+
},
|
|
996
|
+
generics: {
|
|
997
|
+
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
998
|
+
inside: {
|
|
999
|
+
"class-name": r,
|
|
1000
|
+
keyword: t,
|
|
1001
|
+
punctuation: /[<>(),.:]/,
|
|
1002
|
+
operator: /[?&|]/
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
import: [{
|
|
1006
|
+
pattern: RegExp("(\\bimport\\s+)" + n + "(?:[A-Z]\\w*|\\*)(?=\\s*;)"),
|
|
1007
|
+
lookbehind: !0,
|
|
1008
|
+
inside: {
|
|
1009
|
+
namespace: r.inside.namespace,
|
|
1010
|
+
punctuation: /\./,
|
|
1011
|
+
operator: /\*/,
|
|
1012
|
+
"class-name": /\w+/
|
|
1013
|
+
}
|
|
1014
|
+
}, {
|
|
1015
|
+
pattern: RegExp("(\\bimport\\s+static\\s+)" + n + "(?:\\w+|\\*)(?=\\s*;)"),
|
|
1016
|
+
lookbehind: !0,
|
|
1017
|
+
alias: "static",
|
|
1018
|
+
inside: {
|
|
1019
|
+
namespace: r.inside.namespace,
|
|
1020
|
+
static: /\b\w+$/,
|
|
1021
|
+
punctuation: /\./,
|
|
1022
|
+
operator: /\*/,
|
|
1023
|
+
"class-name": /\w+/
|
|
1024
|
+
}
|
|
1025
|
+
}],
|
|
1026
|
+
namespace: {
|
|
1027
|
+
pattern: RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(/<keyword>/g, function() {
|
|
1028
|
+
return t.source;
|
|
1029
|
+
})),
|
|
1030
|
+
lookbehind: !0,
|
|
1031
|
+
inside: { punctuation: /\./ }
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
})(globalThis.Prism), (function(e) {
|
|
1035
|
+
var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, n = "\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(/<keyword>/g, function() {
|
|
1036
|
+
return t.source;
|
|
1037
|
+
});
|
|
1038
|
+
globalThis.Prism.languages.cpp = globalThis.Prism.languages.extend("c", {
|
|
1039
|
+
"class-name": [
|
|
1040
|
+
{
|
|
1041
|
+
pattern: RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+".replace(/<keyword>/g, function() {
|
|
1042
|
+
return t.source;
|
|
1043
|
+
})),
|
|
1044
|
+
lookbehind: !0
|
|
1045
|
+
},
|
|
1046
|
+
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
|
|
1047
|
+
/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
|
|
1048
|
+
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
|
1049
|
+
],
|
|
1050
|
+
keyword: t,
|
|
1051
|
+
number: {
|
|
1052
|
+
pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
|
1053
|
+
greedy: !0
|
|
1054
|
+
},
|
|
1055
|
+
operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
|
1056
|
+
boolean: /\b(?:false|true)\b/
|
|
1057
|
+
}), globalThis.Prism.languages.insertBefore("cpp", "string", {
|
|
1058
|
+
module: {
|
|
1059
|
+
pattern: RegExp("(\\b(?:import|module)\\s+)(?:\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|<[^<>\\r\\n]*>|" + "<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>".replace(/<mod-name>/g, function() {
|
|
1060
|
+
return n;
|
|
1061
|
+
}) + ")"),
|
|
1062
|
+
lookbehind: !0,
|
|
1063
|
+
greedy: !0,
|
|
1064
|
+
inside: {
|
|
1065
|
+
string: /^[<"][\s\S]+/,
|
|
1066
|
+
operator: /:/,
|
|
1067
|
+
punctuation: /\./
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
"raw-string": {
|
|
1071
|
+
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
|
1072
|
+
alias: "string",
|
|
1073
|
+
greedy: !0
|
|
1074
|
+
}
|
|
1075
|
+
}), globalThis.Prism.languages.insertBefore("cpp", "keyword", { "generic-function": {
|
|
1076
|
+
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
|
1077
|
+
inside: {
|
|
1078
|
+
function: /^\w+/,
|
|
1079
|
+
generic: {
|
|
1080
|
+
pattern: /<[\s\S]+/,
|
|
1081
|
+
alias: "class-name",
|
|
1082
|
+
inside: globalThis.Prism.languages.cpp
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
} }), globalThis.Prism.languages.insertBefore("cpp", "operator", { "double-colon": {
|
|
1086
|
+
pattern: /::/,
|
|
1087
|
+
alias: "punctuation"
|
|
1088
|
+
} }), globalThis.Prism.languages.insertBefore("cpp", "class-name", { "base-clause": {
|
|
1089
|
+
pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
|
1090
|
+
lookbehind: !0,
|
|
1091
|
+
greedy: !0,
|
|
1092
|
+
inside: globalThis.Prism.languages.extend("cpp", {})
|
|
1093
|
+
} }), globalThis.Prism.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, globalThis.Prism.languages.cpp["base-clause"]);
|
|
1094
|
+
})(globalThis.Prism);
|
|
1095
|
+
//#endregion
|
|
1096
|
+
//#region node_modules/@lexical/code-prism/LexicalCodePrism.prod.mjs
|
|
1097
|
+
function B(e, ...t) {
|
|
1098
|
+
let n = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
1099
|
+
r.append("code", e);
|
|
1100
|
+
for (let e of t) r.append("v", e);
|
|
1101
|
+
throw n.search = r.toString(), Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
1102
|
+
}
|
|
1103
|
+
(function(e) {
|
|
1104
|
+
e.languages.diff = { coord: [
|
|
1105
|
+
/^(?:\*{3}|-{3}|\+{3}).*$/m,
|
|
1106
|
+
/^@@.*@@$/m,
|
|
1107
|
+
/^\d.*$/m
|
|
1108
|
+
] };
|
|
1109
|
+
var t = {
|
|
1110
|
+
"deleted-sign": "-",
|
|
1111
|
+
"deleted-arrow": "<",
|
|
1112
|
+
"inserted-sign": "+",
|
|
1113
|
+
"inserted-arrow": ">",
|
|
1114
|
+
unchanged: " ",
|
|
1115
|
+
diff: "!"
|
|
1116
|
+
};
|
|
1117
|
+
Object.keys(t).forEach(function(n) {
|
|
1118
|
+
var r = t[n], i = [];
|
|
1119
|
+
/^\w+$/.test(n) || i.push(/\w+/.exec(n)[0]), n === "diff" && i.push("bold"), e.languages.diff[n] = {
|
|
1120
|
+
pattern: RegExp("^(?:[" + r + "].*(?:\r\n?|\n|(?![\\s\\S])))+", "m"),
|
|
1121
|
+
alias: i,
|
|
1122
|
+
inside: {
|
|
1123
|
+
line: {
|
|
1124
|
+
pattern: /(.)(?=[\s\S]).*(?:\r\n?|\n)?/,
|
|
1125
|
+
lookbehind: !0
|
|
1126
|
+
},
|
|
1127
|
+
prefix: {
|
|
1128
|
+
pattern: /[\s\S]/,
|
|
1129
|
+
alias: /\w+/.exec(n)[0]
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
};
|
|
1133
|
+
}), Object.defineProperty(e.languages.diff, "PREFIXES", { value: t });
|
|
1134
|
+
})(globalThis.Prism);
|
|
1135
|
+
var V = globalThis.Prism || window.Prism;
|
|
1136
|
+
function se(e) {
|
|
1137
|
+
let t = function(e) {
|
|
1138
|
+
let t = /^diff-([\w-]+)/i.exec(e);
|
|
1139
|
+
return t ? t[1] : null;
|
|
1140
|
+
}(e) || e;
|
|
1141
|
+
try {
|
|
1142
|
+
return !!t && V.languages.hasOwnProperty(t);
|
|
1143
|
+
} catch {
|
|
1144
|
+
return !1;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
async function ce(e, t, n) {}
|
|
1148
|
+
function H(e) {
|
|
1149
|
+
return typeof e == "string" ? e : Array.isArray(e) ? e.map(H).join("") : H(e.content);
|
|
1150
|
+
}
|
|
1151
|
+
function le(e, t) {
|
|
1152
|
+
let n = /^diff-([\w-]+)/i.exec(t), r = e.getTextContent(), i = V.tokenize(r, V.languages[n ? "diff" : t]);
|
|
1153
|
+
return n && (i = function(e, t) {
|
|
1154
|
+
let n = t, r = V.languages[n], i = { tokens: e }, a = V.languages.diff.PREFIXES;
|
|
1155
|
+
for (let e of i.tokens) {
|
|
1156
|
+
if (typeof e == "string" || !(e.type in a) || !Array.isArray(e.content)) continue;
|
|
1157
|
+
let t = e.type, n = 0, i = () => (n++, new V.Token("prefix", a[t], t.replace(/^(\w+).*/, "$1"))), o = e.content.filter((e) => typeof e == "string" || e.type !== "prefix"), s = e.content.length - o.length, c = V.tokenize(H(o), r);
|
|
1158
|
+
c.unshift(i());
|
|
1159
|
+
let l = /\r\n|\n/g, u = (e) => {
|
|
1160
|
+
let t = [];
|
|
1161
|
+
l.lastIndex = 0;
|
|
1162
|
+
let r, a = 0;
|
|
1163
|
+
for (; n < s && (r = l.exec(e));) {
|
|
1164
|
+
let n = r.index + r[0].length;
|
|
1165
|
+
t.push(e.slice(a, n)), a = n, t.push(i());
|
|
1166
|
+
}
|
|
1167
|
+
if (t.length !== 0) return a < e.length && t.push(e.slice(a)), t;
|
|
1168
|
+
}, d = (e) => {
|
|
1169
|
+
for (let t = 0; t < e.length && n < s; t++) {
|
|
1170
|
+
let n = e[t];
|
|
1171
|
+
if (typeof n == "string") {
|
|
1172
|
+
let r = u(n);
|
|
1173
|
+
r && (e.splice(t, 1, ...r), t += r.length - 1);
|
|
1174
|
+
} else if (typeof n.content == "string") {
|
|
1175
|
+
let e = u(n.content);
|
|
1176
|
+
e && (n.content = e);
|
|
1177
|
+
} else Array.isArray(n.content) ? d(n.content) : d([n.content]);
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
d(c), n < s && c.push(i()), e.content = c;
|
|
1181
|
+
}
|
|
1182
|
+
return i.tokens;
|
|
1183
|
+
}(i, n[1])), U(i);
|
|
1184
|
+
}
|
|
1185
|
+
function U(e, t) {
|
|
1186
|
+
let n = [];
|
|
1187
|
+
for (let r of e) if (typeof r == "string") {
|
|
1188
|
+
let e = r.split(/(\n|\t)/), i = e.length;
|
|
1189
|
+
for (let r = 0; r < i; r++) {
|
|
1190
|
+
let i = e[r];
|
|
1191
|
+
i === "\n" || i === "\r\n" ? n.push(h()) : i === " " ? n.push(_()) : i.length > 0 && n.push(o(i, t));
|
|
1192
|
+
}
|
|
1193
|
+
} else {
|
|
1194
|
+
let { content: e, alias: t } = r;
|
|
1195
|
+
typeof e == "string" ? n.push(...U([e], r.type === "prefix" && typeof t == "string" ? t : r.type)) : Array.isArray(e) && n.push(...U(e, r.type === "unchanged" ? void 0 : r.type));
|
|
1196
|
+
}
|
|
1197
|
+
return n;
|
|
1198
|
+
}
|
|
1199
|
+
var W = {
|
|
1200
|
+
$tokenize(e, t) {
|
|
1201
|
+
return le(e, t || this.defaultLanguage);
|
|
1202
|
+
},
|
|
1203
|
+
defaultLanguage: e,
|
|
1204
|
+
tokenize(e, t) {
|
|
1205
|
+
return V.tokenize(e, V.languages[t || ""] || V.languages[this.defaultLanguage]);
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
function G(e, t, r, i) {
|
|
1209
|
+
let a = i.getParent();
|
|
1210
|
+
m(a) ? K(e, t, r, a) : n(i) && i.replace(v(i.__text));
|
|
1211
|
+
}
|
|
1212
|
+
function ue(e, t) {
|
|
1213
|
+
let n = t.getElementByKey(e.getKey());
|
|
1214
|
+
if (n === null) return;
|
|
1215
|
+
let r = e.getChildren(), i = r.length;
|
|
1216
|
+
if (i === n.__cachedChildrenLength) return;
|
|
1217
|
+
n.__cachedChildrenLength = i;
|
|
1218
|
+
let a = "1", o = 1;
|
|
1219
|
+
for (let e = 0; e < i; e++) E(r[e]) && (a += "\n" + ++o);
|
|
1220
|
+
n.setAttribute("data-gutter", a);
|
|
1221
|
+
}
|
|
1222
|
+
function K(e, t, n, r) {
|
|
1223
|
+
let { nodesCurrentlyHighlighting: i } = n, a = r.getKey();
|
|
1224
|
+
if (r.getLanguage() === void 0 && r.setLanguage(t.defaultLanguage), !se(r.getLanguage() || t.defaultLanguage)) return r.getIsSyntaxHighlightSupported() && r.setIsSyntaxHighlightSupported(!1), void ce();
|
|
1225
|
+
r.getIsSyntaxHighlightSupported() || r.setIsSyntaxHighlightSupported(!0), i.has(a) || (i.add(a), n.didTransform || (n.didTransform = !0, re(() => {
|
|
1226
|
+
n.didTransform = !1, i.clear();
|
|
1227
|
+
})), function(e, t) {
|
|
1228
|
+
let n = b(e);
|
|
1229
|
+
if (!m(n) || !n.isAttached()) return;
|
|
1230
|
+
let r = S();
|
|
1231
|
+
if (!D(r)) return void t();
|
|
1232
|
+
let i = r.anchor, a = i.offset, o = i.type === "element" && E(n.getChildAtIndex(i.offset - 1)), s = 0;
|
|
1233
|
+
if (o || (s = a + i.getNode().getPreviousSiblings().reduce((e, t) => e + t.getTextContentSize(), 0)), t()) {
|
|
1234
|
+
if (o) return void i.getNode().select(a, a);
|
|
1235
|
+
n.getChildren().some((e) => {
|
|
1236
|
+
let t = te(e);
|
|
1237
|
+
if (t || E(e)) {
|
|
1238
|
+
let n = e.getTextContentSize();
|
|
1239
|
+
if (t && n >= s) return e.select(s, s), !0;
|
|
1240
|
+
s -= n;
|
|
1241
|
+
}
|
|
1242
|
+
return !1;
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
}(a, () => {
|
|
1246
|
+
let e = b(a);
|
|
1247
|
+
if (!m(e) || !e.isAttached()) return !1;
|
|
1248
|
+
let n = e.getLanguage() || t.defaultLanguage, i = t.$tokenize(e, n), { from: o, to: s, nodesForReplacement: c } = function(e, t) {
|
|
1249
|
+
let n = 0;
|
|
1250
|
+
for (; n < e.length && q(e[n], t[n]);) n++;
|
|
1251
|
+
let r = e.length, i = t.length, a = Math.min(r, i) - n, o = 0;
|
|
1252
|
+
for (; o < a;) if (o++, !q(e[r - o], t[i - o])) {
|
|
1253
|
+
o--;
|
|
1254
|
+
break;
|
|
1255
|
+
}
|
|
1256
|
+
let s = n, c = r - o;
|
|
1257
|
+
return {
|
|
1258
|
+
from: s,
|
|
1259
|
+
nodesForReplacement: t.slice(n, i - o),
|
|
1260
|
+
to: c
|
|
1261
|
+
};
|
|
1262
|
+
}(e.getChildren(), i);
|
|
1263
|
+
return !(o === s && !c.length) && (r.splice(o, s - o, c), !0);
|
|
1264
|
+
}));
|
|
1265
|
+
}
|
|
1266
|
+
function q(e, t) {
|
|
1267
|
+
return n(e) && n(t) && e.__text === t.__text && e.__highlightType === t.__highlightType || O(e) && O(t) || E(e) && E(t);
|
|
1268
|
+
}
|
|
1269
|
+
function J(e) {
|
|
1270
|
+
if (!D(e)) return !1;
|
|
1271
|
+
let t = e.anchor.getNode(), n = m(t) ? t : t.getParent(), r = e.focus.getNode(), i = m(r) ? r : r.getParent();
|
|
1272
|
+
return m(n) && n.is(i);
|
|
1273
|
+
}
|
|
1274
|
+
function Y(e) {
|
|
1275
|
+
let t = e.getNodes(), r = [];
|
|
1276
|
+
if (t.length === 1 && m(t[0])) return r;
|
|
1277
|
+
let i = [];
|
|
1278
|
+
for (let e = 0; e < t.length; e++) {
|
|
1279
|
+
let a = t[e];
|
|
1280
|
+
n(a) || O(a) || E(a) || B(169), E(a) ? i.length > 0 && (r.push(i), i = []) : i.push(a);
|
|
1281
|
+
}
|
|
1282
|
+
if (i.length > 0) {
|
|
1283
|
+
let t = e.isBackward() ? e.anchor : e.focus, n = g(i[0].getKey(), 0, "text");
|
|
1284
|
+
t.is(n) || r.push(i);
|
|
1285
|
+
}
|
|
1286
|
+
return r;
|
|
1287
|
+
}
|
|
1288
|
+
function X(e) {
|
|
1289
|
+
let n = S();
|
|
1290
|
+
if (!D(n) || !J(n)) return !1;
|
|
1291
|
+
let r = Y(n), i = r.length;
|
|
1292
|
+
if (i === 0 && n.isCollapsed()) return e === A && n.insertNodes([_()]), !0;
|
|
1293
|
+
if (i === 0 && e === A && n.getTextContent() === "\n") {
|
|
1294
|
+
let e = _(), t = h(), r = n.isBackward() ? "previous" : "next";
|
|
1295
|
+
return n.insertNodes([e, t]), ie(ee(y(w(e, "next", 0), ne(C(t, "next"))), r)), !0;
|
|
1296
|
+
}
|
|
1297
|
+
for (let a = 0; a < i; a++) {
|
|
1298
|
+
let i = r[a];
|
|
1299
|
+
if (i.length > 0) {
|
|
1300
|
+
let r = i[0];
|
|
1301
|
+
if (a === 0 && (r = t(r)), e === A) {
|
|
1302
|
+
let e = _();
|
|
1303
|
+
if (r.insertBefore(e), a === 0) {
|
|
1304
|
+
let t = n.isBackward() ? "focus" : "anchor", i = g(r.getKey(), 0, "text");
|
|
1305
|
+
n[t].is(i) && n[t].set(e.getKey(), 0, "text");
|
|
1306
|
+
}
|
|
1307
|
+
} else O(r) && r.remove();
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
return !0;
|
|
1311
|
+
}
|
|
1312
|
+
function Z(e, r) {
|
|
1313
|
+
let i = S();
|
|
1314
|
+
if (!D(i)) return !1;
|
|
1315
|
+
let { anchor: a, focus: o } = i, s = a.offset, l = o.offset, u = a.getNode(), d = o.getNode(), f = e === N;
|
|
1316
|
+
if (!J(i) || !n(u) && !O(u) || !n(d) && !O(d)) return !1;
|
|
1317
|
+
if (!r.altKey) {
|
|
1318
|
+
if (i.isCollapsed()) {
|
|
1319
|
+
let e = u.getParentOrThrow();
|
|
1320
|
+
if (f && s === 0 && u.getPreviousSibling() === null) {
|
|
1321
|
+
if (e.getPreviousSibling() === null) return e.selectPrevious(), r.preventDefault(), !0;
|
|
1322
|
+
} else if (!f && s === u.getTextContentSize() && u.getNextSibling() === null && e.getNextSibling() === null) return e.selectNext(), r.preventDefault(), !0;
|
|
1323
|
+
}
|
|
1324
|
+
return !1;
|
|
1325
|
+
}
|
|
1326
|
+
let p, m;
|
|
1327
|
+
if (u.isBefore(d) ? (p = t(u), m = c(d)) : (p = t(d), m = c(u)), p == null || m == null) return !1;
|
|
1328
|
+
let h = p.getNodesBetween(m);
|
|
1329
|
+
for (let e = 0; e < h.length; e++) {
|
|
1330
|
+
let t = h[e];
|
|
1331
|
+
if (!n(t) && !O(t) && !E(t)) return !1;
|
|
1332
|
+
}
|
|
1333
|
+
r.preventDefault(), r.stopPropagation();
|
|
1334
|
+
let g = f ? p.getPreviousSibling() : m.getNextSibling();
|
|
1335
|
+
if (!E(g)) return !0;
|
|
1336
|
+
let _ = f ? g.getPreviousSibling() : g.getNextSibling();
|
|
1337
|
+
if (_ == null) return !0;
|
|
1338
|
+
let v = (n(_) || O(_) || E(_) ? f ? t(_) : c(_) : null) ?? _;
|
|
1339
|
+
return g.remove(), h.forEach((e) => e.remove()), e === N ? (h.forEach((e) => v.insertBefore(e)), v.insertBefore(g)) : (v.insertAfter(g), v = g, h.forEach((e) => {
|
|
1340
|
+
v.insertAfter(e), v = e;
|
|
1341
|
+
})), i.setTextNodeRange(u, s, d, l), !0;
|
|
1342
|
+
}
|
|
1343
|
+
function Q(e, t) {
|
|
1344
|
+
let r = S();
|
|
1345
|
+
if (!D(r)) return !1;
|
|
1346
|
+
let { anchor: i, focus: o } = r, s = i.getNode(), c = o.getNode(), l = e === I;
|
|
1347
|
+
if (!J(r) || !n(s) && !O(s) || !n(c) && !O(c)) return !1;
|
|
1348
|
+
let u = c;
|
|
1349
|
+
if (a(u) === "rtl" ? !l : l) {
|
|
1350
|
+
let e = f(u, o.offset);
|
|
1351
|
+
if (e !== null) {
|
|
1352
|
+
let { node: t, offset: n } = e;
|
|
1353
|
+
E(t) ? t.selectNext(0, 0) : r.setTextNodeRange(t, n, t, n);
|
|
1354
|
+
} else u.getParentOrThrow().selectStart();
|
|
1355
|
+
} else d(u).select();
|
|
1356
|
+
return t.preventDefault(), t.stopPropagation(), !0;
|
|
1357
|
+
}
|
|
1358
|
+
function $(e, n) {
|
|
1359
|
+
if (!e.hasNodes([u, l])) throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");
|
|
1360
|
+
n ??= W;
|
|
1361
|
+
let r = [];
|
|
1362
|
+
!0 !== e._headless && r.push(e.registerMutationListener(u, (t) => {
|
|
1363
|
+
e.getEditorState().read(() => {
|
|
1364
|
+
for (let [n, r] of t) if (r !== "destroyed") {
|
|
1365
|
+
let t = b(n);
|
|
1366
|
+
t !== null && ue(t, e);
|
|
1367
|
+
}
|
|
1368
|
+
});
|
|
1369
|
+
}, { skipInitialization: !1 }));
|
|
1370
|
+
let i = {
|
|
1371
|
+
didTransform: !1,
|
|
1372
|
+
nodesCurrentlyHighlighting: /* @__PURE__ */ new Set()
|
|
1373
|
+
};
|
|
1374
|
+
return r.push(e.registerNodeTransform(u, K.bind(null, e, n, i)), e.registerNodeTransform(R, G.bind(null, e, n, i)), e.registerNodeTransform(l, G.bind(null, e, n, i)), e.registerCommand(P, (n) => {
|
|
1375
|
+
let r = function(e) {
|
|
1376
|
+
let n = S();
|
|
1377
|
+
if (!D(n) || !J(n)) return null;
|
|
1378
|
+
let r = e ? L : A, i = e ? L : j, a = n.anchor, o = n.focus;
|
|
1379
|
+
if (a.is(o)) return i;
|
|
1380
|
+
let s = Y(n);
|
|
1381
|
+
if (s.length !== 1) return r;
|
|
1382
|
+
let l = s[0], u, d;
|
|
1383
|
+
l.length === 0 && B(285), n.isBackward() ? (u = o, d = a) : (u = a, d = o);
|
|
1384
|
+
let f = t(l[0]), p = c(l[0]), m = g(f.getKey(), 0, "text"), h = g(p.getKey(), p.getTextContentSize(), "text");
|
|
1385
|
+
return u.isBefore(m) || h.isBefore(d) ? r : m.isBefore(u) || d.isBefore(h) ? i : r;
|
|
1386
|
+
}(n.shiftKey);
|
|
1387
|
+
return r !== null && (n.preventDefault(), e.dispatchCommand(r, void 0), !0);
|
|
1388
|
+
}, k), e.registerCommand(j, () => !!J(S()) && (T([_()]), !0), k), e.registerCommand(A, (e) => X(A), k), e.registerCommand(L, (e) => X(L), k), e.registerCommand(N, (e) => {
|
|
1389
|
+
let t = S();
|
|
1390
|
+
if (!D(t) || !J(t)) return !1;
|
|
1391
|
+
let n = x().getFirstDescendant(), { anchor: r } = t, i = r.getNode();
|
|
1392
|
+
return (!n || !i || n.getKey() !== i.getKey()) && Z(N, e);
|
|
1393
|
+
}, k), e.registerCommand(M, (e) => {
|
|
1394
|
+
let t = S();
|
|
1395
|
+
if (!D(t) || !J(t)) return !1;
|
|
1396
|
+
let n = x().getLastDescendant(), { anchor: r } = t, i = r.getNode();
|
|
1397
|
+
return (!n || !i || n.getKey() !== i.getKey()) && Z(M, e);
|
|
1398
|
+
}, k), e.registerCommand(I, (e) => Q(I, e), k), e.registerCommand(F, (e) => Q(F, e), k)), ae(...r);
|
|
1399
|
+
}
|
|
1400
|
+
z({
|
|
1401
|
+
build: (e, t) => i(t),
|
|
1402
|
+
config: oe({
|
|
1403
|
+
disabled: !1,
|
|
1404
|
+
tokenizer: W
|
|
1405
|
+
}),
|
|
1406
|
+
dependencies: [r],
|
|
1407
|
+
name: "@lexical/code-prism",
|
|
1408
|
+
register: (e, t, n) => {
|
|
1409
|
+
let r = n.getOutput();
|
|
1410
|
+
return s(() => {
|
|
1411
|
+
if (!r.disabled.value) return $(e, r.tokenizer.value);
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
});
|
|
1415
|
+
//#endregion
|
|
1416
|
+
export { $ as registerCodeHighlighting };
|