Text Generation
Safetensors
GGUF
English
reasoning
reinforcement-learning
grpo
small-language-model
samsung-ennovatex
conversational
Instructions to use OmnipotentFool/Aurvion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use OmnipotentFool/Aurvion with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf OmnipotentFool/Aurvion:Q4_K_M # Run inference directly in the terminal: llama cli -hf OmnipotentFool/Aurvion:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf OmnipotentFool/Aurvion:Q4_K_M # Run inference directly in the terminal: llama cli -hf OmnipotentFool/Aurvion:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf OmnipotentFool/Aurvion:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf OmnipotentFool/Aurvion:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf OmnipotentFool/Aurvion:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf OmnipotentFool/Aurvion:Q4_K_M
Use Docker
docker model run hf.co/OmnipotentFool/Aurvion:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use OmnipotentFool/Aurvion with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OmnipotentFool/Aurvion" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OmnipotentFool/Aurvion", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OmnipotentFool/Aurvion:Q4_K_M
- Ollama
How to use OmnipotentFool/Aurvion with Ollama:
ollama run hf.co/OmnipotentFool/Aurvion:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use OmnipotentFool/Aurvion with Docker Model Runner:
docker model run hf.co/OmnipotentFool/Aurvion:Q4_K_M
- Lemonade
How to use OmnipotentFool/Aurvion with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OmnipotentFool/Aurvion:Q4_K_M
Run and chat with the model
lemonade run user.Aurvion-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-json.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-json5.js +23 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-json5.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsonp.js +7 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsonp.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsstacktrace.js +49 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsstacktrace.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsx.js +145 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsx.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-julia.js +35 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-julia.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keepalived.js +51 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keepalived.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keyman.js +44 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keyman.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kotlin.js +88 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kotlin.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kumir.js +106 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kumir.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kusto.js +44 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kusto.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latex.js +64 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latex.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latte.js +63 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latte.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-less.js +54 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-less.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lilypond.js +69 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lilypond.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-linker-script.js +30 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-linker-script.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-liquid.js +66 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-liquid.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lisp.js +197 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lisp.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-livescript.js +119 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-livescript.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-llvm.js +19 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-llvm.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-log.js +120 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-log.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lolcode.js +55 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lolcode.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lua.js +20 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lua.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-magma.js +35 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-magma.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-makefile.js +34 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-makefile.min.js +1 -0
- llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-markdown.js +415 -0
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-json.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-json5.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
|
| 3 |
+
var string = /("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;
|
| 4 |
+
|
| 5 |
+
Prism.languages.json5 = Prism.languages.extend('json', {
|
| 6 |
+
'property': [
|
| 7 |
+
{
|
| 8 |
+
pattern: RegExp(string.source + '(?=\\s*:)'),
|
| 9 |
+
greedy: true
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
pattern: /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,
|
| 13 |
+
alias: 'unquoted'
|
| 14 |
+
}
|
| 15 |
+
],
|
| 16 |
+
'string': {
|
| 17 |
+
pattern: string,
|
| 18 |
+
greedy: true
|
| 19 |
+
},
|
| 20 |
+
'number': /[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/
|
| 21 |
+
});
|
| 22 |
+
|
| 23 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-json5.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(n){var e=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;n.languages.json5=n.languages.extend("json",{property:[{pattern:RegExp(e.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:e,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsonp.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.jsonp = Prism.languages.extend('json', {
|
| 2 |
+
'punctuation': /[{}[\]();,.]/
|
| 3 |
+
});
|
| 4 |
+
|
| 5 |
+
Prism.languages.insertBefore('jsonp', 'punctuation', {
|
| 6 |
+
'function': /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/
|
| 7 |
+
});
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsonp.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.jsonp=Prism.languages.extend("json",{punctuation:/[{}[\]();,.]/}),Prism.languages.insertBefore("jsonp","punctuation",{function:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/});
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsstacktrace.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.jsstacktrace = {
|
| 2 |
+
'error-message': {
|
| 3 |
+
pattern: /^\S.*/m,
|
| 4 |
+
alias: 'string'
|
| 5 |
+
},
|
| 6 |
+
|
| 7 |
+
'stack-frame': {
|
| 8 |
+
pattern: /(^[ \t]+)at[ \t].*/m,
|
| 9 |
+
lookbehind: true,
|
| 10 |
+
inside: {
|
| 11 |
+
'not-my-code': {
|
| 12 |
+
pattern: /^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,
|
| 13 |
+
alias: 'comment'
|
| 14 |
+
},
|
| 15 |
+
|
| 16 |
+
'filename': {
|
| 17 |
+
pattern: /(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,
|
| 18 |
+
lookbehind: true,
|
| 19 |
+
alias: 'url'
|
| 20 |
+
},
|
| 21 |
+
|
| 22 |
+
'function': {
|
| 23 |
+
pattern: /(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,
|
| 24 |
+
lookbehind: true,
|
| 25 |
+
inside: {
|
| 26 |
+
'punctuation': /\./
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
|
| 30 |
+
'punctuation': /[()]/,
|
| 31 |
+
|
| 32 |
+
'keyword': /\b(?:at|new)\b/,
|
| 33 |
+
|
| 34 |
+
'alias': {
|
| 35 |
+
pattern: /\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,
|
| 36 |
+
alias: 'variable'
|
| 37 |
+
},
|
| 38 |
+
|
| 39 |
+
'line-number': {
|
| 40 |
+
pattern: /:\d+(?::\d+)?\b/,
|
| 41 |
+
alias: 'number',
|
| 42 |
+
inside: {
|
| 43 |
+
'punctuation': /:/
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsstacktrace.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsx.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
|
| 3 |
+
var javascript = Prism.util.clone(Prism.languages.javascript);
|
| 4 |
+
|
| 5 |
+
var space = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source;
|
| 6 |
+
var braces = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;
|
| 7 |
+
var spread = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* @param {string} source
|
| 11 |
+
* @param {string} [flags]
|
| 12 |
+
*/
|
| 13 |
+
function re(source, flags) {
|
| 14 |
+
source = source
|
| 15 |
+
.replace(/<S>/g, function () { return space; })
|
| 16 |
+
.replace(/<BRACES>/g, function () { return braces; })
|
| 17 |
+
.replace(/<SPREAD>/g, function () { return spread; });
|
| 18 |
+
return RegExp(source, flags);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
spread = re(spread).source;
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
Prism.languages.jsx = Prism.languages.extend('markup', javascript);
|
| 25 |
+
Prism.languages.jsx.tag.pattern = re(
|
| 26 |
+
/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source
|
| 27 |
+
);
|
| 28 |
+
|
| 29 |
+
Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/;
|
| 30 |
+
Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/;
|
| 31 |
+
Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/;
|
| 32 |
+
Prism.languages.jsx.tag.inside['comment'] = javascript['comment'];
|
| 33 |
+
|
| 34 |
+
Prism.languages.insertBefore('inside', 'attr-name', {
|
| 35 |
+
'spread': {
|
| 36 |
+
pattern: re(/<SPREAD>/.source),
|
| 37 |
+
inside: Prism.languages.jsx
|
| 38 |
+
}
|
| 39 |
+
}, Prism.languages.jsx.tag);
|
| 40 |
+
|
| 41 |
+
Prism.languages.insertBefore('inside', 'special-attr', {
|
| 42 |
+
'script': {
|
| 43 |
+
// Allow for two levels of nesting
|
| 44 |
+
pattern: re(/=<BRACES>/.source),
|
| 45 |
+
alias: 'language-javascript',
|
| 46 |
+
inside: {
|
| 47 |
+
'script-punctuation': {
|
| 48 |
+
pattern: /^=(?=\{)/,
|
| 49 |
+
alias: 'punctuation'
|
| 50 |
+
},
|
| 51 |
+
rest: Prism.languages.jsx
|
| 52 |
+
},
|
| 53 |
+
}
|
| 54 |
+
}, Prism.languages.jsx.tag);
|
| 55 |
+
|
| 56 |
+
// The following will handle plain text inside tags
|
| 57 |
+
var stringifyToken = function (token) {
|
| 58 |
+
if (!token) {
|
| 59 |
+
return '';
|
| 60 |
+
}
|
| 61 |
+
if (typeof token === 'string') {
|
| 62 |
+
return token;
|
| 63 |
+
}
|
| 64 |
+
if (typeof token.content === 'string') {
|
| 65 |
+
return token.content;
|
| 66 |
+
}
|
| 67 |
+
return token.content.map(stringifyToken).join('');
|
| 68 |
+
};
|
| 69 |
+
|
| 70 |
+
var walkTokens = function (tokens) {
|
| 71 |
+
var openedTags = [];
|
| 72 |
+
for (var i = 0; i < tokens.length; i++) {
|
| 73 |
+
var token = tokens[i];
|
| 74 |
+
var notTagNorBrace = false;
|
| 75 |
+
|
| 76 |
+
if (typeof token !== 'string') {
|
| 77 |
+
if (token.type === 'tag' && token.content[0] && token.content[0].type === 'tag') {
|
| 78 |
+
// We found a tag, now find its kind
|
| 79 |
+
|
| 80 |
+
if (token.content[0].content[0].content === '</') {
|
| 81 |
+
// Closing tag
|
| 82 |
+
if (openedTags.length > 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1])) {
|
| 83 |
+
// Pop matching opening tag
|
| 84 |
+
openedTags.pop();
|
| 85 |
+
}
|
| 86 |
+
} else {
|
| 87 |
+
if (token.content[token.content.length - 1].content === '/>') {
|
| 88 |
+
// Autoclosed tag, ignore
|
| 89 |
+
} else {
|
| 90 |
+
// Opening tag
|
| 91 |
+
openedTags.push({
|
| 92 |
+
tagName: stringifyToken(token.content[0].content[1]),
|
| 93 |
+
openedBraces: 0
|
| 94 |
+
});
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
} else if (openedTags.length > 0 && token.type === 'punctuation' && token.content === '{') {
|
| 98 |
+
|
| 99 |
+
// Here we might have entered a JSX context inside a tag
|
| 100 |
+
openedTags[openedTags.length - 1].openedBraces++;
|
| 101 |
+
|
| 102 |
+
} else if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === 'punctuation' && token.content === '}') {
|
| 103 |
+
|
| 104 |
+
// Here we might have left a JSX context inside a tag
|
| 105 |
+
openedTags[openedTags.length - 1].openedBraces--;
|
| 106 |
+
|
| 107 |
+
} else {
|
| 108 |
+
notTagNorBrace = true;
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
if (notTagNorBrace || typeof token === 'string') {
|
| 112 |
+
if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) {
|
| 113 |
+
// Here we are inside a tag, and not inside a JSX context.
|
| 114 |
+
// That's plain text: drop any tokens matched.
|
| 115 |
+
var plainText = stringifyToken(token);
|
| 116 |
+
|
| 117 |
+
// And merge text with adjacent text
|
| 118 |
+
if (i < tokens.length - 1 && (typeof tokens[i + 1] === 'string' || tokens[i + 1].type === 'plain-text')) {
|
| 119 |
+
plainText += stringifyToken(tokens[i + 1]);
|
| 120 |
+
tokens.splice(i + 1, 1);
|
| 121 |
+
}
|
| 122 |
+
if (i > 0 && (typeof tokens[i - 1] === 'string' || tokens[i - 1].type === 'plain-text')) {
|
| 123 |
+
plainText = stringifyToken(tokens[i - 1]) + plainText;
|
| 124 |
+
tokens.splice(i - 1, 1);
|
| 125 |
+
i--;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
tokens[i] = new Prism.Token('plain-text', plainText, null, plainText);
|
| 129 |
+
}
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
if (token.content && typeof token.content !== 'string') {
|
| 133 |
+
walkTokens(token.content);
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
Prism.hooks.add('after-tokenize', function (env) {
|
| 139 |
+
if (env.language !== 'jsx' && env.language !== 'tsx') {
|
| 140 |
+
return;
|
| 141 |
+
}
|
| 142 |
+
walkTokens(env.tokens);
|
| 143 |
+
});
|
| 144 |
+
|
| 145 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-jsx.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(t){var n=t.util.clone(t.languages.javascript),e="(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";function a(t,n){return t=t.replace(/<S>/g,(function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"})).replace(/<BRACES>/g,(function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"})).replace(/<SPREAD>/g,(function(){return e})),RegExp(t,n)}e=a(e).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=a("</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>"),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:a("<SPREAD>"),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:a("=<BRACES>"),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var s=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(s).join(""):""},g=function(n){for(var e=[],a=0;a<n.length;a++){var o=n[a],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?e.length>0&&e[e.length-1].tagName===s(o.content[0].content[1])&&e.pop():"/>"===o.content[o.content.length-1].content||e.push({tagName:s(o.content[0].content[1]),openedBraces:0}):e.length>0&&"punctuation"===o.type&&"{"===o.content?e[e.length-1].openedBraces++:e.length>0&&e[e.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?e[e.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&e.length>0&&0===e[e.length-1].openedBraces){var r=s(o);a<n.length-1&&("string"==typeof n[a+1]||"plain-text"===n[a+1].type)&&(r+=s(n[a+1]),n.splice(a+1,1)),a>0&&("string"==typeof n[a-1]||"plain-text"===n[a-1].type)&&(r=s(n[a-1])+r,n.splice(a-1,1),a--),n[a]=new t.Token("plain-text",r,null,r)}o.content&&"string"!=typeof o.content&&g(o.content)}};t.hooks.add("after-tokenize",(function(t){"jsx"!==t.language&&"tsx"!==t.language||g(t.tokens)}))}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-julia.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.julia = {
|
| 2 |
+
'comment': {
|
| 3 |
+
// support one level of nested comments
|
| 4 |
+
// https://github.com/JuliaLang/julia/pull/6128
|
| 5 |
+
pattern: /(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,
|
| 6 |
+
lookbehind: true
|
| 7 |
+
},
|
| 8 |
+
'regex': {
|
| 9 |
+
// https://docs.julialang.org/en/v1/manual/strings/#Regular-Expressions-1
|
| 10 |
+
pattern: /r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,
|
| 11 |
+
greedy: true
|
| 12 |
+
},
|
| 13 |
+
'string': {
|
| 14 |
+
// https://docs.julialang.org/en/v1/manual/strings/#String-Basics-1
|
| 15 |
+
// https://docs.julialang.org/en/v1/manual/strings/#non-standard-string-literals-1
|
| 16 |
+
// https://docs.julialang.org/en/v1/manual/running-external-programs/#Running-External-Programs-1
|
| 17 |
+
pattern: /"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,
|
| 18 |
+
greedy: true
|
| 19 |
+
},
|
| 20 |
+
'char': {
|
| 21 |
+
// https://docs.julialang.org/en/v1/manual/strings/#man-characters-1
|
| 22 |
+
pattern: /(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,
|
| 23 |
+
lookbehind: true,
|
| 24 |
+
greedy: true
|
| 25 |
+
},
|
| 26 |
+
'keyword': /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,
|
| 27 |
+
'boolean': /\b(?:false|true)\b/,
|
| 28 |
+
'number': /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,
|
| 29 |
+
// https://docs.julialang.org/en/v1/manual/mathematical-operations/
|
| 30 |
+
// https://docs.julialang.org/en/v1/manual/mathematical-operations/#Operator-Precedence-and-Associativity-1
|
| 31 |
+
'operator': /&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,
|
| 32 |
+
'punctuation': /::?|[{}[\]();,.?]/,
|
| 33 |
+
// https://docs.julialang.org/en/v1/base/numbers/#Base.im
|
| 34 |
+
'constant': /\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/
|
| 35 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-julia.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keepalived.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.keepalived = {
|
| 2 |
+
'comment': {
|
| 3 |
+
pattern: /[#!].*/,
|
| 4 |
+
greedy: true
|
| 5 |
+
},
|
| 6 |
+
'string': {
|
| 7 |
+
pattern: /(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,
|
| 8 |
+
lookbehind: true,
|
| 9 |
+
greedy: true
|
| 10 |
+
},
|
| 11 |
+
|
| 12 |
+
// support IPv4, IPv6, subnet mask
|
| 13 |
+
'ip': {
|
| 14 |
+
pattern: RegExp(
|
| 15 |
+
/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}<ipv4>|(?:[\da-f]{1,4}:){0,5}:<ipv4>|::(?:[\da-f]{1,4}:){0,5}<ipv4>|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|<ipv4>(?:\/\d{1,2})?)\b/.source
|
| 16 |
+
.replace(/<ipv4>/g, function () { return /(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source; }),
|
| 17 |
+
'i'
|
| 18 |
+
),
|
| 19 |
+
alias: 'number'
|
| 20 |
+
},
|
| 21 |
+
|
| 22 |
+
// support *nix / Windows, directory / file
|
| 23 |
+
'path': {
|
| 24 |
+
pattern: /(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,
|
| 25 |
+
lookbehind: true,
|
| 26 |
+
alias: 'string',
|
| 27 |
+
},
|
| 28 |
+
'variable': /\$\{?\w+\}?/,
|
| 29 |
+
'email': {
|
| 30 |
+
pattern: /[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,
|
| 31 |
+
alias: 'string',
|
| 32 |
+
},
|
| 33 |
+
'conditional-configuration': {
|
| 34 |
+
pattern: /@\^?[\w-]+/,
|
| 35 |
+
alias: 'variable'
|
| 36 |
+
},
|
| 37 |
+
'operator': /=/,
|
| 38 |
+
|
| 39 |
+
'property': /\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,
|
| 40 |
+
|
| 41 |
+
'constant': /\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,
|
| 42 |
+
|
| 43 |
+
'number': {
|
| 44 |
+
pattern: /(^|[^\w.-])-?\d+(?:\.\d+)?/,
|
| 45 |
+
lookbehind: true
|
| 46 |
+
},
|
| 47 |
+
|
| 48 |
+
'boolean': /\b(?:false|no|off|on|true|yes)\b/,
|
| 49 |
+
|
| 50 |
+
'punctuation': /[\{\}]/
|
| 51 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keepalived.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp("\\b(?:(?:(?:[\\da-f]{1,4}:){7}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){6}:[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){5}:(?:[\\da-f]{1,4}:)?[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){4}:(?:[\\da-f]{1,4}:){0,2}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){3}:(?:[\\da-f]{1,4}:){0,3}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){2}:(?:[\\da-f]{1,4}:){0,4}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){6}<ipv4>|(?:[\\da-f]{1,4}:){0,5}:<ipv4>|::(?:[\\da-f]{1,4}:){0,5}<ipv4>|[\\da-f]{1,4}::(?:[\\da-f]{1,4}:){0,5}[\\da-f]{1,4}|::(?:[\\da-f]{1,4}:){0,6}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){1,7}:)(?:/\\d{1,3})?|<ipv4>(?:/\\d{1,2})?)\\b".replace(/<ipv4>/g,(function(){return"(?:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d))"})),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keyman.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.keyman = {
|
| 2 |
+
'comment': {
|
| 3 |
+
pattern: /\bc .*/i,
|
| 4 |
+
greedy: true
|
| 5 |
+
},
|
| 6 |
+
'string': {
|
| 7 |
+
pattern: /"[^"\r\n]*"|'[^'\r\n]*'/,
|
| 8 |
+
greedy: true
|
| 9 |
+
},
|
| 10 |
+
'virtual-key': {
|
| 11 |
+
pattern: /\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,
|
| 12 |
+
greedy: true,
|
| 13 |
+
alias: 'function' // alias for styles
|
| 14 |
+
},
|
| 15 |
+
|
| 16 |
+
// https://help.keyman.com/developer/language/guide/headers
|
| 17 |
+
'header-keyword': {
|
| 18 |
+
pattern: /&\w+/,
|
| 19 |
+
alias: 'bold' // alias for styles
|
| 20 |
+
},
|
| 21 |
+
'header-statement': {
|
| 22 |
+
pattern: /\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,
|
| 23 |
+
alias: 'bold' // alias for styles
|
| 24 |
+
},
|
| 25 |
+
|
| 26 |
+
'rule-keyword': {
|
| 27 |
+
pattern: /\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,
|
| 28 |
+
alias: 'keyword'
|
| 29 |
+
},
|
| 30 |
+
'structural-keyword': {
|
| 31 |
+
pattern: /\b(?:ansi|begin|group|match|newcontext|nomatch|postkeystroke|readonly|unicode|using keys)\b/i,
|
| 32 |
+
alias: 'keyword'
|
| 33 |
+
},
|
| 34 |
+
|
| 35 |
+
'compile-target': {
|
| 36 |
+
pattern: /\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,
|
| 37 |
+
alias: 'property'
|
| 38 |
+
},
|
| 39 |
+
|
| 40 |
+
// U+####, x###, d### characters and numbers
|
| 41 |
+
'number': /\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,
|
| 42 |
+
'operator': /[+>\\$]|\.\./,
|
| 43 |
+
'punctuation': /[()=,]/
|
| 44 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-keyman.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.keyman={comment:{pattern:/\bc .*/i,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},"virtual-key":{pattern:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,greedy:!0,alias:"function"},"header-keyword":{pattern:/&\w+/,alias:"bold"},"header-statement":{pattern:/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,alias:"bold"},"rule-keyword":{pattern:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,alias:"keyword"},"structural-keyword":{pattern:/\b(?:ansi|begin|group|match|newcontext|nomatch|postkeystroke|readonly|unicode|using keys)\b/i,alias:"keyword"},"compile-target":{pattern:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,alias:"property"},number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\$]|\.\./,punctuation:/[()=,]/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kotlin.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
Prism.languages.kotlin = Prism.languages.extend('clike', {
|
| 3 |
+
'keyword': {
|
| 4 |
+
// The lookbehind prevents wrong highlighting of e.g. kotlin.properties.get
|
| 5 |
+
pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
|
| 6 |
+
lookbehind: true
|
| 7 |
+
},
|
| 8 |
+
'function': [
|
| 9 |
+
{
|
| 10 |
+
pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,
|
| 11 |
+
greedy: true
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,
|
| 15 |
+
lookbehind: true,
|
| 16 |
+
greedy: true
|
| 17 |
+
}
|
| 18 |
+
],
|
| 19 |
+
'number': /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,
|
| 20 |
+
'operator': /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/
|
| 21 |
+
});
|
| 22 |
+
|
| 23 |
+
delete Prism.languages.kotlin['class-name'];
|
| 24 |
+
|
| 25 |
+
var interpolationInside = {
|
| 26 |
+
'interpolation-punctuation': {
|
| 27 |
+
pattern: /^\$\{?|\}$/,
|
| 28 |
+
alias: 'punctuation'
|
| 29 |
+
},
|
| 30 |
+
'expression': {
|
| 31 |
+
pattern: /[\s\S]+/,
|
| 32 |
+
inside: Prism.languages.kotlin
|
| 33 |
+
}
|
| 34 |
+
};
|
| 35 |
+
|
| 36 |
+
Prism.languages.insertBefore('kotlin', 'string', {
|
| 37 |
+
// https://kotlinlang.org/spec/expressions.html#string-interpolation-expressions
|
| 38 |
+
'string-literal': [
|
| 39 |
+
{
|
| 40 |
+
pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,
|
| 41 |
+
alias: 'multiline',
|
| 42 |
+
inside: {
|
| 43 |
+
'interpolation': {
|
| 44 |
+
pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i,
|
| 45 |
+
inside: interpolationInside
|
| 46 |
+
},
|
| 47 |
+
'string': /[\s\S]+/
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,
|
| 52 |
+
alias: 'singleline',
|
| 53 |
+
inside: {
|
| 54 |
+
'interpolation': {
|
| 55 |
+
pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,
|
| 56 |
+
lookbehind: true,
|
| 57 |
+
inside: interpolationInside
|
| 58 |
+
},
|
| 59 |
+
'string': /[\s\S]+/
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
],
|
| 63 |
+
'char': {
|
| 64 |
+
// https://kotlinlang.org/spec/expressions.html#character-literals
|
| 65 |
+
pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,
|
| 66 |
+
greedy: true
|
| 67 |
+
}
|
| 68 |
+
});
|
| 69 |
+
|
| 70 |
+
delete Prism.languages.kotlin['string'];
|
| 71 |
+
|
| 72 |
+
Prism.languages.insertBefore('kotlin', 'keyword', {
|
| 73 |
+
'annotation': {
|
| 74 |
+
pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,
|
| 75 |
+
alias: 'builtin'
|
| 76 |
+
}
|
| 77 |
+
});
|
| 78 |
+
|
| 79 |
+
Prism.languages.insertBefore('kotlin', 'function', {
|
| 80 |
+
'label': {
|
| 81 |
+
pattern: /\b\w+@|@\w+\b/,
|
| 82 |
+
alias: 'symbol'
|
| 83 |
+
}
|
| 84 |
+
});
|
| 85 |
+
|
| 86 |
+
Prism.languages.kt = Prism.languages.kotlin;
|
| 87 |
+
Prism.languages.kts = Prism.languages.kotlin;
|
| 88 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kotlin.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kumir.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* eslint-disable regexp/no-dupe-characters-character-class */
|
| 2 |
+
(function (Prism) {
|
| 3 |
+
|
| 4 |
+
/**
|
| 5 |
+
* Regular expression for characters that are not allowed in identifiers.
|
| 6 |
+
*
|
| 7 |
+
* @type {string}
|
| 8 |
+
*/
|
| 9 |
+
var nonId = /\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* Surround a regular expression for IDs with patterns for non-ID sequences.
|
| 13 |
+
*
|
| 14 |
+
* @param {string} pattern A regular expression for identifiers.
|
| 15 |
+
* @param {string} [flags] The regular expression flags.
|
| 16 |
+
* @returns {RegExp} A wrapped regular expression for identifiers.
|
| 17 |
+
*/
|
| 18 |
+
function wrapId(pattern, flags) {
|
| 19 |
+
return RegExp(pattern.replace(/<nonId>/g, nonId), flags);
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
Prism.languages.kumir = {
|
| 23 |
+
'comment': {
|
| 24 |
+
pattern: /\|.*/
|
| 25 |
+
},
|
| 26 |
+
|
| 27 |
+
'prolog': {
|
| 28 |
+
pattern: /#.*/,
|
| 29 |
+
greedy: true
|
| 30 |
+
},
|
| 31 |
+
|
| 32 |
+
'string': {
|
| 33 |
+
pattern: /"[^\n\r"]*"|'[^\n\r']*'/,
|
| 34 |
+
greedy: true
|
| 35 |
+
},
|
| 36 |
+
|
| 37 |
+
'boolean': {
|
| 38 |
+
pattern: wrapId(/(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)/.source),
|
| 39 |
+
lookbehind: true
|
| 40 |
+
},
|
| 41 |
+
|
| 42 |
+
'operator-word': {
|
| 43 |
+
pattern: wrapId(/(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)/.source),
|
| 44 |
+
lookbehind: true,
|
| 45 |
+
alias: 'keyword'
|
| 46 |
+
},
|
| 47 |
+
|
| 48 |
+
'system-variable': {
|
| 49 |
+
pattern: wrapId(/(^|[<nonId>])знач(?=[<nonId>]|$)/.source),
|
| 50 |
+
lookbehind: true,
|
| 51 |
+
alias: 'keyword'
|
| 52 |
+
},
|
| 53 |
+
|
| 54 |
+
'type': [
|
| 55 |
+
{
|
| 56 |
+
pattern: wrapId(/(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[<nonId>]|$)/.source),
|
| 57 |
+
lookbehind: true,
|
| 58 |
+
alias: 'builtin'
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
pattern: wrapId(/(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)/.source),
|
| 62 |
+
lookbehind: true,
|
| 63 |
+
alias: 'important'
|
| 64 |
+
}
|
| 65 |
+
],
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* Should be performed after searching for type names because of "таб".
|
| 69 |
+
* "таб" is a reserved word, but never used without a preceding type name.
|
| 70 |
+
* "НАЗНАЧИТЬ", "Фввод", and "Фвывод" are not reserved words.
|
| 71 |
+
*/
|
| 72 |
+
'keyword': {
|
| 73 |
+
pattern: wrapId(/(^|[<nonId>])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)/.source),
|
| 74 |
+
lookbehind: true
|
| 75 |
+
},
|
| 76 |
+
|
| 77 |
+
/** Should be performed after searching for reserved words. */
|
| 78 |
+
'name': {
|
| 79 |
+
// eslint-disable-next-line regexp/no-super-linear-backtracking
|
| 80 |
+
pattern: wrapId(/(^|[<nonId>])[^\d<nonId>][^<nonId>]*(?:\x20+[^<nonId>]+)*(?=[<nonId>]|$)/.source),
|
| 81 |
+
lookbehind: true
|
| 82 |
+
},
|
| 83 |
+
|
| 84 |
+
/** Should be performed after searching for names. */
|
| 85 |
+
'number': {
|
| 86 |
+
pattern: wrapId(/(^|[<nonId>])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[<nonId>]|$)/.source, 'i'),
|
| 87 |
+
lookbehind: true
|
| 88 |
+
},
|
| 89 |
+
|
| 90 |
+
/** Should be performed after searching for words. */
|
| 91 |
+
'punctuation': /:=|[(),:;\[\]]/,
|
| 92 |
+
|
| 93 |
+
/**
|
| 94 |
+
* Should be performed after searching for
|
| 95 |
+
* - numeric constants (because of "+" and "-");
|
| 96 |
+
* - punctuation marks (because of ":=" and "=").
|
| 97 |
+
*/
|
| 98 |
+
'operator-char': {
|
| 99 |
+
pattern: /\*\*?|<[=>]?|>=?|[-+/=]/,
|
| 100 |
+
alias: 'operator'
|
| 101 |
+
}
|
| 102 |
+
};
|
| 103 |
+
|
| 104 |
+
Prism.languages.kum = Prism.languages.kumir;
|
| 105 |
+
|
| 106 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kumir.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(n){function o(n,o){return RegExp(n.replace(/<nonId>/g,"\\s\\x00-\\x1f\\x22-\\x2f\\x3a-\\x3f\\x5b-\\x5e\\x60\\x7b-\\x7e"),o)}n.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:o("(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)"),lookbehind:!0},"operator-word":{pattern:o("(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)"),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:o("(^|[<nonId>])знач(?=[<nonId>]|$)"),lookbehind:!0,alias:"keyword"},type:[{pattern:o("(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\\x20*таб)?(?=[<nonId>]|$)"),lookbehind:!0,alias:"builtin"},{pattern:o("(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)"),lookbehind:!0,alias:"important"}],keyword:{pattern:o("(^|[<nonId>])(?:алг|арг(?:\\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\\x20+|_)исп)?|кц(?:(?:\\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)"),lookbehind:!0},name:{pattern:o("(^|[<nonId>])[^\\d<nonId>][^<nonId>]*(?:\\x20+[^<nonId>]+)*(?=[<nonId>]|$)"),lookbehind:!0},number:{pattern:o("(^|[<nonId>])(?:\\B\\$[\\da-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?)(?=[<nonId>]|$)","i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},n.languages.kum=n.languages.kumir}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kusto.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.kusto = {
|
| 2 |
+
'comment': {
|
| 3 |
+
pattern: /\/\/.*/,
|
| 4 |
+
greedy: true
|
| 5 |
+
},
|
| 6 |
+
'string': {
|
| 7 |
+
pattern: /```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,
|
| 8 |
+
greedy: true
|
| 9 |
+
},
|
| 10 |
+
|
| 11 |
+
'verb': {
|
| 12 |
+
pattern: /(\|\s*)[a-z][\w-]*/i,
|
| 13 |
+
lookbehind: true,
|
| 14 |
+
alias: 'keyword'
|
| 15 |
+
},
|
| 16 |
+
|
| 17 |
+
'command': {
|
| 18 |
+
pattern: /\.[a-z][a-z\d-]*\b/,
|
| 19 |
+
alias: 'keyword'
|
| 20 |
+
},
|
| 21 |
+
|
| 22 |
+
'class-name': /\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,
|
| 23 |
+
'keyword': /\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,
|
| 24 |
+
'boolean': /\b(?:false|null|true)\b/,
|
| 25 |
+
|
| 26 |
+
'function': /\b[a-z_]\w*(?=\s*\()/,
|
| 27 |
+
|
| 28 |
+
'datetime': [
|
| 29 |
+
{
|
| 30 |
+
// RFC 822 + RFC 850
|
| 31 |
+
pattern: /\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,
|
| 32 |
+
alias: 'number'
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
// ISO 8601
|
| 36 |
+
pattern: /[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,
|
| 37 |
+
alias: 'number'
|
| 38 |
+
}
|
| 39 |
+
],
|
| 40 |
+
'number': /\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,
|
| 41 |
+
|
| 42 |
+
'operator': /=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,
|
| 43 |
+
'punctuation': /[()\[\]{},;.:]/
|
| 44 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-kusto.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latex.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
var funcPattern = /\\(?:[^a-z()[\]]|[a-z*]+)/i;
|
| 3 |
+
var insideEqu = {
|
| 4 |
+
'equation-command': {
|
| 5 |
+
pattern: funcPattern,
|
| 6 |
+
alias: 'regex'
|
| 7 |
+
}
|
| 8 |
+
};
|
| 9 |
+
|
| 10 |
+
Prism.languages.latex = {
|
| 11 |
+
'comment': /%.*/,
|
| 12 |
+
// the verbatim environment prints whitespace to the document
|
| 13 |
+
'cdata': {
|
| 14 |
+
pattern: /(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
|
| 15 |
+
lookbehind: true
|
| 16 |
+
},
|
| 17 |
+
/*
|
| 18 |
+
* equations can be between $$ $$ or $ $ or \( \) or \[ \]
|
| 19 |
+
* (all are multiline)
|
| 20 |
+
*/
|
| 21 |
+
'equation': [
|
| 22 |
+
{
|
| 23 |
+
pattern: /\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,
|
| 24 |
+
inside: insideEqu,
|
| 25 |
+
alias: 'string'
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
pattern: /(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
|
| 29 |
+
lookbehind: true,
|
| 30 |
+
inside: insideEqu,
|
| 31 |
+
alias: 'string'
|
| 32 |
+
}
|
| 33 |
+
],
|
| 34 |
+
/*
|
| 35 |
+
* arguments which are keywords or references are highlighted
|
| 36 |
+
* as keywords
|
| 37 |
+
*/
|
| 38 |
+
'keyword': {
|
| 39 |
+
pattern: /(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
|
| 40 |
+
lookbehind: true
|
| 41 |
+
},
|
| 42 |
+
'url': {
|
| 43 |
+
pattern: /(\\url\{)[^}]+(?=\})/,
|
| 44 |
+
lookbehind: true
|
| 45 |
+
},
|
| 46 |
+
/*
|
| 47 |
+
* section or chapter headlines are highlighted as bold so that
|
| 48 |
+
* they stand out more
|
| 49 |
+
*/
|
| 50 |
+
'headline': {
|
| 51 |
+
pattern: /(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,
|
| 52 |
+
lookbehind: true,
|
| 53 |
+
alias: 'class-name'
|
| 54 |
+
},
|
| 55 |
+
'function': {
|
| 56 |
+
pattern: funcPattern,
|
| 57 |
+
alias: 'selector'
|
| 58 |
+
},
|
| 59 |
+
'punctuation': /[[\]{}&]/
|
| 60 |
+
};
|
| 61 |
+
|
| 62 |
+
Prism.languages.tex = Prism.languages.latex;
|
| 63 |
+
Prism.languages.context = Prism.languages.latex;
|
| 64 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latex.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/},a.languages.tex=a.languages.latex,a.languages.context=a.languages.latex}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latte.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
Prism.languages.latte = {
|
| 3 |
+
'comment': /^\{\*[\s\S]*/,
|
| 4 |
+
'latte-tag': {
|
| 5 |
+
// https://latte.nette.org/en/tags
|
| 6 |
+
pattern: /(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,
|
| 7 |
+
lookbehind: true,
|
| 8 |
+
alias: 'important'
|
| 9 |
+
},
|
| 10 |
+
'delimiter': {
|
| 11 |
+
pattern: /^\{\/?|\}$/,
|
| 12 |
+
alias: 'punctuation'
|
| 13 |
+
},
|
| 14 |
+
'php': {
|
| 15 |
+
pattern: /\S(?:[\s\S]*\S)?/,
|
| 16 |
+
alias: 'language-php',
|
| 17 |
+
inside: Prism.languages.php
|
| 18 |
+
}
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
var markupLatte = Prism.languages.extend('markup', {});
|
| 22 |
+
Prism.languages.insertBefore('inside', 'attr-value', {
|
| 23 |
+
'n-attr': {
|
| 24 |
+
pattern: /n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,
|
| 25 |
+
inside: {
|
| 26 |
+
'attr-name': {
|
| 27 |
+
pattern: /^[^\s=]+/,
|
| 28 |
+
alias: 'important'
|
| 29 |
+
},
|
| 30 |
+
'attr-value': {
|
| 31 |
+
pattern: /=[\s\S]+/,
|
| 32 |
+
inside: {
|
| 33 |
+
'punctuation': [
|
| 34 |
+
/^=/,
|
| 35 |
+
{
|
| 36 |
+
pattern: /^(\s*)["']|["']$/,
|
| 37 |
+
lookbehind: true
|
| 38 |
+
}
|
| 39 |
+
],
|
| 40 |
+
'php': {
|
| 41 |
+
pattern: /\S(?:[\s\S]*\S)?/,
|
| 42 |
+
inside: Prism.languages.php
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
}, markupLatte.tag);
|
| 49 |
+
|
| 50 |
+
Prism.hooks.add('before-tokenize', function (env) {
|
| 51 |
+
if (env.language !== 'latte') {
|
| 52 |
+
return;
|
| 53 |
+
}
|
| 54 |
+
var lattePattern = /\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g;
|
| 55 |
+
Prism.languages['markup-templating'].buildPlaceholders(env, 'latte', lattePattern);
|
| 56 |
+
env.grammar = markupLatte;
|
| 57 |
+
});
|
| 58 |
+
|
| 59 |
+
Prism.hooks.add('after-tokenize', function (env) {
|
| 60 |
+
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'latte');
|
| 61 |
+
});
|
| 62 |
+
|
| 63 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-latte.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(a){a.languages.latte={comment:/^\{\*[\s\S]*/,"latte-tag":{pattern:/(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,lookbehind:!0,alias:"important"},delimiter:{pattern:/^\{\/?|\}$/,alias:"punctuation"},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:a.languages.php}};var t=a.languages.extend("markup",{});a.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:a.languages.php}}}}}},t.tag),a.hooks.add("before-tokenize",(function(e){"latte"===e.language&&(a.languages["markup-templating"].buildPlaceholders(e,"latte",/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g),e.grammar=t)})),a.hooks.add("after-tokenize",(function(t){a.languages["markup-templating"].tokenizePlaceholders(t,"latte")}))}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-less.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* FIXME :
|
| 2 |
+
:extend() is not handled specifically : its highlighting is buggy.
|
| 3 |
+
Mixin usage must be inside a ruleset to be highlighted.
|
| 4 |
+
At-rules (e.g. import) containing interpolations are buggy.
|
| 5 |
+
Detached rulesets are highlighted as at-rules.
|
| 6 |
+
A comment before a mixin usage prevents the latter to be properly highlighted.
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
Prism.languages.less = Prism.languages.extend('css', {
|
| 10 |
+
'comment': [
|
| 11 |
+
/\/\*[\s\S]*?\*\//,
|
| 12 |
+
{
|
| 13 |
+
pattern: /(^|[^\\])\/\/.*/,
|
| 14 |
+
lookbehind: true
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
'atrule': {
|
| 18 |
+
pattern: /@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,
|
| 19 |
+
inside: {
|
| 20 |
+
'punctuation': /[:()]/
|
| 21 |
+
}
|
| 22 |
+
},
|
| 23 |
+
// selectors and mixins are considered the same
|
| 24 |
+
'selector': {
|
| 25 |
+
pattern: /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,
|
| 26 |
+
inside: {
|
| 27 |
+
// mixin parameters
|
| 28 |
+
'variable': /@+[\w-]+/
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
|
| 32 |
+
'property': /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,
|
| 33 |
+
'operator': /[+\-*\/]/
|
| 34 |
+
});
|
| 35 |
+
|
| 36 |
+
Prism.languages.insertBefore('less', 'property', {
|
| 37 |
+
'variable': [
|
| 38 |
+
// Variable declaration (the colon must be consumed!)
|
| 39 |
+
{
|
| 40 |
+
pattern: /@[\w-]+\s*:/,
|
| 41 |
+
inside: {
|
| 42 |
+
'punctuation': /:/
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
|
| 46 |
+
// Variable usage
|
| 47 |
+
/@@?[\w-]+/
|
| 48 |
+
],
|
| 49 |
+
'mixin-usage': {
|
| 50 |
+
pattern: /([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,
|
| 51 |
+
lookbehind: true,
|
| 52 |
+
alias: 'function'
|
| 53 |
+
}
|
| 54 |
+
});
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-less.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}});
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lilypond.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
|
| 3 |
+
var schemeExpression = /\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/.source;
|
| 4 |
+
// allow for up to pow(2, recursivenessLog2) many levels of recursive brace expressions
|
| 5 |
+
// For some reason, this can't be 4
|
| 6 |
+
var recursivenessLog2 = 5;
|
| 7 |
+
for (var i = 0; i < recursivenessLog2; i++) {
|
| 8 |
+
schemeExpression = schemeExpression.replace(/<expr>/g, function () { return schemeExpression; });
|
| 9 |
+
}
|
| 10 |
+
schemeExpression = schemeExpression.replace(/<expr>/g, /[^\s\S]/.source);
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
var lilypond = Prism.languages.lilypond = {
|
| 14 |
+
'comment': /%(?:(?!\{).*|\{[\s\S]*?%\})/,
|
| 15 |
+
'embedded-scheme': {
|
| 16 |
+
pattern: RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|<expr>))/.source.replace(/<expr>/g, function () { return schemeExpression; }), 'm'),
|
| 17 |
+
lookbehind: true,
|
| 18 |
+
greedy: true,
|
| 19 |
+
inside: {
|
| 20 |
+
'scheme': {
|
| 21 |
+
pattern: /^(#)[\s\S]+$/,
|
| 22 |
+
lookbehind: true,
|
| 23 |
+
alias: 'language-scheme',
|
| 24 |
+
inside: {
|
| 25 |
+
'embedded-lilypond': {
|
| 26 |
+
pattern: /#\{[\s\S]*?#\}/,
|
| 27 |
+
greedy: true,
|
| 28 |
+
inside: {
|
| 29 |
+
'punctuation': /^#\{|#\}$/,
|
| 30 |
+
'lilypond': {
|
| 31 |
+
pattern: /[\s\S]+/,
|
| 32 |
+
alias: 'language-lilypond',
|
| 33 |
+
inside: null // see below
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
+
rest: Prism.languages.scheme
|
| 38 |
+
}
|
| 39 |
+
},
|
| 40 |
+
'punctuation': /#/
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
'string': {
|
| 44 |
+
pattern: /"(?:[^"\\]|\\.)*"/,
|
| 45 |
+
greedy: true
|
| 46 |
+
},
|
| 47 |
+
'class-name': {
|
| 48 |
+
pattern: /(\\new\s+)[\w-]+/,
|
| 49 |
+
lookbehind: true
|
| 50 |
+
},
|
| 51 |
+
'keyword': {
|
| 52 |
+
pattern: /\\[a-z][-\w]*/i,
|
| 53 |
+
inside: {
|
| 54 |
+
'punctuation': /^\\/
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
'operator': /[=|]|<<|>>/,
|
| 58 |
+
'punctuation': {
|
| 59 |
+
pattern: /(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,
|
| 60 |
+
lookbehind: true
|
| 61 |
+
},
|
| 62 |
+
'number': /\b\d+(?:\/\d+)?\b/
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
lilypond['embedded-scheme'].inside['scheme'].inside['embedded-lilypond'].inside['lilypond'].inside = lilypond;
|
| 66 |
+
|
| 67 |
+
Prism.languages.ly = lilypond;
|
| 68 |
+
|
| 69 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lilypond.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[^]|;.*(?!.)|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[^])*#\\}|[^{])|<expr>)*\\)',i=0;i<5;i++)n=n.replace(/<expr>/g,(function(){return n}));n=n.replace(/<expr>/g,"[^\\s\\S]");var d=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|<expr>))'.replace(/<expr>/g,(function(){return n})),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};d["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=d,e.languages.ly=d}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-linker-script.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages['linker-script'] = {
|
| 2 |
+
'comment': {
|
| 3 |
+
pattern: /(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,
|
| 4 |
+
lookbehind: true,
|
| 5 |
+
greedy: true
|
| 6 |
+
},
|
| 7 |
+
'identifier': {
|
| 8 |
+
pattern: /"[^"\r\n]*"/,
|
| 9 |
+
greedy: true
|
| 10 |
+
},
|
| 11 |
+
|
| 12 |
+
'location-counter': {
|
| 13 |
+
pattern: /\B\.\B/,
|
| 14 |
+
alias: 'important'
|
| 15 |
+
},
|
| 16 |
+
|
| 17 |
+
'section': {
|
| 18 |
+
pattern: /(^|[^\w*])\.\w+\b/,
|
| 19 |
+
lookbehind: true,
|
| 20 |
+
alias: 'keyword'
|
| 21 |
+
},
|
| 22 |
+
'function': /\b[A-Z][A-Z_]*(?=\s*\()/,
|
| 23 |
+
|
| 24 |
+
'number': /\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,
|
| 25 |
+
|
| 26 |
+
'operator': />>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,
|
| 27 |
+
'punctuation': /[(){},;]/
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
Prism.languages['ld'] = Prism.languages['linker-script'];
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-linker-script.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages["linker-script"]={comment:{pattern:/(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,lookbehind:!0,greedy:!0},identifier:{pattern:/"[^"\r\n]*"/,greedy:!0},"location-counter":{pattern:/\B\.\B/,alias:"important"},section:{pattern:/(^|[^\w*])\.\w+\b/,lookbehind:!0,alias:"keyword"},function:/\b[A-Z][A-Z_]*(?=\s*\()/,number:/\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,operator:/>>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,punctuation:/[(){},;]/},Prism.languages.ld=Prism.languages["linker-script"];
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-liquid.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.liquid = {
|
| 2 |
+
'comment': {
|
| 3 |
+
pattern: /(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,
|
| 4 |
+
lookbehind: true
|
| 5 |
+
},
|
| 6 |
+
'delimiter': {
|
| 7 |
+
pattern: /^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,
|
| 8 |
+
alias: 'punctuation'
|
| 9 |
+
},
|
| 10 |
+
'string': {
|
| 11 |
+
pattern: /"[^"]*"|'[^']*'/,
|
| 12 |
+
greedy: true
|
| 13 |
+
},
|
| 14 |
+
'keyword': /\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,
|
| 15 |
+
'object': /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,
|
| 16 |
+
'function': [
|
| 17 |
+
{
|
| 18 |
+
pattern: /(\|\s*)\w+/,
|
| 19 |
+
lookbehind: true,
|
| 20 |
+
alias: 'filter'
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
// array functions
|
| 24 |
+
pattern: /(\.\s*)(?:first|last|size)/,
|
| 25 |
+
lookbehind: true
|
| 26 |
+
}
|
| 27 |
+
],
|
| 28 |
+
'boolean': /\b(?:false|nil|true)\b/,
|
| 29 |
+
'range': {
|
| 30 |
+
pattern: /\.\./,
|
| 31 |
+
alias: 'operator'
|
| 32 |
+
},
|
| 33 |
+
// https://github.com/Shopify/liquid/blob/698f5e0d967423e013f6169d9111bd969bd78337/lib/liquid/lexer.rb#L21
|
| 34 |
+
'number': /\b\d+(?:\.\d+)?\b/,
|
| 35 |
+
'operator': /[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,
|
| 36 |
+
'punctuation': /[.,\[\]()]/,
|
| 37 |
+
'empty': {
|
| 38 |
+
pattern: /\bempty\b/,
|
| 39 |
+
alias: 'keyword'
|
| 40 |
+
},
|
| 41 |
+
};
|
| 42 |
+
|
| 43 |
+
Prism.hooks.add('before-tokenize', function (env) {
|
| 44 |
+
var liquidPattern = /\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g;
|
| 45 |
+
var insideRaw = false;
|
| 46 |
+
|
| 47 |
+
Prism.languages['markup-templating'].buildPlaceholders(env, 'liquid', liquidPattern, function (match) {
|
| 48 |
+
var tagMatch = /^\{%-?\s*(\w+)/.exec(match);
|
| 49 |
+
if (tagMatch) {
|
| 50 |
+
var tag = tagMatch[1];
|
| 51 |
+
if (tag === 'raw' && !insideRaw) {
|
| 52 |
+
insideRaw = true;
|
| 53 |
+
return true;
|
| 54 |
+
} else if (tag === 'endraw') {
|
| 55 |
+
insideRaw = false;
|
| 56 |
+
return true;
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
return !insideRaw;
|
| 61 |
+
});
|
| 62 |
+
});
|
| 63 |
+
|
| 64 |
+
Prism.hooks.add('after-tokenize', function (env) {
|
| 65 |
+
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'liquid');
|
| 66 |
+
});
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-liquid.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},Prism.hooks.add("before-tokenize",(function(e){var t=!1;Prism.languages["markup-templating"].buildPlaceholders(e,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,(function(e){var n=/^\{%-?\s*(\w+)/.exec(e);if(n){var i=n[1];if("raw"===i&&!t)return t=!0,!0;if("endraw"===i)return t=!1,!0}return!t}))})),Prism.hooks.add("after-tokenize",(function(e){Prism.languages["markup-templating"].tokenizePlaceholders(e,"liquid")}));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lisp.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
/**
|
| 3 |
+
* Functions to construct regular expressions
|
| 4 |
+
* e.g. (interactive ... or (interactive)
|
| 5 |
+
*
|
| 6 |
+
* @param {string} name
|
| 7 |
+
* @returns {RegExp}
|
| 8 |
+
*/
|
| 9 |
+
function simple_form(name) {
|
| 10 |
+
return RegExp(/(\()/.source + '(?:' + name + ')' + /(?=[\s\)])/.source);
|
| 11 |
+
}
|
| 12 |
+
/**
|
| 13 |
+
* booleans and numbers
|
| 14 |
+
*
|
| 15 |
+
* @param {string} pattern
|
| 16 |
+
* @returns {RegExp}
|
| 17 |
+
*/
|
| 18 |
+
function primitive(pattern) {
|
| 19 |
+
return RegExp(/([\s([])/.source + '(?:' + pattern + ')' + /(?=[\s)])/.source);
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
// Patterns in regular expressions
|
| 23 |
+
|
| 24 |
+
// Symbol name. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Type.html
|
| 25 |
+
// & and : are excluded as they are usually used for special purposes
|
| 26 |
+
var symbol = /(?!\d)[-+*/~!@$%^=<>{}\w]+/.source;
|
| 27 |
+
// symbol starting with & used in function arguments
|
| 28 |
+
var marker = '&' + symbol;
|
| 29 |
+
// Open parenthesis for look-behind
|
| 30 |
+
var par = '(\\()';
|
| 31 |
+
var endpar = '(?=\\))';
|
| 32 |
+
// End the pattern with look-ahead space
|
| 33 |
+
var space = '(?=\\s)';
|
| 34 |
+
var nestedPar = /(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source;
|
| 35 |
+
|
| 36 |
+
var language = {
|
| 37 |
+
// Three or four semicolons are considered a heading.
|
| 38 |
+
// See https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html
|
| 39 |
+
heading: {
|
| 40 |
+
pattern: /;;;.*/,
|
| 41 |
+
alias: ['comment', 'title']
|
| 42 |
+
},
|
| 43 |
+
comment: /;.*/,
|
| 44 |
+
string: {
|
| 45 |
+
pattern: /"(?:[^"\\]|\\.)*"/,
|
| 46 |
+
greedy: true,
|
| 47 |
+
inside: {
|
| 48 |
+
argument: /[-A-Z]+(?=[.,\s])/,
|
| 49 |
+
symbol: RegExp('`' + symbol + "'")
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
'quoted-symbol': {
|
| 53 |
+
pattern: RegExp("#?'" + symbol),
|
| 54 |
+
alias: ['variable', 'symbol']
|
| 55 |
+
},
|
| 56 |
+
'lisp-property': {
|
| 57 |
+
pattern: RegExp(':' + symbol),
|
| 58 |
+
alias: 'property'
|
| 59 |
+
},
|
| 60 |
+
splice: {
|
| 61 |
+
pattern: RegExp(',@?' + symbol),
|
| 62 |
+
alias: ['symbol', 'variable']
|
| 63 |
+
},
|
| 64 |
+
keyword: [
|
| 65 |
+
{
|
| 66 |
+
pattern: RegExp(
|
| 67 |
+
par +
|
| 68 |
+
'(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)' +
|
| 69 |
+
space
|
| 70 |
+
),
|
| 71 |
+
lookbehind: true
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
pattern: RegExp(
|
| 75 |
+
par + '(?:append|by|collect|concat|do|finally|for|in|return)' + space
|
| 76 |
+
),
|
| 77 |
+
lookbehind: true
|
| 78 |
+
},
|
| 79 |
+
],
|
| 80 |
+
declare: {
|
| 81 |
+
pattern: simple_form(/declare/.source),
|
| 82 |
+
lookbehind: true,
|
| 83 |
+
alias: 'keyword'
|
| 84 |
+
},
|
| 85 |
+
interactive: {
|
| 86 |
+
pattern: simple_form(/interactive/.source),
|
| 87 |
+
lookbehind: true,
|
| 88 |
+
alias: 'keyword'
|
| 89 |
+
},
|
| 90 |
+
boolean: {
|
| 91 |
+
pattern: primitive(/nil|t/.source),
|
| 92 |
+
lookbehind: true
|
| 93 |
+
},
|
| 94 |
+
number: {
|
| 95 |
+
pattern: primitive(/[-+]?\d+(?:\.\d*)?/.source),
|
| 96 |
+
lookbehind: true
|
| 97 |
+
},
|
| 98 |
+
defvar: {
|
| 99 |
+
pattern: RegExp(par + 'def(?:const|custom|group|var)\\s+' + symbol),
|
| 100 |
+
lookbehind: true,
|
| 101 |
+
inside: {
|
| 102 |
+
keyword: /^def[a-z]+/,
|
| 103 |
+
variable: RegExp(symbol)
|
| 104 |
+
}
|
| 105 |
+
},
|
| 106 |
+
defun: {
|
| 107 |
+
pattern: RegExp(par + /(?:cl-)?(?:defmacro|defun\*?)\s+/.source + symbol + /\s+\(/.source + nestedPar + /\)/.source),
|
| 108 |
+
lookbehind: true,
|
| 109 |
+
greedy: true,
|
| 110 |
+
inside: {
|
| 111 |
+
keyword: /^(?:cl-)?def\S+/,
|
| 112 |
+
// See below, this property needs to be defined later so that it can
|
| 113 |
+
// reference the language object.
|
| 114 |
+
arguments: null,
|
| 115 |
+
function: {
|
| 116 |
+
pattern: RegExp('(^\\s)' + symbol),
|
| 117 |
+
lookbehind: true
|
| 118 |
+
},
|
| 119 |
+
punctuation: /[()]/
|
| 120 |
+
}
|
| 121 |
+
},
|
| 122 |
+
lambda: {
|
| 123 |
+
pattern: RegExp(par + 'lambda\\s+\\(\\s*(?:&?' + symbol + '(?:\\s+&?' + symbol + ')*\\s*)?\\)'),
|
| 124 |
+
lookbehind: true,
|
| 125 |
+
greedy: true,
|
| 126 |
+
inside: {
|
| 127 |
+
keyword: /^lambda/,
|
| 128 |
+
// See below, this property needs to be defined later so that it can
|
| 129 |
+
// reference the language object.
|
| 130 |
+
arguments: null,
|
| 131 |
+
punctuation: /[()]/
|
| 132 |
+
}
|
| 133 |
+
},
|
| 134 |
+
car: {
|
| 135 |
+
pattern: RegExp(par + symbol),
|
| 136 |
+
lookbehind: true
|
| 137 |
+
},
|
| 138 |
+
punctuation: [
|
| 139 |
+
// open paren, brackets, and close paren
|
| 140 |
+
/(?:['`,]?\(|[)\[\]])/,
|
| 141 |
+
// cons
|
| 142 |
+
{
|
| 143 |
+
pattern: /(\s)\.(?=\s)/,
|
| 144 |
+
lookbehind: true
|
| 145 |
+
},
|
| 146 |
+
]
|
| 147 |
+
};
|
| 148 |
+
|
| 149 |
+
var arg = {
|
| 150 |
+
'lisp-marker': RegExp(marker),
|
| 151 |
+
'varform': {
|
| 152 |
+
pattern: RegExp(/\(/.source + symbol + /\s+(?=\S)/.source + nestedPar + /\)/.source),
|
| 153 |
+
inside: language
|
| 154 |
+
},
|
| 155 |
+
'argument': {
|
| 156 |
+
pattern: RegExp(/(^|[\s(])/.source + symbol),
|
| 157 |
+
lookbehind: true,
|
| 158 |
+
alias: 'variable'
|
| 159 |
+
},
|
| 160 |
+
rest: language
|
| 161 |
+
};
|
| 162 |
+
|
| 163 |
+
var forms = '\\S+(?:\\s+\\S+)*';
|
| 164 |
+
|
| 165 |
+
var arglist = {
|
| 166 |
+
pattern: RegExp(par + nestedPar + endpar),
|
| 167 |
+
lookbehind: true,
|
| 168 |
+
inside: {
|
| 169 |
+
'rest-vars': {
|
| 170 |
+
pattern: RegExp('&(?:body|rest)\\s+' + forms),
|
| 171 |
+
inside: arg
|
| 172 |
+
},
|
| 173 |
+
'other-marker-vars': {
|
| 174 |
+
pattern: RegExp('&(?:aux|optional)\\s+' + forms),
|
| 175 |
+
inside: arg
|
| 176 |
+
},
|
| 177 |
+
keys: {
|
| 178 |
+
pattern: RegExp('&key\\s+' + forms + '(?:\\s+&allow-other-keys)?'),
|
| 179 |
+
inside: arg
|
| 180 |
+
},
|
| 181 |
+
argument: {
|
| 182 |
+
pattern: RegExp(symbol),
|
| 183 |
+
alias: 'variable'
|
| 184 |
+
},
|
| 185 |
+
punctuation: /[()]/
|
| 186 |
+
}
|
| 187 |
+
};
|
| 188 |
+
|
| 189 |
+
language['lambda'].inside.arguments = arglist;
|
| 190 |
+
language['defun'].inside.arguments = Prism.util.clone(arglist);
|
| 191 |
+
language['defun'].inside.arguments.inside.sublist = arglist;
|
| 192 |
+
|
| 193 |
+
Prism.languages.lisp = language;
|
| 194 |
+
Prism.languages.elisp = language;
|
| 195 |
+
Prism.languages.emacs = language;
|
| 196 |
+
Prism.languages['emacs-lisp'] = language;
|
| 197 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lisp.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(e){function n(e){return RegExp("(\\()(?:"+e+")(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])(?:"+e+")(?=[\\s)])")}var t="(?!\\d)[-+*/~!@$%^=<>{}\\w]+",r="(\\()",i="(?:[^()]|\\((?:[^()]|\\((?:[^()]|\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\))*\\))*\\))*",s={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp("(\\()(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)(?=\\s)"),lookbehind:!0},{pattern:RegExp("(\\()(?:append|by|collect|concat|do|finally|for|in|return)(?=\\s)"),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("nil|t"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp("(\\()def(?:const|custom|group|var)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp("(\\()(?:cl-)?(?:defmacro|defun\\*?)\\s+"+t+"\\s+\\("+i+"\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp("(\\()lambda\\s+\\(\\s*(?:&?"+t+"(?:\\s+&?"+t+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},l={"lisp-marker":RegExp("&(?!\\d)[-+*/~!@$%^=<>{}\\w]+"),varform:{pattern:RegExp("\\("+t+"\\s+(?=\\S)"+i+"\\)"),inside:s},argument:{pattern:RegExp("(^|[\\s(])"+t),lookbehind:!0,alias:"variable"},rest:s},o="\\S+(?:\\s+\\S+)*",p={pattern:RegExp(r+i+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+o),inside:l},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+o),inside:l},keys:{pattern:RegExp("&key\\s+"+o+"(?:\\s+&allow-other-keys)?"),inside:l},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};s.lambda.inside.arguments=p,s.defun.inside.arguments=e.util.clone(p),s.defun.inside.arguments.inside.sublist=p,e.languages.lisp=s,e.languages.elisp=s,e.languages.emacs=s,e.languages["emacs-lisp"]=s}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-livescript.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.livescript = {
|
| 2 |
+
'comment': [
|
| 3 |
+
{
|
| 4 |
+
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
|
| 5 |
+
lookbehind: true
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
pattern: /(^|[^\\])#.*/,
|
| 9 |
+
lookbehind: true
|
| 10 |
+
}
|
| 11 |
+
],
|
| 12 |
+
'interpolated-string': {
|
| 13 |
+
/* Look-behind and look-ahead prevents wrong behavior of the greedy pattern
|
| 14 |
+
* forcing it to match """-quoted string when it would otherwise match "-quoted first. */
|
| 15 |
+
pattern: /(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,
|
| 16 |
+
lookbehind: true,
|
| 17 |
+
greedy: true,
|
| 18 |
+
inside: {
|
| 19 |
+
'variable': {
|
| 20 |
+
pattern: /(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,
|
| 21 |
+
lookbehind: true
|
| 22 |
+
},
|
| 23 |
+
'interpolation': {
|
| 24 |
+
pattern: /(^|[^\\])#\{[^}]+\}/m,
|
| 25 |
+
lookbehind: true,
|
| 26 |
+
inside: {
|
| 27 |
+
'interpolation-punctuation': {
|
| 28 |
+
pattern: /^#\{|\}$/,
|
| 29 |
+
alias: 'variable'
|
| 30 |
+
}
|
| 31 |
+
// See rest below
|
| 32 |
+
}
|
| 33 |
+
},
|
| 34 |
+
'string': /[\s\S]+/
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
+
'string': [
|
| 38 |
+
{
|
| 39 |
+
pattern: /('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,
|
| 40 |
+
greedy: true
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
pattern: /<\[[\s\S]*?\]>/,
|
| 44 |
+
greedy: true
|
| 45 |
+
},
|
| 46 |
+
/\\[^\s,;\])}]+/
|
| 47 |
+
],
|
| 48 |
+
'regex': [
|
| 49 |
+
{
|
| 50 |
+
pattern: /\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,
|
| 51 |
+
greedy: true,
|
| 52 |
+
inside: {
|
| 53 |
+
'comment': {
|
| 54 |
+
pattern: /(^|[^\\])#.*/,
|
| 55 |
+
lookbehind: true
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
pattern: /\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,
|
| 61 |
+
greedy: true
|
| 62 |
+
}
|
| 63 |
+
],
|
| 64 |
+
'keyword': {
|
| 65 |
+
pattern: /(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,
|
| 66 |
+
lookbehind: true
|
| 67 |
+
},
|
| 68 |
+
'keyword-operator': {
|
| 69 |
+
pattern: /(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,
|
| 70 |
+
lookbehind: true,
|
| 71 |
+
alias: 'operator'
|
| 72 |
+
},
|
| 73 |
+
'boolean': {
|
| 74 |
+
pattern: /(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,
|
| 75 |
+
lookbehind: true
|
| 76 |
+
},
|
| 77 |
+
'argument': {
|
| 78 |
+
// Don't match .&. nor &&
|
| 79 |
+
pattern: /(^|(?!\.&\.)[^&])&(?!&)\d*/m,
|
| 80 |
+
lookbehind: true,
|
| 81 |
+
alias: 'variable'
|
| 82 |
+
},
|
| 83 |
+
'number': /\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,
|
| 84 |
+
'identifier': /[a-z_](?:-?[a-z]|[\d_])*/i,
|
| 85 |
+
'operator': [
|
| 86 |
+
// Spaced .
|
| 87 |
+
{
|
| 88 |
+
pattern: /( )\.(?= )/,
|
| 89 |
+
lookbehind: true
|
| 90 |
+
},
|
| 91 |
+
// Full list, in order:
|
| 92 |
+
// .= .~ .. ...
|
| 93 |
+
// .&. .^. .<<. .>>. .>>>.
|
| 94 |
+
// := :: ::=
|
| 95 |
+
// &&
|
| 96 |
+
// || |>
|
| 97 |
+
// < << <<< <<<<
|
| 98 |
+
// <- <-- <-! <--!
|
| 99 |
+
// <~ <~~ <~! <~~!
|
| 100 |
+
// <| <= <?
|
| 101 |
+
// > >> >= >?
|
| 102 |
+
// - -- -> -->
|
| 103 |
+
// + ++
|
| 104 |
+
// @ @@
|
| 105 |
+
// % %%
|
| 106 |
+
// * **
|
| 107 |
+
// ! != !~=
|
| 108 |
+
// !~> !~~>
|
| 109 |
+
// !-> !-->
|
| 110 |
+
// ~ ~> ~~> ~=
|
| 111 |
+
// = ==
|
| 112 |
+
// ^ ^^
|
| 113 |
+
// / ?
|
| 114 |
+
/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<<?<?|--?!?|~~?!?|[|=?])?|>[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/
|
| 115 |
+
],
|
| 116 |
+
'punctuation': /[(){}\[\]|.,:;`]/
|
| 117 |
+
};
|
| 118 |
+
|
| 119 |
+
Prism.languages.livescript['interpolated-string'].inside['interpolation'].inside.rest = Prism.languages.livescript;
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-livescript.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<<?<?|--?!?|~~?!?|[|=?])?|>[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},Prism.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=Prism.languages.livescript;
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-llvm.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
Prism.languages.llvm = {
|
| 3 |
+
'comment': /;.*/,
|
| 4 |
+
'string': {
|
| 5 |
+
pattern: /"[^"]*"/,
|
| 6 |
+
greedy: true,
|
| 7 |
+
},
|
| 8 |
+
'boolean': /\b(?:false|true)\b/,
|
| 9 |
+
'variable': /[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,
|
| 10 |
+
'label': /(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,
|
| 11 |
+
'type': {
|
| 12 |
+
pattern: /\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,
|
| 13 |
+
alias: 'class-name',
|
| 14 |
+
},
|
| 15 |
+
'keyword': /\b[a-z_][a-z_0-9]*\b/,
|
| 16 |
+
'number': /[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,
|
| 17 |
+
'punctuation': /[{}[\];(),.!*=<>]/,
|
| 18 |
+
};
|
| 19 |
+
}(Prism));
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-llvm.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(a){a.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}}(Prism);
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-log.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// This is a language definition for generic log files.
|
| 2 |
+
// Since there is no one log format, this language definition has to support all formats to some degree.
|
| 3 |
+
//
|
| 4 |
+
// Based on https://github.com/MTDL9/vim-log-highlighting
|
| 5 |
+
|
| 6 |
+
Prism.languages.log = {
|
| 7 |
+
'string': {
|
| 8 |
+
// Single-quoted strings must not be confused with plain text. E.g. Can't isn't Susan's Chris' toy
|
| 9 |
+
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,
|
| 10 |
+
greedy: true,
|
| 11 |
+
},
|
| 12 |
+
|
| 13 |
+
'exception': {
|
| 14 |
+
pattern: /(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,
|
| 15 |
+
lookbehind: true,
|
| 16 |
+
greedy: true,
|
| 17 |
+
alias: ['javastacktrace', 'language-javastacktrace'],
|
| 18 |
+
inside: Prism.languages['javastacktrace'] || {
|
| 19 |
+
'keyword': /\bat\b/,
|
| 20 |
+
'function': /[a-z_][\w$]*(?=\()/,
|
| 21 |
+
'punctuation': /[.:()]/
|
| 22 |
+
}
|
| 23 |
+
},
|
| 24 |
+
|
| 25 |
+
'level': [
|
| 26 |
+
{
|
| 27 |
+
pattern: /\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,
|
| 28 |
+
alias: ['error', 'important']
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
pattern: /\b(?:WARN|WARNING|WRN)\b/,
|
| 32 |
+
alias: ['warning', 'important']
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
pattern: /\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,
|
| 36 |
+
alias: ['info', 'keyword']
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
pattern: /\b(?:DBG|DEBUG|FINE)\b/,
|
| 40 |
+
alias: ['debug', 'keyword']
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
pattern: /\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,
|
| 44 |
+
alias: ['trace', 'comment']
|
| 45 |
+
}
|
| 46 |
+
],
|
| 47 |
+
|
| 48 |
+
'property': {
|
| 49 |
+
pattern: /((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,
|
| 50 |
+
lookbehind: true
|
| 51 |
+
},
|
| 52 |
+
|
| 53 |
+
'separator': {
|
| 54 |
+
pattern: /(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,
|
| 55 |
+
lookbehind: true,
|
| 56 |
+
alias: 'comment'
|
| 57 |
+
},
|
| 58 |
+
|
| 59 |
+
'url': /\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,
|
| 60 |
+
'email': {
|
| 61 |
+
pattern: /(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,
|
| 62 |
+
lookbehind: true,
|
| 63 |
+
alias: 'url'
|
| 64 |
+
},
|
| 65 |
+
|
| 66 |
+
'ip-address': {
|
| 67 |
+
pattern: /\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,
|
| 68 |
+
alias: 'constant'
|
| 69 |
+
},
|
| 70 |
+
'mac-address': {
|
| 71 |
+
pattern: /\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,
|
| 72 |
+
alias: 'constant'
|
| 73 |
+
},
|
| 74 |
+
'domain': {
|
| 75 |
+
pattern: /(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,
|
| 76 |
+
lookbehind: true,
|
| 77 |
+
alias: 'constant'
|
| 78 |
+
},
|
| 79 |
+
|
| 80 |
+
'uuid': {
|
| 81 |
+
pattern: /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,
|
| 82 |
+
alias: 'constant'
|
| 83 |
+
},
|
| 84 |
+
'hash': {
|
| 85 |
+
pattern: /\b(?:[a-f0-9]{32}){1,2}\b/i,
|
| 86 |
+
alias: 'constant'
|
| 87 |
+
},
|
| 88 |
+
|
| 89 |
+
'file-path': {
|
| 90 |
+
pattern: /\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,
|
| 91 |
+
lookbehind: true,
|
| 92 |
+
greedy: true,
|
| 93 |
+
alias: 'string'
|
| 94 |
+
},
|
| 95 |
+
|
| 96 |
+
'date': {
|
| 97 |
+
pattern: RegExp(
|
| 98 |
+
/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source +
|
| 99 |
+
'|' +
|
| 100 |
+
/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source +
|
| 101 |
+
'|' +
|
| 102 |
+
/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,
|
| 103 |
+
'i'
|
| 104 |
+
),
|
| 105 |
+
alias: 'number'
|
| 106 |
+
},
|
| 107 |
+
'time': {
|
| 108 |
+
pattern: /\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,
|
| 109 |
+
alias: 'number'
|
| 110 |
+
},
|
| 111 |
+
|
| 112 |
+
'boolean': /\b(?:false|null|true)\b/i,
|
| 113 |
+
'number': {
|
| 114 |
+
pattern: /(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,
|
| 115 |
+
lookbehind: true
|
| 116 |
+
},
|
| 117 |
+
|
| 118 |
+
'operator': /[;:?<=>~/@!$%&+\-|^(){}*#]/,
|
| 119 |
+
'punctuation': /[\[\].,]/
|
| 120 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-log.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:Prism.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}(?:T(?=\\d{1,2}:)|(?=\\s\\d{1,2}:))|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lolcode.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.lolcode = {
|
| 2 |
+
'comment': [
|
| 3 |
+
/\bOBTW\s[\s\S]*?\sTLDR\b/,
|
| 4 |
+
/\bBTW.+/
|
| 5 |
+
],
|
| 6 |
+
'string': {
|
| 7 |
+
pattern: /"(?::.|[^":])*"/,
|
| 8 |
+
inside: {
|
| 9 |
+
'variable': /:\{[^}]+\}/,
|
| 10 |
+
'symbol': [
|
| 11 |
+
/:\([a-f\d]+\)/i,
|
| 12 |
+
/:\[[^\]]+\]/,
|
| 13 |
+
/:[)>o":]/
|
| 14 |
+
]
|
| 15 |
+
},
|
| 16 |
+
greedy: true
|
| 17 |
+
},
|
| 18 |
+
'number': /(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,
|
| 19 |
+
'symbol': {
|
| 20 |
+
pattern: /(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,
|
| 21 |
+
lookbehind: true,
|
| 22 |
+
inside: {
|
| 23 |
+
'keyword': /A(?=\s)/
|
| 24 |
+
}
|
| 25 |
+
},
|
| 26 |
+
'label': {
|
| 27 |
+
pattern: /((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,
|
| 28 |
+
lookbehind: true,
|
| 29 |
+
alias: 'string'
|
| 30 |
+
},
|
| 31 |
+
'function': {
|
| 32 |
+
pattern: /((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,
|
| 33 |
+
lookbehind: true
|
| 34 |
+
},
|
| 35 |
+
'keyword': [
|
| 36 |
+
{
|
| 37 |
+
pattern: /(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,
|
| 38 |
+
lookbehind: true
|
| 39 |
+
},
|
| 40 |
+
/'Z(?=\s|,|$)/
|
| 41 |
+
],
|
| 42 |
+
'boolean': {
|
| 43 |
+
pattern: /(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,
|
| 44 |
+
lookbehind: true
|
| 45 |
+
},
|
| 46 |
+
'variable': {
|
| 47 |
+
pattern: /(^|\s)IT(?=\s|,|$)/,
|
| 48 |
+
lookbehind: true
|
| 49 |
+
},
|
| 50 |
+
'operator': {
|
| 51 |
+
pattern: /(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,
|
| 52 |
+
lookbehind: true
|
| 53 |
+
},
|
| 54 |
+
'punctuation': /\.{3}|…|,|!/
|
| 55 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lolcode.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lua.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.lua = {
|
| 2 |
+
'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
|
| 3 |
+
// \z may be used to skip the following space
|
| 4 |
+
'string': {
|
| 5 |
+
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
|
| 6 |
+
greedy: true
|
| 7 |
+
},
|
| 8 |
+
'number': /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,
|
| 9 |
+
'keyword': /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,
|
| 10 |
+
'function': /(?!\d)\w+(?=\s*(?:[({]))/,
|
| 11 |
+
'operator': [
|
| 12 |
+
/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,
|
| 13 |
+
{
|
| 14 |
+
// Match ".." but don't break "..."
|
| 15 |
+
pattern: /(^|[^.])\.\.(?!\.)/,
|
| 16 |
+
lookbehind: true
|
| 17 |
+
}
|
| 18 |
+
],
|
| 19 |
+
'punctuation': /[\[\](){},;]|\.+|:+/
|
| 20 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-lua.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-magma.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.magma = {
|
| 2 |
+
'output': {
|
| 3 |
+
pattern: /^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,
|
| 4 |
+
lookbehind: true,
|
| 5 |
+
greedy: true
|
| 6 |
+
},
|
| 7 |
+
|
| 8 |
+
'comment': {
|
| 9 |
+
pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
|
| 10 |
+
greedy: true
|
| 11 |
+
},
|
| 12 |
+
'string': {
|
| 13 |
+
pattern: /(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,
|
| 14 |
+
lookbehind: true,
|
| 15 |
+
greedy: true
|
| 16 |
+
},
|
| 17 |
+
|
| 18 |
+
// http://magma.maths.usyd.edu.au/magma/handbook/text/82
|
| 19 |
+
'keyword': /\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,
|
| 20 |
+
'boolean': /\b(?:false|true)\b/,
|
| 21 |
+
|
| 22 |
+
'generator': {
|
| 23 |
+
pattern: /\b[a-z_]\w*(?=\s*<)/i,
|
| 24 |
+
alias: 'class-name'
|
| 25 |
+
},
|
| 26 |
+
'function': /\b[a-z_]\w*(?=\s*\()/i,
|
| 27 |
+
|
| 28 |
+
'number': {
|
| 29 |
+
pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,
|
| 30 |
+
lookbehind: true
|
| 31 |
+
},
|
| 32 |
+
|
| 33 |
+
'operator': /->|[-+*/^~!|#=]|:=|\.\./,
|
| 34 |
+
'punctuation': /[()[\]{}<>,;.:]/
|
| 35 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-magma.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-makefile.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.makefile = {
|
| 2 |
+
'comment': {
|
| 3 |
+
pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
|
| 4 |
+
lookbehind: true
|
| 5 |
+
},
|
| 6 |
+
'string': {
|
| 7 |
+
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
| 8 |
+
greedy: true
|
| 9 |
+
},
|
| 10 |
+
|
| 11 |
+
'builtin-target': {
|
| 12 |
+
pattern: /\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,
|
| 13 |
+
alias: 'builtin'
|
| 14 |
+
},
|
| 15 |
+
|
| 16 |
+
'target': {
|
| 17 |
+
pattern: /^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,
|
| 18 |
+
alias: 'symbol',
|
| 19 |
+
inside: {
|
| 20 |
+
'variable': /\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/
|
| 21 |
+
}
|
| 22 |
+
},
|
| 23 |
+
'variable': /\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,
|
| 24 |
+
|
| 25 |
+
// Directives
|
| 26 |
+
'keyword': /-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,
|
| 27 |
+
|
| 28 |
+
'function': {
|
| 29 |
+
pattern: /(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,
|
| 30 |
+
lookbehind: true
|
| 31 |
+
},
|
| 32 |
+
'operator': /(?:::|[?:+!])?=|[|@]/,
|
| 33 |
+
'punctuation': /[:;(){}]/
|
| 34 |
+
};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-makefile.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};
|
llama.cpp/build/tools/ui/ui-src/node_modules/prismjs/components/prism-markdown.js
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (Prism) {
|
| 2 |
+
|
| 3 |
+
// Allow only one line break
|
| 4 |
+
var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
| 5 |
+
|
| 6 |
+
/**
|
| 7 |
+
* This function is intended for the creation of the bold or italic pattern.
|
| 8 |
+
*
|
| 9 |
+
* This also adds a lookbehind group to the given pattern to ensure that the pattern is not backslash-escaped.
|
| 10 |
+
*
|
| 11 |
+
* _Note:_ Keep in mind that this adds a capturing group.
|
| 12 |
+
*
|
| 13 |
+
* @param {string} pattern
|
| 14 |
+
* @returns {RegExp}
|
| 15 |
+
*/
|
| 16 |
+
function createInline(pattern) {
|
| 17 |
+
pattern = pattern.replace(/<inner>/g, function () { return inner; });
|
| 18 |
+
return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + '(?:' + pattern + ')');
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source;
|
| 23 |
+
var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function () { return tableCell; });
|
| 24 |
+
var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
Prism.languages.markdown = Prism.languages.extend('markup', {});
|
| 28 |
+
Prism.languages.insertBefore('markdown', 'prolog', {
|
| 29 |
+
'front-matter-block': {
|
| 30 |
+
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
| 31 |
+
lookbehind: true,
|
| 32 |
+
greedy: true,
|
| 33 |
+
inside: {
|
| 34 |
+
'punctuation': /^---|---$/,
|
| 35 |
+
'front-matter': {
|
| 36 |
+
pattern: /\S+(?:\s+\S+)*/,
|
| 37 |
+
alias: ['yaml', 'language-yaml'],
|
| 38 |
+
inside: Prism.languages.yaml
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
},
|
| 42 |
+
'blockquote': {
|
| 43 |
+
// > ...
|
| 44 |
+
pattern: /^>(?:[\t ]*>)*/m,
|
| 45 |
+
alias: 'punctuation'
|
| 46 |
+
},
|
| 47 |
+
'table': {
|
| 48 |
+
pattern: RegExp('^' + tableRow + tableLine + '(?:' + tableRow + ')*', 'm'),
|
| 49 |
+
inside: {
|
| 50 |
+
'table-data-rows': {
|
| 51 |
+
pattern: RegExp('^(' + tableRow + tableLine + ')(?:' + tableRow + ')*$'),
|
| 52 |
+
lookbehind: true,
|
| 53 |
+
inside: {
|
| 54 |
+
'table-data': {
|
| 55 |
+
pattern: RegExp(tableCell),
|
| 56 |
+
inside: Prism.languages.markdown
|
| 57 |
+
},
|
| 58 |
+
'punctuation': /\|/
|
| 59 |
+
}
|
| 60 |
+
},
|
| 61 |
+
'table-line': {
|
| 62 |
+
pattern: RegExp('^(' + tableRow + ')' + tableLine + '$'),
|
| 63 |
+
lookbehind: true,
|
| 64 |
+
inside: {
|
| 65 |
+
'punctuation': /\||:?-{3,}:?/
|
| 66 |
+
}
|
| 67 |
+
},
|
| 68 |
+
'table-header-row': {
|
| 69 |
+
pattern: RegExp('^' + tableRow + '$'),
|
| 70 |
+
inside: {
|
| 71 |
+
'table-header': {
|
| 72 |
+
pattern: RegExp(tableCell),
|
| 73 |
+
alias: 'important',
|
| 74 |
+
inside: Prism.languages.markdown
|
| 75 |
+
},
|
| 76 |
+
'punctuation': /\|/
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
},
|
| 81 |
+
'code': [
|
| 82 |
+
{
|
| 83 |
+
// Prefixed by 4 spaces or 1 tab and preceded by an empty line
|
| 84 |
+
pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
|
| 85 |
+
lookbehind: true,
|
| 86 |
+
alias: 'keyword'
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
// ```optional language
|
| 90 |
+
// code block
|
| 91 |
+
// ```
|
| 92 |
+
pattern: /^```[\s\S]*?^```$/m,
|
| 93 |
+
greedy: true,
|
| 94 |
+
inside: {
|
| 95 |
+
'code-block': {
|
| 96 |
+
pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
|
| 97 |
+
lookbehind: true
|
| 98 |
+
},
|
| 99 |
+
'code-language': {
|
| 100 |
+
pattern: /^(```).+/,
|
| 101 |
+
lookbehind: true
|
| 102 |
+
},
|
| 103 |
+
'punctuation': /```/
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
],
|
| 107 |
+
'title': [
|
| 108 |
+
{
|
| 109 |
+
// title 1
|
| 110 |
+
// =======
|
| 111 |
+
|
| 112 |
+
// title 2
|
| 113 |
+
// -------
|
| 114 |
+
pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
|
| 115 |
+
alias: 'important',
|
| 116 |
+
inside: {
|
| 117 |
+
punctuation: /==+$|--+$/
|
| 118 |
+
}
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
// # title 1
|
| 122 |
+
// ###### title 6
|
| 123 |
+
pattern: /(^\s*)#.+/m,
|
| 124 |
+
lookbehind: true,
|
| 125 |
+
alias: 'important',
|
| 126 |
+
inside: {
|
| 127 |
+
punctuation: /^#+|#+$/
|
| 128 |
+
}
|
| 129 |
+
}
|
| 130 |
+
],
|
| 131 |
+
'hr': {
|
| 132 |
+
// ***
|
| 133 |
+
// ---
|
| 134 |
+
// * * *
|
| 135 |
+
// -----------
|
| 136 |
+
pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
|
| 137 |
+
lookbehind: true,
|
| 138 |
+
alias: 'punctuation'
|
| 139 |
+
},
|
| 140 |
+
'list': {
|
| 141 |
+
// * item
|
| 142 |
+
// + item
|
| 143 |
+
// - item
|
| 144 |
+
// 1. item
|
| 145 |
+
pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
|
| 146 |
+
lookbehind: true,
|
| 147 |
+
alias: 'punctuation'
|
| 148 |
+
},
|
| 149 |
+
'url-reference': {
|
| 150 |
+
// [id]: http://example.com "Optional title"
|
| 151 |
+
// [id]: http://example.com 'Optional title'
|
| 152 |
+
// [id]: http://example.com (Optional title)
|
| 153 |
+
// [id]: <http://example.com> "Optional title"
|
| 154 |
+
pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
|
| 155 |
+
inside: {
|
| 156 |
+
'variable': {
|
| 157 |
+
pattern: /^(!?\[)[^\]]+/,
|
| 158 |
+
lookbehind: true
|
| 159 |
+
},
|
| 160 |
+
'string': /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
|
| 161 |
+
'punctuation': /^[\[\]!:]|[<>]/
|
| 162 |
+
},
|
| 163 |
+
alias: 'url'
|
| 164 |
+
},
|
| 165 |
+
'bold': {
|
| 166 |
+
// **strong**
|
| 167 |
+
// __strong__
|
| 168 |
+
|
| 169 |
+
// allow one nested instance of italic text using the same delimiter
|
| 170 |
+
pattern: createInline(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
|
| 171 |
+
lookbehind: true,
|
| 172 |
+
greedy: true,
|
| 173 |
+
inside: {
|
| 174 |
+
'content': {
|
| 175 |
+
pattern: /(^..)[\s\S]+(?=..$)/,
|
| 176 |
+
lookbehind: true,
|
| 177 |
+
inside: {} // see below
|
| 178 |
+
},
|
| 179 |
+
'punctuation': /\*\*|__/
|
| 180 |
+
}
|
| 181 |
+
},
|
| 182 |
+
'italic': {
|
| 183 |
+
// *em*
|
| 184 |
+
// _em_
|
| 185 |
+
|
| 186 |
+
// allow one nested instance of bold text using the same delimiter
|
| 187 |
+
pattern: createInline(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
|
| 188 |
+
lookbehind: true,
|
| 189 |
+
greedy: true,
|
| 190 |
+
inside: {
|
| 191 |
+
'content': {
|
| 192 |
+
pattern: /(^.)[\s\S]+(?=.$)/,
|
| 193 |
+
lookbehind: true,
|
| 194 |
+
inside: {} // see below
|
| 195 |
+
},
|
| 196 |
+
'punctuation': /[*_]/
|
| 197 |
+
}
|
| 198 |
+
},
|
| 199 |
+
'strike': {
|
| 200 |
+
// ~~strike through~~
|
| 201 |
+
// ~strike~
|
| 202 |
+
// eslint-disable-next-line regexp/strict
|
| 203 |
+
pattern: createInline(/(~~?)(?:(?!~)<inner>)+\2/.source),
|
| 204 |
+
lookbehind: true,
|
| 205 |
+
greedy: true,
|
| 206 |
+
inside: {
|
| 207 |
+
'content': {
|
| 208 |
+
pattern: /(^~~?)[\s\S]+(?=\1$)/,
|
| 209 |
+
lookbehind: true,
|
| 210 |
+
inside: {} // see below
|
| 211 |
+
},
|
| 212 |
+
'punctuation': /~~?/
|
| 213 |
+
}
|
| 214 |
+
},
|
| 215 |
+
'code-snippet': {
|
| 216 |
+
// `code`
|
| 217 |
+
// ``code``
|
| 218 |
+
pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
|
| 219 |
+
lookbehind: true,
|
| 220 |
+
greedy: true,
|
| 221 |
+
alias: ['code', 'keyword']
|
| 222 |
+
},
|
| 223 |
+
'url': {
|
| 224 |
+
// [example](http://example.com "Optional title")
|
| 225 |
+
// [example][id]
|
| 226 |
+
// [example] [id]
|
| 227 |
+
pattern: createInline(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
|
| 228 |
+
lookbehind: true,
|
| 229 |
+
greedy: true,
|
| 230 |
+
inside: {
|
| 231 |
+
'operator': /^!/,
|
| 232 |
+
'content': {
|
| 233 |
+
pattern: /(^\[)[^\]]+(?=\])/,
|
| 234 |
+
lookbehind: true,
|
| 235 |
+
inside: {} // see below
|
| 236 |
+
},
|
| 237 |
+
'variable': {
|
| 238 |
+
pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
|
| 239 |
+
lookbehind: true
|
| 240 |
+
},
|
| 241 |
+
'url': {
|
| 242 |
+
pattern: /(^\]\()[^\s)]+/,
|
| 243 |
+
lookbehind: true
|
| 244 |
+
},
|
| 245 |
+
'string': {
|
| 246 |
+
pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
|
| 247 |
+
lookbehind: true
|
| 248 |
+
}
|
| 249 |
+
}
|
| 250 |
+
}
|
| 251 |
+
});
|
| 252 |
+
|
| 253 |
+
['url', 'bold', 'italic', 'strike'].forEach(function (token) {
|
| 254 |
+
['url', 'bold', 'italic', 'strike', 'code-snippet'].forEach(function (inside) {
|
| 255 |
+
if (token !== inside) {
|
| 256 |
+
Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside];
|
| 257 |
+
}
|
| 258 |
+
});
|
| 259 |
+
});
|
| 260 |
+
|
| 261 |
+
Prism.hooks.add('after-tokenize', function (env) {
|
| 262 |
+
if (env.language !== 'markdown' && env.language !== 'md') {
|
| 263 |
+
return;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
function walkTokens(tokens) {
|
| 267 |
+
if (!tokens || typeof tokens === 'string') {
|
| 268 |
+
return;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
for (var i = 0, l = tokens.length; i < l; i++) {
|
| 272 |
+
var token = tokens[i];
|
| 273 |
+
|
| 274 |
+
if (token.type !== 'code') {
|
| 275 |
+
walkTokens(token.content);
|
| 276 |
+
continue;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
/*
|
| 280 |
+
* Add the correct `language-xxxx` class to this code block. Keep in mind that the `code-language` token
|
| 281 |
+
* is optional. But the grammar is defined so that there is only one case we have to handle:
|
| 282 |
+
*
|
| 283 |
+
* token.content = [
|
| 284 |
+
* <span class="punctuation">```</span>,
|
| 285 |
+
* <span class="code-language">xxxx</span>,
|
| 286 |
+
* '\n', // exactly one new lines (\r or \n or \r\n)
|
| 287 |
+
* <span class="code-block">...</span>,
|
| 288 |
+
* '\n', // exactly one new lines again
|
| 289 |
+
* <span class="punctuation">```</span>
|
| 290 |
+
* ];
|
| 291 |
+
*/
|
| 292 |
+
|
| 293 |
+
var codeLang = token.content[1];
|
| 294 |
+
var codeBlock = token.content[3];
|
| 295 |
+
|
| 296 |
+
if (codeLang && codeBlock &&
|
| 297 |
+
codeLang.type === 'code-language' && codeBlock.type === 'code-block' &&
|
| 298 |
+
typeof codeLang.content === 'string') {
|
| 299 |
+
|
| 300 |
+
// this might be a language that Prism does not support
|
| 301 |
+
|
| 302 |
+
// do some replacements to support C++, C#, and F#
|
| 303 |
+
var lang = codeLang.content.replace(/\b#/g, 'sharp').replace(/\b\+\+/g, 'pp');
|
| 304 |
+
// only use the first word
|
| 305 |
+
lang = (/[a-z][\w-]*/i.exec(lang) || [''])[0].toLowerCase();
|
| 306 |
+
var alias = 'language-' + lang;
|
| 307 |
+
|
| 308 |
+
// add alias
|
| 309 |
+
if (!codeBlock.alias) {
|
| 310 |
+
codeBlock.alias = [alias];
|
| 311 |
+
} else if (typeof codeBlock.alias === 'string') {
|
| 312 |
+
codeBlock.alias = [codeBlock.alias, alias];
|
| 313 |
+
} else {
|
| 314 |
+
codeBlock.alias.push(alias);
|
| 315 |
+
}
|
| 316 |
+
}
|
| 317 |
+
}
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
walkTokens(env.tokens);
|
| 321 |
+
});
|
| 322 |
+
|
| 323 |
+
Prism.hooks.add('wrap', function (env) {
|
| 324 |
+
if (env.type !== 'code-block') {
|
| 325 |
+
return;
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
var codeLang = '';
|
| 329 |
+
for (var i = 0, l = env.classes.length; i < l; i++) {
|
| 330 |
+
var cls = env.classes[i];
|
| 331 |
+
var match = /language-(.+)/.exec(cls);
|
| 332 |
+
if (match) {
|
| 333 |
+
codeLang = match[1];
|
| 334 |
+
break;
|
| 335 |
+
}
|
| 336 |
+
}
|
| 337 |
+
|
| 338 |
+
var grammar = Prism.languages[codeLang];
|
| 339 |
+
|
| 340 |
+
if (!grammar) {
|
| 341 |
+
if (codeLang && codeLang !== 'none' && Prism.plugins.autoloader) {
|
| 342 |
+
var id = 'md-' + new Date().valueOf() + '-' + Math.floor(Math.random() * 1e16);
|
| 343 |
+
env.attributes['id'] = id;
|
| 344 |
+
|
| 345 |
+
Prism.plugins.autoloader.loadLanguages(codeLang, function () {
|
| 346 |
+
var ele = document.getElementById(id);
|
| 347 |
+
if (ele) {
|
| 348 |
+
ele.innerHTML = Prism.highlight(ele.textContent, Prism.languages[codeLang], codeLang);
|
| 349 |
+
}
|
| 350 |
+
});
|
| 351 |
+
}
|
| 352 |
+
} else {
|
| 353 |
+
env.content = Prism.highlight(textContent(env.content), grammar, codeLang);
|
| 354 |
+
}
|
| 355 |
+
});
|
| 356 |
+
|
| 357 |
+
var tagPattern = RegExp(Prism.languages.markup.tag.pattern.source, 'gi');
|
| 358 |
+
|
| 359 |
+
/**
|
| 360 |
+
* A list of known entity names.
|
| 361 |
+
*
|
| 362 |
+
* This will always be incomplete to save space. The current list is the one used by lowdash's unescape function.
|
| 363 |
+
*
|
| 364 |
+
* @see {@link https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/unescape.js#L2}
|
| 365 |
+
*/
|
| 366 |
+
var KNOWN_ENTITY_NAMES = {
|
| 367 |
+
'amp': '&',
|
| 368 |
+
'lt': '<',
|
| 369 |
+
'gt': '>',
|
| 370 |
+
'quot': '"',
|
| 371 |
+
};
|
| 372 |
+
|
| 373 |
+
// IE 11 doesn't support `String.fromCodePoint`
|
| 374 |
+
var fromCodePoint = String.fromCodePoint || String.fromCharCode;
|
| 375 |
+
|
| 376 |
+
/**
|
| 377 |
+
* Returns the text content of a given HTML source code string.
|
| 378 |
+
*
|
| 379 |
+
* @param {string} html
|
| 380 |
+
* @returns {string}
|
| 381 |
+
*/
|
| 382 |
+
function textContent(html) {
|
| 383 |
+
// remove all tags
|
| 384 |
+
var text = html.replace(tagPattern, '');
|
| 385 |
+
|
| 386 |
+
// decode known entities
|
| 387 |
+
text = text.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function (m, code) {
|
| 388 |
+
code = code.toLowerCase();
|
| 389 |
+
|
| 390 |
+
if (code[0] === '#') {
|
| 391 |
+
var value;
|
| 392 |
+
if (code[1] === 'x') {
|
| 393 |
+
value = parseInt(code.slice(2), 16);
|
| 394 |
+
} else {
|
| 395 |
+
value = Number(code.slice(1));
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
return fromCodePoint(value);
|
| 399 |
+
} else {
|
| 400 |
+
var known = KNOWN_ENTITY_NAMES[code];
|
| 401 |
+
if (known) {
|
| 402 |
+
return known;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
// unable to decode
|
| 406 |
+
return m;
|
| 407 |
+
}
|
| 408 |
+
});
|
| 409 |
+
|
| 410 |
+
return text;
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
Prism.languages.md = Prism.languages.markdown;
|
| 414 |
+
|
| 415 |
+
}(Prism));
|