Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

87 lines
2.5 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
* Module id: 28418
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, i) => {
"use strict";
function r(e) {
var t, i;
(i = [
"sum",
"min",
"max",
"avg",
"group",
"stddev",
"stdvar",
"count",
"count_values",
"bottomk",
"topk",
"quantile",
].concat(
(t = ["on", "ignoring", "group_right", "group_left", "by", "without"]),
["offset"],
)),
(e.languages.promql = {
comment: { pattern: /(^[ \t]*)#.*/m, lookbehind: !0 },
"vector-match": {
pattern: RegExp("((?:" + t.join("|") + ")\\s*)\\([^)]*\\)"),
lookbehind: !0,
inside: {
"label-key": { pattern: /\b[^,]+\b/, alias: "attr-name" },
punctuation: /[(),]/,
},
},
"context-labels": {
pattern: /\{[^{}]*\}/,
inside: {
"label-key": {
pattern: /\b[a-z_]\w*(?=\s*(?:=|![=~]))/,
alias: "attr-name",
},
"label-value": {
pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
greedy: !0,
alias: "attr-value",
},
punctuation: /\{|\}|=~?|![=~]|,/,
},
},
"context-range": [
{
pattern: /\[[\w\s:]+\]/,
inside: {
punctuation: /\[|\]|:/,
"range-duration": {
pattern: /\b(?:\d+(?:[smhdwy]|ms))+\b/i,
alias: "number",
},
},
},
{
pattern: /(\boffset\s+)\w+/,
lookbehind: !0,
inside: {
"range-duration": {
pattern: /\b(?:\d+(?:[smhdwy]|ms))+\b/i,
alias: "number",
},
},
},
],
keyword: RegExp("\\b(?:" + i.join("|") + ")\\b", "i"),
function: /\b[a-z_]\w*(?=\s*\()/i,
number:
/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,
operator: /[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,
punctuation: /[{};()`,.[\]]/,
});
}
(t.exports = r), (r.displayName = "promql"), (r.aliases = []);
};
export default moduleFactory;