Affected files: .obsidian/plugins/codeblock-customizer/data.json .obsidian/plugins/codeblock-customizer/main.js .obsidian/plugins/codeblock-customizer/manifest.json .obsidian/plugins/codeblock-customizer/styles.css .obsidian/plugins/dataview/main.js .obsidian/plugins/dataview/manifest.json .obsidian/plugins/obsidian-columns/main.js .obsidian/plugins/obsidian-columns/manifest.json .obsidian/plugins/obsidian-columns/styles.css .obsidian/plugins/obsidian-git/data.json .obsidian/plugins/obsidian-quiet-outline/main.js .obsidian/plugins/obsidian-quiet-outline/manifest.json .obsidian/plugins/obsidian-quiet-outline/styles.css .obsidian/plugins/obsidian-tasks-plugin/main.js .obsidian/plugins/obsidian-tasks-plugin/manifest.json .obsidian/plugins/obsidian-tasks-plugin/styles.css .obsidian/plugins/obsidian-tracker/main.js .obsidian/plugins/obsidian-tracker/manifest.json .obsidian/plugins/table-editor-obsidian/main.js .obsidian/plugins/table-editor-obsidian/manifest.json .obsidian/types.json
30551 lines
1.5 MiB
30551 lines
1.5 MiB
/*
|
||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||
if you want to view the source, please visit the github repository of this plugin
|
||
*/
|
||
|
||
var __create = Object.create;
|
||
var __defProp = Object.defineProperty;
|
||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||
var __getProtoOf = Object.getPrototypeOf;
|
||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
||
var __commonJS = (cb, mod) => function __require() {
|
||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||
};
|
||
var __export = (target, all3) => {
|
||
for (var name in all3)
|
||
__defProp(target, name, { get: all3[name], enumerable: true });
|
||
};
|
||
var __copyProps = (to, from, except, desc) => {
|
||
if (from && typeof from === "object" || typeof from === "function") {
|
||
for (let key2 of __getOwnPropNames(from))
|
||
if (!__hasOwnProp.call(to, key2) && key2 !== except)
|
||
__defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
||
}
|
||
return to;
|
||
};
|
||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||
// If the importer is in node compatibility mode or this is not an ESM
|
||
// file that has been converted to a CommonJS file using a Babel-
|
||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||
mod
|
||
));
|
||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||
var __publicField = (obj, key2, value) => {
|
||
__defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|
||
return value;
|
||
};
|
||
|
||
// node_modules/lodash/lodash.js
|
||
var require_lodash = __commonJS({
|
||
"node_modules/lodash/lodash.js"(exports, module2) {
|
||
(function() {
|
||
var undefined2;
|
||
var VERSION = "4.17.21";
|
||
var LARGE_ARRAY_SIZE = 200;
|
||
var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
|
||
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
||
var MAX_MEMOIZE_SIZE = 500;
|
||
var PLACEHOLDER = "__lodash_placeholder__";
|
||
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
|
||
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
|
||
var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
|
||
var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
|
||
var HOT_COUNT = 800, HOT_SPAN = 16;
|
||
var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
|
||
var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
|
||
var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
|
||
var wrapFlags = [
|
||
["ary", WRAP_ARY_FLAG],
|
||
["bind", WRAP_BIND_FLAG],
|
||
["bindKey", WRAP_BIND_KEY_FLAG],
|
||
["curry", WRAP_CURRY_FLAG],
|
||
["curryRight", WRAP_CURRY_RIGHT_FLAG],
|
||
["flip", WRAP_FLIP_FLAG],
|
||
["partial", WRAP_PARTIAL_FLAG],
|
||
["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
|
||
["rearg", WRAP_REARG_FLAG]
|
||
];
|
||
var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
|
||
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
||
var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
||
var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
|
||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
|
||
var reTrimStart = /^\s+/;
|
||
var reWhitespace = /\s/;
|
||
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
|
||
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
||
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
||
var reEscapeChar = /\\(\\)?/g;
|
||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
||
var reFlags = /\w*$/;
|
||
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||
var reIsBinary = /^0b[01]+$/i;
|
||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||
var reIsOctal = /^0o[0-7]+$/i;
|
||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
||
var reNoMatch = /($^)/;
|
||
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
|
||
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
||
var rsApos = "['\u2019]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
|
||
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
|
||
var reApos = RegExp(rsApos, "g");
|
||
var reComboMark = RegExp(rsCombo, "g");
|
||
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
|
||
var reUnicodeWord = RegExp([
|
||
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
|
||
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
|
||
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
||
rsUpper + "+" + rsOptContrUpper,
|
||
rsOrdUpper,
|
||
rsOrdLower,
|
||
rsDigits,
|
||
rsEmoji
|
||
].join("|"), "g");
|
||
var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
|
||
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||
var contextProps = [
|
||
"Array",
|
||
"Buffer",
|
||
"DataView",
|
||
"Date",
|
||
"Error",
|
||
"Float32Array",
|
||
"Float64Array",
|
||
"Function",
|
||
"Int8Array",
|
||
"Int16Array",
|
||
"Int32Array",
|
||
"Map",
|
||
"Math",
|
||
"Object",
|
||
"Promise",
|
||
"RegExp",
|
||
"Set",
|
||
"String",
|
||
"Symbol",
|
||
"TypeError",
|
||
"Uint8Array",
|
||
"Uint8ClampedArray",
|
||
"Uint16Array",
|
||
"Uint32Array",
|
||
"WeakMap",
|
||
"_",
|
||
"clearTimeout",
|
||
"isFinite",
|
||
"parseInt",
|
||
"setTimeout"
|
||
];
|
||
var templateCounter = -1;
|
||
var typedArrayTags = {};
|
||
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
||
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
||
var cloneableTags = {};
|
||
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
||
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
||
var deburredLetters = {
|
||
// Latin-1 Supplement block.
|
||
"\xC0": "A",
|
||
"\xC1": "A",
|
||
"\xC2": "A",
|
||
"\xC3": "A",
|
||
"\xC4": "A",
|
||
"\xC5": "A",
|
||
"\xE0": "a",
|
||
"\xE1": "a",
|
||
"\xE2": "a",
|
||
"\xE3": "a",
|
||
"\xE4": "a",
|
||
"\xE5": "a",
|
||
"\xC7": "C",
|
||
"\xE7": "c",
|
||
"\xD0": "D",
|
||
"\xF0": "d",
|
||
"\xC8": "E",
|
||
"\xC9": "E",
|
||
"\xCA": "E",
|
||
"\xCB": "E",
|
||
"\xE8": "e",
|
||
"\xE9": "e",
|
||
"\xEA": "e",
|
||
"\xEB": "e",
|
||
"\xCC": "I",
|
||
"\xCD": "I",
|
||
"\xCE": "I",
|
||
"\xCF": "I",
|
||
"\xEC": "i",
|
||
"\xED": "i",
|
||
"\xEE": "i",
|
||
"\xEF": "i",
|
||
"\xD1": "N",
|
||
"\xF1": "n",
|
||
"\xD2": "O",
|
||
"\xD3": "O",
|
||
"\xD4": "O",
|
||
"\xD5": "O",
|
||
"\xD6": "O",
|
||
"\xD8": "O",
|
||
"\xF2": "o",
|
||
"\xF3": "o",
|
||
"\xF4": "o",
|
||
"\xF5": "o",
|
||
"\xF6": "o",
|
||
"\xF8": "o",
|
||
"\xD9": "U",
|
||
"\xDA": "U",
|
||
"\xDB": "U",
|
||
"\xDC": "U",
|
||
"\xF9": "u",
|
||
"\xFA": "u",
|
||
"\xFB": "u",
|
||
"\xFC": "u",
|
||
"\xDD": "Y",
|
||
"\xFD": "y",
|
||
"\xFF": "y",
|
||
"\xC6": "Ae",
|
||
"\xE6": "ae",
|
||
"\xDE": "Th",
|
||
"\xFE": "th",
|
||
"\xDF": "ss",
|
||
// Latin Extended-A block.
|
||
"\u0100": "A",
|
||
"\u0102": "A",
|
||
"\u0104": "A",
|
||
"\u0101": "a",
|
||
"\u0103": "a",
|
||
"\u0105": "a",
|
||
"\u0106": "C",
|
||
"\u0108": "C",
|
||
"\u010A": "C",
|
||
"\u010C": "C",
|
||
"\u0107": "c",
|
||
"\u0109": "c",
|
||
"\u010B": "c",
|
||
"\u010D": "c",
|
||
"\u010E": "D",
|
||
"\u0110": "D",
|
||
"\u010F": "d",
|
||
"\u0111": "d",
|
||
"\u0112": "E",
|
||
"\u0114": "E",
|
||
"\u0116": "E",
|
||
"\u0118": "E",
|
||
"\u011A": "E",
|
||
"\u0113": "e",
|
||
"\u0115": "e",
|
||
"\u0117": "e",
|
||
"\u0119": "e",
|
||
"\u011B": "e",
|
||
"\u011C": "G",
|
||
"\u011E": "G",
|
||
"\u0120": "G",
|
||
"\u0122": "G",
|
||
"\u011D": "g",
|
||
"\u011F": "g",
|
||
"\u0121": "g",
|
||
"\u0123": "g",
|
||
"\u0124": "H",
|
||
"\u0126": "H",
|
||
"\u0125": "h",
|
||
"\u0127": "h",
|
||
"\u0128": "I",
|
||
"\u012A": "I",
|
||
"\u012C": "I",
|
||
"\u012E": "I",
|
||
"\u0130": "I",
|
||
"\u0129": "i",
|
||
"\u012B": "i",
|
||
"\u012D": "i",
|
||
"\u012F": "i",
|
||
"\u0131": "i",
|
||
"\u0134": "J",
|
||
"\u0135": "j",
|
||
"\u0136": "K",
|
||
"\u0137": "k",
|
||
"\u0138": "k",
|
||
"\u0139": "L",
|
||
"\u013B": "L",
|
||
"\u013D": "L",
|
||
"\u013F": "L",
|
||
"\u0141": "L",
|
||
"\u013A": "l",
|
||
"\u013C": "l",
|
||
"\u013E": "l",
|
||
"\u0140": "l",
|
||
"\u0142": "l",
|
||
"\u0143": "N",
|
||
"\u0145": "N",
|
||
"\u0147": "N",
|
||
"\u014A": "N",
|
||
"\u0144": "n",
|
||
"\u0146": "n",
|
||
"\u0148": "n",
|
||
"\u014B": "n",
|
||
"\u014C": "O",
|
||
"\u014E": "O",
|
||
"\u0150": "O",
|
||
"\u014D": "o",
|
||
"\u014F": "o",
|
||
"\u0151": "o",
|
||
"\u0154": "R",
|
||
"\u0156": "R",
|
||
"\u0158": "R",
|
||
"\u0155": "r",
|
||
"\u0157": "r",
|
||
"\u0159": "r",
|
||
"\u015A": "S",
|
||
"\u015C": "S",
|
||
"\u015E": "S",
|
||
"\u0160": "S",
|
||
"\u015B": "s",
|
||
"\u015D": "s",
|
||
"\u015F": "s",
|
||
"\u0161": "s",
|
||
"\u0162": "T",
|
||
"\u0164": "T",
|
||
"\u0166": "T",
|
||
"\u0163": "t",
|
||
"\u0165": "t",
|
||
"\u0167": "t",
|
||
"\u0168": "U",
|
||
"\u016A": "U",
|
||
"\u016C": "U",
|
||
"\u016E": "U",
|
||
"\u0170": "U",
|
||
"\u0172": "U",
|
||
"\u0169": "u",
|
||
"\u016B": "u",
|
||
"\u016D": "u",
|
||
"\u016F": "u",
|
||
"\u0171": "u",
|
||
"\u0173": "u",
|
||
"\u0174": "W",
|
||
"\u0175": "w",
|
||
"\u0176": "Y",
|
||
"\u0177": "y",
|
||
"\u0178": "Y",
|
||
"\u0179": "Z",
|
||
"\u017B": "Z",
|
||
"\u017D": "Z",
|
||
"\u017A": "z",
|
||
"\u017C": "z",
|
||
"\u017E": "z",
|
||
"\u0132": "IJ",
|
||
"\u0133": "ij",
|
||
"\u0152": "Oe",
|
||
"\u0153": "oe",
|
||
"\u0149": "'n",
|
||
"\u017F": "s"
|
||
};
|
||
var htmlEscapes = {
|
||
"&": "&",
|
||
"<": "<",
|
||
">": ">",
|
||
'"': """,
|
||
"'": "'"
|
||
};
|
||
var htmlUnescapes = {
|
||
"&": "&",
|
||
"<": "<",
|
||
">": ">",
|
||
""": '"',
|
||
"'": "'"
|
||
};
|
||
var stringEscapes = {
|
||
"\\": "\\",
|
||
"'": "'",
|
||
"\n": "n",
|
||
"\r": "r",
|
||
"\u2028": "u2028",
|
||
"\u2029": "u2029"
|
||
};
|
||
var freeParseFloat = parseFloat, freeParseInt = parseInt;
|
||
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
||
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
||
var root2 = freeGlobal || freeSelf || Function("return this")();
|
||
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
||
var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
|
||
var moduleExports = freeModule && freeModule.exports === freeExports;
|
||
var freeProcess = moduleExports && freeGlobal.process;
|
||
var nodeUtil = function() {
|
||
try {
|
||
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
||
if (types) {
|
||
return types;
|
||
}
|
||
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
||
} catch (e) {
|
||
}
|
||
}();
|
||
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
||
function apply(func, thisArg, args) {
|
||
switch (args.length) {
|
||
case 0:
|
||
return func.call(thisArg);
|
||
case 1:
|
||
return func.call(thisArg, args[0]);
|
||
case 2:
|
||
return func.call(thisArg, args[0], args[1]);
|
||
case 3:
|
||
return func.call(thisArg, args[0], args[1], args[2]);
|
||
}
|
||
return func.apply(thisArg, args);
|
||
}
|
||
function arrayAggregator(array, setter, iteratee, accumulator) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
setter(accumulator, value, iteratee(value), array);
|
||
}
|
||
return accumulator;
|
||
}
|
||
function arrayEach(array, iteratee) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (iteratee(array[index2], index2, array) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function arrayEachRight(array, iteratee) {
|
||
var length = array == null ? 0 : array.length;
|
||
while (length--) {
|
||
if (iteratee(array[length], length, array) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function arrayEvery(array, predicate) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (!predicate(array[index2], index2, array)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function arrayFilter(array, predicate) {
|
||
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (predicate(value, index2, array)) {
|
||
result[resIndex++] = value;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function arrayIncludes(array, value) {
|
||
var length = array == null ? 0 : array.length;
|
||
return !!length && baseIndexOf(array, value, 0) > -1;
|
||
}
|
||
function arrayIncludesWith(array, value, comparator) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (comparator(value, array[index2])) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function arrayMap(array, iteratee) {
|
||
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
||
while (++index2 < length) {
|
||
result[index2] = iteratee(array[index2], index2, array);
|
||
}
|
||
return result;
|
||
}
|
||
function arrayPush(array, values) {
|
||
var index2 = -1, length = values.length, offset = array.length;
|
||
while (++index2 < length) {
|
||
array[offset + index2] = values[index2];
|
||
}
|
||
return array;
|
||
}
|
||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
if (initAccum && length) {
|
||
accumulator = array[++index2];
|
||
}
|
||
while (++index2 < length) {
|
||
accumulator = iteratee(accumulator, array[index2], index2, array);
|
||
}
|
||
return accumulator;
|
||
}
|
||
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (initAccum && length) {
|
||
accumulator = array[--length];
|
||
}
|
||
while (length--) {
|
||
accumulator = iteratee(accumulator, array[length], length, array);
|
||
}
|
||
return accumulator;
|
||
}
|
||
function arraySome(array, predicate) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (predicate(array[index2], index2, array)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
var asciiSize = baseProperty("length");
|
||
function asciiToArray(string) {
|
||
return string.split("");
|
||
}
|
||
function asciiWords(string) {
|
||
return string.match(reAsciiWord) || [];
|
||
}
|
||
function baseFindKey(collection, predicate, eachFunc) {
|
||
var result;
|
||
eachFunc(collection, function(value, key2, collection2) {
|
||
if (predicate(value, key2, collection2)) {
|
||
result = key2;
|
||
return false;
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||
var length = array.length, index2 = fromIndex + (fromRight ? 1 : -1);
|
||
while (fromRight ? index2-- : ++index2 < length) {
|
||
if (predicate(array[index2], index2, array)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function baseIndexOf(array, value, fromIndex) {
|
||
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
||
}
|
||
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
||
var index2 = fromIndex - 1, length = array.length;
|
||
while (++index2 < length) {
|
||
if (comparator(array[index2], value)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function baseIsNaN(value) {
|
||
return value !== value;
|
||
}
|
||
function baseMean(array, iteratee) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseSum(array, iteratee) / length : NAN;
|
||
}
|
||
function baseProperty(key2) {
|
||
return function(object) {
|
||
return object == null ? undefined2 : object[key2];
|
||
};
|
||
}
|
||
function basePropertyOf(object) {
|
||
return function(key2) {
|
||
return object == null ? undefined2 : object[key2];
|
||
};
|
||
}
|
||
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
||
eachFunc(collection, function(value, index2, collection2) {
|
||
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function baseSortBy(array, comparer) {
|
||
var length = array.length;
|
||
array.sort(comparer);
|
||
while (length--) {
|
||
array[length] = array[length].value;
|
||
}
|
||
return array;
|
||
}
|
||
function baseSum(array, iteratee) {
|
||
var result, index2 = -1, length = array.length;
|
||
while (++index2 < length) {
|
||
var current = iteratee(array[index2]);
|
||
if (current !== undefined2) {
|
||
result = result === undefined2 ? current : result + current;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function baseTimes(n, iteratee) {
|
||
var index2 = -1, result = Array(n);
|
||
while (++index2 < n) {
|
||
result[index2] = iteratee(index2);
|
||
}
|
||
return result;
|
||
}
|
||
function baseToPairs(object, props) {
|
||
return arrayMap(props, function(key2) {
|
||
return [key2, object[key2]];
|
||
});
|
||
}
|
||
function baseTrim(string) {
|
||
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
||
}
|
||
function baseUnary(func) {
|
||
return function(value) {
|
||
return func(value);
|
||
};
|
||
}
|
||
function baseValues(object, props) {
|
||
return arrayMap(props, function(key2) {
|
||
return object[key2];
|
||
});
|
||
}
|
||
function cacheHas(cache, key2) {
|
||
return cache.has(key2);
|
||
}
|
||
function charsStartIndex(strSymbols, chrSymbols) {
|
||
var index2 = -1, length = strSymbols.length;
|
||
while (++index2 < length && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) {
|
||
}
|
||
return index2;
|
||
}
|
||
function charsEndIndex(strSymbols, chrSymbols) {
|
||
var index2 = strSymbols.length;
|
||
while (index2-- && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) {
|
||
}
|
||
return index2;
|
||
}
|
||
function countHolders(array, placeholder) {
|
||
var length = array.length, result = 0;
|
||
while (length--) {
|
||
if (array[length] === placeholder) {
|
||
++result;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
var deburrLetter = basePropertyOf(deburredLetters);
|
||
var escapeHtmlChar = basePropertyOf(htmlEscapes);
|
||
function escapeStringChar(chr) {
|
||
return "\\" + stringEscapes[chr];
|
||
}
|
||
function getValue(object, key2) {
|
||
return object == null ? undefined2 : object[key2];
|
||
}
|
||
function hasUnicode(string) {
|
||
return reHasUnicode.test(string);
|
||
}
|
||
function hasUnicodeWord(string) {
|
||
return reHasUnicodeWord.test(string);
|
||
}
|
||
function iteratorToArray(iterator) {
|
||
var data, result = [];
|
||
while (!(data = iterator.next()).done) {
|
||
result.push(data.value);
|
||
}
|
||
return result;
|
||
}
|
||
function mapToArray(map) {
|
||
var index2 = -1, result = Array(map.size);
|
||
map.forEach(function(value, key2) {
|
||
result[++index2] = [key2, value];
|
||
});
|
||
return result;
|
||
}
|
||
function overArg(func, transform) {
|
||
return function(arg) {
|
||
return func(transform(arg));
|
||
};
|
||
}
|
||
function replaceHolders(array, placeholder) {
|
||
var index2 = -1, length = array.length, resIndex = 0, result = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (value === placeholder || value === PLACEHOLDER) {
|
||
array[index2] = PLACEHOLDER;
|
||
result[resIndex++] = index2;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function setToArray(set) {
|
||
var index2 = -1, result = Array(set.size);
|
||
set.forEach(function(value) {
|
||
result[++index2] = value;
|
||
});
|
||
return result;
|
||
}
|
||
function setToPairs(set) {
|
||
var index2 = -1, result = Array(set.size);
|
||
set.forEach(function(value) {
|
||
result[++index2] = [value, value];
|
||
});
|
||
return result;
|
||
}
|
||
function strictIndexOf(array, value, fromIndex) {
|
||
var index2 = fromIndex - 1, length = array.length;
|
||
while (++index2 < length) {
|
||
if (array[index2] === value) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function strictLastIndexOf(array, value, fromIndex) {
|
||
var index2 = fromIndex + 1;
|
||
while (index2--) {
|
||
if (array[index2] === value) {
|
||
return index2;
|
||
}
|
||
}
|
||
return index2;
|
||
}
|
||
function stringSize(string) {
|
||
return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
|
||
}
|
||
function stringToArray(string) {
|
||
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
||
}
|
||
function trimmedEndIndex(string) {
|
||
var index2 = string.length;
|
||
while (index2-- && reWhitespace.test(string.charAt(index2))) {
|
||
}
|
||
return index2;
|
||
}
|
||
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
||
function unicodeSize(string) {
|
||
var result = reUnicode.lastIndex = 0;
|
||
while (reUnicode.test(string)) {
|
||
++result;
|
||
}
|
||
return result;
|
||
}
|
||
function unicodeToArray(string) {
|
||
return string.match(reUnicode) || [];
|
||
}
|
||
function unicodeWords(string) {
|
||
return string.match(reUnicodeWord) || [];
|
||
}
|
||
var runInContext = function runInContext2(context) {
|
||
context = context == null ? root2 : _2.defaults(root2.Object(), context, _2.pick(root2, contextProps));
|
||
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError;
|
||
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
||
var coreJsData = context["__core-js_shared__"];
|
||
var funcToString = funcProto.toString;
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
var idCounter = 0;
|
||
var maskSrcKey = function() {
|
||
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
||
return uid ? "Symbol(src)_1." + uid : "";
|
||
}();
|
||
var nativeObjectToString = objectProto.toString;
|
||
var objectCtorString = funcToString.call(Object2);
|
||
var oldDash = root2._;
|
||
var reIsNative = RegExp2(
|
||
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
||
);
|
||
var Buffer2 = moduleExports ? context.Buffer : undefined2, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined2, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined2, symIterator = Symbol2 ? Symbol2.iterator : undefined2, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined2;
|
||
var defineProperty = function() {
|
||
try {
|
||
var func = getNative(Object2, "defineProperty");
|
||
func({}, "", {});
|
||
return func;
|
||
} catch (e) {
|
||
}
|
||
}();
|
||
var ctxClearTimeout = context.clearTimeout !== root2.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root2.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root2.setTimeout && context.setTimeout;
|
||
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
||
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
||
var metaMap = WeakMap2 && new WeakMap2();
|
||
var realNames = {};
|
||
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
|
||
var symbolProto = Symbol2 ? Symbol2.prototype : undefined2, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined2, symbolToString = symbolProto ? symbolProto.toString : undefined2;
|
||
function lodash(value) {
|
||
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
||
if (value instanceof LodashWrapper) {
|
||
return value;
|
||
}
|
||
if (hasOwnProperty.call(value, "__wrapped__")) {
|
||
return wrapperClone(value);
|
||
}
|
||
}
|
||
return new LodashWrapper(value);
|
||
}
|
||
var baseCreate = function() {
|
||
function object() {
|
||
}
|
||
return function(proto2) {
|
||
if (!isObject(proto2)) {
|
||
return {};
|
||
}
|
||
if (objectCreate) {
|
||
return objectCreate(proto2);
|
||
}
|
||
object.prototype = proto2;
|
||
var result2 = new object();
|
||
object.prototype = undefined2;
|
||
return result2;
|
||
};
|
||
}();
|
||
function baseLodash() {
|
||
}
|
||
function LodashWrapper(value, chainAll) {
|
||
this.__wrapped__ = value;
|
||
this.__actions__ = [];
|
||
this.__chain__ = !!chainAll;
|
||
this.__index__ = 0;
|
||
this.__values__ = undefined2;
|
||
}
|
||
lodash.templateSettings = {
|
||
/**
|
||
* Used to detect `data` property values to be HTML-escaped.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {RegExp}
|
||
*/
|
||
"escape": reEscape,
|
||
/**
|
||
* Used to detect code to be evaluated.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {RegExp}
|
||
*/
|
||
"evaluate": reEvaluate,
|
||
/**
|
||
* Used to detect `data` property values to inject.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {RegExp}
|
||
*/
|
||
"interpolate": reInterpolate,
|
||
/**
|
||
* Used to reference the data object in the template text.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {string}
|
||
*/
|
||
"variable": "",
|
||
/**
|
||
* Used to import variables into the compiled template.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {Object}
|
||
*/
|
||
"imports": {
|
||
/**
|
||
* A reference to the `lodash` function.
|
||
*
|
||
* @memberOf _.templateSettings.imports
|
||
* @type {Function}
|
||
*/
|
||
"_": lodash
|
||
}
|
||
};
|
||
lodash.prototype = baseLodash.prototype;
|
||
lodash.prototype.constructor = lodash;
|
||
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
||
LodashWrapper.prototype.constructor = LodashWrapper;
|
||
function LazyWrapper(value) {
|
||
this.__wrapped__ = value;
|
||
this.__actions__ = [];
|
||
this.__dir__ = 1;
|
||
this.__filtered__ = false;
|
||
this.__iteratees__ = [];
|
||
this.__takeCount__ = MAX_ARRAY_LENGTH;
|
||
this.__views__ = [];
|
||
}
|
||
function lazyClone() {
|
||
var result2 = new LazyWrapper(this.__wrapped__);
|
||
result2.__actions__ = copyArray(this.__actions__);
|
||
result2.__dir__ = this.__dir__;
|
||
result2.__filtered__ = this.__filtered__;
|
||
result2.__iteratees__ = copyArray(this.__iteratees__);
|
||
result2.__takeCount__ = this.__takeCount__;
|
||
result2.__views__ = copyArray(this.__views__);
|
||
return result2;
|
||
}
|
||
function lazyReverse() {
|
||
if (this.__filtered__) {
|
||
var result2 = new LazyWrapper(this);
|
||
result2.__dir__ = -1;
|
||
result2.__filtered__ = true;
|
||
} else {
|
||
result2 = this.clone();
|
||
result2.__dir__ *= -1;
|
||
}
|
||
return result2;
|
||
}
|
||
function lazyValue() {
|
||
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index2 = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
|
||
if (!isArr || !isRight && arrLength == length && takeCount == length) {
|
||
return baseWrapperValue(array, this.__actions__);
|
||
}
|
||
var result2 = [];
|
||
outer:
|
||
while (length-- && resIndex < takeCount) {
|
||
index2 += dir;
|
||
var iterIndex = -1, value = array[index2];
|
||
while (++iterIndex < iterLength) {
|
||
var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
|
||
if (type == LAZY_MAP_FLAG) {
|
||
value = computed;
|
||
} else if (!computed) {
|
||
if (type == LAZY_FILTER_FLAG) {
|
||
continue outer;
|
||
} else {
|
||
break outer;
|
||
}
|
||
}
|
||
}
|
||
result2[resIndex++] = value;
|
||
}
|
||
return result2;
|
||
}
|
||
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
||
LazyWrapper.prototype.constructor = LazyWrapper;
|
||
function Hash(entries) {
|
||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||
this.clear();
|
||
while (++index2 < length) {
|
||
var entry = entries[index2];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
function hashClear() {
|
||
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
||
this.size = 0;
|
||
}
|
||
function hashDelete(key2) {
|
||
var result2 = this.has(key2) && delete this.__data__[key2];
|
||
this.size -= result2 ? 1 : 0;
|
||
return result2;
|
||
}
|
||
function hashGet(key2) {
|
||
var data = this.__data__;
|
||
if (nativeCreate) {
|
||
var result2 = data[key2];
|
||
return result2 === HASH_UNDEFINED ? undefined2 : result2;
|
||
}
|
||
return hasOwnProperty.call(data, key2) ? data[key2] : undefined2;
|
||
}
|
||
function hashHas(key2) {
|
||
var data = this.__data__;
|
||
return nativeCreate ? data[key2] !== undefined2 : hasOwnProperty.call(data, key2);
|
||
}
|
||
function hashSet(key2, value) {
|
||
var data = this.__data__;
|
||
this.size += this.has(key2) ? 0 : 1;
|
||
data[key2] = nativeCreate && value === undefined2 ? HASH_UNDEFINED : value;
|
||
return this;
|
||
}
|
||
Hash.prototype.clear = hashClear;
|
||
Hash.prototype["delete"] = hashDelete;
|
||
Hash.prototype.get = hashGet;
|
||
Hash.prototype.has = hashHas;
|
||
Hash.prototype.set = hashSet;
|
||
function ListCache(entries) {
|
||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||
this.clear();
|
||
while (++index2 < length) {
|
||
var entry = entries[index2];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
function listCacheClear() {
|
||
this.__data__ = [];
|
||
this.size = 0;
|
||
}
|
||
function listCacheDelete(key2) {
|
||
var data = this.__data__, index2 = assocIndexOf(data, key2);
|
||
if (index2 < 0) {
|
||
return false;
|
||
}
|
||
var lastIndex = data.length - 1;
|
||
if (index2 == lastIndex) {
|
||
data.pop();
|
||
} else {
|
||
splice.call(data, index2, 1);
|
||
}
|
||
--this.size;
|
||
return true;
|
||
}
|
||
function listCacheGet(key2) {
|
||
var data = this.__data__, index2 = assocIndexOf(data, key2);
|
||
return index2 < 0 ? undefined2 : data[index2][1];
|
||
}
|
||
function listCacheHas(key2) {
|
||
return assocIndexOf(this.__data__, key2) > -1;
|
||
}
|
||
function listCacheSet(key2, value) {
|
||
var data = this.__data__, index2 = assocIndexOf(data, key2);
|
||
if (index2 < 0) {
|
||
++this.size;
|
||
data.push([key2, value]);
|
||
} else {
|
||
data[index2][1] = value;
|
||
}
|
||
return this;
|
||
}
|
||
ListCache.prototype.clear = listCacheClear;
|
||
ListCache.prototype["delete"] = listCacheDelete;
|
||
ListCache.prototype.get = listCacheGet;
|
||
ListCache.prototype.has = listCacheHas;
|
||
ListCache.prototype.set = listCacheSet;
|
||
function MapCache(entries) {
|
||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||
this.clear();
|
||
while (++index2 < length) {
|
||
var entry = entries[index2];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
function mapCacheClear() {
|
||
this.size = 0;
|
||
this.__data__ = {
|
||
"hash": new Hash(),
|
||
"map": new (Map2 || ListCache)(),
|
||
"string": new Hash()
|
||
};
|
||
}
|
||
function mapCacheDelete(key2) {
|
||
var result2 = getMapData(this, key2)["delete"](key2);
|
||
this.size -= result2 ? 1 : 0;
|
||
return result2;
|
||
}
|
||
function mapCacheGet(key2) {
|
||
return getMapData(this, key2).get(key2);
|
||
}
|
||
function mapCacheHas(key2) {
|
||
return getMapData(this, key2).has(key2);
|
||
}
|
||
function mapCacheSet(key2, value) {
|
||
var data = getMapData(this, key2), size2 = data.size;
|
||
data.set(key2, value);
|
||
this.size += data.size == size2 ? 0 : 1;
|
||
return this;
|
||
}
|
||
MapCache.prototype.clear = mapCacheClear;
|
||
MapCache.prototype["delete"] = mapCacheDelete;
|
||
MapCache.prototype.get = mapCacheGet;
|
||
MapCache.prototype.has = mapCacheHas;
|
||
MapCache.prototype.set = mapCacheSet;
|
||
function SetCache(values2) {
|
||
var index2 = -1, length = values2 == null ? 0 : values2.length;
|
||
this.__data__ = new MapCache();
|
||
while (++index2 < length) {
|
||
this.add(values2[index2]);
|
||
}
|
||
}
|
||
function setCacheAdd(value) {
|
||
this.__data__.set(value, HASH_UNDEFINED);
|
||
return this;
|
||
}
|
||
function setCacheHas(value) {
|
||
return this.__data__.has(value);
|
||
}
|
||
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
||
SetCache.prototype.has = setCacheHas;
|
||
function Stack(entries) {
|
||
var data = this.__data__ = new ListCache(entries);
|
||
this.size = data.size;
|
||
}
|
||
function stackClear() {
|
||
this.__data__ = new ListCache();
|
||
this.size = 0;
|
||
}
|
||
function stackDelete(key2) {
|
||
var data = this.__data__, result2 = data["delete"](key2);
|
||
this.size = data.size;
|
||
return result2;
|
||
}
|
||
function stackGet(key2) {
|
||
return this.__data__.get(key2);
|
||
}
|
||
function stackHas(key2) {
|
||
return this.__data__.has(key2);
|
||
}
|
||
function stackSet(key2, value) {
|
||
var data = this.__data__;
|
||
if (data instanceof ListCache) {
|
||
var pairs = data.__data__;
|
||
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
||
pairs.push([key2, value]);
|
||
this.size = ++data.size;
|
||
return this;
|
||
}
|
||
data = this.__data__ = new MapCache(pairs);
|
||
}
|
||
data.set(key2, value);
|
||
this.size = data.size;
|
||
return this;
|
||
}
|
||
Stack.prototype.clear = stackClear;
|
||
Stack.prototype["delete"] = stackDelete;
|
||
Stack.prototype.get = stackGet;
|
||
Stack.prototype.has = stackHas;
|
||
Stack.prototype.set = stackSet;
|
||
function arrayLikeKeys(value, inherited) {
|
||
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
|
||
for (var key2 in value) {
|
||
if ((inherited || hasOwnProperty.call(value, key2)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
||
(key2 == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
||
isBuff && (key2 == "offset" || key2 == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
||
isType && (key2 == "buffer" || key2 == "byteLength" || key2 == "byteOffset") || // Skip index properties.
|
||
isIndex(key2, length)))) {
|
||
result2.push(key2);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function arraySample(array) {
|
||
var length = array.length;
|
||
return length ? array[baseRandom(0, length - 1)] : undefined2;
|
||
}
|
||
function arraySampleSize(array, n) {
|
||
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
||
}
|
||
function arrayShuffle(array) {
|
||
return shuffleSelf(copyArray(array));
|
||
}
|
||
function assignMergeValue(object, key2, value) {
|
||
if (value !== undefined2 && !eq(object[key2], value) || value === undefined2 && !(key2 in object)) {
|
||
baseAssignValue(object, key2, value);
|
||
}
|
||
}
|
||
function assignValue(object, key2, value) {
|
||
var objValue = object[key2];
|
||
if (!(hasOwnProperty.call(object, key2) && eq(objValue, value)) || value === undefined2 && !(key2 in object)) {
|
||
baseAssignValue(object, key2, value);
|
||
}
|
||
}
|
||
function assocIndexOf(array, key2) {
|
||
var length = array.length;
|
||
while (length--) {
|
||
if (eq(array[length][0], key2)) {
|
||
return length;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function baseAggregator(collection, setter, iteratee2, accumulator) {
|
||
baseEach(collection, function(value, key2, collection2) {
|
||
setter(accumulator, value, iteratee2(value), collection2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function baseAssign(object, source) {
|
||
return object && copyObject(source, keys(source), object);
|
||
}
|
||
function baseAssignIn(object, source) {
|
||
return object && copyObject(source, keysIn(source), object);
|
||
}
|
||
function baseAssignValue(object, key2, value) {
|
||
if (key2 == "__proto__" && defineProperty) {
|
||
defineProperty(object, key2, {
|
||
"configurable": true,
|
||
"enumerable": true,
|
||
"value": value,
|
||
"writable": true
|
||
});
|
||
} else {
|
||
object[key2] = value;
|
||
}
|
||
}
|
||
function baseAt(object, paths) {
|
||
var index2 = -1, length = paths.length, result2 = Array2(length), skip = object == null;
|
||
while (++index2 < length) {
|
||
result2[index2] = skip ? undefined2 : get(object, paths[index2]);
|
||
}
|
||
return result2;
|
||
}
|
||
function baseClamp(number2, lower, upper) {
|
||
if (number2 === number2) {
|
||
if (upper !== undefined2) {
|
||
number2 = number2 <= upper ? number2 : upper;
|
||
}
|
||
if (lower !== undefined2) {
|
||
number2 = number2 >= lower ? number2 : lower;
|
||
}
|
||
}
|
||
return number2;
|
||
}
|
||
function baseClone(value, bitmask, customizer, key2, object, stack) {
|
||
var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
||
if (customizer) {
|
||
result2 = object ? customizer(value, key2, object, stack) : customizer(value);
|
||
}
|
||
if (result2 !== undefined2) {
|
||
return result2;
|
||
}
|
||
if (!isObject(value)) {
|
||
return value;
|
||
}
|
||
var isArr = isArray(value);
|
||
if (isArr) {
|
||
result2 = initCloneArray(value);
|
||
if (!isDeep) {
|
||
return copyArray(value, result2);
|
||
}
|
||
} else {
|
||
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
||
if (isBuffer(value)) {
|
||
return cloneBuffer(value, isDeep);
|
||
}
|
||
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
||
result2 = isFlat || isFunc ? {} : initCloneObject(value);
|
||
if (!isDeep) {
|
||
return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
|
||
}
|
||
} else {
|
||
if (!cloneableTags[tag]) {
|
||
return object ? value : {};
|
||
}
|
||
result2 = initCloneByTag(value, tag, isDeep);
|
||
}
|
||
}
|
||
stack || (stack = new Stack());
|
||
var stacked = stack.get(value);
|
||
if (stacked) {
|
||
return stacked;
|
||
}
|
||
stack.set(value, result2);
|
||
if (isSet(value)) {
|
||
value.forEach(function(subValue) {
|
||
result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
||
});
|
||
} else if (isMap(value)) {
|
||
value.forEach(function(subValue, key3) {
|
||
result2.set(key3, baseClone(subValue, bitmask, customizer, key3, value, stack));
|
||
});
|
||
}
|
||
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
||
var props = isArr ? undefined2 : keysFunc(value);
|
||
arrayEach(props || value, function(subValue, key3) {
|
||
if (props) {
|
||
key3 = subValue;
|
||
subValue = value[key3];
|
||
}
|
||
assignValue(result2, key3, baseClone(subValue, bitmask, customizer, key3, value, stack));
|
||
});
|
||
return result2;
|
||
}
|
||
function baseConforms(source) {
|
||
var props = keys(source);
|
||
return function(object) {
|
||
return baseConformsTo(object, source, props);
|
||
};
|
||
}
|
||
function baseConformsTo(object, source, props) {
|
||
var length = props.length;
|
||
if (object == null) {
|
||
return !length;
|
||
}
|
||
object = Object2(object);
|
||
while (length--) {
|
||
var key2 = props[length], predicate = source[key2], value = object[key2];
|
||
if (value === undefined2 && !(key2 in object) || !predicate(value)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function baseDelay(func, wait, args) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
return setTimeout2(function() {
|
||
func.apply(undefined2, args);
|
||
}, wait);
|
||
}
|
||
function baseDifference(array, values2, iteratee2, comparator) {
|
||
var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
|
||
if (!length) {
|
||
return result2;
|
||
}
|
||
if (iteratee2) {
|
||
values2 = arrayMap(values2, baseUnary(iteratee2));
|
||
}
|
||
if (comparator) {
|
||
includes2 = arrayIncludesWith;
|
||
isCommon = false;
|
||
} else if (values2.length >= LARGE_ARRAY_SIZE) {
|
||
includes2 = cacheHas;
|
||
isCommon = false;
|
||
values2 = new SetCache(values2);
|
||
}
|
||
outer:
|
||
while (++index2 < length) {
|
||
var value = array[index2], computed = iteratee2 == null ? value : iteratee2(value);
|
||
value = comparator || value !== 0 ? value : 0;
|
||
if (isCommon && computed === computed) {
|
||
var valuesIndex = valuesLength;
|
||
while (valuesIndex--) {
|
||
if (values2[valuesIndex] === computed) {
|
||
continue outer;
|
||
}
|
||
}
|
||
result2.push(value);
|
||
} else if (!includes2(values2, computed, comparator)) {
|
||
result2.push(value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
var baseEach = createBaseEach(baseForOwn);
|
||
var baseEachRight = createBaseEach(baseForOwnRight, true);
|
||
function baseEvery(collection, predicate) {
|
||
var result2 = true;
|
||
baseEach(collection, function(value, index2, collection2) {
|
||
result2 = !!predicate(value, index2, collection2);
|
||
return result2;
|
||
});
|
||
return result2;
|
||
}
|
||
function baseExtremum(array, iteratee2, comparator) {
|
||
var index2 = -1, length = array.length;
|
||
while (++index2 < length) {
|
||
var value = array[index2], current = iteratee2(value);
|
||
if (current != null && (computed === undefined2 ? current === current && !isSymbol(current) : comparator(current, computed))) {
|
||
var computed = current, result2 = value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseFill(array, value, start, end) {
|
||
var length = array.length;
|
||
start = toInteger(start);
|
||
if (start < 0) {
|
||
start = -start > length ? 0 : length + start;
|
||
}
|
||
end = end === undefined2 || end > length ? length : toInteger(end);
|
||
if (end < 0) {
|
||
end += length;
|
||
}
|
||
end = start > end ? 0 : toLength(end);
|
||
while (start < end) {
|
||
array[start++] = value;
|
||
}
|
||
return array;
|
||
}
|
||
function baseFilter(collection, predicate) {
|
||
var result2 = [];
|
||
baseEach(collection, function(value, index2, collection2) {
|
||
if (predicate(value, index2, collection2)) {
|
||
result2.push(value);
|
||
}
|
||
});
|
||
return result2;
|
||
}
|
||
function baseFlatten(array, depth, predicate, isStrict, result2) {
|
||
var index2 = -1, length = array.length;
|
||
predicate || (predicate = isFlattenable);
|
||
result2 || (result2 = []);
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (depth > 0 && predicate(value)) {
|
||
if (depth > 1) {
|
||
baseFlatten(value, depth - 1, predicate, isStrict, result2);
|
||
} else {
|
||
arrayPush(result2, value);
|
||
}
|
||
} else if (!isStrict) {
|
||
result2[result2.length] = value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
var baseFor = createBaseFor();
|
||
var baseForRight = createBaseFor(true);
|
||
function baseForOwn(object, iteratee2) {
|
||
return object && baseFor(object, iteratee2, keys);
|
||
}
|
||
function baseForOwnRight(object, iteratee2) {
|
||
return object && baseForRight(object, iteratee2, keys);
|
||
}
|
||
function baseFunctions(object, props) {
|
||
return arrayFilter(props, function(key2) {
|
||
return isFunction(object[key2]);
|
||
});
|
||
}
|
||
function baseGet(object, path) {
|
||
path = castPath(path, object);
|
||
var index2 = 0, length = path.length;
|
||
while (object != null && index2 < length) {
|
||
object = object[toKey(path[index2++])];
|
||
}
|
||
return index2 && index2 == length ? object : undefined2;
|
||
}
|
||
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
||
var result2 = keysFunc(object);
|
||
return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object));
|
||
}
|
||
function baseGetTag(value) {
|
||
if (value == null) {
|
||
return value === undefined2 ? undefinedTag : nullTag;
|
||
}
|
||
return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
|
||
}
|
||
function baseGt(value, other) {
|
||
return value > other;
|
||
}
|
||
function baseHas(object, key2) {
|
||
return object != null && hasOwnProperty.call(object, key2);
|
||
}
|
||
function baseHasIn(object, key2) {
|
||
return object != null && key2 in Object2(object);
|
||
}
|
||
function baseInRange(number2, start, end) {
|
||
return number2 >= nativeMin(start, end) && number2 < nativeMax(start, end);
|
||
}
|
||
function baseIntersection(arrays, iteratee2, comparator) {
|
||
var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = [];
|
||
while (othIndex--) {
|
||
var array = arrays[othIndex];
|
||
if (othIndex && iteratee2) {
|
||
array = arrayMap(array, baseUnary(iteratee2));
|
||
}
|
||
maxLength = nativeMin(array.length, maxLength);
|
||
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined2;
|
||
}
|
||
array = arrays[0];
|
||
var index2 = -1, seen = caches[0];
|
||
outer:
|
||
while (++index2 < length && result2.length < maxLength) {
|
||
var value = array[index2], computed = iteratee2 ? iteratee2(value) : value;
|
||
value = comparator || value !== 0 ? value : 0;
|
||
if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
|
||
othIndex = othLength;
|
||
while (--othIndex) {
|
||
var cache = caches[othIndex];
|
||
if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) {
|
||
continue outer;
|
||
}
|
||
}
|
||
if (seen) {
|
||
seen.push(computed);
|
||
}
|
||
result2.push(value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseInverter(object, setter, iteratee2, accumulator) {
|
||
baseForOwn(object, function(value, key2, object2) {
|
||
setter(accumulator, iteratee2(value), key2, object2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function baseInvoke(object, path, args) {
|
||
path = castPath(path, object);
|
||
object = parent(object, path);
|
||
var func = object == null ? object : object[toKey(last(path))];
|
||
return func == null ? undefined2 : apply(func, object, args);
|
||
}
|
||
function baseIsArguments(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
||
}
|
||
function baseIsArrayBuffer(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
||
}
|
||
function baseIsDate(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
||
}
|
||
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
||
if (value === other) {
|
||
return true;
|
||
}
|
||
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
||
return value !== value && other !== other;
|
||
}
|
||
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
||
}
|
||
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
||
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
||
objTag = objTag == argsTag ? objectTag : objTag;
|
||
othTag = othTag == argsTag ? objectTag : othTag;
|
||
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
||
if (isSameTag && isBuffer(object)) {
|
||
if (!isBuffer(other)) {
|
||
return false;
|
||
}
|
||
objIsArr = true;
|
||
objIsObj = false;
|
||
}
|
||
if (isSameTag && !objIsObj) {
|
||
stack || (stack = new Stack());
|
||
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
||
}
|
||
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
||
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
||
if (objIsWrapped || othIsWrapped) {
|
||
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
||
stack || (stack = new Stack());
|
||
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
||
}
|
||
}
|
||
if (!isSameTag) {
|
||
return false;
|
||
}
|
||
stack || (stack = new Stack());
|
||
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
||
}
|
||
function baseIsMap(value) {
|
||
return isObjectLike(value) && getTag(value) == mapTag;
|
||
}
|
||
function baseIsMatch(object, source, matchData, customizer) {
|
||
var index2 = matchData.length, length = index2, noCustomizer = !customizer;
|
||
if (object == null) {
|
||
return !length;
|
||
}
|
||
object = Object2(object);
|
||
while (index2--) {
|
||
var data = matchData[index2];
|
||
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
||
return false;
|
||
}
|
||
}
|
||
while (++index2 < length) {
|
||
data = matchData[index2];
|
||
var key2 = data[0], objValue = object[key2], srcValue = data[1];
|
||
if (noCustomizer && data[2]) {
|
||
if (objValue === undefined2 && !(key2 in object)) {
|
||
return false;
|
||
}
|
||
} else {
|
||
var stack = new Stack();
|
||
if (customizer) {
|
||
var result2 = customizer(objValue, srcValue, key2, object, source, stack);
|
||
}
|
||
if (!(result2 === undefined2 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function baseIsNative(value) {
|
||
if (!isObject(value) || isMasked(value)) {
|
||
return false;
|
||
}
|
||
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
||
return pattern.test(toSource(value));
|
||
}
|
||
function baseIsRegExp(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
||
}
|
||
function baseIsSet(value) {
|
||
return isObjectLike(value) && getTag(value) == setTag;
|
||
}
|
||
function baseIsTypedArray(value) {
|
||
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
||
}
|
||
function baseIteratee(value) {
|
||
if (typeof value == "function") {
|
||
return value;
|
||
}
|
||
if (value == null) {
|
||
return identity;
|
||
}
|
||
if (typeof value == "object") {
|
||
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
||
}
|
||
return property(value);
|
||
}
|
||
function baseKeys(object) {
|
||
if (!isPrototype(object)) {
|
||
return nativeKeys(object);
|
||
}
|
||
var result2 = [];
|
||
for (var key2 in Object2(object)) {
|
||
if (hasOwnProperty.call(object, key2) && key2 != "constructor") {
|
||
result2.push(key2);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseKeysIn(object) {
|
||
if (!isObject(object)) {
|
||
return nativeKeysIn(object);
|
||
}
|
||
var isProto = isPrototype(object), result2 = [];
|
||
for (var key2 in object) {
|
||
if (!(key2 == "constructor" && (isProto || !hasOwnProperty.call(object, key2)))) {
|
||
result2.push(key2);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseLt(value, other) {
|
||
return value < other;
|
||
}
|
||
function baseMap(collection, iteratee2) {
|
||
var index2 = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
||
baseEach(collection, function(value, key2, collection2) {
|
||
result2[++index2] = iteratee2(value, key2, collection2);
|
||
});
|
||
return result2;
|
||
}
|
||
function baseMatches(source) {
|
||
var matchData = getMatchData(source);
|
||
if (matchData.length == 1 && matchData[0][2]) {
|
||
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
||
}
|
||
return function(object) {
|
||
return object === source || baseIsMatch(object, source, matchData);
|
||
};
|
||
}
|
||
function baseMatchesProperty(path, srcValue) {
|
||
if (isKey(path) && isStrictComparable(srcValue)) {
|
||
return matchesStrictComparable(toKey(path), srcValue);
|
||
}
|
||
return function(object) {
|
||
var objValue = get(object, path);
|
||
return objValue === undefined2 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
||
};
|
||
}
|
||
function baseMerge(object, source, srcIndex, customizer, stack) {
|
||
if (object === source) {
|
||
return;
|
||
}
|
||
baseFor(source, function(srcValue, key2) {
|
||
stack || (stack = new Stack());
|
||
if (isObject(srcValue)) {
|
||
baseMergeDeep(object, source, key2, srcIndex, baseMerge, customizer, stack);
|
||
} else {
|
||
var newValue = customizer ? customizer(safeGet(object, key2), srcValue, key2 + "", object, source, stack) : undefined2;
|
||
if (newValue === undefined2) {
|
||
newValue = srcValue;
|
||
}
|
||
assignMergeValue(object, key2, newValue);
|
||
}
|
||
}, keysIn);
|
||
}
|
||
function baseMergeDeep(object, source, key2, srcIndex, mergeFunc, customizer, stack) {
|
||
var objValue = safeGet(object, key2), srcValue = safeGet(source, key2), stacked = stack.get(srcValue);
|
||
if (stacked) {
|
||
assignMergeValue(object, key2, stacked);
|
||
return;
|
||
}
|
||
var newValue = customizer ? customizer(objValue, srcValue, key2 + "", object, source, stack) : undefined2;
|
||
var isCommon = newValue === undefined2;
|
||
if (isCommon) {
|
||
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
||
newValue = srcValue;
|
||
if (isArr || isBuff || isTyped) {
|
||
if (isArray(objValue)) {
|
||
newValue = objValue;
|
||
} else if (isArrayLikeObject(objValue)) {
|
||
newValue = copyArray(objValue);
|
||
} else if (isBuff) {
|
||
isCommon = false;
|
||
newValue = cloneBuffer(srcValue, true);
|
||
} else if (isTyped) {
|
||
isCommon = false;
|
||
newValue = cloneTypedArray(srcValue, true);
|
||
} else {
|
||
newValue = [];
|
||
}
|
||
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||
newValue = objValue;
|
||
if (isArguments(objValue)) {
|
||
newValue = toPlainObject(objValue);
|
||
} else if (!isObject(objValue) || isFunction(objValue)) {
|
||
newValue = initCloneObject(srcValue);
|
||
}
|
||
} else {
|
||
isCommon = false;
|
||
}
|
||
}
|
||
if (isCommon) {
|
||
stack.set(srcValue, newValue);
|
||
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
||
stack["delete"](srcValue);
|
||
}
|
||
assignMergeValue(object, key2, newValue);
|
||
}
|
||
function baseNth(array, n) {
|
||
var length = array.length;
|
||
if (!length) {
|
||
return;
|
||
}
|
||
n += n < 0 ? length : 0;
|
||
return isIndex(n, length) ? array[n] : undefined2;
|
||
}
|
||
function baseOrderBy(collection, iteratees, orders) {
|
||
if (iteratees.length) {
|
||
iteratees = arrayMap(iteratees, function(iteratee2) {
|
||
if (isArray(iteratee2)) {
|
||
return function(value) {
|
||
return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
|
||
};
|
||
}
|
||
return iteratee2;
|
||
});
|
||
} else {
|
||
iteratees = [identity];
|
||
}
|
||
var index2 = -1;
|
||
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
||
var result2 = baseMap(collection, function(value, key2, collection2) {
|
||
var criteria = arrayMap(iteratees, function(iteratee2) {
|
||
return iteratee2(value);
|
||
});
|
||
return { "criteria": criteria, "index": ++index2, "value": value };
|
||
});
|
||
return baseSortBy(result2, function(object, other) {
|
||
return compareMultiple(object, other, orders);
|
||
});
|
||
}
|
||
function basePick(object, paths) {
|
||
return basePickBy(object, paths, function(value, path) {
|
||
return hasIn(object, path);
|
||
});
|
||
}
|
||
function basePickBy(object, paths, predicate) {
|
||
var index2 = -1, length = paths.length, result2 = {};
|
||
while (++index2 < length) {
|
||
var path = paths[index2], value = baseGet(object, path);
|
||
if (predicate(value, path)) {
|
||
baseSet(result2, castPath(path, object), value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function basePropertyDeep(path) {
|
||
return function(object) {
|
||
return baseGet(object, path);
|
||
};
|
||
}
|
||
function basePullAll(array, values2, iteratee2, comparator) {
|
||
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index2 = -1, length = values2.length, seen = array;
|
||
if (array === values2) {
|
||
values2 = copyArray(values2);
|
||
}
|
||
if (iteratee2) {
|
||
seen = arrayMap(array, baseUnary(iteratee2));
|
||
}
|
||
while (++index2 < length) {
|
||
var fromIndex = 0, value = values2[index2], computed = iteratee2 ? iteratee2(value) : value;
|
||
while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
|
||
if (seen !== array) {
|
||
splice.call(seen, fromIndex, 1);
|
||
}
|
||
splice.call(array, fromIndex, 1);
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function basePullAt(array, indexes) {
|
||
var length = array ? indexes.length : 0, lastIndex = length - 1;
|
||
while (length--) {
|
||
var index2 = indexes[length];
|
||
if (length == lastIndex || index2 !== previous) {
|
||
var previous = index2;
|
||
if (isIndex(index2)) {
|
||
splice.call(array, index2, 1);
|
||
} else {
|
||
baseUnset(array, index2);
|
||
}
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function baseRandom(lower, upper) {
|
||
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
|
||
}
|
||
function baseRange(start, end, step, fromRight) {
|
||
var index2 = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
|
||
while (length--) {
|
||
result2[fromRight ? length : ++index2] = start;
|
||
start += step;
|
||
}
|
||
return result2;
|
||
}
|
||
function baseRepeat(string, n) {
|
||
var result2 = "";
|
||
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
|
||
return result2;
|
||
}
|
||
do {
|
||
if (n % 2) {
|
||
result2 += string;
|
||
}
|
||
n = nativeFloor(n / 2);
|
||
if (n) {
|
||
string += string;
|
||
}
|
||
} while (n);
|
||
return result2;
|
||
}
|
||
function baseRest(func, start) {
|
||
return setToString(overRest(func, start, identity), func + "");
|
||
}
|
||
function baseSample(collection) {
|
||
return arraySample(values(collection));
|
||
}
|
||
function baseSampleSize(collection, n) {
|
||
var array = values(collection);
|
||
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
||
}
|
||
function baseSet(object, path, value, customizer) {
|
||
if (!isObject(object)) {
|
||
return object;
|
||
}
|
||
path = castPath(path, object);
|
||
var index2 = -1, length = path.length, lastIndex = length - 1, nested = object;
|
||
while (nested != null && ++index2 < length) {
|
||
var key2 = toKey(path[index2]), newValue = value;
|
||
if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") {
|
||
return object;
|
||
}
|
||
if (index2 != lastIndex) {
|
||
var objValue = nested[key2];
|
||
newValue = customizer ? customizer(objValue, key2, nested) : undefined2;
|
||
if (newValue === undefined2) {
|
||
newValue = isObject(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
||
}
|
||
}
|
||
assignValue(nested, key2, newValue);
|
||
nested = nested[key2];
|
||
}
|
||
return object;
|
||
}
|
||
var baseSetData = !metaMap ? identity : function(func, data) {
|
||
metaMap.set(func, data);
|
||
return func;
|
||
};
|
||
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
||
return defineProperty(func, "toString", {
|
||
"configurable": true,
|
||
"enumerable": false,
|
||
"value": constant(string),
|
||
"writable": true
|
||
});
|
||
};
|
||
function baseShuffle(collection) {
|
||
return shuffleSelf(values(collection));
|
||
}
|
||
function baseSlice(array, start, end) {
|
||
var index2 = -1, length = array.length;
|
||
if (start < 0) {
|
||
start = -start > length ? 0 : length + start;
|
||
}
|
||
end = end > length ? length : end;
|
||
if (end < 0) {
|
||
end += length;
|
||
}
|
||
length = start > end ? 0 : end - start >>> 0;
|
||
start >>>= 0;
|
||
var result2 = Array2(length);
|
||
while (++index2 < length) {
|
||
result2[index2] = array[index2 + start];
|
||
}
|
||
return result2;
|
||
}
|
||
function baseSome(collection, predicate) {
|
||
var result2;
|
||
baseEach(collection, function(value, index2, collection2) {
|
||
result2 = predicate(value, index2, collection2);
|
||
return !result2;
|
||
});
|
||
return !!result2;
|
||
}
|
||
function baseSortedIndex(array, value, retHighest) {
|
||
var low = 0, high = array == null ? low : array.length;
|
||
if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
||
while (low < high) {
|
||
var mid = low + high >>> 1, computed = array[mid];
|
||
if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
|
||
low = mid + 1;
|
||
} else {
|
||
high = mid;
|
||
}
|
||
}
|
||
return high;
|
||
}
|
||
return baseSortedIndexBy(array, value, identity, retHighest);
|
||
}
|
||
function baseSortedIndexBy(array, value, iteratee2, retHighest) {
|
||
var low = 0, high = array == null ? 0 : array.length;
|
||
if (high === 0) {
|
||
return 0;
|
||
}
|
||
value = iteratee2(value);
|
||
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined2;
|
||
while (low < high) {
|
||
var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined2, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
|
||
if (valIsNaN) {
|
||
var setLow = retHighest || othIsReflexive;
|
||
} else if (valIsUndefined) {
|
||
setLow = othIsReflexive && (retHighest || othIsDefined);
|
||
} else if (valIsNull) {
|
||
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
|
||
} else if (valIsSymbol) {
|
||
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
|
||
} else if (othIsNull || othIsSymbol) {
|
||
setLow = false;
|
||
} else {
|
||
setLow = retHighest ? computed <= value : computed < value;
|
||
}
|
||
if (setLow) {
|
||
low = mid + 1;
|
||
} else {
|
||
high = mid;
|
||
}
|
||
}
|
||
return nativeMin(high, MAX_ARRAY_INDEX);
|
||
}
|
||
function baseSortedUniq(array, iteratee2) {
|
||
var index2 = -1, length = array.length, resIndex = 0, result2 = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2], computed = iteratee2 ? iteratee2(value) : value;
|
||
if (!index2 || !eq(computed, seen)) {
|
||
var seen = computed;
|
||
result2[resIndex++] = value === 0 ? 0 : value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseToNumber(value) {
|
||
if (typeof value == "number") {
|
||
return value;
|
||
}
|
||
if (isSymbol(value)) {
|
||
return NAN;
|
||
}
|
||
return +value;
|
||
}
|
||
function baseToString(value) {
|
||
if (typeof value == "string") {
|
||
return value;
|
||
}
|
||
if (isArray(value)) {
|
||
return arrayMap(value, baseToString) + "";
|
||
}
|
||
if (isSymbol(value)) {
|
||
return symbolToString ? symbolToString.call(value) : "";
|
||
}
|
||
var result2 = value + "";
|
||
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
||
}
|
||
function baseUniq(array, iteratee2, comparator) {
|
||
var index2 = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
|
||
if (comparator) {
|
||
isCommon = false;
|
||
includes2 = arrayIncludesWith;
|
||
} else if (length >= LARGE_ARRAY_SIZE) {
|
||
var set2 = iteratee2 ? null : createSet(array);
|
||
if (set2) {
|
||
return setToArray(set2);
|
||
}
|
||
isCommon = false;
|
||
includes2 = cacheHas;
|
||
seen = new SetCache();
|
||
} else {
|
||
seen = iteratee2 ? [] : result2;
|
||
}
|
||
outer:
|
||
while (++index2 < length) {
|
||
var value = array[index2], computed = iteratee2 ? iteratee2(value) : value;
|
||
value = comparator || value !== 0 ? value : 0;
|
||
if (isCommon && computed === computed) {
|
||
var seenIndex = seen.length;
|
||
while (seenIndex--) {
|
||
if (seen[seenIndex] === computed) {
|
||
continue outer;
|
||
}
|
||
}
|
||
if (iteratee2) {
|
||
seen.push(computed);
|
||
}
|
||
result2.push(value);
|
||
} else if (!includes2(seen, computed, comparator)) {
|
||
if (seen !== result2) {
|
||
seen.push(computed);
|
||
}
|
||
result2.push(value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseUnset(object, path) {
|
||
path = castPath(path, object);
|
||
object = parent(object, path);
|
||
return object == null || delete object[toKey(last(path))];
|
||
}
|
||
function baseUpdate(object, path, updater, customizer) {
|
||
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
||
}
|
||
function baseWhile(array, predicate, isDrop, fromRight) {
|
||
var length = array.length, index2 = fromRight ? length : -1;
|
||
while ((fromRight ? index2-- : ++index2 < length) && predicate(array[index2], index2, array)) {
|
||
}
|
||
return isDrop ? baseSlice(array, fromRight ? 0 : index2, fromRight ? index2 + 1 : length) : baseSlice(array, fromRight ? index2 + 1 : 0, fromRight ? length : index2);
|
||
}
|
||
function baseWrapperValue(value, actions) {
|
||
var result2 = value;
|
||
if (result2 instanceof LazyWrapper) {
|
||
result2 = result2.value();
|
||
}
|
||
return arrayReduce(actions, function(result3, action) {
|
||
return action.func.apply(action.thisArg, arrayPush([result3], action.args));
|
||
}, result2);
|
||
}
|
||
function baseXor(arrays, iteratee2, comparator) {
|
||
var length = arrays.length;
|
||
if (length < 2) {
|
||
return length ? baseUniq(arrays[0]) : [];
|
||
}
|
||
var index2 = -1, result2 = Array2(length);
|
||
while (++index2 < length) {
|
||
var array = arrays[index2], othIndex = -1;
|
||
while (++othIndex < length) {
|
||
if (othIndex != index2) {
|
||
result2[index2] = baseDifference(result2[index2] || array, arrays[othIndex], iteratee2, comparator);
|
||
}
|
||
}
|
||
}
|
||
return baseUniq(baseFlatten(result2, 1), iteratee2, comparator);
|
||
}
|
||
function baseZipObject(props, values2, assignFunc) {
|
||
var index2 = -1, length = props.length, valsLength = values2.length, result2 = {};
|
||
while (++index2 < length) {
|
||
var value = index2 < valsLength ? values2[index2] : undefined2;
|
||
assignFunc(result2, props[index2], value);
|
||
}
|
||
return result2;
|
||
}
|
||
function castArrayLikeObject(value) {
|
||
return isArrayLikeObject(value) ? value : [];
|
||
}
|
||
function castFunction(value) {
|
||
return typeof value == "function" ? value : identity;
|
||
}
|
||
function castPath(value, object) {
|
||
if (isArray(value)) {
|
||
return value;
|
||
}
|
||
return isKey(value, object) ? [value] : stringToPath(toString2(value));
|
||
}
|
||
var castRest = baseRest;
|
||
function castSlice(array, start, end) {
|
||
var length = array.length;
|
||
end = end === undefined2 ? length : end;
|
||
return !start && end >= length ? array : baseSlice(array, start, end);
|
||
}
|
||
var clearTimeout2 = ctxClearTimeout || function(id) {
|
||
return root2.clearTimeout(id);
|
||
};
|
||
function cloneBuffer(buffer, isDeep) {
|
||
if (isDeep) {
|
||
return buffer.slice();
|
||
}
|
||
var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
||
buffer.copy(result2);
|
||
return result2;
|
||
}
|
||
function cloneArrayBuffer(arrayBuffer) {
|
||
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
||
new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
|
||
return result2;
|
||
}
|
||
function cloneDataView(dataView, isDeep) {
|
||
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
||
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
||
}
|
||
function cloneRegExp(regexp) {
|
||
var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
||
result2.lastIndex = regexp.lastIndex;
|
||
return result2;
|
||
}
|
||
function cloneSymbol(symbol) {
|
||
return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
|
||
}
|
||
function cloneTypedArray(typedArray, isDeep) {
|
||
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
||
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
||
}
|
||
function compareAscending(value, other) {
|
||
if (value !== other) {
|
||
var valIsDefined = value !== undefined2, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
|
||
var othIsDefined = other !== undefined2, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
|
||
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
||
return 1;
|
||
}
|
||
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
|
||
return -1;
|
||
}
|
||
}
|
||
return 0;
|
||
}
|
||
function compareMultiple(object, other, orders) {
|
||
var index2 = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
||
while (++index2 < length) {
|
||
var result2 = compareAscending(objCriteria[index2], othCriteria[index2]);
|
||
if (result2) {
|
||
if (index2 >= ordersLength) {
|
||
return result2;
|
||
}
|
||
var order2 = orders[index2];
|
||
return result2 * (order2 == "desc" ? -1 : 1);
|
||
}
|
||
}
|
||
return object.index - other.index;
|
||
}
|
||
function composeArgs(args, partials, holders, isCurried) {
|
||
var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried;
|
||
while (++leftIndex < leftLength) {
|
||
result2[leftIndex] = partials[leftIndex];
|
||
}
|
||
while (++argsIndex < holdersLength) {
|
||
if (isUncurried || argsIndex < argsLength) {
|
||
result2[holders[argsIndex]] = args[argsIndex];
|
||
}
|
||
}
|
||
while (rangeLength--) {
|
||
result2[leftIndex++] = args[argsIndex++];
|
||
}
|
||
return result2;
|
||
}
|
||
function composeArgsRight(args, partials, holders, isCurried) {
|
||
var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried;
|
||
while (++argsIndex < rangeLength) {
|
||
result2[argsIndex] = args[argsIndex];
|
||
}
|
||
var offset = argsIndex;
|
||
while (++rightIndex < rightLength) {
|
||
result2[offset + rightIndex] = partials[rightIndex];
|
||
}
|
||
while (++holdersIndex < holdersLength) {
|
||
if (isUncurried || argsIndex < argsLength) {
|
||
result2[offset + holders[holdersIndex]] = args[argsIndex++];
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function copyArray(source, array) {
|
||
var index2 = -1, length = source.length;
|
||
array || (array = Array2(length));
|
||
while (++index2 < length) {
|
||
array[index2] = source[index2];
|
||
}
|
||
return array;
|
||
}
|
||
function copyObject(source, props, object, customizer) {
|
||
var isNew = !object;
|
||
object || (object = {});
|
||
var index2 = -1, length = props.length;
|
||
while (++index2 < length) {
|
||
var key2 = props[index2];
|
||
var newValue = customizer ? customizer(object[key2], source[key2], key2, object, source) : undefined2;
|
||
if (newValue === undefined2) {
|
||
newValue = source[key2];
|
||
}
|
||
if (isNew) {
|
||
baseAssignValue(object, key2, newValue);
|
||
} else {
|
||
assignValue(object, key2, newValue);
|
||
}
|
||
}
|
||
return object;
|
||
}
|
||
function copySymbols(source, object) {
|
||
return copyObject(source, getSymbols(source), object);
|
||
}
|
||
function copySymbolsIn(source, object) {
|
||
return copyObject(source, getSymbolsIn(source), object);
|
||
}
|
||
function createAggregator(setter, initializer) {
|
||
return function(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
|
||
return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
|
||
};
|
||
}
|
||
function createAssigner(assigner) {
|
||
return baseRest(function(object, sources) {
|
||
var index2 = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined2, guard = length > 2 ? sources[2] : undefined2;
|
||
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined2;
|
||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||
customizer = length < 3 ? undefined2 : customizer;
|
||
length = 1;
|
||
}
|
||
object = Object2(object);
|
||
while (++index2 < length) {
|
||
var source = sources[index2];
|
||
if (source) {
|
||
assigner(object, source, index2, customizer);
|
||
}
|
||
}
|
||
return object;
|
||
});
|
||
}
|
||
function createBaseEach(eachFunc, fromRight) {
|
||
return function(collection, iteratee2) {
|
||
if (collection == null) {
|
||
return collection;
|
||
}
|
||
if (!isArrayLike(collection)) {
|
||
return eachFunc(collection, iteratee2);
|
||
}
|
||
var length = collection.length, index2 = fromRight ? length : -1, iterable = Object2(collection);
|
||
while (fromRight ? index2-- : ++index2 < length) {
|
||
if (iteratee2(iterable[index2], index2, iterable) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return collection;
|
||
};
|
||
}
|
||
function createBaseFor(fromRight) {
|
||
return function(object, iteratee2, keysFunc) {
|
||
var index2 = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
|
||
while (length--) {
|
||
var key2 = props[fromRight ? length : ++index2];
|
||
if (iteratee2(iterable[key2], key2, iterable) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return object;
|
||
};
|
||
}
|
||
function createBind(func, bitmask, thisArg) {
|
||
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
|
||
function wrapper() {
|
||
var fn = this && this !== root2 && this instanceof wrapper ? Ctor : func;
|
||
return fn.apply(isBind ? thisArg : this, arguments);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createCaseFirst(methodName) {
|
||
return function(string) {
|
||
string = toString2(string);
|
||
var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined2;
|
||
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
||
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
||
return chr[methodName]() + trailing;
|
||
};
|
||
}
|
||
function createCompounder(callback) {
|
||
return function(string) {
|
||
return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
|
||
};
|
||
}
|
||
function createCtor(Ctor) {
|
||
return function() {
|
||
var args = arguments;
|
||
switch (args.length) {
|
||
case 0:
|
||
return new Ctor();
|
||
case 1:
|
||
return new Ctor(args[0]);
|
||
case 2:
|
||
return new Ctor(args[0], args[1]);
|
||
case 3:
|
||
return new Ctor(args[0], args[1], args[2]);
|
||
case 4:
|
||
return new Ctor(args[0], args[1], args[2], args[3]);
|
||
case 5:
|
||
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
||
case 6:
|
||
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
||
case 7:
|
||
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
||
}
|
||
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
|
||
return isObject(result2) ? result2 : thisBinding;
|
||
};
|
||
}
|
||
function createCurry(func, bitmask, arity) {
|
||
var Ctor = createCtor(func);
|
||
function wrapper() {
|
||
var length = arguments.length, args = Array2(length), index2 = length, placeholder = getHolder(wrapper);
|
||
while (index2--) {
|
||
args[index2] = arguments[index2];
|
||
}
|
||
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
||
length -= holders.length;
|
||
if (length < arity) {
|
||
return createRecurry(
|
||
func,
|
||
bitmask,
|
||
createHybrid,
|
||
wrapper.placeholder,
|
||
undefined2,
|
||
args,
|
||
holders,
|
||
undefined2,
|
||
undefined2,
|
||
arity - length
|
||
);
|
||
}
|
||
var fn = this && this !== root2 && this instanceof wrapper ? Ctor : func;
|
||
return apply(fn, this, args);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createFind(findIndexFunc) {
|
||
return function(collection, predicate, fromIndex) {
|
||
var iterable = Object2(collection);
|
||
if (!isArrayLike(collection)) {
|
||
var iteratee2 = getIteratee(predicate, 3);
|
||
collection = keys(collection);
|
||
predicate = function(key2) {
|
||
return iteratee2(iterable[key2], key2, iterable);
|
||
};
|
||
}
|
||
var index2 = findIndexFunc(collection, predicate, fromIndex);
|
||
return index2 > -1 ? iterable[iteratee2 ? collection[index2] : index2] : undefined2;
|
||
};
|
||
}
|
||
function createFlow(fromRight) {
|
||
return flatRest(function(funcs) {
|
||
var length = funcs.length, index2 = length, prereq = LodashWrapper.prototype.thru;
|
||
if (fromRight) {
|
||
funcs.reverse();
|
||
}
|
||
while (index2--) {
|
||
var func = funcs[index2];
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
if (prereq && !wrapper && getFuncName(func) == "wrapper") {
|
||
var wrapper = new LodashWrapper([], true);
|
||
}
|
||
}
|
||
index2 = wrapper ? index2 : length;
|
||
while (++index2 < length) {
|
||
func = funcs[index2];
|
||
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined2;
|
||
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
|
||
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
||
} else {
|
||
wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
|
||
}
|
||
}
|
||
return function() {
|
||
var args = arguments, value = args[0];
|
||
if (wrapper && args.length == 1 && isArray(value)) {
|
||
return wrapper.plant(value).value();
|
||
}
|
||
var index3 = 0, result2 = length ? funcs[index3].apply(this, args) : value;
|
||
while (++index3 < length) {
|
||
result2 = funcs[index3].call(this, result2);
|
||
}
|
||
return result2;
|
||
};
|
||
});
|
||
}
|
||
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
|
||
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined2 : createCtor(func);
|
||
function wrapper() {
|
||
var length = arguments.length, args = Array2(length), index2 = length;
|
||
while (index2--) {
|
||
args[index2] = arguments[index2];
|
||
}
|
||
if (isCurried) {
|
||
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
|
||
}
|
||
if (partials) {
|
||
args = composeArgs(args, partials, holders, isCurried);
|
||
}
|
||
if (partialsRight) {
|
||
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
|
||
}
|
||
length -= holdersCount;
|
||
if (isCurried && length < arity) {
|
||
var newHolders = replaceHolders(args, placeholder);
|
||
return createRecurry(
|
||
func,
|
||
bitmask,
|
||
createHybrid,
|
||
wrapper.placeholder,
|
||
thisArg,
|
||
args,
|
||
newHolders,
|
||
argPos,
|
||
ary2,
|
||
arity - length
|
||
);
|
||
}
|
||
var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
|
||
length = args.length;
|
||
if (argPos) {
|
||
args = reorder(args, argPos);
|
||
} else if (isFlip && length > 1) {
|
||
args.reverse();
|
||
}
|
||
if (isAry && ary2 < length) {
|
||
args.length = ary2;
|
||
}
|
||
if (this && this !== root2 && this instanceof wrapper) {
|
||
fn = Ctor || createCtor(fn);
|
||
}
|
||
return fn.apply(thisBinding, args);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createInverter(setter, toIteratee) {
|
||
return function(object, iteratee2) {
|
||
return baseInverter(object, setter, toIteratee(iteratee2), {});
|
||
};
|
||
}
|
||
function createMathOperation(operator, defaultValue) {
|
||
return function(value, other) {
|
||
var result2;
|
||
if (value === undefined2 && other === undefined2) {
|
||
return defaultValue;
|
||
}
|
||
if (value !== undefined2) {
|
||
result2 = value;
|
||
}
|
||
if (other !== undefined2) {
|
||
if (result2 === undefined2) {
|
||
return other;
|
||
}
|
||
if (typeof value == "string" || typeof other == "string") {
|
||
value = baseToString(value);
|
||
other = baseToString(other);
|
||
} else {
|
||
value = baseToNumber(value);
|
||
other = baseToNumber(other);
|
||
}
|
||
result2 = operator(value, other);
|
||
}
|
||
return result2;
|
||
};
|
||
}
|
||
function createOver(arrayFunc) {
|
||
return flatRest(function(iteratees) {
|
||
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
||
return baseRest(function(args) {
|
||
var thisArg = this;
|
||
return arrayFunc(iteratees, function(iteratee2) {
|
||
return apply(iteratee2, thisArg, args);
|
||
});
|
||
});
|
||
});
|
||
}
|
||
function createPadding(length, chars) {
|
||
chars = chars === undefined2 ? " " : baseToString(chars);
|
||
var charsLength = chars.length;
|
||
if (charsLength < 2) {
|
||
return charsLength ? baseRepeat(chars, length) : chars;
|
||
}
|
||
var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
||
return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length);
|
||
}
|
||
function createPartial(func, bitmask, thisArg, partials) {
|
||
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
|
||
function wrapper() {
|
||
var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root2 && this instanceof wrapper ? Ctor : func;
|
||
while (++leftIndex < leftLength) {
|
||
args[leftIndex] = partials[leftIndex];
|
||
}
|
||
while (argsLength--) {
|
||
args[leftIndex++] = arguments[++argsIndex];
|
||
}
|
||
return apply(fn, isBind ? thisArg : this, args);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createRange(fromRight) {
|
||
return function(start, end, step) {
|
||
if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
|
||
end = step = undefined2;
|
||
}
|
||
start = toFinite(start);
|
||
if (end === undefined2) {
|
||
end = start;
|
||
start = 0;
|
||
} else {
|
||
end = toFinite(end);
|
||
}
|
||
step = step === undefined2 ? start < end ? 1 : -1 : toFinite(step);
|
||
return baseRange(start, end, step, fromRight);
|
||
};
|
||
}
|
||
function createRelationalOperation(operator) {
|
||
return function(value, other) {
|
||
if (!(typeof value == "string" && typeof other == "string")) {
|
||
value = toNumber(value);
|
||
other = toNumber(other);
|
||
}
|
||
return operator(value, other);
|
||
};
|
||
}
|
||
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
|
||
var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined2, newHoldersRight = isCurry ? undefined2 : holders, newPartials = isCurry ? partials : undefined2, newPartialsRight = isCurry ? undefined2 : partials;
|
||
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
|
||
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
|
||
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
|
||
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
|
||
}
|
||
var newData = [
|
||
func,
|
||
bitmask,
|
||
thisArg,
|
||
newPartials,
|
||
newHolders,
|
||
newPartialsRight,
|
||
newHoldersRight,
|
||
argPos,
|
||
ary2,
|
||
arity
|
||
];
|
||
var result2 = wrapFunc.apply(undefined2, newData);
|
||
if (isLaziable(func)) {
|
||
setData(result2, newData);
|
||
}
|
||
result2.placeholder = placeholder;
|
||
return setWrapToString(result2, func, bitmask);
|
||
}
|
||
function createRound(methodName) {
|
||
var func = Math2[methodName];
|
||
return function(number2, precision) {
|
||
number2 = toNumber(number2);
|
||
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
||
if (precision && nativeIsFinite(number2)) {
|
||
var pair = (toString2(number2) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
|
||
pair = (toString2(value) + "e").split("e");
|
||
return +(pair[0] + "e" + (+pair[1] - precision));
|
||
}
|
||
return func(number2);
|
||
};
|
||
}
|
||
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
|
||
return new Set2(values2);
|
||
};
|
||
function createToPairs(keysFunc) {
|
||
return function(object) {
|
||
var tag = getTag(object);
|
||
if (tag == mapTag) {
|
||
return mapToArray(object);
|
||
}
|
||
if (tag == setTag) {
|
||
return setToPairs(object);
|
||
}
|
||
return baseToPairs(object, keysFunc(object));
|
||
};
|
||
}
|
||
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
|
||
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
|
||
if (!isBindKey && typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
var length = partials ? partials.length : 0;
|
||
if (!length) {
|
||
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
|
||
partials = holders = undefined2;
|
||
}
|
||
ary2 = ary2 === undefined2 ? ary2 : nativeMax(toInteger(ary2), 0);
|
||
arity = arity === undefined2 ? arity : toInteger(arity);
|
||
length -= holders ? holders.length : 0;
|
||
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
|
||
var partialsRight = partials, holdersRight = holders;
|
||
partials = holders = undefined2;
|
||
}
|
||
var data = isBindKey ? undefined2 : getData(func);
|
||
var newData = [
|
||
func,
|
||
bitmask,
|
||
thisArg,
|
||
partials,
|
||
holders,
|
||
partialsRight,
|
||
holdersRight,
|
||
argPos,
|
||
ary2,
|
||
arity
|
||
];
|
||
if (data) {
|
||
mergeData(newData, data);
|
||
}
|
||
func = newData[0];
|
||
bitmask = newData[1];
|
||
thisArg = newData[2];
|
||
partials = newData[3];
|
||
holders = newData[4];
|
||
arity = newData[9] = newData[9] === undefined2 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
|
||
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
|
||
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
|
||
}
|
||
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
|
||
var result2 = createBind(func, bitmask, thisArg);
|
||
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
|
||
result2 = createCurry(func, bitmask, arity);
|
||
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
|
||
result2 = createPartial(func, bitmask, thisArg, partials);
|
||
} else {
|
||
result2 = createHybrid.apply(undefined2, newData);
|
||
}
|
||
var setter = data ? baseSetData : setData;
|
||
return setWrapToString(setter(result2, newData), func, bitmask);
|
||
}
|
||
function customDefaultsAssignIn(objValue, srcValue, key2, object) {
|
||
if (objValue === undefined2 || eq(objValue, objectProto[key2]) && !hasOwnProperty.call(object, key2)) {
|
||
return srcValue;
|
||
}
|
||
return objValue;
|
||
}
|
||
function customDefaultsMerge(objValue, srcValue, key2, object, source, stack) {
|
||
if (isObject(objValue) && isObject(srcValue)) {
|
||
stack.set(srcValue, objValue);
|
||
baseMerge(objValue, srcValue, undefined2, customDefaultsMerge, stack);
|
||
stack["delete"](srcValue);
|
||
}
|
||
return objValue;
|
||
}
|
||
function customOmitClone(value) {
|
||
return isPlainObject(value) ? undefined2 : value;
|
||
}
|
||
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
||
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
||
return false;
|
||
}
|
||
var arrStacked = stack.get(array);
|
||
var othStacked = stack.get(other);
|
||
if (arrStacked && othStacked) {
|
||
return arrStacked == other && othStacked == array;
|
||
}
|
||
var index2 = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined2;
|
||
stack.set(array, other);
|
||
stack.set(other, array);
|
||
while (++index2 < arrLength) {
|
||
var arrValue = array[index2], othValue = other[index2];
|
||
if (customizer) {
|
||
var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
|
||
}
|
||
if (compared !== undefined2) {
|
||
if (compared) {
|
||
continue;
|
||
}
|
||
result2 = false;
|
||
break;
|
||
}
|
||
if (seen) {
|
||
if (!arraySome(other, function(othValue2, othIndex) {
|
||
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
||
return seen.push(othIndex);
|
||
}
|
||
})) {
|
||
result2 = false;
|
||
break;
|
||
}
|
||
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
||
result2 = false;
|
||
break;
|
||
}
|
||
}
|
||
stack["delete"](array);
|
||
stack["delete"](other);
|
||
return result2;
|
||
}
|
||
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
||
switch (tag) {
|
||
case dataViewTag:
|
||
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
||
return false;
|
||
}
|
||
object = object.buffer;
|
||
other = other.buffer;
|
||
case arrayBufferTag:
|
||
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
|
||
return false;
|
||
}
|
||
return true;
|
||
case boolTag:
|
||
case dateTag:
|
||
case numberTag:
|
||
return eq(+object, +other);
|
||
case errorTag:
|
||
return object.name == other.name && object.message == other.message;
|
||
case regexpTag:
|
||
case stringTag:
|
||
return object == other + "";
|
||
case mapTag:
|
||
var convert2 = mapToArray;
|
||
case setTag:
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
||
convert2 || (convert2 = setToArray);
|
||
if (object.size != other.size && !isPartial) {
|
||
return false;
|
||
}
|
||
var stacked = stack.get(object);
|
||
if (stacked) {
|
||
return stacked == other;
|
||
}
|
||
bitmask |= COMPARE_UNORDERED_FLAG;
|
||
stack.set(object, other);
|
||
var result2 = equalArrays(convert2(object), convert2(other), bitmask, customizer, equalFunc, stack);
|
||
stack["delete"](object);
|
||
return result2;
|
||
case symbolTag:
|
||
if (symbolValueOf) {
|
||
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
||
if (objLength != othLength && !isPartial) {
|
||
return false;
|
||
}
|
||
var index2 = objLength;
|
||
while (index2--) {
|
||
var key2 = objProps[index2];
|
||
if (!(isPartial ? key2 in other : hasOwnProperty.call(other, key2))) {
|
||
return false;
|
||
}
|
||
}
|
||
var objStacked = stack.get(object);
|
||
var othStacked = stack.get(other);
|
||
if (objStacked && othStacked) {
|
||
return objStacked == other && othStacked == object;
|
||
}
|
||
var result2 = true;
|
||
stack.set(object, other);
|
||
stack.set(other, object);
|
||
var skipCtor = isPartial;
|
||
while (++index2 < objLength) {
|
||
key2 = objProps[index2];
|
||
var objValue = object[key2], othValue = other[key2];
|
||
if (customizer) {
|
||
var compared = isPartial ? customizer(othValue, objValue, key2, other, object, stack) : customizer(objValue, othValue, key2, object, other, stack);
|
||
}
|
||
if (!(compared === undefined2 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
||
result2 = false;
|
||
break;
|
||
}
|
||
skipCtor || (skipCtor = key2 == "constructor");
|
||
}
|
||
if (result2 && !skipCtor) {
|
||
var objCtor = object.constructor, othCtor = other.constructor;
|
||
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
||
result2 = false;
|
||
}
|
||
}
|
||
stack["delete"](object);
|
||
stack["delete"](other);
|
||
return result2;
|
||
}
|
||
function flatRest(func) {
|
||
return setToString(overRest(func, undefined2, flatten), func + "");
|
||
}
|
||
function getAllKeys(object) {
|
||
return baseGetAllKeys(object, keys, getSymbols);
|
||
}
|
||
function getAllKeysIn(object) {
|
||
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
||
}
|
||
var getData = !metaMap ? noop : function(func) {
|
||
return metaMap.get(func);
|
||
};
|
||
function getFuncName(func) {
|
||
var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0;
|
||
while (length--) {
|
||
var data = array[length], otherFunc = data.func;
|
||
if (otherFunc == null || otherFunc == func) {
|
||
return data.name;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function getHolder(func) {
|
||
var object = hasOwnProperty.call(lodash, "placeholder") ? lodash : func;
|
||
return object.placeholder;
|
||
}
|
||
function getIteratee() {
|
||
var result2 = lodash.iteratee || iteratee;
|
||
result2 = result2 === iteratee ? baseIteratee : result2;
|
||
return arguments.length ? result2(arguments[0], arguments[1]) : result2;
|
||
}
|
||
function getMapData(map2, key2) {
|
||
var data = map2.__data__;
|
||
return isKeyable(key2) ? data[typeof key2 == "string" ? "string" : "hash"] : data.map;
|
||
}
|
||
function getMatchData(object) {
|
||
var result2 = keys(object), length = result2.length;
|
||
while (length--) {
|
||
var key2 = result2[length], value = object[key2];
|
||
result2[length] = [key2, value, isStrictComparable(value)];
|
||
}
|
||
return result2;
|
||
}
|
||
function getNative(object, key2) {
|
||
var value = getValue(object, key2);
|
||
return baseIsNative(value) ? value : undefined2;
|
||
}
|
||
function getRawTag(value) {
|
||
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
||
try {
|
||
value[symToStringTag] = undefined2;
|
||
var unmasked = true;
|
||
} catch (e) {
|
||
}
|
||
var result2 = nativeObjectToString.call(value);
|
||
if (unmasked) {
|
||
if (isOwn) {
|
||
value[symToStringTag] = tag;
|
||
} else {
|
||
delete value[symToStringTag];
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
||
if (object == null) {
|
||
return [];
|
||
}
|
||
object = Object2(object);
|
||
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
||
return propertyIsEnumerable.call(object, symbol);
|
||
});
|
||
};
|
||
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
||
var result2 = [];
|
||
while (object) {
|
||
arrayPush(result2, getSymbols(object));
|
||
object = getPrototype(object);
|
||
}
|
||
return result2;
|
||
};
|
||
var getTag = baseGetTag;
|
||
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
|
||
getTag = function(value) {
|
||
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined2, ctorString = Ctor ? toSource(Ctor) : "";
|
||
if (ctorString) {
|
||
switch (ctorString) {
|
||
case dataViewCtorString:
|
||
return dataViewTag;
|
||
case mapCtorString:
|
||
return mapTag;
|
||
case promiseCtorString:
|
||
return promiseTag;
|
||
case setCtorString:
|
||
return setTag;
|
||
case weakMapCtorString:
|
||
return weakMapTag;
|
||
}
|
||
}
|
||
return result2;
|
||
};
|
||
}
|
||
function getView(start, end, transforms) {
|
||
var index2 = -1, length = transforms.length;
|
||
while (++index2 < length) {
|
||
var data = transforms[index2], size2 = data.size;
|
||
switch (data.type) {
|
||
case "drop":
|
||
start += size2;
|
||
break;
|
||
case "dropRight":
|
||
end -= size2;
|
||
break;
|
||
case "take":
|
||
end = nativeMin(end, start + size2);
|
||
break;
|
||
case "takeRight":
|
||
start = nativeMax(start, end - size2);
|
||
break;
|
||
}
|
||
}
|
||
return { "start": start, "end": end };
|
||
}
|
||
function getWrapDetails(source) {
|
||
var match = source.match(reWrapDetails);
|
||
return match ? match[1].split(reSplitDetails) : [];
|
||
}
|
||
function hasPath(object, path, hasFunc) {
|
||
path = castPath(path, object);
|
||
var index2 = -1, length = path.length, result2 = false;
|
||
while (++index2 < length) {
|
||
var key2 = toKey(path[index2]);
|
||
if (!(result2 = object != null && hasFunc(object, key2))) {
|
||
break;
|
||
}
|
||
object = object[key2];
|
||
}
|
||
if (result2 || ++index2 != length) {
|
||
return result2;
|
||
}
|
||
length = object == null ? 0 : object.length;
|
||
return !!length && isLength(length) && isIndex(key2, length) && (isArray(object) || isArguments(object));
|
||
}
|
||
function initCloneArray(array) {
|
||
var length = array.length, result2 = new array.constructor(length);
|
||
if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
|
||
result2.index = array.index;
|
||
result2.input = array.input;
|
||
}
|
||
return result2;
|
||
}
|
||
function initCloneObject(object) {
|
||
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
||
}
|
||
function initCloneByTag(object, tag, isDeep) {
|
||
var Ctor = object.constructor;
|
||
switch (tag) {
|
||
case arrayBufferTag:
|
||
return cloneArrayBuffer(object);
|
||
case boolTag:
|
||
case dateTag:
|
||
return new Ctor(+object);
|
||
case dataViewTag:
|
||
return cloneDataView(object, isDeep);
|
||
case float32Tag:
|
||
case float64Tag:
|
||
case int8Tag:
|
||
case int16Tag:
|
||
case int32Tag:
|
||
case uint8Tag:
|
||
case uint8ClampedTag:
|
||
case uint16Tag:
|
||
case uint32Tag:
|
||
return cloneTypedArray(object, isDeep);
|
||
case mapTag:
|
||
return new Ctor();
|
||
case numberTag:
|
||
case stringTag:
|
||
return new Ctor(object);
|
||
case regexpTag:
|
||
return cloneRegExp(object);
|
||
case setTag:
|
||
return new Ctor();
|
||
case symbolTag:
|
||
return cloneSymbol(object);
|
||
}
|
||
}
|
||
function insertWrapDetails(source, details) {
|
||
var length = details.length;
|
||
if (!length) {
|
||
return source;
|
||
}
|
||
var lastIndex = length - 1;
|
||
details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
|
||
details = details.join(length > 2 ? ", " : " ");
|
||
return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
|
||
}
|
||
function isFlattenable(value) {
|
||
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
||
}
|
||
function isIndex(value, length) {
|
||
var type = typeof value;
|
||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
||
}
|
||
function isIterateeCall(value, index2, object) {
|
||
if (!isObject(object)) {
|
||
return false;
|
||
}
|
||
var type = typeof index2;
|
||
if (type == "number" ? isArrayLike(object) && isIndex(index2, object.length) : type == "string" && index2 in object) {
|
||
return eq(object[index2], value);
|
||
}
|
||
return false;
|
||
}
|
||
function isKey(value, object) {
|
||
if (isArray(value)) {
|
||
return false;
|
||
}
|
||
var type = typeof value;
|
||
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
||
return true;
|
||
}
|
||
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
|
||
}
|
||
function isKeyable(value) {
|
||
var type = typeof value;
|
||
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
||
}
|
||
function isLaziable(func) {
|
||
var funcName = getFuncName(func), other = lodash[funcName];
|
||
if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
|
||
return false;
|
||
}
|
||
if (func === other) {
|
||
return true;
|
||
}
|
||
var data = getData(other);
|
||
return !!data && func === data[0];
|
||
}
|
||
function isMasked(func) {
|
||
return !!maskSrcKey && maskSrcKey in func;
|
||
}
|
||
var isMaskable = coreJsData ? isFunction : stubFalse;
|
||
function isPrototype(value) {
|
||
var Ctor = value && value.constructor, proto2 = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
||
return value === proto2;
|
||
}
|
||
function isStrictComparable(value) {
|
||
return value === value && !isObject(value);
|
||
}
|
||
function matchesStrictComparable(key2, srcValue) {
|
||
return function(object) {
|
||
if (object == null) {
|
||
return false;
|
||
}
|
||
return object[key2] === srcValue && (srcValue !== undefined2 || key2 in Object2(object));
|
||
};
|
||
}
|
||
function memoizeCapped(func) {
|
||
var result2 = memoize(func, function(key2) {
|
||
if (cache.size === MAX_MEMOIZE_SIZE) {
|
||
cache.clear();
|
||
}
|
||
return key2;
|
||
});
|
||
var cache = result2.cache;
|
||
return result2;
|
||
}
|
||
function mergeData(data, source) {
|
||
var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
|
||
var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
|
||
if (!(isCommon || isCombo)) {
|
||
return data;
|
||
}
|
||
if (srcBitmask & WRAP_BIND_FLAG) {
|
||
data[2] = source[2];
|
||
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
|
||
}
|
||
var value = source[3];
|
||
if (value) {
|
||
var partials = data[3];
|
||
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
|
||
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
|
||
}
|
||
value = source[5];
|
||
if (value) {
|
||
partials = data[5];
|
||
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
|
||
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
|
||
}
|
||
value = source[7];
|
||
if (value) {
|
||
data[7] = value;
|
||
}
|
||
if (srcBitmask & WRAP_ARY_FLAG) {
|
||
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
|
||
}
|
||
if (data[9] == null) {
|
||
data[9] = source[9];
|
||
}
|
||
data[0] = source[0];
|
||
data[1] = newBitmask;
|
||
return data;
|
||
}
|
||
function nativeKeysIn(object) {
|
||
var result2 = [];
|
||
if (object != null) {
|
||
for (var key2 in Object2(object)) {
|
||
result2.push(key2);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function objectToString(value) {
|
||
return nativeObjectToString.call(value);
|
||
}
|
||
function overRest(func, start, transform2) {
|
||
start = nativeMax(start === undefined2 ? func.length - 1 : start, 0);
|
||
return function() {
|
||
var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
|
||
while (++index2 < length) {
|
||
array[index2] = args[start + index2];
|
||
}
|
||
index2 = -1;
|
||
var otherArgs = Array2(start + 1);
|
||
while (++index2 < start) {
|
||
otherArgs[index2] = args[index2];
|
||
}
|
||
otherArgs[start] = transform2(array);
|
||
return apply(func, this, otherArgs);
|
||
};
|
||
}
|
||
function parent(object, path) {
|
||
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||
}
|
||
function reorder(array, indexes) {
|
||
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
||
while (length--) {
|
||
var index2 = indexes[length];
|
||
array[length] = isIndex(index2, arrLength) ? oldArray[index2] : undefined2;
|
||
}
|
||
return array;
|
||
}
|
||
function safeGet(object, key2) {
|
||
if (key2 === "constructor" && typeof object[key2] === "function") {
|
||
return;
|
||
}
|
||
if (key2 == "__proto__") {
|
||
return;
|
||
}
|
||
return object[key2];
|
||
}
|
||
var setData = shortOut(baseSetData);
|
||
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
||
return root2.setTimeout(func, wait);
|
||
};
|
||
var setToString = shortOut(baseSetToString);
|
||
function setWrapToString(wrapper, reference, bitmask) {
|
||
var source = reference + "";
|
||
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
||
}
|
||
function shortOut(func) {
|
||
var count = 0, lastCalled = 0;
|
||
return function() {
|
||
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
||
lastCalled = stamp;
|
||
if (remaining > 0) {
|
||
if (++count >= HOT_COUNT) {
|
||
return arguments[0];
|
||
}
|
||
} else {
|
||
count = 0;
|
||
}
|
||
return func.apply(undefined2, arguments);
|
||
};
|
||
}
|
||
function shuffleSelf(array, size2) {
|
||
var index2 = -1, length = array.length, lastIndex = length - 1;
|
||
size2 = size2 === undefined2 ? length : size2;
|
||
while (++index2 < size2) {
|
||
var rand = baseRandom(index2, lastIndex), value = array[rand];
|
||
array[rand] = array[index2];
|
||
array[index2] = value;
|
||
}
|
||
array.length = size2;
|
||
return array;
|
||
}
|
||
var stringToPath = memoizeCapped(function(string) {
|
||
var result2 = [];
|
||
if (string.charCodeAt(0) === 46) {
|
||
result2.push("");
|
||
}
|
||
string.replace(rePropName, function(match, number2, quote, subString) {
|
||
result2.push(quote ? subString.replace(reEscapeChar, "$1") : number2 || match);
|
||
});
|
||
return result2;
|
||
});
|
||
function toKey(value) {
|
||
if (typeof value == "string" || isSymbol(value)) {
|
||
return value;
|
||
}
|
||
var result2 = value + "";
|
||
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
||
}
|
||
function toSource(func) {
|
||
if (func != null) {
|
||
try {
|
||
return funcToString.call(func);
|
||
} catch (e) {
|
||
}
|
||
try {
|
||
return func + "";
|
||
} catch (e) {
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
function updateWrapDetails(details, bitmask) {
|
||
arrayEach(wrapFlags, function(pair) {
|
||
var value = "_." + pair[0];
|
||
if (bitmask & pair[1] && !arrayIncludes(details, value)) {
|
||
details.push(value);
|
||
}
|
||
});
|
||
return details.sort();
|
||
}
|
||
function wrapperClone(wrapper) {
|
||
if (wrapper instanceof LazyWrapper) {
|
||
return wrapper.clone();
|
||
}
|
||
var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
|
||
result2.__actions__ = copyArray(wrapper.__actions__);
|
||
result2.__index__ = wrapper.__index__;
|
||
result2.__values__ = wrapper.__values__;
|
||
return result2;
|
||
}
|
||
function chunk(array, size2, guard) {
|
||
if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined2) {
|
||
size2 = 1;
|
||
} else {
|
||
size2 = nativeMax(toInteger(size2), 0);
|
||
}
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length || size2 < 1) {
|
||
return [];
|
||
}
|
||
var index2 = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
|
||
while (index2 < length) {
|
||
result2[resIndex++] = baseSlice(array, index2, index2 += size2);
|
||
}
|
||
return result2;
|
||
}
|
||
function compact(array) {
|
||
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (value) {
|
||
result2[resIndex++] = value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function concat() {
|
||
var length = arguments.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
var args = Array2(length - 1), array = arguments[0], index2 = length;
|
||
while (index2--) {
|
||
args[index2 - 1] = arguments[index2];
|
||
}
|
||
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
||
}
|
||
var difference2 = baseRest(function(array, values2) {
|
||
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
|
||
});
|
||
var differenceBy = baseRest(function(array, values2) {
|
||
var iteratee2 = last(values2);
|
||
if (isArrayLikeObject(iteratee2)) {
|
||
iteratee2 = undefined2;
|
||
}
|
||
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
|
||
});
|
||
var differenceWith = baseRest(function(array, values2) {
|
||
var comparator = last(values2);
|
||
if (isArrayLikeObject(comparator)) {
|
||
comparator = undefined2;
|
||
}
|
||
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined2, comparator) : [];
|
||
});
|
||
function drop(array, n, guard) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined2 ? 1 : toInteger(n);
|
||
return baseSlice(array, n < 0 ? 0 : n, length);
|
||
}
|
||
function dropRight(array, n, guard) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined2 ? 1 : toInteger(n);
|
||
n = length - n;
|
||
return baseSlice(array, 0, n < 0 ? 0 : n);
|
||
}
|
||
function dropRightWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];
|
||
}
|
||
function dropWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];
|
||
}
|
||
function fill(array, value, start, end) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
if (start && typeof start != "number" && isIterateeCall(array, value, start)) {
|
||
start = 0;
|
||
end = length;
|
||
}
|
||
return baseFill(array, value, start, end);
|
||
}
|
||
function findIndex(array, predicate, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = fromIndex == null ? 0 : toInteger(fromIndex);
|
||
if (index2 < 0) {
|
||
index2 = nativeMax(length + index2, 0);
|
||
}
|
||
return baseFindIndex(array, getIteratee(predicate, 3), index2);
|
||
}
|
||
function findLastIndex(array, predicate, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = length - 1;
|
||
if (fromIndex !== undefined2) {
|
||
index2 = toInteger(fromIndex);
|
||
index2 = fromIndex < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1);
|
||
}
|
||
return baseFindIndex(array, getIteratee(predicate, 3), index2, true);
|
||
}
|
||
function flatten(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseFlatten(array, 1) : [];
|
||
}
|
||
function flattenDeep(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseFlatten(array, INFINITY) : [];
|
||
}
|
||
function flattenDepth(array, depth) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
depth = depth === undefined2 ? 1 : toInteger(depth);
|
||
return baseFlatten(array, depth);
|
||
}
|
||
function fromPairs(pairs) {
|
||
var index2 = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
|
||
while (++index2 < length) {
|
||
var pair = pairs[index2];
|
||
result2[pair[0]] = pair[1];
|
||
}
|
||
return result2;
|
||
}
|
||
function head2(array) {
|
||
return array && array.length ? array[0] : undefined2;
|
||
}
|
||
function indexOf(array, value, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = fromIndex == null ? 0 : toInteger(fromIndex);
|
||
if (index2 < 0) {
|
||
index2 = nativeMax(length + index2, 0);
|
||
}
|
||
return baseIndexOf(array, value, index2);
|
||
}
|
||
function initial(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseSlice(array, 0, -1) : [];
|
||
}
|
||
var intersection = baseRest(function(arrays) {
|
||
var mapped = arrayMap(arrays, castArrayLikeObject);
|
||
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
|
||
});
|
||
var intersectionBy = baseRest(function(arrays) {
|
||
var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
||
if (iteratee2 === last(mapped)) {
|
||
iteratee2 = undefined2;
|
||
} else {
|
||
mapped.pop();
|
||
}
|
||
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
|
||
});
|
||
var intersectionWith = baseRest(function(arrays) {
|
||
var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
||
comparator = typeof comparator == "function" ? comparator : undefined2;
|
||
if (comparator) {
|
||
mapped.pop();
|
||
}
|
||
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
||
});
|
||
function join2(array, separator) {
|
||
return array == null ? "" : nativeJoin.call(array, separator);
|
||
}
|
||
function last(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? array[length - 1] : undefined2;
|
||
}
|
||
function lastIndexOf(array, value, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = length;
|
||
if (fromIndex !== undefined2) {
|
||
index2 = toInteger(fromIndex);
|
||
index2 = index2 < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1);
|
||
}
|
||
return value === value ? strictLastIndexOf(array, value, index2) : baseFindIndex(array, baseIsNaN, index2, true);
|
||
}
|
||
function nth(array, n) {
|
||
return array && array.length ? baseNth(array, toInteger(n)) : undefined2;
|
||
}
|
||
var pull = baseRest(pullAll);
|
||
function pullAll(array, values2) {
|
||
return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array;
|
||
}
|
||
function pullAllBy(array, values2, iteratee2) {
|
||
return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
|
||
}
|
||
function pullAllWith(array, values2, comparator) {
|
||
return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined2, comparator) : array;
|
||
}
|
||
var pullAt = flatRest(function(array, indexes) {
|
||
var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
|
||
basePullAt(array, arrayMap(indexes, function(index2) {
|
||
return isIndex(index2, length) ? +index2 : index2;
|
||
}).sort(compareAscending));
|
||
return result2;
|
||
});
|
||
function remove(array, predicate) {
|
||
var result2 = [];
|
||
if (!(array && array.length)) {
|
||
return result2;
|
||
}
|
||
var index2 = -1, indexes = [], length = array.length;
|
||
predicate = getIteratee(predicate, 3);
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (predicate(value, index2, array)) {
|
||
result2.push(value);
|
||
indexes.push(index2);
|
||
}
|
||
}
|
||
basePullAt(array, indexes);
|
||
return result2;
|
||
}
|
||
function reverse(array) {
|
||
return array == null ? array : nativeReverse.call(array);
|
||
}
|
||
function slice(array, start, end) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
if (end && typeof end != "number" && isIterateeCall(array, start, end)) {
|
||
start = 0;
|
||
end = length;
|
||
} else {
|
||
start = start == null ? 0 : toInteger(start);
|
||
end = end === undefined2 ? length : toInteger(end);
|
||
}
|
||
return baseSlice(array, start, end);
|
||
}
|
||
function sortedIndex(array, value) {
|
||
return baseSortedIndex(array, value);
|
||
}
|
||
function sortedIndexBy(array, value, iteratee2) {
|
||
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2));
|
||
}
|
||
function sortedIndexOf(array, value) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (length) {
|
||
var index2 = baseSortedIndex(array, value);
|
||
if (index2 < length && eq(array[index2], value)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function sortedLastIndex(array, value) {
|
||
return baseSortedIndex(array, value, true);
|
||
}
|
||
function sortedLastIndexBy(array, value, iteratee2) {
|
||
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true);
|
||
}
|
||
function sortedLastIndexOf(array, value) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (length) {
|
||
var index2 = baseSortedIndex(array, value, true) - 1;
|
||
if (eq(array[index2], value)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function sortedUniq(array) {
|
||
return array && array.length ? baseSortedUniq(array) : [];
|
||
}
|
||
function sortedUniqBy(array, iteratee2) {
|
||
return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : [];
|
||
}
|
||
function tail(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseSlice(array, 1, length) : [];
|
||
}
|
||
function take(array, n, guard) {
|
||
if (!(array && array.length)) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined2 ? 1 : toInteger(n);
|
||
return baseSlice(array, 0, n < 0 ? 0 : n);
|
||
}
|
||
function takeRight(array, n, guard) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined2 ? 1 : toInteger(n);
|
||
n = length - n;
|
||
return baseSlice(array, n < 0 ? 0 : n, length);
|
||
}
|
||
function takeRightWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];
|
||
}
|
||
function takeWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
|
||
}
|
||
var union = baseRest(function(arrays) {
|
||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
||
});
|
||
var unionBy = baseRest(function(arrays) {
|
||
var iteratee2 = last(arrays);
|
||
if (isArrayLikeObject(iteratee2)) {
|
||
iteratee2 = undefined2;
|
||
}
|
||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
|
||
});
|
||
var unionWith = baseRest(function(arrays) {
|
||
var comparator = last(arrays);
|
||
comparator = typeof comparator == "function" ? comparator : undefined2;
|
||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined2, comparator);
|
||
});
|
||
function uniq(array) {
|
||
return array && array.length ? baseUniq(array) : [];
|
||
}
|
||
function uniqBy(array, iteratee2) {
|
||
return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
|
||
}
|
||
function uniqWith(array, comparator) {
|
||
comparator = typeof comparator == "function" ? comparator : undefined2;
|
||
return array && array.length ? baseUniq(array, undefined2, comparator) : [];
|
||
}
|
||
function unzip(array) {
|
||
if (!(array && array.length)) {
|
||
return [];
|
||
}
|
||
var length = 0;
|
||
array = arrayFilter(array, function(group) {
|
||
if (isArrayLikeObject(group)) {
|
||
length = nativeMax(group.length, length);
|
||
return true;
|
||
}
|
||
});
|
||
return baseTimes(length, function(index2) {
|
||
return arrayMap(array, baseProperty(index2));
|
||
});
|
||
}
|
||
function unzipWith(array, iteratee2) {
|
||
if (!(array && array.length)) {
|
||
return [];
|
||
}
|
||
var result2 = unzip(array);
|
||
if (iteratee2 == null) {
|
||
return result2;
|
||
}
|
||
return arrayMap(result2, function(group) {
|
||
return apply(iteratee2, undefined2, group);
|
||
});
|
||
}
|
||
var without = baseRest(function(array, values2) {
|
||
return isArrayLikeObject(array) ? baseDifference(array, values2) : [];
|
||
});
|
||
var xor = baseRest(function(arrays) {
|
||
return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
||
});
|
||
var xorBy = baseRest(function(arrays) {
|
||
var iteratee2 = last(arrays);
|
||
if (isArrayLikeObject(iteratee2)) {
|
||
iteratee2 = undefined2;
|
||
}
|
||
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
|
||
});
|
||
var xorWith = baseRest(function(arrays) {
|
||
var comparator = last(arrays);
|
||
comparator = typeof comparator == "function" ? comparator : undefined2;
|
||
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined2, comparator);
|
||
});
|
||
var zip = baseRest(unzip);
|
||
function zipObject(props, values2) {
|
||
return baseZipObject(props || [], values2 || [], assignValue);
|
||
}
|
||
function zipObjectDeep(props, values2) {
|
||
return baseZipObject(props || [], values2 || [], baseSet);
|
||
}
|
||
var zipWith = baseRest(function(arrays) {
|
||
var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined2;
|
||
iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined2;
|
||
return unzipWith(arrays, iteratee2);
|
||
});
|
||
function chain(value) {
|
||
var result2 = lodash(value);
|
||
result2.__chain__ = true;
|
||
return result2;
|
||
}
|
||
function tap(value, interceptor) {
|
||
interceptor(value);
|
||
return value;
|
||
}
|
||
function thru(value, interceptor) {
|
||
return interceptor(value);
|
||
}
|
||
var wrapperAt = flatRest(function(paths) {
|
||
var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
|
||
return baseAt(object, paths);
|
||
};
|
||
if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
|
||
return this.thru(interceptor);
|
||
}
|
||
value = value.slice(start, +start + (length ? 1 : 0));
|
||
value.__actions__.push({
|
||
"func": thru,
|
||
"args": [interceptor],
|
||
"thisArg": undefined2
|
||
});
|
||
return new LodashWrapper(value, this.__chain__).thru(function(array) {
|
||
if (length && !array.length) {
|
||
array.push(undefined2);
|
||
}
|
||
return array;
|
||
});
|
||
});
|
||
function wrapperChain() {
|
||
return chain(this);
|
||
}
|
||
function wrapperCommit() {
|
||
return new LodashWrapper(this.value(), this.__chain__);
|
||
}
|
||
function wrapperNext() {
|
||
if (this.__values__ === undefined2) {
|
||
this.__values__ = toArray(this.value());
|
||
}
|
||
var done = this.__index__ >= this.__values__.length, value = done ? undefined2 : this.__values__[this.__index__++];
|
||
return { "done": done, "value": value };
|
||
}
|
||
function wrapperToIterator() {
|
||
return this;
|
||
}
|
||
function wrapperPlant(value) {
|
||
var result2, parent2 = this;
|
||
while (parent2 instanceof baseLodash) {
|
||
var clone2 = wrapperClone(parent2);
|
||
clone2.__index__ = 0;
|
||
clone2.__values__ = undefined2;
|
||
if (result2) {
|
||
previous.__wrapped__ = clone2;
|
||
} else {
|
||
result2 = clone2;
|
||
}
|
||
var previous = clone2;
|
||
parent2 = parent2.__wrapped__;
|
||
}
|
||
previous.__wrapped__ = value;
|
||
return result2;
|
||
}
|
||
function wrapperReverse() {
|
||
var value = this.__wrapped__;
|
||
if (value instanceof LazyWrapper) {
|
||
var wrapped = value;
|
||
if (this.__actions__.length) {
|
||
wrapped = new LazyWrapper(this);
|
||
}
|
||
wrapped = wrapped.reverse();
|
||
wrapped.__actions__.push({
|
||
"func": thru,
|
||
"args": [reverse],
|
||
"thisArg": undefined2
|
||
});
|
||
return new LodashWrapper(wrapped, this.__chain__);
|
||
}
|
||
return this.thru(reverse);
|
||
}
|
||
function wrapperValue() {
|
||
return baseWrapperValue(this.__wrapped__, this.__actions__);
|
||
}
|
||
var countBy = createAggregator(function(result2, value, key2) {
|
||
if (hasOwnProperty.call(result2, key2)) {
|
||
++result2[key2];
|
||
} else {
|
||
baseAssignValue(result2, key2, 1);
|
||
}
|
||
});
|
||
function every(collection, predicate, guard) {
|
||
var func = isArray(collection) ? arrayEvery : baseEvery;
|
||
if (guard && isIterateeCall(collection, predicate, guard)) {
|
||
predicate = undefined2;
|
||
}
|
||
return func(collection, getIteratee(predicate, 3));
|
||
}
|
||
function filter(collection, predicate) {
|
||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||
return func(collection, getIteratee(predicate, 3));
|
||
}
|
||
var find2 = createFind(findIndex);
|
||
var findLast = createFind(findLastIndex);
|
||
function flatMap(collection, iteratee2) {
|
||
return baseFlatten(map(collection, iteratee2), 1);
|
||
}
|
||
function flatMapDeep(collection, iteratee2) {
|
||
return baseFlatten(map(collection, iteratee2), INFINITY);
|
||
}
|
||
function flatMapDepth(collection, iteratee2, depth) {
|
||
depth = depth === undefined2 ? 1 : toInteger(depth);
|
||
return baseFlatten(map(collection, iteratee2), depth);
|
||
}
|
||
function forEach(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayEach : baseEach;
|
||
return func(collection, getIteratee(iteratee2, 3));
|
||
}
|
||
function forEachRight(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayEachRight : baseEachRight;
|
||
return func(collection, getIteratee(iteratee2, 3));
|
||
}
|
||
var groupBy = createAggregator(function(result2, value, key2) {
|
||
if (hasOwnProperty.call(result2, key2)) {
|
||
result2[key2].push(value);
|
||
} else {
|
||
baseAssignValue(result2, key2, [value]);
|
||
}
|
||
});
|
||
function includes(collection, value, fromIndex, guard) {
|
||
collection = isArrayLike(collection) ? collection : values(collection);
|
||
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
||
var length = collection.length;
|
||
if (fromIndex < 0) {
|
||
fromIndex = nativeMax(length + fromIndex, 0);
|
||
}
|
||
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
||
}
|
||
var invokeMap = baseRest(function(collection, path, args) {
|
||
var index2 = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
||
baseEach(collection, function(value) {
|
||
result2[++index2] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
||
});
|
||
return result2;
|
||
});
|
||
var keyBy = createAggregator(function(result2, value, key2) {
|
||
baseAssignValue(result2, key2, value);
|
||
});
|
||
function map(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayMap : baseMap;
|
||
return func(collection, getIteratee(iteratee2, 3));
|
||
}
|
||
function orderBy(collection, iteratees, orders, guard) {
|
||
if (collection == null) {
|
||
return [];
|
||
}
|
||
if (!isArray(iteratees)) {
|
||
iteratees = iteratees == null ? [] : [iteratees];
|
||
}
|
||
orders = guard ? undefined2 : orders;
|
||
if (!isArray(orders)) {
|
||
orders = orders == null ? [] : [orders];
|
||
}
|
||
return baseOrderBy(collection, iteratees, orders);
|
||
}
|
||
var partition = createAggregator(function(result2, value, key2) {
|
||
result2[key2 ? 0 : 1].push(value);
|
||
}, function() {
|
||
return [[], []];
|
||
});
|
||
function reduce(collection, iteratee2, accumulator) {
|
||
var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
||
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
|
||
}
|
||
function reduceRight(collection, iteratee2, accumulator) {
|
||
var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
|
||
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
|
||
}
|
||
function reject(collection, predicate) {
|
||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||
return func(collection, negate(getIteratee(predicate, 3)));
|
||
}
|
||
function sample(collection) {
|
||
var func = isArray(collection) ? arraySample : baseSample;
|
||
return func(collection);
|
||
}
|
||
function sampleSize(collection, n, guard) {
|
||
if (guard ? isIterateeCall(collection, n, guard) : n === undefined2) {
|
||
n = 1;
|
||
} else {
|
||
n = toInteger(n);
|
||
}
|
||
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
|
||
return func(collection, n);
|
||
}
|
||
function shuffle(collection) {
|
||
var func = isArray(collection) ? arrayShuffle : baseShuffle;
|
||
return func(collection);
|
||
}
|
||
function size(collection) {
|
||
if (collection == null) {
|
||
return 0;
|
||
}
|
||
if (isArrayLike(collection)) {
|
||
return isString(collection) ? stringSize(collection) : collection.length;
|
||
}
|
||
var tag = getTag(collection);
|
||
if (tag == mapTag || tag == setTag) {
|
||
return collection.size;
|
||
}
|
||
return baseKeys(collection).length;
|
||
}
|
||
function some(collection, predicate, guard) {
|
||
var func = isArray(collection) ? arraySome : baseSome;
|
||
if (guard && isIterateeCall(collection, predicate, guard)) {
|
||
predicate = undefined2;
|
||
}
|
||
return func(collection, getIteratee(predicate, 3));
|
||
}
|
||
var sortBy = baseRest(function(collection, iteratees) {
|
||
if (collection == null) {
|
||
return [];
|
||
}
|
||
var length = iteratees.length;
|
||
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
||
iteratees = [];
|
||
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
||
iteratees = [iteratees[0]];
|
||
}
|
||
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
||
});
|
||
var now = ctxNow || function() {
|
||
return root2.Date.now();
|
||
};
|
||
function after(n, func) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
n = toInteger(n);
|
||
return function() {
|
||
if (--n < 1) {
|
||
return func.apply(this, arguments);
|
||
}
|
||
};
|
||
}
|
||
function ary(func, n, guard) {
|
||
n = guard ? undefined2 : n;
|
||
n = func && n == null ? func.length : n;
|
||
return createWrap(func, WRAP_ARY_FLAG, undefined2, undefined2, undefined2, undefined2, n);
|
||
}
|
||
function before(n, func) {
|
||
var result2;
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
n = toInteger(n);
|
||
return function() {
|
||
if (--n > 0) {
|
||
result2 = func.apply(this, arguments);
|
||
}
|
||
if (n <= 1) {
|
||
func = undefined2;
|
||
}
|
||
return result2;
|
||
};
|
||
}
|
||
var bind = baseRest(function(func, thisArg, partials) {
|
||
var bitmask = WRAP_BIND_FLAG;
|
||
if (partials.length) {
|
||
var holders = replaceHolders(partials, getHolder(bind));
|
||
bitmask |= WRAP_PARTIAL_FLAG;
|
||
}
|
||
return createWrap(func, bitmask, thisArg, partials, holders);
|
||
});
|
||
var bindKey = baseRest(function(object, key2, partials) {
|
||
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
|
||
if (partials.length) {
|
||
var holders = replaceHolders(partials, getHolder(bindKey));
|
||
bitmask |= WRAP_PARTIAL_FLAG;
|
||
}
|
||
return createWrap(key2, bitmask, object, partials, holders);
|
||
});
|
||
function curry(func, arity, guard) {
|
||
arity = guard ? undefined2 : arity;
|
||
var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity);
|
||
result2.placeholder = curry.placeholder;
|
||
return result2;
|
||
}
|
||
function curryRight(func, arity, guard) {
|
||
arity = guard ? undefined2 : arity;
|
||
var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity);
|
||
result2.placeholder = curryRight.placeholder;
|
||
return result2;
|
||
}
|
||
function debounce(func, wait, options) {
|
||
var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
wait = toNumber(wait) || 0;
|
||
if (isObject(options)) {
|
||
leading = !!options.leading;
|
||
maxing = "maxWait" in options;
|
||
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
||
trailing = "trailing" in options ? !!options.trailing : trailing;
|
||
}
|
||
function invokeFunc(time) {
|
||
var args = lastArgs, thisArg = lastThis;
|
||
lastArgs = lastThis = undefined2;
|
||
lastInvokeTime = time;
|
||
result2 = func.apply(thisArg, args);
|
||
return result2;
|
||
}
|
||
function leadingEdge(time) {
|
||
lastInvokeTime = time;
|
||
timerId = setTimeout2(timerExpired, wait);
|
||
return leading ? invokeFunc(time) : result2;
|
||
}
|
||
function remainingWait(time) {
|
||
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
||
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
||
}
|
||
function shouldInvoke(time) {
|
||
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
||
return lastCallTime === undefined2 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
||
}
|
||
function timerExpired() {
|
||
var time = now();
|
||
if (shouldInvoke(time)) {
|
||
return trailingEdge(time);
|
||
}
|
||
timerId = setTimeout2(timerExpired, remainingWait(time));
|
||
}
|
||
function trailingEdge(time) {
|
||
timerId = undefined2;
|
||
if (trailing && lastArgs) {
|
||
return invokeFunc(time);
|
||
}
|
||
lastArgs = lastThis = undefined2;
|
||
return result2;
|
||
}
|
||
function cancel() {
|
||
if (timerId !== undefined2) {
|
||
clearTimeout2(timerId);
|
||
}
|
||
lastInvokeTime = 0;
|
||
lastArgs = lastCallTime = lastThis = timerId = undefined2;
|
||
}
|
||
function flush() {
|
||
return timerId === undefined2 ? result2 : trailingEdge(now());
|
||
}
|
||
function debounced() {
|
||
var time = now(), isInvoking = shouldInvoke(time);
|
||
lastArgs = arguments;
|
||
lastThis = this;
|
||
lastCallTime = time;
|
||
if (isInvoking) {
|
||
if (timerId === undefined2) {
|
||
return leadingEdge(lastCallTime);
|
||
}
|
||
if (maxing) {
|
||
clearTimeout2(timerId);
|
||
timerId = setTimeout2(timerExpired, wait);
|
||
return invokeFunc(lastCallTime);
|
||
}
|
||
}
|
||
if (timerId === undefined2) {
|
||
timerId = setTimeout2(timerExpired, wait);
|
||
}
|
||
return result2;
|
||
}
|
||
debounced.cancel = cancel;
|
||
debounced.flush = flush;
|
||
return debounced;
|
||
}
|
||
var defer = baseRest(function(func, args) {
|
||
return baseDelay(func, 1, args);
|
||
});
|
||
var delay = baseRest(function(func, wait, args) {
|
||
return baseDelay(func, toNumber(wait) || 0, args);
|
||
});
|
||
function flip(func) {
|
||
return createWrap(func, WRAP_FLIP_FLAG);
|
||
}
|
||
function memoize(func, resolver) {
|
||
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
var memoized = function() {
|
||
var args = arguments, key2 = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
||
if (cache.has(key2)) {
|
||
return cache.get(key2);
|
||
}
|
||
var result2 = func.apply(this, args);
|
||
memoized.cache = cache.set(key2, result2) || cache;
|
||
return result2;
|
||
};
|
||
memoized.cache = new (memoize.Cache || MapCache)();
|
||
return memoized;
|
||
}
|
||
memoize.Cache = MapCache;
|
||
function negate(predicate) {
|
||
if (typeof predicate != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
return function() {
|
||
var args = arguments;
|
||
switch (args.length) {
|
||
case 0:
|
||
return !predicate.call(this);
|
||
case 1:
|
||
return !predicate.call(this, args[0]);
|
||
case 2:
|
||
return !predicate.call(this, args[0], args[1]);
|
||
case 3:
|
||
return !predicate.call(this, args[0], args[1], args[2]);
|
||
}
|
||
return !predicate.apply(this, args);
|
||
};
|
||
}
|
||
function once(func) {
|
||
return before(2, func);
|
||
}
|
||
var overArgs = castRest(function(func, transforms) {
|
||
transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
||
var funcsLength = transforms.length;
|
||
return baseRest(function(args) {
|
||
var index2 = -1, length = nativeMin(args.length, funcsLength);
|
||
while (++index2 < length) {
|
||
args[index2] = transforms[index2].call(this, args[index2]);
|
||
}
|
||
return apply(func, this, args);
|
||
});
|
||
});
|
||
var partial = baseRest(function(func, partials) {
|
||
var holders = replaceHolders(partials, getHolder(partial));
|
||
return createWrap(func, WRAP_PARTIAL_FLAG, undefined2, partials, holders);
|
||
});
|
||
var partialRight = baseRest(function(func, partials) {
|
||
var holders = replaceHolders(partials, getHolder(partialRight));
|
||
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined2, partials, holders);
|
||
});
|
||
var rearg = flatRest(function(func, indexes) {
|
||
return createWrap(func, WRAP_REARG_FLAG, undefined2, undefined2, undefined2, indexes);
|
||
});
|
||
function rest(func, start) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
start = start === undefined2 ? start : toInteger(start);
|
||
return baseRest(func, start);
|
||
}
|
||
function spread(func, start) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
start = start == null ? 0 : nativeMax(toInteger(start), 0);
|
||
return baseRest(function(args) {
|
||
var array = args[start], otherArgs = castSlice(args, 0, start);
|
||
if (array) {
|
||
arrayPush(otherArgs, array);
|
||
}
|
||
return apply(func, this, otherArgs);
|
||
});
|
||
}
|
||
function throttle(func, wait, options) {
|
||
var leading = true, trailing = true;
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
if (isObject(options)) {
|
||
leading = "leading" in options ? !!options.leading : leading;
|
||
trailing = "trailing" in options ? !!options.trailing : trailing;
|
||
}
|
||
return debounce(func, wait, {
|
||
"leading": leading,
|
||
"maxWait": wait,
|
||
"trailing": trailing
|
||
});
|
||
}
|
||
function unary(func) {
|
||
return ary(func, 1);
|
||
}
|
||
function wrap(value, wrapper) {
|
||
return partial(castFunction(wrapper), value);
|
||
}
|
||
function castArray() {
|
||
if (!arguments.length) {
|
||
return [];
|
||
}
|
||
var value = arguments[0];
|
||
return isArray(value) ? value : [value];
|
||
}
|
||
function clone(value) {
|
||
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
||
}
|
||
function cloneWith(value, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined2;
|
||
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
|
||
}
|
||
function cloneDeep(value) {
|
||
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
||
}
|
||
function cloneDeepWith(value, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined2;
|
||
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
||
}
|
||
function conformsTo(object, source) {
|
||
return source == null || baseConformsTo(object, source, keys(source));
|
||
}
|
||
function eq(value, other) {
|
||
return value === other || value !== value && other !== other;
|
||
}
|
||
var gt = createRelationalOperation(baseGt);
|
||
var gte = createRelationalOperation(function(value, other) {
|
||
return value >= other;
|
||
});
|
||
var isArguments = baseIsArguments(function() {
|
||
return arguments;
|
||
}()) ? baseIsArguments : function(value) {
|
||
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
||
};
|
||
var isArray = Array2.isArray;
|
||
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
||
function isArrayLike(value) {
|
||
return value != null && isLength(value.length) && !isFunction(value);
|
||
}
|
||
function isArrayLikeObject(value) {
|
||
return isObjectLike(value) && isArrayLike(value);
|
||
}
|
||
function isBoolean(value) {
|
||
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
|
||
}
|
||
var isBuffer = nativeIsBuffer || stubFalse;
|
||
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
||
function isElement(value) {
|
||
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
||
}
|
||
function isEmpty(value) {
|
||
if (value == null) {
|
||
return true;
|
||
}
|
||
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
||
return !value.length;
|
||
}
|
||
var tag = getTag(value);
|
||
if (tag == mapTag || tag == setTag) {
|
||
return !value.size;
|
||
}
|
||
if (isPrototype(value)) {
|
||
return !baseKeys(value).length;
|
||
}
|
||
for (var key2 in value) {
|
||
if (hasOwnProperty.call(value, key2)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function isEqual(value, other) {
|
||
return baseIsEqual(value, other);
|
||
}
|
||
function isEqualWith(value, other, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined2;
|
||
var result2 = customizer ? customizer(value, other) : undefined2;
|
||
return result2 === undefined2 ? baseIsEqual(value, other, undefined2, customizer) : !!result2;
|
||
}
|
||
function isError(value) {
|
||
if (!isObjectLike(value)) {
|
||
return false;
|
||
}
|
||
var tag = baseGetTag(value);
|
||
return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value);
|
||
}
|
||
function isFinite2(value) {
|
||
return typeof value == "number" && nativeIsFinite(value);
|
||
}
|
||
function isFunction(value) {
|
||
if (!isObject(value)) {
|
||
return false;
|
||
}
|
||
var tag = baseGetTag(value);
|
||
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
||
}
|
||
function isInteger(value) {
|
||
return typeof value == "number" && value == toInteger(value);
|
||
}
|
||
function isLength(value) {
|
||
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||
}
|
||
function isObject(value) {
|
||
var type = typeof value;
|
||
return value != null && (type == "object" || type == "function");
|
||
}
|
||
function isObjectLike(value) {
|
||
return value != null && typeof value == "object";
|
||
}
|
||
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
||
function isMatch(object, source) {
|
||
return object === source || baseIsMatch(object, source, getMatchData(source));
|
||
}
|
||
function isMatchWith(object, source, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined2;
|
||
return baseIsMatch(object, source, getMatchData(source), customizer);
|
||
}
|
||
function isNaN2(value) {
|
||
return isNumber2(value) && value != +value;
|
||
}
|
||
function isNative(value) {
|
||
if (isMaskable(value)) {
|
||
throw new Error2(CORE_ERROR_TEXT);
|
||
}
|
||
return baseIsNative(value);
|
||
}
|
||
function isNull(value) {
|
||
return value === null;
|
||
}
|
||
function isNil(value) {
|
||
return value == null;
|
||
}
|
||
function isNumber2(value) {
|
||
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
||
}
|
||
function isPlainObject(value) {
|
||
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
||
return false;
|
||
}
|
||
var proto2 = getPrototype(value);
|
||
if (proto2 === null) {
|
||
return true;
|
||
}
|
||
var Ctor = hasOwnProperty.call(proto2, "constructor") && proto2.constructor;
|
||
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
||
}
|
||
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
||
function isSafeInteger(value) {
|
||
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
||
}
|
||
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
||
function isString(value) {
|
||
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
||
}
|
||
function isSymbol(value) {
|
||
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
||
}
|
||
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
||
function isUndefined(value) {
|
||
return value === undefined2;
|
||
}
|
||
function isWeakMap(value) {
|
||
return isObjectLike(value) && getTag(value) == weakMapTag;
|
||
}
|
||
function isWeakSet(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
||
}
|
||
var lt = createRelationalOperation(baseLt);
|
||
var lte = createRelationalOperation(function(value, other) {
|
||
return value <= other;
|
||
});
|
||
function toArray(value) {
|
||
if (!value) {
|
||
return [];
|
||
}
|
||
if (isArrayLike(value)) {
|
||
return isString(value) ? stringToArray(value) : copyArray(value);
|
||
}
|
||
if (symIterator && value[symIterator]) {
|
||
return iteratorToArray(value[symIterator]());
|
||
}
|
||
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
|
||
return func(value);
|
||
}
|
||
function toFinite(value) {
|
||
if (!value) {
|
||
return value === 0 ? value : 0;
|
||
}
|
||
value = toNumber(value);
|
||
if (value === INFINITY || value === -INFINITY) {
|
||
var sign = value < 0 ? -1 : 1;
|
||
return sign * MAX_INTEGER;
|
||
}
|
||
return value === value ? value : 0;
|
||
}
|
||
function toInteger(value) {
|
||
var result2 = toFinite(value), remainder = result2 % 1;
|
||
return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
|
||
}
|
||
function toLength(value) {
|
||
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
||
}
|
||
function toNumber(value) {
|
||
if (typeof value == "number") {
|
||
return value;
|
||
}
|
||
if (isSymbol(value)) {
|
||
return NAN;
|
||
}
|
||
if (isObject(value)) {
|
||
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
||
value = isObject(other) ? other + "" : other;
|
||
}
|
||
if (typeof value != "string") {
|
||
return value === 0 ? value : +value;
|
||
}
|
||
value = baseTrim(value);
|
||
var isBinary = reIsBinary.test(value);
|
||
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
||
}
|
||
function toPlainObject(value) {
|
||
return copyObject(value, keysIn(value));
|
||
}
|
||
function toSafeInteger(value) {
|
||
return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
|
||
}
|
||
function toString2(value) {
|
||
return value == null ? "" : baseToString(value);
|
||
}
|
||
var assign = createAssigner(function(object, source) {
|
||
if (isPrototype(source) || isArrayLike(source)) {
|
||
copyObject(source, keys(source), object);
|
||
return;
|
||
}
|
||
for (var key2 in source) {
|
||
if (hasOwnProperty.call(source, key2)) {
|
||
assignValue(object, key2, source[key2]);
|
||
}
|
||
}
|
||
});
|
||
var assignIn = createAssigner(function(object, source) {
|
||
copyObject(source, keysIn(source), object);
|
||
});
|
||
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||
copyObject(source, keysIn(source), object, customizer);
|
||
});
|
||
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||
copyObject(source, keys(source), object, customizer);
|
||
});
|
||
var at = flatRest(baseAt);
|
||
function create2(prototype, properties) {
|
||
var result2 = baseCreate(prototype);
|
||
return properties == null ? result2 : baseAssign(result2, properties);
|
||
}
|
||
var defaults = baseRest(function(object, sources) {
|
||
object = Object2(object);
|
||
var index2 = -1;
|
||
var length = sources.length;
|
||
var guard = length > 2 ? sources[2] : undefined2;
|
||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||
length = 1;
|
||
}
|
||
while (++index2 < length) {
|
||
var source = sources[index2];
|
||
var props = keysIn(source);
|
||
var propsIndex = -1;
|
||
var propsLength = props.length;
|
||
while (++propsIndex < propsLength) {
|
||
var key2 = props[propsIndex];
|
||
var value = object[key2];
|
||
if (value === undefined2 || eq(value, objectProto[key2]) && !hasOwnProperty.call(object, key2)) {
|
||
object[key2] = source[key2];
|
||
}
|
||
}
|
||
}
|
||
return object;
|
||
});
|
||
var defaultsDeep = baseRest(function(args) {
|
||
args.push(undefined2, customDefaultsMerge);
|
||
return apply(mergeWith, undefined2, args);
|
||
});
|
||
function findKey(object, predicate) {
|
||
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
||
}
|
||
function findLastKey(object, predicate) {
|
||
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
|
||
}
|
||
function forIn(object, iteratee2) {
|
||
return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn);
|
||
}
|
||
function forInRight(object, iteratee2) {
|
||
return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn);
|
||
}
|
||
function forOwn(object, iteratee2) {
|
||
return object && baseForOwn(object, getIteratee(iteratee2, 3));
|
||
}
|
||
function forOwnRight(object, iteratee2) {
|
||
return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
|
||
}
|
||
function functions(object) {
|
||
return object == null ? [] : baseFunctions(object, keys(object));
|
||
}
|
||
function functionsIn(object) {
|
||
return object == null ? [] : baseFunctions(object, keysIn(object));
|
||
}
|
||
function get(object, path, defaultValue) {
|
||
var result2 = object == null ? undefined2 : baseGet(object, path);
|
||
return result2 === undefined2 ? defaultValue : result2;
|
||
}
|
||
function has(object, path) {
|
||
return object != null && hasPath(object, path, baseHas);
|
||
}
|
||
function hasIn(object, path) {
|
||
return object != null && hasPath(object, path, baseHasIn);
|
||
}
|
||
var invert = createInverter(function(result2, value, key2) {
|
||
if (value != null && typeof value.toString != "function") {
|
||
value = nativeObjectToString.call(value);
|
||
}
|
||
result2[value] = key2;
|
||
}, constant(identity));
|
||
var invertBy = createInverter(function(result2, value, key2) {
|
||
if (value != null && typeof value.toString != "function") {
|
||
value = nativeObjectToString.call(value);
|
||
}
|
||
if (hasOwnProperty.call(result2, value)) {
|
||
result2[value].push(key2);
|
||
} else {
|
||
result2[value] = [key2];
|
||
}
|
||
}, getIteratee);
|
||
var invoke = baseRest(baseInvoke);
|
||
function keys(object) {
|
||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||
}
|
||
function keysIn(object) {
|
||
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
||
}
|
||
function mapKeys(object, iteratee2) {
|
||
var result2 = {};
|
||
iteratee2 = getIteratee(iteratee2, 3);
|
||
baseForOwn(object, function(value, key2, object2) {
|
||
baseAssignValue(result2, iteratee2(value, key2, object2), value);
|
||
});
|
||
return result2;
|
||
}
|
||
function mapValues(object, iteratee2) {
|
||
var result2 = {};
|
||
iteratee2 = getIteratee(iteratee2, 3);
|
||
baseForOwn(object, function(value, key2, object2) {
|
||
baseAssignValue(result2, key2, iteratee2(value, key2, object2));
|
||
});
|
||
return result2;
|
||
}
|
||
var merge3 = createAssigner(function(object, source, srcIndex) {
|
||
baseMerge(object, source, srcIndex);
|
||
});
|
||
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||
baseMerge(object, source, srcIndex, customizer);
|
||
});
|
||
var omit = flatRest(function(object, paths) {
|
||
var result2 = {};
|
||
if (object == null) {
|
||
return result2;
|
||
}
|
||
var isDeep = false;
|
||
paths = arrayMap(paths, function(path) {
|
||
path = castPath(path, object);
|
||
isDeep || (isDeep = path.length > 1);
|
||
return path;
|
||
});
|
||
copyObject(object, getAllKeysIn(object), result2);
|
||
if (isDeep) {
|
||
result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
||
}
|
||
var length = paths.length;
|
||
while (length--) {
|
||
baseUnset(result2, paths[length]);
|
||
}
|
||
return result2;
|
||
});
|
||
function omitBy(object, predicate) {
|
||
return pickBy(object, negate(getIteratee(predicate)));
|
||
}
|
||
var pick = flatRest(function(object, paths) {
|
||
return object == null ? {} : basePick(object, paths);
|
||
});
|
||
function pickBy(object, predicate) {
|
||
if (object == null) {
|
||
return {};
|
||
}
|
||
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
||
return [prop];
|
||
});
|
||
predicate = getIteratee(predicate);
|
||
return basePickBy(object, props, function(value, path) {
|
||
return predicate(value, path[0]);
|
||
});
|
||
}
|
||
function result(object, path, defaultValue) {
|
||
path = castPath(path, object);
|
||
var index2 = -1, length = path.length;
|
||
if (!length) {
|
||
length = 1;
|
||
object = undefined2;
|
||
}
|
||
while (++index2 < length) {
|
||
var value = object == null ? undefined2 : object[toKey(path[index2])];
|
||
if (value === undefined2) {
|
||
index2 = length;
|
||
value = defaultValue;
|
||
}
|
||
object = isFunction(value) ? value.call(object) : value;
|
||
}
|
||
return object;
|
||
}
|
||
function set(object, path, value) {
|
||
return object == null ? object : baseSet(object, path, value);
|
||
}
|
||
function setWith(object, path, value, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined2;
|
||
return object == null ? object : baseSet(object, path, value, customizer);
|
||
}
|
||
var toPairs = createToPairs(keys);
|
||
var toPairsIn = createToPairs(keysIn);
|
||
function transform(object, iteratee2, accumulator) {
|
||
var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
||
iteratee2 = getIteratee(iteratee2, 4);
|
||
if (accumulator == null) {
|
||
var Ctor = object && object.constructor;
|
||
if (isArrLike) {
|
||
accumulator = isArr ? new Ctor() : [];
|
||
} else if (isObject(object)) {
|
||
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
||
} else {
|
||
accumulator = {};
|
||
}
|
||
}
|
||
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index2, object2) {
|
||
return iteratee2(accumulator, value, index2, object2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function unset(object, path) {
|
||
return object == null ? true : baseUnset(object, path);
|
||
}
|
||
function update(object, path, updater) {
|
||
return object == null ? object : baseUpdate(object, path, castFunction(updater));
|
||
}
|
||
function updateWith(object, path, updater, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined2;
|
||
return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
||
}
|
||
function values(object) {
|
||
return object == null ? [] : baseValues(object, keys(object));
|
||
}
|
||
function valuesIn(object) {
|
||
return object == null ? [] : baseValues(object, keysIn(object));
|
||
}
|
||
function clamp(number2, lower, upper) {
|
||
if (upper === undefined2) {
|
||
upper = lower;
|
||
lower = undefined2;
|
||
}
|
||
if (upper !== undefined2) {
|
||
upper = toNumber(upper);
|
||
upper = upper === upper ? upper : 0;
|
||
}
|
||
if (lower !== undefined2) {
|
||
lower = toNumber(lower);
|
||
lower = lower === lower ? lower : 0;
|
||
}
|
||
return baseClamp(toNumber(number2), lower, upper);
|
||
}
|
||
function inRange(number2, start, end) {
|
||
start = toFinite(start);
|
||
if (end === undefined2) {
|
||
end = start;
|
||
start = 0;
|
||
} else {
|
||
end = toFinite(end);
|
||
}
|
||
number2 = toNumber(number2);
|
||
return baseInRange(number2, start, end);
|
||
}
|
||
function random(lower, upper, floating) {
|
||
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
|
||
upper = floating = undefined2;
|
||
}
|
||
if (floating === undefined2) {
|
||
if (typeof upper == "boolean") {
|
||
floating = upper;
|
||
upper = undefined2;
|
||
} else if (typeof lower == "boolean") {
|
||
floating = lower;
|
||
lower = undefined2;
|
||
}
|
||
}
|
||
if (lower === undefined2 && upper === undefined2) {
|
||
lower = 0;
|
||
upper = 1;
|
||
} else {
|
||
lower = toFinite(lower);
|
||
if (upper === undefined2) {
|
||
upper = lower;
|
||
lower = 0;
|
||
} else {
|
||
upper = toFinite(upper);
|
||
}
|
||
}
|
||
if (lower > upper) {
|
||
var temp = lower;
|
||
lower = upper;
|
||
upper = temp;
|
||
}
|
||
if (floating || lower % 1 || upper % 1) {
|
||
var rand = nativeRandom();
|
||
return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
|
||
}
|
||
return baseRandom(lower, upper);
|
||
}
|
||
var camelCase = createCompounder(function(result2, word, index2) {
|
||
word = word.toLowerCase();
|
||
return result2 + (index2 ? capitalize(word) : word);
|
||
});
|
||
function capitalize(string) {
|
||
return upperFirst(toString2(string).toLowerCase());
|
||
}
|
||
function deburr(string) {
|
||
string = toString2(string);
|
||
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
||
}
|
||
function endsWith(string, target, position3) {
|
||
string = toString2(string);
|
||
target = baseToString(target);
|
||
var length = string.length;
|
||
position3 = position3 === undefined2 ? length : baseClamp(toInteger(position3), 0, length);
|
||
var end = position3;
|
||
position3 -= target.length;
|
||
return position3 >= 0 && string.slice(position3, end) == target;
|
||
}
|
||
function escape(string) {
|
||
string = toString2(string);
|
||
return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
|
||
}
|
||
function escapeRegExp(string) {
|
||
string = toString2(string);
|
||
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
|
||
}
|
||
var kebabCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? "-" : "") + word.toLowerCase();
|
||
});
|
||
var lowerCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? " " : "") + word.toLowerCase();
|
||
});
|
||
var lowerFirst = createCaseFirst("toLowerCase");
|
||
function pad(string, length, chars) {
|
||
string = toString2(string);
|
||
length = toInteger(length);
|
||
var strLength = length ? stringSize(string) : 0;
|
||
if (!length || strLength >= length) {
|
||
return string;
|
||
}
|
||
var mid = (length - strLength) / 2;
|
||
return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
|
||
}
|
||
function padEnd(string, length, chars) {
|
||
string = toString2(string);
|
||
length = toInteger(length);
|
||
var strLength = length ? stringSize(string) : 0;
|
||
return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
|
||
}
|
||
function padStart(string, length, chars) {
|
||
string = toString2(string);
|
||
length = toInteger(length);
|
||
var strLength = length ? stringSize(string) : 0;
|
||
return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
|
||
}
|
||
function parseInt2(string, radix, guard) {
|
||
if (guard || radix == null) {
|
||
radix = 0;
|
||
} else if (radix) {
|
||
radix = +radix;
|
||
}
|
||
return nativeParseInt(toString2(string).replace(reTrimStart, ""), radix || 0);
|
||
}
|
||
function repeat(string, n, guard) {
|
||
if (guard ? isIterateeCall(string, n, guard) : n === undefined2) {
|
||
n = 1;
|
||
} else {
|
||
n = toInteger(n);
|
||
}
|
||
return baseRepeat(toString2(string), n);
|
||
}
|
||
function replace() {
|
||
var args = arguments, string = toString2(args[0]);
|
||
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
||
}
|
||
var snakeCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? "_" : "") + word.toLowerCase();
|
||
});
|
||
function split(string, separator, limit) {
|
||
if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
|
||
separator = limit = undefined2;
|
||
}
|
||
limit = limit === undefined2 ? MAX_ARRAY_LENGTH : limit >>> 0;
|
||
if (!limit) {
|
||
return [];
|
||
}
|
||
string = toString2(string);
|
||
if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) {
|
||
separator = baseToString(separator);
|
||
if (!separator && hasUnicode(string)) {
|
||
return castSlice(stringToArray(string), 0, limit);
|
||
}
|
||
}
|
||
return string.split(separator, limit);
|
||
}
|
||
var startCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? " " : "") + upperFirst(word);
|
||
});
|
||
function startsWith(string, target, position3) {
|
||
string = toString2(string);
|
||
position3 = position3 == null ? 0 : baseClamp(toInteger(position3), 0, string.length);
|
||
target = baseToString(target);
|
||
return string.slice(position3, position3 + target.length) == target;
|
||
}
|
||
function template(string, options, guard) {
|
||
var settings = lodash.templateSettings;
|
||
if (guard && isIterateeCall(string, options, guard)) {
|
||
options = undefined2;
|
||
}
|
||
string = toString2(string);
|
||
options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
||
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
|
||
var isEscaping, isEvaluating, index2 = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
|
||
var reDelimiters = RegExp2(
|
||
(options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
|
||
"g"
|
||
);
|
||
var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
|
||
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
||
interpolateValue || (interpolateValue = esTemplateValue);
|
||
source += string.slice(index2, offset).replace(reUnescapedString, escapeStringChar);
|
||
if (escapeValue) {
|
||
isEscaping = true;
|
||
source += "' +\n__e(" + escapeValue + ") +\n'";
|
||
}
|
||
if (evaluateValue) {
|
||
isEvaluating = true;
|
||
source += "';\n" + evaluateValue + ";\n__p += '";
|
||
}
|
||
if (interpolateValue) {
|
||
source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
||
}
|
||
index2 = offset + match.length;
|
||
return match;
|
||
});
|
||
source += "';\n";
|
||
var variable = hasOwnProperty.call(options, "variable") && options.variable;
|
||
if (!variable) {
|
||
source = "with (obj) {\n" + source + "\n}\n";
|
||
} else if (reForbiddenIdentifierChars.test(variable)) {
|
||
throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
|
||
}
|
||
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
|
||
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
|
||
var result2 = attempt(function() {
|
||
return Function2(importsKeys, sourceURL + "return " + source).apply(undefined2, importsValues);
|
||
});
|
||
result2.source = source;
|
||
if (isError(result2)) {
|
||
throw result2;
|
||
}
|
||
return result2;
|
||
}
|
||
function toLower(value) {
|
||
return toString2(value).toLowerCase();
|
||
}
|
||
function toUpper(value) {
|
||
return toString2(value).toUpperCase();
|
||
}
|
||
function trim(string, chars, guard) {
|
||
string = toString2(string);
|
||
if (string && (guard || chars === undefined2)) {
|
||
return baseTrim(string);
|
||
}
|
||
if (!string || !(chars = baseToString(chars))) {
|
||
return string;
|
||
}
|
||
var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
||
return castSlice(strSymbols, start, end).join("");
|
||
}
|
||
function trimEnd(string, chars, guard) {
|
||
string = toString2(string);
|
||
if (string && (guard || chars === undefined2)) {
|
||
return string.slice(0, trimmedEndIndex(string) + 1);
|
||
}
|
||
if (!string || !(chars = baseToString(chars))) {
|
||
return string;
|
||
}
|
||
var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
|
||
return castSlice(strSymbols, 0, end).join("");
|
||
}
|
||
function trimStart(string, chars, guard) {
|
||
string = toString2(string);
|
||
if (string && (guard || chars === undefined2)) {
|
||
return string.replace(reTrimStart, "");
|
||
}
|
||
if (!string || !(chars = baseToString(chars))) {
|
||
return string;
|
||
}
|
||
var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
|
||
return castSlice(strSymbols, start).join("");
|
||
}
|
||
function truncate(string, options) {
|
||
var length = DEFAULT_TRUNC_LENGTH, omission2 = DEFAULT_TRUNC_OMISSION;
|
||
if (isObject(options)) {
|
||
var separator = "separator" in options ? options.separator : separator;
|
||
length = "length" in options ? toInteger(options.length) : length;
|
||
omission2 = "omission" in options ? baseToString(options.omission) : omission2;
|
||
}
|
||
string = toString2(string);
|
||
var strLength = string.length;
|
||
if (hasUnicode(string)) {
|
||
var strSymbols = stringToArray(string);
|
||
strLength = strSymbols.length;
|
||
}
|
||
if (length >= strLength) {
|
||
return string;
|
||
}
|
||
var end = length - stringSize(omission2);
|
||
if (end < 1) {
|
||
return omission2;
|
||
}
|
||
var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
|
||
if (separator === undefined2) {
|
||
return result2 + omission2;
|
||
}
|
||
if (strSymbols) {
|
||
end += result2.length - end;
|
||
}
|
||
if (isRegExp(separator)) {
|
||
if (string.slice(end).search(separator)) {
|
||
var match, substring = result2;
|
||
if (!separator.global) {
|
||
separator = RegExp2(separator.source, toString2(reFlags.exec(separator)) + "g");
|
||
}
|
||
separator.lastIndex = 0;
|
||
while (match = separator.exec(substring)) {
|
||
var newEnd = match.index;
|
||
}
|
||
result2 = result2.slice(0, newEnd === undefined2 ? end : newEnd);
|
||
}
|
||
} else if (string.indexOf(baseToString(separator), end) != end) {
|
||
var index2 = result2.lastIndexOf(separator);
|
||
if (index2 > -1) {
|
||
result2 = result2.slice(0, index2);
|
||
}
|
||
}
|
||
return result2 + omission2;
|
||
}
|
||
function unescape(string) {
|
||
string = toString2(string);
|
||
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
||
}
|
||
var upperCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? " " : "") + word.toUpperCase();
|
||
});
|
||
var upperFirst = createCaseFirst("toUpperCase");
|
||
function words(string, pattern, guard) {
|
||
string = toString2(string);
|
||
pattern = guard ? undefined2 : pattern;
|
||
if (pattern === undefined2) {
|
||
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
||
}
|
||
return string.match(pattern) || [];
|
||
}
|
||
var attempt = baseRest(function(func, args) {
|
||
try {
|
||
return apply(func, undefined2, args);
|
||
} catch (e) {
|
||
return isError(e) ? e : new Error2(e);
|
||
}
|
||
});
|
||
var bindAll = flatRest(function(object, methodNames) {
|
||
arrayEach(methodNames, function(key2) {
|
||
key2 = toKey(key2);
|
||
baseAssignValue(object, key2, bind(object[key2], object));
|
||
});
|
||
return object;
|
||
});
|
||
function cond(pairs) {
|
||
var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
|
||
pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
||
if (typeof pair[1] != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
return [toIteratee(pair[0]), pair[1]];
|
||
});
|
||
return baseRest(function(args) {
|
||
var index2 = -1;
|
||
while (++index2 < length) {
|
||
var pair = pairs[index2];
|
||
if (apply(pair[0], this, args)) {
|
||
return apply(pair[1], this, args);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
function conforms(source) {
|
||
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
|
||
}
|
||
function constant(value) {
|
||
return function() {
|
||
return value;
|
||
};
|
||
}
|
||
function defaultTo(value, defaultValue) {
|
||
return value == null || value !== value ? defaultValue : value;
|
||
}
|
||
var flow = createFlow();
|
||
var flowRight = createFlow(true);
|
||
function identity(value) {
|
||
return value;
|
||
}
|
||
function iteratee(func) {
|
||
return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
|
||
}
|
||
function matches(source) {
|
||
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
||
}
|
||
function matchesProperty(path, srcValue) {
|
||
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
||
}
|
||
var method = baseRest(function(path, args) {
|
||
return function(object) {
|
||
return baseInvoke(object, path, args);
|
||
};
|
||
});
|
||
var methodOf = baseRest(function(object, args) {
|
||
return function(path) {
|
||
return baseInvoke(object, path, args);
|
||
};
|
||
});
|
||
function mixin(object, source, options) {
|
||
var props = keys(source), methodNames = baseFunctions(source, props);
|
||
if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
|
||
options = source;
|
||
source = object;
|
||
object = this;
|
||
methodNames = baseFunctions(source, keys(source));
|
||
}
|
||
var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
|
||
arrayEach(methodNames, function(methodName) {
|
||
var func = source[methodName];
|
||
object[methodName] = func;
|
||
if (isFunc) {
|
||
object.prototype[methodName] = function() {
|
||
var chainAll = this.__chain__;
|
||
if (chain2 || chainAll) {
|
||
var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__);
|
||
actions.push({ "func": func, "args": arguments, "thisArg": object });
|
||
result2.__chain__ = chainAll;
|
||
return result2;
|
||
}
|
||
return func.apply(object, arrayPush([this.value()], arguments));
|
||
};
|
||
}
|
||
});
|
||
return object;
|
||
}
|
||
function noConflict() {
|
||
if (root2._ === this) {
|
||
root2._ = oldDash;
|
||
}
|
||
return this;
|
||
}
|
||
function noop() {
|
||
}
|
||
function nthArg(n) {
|
||
n = toInteger(n);
|
||
return baseRest(function(args) {
|
||
return baseNth(args, n);
|
||
});
|
||
}
|
||
var over = createOver(arrayMap);
|
||
var overEvery = createOver(arrayEvery);
|
||
var overSome = createOver(arraySome);
|
||
function property(path) {
|
||
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
||
}
|
||
function propertyOf(object) {
|
||
return function(path) {
|
||
return object == null ? undefined2 : baseGet(object, path);
|
||
};
|
||
}
|
||
var range = createRange();
|
||
var rangeRight = createRange(true);
|
||
function stubArray() {
|
||
return [];
|
||
}
|
||
function stubFalse() {
|
||
return false;
|
||
}
|
||
function stubObject() {
|
||
return {};
|
||
}
|
||
function stubString() {
|
||
return "";
|
||
}
|
||
function stubTrue() {
|
||
return true;
|
||
}
|
||
function times(n, iteratee2) {
|
||
n = toInteger(n);
|
||
if (n < 1 || n > MAX_SAFE_INTEGER) {
|
||
return [];
|
||
}
|
||
var index2 = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
|
||
iteratee2 = getIteratee(iteratee2);
|
||
n -= MAX_ARRAY_LENGTH;
|
||
var result2 = baseTimes(length, iteratee2);
|
||
while (++index2 < n) {
|
||
iteratee2(index2);
|
||
}
|
||
return result2;
|
||
}
|
||
function toPath(value) {
|
||
if (isArray(value)) {
|
||
return arrayMap(value, toKey);
|
||
}
|
||
return isSymbol(value) ? [value] : copyArray(stringToPath(toString2(value)));
|
||
}
|
||
function uniqueId(prefix) {
|
||
var id = ++idCounter;
|
||
return toString2(prefix) + id;
|
||
}
|
||
var add = createMathOperation(function(augend, addend) {
|
||
return augend + addend;
|
||
}, 0);
|
||
var ceil = createRound("ceil");
|
||
var divide = createMathOperation(function(dividend, divisor) {
|
||
return dividend / divisor;
|
||
}, 1);
|
||
var floor = createRound("floor");
|
||
function max(array) {
|
||
return array && array.length ? baseExtremum(array, identity, baseGt) : undefined2;
|
||
}
|
||
function maxBy(array, iteratee2) {
|
||
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined2;
|
||
}
|
||
function mean(array) {
|
||
return baseMean(array, identity);
|
||
}
|
||
function meanBy(array, iteratee2) {
|
||
return baseMean(array, getIteratee(iteratee2, 2));
|
||
}
|
||
function min(array) {
|
||
return array && array.length ? baseExtremum(array, identity, baseLt) : undefined2;
|
||
}
|
||
function minBy(array, iteratee2) {
|
||
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined2;
|
||
}
|
||
var multiply = createMathOperation(function(multiplier, multiplicand) {
|
||
return multiplier * multiplicand;
|
||
}, 1);
|
||
var round = createRound("round");
|
||
var subtract = createMathOperation(function(minuend, subtrahend) {
|
||
return minuend - subtrahend;
|
||
}, 0);
|
||
function sum(array) {
|
||
return array && array.length ? baseSum(array, identity) : 0;
|
||
}
|
||
function sumBy(array, iteratee2) {
|
||
return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
|
||
}
|
||
lodash.after = after;
|
||
lodash.ary = ary;
|
||
lodash.assign = assign;
|
||
lodash.assignIn = assignIn;
|
||
lodash.assignInWith = assignInWith;
|
||
lodash.assignWith = assignWith;
|
||
lodash.at = at;
|
||
lodash.before = before;
|
||
lodash.bind = bind;
|
||
lodash.bindAll = bindAll;
|
||
lodash.bindKey = bindKey;
|
||
lodash.castArray = castArray;
|
||
lodash.chain = chain;
|
||
lodash.chunk = chunk;
|
||
lodash.compact = compact;
|
||
lodash.concat = concat;
|
||
lodash.cond = cond;
|
||
lodash.conforms = conforms;
|
||
lodash.constant = constant;
|
||
lodash.countBy = countBy;
|
||
lodash.create = create2;
|
||
lodash.curry = curry;
|
||
lodash.curryRight = curryRight;
|
||
lodash.debounce = debounce;
|
||
lodash.defaults = defaults;
|
||
lodash.defaultsDeep = defaultsDeep;
|
||
lodash.defer = defer;
|
||
lodash.delay = delay;
|
||
lodash.difference = difference2;
|
||
lodash.differenceBy = differenceBy;
|
||
lodash.differenceWith = differenceWith;
|
||
lodash.drop = drop;
|
||
lodash.dropRight = dropRight;
|
||
lodash.dropRightWhile = dropRightWhile;
|
||
lodash.dropWhile = dropWhile;
|
||
lodash.fill = fill;
|
||
lodash.filter = filter;
|
||
lodash.flatMap = flatMap;
|
||
lodash.flatMapDeep = flatMapDeep;
|
||
lodash.flatMapDepth = flatMapDepth;
|
||
lodash.flatten = flatten;
|
||
lodash.flattenDeep = flattenDeep;
|
||
lodash.flattenDepth = flattenDepth;
|
||
lodash.flip = flip;
|
||
lodash.flow = flow;
|
||
lodash.flowRight = flowRight;
|
||
lodash.fromPairs = fromPairs;
|
||
lodash.functions = functions;
|
||
lodash.functionsIn = functionsIn;
|
||
lodash.groupBy = groupBy;
|
||
lodash.initial = initial;
|
||
lodash.intersection = intersection;
|
||
lodash.intersectionBy = intersectionBy;
|
||
lodash.intersectionWith = intersectionWith;
|
||
lodash.invert = invert;
|
||
lodash.invertBy = invertBy;
|
||
lodash.invokeMap = invokeMap;
|
||
lodash.iteratee = iteratee;
|
||
lodash.keyBy = keyBy;
|
||
lodash.keys = keys;
|
||
lodash.keysIn = keysIn;
|
||
lodash.map = map;
|
||
lodash.mapKeys = mapKeys;
|
||
lodash.mapValues = mapValues;
|
||
lodash.matches = matches;
|
||
lodash.matchesProperty = matchesProperty;
|
||
lodash.memoize = memoize;
|
||
lodash.merge = merge3;
|
||
lodash.mergeWith = mergeWith;
|
||
lodash.method = method;
|
||
lodash.methodOf = methodOf;
|
||
lodash.mixin = mixin;
|
||
lodash.negate = negate;
|
||
lodash.nthArg = nthArg;
|
||
lodash.omit = omit;
|
||
lodash.omitBy = omitBy;
|
||
lodash.once = once;
|
||
lodash.orderBy = orderBy;
|
||
lodash.over = over;
|
||
lodash.overArgs = overArgs;
|
||
lodash.overEvery = overEvery;
|
||
lodash.overSome = overSome;
|
||
lodash.partial = partial;
|
||
lodash.partialRight = partialRight;
|
||
lodash.partition = partition;
|
||
lodash.pick = pick;
|
||
lodash.pickBy = pickBy;
|
||
lodash.property = property;
|
||
lodash.propertyOf = propertyOf;
|
||
lodash.pull = pull;
|
||
lodash.pullAll = pullAll;
|
||
lodash.pullAllBy = pullAllBy;
|
||
lodash.pullAllWith = pullAllWith;
|
||
lodash.pullAt = pullAt;
|
||
lodash.range = range;
|
||
lodash.rangeRight = rangeRight;
|
||
lodash.rearg = rearg;
|
||
lodash.reject = reject;
|
||
lodash.remove = remove;
|
||
lodash.rest = rest;
|
||
lodash.reverse = reverse;
|
||
lodash.sampleSize = sampleSize;
|
||
lodash.set = set;
|
||
lodash.setWith = setWith;
|
||
lodash.shuffle = shuffle;
|
||
lodash.slice = slice;
|
||
lodash.sortBy = sortBy;
|
||
lodash.sortedUniq = sortedUniq;
|
||
lodash.sortedUniqBy = sortedUniqBy;
|
||
lodash.split = split;
|
||
lodash.spread = spread;
|
||
lodash.tail = tail;
|
||
lodash.take = take;
|
||
lodash.takeRight = takeRight;
|
||
lodash.takeRightWhile = takeRightWhile;
|
||
lodash.takeWhile = takeWhile;
|
||
lodash.tap = tap;
|
||
lodash.throttle = throttle;
|
||
lodash.thru = thru;
|
||
lodash.toArray = toArray;
|
||
lodash.toPairs = toPairs;
|
||
lodash.toPairsIn = toPairsIn;
|
||
lodash.toPath = toPath;
|
||
lodash.toPlainObject = toPlainObject;
|
||
lodash.transform = transform;
|
||
lodash.unary = unary;
|
||
lodash.union = union;
|
||
lodash.unionBy = unionBy;
|
||
lodash.unionWith = unionWith;
|
||
lodash.uniq = uniq;
|
||
lodash.uniqBy = uniqBy;
|
||
lodash.uniqWith = uniqWith;
|
||
lodash.unset = unset;
|
||
lodash.unzip = unzip;
|
||
lodash.unzipWith = unzipWith;
|
||
lodash.update = update;
|
||
lodash.updateWith = updateWith;
|
||
lodash.values = values;
|
||
lodash.valuesIn = valuesIn;
|
||
lodash.without = without;
|
||
lodash.words = words;
|
||
lodash.wrap = wrap;
|
||
lodash.xor = xor;
|
||
lodash.xorBy = xorBy;
|
||
lodash.xorWith = xorWith;
|
||
lodash.zip = zip;
|
||
lodash.zipObject = zipObject;
|
||
lodash.zipObjectDeep = zipObjectDeep;
|
||
lodash.zipWith = zipWith;
|
||
lodash.entries = toPairs;
|
||
lodash.entriesIn = toPairsIn;
|
||
lodash.extend = assignIn;
|
||
lodash.extendWith = assignInWith;
|
||
mixin(lodash, lodash);
|
||
lodash.add = add;
|
||
lodash.attempt = attempt;
|
||
lodash.camelCase = camelCase;
|
||
lodash.capitalize = capitalize;
|
||
lodash.ceil = ceil;
|
||
lodash.clamp = clamp;
|
||
lodash.clone = clone;
|
||
lodash.cloneDeep = cloneDeep;
|
||
lodash.cloneDeepWith = cloneDeepWith;
|
||
lodash.cloneWith = cloneWith;
|
||
lodash.conformsTo = conformsTo;
|
||
lodash.deburr = deburr;
|
||
lodash.defaultTo = defaultTo;
|
||
lodash.divide = divide;
|
||
lodash.endsWith = endsWith;
|
||
lodash.eq = eq;
|
||
lodash.escape = escape;
|
||
lodash.escapeRegExp = escapeRegExp;
|
||
lodash.every = every;
|
||
lodash.find = find2;
|
||
lodash.findIndex = findIndex;
|
||
lodash.findKey = findKey;
|
||
lodash.findLast = findLast;
|
||
lodash.findLastIndex = findLastIndex;
|
||
lodash.findLastKey = findLastKey;
|
||
lodash.floor = floor;
|
||
lodash.forEach = forEach;
|
||
lodash.forEachRight = forEachRight;
|
||
lodash.forIn = forIn;
|
||
lodash.forInRight = forInRight;
|
||
lodash.forOwn = forOwn;
|
||
lodash.forOwnRight = forOwnRight;
|
||
lodash.get = get;
|
||
lodash.gt = gt;
|
||
lodash.gte = gte;
|
||
lodash.has = has;
|
||
lodash.hasIn = hasIn;
|
||
lodash.head = head2;
|
||
lodash.identity = identity;
|
||
lodash.includes = includes;
|
||
lodash.indexOf = indexOf;
|
||
lodash.inRange = inRange;
|
||
lodash.invoke = invoke;
|
||
lodash.isArguments = isArguments;
|
||
lodash.isArray = isArray;
|
||
lodash.isArrayBuffer = isArrayBuffer;
|
||
lodash.isArrayLike = isArrayLike;
|
||
lodash.isArrayLikeObject = isArrayLikeObject;
|
||
lodash.isBoolean = isBoolean;
|
||
lodash.isBuffer = isBuffer;
|
||
lodash.isDate = isDate;
|
||
lodash.isElement = isElement;
|
||
lodash.isEmpty = isEmpty;
|
||
lodash.isEqual = isEqual;
|
||
lodash.isEqualWith = isEqualWith;
|
||
lodash.isError = isError;
|
||
lodash.isFinite = isFinite2;
|
||
lodash.isFunction = isFunction;
|
||
lodash.isInteger = isInteger;
|
||
lodash.isLength = isLength;
|
||
lodash.isMap = isMap;
|
||
lodash.isMatch = isMatch;
|
||
lodash.isMatchWith = isMatchWith;
|
||
lodash.isNaN = isNaN2;
|
||
lodash.isNative = isNative;
|
||
lodash.isNil = isNil;
|
||
lodash.isNull = isNull;
|
||
lodash.isNumber = isNumber2;
|
||
lodash.isObject = isObject;
|
||
lodash.isObjectLike = isObjectLike;
|
||
lodash.isPlainObject = isPlainObject;
|
||
lodash.isRegExp = isRegExp;
|
||
lodash.isSafeInteger = isSafeInteger;
|
||
lodash.isSet = isSet;
|
||
lodash.isString = isString;
|
||
lodash.isSymbol = isSymbol;
|
||
lodash.isTypedArray = isTypedArray;
|
||
lodash.isUndefined = isUndefined;
|
||
lodash.isWeakMap = isWeakMap;
|
||
lodash.isWeakSet = isWeakSet;
|
||
lodash.join = join2;
|
||
lodash.kebabCase = kebabCase;
|
||
lodash.last = last;
|
||
lodash.lastIndexOf = lastIndexOf;
|
||
lodash.lowerCase = lowerCase;
|
||
lodash.lowerFirst = lowerFirst;
|
||
lodash.lt = lt;
|
||
lodash.lte = lte;
|
||
lodash.max = max;
|
||
lodash.maxBy = maxBy;
|
||
lodash.mean = mean;
|
||
lodash.meanBy = meanBy;
|
||
lodash.min = min;
|
||
lodash.minBy = minBy;
|
||
lodash.stubArray = stubArray;
|
||
lodash.stubFalse = stubFalse;
|
||
lodash.stubObject = stubObject;
|
||
lodash.stubString = stubString;
|
||
lodash.stubTrue = stubTrue;
|
||
lodash.multiply = multiply;
|
||
lodash.nth = nth;
|
||
lodash.noConflict = noConflict;
|
||
lodash.noop = noop;
|
||
lodash.now = now;
|
||
lodash.pad = pad;
|
||
lodash.padEnd = padEnd;
|
||
lodash.padStart = padStart;
|
||
lodash.parseInt = parseInt2;
|
||
lodash.random = random;
|
||
lodash.reduce = reduce;
|
||
lodash.reduceRight = reduceRight;
|
||
lodash.repeat = repeat;
|
||
lodash.replace = replace;
|
||
lodash.result = result;
|
||
lodash.round = round;
|
||
lodash.runInContext = runInContext2;
|
||
lodash.sample = sample;
|
||
lodash.size = size;
|
||
lodash.snakeCase = snakeCase;
|
||
lodash.some = some;
|
||
lodash.sortedIndex = sortedIndex;
|
||
lodash.sortedIndexBy = sortedIndexBy;
|
||
lodash.sortedIndexOf = sortedIndexOf;
|
||
lodash.sortedLastIndex = sortedLastIndex;
|
||
lodash.sortedLastIndexBy = sortedLastIndexBy;
|
||
lodash.sortedLastIndexOf = sortedLastIndexOf;
|
||
lodash.startCase = startCase;
|
||
lodash.startsWith = startsWith;
|
||
lodash.subtract = subtract;
|
||
lodash.sum = sum;
|
||
lodash.sumBy = sumBy;
|
||
lodash.template = template;
|
||
lodash.times = times;
|
||
lodash.toFinite = toFinite;
|
||
lodash.toInteger = toInteger;
|
||
lodash.toLength = toLength;
|
||
lodash.toLower = toLower;
|
||
lodash.toNumber = toNumber;
|
||
lodash.toSafeInteger = toSafeInteger;
|
||
lodash.toString = toString2;
|
||
lodash.toUpper = toUpper;
|
||
lodash.trim = trim;
|
||
lodash.trimEnd = trimEnd;
|
||
lodash.trimStart = trimStart;
|
||
lodash.truncate = truncate;
|
||
lodash.unescape = unescape;
|
||
lodash.uniqueId = uniqueId;
|
||
lodash.upperCase = upperCase;
|
||
lodash.upperFirst = upperFirst;
|
||
lodash.each = forEach;
|
||
lodash.eachRight = forEachRight;
|
||
lodash.first = head2;
|
||
mixin(lodash, function() {
|
||
var source = {};
|
||
baseForOwn(lodash, function(func, methodName) {
|
||
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
|
||
source[methodName] = func;
|
||
}
|
||
});
|
||
return source;
|
||
}(), { "chain": false });
|
||
lodash.VERSION = VERSION;
|
||
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
||
lodash[methodName].placeholder = lodash;
|
||
});
|
||
arrayEach(["drop", "take"], function(methodName, index2) {
|
||
LazyWrapper.prototype[methodName] = function(n) {
|
||
n = n === undefined2 ? 1 : nativeMax(toInteger(n), 0);
|
||
var result2 = this.__filtered__ && !index2 ? new LazyWrapper(this) : this.clone();
|
||
if (result2.__filtered__) {
|
||
result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
|
||
} else {
|
||
result2.__views__.push({
|
||
"size": nativeMin(n, MAX_ARRAY_LENGTH),
|
||
"type": methodName + (result2.__dir__ < 0 ? "Right" : "")
|
||
});
|
||
}
|
||
return result2;
|
||
};
|
||
LazyWrapper.prototype[methodName + "Right"] = function(n) {
|
||
return this.reverse()[methodName](n).reverse();
|
||
};
|
||
});
|
||
arrayEach(["filter", "map", "takeWhile"], function(methodName, index2) {
|
||
var type = index2 + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
||
LazyWrapper.prototype[methodName] = function(iteratee2) {
|
||
var result2 = this.clone();
|
||
result2.__iteratees__.push({
|
||
"iteratee": getIteratee(iteratee2, 3),
|
||
"type": type
|
||
});
|
||
result2.__filtered__ = result2.__filtered__ || isFilter;
|
||
return result2;
|
||
};
|
||
});
|
||
arrayEach(["head", "last"], function(methodName, index2) {
|
||
var takeName = "take" + (index2 ? "Right" : "");
|
||
LazyWrapper.prototype[methodName] = function() {
|
||
return this[takeName](1).value()[0];
|
||
};
|
||
});
|
||
arrayEach(["initial", "tail"], function(methodName, index2) {
|
||
var dropName = "drop" + (index2 ? "" : "Right");
|
||
LazyWrapper.prototype[methodName] = function() {
|
||
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
||
};
|
||
});
|
||
LazyWrapper.prototype.compact = function() {
|
||
return this.filter(identity);
|
||
};
|
||
LazyWrapper.prototype.find = function(predicate) {
|
||
return this.filter(predicate).head();
|
||
};
|
||
LazyWrapper.prototype.findLast = function(predicate) {
|
||
return this.reverse().find(predicate);
|
||
};
|
||
LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
|
||
if (typeof path == "function") {
|
||
return new LazyWrapper(this);
|
||
}
|
||
return this.map(function(value) {
|
||
return baseInvoke(value, path, args);
|
||
});
|
||
});
|
||
LazyWrapper.prototype.reject = function(predicate) {
|
||
return this.filter(negate(getIteratee(predicate)));
|
||
};
|
||
LazyWrapper.prototype.slice = function(start, end) {
|
||
start = toInteger(start);
|
||
var result2 = this;
|
||
if (result2.__filtered__ && (start > 0 || end < 0)) {
|
||
return new LazyWrapper(result2);
|
||
}
|
||
if (start < 0) {
|
||
result2 = result2.takeRight(-start);
|
||
} else if (start) {
|
||
result2 = result2.drop(start);
|
||
}
|
||
if (end !== undefined2) {
|
||
end = toInteger(end);
|
||
result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start);
|
||
}
|
||
return result2;
|
||
};
|
||
LazyWrapper.prototype.takeRightWhile = function(predicate) {
|
||
return this.reverse().takeWhile(predicate).reverse();
|
||
};
|
||
LazyWrapper.prototype.toArray = function() {
|
||
return this.take(MAX_ARRAY_LENGTH);
|
||
};
|
||
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
||
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
|
||
if (!lodashFunc) {
|
||
return;
|
||
}
|
||
lodash.prototype[methodName] = function() {
|
||
var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value);
|
||
var interceptor = function(value2) {
|
||
var result3 = lodashFunc.apply(lodash, arrayPush([value2], args));
|
||
return isTaker && chainAll ? result3[0] : result3;
|
||
};
|
||
if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
|
||
isLazy = useLazy = false;
|
||
}
|
||
var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
|
||
if (!retUnwrapped && useLazy) {
|
||
value = onlyLazy ? value : new LazyWrapper(this);
|
||
var result2 = func.apply(value, args);
|
||
result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined2 });
|
||
return new LodashWrapper(result2, chainAll);
|
||
}
|
||
if (isUnwrapped && onlyLazy) {
|
||
return func.apply(this, args);
|
||
}
|
||
result2 = this.thru(interceptor);
|
||
return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2;
|
||
};
|
||
});
|
||
arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
|
||
var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
|
||
lodash.prototype[methodName] = function() {
|
||
var args = arguments;
|
||
if (retUnwrapped && !this.__chain__) {
|
||
var value = this.value();
|
||
return func.apply(isArray(value) ? value : [], args);
|
||
}
|
||
return this[chainName](function(value2) {
|
||
return func.apply(isArray(value2) ? value2 : [], args);
|
||
});
|
||
};
|
||
});
|
||
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
||
var lodashFunc = lodash[methodName];
|
||
if (lodashFunc) {
|
||
var key2 = lodashFunc.name + "";
|
||
if (!hasOwnProperty.call(realNames, key2)) {
|
||
realNames[key2] = [];
|
||
}
|
||
realNames[key2].push({ "name": methodName, "func": lodashFunc });
|
||
}
|
||
});
|
||
realNames[createHybrid(undefined2, WRAP_BIND_KEY_FLAG).name] = [{
|
||
"name": "wrapper",
|
||
"func": undefined2
|
||
}];
|
||
LazyWrapper.prototype.clone = lazyClone;
|
||
LazyWrapper.prototype.reverse = lazyReverse;
|
||
LazyWrapper.prototype.value = lazyValue;
|
||
lodash.prototype.at = wrapperAt;
|
||
lodash.prototype.chain = wrapperChain;
|
||
lodash.prototype.commit = wrapperCommit;
|
||
lodash.prototype.next = wrapperNext;
|
||
lodash.prototype.plant = wrapperPlant;
|
||
lodash.prototype.reverse = wrapperReverse;
|
||
lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
|
||
lodash.prototype.first = lodash.prototype.head;
|
||
if (symIterator) {
|
||
lodash.prototype[symIterator] = wrapperToIterator;
|
||
}
|
||
return lodash;
|
||
};
|
||
var _2 = runInContext();
|
||
if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
|
||
root2._ = _2;
|
||
define(function() {
|
||
return _2;
|
||
});
|
||
} else if (freeModule) {
|
||
(freeModule.exports = _2)._ = _2;
|
||
freeExports._ = _2;
|
||
} else {
|
||
root2._ = _2;
|
||
}
|
||
}).call(exports);
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/util/assertString.js
|
||
var require_assertString = __commonJS({
|
||
"node_modules/validator/lib/util/assertString.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = assertString;
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
function assertString(input) {
|
||
var isString = typeof input === "string" || input instanceof String;
|
||
if (!isString) {
|
||
var invalidType = _typeof(input);
|
||
if (input === null)
|
||
invalidType = "null";
|
||
else if (invalidType === "object")
|
||
invalidType = input.constructor.name;
|
||
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
||
}
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/toDate.js
|
||
var require_toDate = __commonJS({
|
||
"node_modules/validator/lib/toDate.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = toDate;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function toDate(date) {
|
||
(0, _assertString.default)(date);
|
||
date = Date.parse(date);
|
||
return !isNaN(date) ? new Date(date) : null;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/alpha.js
|
||
var require_alpha = __commonJS({
|
||
"node_modules/validator/lib/alpha.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.farsiLocales = exports.englishLocales = exports.dotDecimal = exports.decimal = exports.commaDecimal = exports.bengaliLocales = exports.arabicLocales = exports.alphanumeric = exports.alpha = void 0;
|
||
var alpha = exports.alpha = {
|
||
"en-US": /^[A-Z]+$/i,
|
||
"az-AZ": /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
||
"bg-BG": /^[А-Я]+$/i,
|
||
"cs-CZ": /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
||
"da-DK": /^[A-ZÆØÅ]+$/i,
|
||
"de-DE": /^[A-ZÄÖÜß]+$/i,
|
||
"el-GR": /^[Α-ώ]+$/i,
|
||
"es-ES": /^[A-ZÁÉÍÑÓÚÜ]+$/i,
|
||
"fa-IR": /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,
|
||
"fi-FI": /^[A-ZÅÄÖ]+$/i,
|
||
"fr-FR": /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
||
"it-IT": /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
||
"ja-JP": /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
||
"nb-NO": /^[A-ZÆØÅ]+$/i,
|
||
"nl-NL": /^[A-ZÁÉËÏÓÖÜÚ]+$/i,
|
||
"nn-NO": /^[A-ZÆØÅ]+$/i,
|
||
"hu-HU": /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
||
"pl-PL": /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
||
"pt-PT": /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
||
"ru-RU": /^[А-ЯЁ]+$/i,
|
||
"kk-KZ": /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
|
||
"sl-SI": /^[A-ZČĆĐŠŽ]+$/i,
|
||
"sk-SK": /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
||
"sr-RS@latin": /^[A-ZČĆŽŠĐ]+$/i,
|
||
"sr-RS": /^[А-ЯЂЈЉЊЋЏ]+$/i,
|
||
"sv-SE": /^[A-ZÅÄÖ]+$/i,
|
||
"th-TH": /^[ก-๐\s]+$/i,
|
||
"tr-TR": /^[A-ZÇĞİıÖŞÜ]+$/i,
|
||
"uk-UA": /^[А-ЩЬЮЯЄIЇҐі]+$/i,
|
||
"vi-VN": /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
||
"ko-KR": /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
||
"ku-IQ": /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
||
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
||
he: /^[א-ת]+$/,
|
||
fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,
|
||
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
||
eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
|
||
"hi-IN": /^[\u0900-\u0961]+[\u0972-\u097F]*$/i,
|
||
"si-LK": /^[\u0D80-\u0DFF]+$/
|
||
};
|
||
var alphanumeric = exports.alphanumeric = {
|
||
"en-US": /^[0-9A-Z]+$/i,
|
||
"az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
||
"bg-BG": /^[0-9А-Я]+$/i,
|
||
"cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
||
"da-DK": /^[0-9A-ZÆØÅ]+$/i,
|
||
"de-DE": /^[0-9A-ZÄÖÜß]+$/i,
|
||
"el-GR": /^[0-9Α-ω]+$/i,
|
||
"es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
|
||
"fi-FI": /^[0-9A-ZÅÄÖ]+$/i,
|
||
"fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
||
"it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
||
"ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
||
"hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
||
"nb-NO": /^[0-9A-ZÆØÅ]+$/i,
|
||
"nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
|
||
"nn-NO": /^[0-9A-ZÆØÅ]+$/i,
|
||
"pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
||
"pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
||
"ru-RU": /^[0-9А-ЯЁ]+$/i,
|
||
"kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
|
||
"sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i,
|
||
"sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
||
"sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i,
|
||
"sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
|
||
"sv-SE": /^[0-9A-ZÅÄÖ]+$/i,
|
||
"th-TH": /^[ก-๙\s]+$/i,
|
||
"tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
|
||
"uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
|
||
"ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
||
"ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
||
"vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
||
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
||
he: /^[0-9א-ת]+$/,
|
||
fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
|
||
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
||
eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
|
||
"hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
|
||
"si-LK": /^[0-9\u0D80-\u0DFF]+$/
|
||
};
|
||
var decimal = exports.decimal = {
|
||
"en-US": ".",
|
||
ar: "\u066B"
|
||
};
|
||
var englishLocales = exports.englishLocales = ["AU", "GB", "HK", "IN", "NZ", "ZA", "ZM"];
|
||
for (i = 0; i < englishLocales.length; i++) {
|
||
locale = "en-".concat(englishLocales[i]);
|
||
alpha[locale] = alpha["en-US"];
|
||
alphanumeric[locale] = alphanumeric["en-US"];
|
||
decimal[locale] = decimal["en-US"];
|
||
}
|
||
var locale;
|
||
var i;
|
||
var arabicLocales = exports.arabicLocales = ["AE", "BH", "DZ", "EG", "IQ", "JO", "KW", "LB", "LY", "MA", "QM", "QA", "SA", "SD", "SY", "TN", "YE"];
|
||
for (_i = 0; _i < arabicLocales.length; _i++) {
|
||
_locale = "ar-".concat(arabicLocales[_i]);
|
||
alpha[_locale] = alpha.ar;
|
||
alphanumeric[_locale] = alphanumeric.ar;
|
||
decimal[_locale] = decimal.ar;
|
||
}
|
||
var _locale;
|
||
var _i;
|
||
var farsiLocales = exports.farsiLocales = ["IR", "AF"];
|
||
for (_i2 = 0; _i2 < farsiLocales.length; _i2++) {
|
||
_locale2 = "fa-".concat(farsiLocales[_i2]);
|
||
alphanumeric[_locale2] = alphanumeric.fa;
|
||
decimal[_locale2] = decimal.ar;
|
||
}
|
||
var _locale2;
|
||
var _i2;
|
||
var bengaliLocales = exports.bengaliLocales = ["BD", "IN"];
|
||
for (_i3 = 0; _i3 < bengaliLocales.length; _i3++) {
|
||
_locale3 = "bn-".concat(bengaliLocales[_i3]);
|
||
alpha[_locale3] = alpha.bn;
|
||
alphanumeric[_locale3] = alphanumeric.bn;
|
||
decimal[_locale3] = decimal["en-US"];
|
||
}
|
||
var _locale3;
|
||
var _i3;
|
||
var dotDecimal = exports.dotDecimal = ["ar-EG", "ar-LB", "ar-LY"];
|
||
var commaDecimal = exports.commaDecimal = ["bg-BG", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-ZM", "eo", "es-ES", "fr-CA", "fr-FR", "id-ID", "it-IT", "ku-IQ", "hi-IN", "hu-HU", "nb-NO", "nn-NO", "nl-NL", "pl-PL", "pt-PT", "ru-RU", "kk-KZ", "si-LK", "sl-SI", "sr-RS@latin", "sr-RS", "sv-SE", "tr-TR", "uk-UA", "vi-VN"];
|
||
for (_i4 = 0; _i4 < dotDecimal.length; _i4++) {
|
||
decimal[dotDecimal[_i4]] = decimal["en-US"];
|
||
}
|
||
var _i4;
|
||
for (_i5 = 0; _i5 < commaDecimal.length; _i5++) {
|
||
decimal[commaDecimal[_i5]] = ",";
|
||
}
|
||
var _i5;
|
||
alpha["fr-CA"] = alpha["fr-FR"];
|
||
alphanumeric["fr-CA"] = alphanumeric["fr-FR"];
|
||
alpha["pt-BR"] = alpha["pt-PT"];
|
||
alphanumeric["pt-BR"] = alphanumeric["pt-PT"];
|
||
decimal["pt-BR"] = decimal["pt-PT"];
|
||
alpha["pl-Pl"] = alpha["pl-PL"];
|
||
alphanumeric["pl-Pl"] = alphanumeric["pl-PL"];
|
||
decimal["pl-Pl"] = decimal["pl-PL"];
|
||
alpha["fa-AF"] = alpha.fa;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isFloat.js
|
||
var require_isFloat = __commonJS({
|
||
"node_modules/validator/lib/isFloat.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isFloat;
|
||
exports.locales = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _alpha = require_alpha();
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isFloat(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = options || {};
|
||
var float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? _alpha.decimal[options.locale] : ".", "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));
|
||
if (str === "" || str === "." || str === "," || str === "-" || str === "+") {
|
||
return false;
|
||
}
|
||
var value = parseFloat(str.replace(",", "."));
|
||
return float.test(str) && (!options.hasOwnProperty("min") || value >= options.min) && (!options.hasOwnProperty("max") || value <= options.max) && (!options.hasOwnProperty("lt") || value < options.lt) && (!options.hasOwnProperty("gt") || value > options.gt);
|
||
}
|
||
var locales = exports.locales = Object.keys(_alpha.decimal);
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/toFloat.js
|
||
var require_toFloat = __commonJS({
|
||
"node_modules/validator/lib/toFloat.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = toFloat;
|
||
var _isFloat = _interopRequireDefault(require_isFloat());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function toFloat(str) {
|
||
if (!(0, _isFloat.default)(str))
|
||
return NaN;
|
||
return parseFloat(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/toInt.js
|
||
var require_toInt = __commonJS({
|
||
"node_modules/validator/lib/toInt.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = toInt;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function toInt(str, radix) {
|
||
(0, _assertString.default)(str);
|
||
return parseInt(str, radix || 10);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/toBoolean.js
|
||
var require_toBoolean = __commonJS({
|
||
"node_modules/validator/lib/toBoolean.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = toBoolean;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function toBoolean(str, strict) {
|
||
(0, _assertString.default)(str);
|
||
if (strict) {
|
||
return str === "1" || /^true$/i.test(str);
|
||
}
|
||
return str !== "0" && !/^false$/i.test(str) && str !== "";
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/equals.js
|
||
var require_equals = __commonJS({
|
||
"node_modules/validator/lib/equals.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = equals;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function equals(str, comparison) {
|
||
(0, _assertString.default)(str);
|
||
return str === comparison;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/util/toString.js
|
||
var require_toString = __commonJS({
|
||
"node_modules/validator/lib/util/toString.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = toString2;
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
function toString2(input) {
|
||
if (_typeof(input) === "object" && input !== null) {
|
||
if (typeof input.toString === "function") {
|
||
input = input.toString();
|
||
} else {
|
||
input = "[object Object]";
|
||
}
|
||
} else if (input === null || typeof input === "undefined" || isNaN(input) && !input.length) {
|
||
input = "";
|
||
}
|
||
return String(input);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/util/merge.js
|
||
var require_merge = __commonJS({
|
||
"node_modules/validator/lib/util/merge.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = merge3;
|
||
function merge3() {
|
||
var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
||
var defaults = arguments.length > 1 ? arguments[1] : void 0;
|
||
for (var key2 in defaults) {
|
||
if (typeof obj[key2] === "undefined") {
|
||
obj[key2] = defaults[key2];
|
||
}
|
||
}
|
||
return obj;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/contains.js
|
||
var require_contains = __commonJS({
|
||
"node_modules/validator/lib/contains.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = contains;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _toString = _interopRequireDefault(require_toString());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var defaulContainsOptions = {
|
||
ignoreCase: false,
|
||
minOccurrences: 1
|
||
};
|
||
function contains(str, elem, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, defaulContainsOptions);
|
||
if (options.ignoreCase) {
|
||
return str.toLowerCase().split((0, _toString.default)(elem).toLowerCase()).length > options.minOccurrences;
|
||
}
|
||
return str.split((0, _toString.default)(elem)).length > options.minOccurrences;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/matches.js
|
||
var require_matches = __commonJS({
|
||
"node_modules/validator/lib/matches.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = matches;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function matches(str, pattern, modifiers) {
|
||
(0, _assertString.default)(str);
|
||
if (Object.prototype.toString.call(pattern) !== "[object RegExp]") {
|
||
pattern = new RegExp(pattern, modifiers);
|
||
}
|
||
return !!str.match(pattern);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isByteLength.js
|
||
var require_isByteLength = __commonJS({
|
||
"node_modules/validator/lib/isByteLength.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isByteLength;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
function isByteLength(str, options) {
|
||
(0, _assertString.default)(str);
|
||
var min;
|
||
var max;
|
||
if (_typeof(options) === "object") {
|
||
min = options.min || 0;
|
||
max = options.max;
|
||
} else {
|
||
min = arguments[1];
|
||
max = arguments[2];
|
||
}
|
||
var len = encodeURI(str).split(/%..|./).length - 1;
|
||
return len >= min && (typeof max === "undefined" || len <= max);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isFQDN.js
|
||
var require_isFQDN = __commonJS({
|
||
"node_modules/validator/lib/isFQDN.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isFQDN;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var default_fqdn_options = {
|
||
require_tld: true,
|
||
allow_underscores: false,
|
||
allow_trailing_dot: false,
|
||
allow_numeric_tld: false,
|
||
allow_wildcard: false,
|
||
ignore_max_length: false
|
||
};
|
||
function isFQDN(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, default_fqdn_options);
|
||
if (options.allow_trailing_dot && str[str.length - 1] === ".") {
|
||
str = str.substring(0, str.length - 1);
|
||
}
|
||
if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
|
||
str = str.substring(2);
|
||
}
|
||
var parts = str.split(".");
|
||
var tld = parts[parts.length - 1];
|
||
if (options.require_tld) {
|
||
if (parts.length < 2) {
|
||
return false;
|
||
}
|
||
if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
|
||
return false;
|
||
}
|
||
if (/\s/.test(tld)) {
|
||
return false;
|
||
}
|
||
}
|
||
if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
|
||
return false;
|
||
}
|
||
return parts.every(function(part) {
|
||
if (part.length > 63 && !options.ignore_max_length) {
|
||
return false;
|
||
}
|
||
if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
|
||
return false;
|
||
}
|
||
if (/[\uff01-\uff5e]/.test(part)) {
|
||
return false;
|
||
}
|
||
if (/^-|-$/.test(part)) {
|
||
return false;
|
||
}
|
||
if (!options.allow_underscores && /_/.test(part)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
});
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isIP.js
|
||
var require_isIP = __commonJS({
|
||
"node_modules/validator/lib/isIP.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isIP;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
|
||
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
||
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
||
var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
|
||
var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$");
|
||
function isIP(str) {
|
||
var version = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
||
(0, _assertString.default)(str);
|
||
version = String(version);
|
||
if (!version) {
|
||
return isIP(str, 4) || isIP(str, 6);
|
||
}
|
||
if (version === "4") {
|
||
return IPv4AddressRegExp.test(str);
|
||
}
|
||
if (version === "6") {
|
||
return IPv6AddressRegExp.test(str);
|
||
}
|
||
return false;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isEmail.js
|
||
var require_isEmail = __commonJS({
|
||
"node_modules/validator/lib/isEmail.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isEmail;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isByteLength = _interopRequireDefault(require_isByteLength());
|
||
var _isFQDN = _interopRequireDefault(require_isFQDN());
|
||
var _isIP = _interopRequireDefault(require_isIP());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var default_email_options = {
|
||
allow_display_name: false,
|
||
allow_underscores: false,
|
||
require_display_name: false,
|
||
allow_utf8_local_part: true,
|
||
require_tld: true,
|
||
blacklisted_chars: "",
|
||
ignore_max_length: false,
|
||
host_blacklist: [],
|
||
host_whitelist: []
|
||
};
|
||
var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)</i;
|
||
var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i;
|
||
var gmailUserPart = /^[a-z\d]+$/;
|
||
var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i;
|
||
var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
|
||
var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;
|
||
var defaultMaxEmailLength = 254;
|
||
function validateDisplayName(display_name) {
|
||
var display_name_without_quotes = display_name.replace(/^"(.+)"$/, "$1");
|
||
if (!display_name_without_quotes.trim()) {
|
||
return false;
|
||
}
|
||
var contains_illegal = /[\.";<>]/.test(display_name_without_quotes);
|
||
if (contains_illegal) {
|
||
if (display_name_without_quotes === display_name) {
|
||
return false;
|
||
}
|
||
var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length;
|
||
if (!all_start_with_back_slash) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function isEmail(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, default_email_options);
|
||
if (options.require_display_name || options.allow_display_name) {
|
||
var display_email = str.match(splitNameAddress);
|
||
if (display_email) {
|
||
var display_name = display_email[1];
|
||
str = str.replace(display_name, "").replace(/(^<|>$)/g, "");
|
||
if (display_name.endsWith(" ")) {
|
||
display_name = display_name.slice(0, -1);
|
||
}
|
||
if (!validateDisplayName(display_name)) {
|
||
return false;
|
||
}
|
||
} else if (options.require_display_name) {
|
||
return false;
|
||
}
|
||
}
|
||
if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {
|
||
return false;
|
||
}
|
||
var parts = str.split("@");
|
||
var domain = parts.pop();
|
||
var lower_domain = domain.toLowerCase();
|
||
if (options.host_blacklist.includes(lower_domain)) {
|
||
return false;
|
||
}
|
||
if (options.host_whitelist.length > 0 && !options.host_whitelist.includes(lower_domain)) {
|
||
return false;
|
||
}
|
||
var user = parts.join("@");
|
||
if (options.domain_specific_validation && (lower_domain === "gmail.com" || lower_domain === "googlemail.com")) {
|
||
user = user.toLowerCase();
|
||
var username = user.split("+")[0];
|
||
if (!(0, _isByteLength.default)(username.replace(/\./g, ""), {
|
||
min: 6,
|
||
max: 30
|
||
})) {
|
||
return false;
|
||
}
|
||
var _user_parts = username.split(".");
|
||
for (var i = 0; i < _user_parts.length; i++) {
|
||
if (!gmailUserPart.test(_user_parts[i])) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
if (options.ignore_max_length === false && (!(0, _isByteLength.default)(user, {
|
||
max: 64
|
||
}) || !(0, _isByteLength.default)(domain, {
|
||
max: 254
|
||
}))) {
|
||
return false;
|
||
}
|
||
if (!(0, _isFQDN.default)(domain, {
|
||
require_tld: options.require_tld,
|
||
ignore_max_length: options.ignore_max_length,
|
||
allow_underscores: options.allow_underscores
|
||
})) {
|
||
if (!options.allow_ip_domain) {
|
||
return false;
|
||
}
|
||
if (!(0, _isIP.default)(domain)) {
|
||
if (!domain.startsWith("[") || !domain.endsWith("]")) {
|
||
return false;
|
||
}
|
||
var noBracketdomain = domain.slice(1, -1);
|
||
if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
if (user[0] === '"') {
|
||
user = user.slice(1, user.length - 1);
|
||
return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);
|
||
}
|
||
var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
|
||
var user_parts = user.split(".");
|
||
for (var _i = 0; _i < user_parts.length; _i++) {
|
||
if (!pattern.test(user_parts[_i])) {
|
||
return false;
|
||
}
|
||
}
|
||
if (options.blacklisted_chars) {
|
||
if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), "g")) !== -1)
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isURL.js
|
||
var require_isURL = __commonJS({
|
||
"node_modules/validator/lib/isURL.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isURL;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isFQDN = _interopRequireDefault(require_isFQDN());
|
||
var _isIP = _interopRequireDefault(require_isIP());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _slicedToArray(arr, i) {
|
||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
||
}
|
||
function _nonIterableRest() {
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
function _unsupportedIterableToArray(o, minLen) {
|
||
if (!o)
|
||
return;
|
||
if (typeof o === "string")
|
||
return _arrayLikeToArray(o, minLen);
|
||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||
if (n === "Object" && o.constructor)
|
||
n = o.constructor.name;
|
||
if (n === "Map" || n === "Set")
|
||
return Array.from(o);
|
||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
||
return _arrayLikeToArray(o, minLen);
|
||
}
|
||
function _arrayLikeToArray(arr, len) {
|
||
if (len == null || len > arr.length)
|
||
len = arr.length;
|
||
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
||
arr2[i] = arr[i];
|
||
return arr2;
|
||
}
|
||
function _iterableToArrayLimit(r, l) {
|
||
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
||
if (null != t) {
|
||
var e, n, i, u, a = [], f = true, o = false;
|
||
try {
|
||
if (i = (t = t.call(r)).next, 0 === l) {
|
||
if (Object(t) !== t)
|
||
return;
|
||
f = false;
|
||
} else
|
||
for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true)
|
||
;
|
||
} catch (r2) {
|
||
o = true, n = r2;
|
||
} finally {
|
||
try {
|
||
if (!f && null != t.return && (u = t.return(), Object(u) !== u))
|
||
return;
|
||
} finally {
|
||
if (o)
|
||
throw n;
|
||
}
|
||
}
|
||
return a;
|
||
}
|
||
}
|
||
function _arrayWithHoles(arr) {
|
||
if (Array.isArray(arr))
|
||
return arr;
|
||
}
|
||
var default_url_options = {
|
||
protocols: ["http", "https", "ftp"],
|
||
require_tld: true,
|
||
require_protocol: false,
|
||
require_host: true,
|
||
require_port: false,
|
||
require_valid_protocol: true,
|
||
allow_underscores: false,
|
||
allow_trailing_dot: false,
|
||
allow_protocol_relative_urls: false,
|
||
allow_fragments: true,
|
||
allow_query_components: true,
|
||
validate_length: true
|
||
};
|
||
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
||
function isRegExp(obj) {
|
||
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
||
}
|
||
function checkHost(host, matches) {
|
||
for (var i = 0; i < matches.length; i++) {
|
||
var match = matches[i];
|
||
if (host === match || isRegExp(match) && match.test(host)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function isURL(url, options) {
|
||
(0, _assertString.default)(url);
|
||
if (!url || /[\s<>]/.test(url)) {
|
||
return false;
|
||
}
|
||
if (url.indexOf("mailto:") === 0) {
|
||
return false;
|
||
}
|
||
options = (0, _merge.default)(options, default_url_options);
|
||
if (options.validate_length && url.length >= 2083) {
|
||
return false;
|
||
}
|
||
if (!options.allow_fragments && url.includes("#")) {
|
||
return false;
|
||
}
|
||
if (!options.allow_query_components && (url.includes("?") || url.includes("&"))) {
|
||
return false;
|
||
}
|
||
var protocol, auth, host, hostname, port, port_str, split, ipv6;
|
||
split = url.split("#");
|
||
url = split.shift();
|
||
split = url.split("?");
|
||
url = split.shift();
|
||
split = url.split("://");
|
||
if (split.length > 1) {
|
||
protocol = split.shift().toLowerCase();
|
||
if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
|
||
return false;
|
||
}
|
||
} else if (options.require_protocol) {
|
||
return false;
|
||
} else if (url.slice(0, 2) === "//") {
|
||
if (!options.allow_protocol_relative_urls) {
|
||
return false;
|
||
}
|
||
split[0] = url.slice(2);
|
||
}
|
||
url = split.join("://");
|
||
if (url === "") {
|
||
return false;
|
||
}
|
||
split = url.split("/");
|
||
url = split.shift();
|
||
if (url === "" && !options.require_host) {
|
||
return true;
|
||
}
|
||
split = url.split("@");
|
||
if (split.length > 1) {
|
||
if (options.disallow_auth) {
|
||
return false;
|
||
}
|
||
if (split[0] === "") {
|
||
return false;
|
||
}
|
||
auth = split.shift();
|
||
if (auth.indexOf(":") >= 0 && auth.split(":").length > 2) {
|
||
return false;
|
||
}
|
||
var _auth$split = auth.split(":"), _auth$split2 = _slicedToArray(_auth$split, 2), user = _auth$split2[0], password = _auth$split2[1];
|
||
if (user === "" && password === "") {
|
||
return false;
|
||
}
|
||
}
|
||
hostname = split.join("@");
|
||
port_str = null;
|
||
ipv6 = null;
|
||
var ipv6_match = hostname.match(wrapped_ipv6);
|
||
if (ipv6_match) {
|
||
host = "";
|
||
ipv6 = ipv6_match[1];
|
||
port_str = ipv6_match[2] || null;
|
||
} else {
|
||
split = hostname.split(":");
|
||
host = split.shift();
|
||
if (split.length) {
|
||
port_str = split.join(":");
|
||
}
|
||
}
|
||
if (port_str !== null && port_str.length > 0) {
|
||
port = parseInt(port_str, 10);
|
||
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
||
return false;
|
||
}
|
||
} else if (options.require_port) {
|
||
return false;
|
||
}
|
||
if (options.host_whitelist) {
|
||
return checkHost(host, options.host_whitelist);
|
||
}
|
||
if (host === "" && !options.require_host) {
|
||
return true;
|
||
}
|
||
if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {
|
||
return false;
|
||
}
|
||
host = host || ipv6;
|
||
if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMACAddress.js
|
||
var require_isMACAddress = __commonJS({
|
||
"node_modules/validator/lib/isMACAddress.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMACAddress;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/;
|
||
var macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/;
|
||
var macAddress48WithDots = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/;
|
||
var macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/;
|
||
var macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/;
|
||
var macAddress64WithDots = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;
|
||
function isMACAddress(str, options) {
|
||
(0, _assertString.default)(str);
|
||
if (options !== null && options !== void 0 && options.eui) {
|
||
options.eui = String(options.eui);
|
||
}
|
||
if (options !== null && options !== void 0 && options.no_colons || options !== null && options !== void 0 && options.no_separators) {
|
||
if (options.eui === "48") {
|
||
return macAddress48NoSeparators.test(str);
|
||
}
|
||
if (options.eui === "64") {
|
||
return macAddress64NoSeparators.test(str);
|
||
}
|
||
return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str);
|
||
}
|
||
if ((options === null || options === void 0 ? void 0 : options.eui) === "48") {
|
||
return macAddress48.test(str) || macAddress48WithDots.test(str);
|
||
}
|
||
if ((options === null || options === void 0 ? void 0 : options.eui) === "64") {
|
||
return macAddress64.test(str) || macAddress64WithDots.test(str);
|
||
}
|
||
return isMACAddress(str, {
|
||
eui: "48"
|
||
}) || isMACAddress(str, {
|
||
eui: "64"
|
||
});
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isIPRange.js
|
||
var require_isIPRange = __commonJS({
|
||
"node_modules/validator/lib/isIPRange.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isIPRange;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isIP = _interopRequireDefault(require_isIP());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var subnetMaybe = /^\d{1,3}$/;
|
||
var v4Subnet = 32;
|
||
var v6Subnet = 128;
|
||
function isIPRange(str) {
|
||
var version = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
||
(0, _assertString.default)(str);
|
||
var parts = str.split("/");
|
||
if (parts.length !== 2) {
|
||
return false;
|
||
}
|
||
if (!subnetMaybe.test(parts[1])) {
|
||
return false;
|
||
}
|
||
if (parts[1].length > 1 && parts[1].startsWith("0")) {
|
||
return false;
|
||
}
|
||
var isValidIP = (0, _isIP.default)(parts[0], version);
|
||
if (!isValidIP) {
|
||
return false;
|
||
}
|
||
var expectedSubnet = null;
|
||
switch (String(version)) {
|
||
case "4":
|
||
expectedSubnet = v4Subnet;
|
||
break;
|
||
case "6":
|
||
expectedSubnet = v6Subnet;
|
||
break;
|
||
default:
|
||
expectedSubnet = (0, _isIP.default)(parts[0], "6") ? v6Subnet : v4Subnet;
|
||
}
|
||
return parts[1] <= expectedSubnet && parts[1] >= 0;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isDate.js
|
||
var require_isDate = __commonJS({
|
||
"node_modules/validator/lib/isDate.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isDate;
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _slicedToArray(arr, i) {
|
||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
||
}
|
||
function _nonIterableRest() {
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
function _iterableToArrayLimit(r, l) {
|
||
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
||
if (null != t) {
|
||
var e, n, i, u, a = [], f = true, o = false;
|
||
try {
|
||
if (i = (t = t.call(r)).next, 0 === l) {
|
||
if (Object(t) !== t)
|
||
return;
|
||
f = false;
|
||
} else
|
||
for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true)
|
||
;
|
||
} catch (r2) {
|
||
o = true, n = r2;
|
||
} finally {
|
||
try {
|
||
if (!f && null != t.return && (u = t.return(), Object(u) !== u))
|
||
return;
|
||
} finally {
|
||
if (o)
|
||
throw n;
|
||
}
|
||
}
|
||
return a;
|
||
}
|
||
}
|
||
function _arrayWithHoles(arr) {
|
||
if (Array.isArray(arr))
|
||
return arr;
|
||
}
|
||
function _createForOfIteratorHelper(o, allowArrayLike) {
|
||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
||
if (!it) {
|
||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
||
if (it)
|
||
o = it;
|
||
var i = 0;
|
||
var F = function F2() {
|
||
};
|
||
return { s: F, n: function n() {
|
||
if (i >= o.length)
|
||
return { done: true };
|
||
return { done: false, value: o[i++] };
|
||
}, e: function e(_e) {
|
||
throw _e;
|
||
}, f: F };
|
||
}
|
||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
var normalCompletion = true, didErr = false, err;
|
||
return { s: function s2() {
|
||
it = it.call(o);
|
||
}, n: function n() {
|
||
var step = it.next();
|
||
normalCompletion = step.done;
|
||
return step;
|
||
}, e: function e(_e2) {
|
||
didErr = true;
|
||
err = _e2;
|
||
}, f: function f() {
|
||
try {
|
||
if (!normalCompletion && it.return != null)
|
||
it.return();
|
||
} finally {
|
||
if (didErr)
|
||
throw err;
|
||
}
|
||
} };
|
||
}
|
||
function _unsupportedIterableToArray(o, minLen) {
|
||
if (!o)
|
||
return;
|
||
if (typeof o === "string")
|
||
return _arrayLikeToArray(o, minLen);
|
||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||
if (n === "Object" && o.constructor)
|
||
n = o.constructor.name;
|
||
if (n === "Map" || n === "Set")
|
||
return Array.from(o);
|
||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
||
return _arrayLikeToArray(o, minLen);
|
||
}
|
||
function _arrayLikeToArray(arr, len) {
|
||
if (len == null || len > arr.length)
|
||
len = arr.length;
|
||
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
||
arr2[i] = arr[i];
|
||
return arr2;
|
||
}
|
||
var default_date_options = {
|
||
format: "YYYY/MM/DD",
|
||
delimiters: ["/", "-"],
|
||
strictMode: false
|
||
};
|
||
function isValidFormat(format) {
|
||
return /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(format);
|
||
}
|
||
function zip(date, format) {
|
||
var zippedArr = [], len = Math.min(date.length, format.length);
|
||
for (var i = 0; i < len; i++) {
|
||
zippedArr.push([date[i], format[i]]);
|
||
}
|
||
return zippedArr;
|
||
}
|
||
function isDate(input, options) {
|
||
if (typeof options === "string") {
|
||
options = (0, _merge.default)({
|
||
format: options
|
||
}, default_date_options);
|
||
} else {
|
||
options = (0, _merge.default)(options, default_date_options);
|
||
}
|
||
if (typeof input === "string" && isValidFormat(options.format)) {
|
||
var formatDelimiter = options.delimiters.find(function(delimiter) {
|
||
return options.format.indexOf(delimiter) !== -1;
|
||
});
|
||
var dateDelimiter = options.strictMode ? formatDelimiter : options.delimiters.find(function(delimiter) {
|
||
return input.indexOf(delimiter) !== -1;
|
||
});
|
||
var dateAndFormat = zip(input.split(dateDelimiter), options.format.toLowerCase().split(formatDelimiter));
|
||
var dateObj = {};
|
||
var _iterator = _createForOfIteratorHelper(dateAndFormat), _step;
|
||
try {
|
||
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
|
||
var _step$value = _slicedToArray(_step.value, 2), dateWord = _step$value[0], formatWord = _step$value[1];
|
||
if (dateWord.length !== formatWord.length) {
|
||
return false;
|
||
}
|
||
dateObj[formatWord.charAt(0)] = dateWord;
|
||
}
|
||
} catch (err) {
|
||
_iterator.e(err);
|
||
} finally {
|
||
_iterator.f();
|
||
}
|
||
var fullYear = dateObj.y;
|
||
if (fullYear.startsWith("-")) {
|
||
return false;
|
||
}
|
||
if (dateObj.y.length === 2) {
|
||
var parsedYear = parseInt(dateObj.y, 10);
|
||
if (isNaN(parsedYear)) {
|
||
return false;
|
||
}
|
||
var currentYearLastTwoDigits = new Date().getFullYear() % 100;
|
||
if (parsedYear < currentYearLastTwoDigits) {
|
||
fullYear = "20".concat(dateObj.y);
|
||
} else {
|
||
fullYear = "19".concat(dateObj.y);
|
||
}
|
||
}
|
||
var month = dateObj.m;
|
||
if (dateObj.m.length === 1) {
|
||
month = "0".concat(dateObj.m);
|
||
}
|
||
var day = dateObj.d;
|
||
if (dateObj.d.length === 1) {
|
||
day = "0".concat(dateObj.d);
|
||
}
|
||
return new Date("".concat(fullYear, "-").concat(month, "-").concat(day, "T00:00:00.000Z")).getUTCDate() === +dateObj.d;
|
||
}
|
||
if (!options.strictMode) {
|
||
return Object.prototype.toString.call(input) === "[object Date]" && isFinite(input);
|
||
}
|
||
return false;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isTime.js
|
||
var require_isTime = __commonJS({
|
||
"node_modules/validator/lib/isTime.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isTime;
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var default_time_options = {
|
||
hourFormat: "hour24",
|
||
mode: "default"
|
||
};
|
||
var formats = {
|
||
hour24: {
|
||
default: /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,
|
||
withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/
|
||
},
|
||
hour12: {
|
||
default: /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,
|
||
withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/
|
||
}
|
||
};
|
||
function isTime(input, options) {
|
||
options = (0, _merge.default)(options, default_time_options);
|
||
if (typeof input !== "string")
|
||
return false;
|
||
return formats[options.hourFormat][options.mode].test(input);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isBoolean.js
|
||
var require_isBoolean = __commonJS({
|
||
"node_modules/validator/lib/isBoolean.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isBoolean;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var defaultOptions = {
|
||
loose: false
|
||
};
|
||
var strictBooleans = ["true", "false", "1", "0"];
|
||
var looseBooleans = [].concat(strictBooleans, ["yes", "no"]);
|
||
function isBoolean(str) {
|
||
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultOptions;
|
||
(0, _assertString.default)(str);
|
||
if (options.loose) {
|
||
return looseBooleans.includes(str.toLowerCase());
|
||
}
|
||
return strictBooleans.includes(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isLocale.js
|
||
var require_isLocale = __commonJS({
|
||
"node_modules/validator/lib/isLocale.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isLocale;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var extlang = "([A-Za-z]{3}(-[A-Za-z]{3}){0,2})";
|
||
var language = "(([a-zA-Z]{2,3}(-".concat(extlang, ")?)|([a-zA-Z]{5,8}))");
|
||
var script = "([A-Za-z]{4})";
|
||
var region = "([A-Za-z]{2}|\\d{3})";
|
||
var variant = "([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))";
|
||
var singleton = "(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])";
|
||
var extension = "(".concat(singleton, "(-[A-Za-z0-9]{2,8})+)");
|
||
var privateuse = "(x(-[A-Za-z0-9]{1,8})+)";
|
||
var irregular = "((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))";
|
||
var regular = "((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))";
|
||
var grandfathered = "(".concat(irregular, "|").concat(regular, ")");
|
||
var delimiter = "(-|_)";
|
||
var langtag = "".concat(language, "(").concat(delimiter).concat(script, ")?(").concat(delimiter).concat(region, ")?(").concat(delimiter).concat(variant, ")*(").concat(delimiter).concat(extension, ")*(").concat(delimiter).concat(privateuse, ")?");
|
||
var languageTagRegex = new RegExp("(^".concat(privateuse, "$)|(^").concat(grandfathered, "$)|(^").concat(langtag, "$)"));
|
||
function isLocale(str) {
|
||
(0, _assertString.default)(str);
|
||
return languageTagRegex.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isAbaRouting.js
|
||
var require_isAbaRouting = __commonJS({
|
||
"node_modules/validator/lib/isAbaRouting.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isAbaRouting;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var isRoutingReg = /^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;
|
||
function isAbaRouting(str) {
|
||
(0, _assertString.default)(str);
|
||
if (!isRoutingReg.test(str))
|
||
return false;
|
||
var checkSumVal = 0;
|
||
for (var i = 0; i < str.length; i++) {
|
||
if (i % 3 === 0)
|
||
checkSumVal += str[i] * 3;
|
||
else if (i % 3 === 1)
|
||
checkSumVal += str[i] * 7;
|
||
else
|
||
checkSumVal += str[i] * 1;
|
||
}
|
||
return checkSumVal % 10 === 0;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isAlpha.js
|
||
var require_isAlpha = __commonJS({
|
||
"node_modules/validator/lib/isAlpha.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isAlpha;
|
||
exports.locales = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _alpha = require_alpha();
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isAlpha(_str) {
|
||
var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
|
||
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
||
(0, _assertString.default)(_str);
|
||
var str = _str;
|
||
var ignore = options.ignore;
|
||
if (ignore) {
|
||
if (ignore instanceof RegExp) {
|
||
str = str.replace(ignore, "");
|
||
} else if (typeof ignore === "string") {
|
||
str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), "");
|
||
} else {
|
||
throw new Error("ignore should be instance of a String or RegExp");
|
||
}
|
||
}
|
||
if (locale in _alpha.alpha) {
|
||
return _alpha.alpha[locale].test(str);
|
||
}
|
||
throw new Error("Invalid locale '".concat(locale, "'"));
|
||
}
|
||
var locales = exports.locales = Object.keys(_alpha.alpha);
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isAlphanumeric.js
|
||
var require_isAlphanumeric = __commonJS({
|
||
"node_modules/validator/lib/isAlphanumeric.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isAlphanumeric;
|
||
exports.locales = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _alpha = require_alpha();
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isAlphanumeric(_str) {
|
||
var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
|
||
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
||
(0, _assertString.default)(_str);
|
||
var str = _str;
|
||
var ignore = options.ignore;
|
||
if (ignore) {
|
||
if (ignore instanceof RegExp) {
|
||
str = str.replace(ignore, "");
|
||
} else if (typeof ignore === "string") {
|
||
str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), "");
|
||
} else {
|
||
throw new Error("ignore should be instance of a String or RegExp");
|
||
}
|
||
}
|
||
if (locale in _alpha.alphanumeric) {
|
||
return _alpha.alphanumeric[locale].test(str);
|
||
}
|
||
throw new Error("Invalid locale '".concat(locale, "'"));
|
||
}
|
||
var locales = exports.locales = Object.keys(_alpha.alphanumeric);
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isNumeric.js
|
||
var require_isNumeric = __commonJS({
|
||
"node_modules/validator/lib/isNumeric.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isNumeric;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _alpha = require_alpha();
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var numericNoSymbols = /^[0-9]+$/;
|
||
function isNumeric(str, options) {
|
||
(0, _assertString.default)(str);
|
||
if (options && options.no_symbols) {
|
||
return numericNoSymbols.test(str);
|
||
}
|
||
return new RegExp("^[+-]?([0-9]*[".concat((options || {}).locale ? _alpha.decimal[options.locale] : ".", "])?[0-9]+$")).test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isPassportNumber.js
|
||
var require_isPassportNumber = __commonJS({
|
||
"node_modules/validator/lib/isPassportNumber.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isPassportNumber;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var passportRegexByCountryCode = {
|
||
AM: /^[A-Z]{2}\d{7}$/,
|
||
// ARMENIA
|
||
AR: /^[A-Z]{3}\d{6}$/,
|
||
// ARGENTINA
|
||
AT: /^[A-Z]\d{7}$/,
|
||
// AUSTRIA
|
||
AU: /^[A-Z]\d{7}$/,
|
||
// AUSTRALIA
|
||
AZ: /^[A-Z]{1}\d{8}$/,
|
||
// AZERBAIJAN
|
||
BE: /^[A-Z]{2}\d{6}$/,
|
||
// BELGIUM
|
||
BG: /^\d{9}$/,
|
||
// BULGARIA
|
||
BR: /^[A-Z]{2}\d{6}$/,
|
||
// BRAZIL
|
||
BY: /^[A-Z]{2}\d{7}$/,
|
||
// BELARUS
|
||
CA: /^[A-Z]{2}\d{6}$/,
|
||
// CANADA
|
||
CH: /^[A-Z]\d{7}$/,
|
||
// SWITZERLAND
|
||
CN: /^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,
|
||
// CHINA [G=Ordinary, E=Electronic] followed by 8-digits, or E followed by any UPPERCASE letter (except I and O) followed by 7 digits
|
||
CY: /^[A-Z](\d{6}|\d{8})$/,
|
||
// CYPRUS
|
||
CZ: /^\d{8}$/,
|
||
// CZECH REPUBLIC
|
||
DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,
|
||
// GERMANY
|
||
DK: /^\d{9}$/,
|
||
// DENMARK
|
||
DZ: /^\d{9}$/,
|
||
// ALGERIA
|
||
EE: /^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,
|
||
// ESTONIA (K followed by 7-digits), e-passports have 2 UPPERCASE followed by 7 digits
|
||
ES: /^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,
|
||
// SPAIN
|
||
FI: /^[A-Z]{2}\d{7}$/,
|
||
// FINLAND
|
||
FR: /^\d{2}[A-Z]{2}\d{5}$/,
|
||
// FRANCE
|
||
GB: /^\d{9}$/,
|
||
// UNITED KINGDOM
|
||
GR: /^[A-Z]{2}\d{7}$/,
|
||
// GREECE
|
||
HR: /^\d{9}$/,
|
||
// CROATIA
|
||
HU: /^[A-Z]{2}(\d{6}|\d{7})$/,
|
||
// HUNGARY
|
||
IE: /^[A-Z0-9]{2}\d{7}$/,
|
||
// IRELAND
|
||
IN: /^[A-Z]{1}-?\d{7}$/,
|
||
// INDIA
|
||
ID: /^[A-C]\d{7}$/,
|
||
// INDONESIA
|
||
IR: /^[A-Z]\d{8}$/,
|
||
// IRAN
|
||
IS: /^(A)\d{7}$/,
|
||
// ICELAND
|
||
IT: /^[A-Z0-9]{2}\d{7}$/,
|
||
// ITALY
|
||
JM: /^[Aa]\d{7}$/,
|
||
// JAMAICA
|
||
JP: /^[A-Z]{2}\d{7}$/,
|
||
// JAPAN
|
||
KR: /^[MS]\d{8}$/,
|
||
// SOUTH KOREA, REPUBLIC OF KOREA, [S=PS Passports, M=PM Passports]
|
||
KZ: /^[a-zA-Z]\d{7}$/,
|
||
// KAZAKHSTAN
|
||
LI: /^[a-zA-Z]\d{5}$/,
|
||
// LIECHTENSTEIN
|
||
LT: /^[A-Z0-9]{8}$/,
|
||
// LITHUANIA
|
||
LU: /^[A-Z0-9]{8}$/,
|
||
// LUXEMBURG
|
||
LV: /^[A-Z0-9]{2}\d{7}$/,
|
||
// LATVIA
|
||
LY: /^[A-Z0-9]{8}$/,
|
||
// LIBYA
|
||
MT: /^\d{7}$/,
|
||
// MALTA
|
||
MZ: /^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,
|
||
// MOZAMBIQUE
|
||
MY: /^[AHK]\d{8}$/,
|
||
// MALAYSIA
|
||
MX: /^\d{10,11}$/,
|
||
// MEXICO
|
||
NL: /^[A-Z]{2}[A-Z0-9]{6}\d$/,
|
||
// NETHERLANDS
|
||
NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,
|
||
// NEW ZEALAND
|
||
PH: /^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,
|
||
// PHILIPPINES
|
||
PK: /^[A-Z]{2}\d{7}$/,
|
||
// PAKISTAN
|
||
PL: /^[A-Z]{2}\d{7}$/,
|
||
// POLAND
|
||
PT: /^[A-Z]\d{6}$/,
|
||
// PORTUGAL
|
||
RO: /^\d{8,9}$/,
|
||
// ROMANIA
|
||
RU: /^\d{9}$/,
|
||
// RUSSIAN FEDERATION
|
||
SE: /^\d{8}$/,
|
||
// SWEDEN
|
||
SL: /^(P)[A-Z]\d{7}$/,
|
||
// SLOVENIA
|
||
SK: /^[0-9A-Z]\d{7}$/,
|
||
// SLOVAKIA
|
||
TH: /^[A-Z]{1,2}\d{6,7}$/,
|
||
// THAILAND
|
||
TR: /^[A-Z]\d{8}$/,
|
||
// TURKEY
|
||
UA: /^[A-Z]{2}\d{6}$/,
|
||
// UKRAINE
|
||
US: /^\d{9}$/,
|
||
// UNITED STATES
|
||
ZA: /^[TAMD]\d{8}$/
|
||
// SOUTH AFRICA
|
||
};
|
||
function isPassportNumber(str, countryCode) {
|
||
(0, _assertString.default)(str);
|
||
var normalizedStr = str.replace(/\s/g, "").toUpperCase();
|
||
return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isInt.js
|
||
var require_isInt = __commonJS({
|
||
"node_modules/validator/lib/isInt.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isInt;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/;
|
||
var intLeadingZeroes = /^[-+]?[0-9]+$/;
|
||
function isInt(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = options || {};
|
||
var regex = options.allow_leading_zeroes === false ? int : intLeadingZeroes;
|
||
var minCheckPassed = !options.hasOwnProperty("min") || str >= options.min;
|
||
var maxCheckPassed = !options.hasOwnProperty("max") || str <= options.max;
|
||
var ltCheckPassed = !options.hasOwnProperty("lt") || str < options.lt;
|
||
var gtCheckPassed = !options.hasOwnProperty("gt") || str > options.gt;
|
||
return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isPort.js
|
||
var require_isPort = __commonJS({
|
||
"node_modules/validator/lib/isPort.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isPort;
|
||
var _isInt = _interopRequireDefault(require_isInt());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isPort(str) {
|
||
return (0, _isInt.default)(str, {
|
||
allow_leading_zeroes: false,
|
||
min: 0,
|
||
max: 65535
|
||
});
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isLowercase.js
|
||
var require_isLowercase = __commonJS({
|
||
"node_modules/validator/lib/isLowercase.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isLowercase;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isLowercase(str) {
|
||
(0, _assertString.default)(str);
|
||
return str === str.toLowerCase();
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isUppercase.js
|
||
var require_isUppercase = __commonJS({
|
||
"node_modules/validator/lib/isUppercase.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isUppercase;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isUppercase(str) {
|
||
(0, _assertString.default)(str);
|
||
return str === str.toUpperCase();
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isIMEI.js
|
||
var require_isIMEI = __commonJS({
|
||
"node_modules/validator/lib/isIMEI.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isIMEI;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var imeiRegexWithoutHypens = /^[0-9]{15}$/;
|
||
var imeiRegexWithHypens = /^\d{2}-\d{6}-\d{6}-\d{1}$/;
|
||
function isIMEI(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = options || {};
|
||
var imeiRegex = imeiRegexWithoutHypens;
|
||
if (options.allow_hyphens) {
|
||
imeiRegex = imeiRegexWithHypens;
|
||
}
|
||
if (!imeiRegex.test(str)) {
|
||
return false;
|
||
}
|
||
str = str.replace(/-/g, "");
|
||
var sum = 0, mul = 2, l = 14;
|
||
for (var i = 0; i < l; i++) {
|
||
var digit = str.substring(l - i - 1, l - i);
|
||
var tp = parseInt(digit, 10) * mul;
|
||
if (tp >= 10) {
|
||
sum += tp % 10 + 1;
|
||
} else {
|
||
sum += tp;
|
||
}
|
||
if (mul === 1) {
|
||
mul += 1;
|
||
} else {
|
||
mul -= 1;
|
||
}
|
||
}
|
||
var chk = (10 - sum % 10) % 10;
|
||
if (chk !== parseInt(str.substring(14, 15), 10)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isAscii.js
|
||
var require_isAscii = __commonJS({
|
||
"node_modules/validator/lib/isAscii.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isAscii;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var ascii = /^[\x00-\x7F]+$/;
|
||
function isAscii(str) {
|
||
(0, _assertString.default)(str);
|
||
return ascii.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isFullWidth.js
|
||
var require_isFullWidth = __commonJS({
|
||
"node_modules/validator/lib/isFullWidth.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isFullWidth;
|
||
exports.fullWidth = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var fullWidth = exports.fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
|
||
function isFullWidth(str) {
|
||
(0, _assertString.default)(str);
|
||
return fullWidth.test(str);
|
||
}
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isHalfWidth.js
|
||
var require_isHalfWidth = __commonJS({
|
||
"node_modules/validator/lib/isHalfWidth.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isHalfWidth;
|
||
exports.halfWidth = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var halfWidth = exports.halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
|
||
function isHalfWidth(str) {
|
||
(0, _assertString.default)(str);
|
||
return halfWidth.test(str);
|
||
}
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isVariableWidth.js
|
||
var require_isVariableWidth = __commonJS({
|
||
"node_modules/validator/lib/isVariableWidth.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isVariableWidth;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isFullWidth = require_isFullWidth();
|
||
var _isHalfWidth = require_isHalfWidth();
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isVariableWidth(str) {
|
||
(0, _assertString.default)(str);
|
||
return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMultibyte.js
|
||
var require_isMultibyte = __commonJS({
|
||
"node_modules/validator/lib/isMultibyte.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMultibyte;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var multibyte = /[^\x00-\x7F]/;
|
||
function isMultibyte(str) {
|
||
(0, _assertString.default)(str);
|
||
return multibyte.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/util/multilineRegex.js
|
||
var require_multilineRegex = __commonJS({
|
||
"node_modules/validator/lib/util/multilineRegex.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = multilineRegexp;
|
||
function multilineRegexp(parts, flags) {
|
||
var regexpAsStringLiteral = parts.join("");
|
||
return new RegExp(regexpAsStringLiteral, flags);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isSemVer.js
|
||
var require_isSemVer = __commonJS({
|
||
"node_modules/validator/lib/isSemVer.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isSemVer;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _multilineRegex = _interopRequireDefault(require_multilineRegex());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var semanticVersioningRegex = (0, _multilineRegex.default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)", "(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))", "?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"], "i");
|
||
function isSemVer(str) {
|
||
(0, _assertString.default)(str);
|
||
return semanticVersioningRegex.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isSurrogatePair.js
|
||
var require_isSurrogatePair = __commonJS({
|
||
"node_modules/validator/lib/isSurrogatePair.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isSurrogatePair2;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/;
|
||
function isSurrogatePair2(str) {
|
||
(0, _assertString.default)(str);
|
||
return surrogatePair.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/util/includes.js
|
||
var require_includes = __commonJS({
|
||
"node_modules/validator/lib/util/includes.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = void 0;
|
||
var includes = function includes2(arr, val) {
|
||
return arr.some(function(arrVal) {
|
||
return val === arrVal;
|
||
});
|
||
};
|
||
var _default = exports.default = includes;
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isDecimal.js
|
||
var require_isDecimal = __commonJS({
|
||
"node_modules/validator/lib/isDecimal.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isDecimal;
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _includes = _interopRequireDefault(require_includes());
|
||
var _alpha = require_alpha();
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function decimalRegExp(options) {
|
||
var regExp = new RegExp("^[-+]?([0-9]+)?(\\".concat(_alpha.decimal[options.locale], "[0-9]{").concat(options.decimal_digits, "})").concat(options.force_decimal ? "" : "?", "$"));
|
||
return regExp;
|
||
}
|
||
var default_decimal_options = {
|
||
force_decimal: false,
|
||
decimal_digits: "1,",
|
||
locale: "en-US"
|
||
};
|
||
var blacklist = ["", "-", "+"];
|
||
function isDecimal(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, default_decimal_options);
|
||
if (options.locale in _alpha.decimal) {
|
||
return !(0, _includes.default)(blacklist, str.replace(/ /g, "")) && decimalRegExp(options).test(str);
|
||
}
|
||
throw new Error("Invalid locale '".concat(options.locale, "'"));
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isHexadecimal.js
|
||
var require_isHexadecimal = __commonJS({
|
||
"node_modules/validator/lib/isHexadecimal.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isHexadecimal;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;
|
||
function isHexadecimal(str) {
|
||
(0, _assertString.default)(str);
|
||
return hexadecimal.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isOctal.js
|
||
var require_isOctal = __commonJS({
|
||
"node_modules/validator/lib/isOctal.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isOctal;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var octal = /^(0o)?[0-7]+$/i;
|
||
function isOctal(str) {
|
||
(0, _assertString.default)(str);
|
||
return octal.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isDivisibleBy.js
|
||
var require_isDivisibleBy = __commonJS({
|
||
"node_modules/validator/lib/isDivisibleBy.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isDivisibleBy;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _toFloat = _interopRequireDefault(require_toFloat());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isDivisibleBy(str, num) {
|
||
(0, _assertString.default)(str);
|
||
return (0, _toFloat.default)(str) % parseInt(num, 10) === 0;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isHexColor.js
|
||
var require_isHexColor = __commonJS({
|
||
"node_modules/validator/lib/isHexColor.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isHexColor;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
|
||
function isHexColor(str) {
|
||
(0, _assertString.default)(str);
|
||
return hexcolor.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isRgbColor.js
|
||
var require_isRgbColor = __commonJS({
|
||
"node_modules/validator/lib/isRgbColor.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isRgbColor;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var rgbColor = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/;
|
||
var rgbaColor = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;
|
||
var rgbColorPercent = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/;
|
||
var rgbaColorPercent = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;
|
||
function isRgbColor(str) {
|
||
var includePercentValues = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
||
(0, _assertString.default)(str);
|
||
if (!includePercentValues) {
|
||
return rgbColor.test(str) || rgbaColor.test(str);
|
||
}
|
||
return rgbColor.test(str) || rgbaColor.test(str) || rgbColorPercent.test(str) || rgbaColorPercent.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isHSL.js
|
||
var require_isHSL = __commonJS({
|
||
"node_modules/validator/lib/isHSL.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isHSL;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var hslComma = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i;
|
||
var hslSpace = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;
|
||
function isHSL(str) {
|
||
(0, _assertString.default)(str);
|
||
var strippedStr = str.replace(/\s+/g, " ").replace(/\s?(hsla?\(|\)|,)\s?/ig, "$1");
|
||
if (strippedStr.indexOf(",") !== -1) {
|
||
return hslComma.test(strippedStr);
|
||
}
|
||
return hslSpace.test(strippedStr);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISRC.js
|
||
var require_isISRC = __commonJS({
|
||
"node_modules/validator/lib/isISRC.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isISRC;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;
|
||
function isISRC(str) {
|
||
(0, _assertString.default)(str);
|
||
return isrc.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isIBAN.js
|
||
var require_isIBAN = __commonJS({
|
||
"node_modules/validator/lib/isIBAN.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isIBAN;
|
||
exports.locales = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var ibanRegexThroughCountryCode = {
|
||
AD: /^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,
|
||
AE: /^(AE[0-9]{2})\d{3}\d{16}$/,
|
||
AL: /^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,
|
||
AT: /^(AT[0-9]{2})\d{16}$/,
|
||
AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,
|
||
BA: /^(BA[0-9]{2})\d{16}$/,
|
||
BE: /^(BE[0-9]{2})\d{12}$/,
|
||
BG: /^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,
|
||
BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,
|
||
BR: /^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,
|
||
BY: /^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,
|
||
CH: /^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,
|
||
CR: /^(CR[0-9]{2})\d{18}$/,
|
||
CY: /^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,
|
||
CZ: /^(CZ[0-9]{2})\d{20}$/,
|
||
DE: /^(DE[0-9]{2})\d{18}$/,
|
||
DK: /^(DK[0-9]{2})\d{14}$/,
|
||
DO: /^(DO[0-9]{2})[A-Z]{4}\d{20}$/,
|
||
DZ: /^(DZ\d{24})$/,
|
||
EE: /^(EE[0-9]{2})\d{16}$/,
|
||
EG: /^(EG[0-9]{2})\d{25}$/,
|
||
ES: /^(ES[0-9]{2})\d{20}$/,
|
||
FI: /^(FI[0-9]{2})\d{14}$/,
|
||
FO: /^(FO[0-9]{2})\d{14}$/,
|
||
FR: /^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,
|
||
GB: /^(GB[0-9]{2})[A-Z]{4}\d{14}$/,
|
||
GE: /^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,
|
||
GI: /^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,
|
||
GL: /^(GL[0-9]{2})\d{14}$/,
|
||
GR: /^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,
|
||
GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,
|
||
HR: /^(HR[0-9]{2})\d{17}$/,
|
||
HU: /^(HU[0-9]{2})\d{24}$/,
|
||
IE: /^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,
|
||
IL: /^(IL[0-9]{2})\d{19}$/,
|
||
IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,
|
||
IR: /^(IR[0-9]{2})0\d{2}0\d{18}$/,
|
||
IS: /^(IS[0-9]{2})\d{22}$/,
|
||
IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,
|
||
JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/,
|
||
KW: /^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,
|
||
KZ: /^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,
|
||
LB: /^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,
|
||
LC: /^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,
|
||
LI: /^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,
|
||
LT: /^(LT[0-9]{2})\d{16}$/,
|
||
LU: /^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,
|
||
LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,
|
||
MA: /^(MA[0-9]{26})$/,
|
||
MC: /^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,
|
||
MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/,
|
||
ME: /^(ME[0-9]{2})\d{18}$/,
|
||
MK: /^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,
|
||
MR: /^(MR[0-9]{2})\d{23}$/,
|
||
MT: /^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,
|
||
MU: /^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,
|
||
MZ: /^(MZ[0-9]{2})\d{21}$/,
|
||
NL: /^(NL[0-9]{2})[A-Z]{4}\d{10}$/,
|
||
NO: /^(NO[0-9]{2})\d{11}$/,
|
||
PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,
|
||
PL: /^(PL[0-9]{2})\d{24}$/,
|
||
PS: /^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,
|
||
PT: /^(PT[0-9]{2})\d{21}$/,
|
||
QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,
|
||
RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,
|
||
RS: /^(RS[0-9]{2})\d{18}$/,
|
||
SA: /^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,
|
||
SC: /^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,
|
||
SE: /^(SE[0-9]{2})\d{20}$/,
|
||
SI: /^(SI[0-9]{2})\d{15}$/,
|
||
SK: /^(SK[0-9]{2})\d{20}$/,
|
||
SM: /^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,
|
||
SV: /^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,
|
||
TL: /^(TL[0-9]{2})\d{19}$/,
|
||
TN: /^(TN[0-9]{2})\d{20}$/,
|
||
TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,
|
||
UA: /^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,
|
||
VA: /^(VA[0-9]{2})\d{18}$/,
|
||
VG: /^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,
|
||
XK: /^(XK[0-9]{2})\d{16}$/
|
||
};
|
||
function hasOnlyValidCountryCodes(countryCodeArray) {
|
||
var countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(function(countryCode) {
|
||
return !(countryCode in ibanRegexThroughCountryCode);
|
||
});
|
||
if (countryCodeArrayFilteredWithObjectIbanCode.length > 0) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function hasValidIbanFormat(str, options) {
|
||
var strippedStr = str.replace(/[\s\-]+/gi, "").toUpperCase();
|
||
var isoCountryCode = strippedStr.slice(0, 2).toUpperCase();
|
||
var isoCountryCodeInIbanRegexCodeObject = isoCountryCode in ibanRegexThroughCountryCode;
|
||
if (options.whitelist) {
|
||
if (!hasOnlyValidCountryCodes(options.whitelist)) {
|
||
return false;
|
||
}
|
||
var isoCountryCodeInWhiteList = options.whitelist.includes(isoCountryCode);
|
||
if (!isoCountryCodeInWhiteList) {
|
||
return false;
|
||
}
|
||
}
|
||
if (options.blacklist) {
|
||
var isoCountryCodeInBlackList = options.blacklist.includes(isoCountryCode);
|
||
if (isoCountryCodeInBlackList) {
|
||
return false;
|
||
}
|
||
}
|
||
return isoCountryCodeInIbanRegexCodeObject && ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr);
|
||
}
|
||
function hasValidIbanChecksum(str) {
|
||
var strippedStr = str.replace(/[^A-Z0-9]+/gi, "").toUpperCase();
|
||
var rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4);
|
||
var alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, function(char) {
|
||
return char.charCodeAt(0) - 55;
|
||
});
|
||
var remainder = alphaCapsReplacedWithDigits.match(/\d{1,7}/g).reduce(function(acc, value) {
|
||
return Number(acc + value) % 97;
|
||
}, "");
|
||
return remainder === 1;
|
||
}
|
||
function isIBAN(str) {
|
||
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
||
(0, _assertString.default)(str);
|
||
return hasValidIbanFormat(str, options) && hasValidIbanChecksum(str);
|
||
}
|
||
var locales = exports.locales = Object.keys(ibanRegexThroughCountryCode);
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISO31661Alpha2.js
|
||
var require_isISO31661Alpha2 = __commonJS({
|
||
"node_modules/validator/lib/isISO31661Alpha2.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.CountryCodes = void 0;
|
||
exports.default = isISO31661Alpha2;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var validISO31661Alpha2CountriesCodes = /* @__PURE__ */ new Set(["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"]);
|
||
function isISO31661Alpha2(str) {
|
||
(0, _assertString.default)(str);
|
||
return validISO31661Alpha2CountriesCodes.has(str.toUpperCase());
|
||
}
|
||
var CountryCodes = exports.CountryCodes = validISO31661Alpha2CountriesCodes;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isBIC.js
|
||
var require_isBIC = __commonJS({
|
||
"node_modules/validator/lib/isBIC.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isBIC;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isISO31661Alpha = require_isISO31661Alpha2();
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;
|
||
function isBIC(str) {
|
||
(0, _assertString.default)(str);
|
||
var countryCode = str.slice(4, 6).toUpperCase();
|
||
if (!_isISO31661Alpha.CountryCodes.has(countryCode) && countryCode !== "XK") {
|
||
return false;
|
||
}
|
||
return isBICReg.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMD5.js
|
||
var require_isMD5 = __commonJS({
|
||
"node_modules/validator/lib/isMD5.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMD5;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var md5 = /^[a-f0-9]{32}$/;
|
||
function isMD5(str) {
|
||
(0, _assertString.default)(str);
|
||
return md5.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isHash.js
|
||
var require_isHash = __commonJS({
|
||
"node_modules/validator/lib/isHash.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isHash;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var lengths = {
|
||
md5: 32,
|
||
md4: 32,
|
||
sha1: 40,
|
||
sha256: 64,
|
||
sha384: 96,
|
||
sha512: 128,
|
||
ripemd128: 32,
|
||
ripemd160: 40,
|
||
tiger128: 32,
|
||
tiger160: 40,
|
||
tiger192: 48,
|
||
crc32: 8,
|
||
crc32b: 8
|
||
};
|
||
function isHash(str, algorithm) {
|
||
(0, _assertString.default)(str);
|
||
var hash = new RegExp("^[a-fA-F0-9]{".concat(lengths[algorithm], "}$"));
|
||
return hash.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isBase64.js
|
||
var require_isBase64 = __commonJS({
|
||
"node_modules/validator/lib/isBase64.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isBase64;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var notBase64 = /[^A-Z0-9+\/=]/i;
|
||
var urlSafeBase64 = /^[A-Z0-9_\-]*$/i;
|
||
var defaultBase64Options = {
|
||
urlSafe: false
|
||
};
|
||
function isBase64(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, defaultBase64Options);
|
||
var len = str.length;
|
||
if (options.urlSafe) {
|
||
return urlSafeBase64.test(str);
|
||
}
|
||
if (len % 4 !== 0 || notBase64.test(str)) {
|
||
return false;
|
||
}
|
||
var firstPaddingChar = str.indexOf("=");
|
||
return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === "=";
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isJWT.js
|
||
var require_isJWT = __commonJS({
|
||
"node_modules/validator/lib/isJWT.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isJWT;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isBase = _interopRequireDefault(require_isBase64());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isJWT(str) {
|
||
(0, _assertString.default)(str);
|
||
var dotSplit = str.split(".");
|
||
var len = dotSplit.length;
|
||
if (len !== 3) {
|
||
return false;
|
||
}
|
||
return dotSplit.reduce(function(acc, currElem) {
|
||
return acc && (0, _isBase.default)(currElem, {
|
||
urlSafe: true
|
||
});
|
||
}, true);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isJSON.js
|
||
var require_isJSON = __commonJS({
|
||
"node_modules/validator/lib/isJSON.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isJSON;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
var default_json_options = {
|
||
allow_primitives: false
|
||
};
|
||
function isJSON(str, options) {
|
||
(0, _assertString.default)(str);
|
||
try {
|
||
options = (0, _merge.default)(options, default_json_options);
|
||
var primitives = [];
|
||
if (options.allow_primitives) {
|
||
primitives = [null, false, true];
|
||
}
|
||
var obj = JSON.parse(str);
|
||
return primitives.includes(obj) || !!obj && _typeof(obj) === "object";
|
||
} catch (e) {
|
||
}
|
||
return false;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isEmpty.js
|
||
var require_isEmpty = __commonJS({
|
||
"node_modules/validator/lib/isEmpty.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isEmpty;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var default_is_empty_options = {
|
||
ignore_whitespace: false
|
||
};
|
||
function isEmpty(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, default_is_empty_options);
|
||
return (options.ignore_whitespace ? str.trim().length : str.length) === 0;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isLength.js
|
||
var require_isLength = __commonJS({
|
||
"node_modules/validator/lib/isLength.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isLength;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
function isLength(str, options) {
|
||
(0, _assertString.default)(str);
|
||
var min;
|
||
var max;
|
||
if (_typeof(options) === "object") {
|
||
min = options.min || 0;
|
||
max = options.max;
|
||
} else {
|
||
min = arguments[1] || 0;
|
||
max = arguments[2];
|
||
}
|
||
var presentationSequences = str.match(/(\uFE0F|\uFE0E)/g) || [];
|
||
var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || [];
|
||
var len = str.length - presentationSequences.length - surrogatePairs.length;
|
||
return len >= min && (typeof max === "undefined" || len <= max);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isUUID.js
|
||
var require_isUUID = __commonJS({
|
||
"node_modules/validator/lib/isUUID.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isUUID;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var uuid = {
|
||
1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
|
||
2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
|
||
3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
|
||
4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
||
5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
||
7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
||
all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
|
||
};
|
||
function isUUID(str, version) {
|
||
(0, _assertString.default)(str);
|
||
var pattern = uuid[![void 0, null].includes(version) ? version : "all"];
|
||
return !!pattern && pattern.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMongoId.js
|
||
var require_isMongoId = __commonJS({
|
||
"node_modules/validator/lib/isMongoId.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMongoId;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isHexadecimal = _interopRequireDefault(require_isHexadecimal());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isMongoId(str) {
|
||
(0, _assertString.default)(str);
|
||
return (0, _isHexadecimal.default)(str) && str.length === 24;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isAfter.js
|
||
var require_isAfter = __commonJS({
|
||
"node_modules/validator/lib/isAfter.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isAfter;
|
||
var _toDate = _interopRequireDefault(require_toDate());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isAfter(date, options) {
|
||
var comparisonDate = (options === null || options === void 0 ? void 0 : options.comparisonDate) || options || Date().toString();
|
||
var comparison = (0, _toDate.default)(comparisonDate);
|
||
var original = (0, _toDate.default)(date);
|
||
return !!(original && comparison && original > comparison);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isBefore.js
|
||
var require_isBefore = __commonJS({
|
||
"node_modules/validator/lib/isBefore.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isBefore;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _toDate = _interopRequireDefault(require_toDate());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isBefore(str) {
|
||
var date = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : String(new Date());
|
||
(0, _assertString.default)(str);
|
||
var comparison = (0, _toDate.default)(date);
|
||
var original = (0, _toDate.default)(str);
|
||
return !!(original && comparison && original < comparison);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isIn.js
|
||
var require_isIn = __commonJS({
|
||
"node_modules/validator/lib/isIn.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isIn;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _toString = _interopRequireDefault(require_toString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
function isIn(str, options) {
|
||
(0, _assertString.default)(str);
|
||
var i;
|
||
if (Object.prototype.toString.call(options) === "[object Array]") {
|
||
var array = [];
|
||
for (i in options) {
|
||
if ({}.hasOwnProperty.call(options, i)) {
|
||
array[i] = (0, _toString.default)(options[i]);
|
||
}
|
||
}
|
||
return array.indexOf(str) >= 0;
|
||
} else if (_typeof(options) === "object") {
|
||
return options.hasOwnProperty(str);
|
||
} else if (options && typeof options.indexOf === "function") {
|
||
return options.indexOf(str) >= 0;
|
||
}
|
||
return false;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isLuhnNumber.js
|
||
var require_isLuhnNumber = __commonJS({
|
||
"node_modules/validator/lib/isLuhnNumber.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isLuhnNumber;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isLuhnNumber(str) {
|
||
(0, _assertString.default)(str);
|
||
var sanitized = str.replace(/[- ]+/g, "");
|
||
var sum = 0;
|
||
var digit;
|
||
var tmpNum;
|
||
var shouldDouble;
|
||
for (var i = sanitized.length - 1; i >= 0; i--) {
|
||
digit = sanitized.substring(i, i + 1);
|
||
tmpNum = parseInt(digit, 10);
|
||
if (shouldDouble) {
|
||
tmpNum *= 2;
|
||
if (tmpNum >= 10) {
|
||
sum += tmpNum % 10 + 1;
|
||
} else {
|
||
sum += tmpNum;
|
||
}
|
||
} else {
|
||
sum += tmpNum;
|
||
}
|
||
shouldDouble = !shouldDouble;
|
||
}
|
||
return !!(sum % 10 === 0 ? sanitized : false);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isCreditCard.js
|
||
var require_isCreditCard = __commonJS({
|
||
"node_modules/validator/lib/isCreditCard.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isCreditCard;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isLuhnNumber = _interopRequireDefault(require_isLuhnNumber());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var cards = {
|
||
amex: /^3[47][0-9]{13}$/,
|
||
dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
|
||
discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,
|
||
jcb: /^(?:2131|1800|35\d{3})\d{11}$/,
|
||
mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,
|
||
// /^[25][1-7][0-9]{14}$/;
|
||
unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,
|
||
visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/
|
||
};
|
||
var allCards = function() {
|
||
var tmpCardsArray = [];
|
||
for (var cardProvider in cards) {
|
||
if (cards.hasOwnProperty(cardProvider)) {
|
||
tmpCardsArray.push(cards[cardProvider]);
|
||
}
|
||
}
|
||
return tmpCardsArray;
|
||
}();
|
||
function isCreditCard(card) {
|
||
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
||
(0, _assertString.default)(card);
|
||
var provider = options.provider;
|
||
var sanitized = card.replace(/[- ]+/g, "");
|
||
if (provider && provider.toLowerCase() in cards) {
|
||
if (!cards[provider.toLowerCase()].test(sanitized)) {
|
||
return false;
|
||
}
|
||
} else if (provider && !(provider.toLowerCase() in cards)) {
|
||
throw new Error("".concat(provider, " is not a valid credit card provider."));
|
||
} else if (!allCards.some(function(cardProvider) {
|
||
return cardProvider.test(sanitized);
|
||
})) {
|
||
return false;
|
||
}
|
||
return (0, _isLuhnNumber.default)(card);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isIdentityCard.js
|
||
var require_isIdentityCard = __commonJS({
|
||
"node_modules/validator/lib/isIdentityCard.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isIdentityCard;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _isInt = _interopRequireDefault(require_isInt());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var validators = {
|
||
PL: function PL(str) {
|
||
(0, _assertString.default)(str);
|
||
var weightOfDigits = {
|
||
1: 1,
|
||
2: 3,
|
||
3: 7,
|
||
4: 9,
|
||
5: 1,
|
||
6: 3,
|
||
7: 7,
|
||
8: 9,
|
||
9: 1,
|
||
10: 3,
|
||
11: 0
|
||
};
|
||
if (str != null && str.length === 11 && (0, _isInt.default)(str, {
|
||
allow_leading_zeroes: true
|
||
})) {
|
||
var digits = str.split("").slice(0, -1);
|
||
var sum = digits.reduce(function(acc, digit, index2) {
|
||
return acc + Number(digit) * weightOfDigits[index2 + 1];
|
||
}, 0);
|
||
var modulo = sum % 10;
|
||
var lastDigit = Number(str.charAt(str.length - 1));
|
||
if (modulo === 0 && lastDigit === 0 || lastDigit === 10 - modulo) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
},
|
||
ES: function ES(str) {
|
||
(0, _assertString.default)(str);
|
||
var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/;
|
||
var charsValue = {
|
||
X: 0,
|
||
Y: 1,
|
||
Z: 2
|
||
};
|
||
var controlDigits = ["T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"];
|
||
var sanitized = str.trim().toUpperCase();
|
||
if (!DNI.test(sanitized)) {
|
||
return false;
|
||
}
|
||
var number2 = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function(char) {
|
||
return charsValue[char];
|
||
});
|
||
return sanitized.endsWith(controlDigits[number2 % 23]);
|
||
},
|
||
FI: function FI(str) {
|
||
(0, _assertString.default)(str);
|
||
if (str.length !== 11) {
|
||
return false;
|
||
}
|
||
if (!str.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)) {
|
||
return false;
|
||
}
|
||
var checkDigits = "0123456789ABCDEFHJKLMNPRSTUVWXY";
|
||
var idAsNumber = parseInt(str.slice(0, 6), 10) * 1e3 + parseInt(str.slice(7, 10), 10);
|
||
var remainder = idAsNumber % 31;
|
||
var checkDigit = checkDigits[remainder];
|
||
return checkDigit === str.slice(10, 11);
|
||
},
|
||
IN: function IN(str) {
|
||
var DNI = /^[1-9]\d{3}\s?\d{4}\s?\d{4}$/;
|
||
var d = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]];
|
||
var p2 = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]];
|
||
var sanitized = str.trim();
|
||
if (!DNI.test(sanitized)) {
|
||
return false;
|
||
}
|
||
var c = 0;
|
||
var invertedArray = sanitized.replace(/\s/g, "").split("").map(Number).reverse();
|
||
invertedArray.forEach(function(val, i) {
|
||
c = d[c][p2[i % 8][val]];
|
||
});
|
||
return c === 0;
|
||
},
|
||
IR: function IR(str) {
|
||
if (!str.match(/^\d{10}$/))
|
||
return false;
|
||
str = "0000".concat(str).slice(str.length - 6);
|
||
if (parseInt(str.slice(3, 9), 10) === 0)
|
||
return false;
|
||
var lastNumber = parseInt(str.slice(9, 10), 10);
|
||
var sum = 0;
|
||
for (var i = 0; i < 9; i++) {
|
||
sum += parseInt(str.slice(i, i + 1), 10) * (10 - i);
|
||
}
|
||
sum %= 11;
|
||
return sum < 2 && lastNumber === sum || sum >= 2 && lastNumber === 11 - sum;
|
||
},
|
||
IT: function IT(str) {
|
||
if (str.length !== 9)
|
||
return false;
|
||
if (str === "CA00000AA")
|
||
return false;
|
||
return str.search(/C[A-Z]\d{5}[A-Z]{2}/i) > -1;
|
||
},
|
||
NO: function NO(str) {
|
||
var sanitized = str.trim();
|
||
if (isNaN(Number(sanitized)))
|
||
return false;
|
||
if (sanitized.length !== 11)
|
||
return false;
|
||
if (sanitized === "00000000000")
|
||
return false;
|
||
var f = sanitized.split("").map(Number);
|
||
var k1 = (11 - (3 * f[0] + 7 * f[1] + 6 * f[2] + 1 * f[3] + 8 * f[4] + 9 * f[5] + 4 * f[6] + 5 * f[7] + 2 * f[8]) % 11) % 11;
|
||
var k2 = (11 - (5 * f[0] + 4 * f[1] + 3 * f[2] + 2 * f[3] + 7 * f[4] + 6 * f[5] + 5 * f[6] + 4 * f[7] + 3 * f[8] + 2 * k1) % 11) % 11;
|
||
if (k1 !== f[9] || k2 !== f[10])
|
||
return false;
|
||
return true;
|
||
},
|
||
TH: function TH(str) {
|
||
if (!str.match(/^[1-8]\d{12}$/))
|
||
return false;
|
||
var sum = 0;
|
||
for (var i = 0; i < 12; i++) {
|
||
sum += parseInt(str[i], 10) * (13 - i);
|
||
}
|
||
return str[12] === ((11 - sum % 11) % 10).toString();
|
||
},
|
||
LK: function LK(str) {
|
||
var old_nic = /^[1-9]\d{8}[vx]$/i;
|
||
var new_nic = /^[1-9]\d{11}$/i;
|
||
if (str.length === 10 && old_nic.test(str))
|
||
return true;
|
||
else if (str.length === 12 && new_nic.test(str))
|
||
return true;
|
||
return false;
|
||
},
|
||
"he-IL": function heIL(str) {
|
||
var DNI = /^\d{9}$/;
|
||
var sanitized = str.trim();
|
||
if (!DNI.test(sanitized)) {
|
||
return false;
|
||
}
|
||
var id = sanitized;
|
||
var sum = 0, incNum;
|
||
for (var i = 0; i < id.length; i++) {
|
||
incNum = Number(id[i]) * (i % 2 + 1);
|
||
sum += incNum > 9 ? incNum - 9 : incNum;
|
||
}
|
||
return sum % 10 === 0;
|
||
},
|
||
"ar-LY": function arLY(str) {
|
||
var NIN = /^(1|2)\d{11}$/;
|
||
var sanitized = str.trim();
|
||
if (!NIN.test(sanitized)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
},
|
||
"ar-TN": function arTN(str) {
|
||
var DNI = /^\d{8}$/;
|
||
var sanitized = str.trim();
|
||
if (!DNI.test(sanitized)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
},
|
||
"zh-CN": function zhCN(str) {
|
||
var provincesAndCities = [
|
||
"11",
|
||
// 北京
|
||
"12",
|
||
// 天津
|
||
"13",
|
||
// 河北
|
||
"14",
|
||
// 山西
|
||
"15",
|
||
// 内蒙古
|
||
"21",
|
||
// 辽宁
|
||
"22",
|
||
// 吉林
|
||
"23",
|
||
// 黑龙江
|
||
"31",
|
||
// 上海
|
||
"32",
|
||
// 江苏
|
||
"33",
|
||
// 浙江
|
||
"34",
|
||
// 安徽
|
||
"35",
|
||
// 福建
|
||
"36",
|
||
// 江西
|
||
"37",
|
||
// 山东
|
||
"41",
|
||
// 河南
|
||
"42",
|
||
// 湖北
|
||
"43",
|
||
// 湖南
|
||
"44",
|
||
// 广东
|
||
"45",
|
||
// 广西
|
||
"46",
|
||
// 海南
|
||
"50",
|
||
// 重庆
|
||
"51",
|
||
// 四川
|
||
"52",
|
||
// 贵州
|
||
"53",
|
||
// 云南
|
||
"54",
|
||
// 西藏
|
||
"61",
|
||
// 陕西
|
||
"62",
|
||
// 甘肃
|
||
"63",
|
||
// 青海
|
||
"64",
|
||
// 宁夏
|
||
"65",
|
||
// 新疆
|
||
"71",
|
||
// 台湾
|
||
"81",
|
||
// 香港
|
||
"82",
|
||
// 澳门
|
||
"91"
|
||
// 国外
|
||
];
|
||
var powers2 = ["7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2"];
|
||
var parityBit = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
|
||
var checkAddressCode = function checkAddressCode2(addressCode) {
|
||
return provincesAndCities.includes(addressCode);
|
||
};
|
||
var checkBirthDayCode = function checkBirthDayCode2(birDayCode) {
|
||
var yyyy = parseInt(birDayCode.substring(0, 4), 10);
|
||
var mm = parseInt(birDayCode.substring(4, 6), 10);
|
||
var dd2 = parseInt(birDayCode.substring(6), 10);
|
||
var xdata = new Date(yyyy, mm - 1, dd2);
|
||
if (xdata > new Date()) {
|
||
return false;
|
||
} else if (xdata.getFullYear() === yyyy && xdata.getMonth() === mm - 1 && xdata.getDate() === dd2) {
|
||
return true;
|
||
}
|
||
return false;
|
||
};
|
||
var getParityBit = function getParityBit2(idCardNo) {
|
||
var id17 = idCardNo.substring(0, 17);
|
||
var power = 0;
|
||
for (var i = 0; i < 17; i++) {
|
||
power += parseInt(id17.charAt(i), 10) * parseInt(powers2[i], 10);
|
||
}
|
||
var mod = power % 11;
|
||
return parityBit[mod];
|
||
};
|
||
var checkParityBit = function checkParityBit2(idCardNo) {
|
||
return getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase();
|
||
};
|
||
var check15IdCardNo = function check15IdCardNo2(idCardNo) {
|
||
var check = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(idCardNo);
|
||
if (!check)
|
||
return false;
|
||
var addressCode = idCardNo.substring(0, 2);
|
||
check = checkAddressCode(addressCode);
|
||
if (!check)
|
||
return false;
|
||
var birDayCode = "19".concat(idCardNo.substring(6, 12));
|
||
check = checkBirthDayCode(birDayCode);
|
||
if (!check)
|
||
return false;
|
||
return true;
|
||
};
|
||
var check18IdCardNo = function check18IdCardNo2(idCardNo) {
|
||
var check = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(idCardNo);
|
||
if (!check)
|
||
return false;
|
||
var addressCode = idCardNo.substring(0, 2);
|
||
check = checkAddressCode(addressCode);
|
||
if (!check)
|
||
return false;
|
||
var birDayCode = idCardNo.substring(6, 14);
|
||
check = checkBirthDayCode(birDayCode);
|
||
if (!check)
|
||
return false;
|
||
return checkParityBit(idCardNo);
|
||
};
|
||
var checkIdCardNo = function checkIdCardNo2(idCardNo) {
|
||
var check = /^\d{15}|(\d{17}(\d|x|X))$/.test(idCardNo);
|
||
if (!check)
|
||
return false;
|
||
if (idCardNo.length === 15) {
|
||
return check15IdCardNo(idCardNo);
|
||
}
|
||
return check18IdCardNo(idCardNo);
|
||
};
|
||
return checkIdCardNo(str);
|
||
},
|
||
"zh-HK": function zhHK(str) {
|
||
str = str.trim();
|
||
var regexHKID = /^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/;
|
||
var regexIsDigit = /^[0-9]$/;
|
||
str = str.toUpperCase();
|
||
if (!regexHKID.test(str))
|
||
return false;
|
||
str = str.replace(/\[|\]|\(|\)/g, "");
|
||
if (str.length === 8)
|
||
str = "3".concat(str);
|
||
var checkSumVal = 0;
|
||
for (var i = 0; i <= 7; i++) {
|
||
var convertedChar = void 0;
|
||
if (!regexIsDigit.test(str[i]))
|
||
convertedChar = (str[i].charCodeAt(0) - 55) % 11;
|
||
else
|
||
convertedChar = str[i];
|
||
checkSumVal += convertedChar * (9 - i);
|
||
}
|
||
checkSumVal %= 11;
|
||
var checkSumConverted;
|
||
if (checkSumVal === 0)
|
||
checkSumConverted = "0";
|
||
else if (checkSumVal === 1)
|
||
checkSumConverted = "A";
|
||
else
|
||
checkSumConverted = String(11 - checkSumVal);
|
||
if (checkSumConverted === str[str.length - 1])
|
||
return true;
|
||
return false;
|
||
},
|
||
"zh-TW": function zhTW(str) {
|
||
var ALPHABET_CODES = {
|
||
A: 10,
|
||
B: 11,
|
||
C: 12,
|
||
D: 13,
|
||
E: 14,
|
||
F: 15,
|
||
G: 16,
|
||
H: 17,
|
||
I: 34,
|
||
J: 18,
|
||
K: 19,
|
||
L: 20,
|
||
M: 21,
|
||
N: 22,
|
||
O: 35,
|
||
P: 23,
|
||
Q: 24,
|
||
R: 25,
|
||
S: 26,
|
||
T: 27,
|
||
U: 28,
|
||
V: 29,
|
||
W: 32,
|
||
X: 30,
|
||
Y: 31,
|
||
Z: 33
|
||
};
|
||
var sanitized = str.trim().toUpperCase();
|
||
if (!/^[A-Z][0-9]{9}$/.test(sanitized))
|
||
return false;
|
||
return Array.from(sanitized).reduce(function(sum, number2, index2) {
|
||
if (index2 === 0) {
|
||
var code = ALPHABET_CODES[number2];
|
||
return code % 10 * 9 + Math.floor(code / 10);
|
||
}
|
||
if (index2 === 9) {
|
||
return (10 - sum % 10 - Number(number2)) % 10 === 0;
|
||
}
|
||
return sum + Number(number2) * (9 - index2);
|
||
}, 0);
|
||
}
|
||
};
|
||
function isIdentityCard(str, locale) {
|
||
(0, _assertString.default)(str);
|
||
if (locale in validators) {
|
||
return validators[locale](str);
|
||
} else if (locale === "any") {
|
||
for (var key2 in validators) {
|
||
if (validators.hasOwnProperty(key2)) {
|
||
var validator2 = validators[key2];
|
||
if (validator2(str)) {
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
throw new Error("Invalid locale '".concat(locale, "'"));
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isEAN.js
|
||
var require_isEAN = __commonJS({
|
||
"node_modules/validator/lib/isEAN.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isEAN;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var LENGTH_EAN_8 = 8;
|
||
var LENGTH_EAN_14 = 14;
|
||
var validEanRegex = /^(\d{8}|\d{13}|\d{14})$/;
|
||
function getPositionWeightThroughLengthAndIndex(length, index2) {
|
||
if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) {
|
||
return index2 % 2 === 0 ? 3 : 1;
|
||
}
|
||
return index2 % 2 === 0 ? 1 : 3;
|
||
}
|
||
function calculateCheckDigit(ean) {
|
||
var checksum = ean.slice(0, -1).split("").map(function(char, index2) {
|
||
return Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index2);
|
||
}).reduce(function(acc, partialSum) {
|
||
return acc + partialSum;
|
||
}, 0);
|
||
var remainder = 10 - checksum % 10;
|
||
return remainder < 10 ? remainder : 0;
|
||
}
|
||
function isEAN(str) {
|
||
(0, _assertString.default)(str);
|
||
var actualCheckDigit = Number(str.slice(-1));
|
||
return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISIN.js
|
||
var require_isISIN = __commonJS({
|
||
"node_modules/validator/lib/isISIN.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isISIN;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;
|
||
function isISIN(str) {
|
||
(0, _assertString.default)(str);
|
||
if (!isin.test(str)) {
|
||
return false;
|
||
}
|
||
var double = true;
|
||
var sum = 0;
|
||
for (var i = str.length - 2; i >= 0; i--) {
|
||
if (str[i] >= "A" && str[i] <= "Z") {
|
||
var value = str[i].charCodeAt(0) - 55;
|
||
var lo = value % 10;
|
||
var hi = Math.trunc(value / 10);
|
||
for (var _i = 0, _arr = [lo, hi]; _i < _arr.length; _i++) {
|
||
var digit = _arr[_i];
|
||
if (double) {
|
||
if (digit >= 5) {
|
||
sum += 1 + (digit - 5) * 2;
|
||
} else {
|
||
sum += digit * 2;
|
||
}
|
||
} else {
|
||
sum += digit;
|
||
}
|
||
double = !double;
|
||
}
|
||
} else {
|
||
var _digit = str[i].charCodeAt(0) - "0".charCodeAt(0);
|
||
if (double) {
|
||
if (_digit >= 5) {
|
||
sum += 1 + (_digit - 5) * 2;
|
||
} else {
|
||
sum += _digit * 2;
|
||
}
|
||
} else {
|
||
sum += _digit;
|
||
}
|
||
double = !double;
|
||
}
|
||
}
|
||
var check = Math.trunc((sum + 9) / 10) * 10 - sum;
|
||
return +str[str.length - 1] === check;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISBN.js
|
||
var require_isISBN = __commonJS({
|
||
"node_modules/validator/lib/isISBN.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isISBN;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/;
|
||
var possibleIsbn13 = /^(?:[0-9]{13})$/;
|
||
var factor = [1, 3];
|
||
function isISBN(isbn, options) {
|
||
(0, _assertString.default)(isbn);
|
||
var version = String((options === null || options === void 0 ? void 0 : options.version) || options);
|
||
if (!(options !== null && options !== void 0 && options.version || options)) {
|
||
return isISBN(isbn, {
|
||
version: 10
|
||
}) || isISBN(isbn, {
|
||
version: 13
|
||
});
|
||
}
|
||
var sanitizedIsbn = isbn.replace(/[\s-]+/g, "");
|
||
var checksum = 0;
|
||
if (version === "10") {
|
||
if (!possibleIsbn10.test(sanitizedIsbn)) {
|
||
return false;
|
||
}
|
||
for (var i = 0; i < version - 1; i++) {
|
||
checksum += (i + 1) * sanitizedIsbn.charAt(i);
|
||
}
|
||
if (sanitizedIsbn.charAt(9) === "X") {
|
||
checksum += 10 * 10;
|
||
} else {
|
||
checksum += 10 * sanitizedIsbn.charAt(9);
|
||
}
|
||
if (checksum % 11 === 0) {
|
||
return true;
|
||
}
|
||
} else if (version === "13") {
|
||
if (!possibleIsbn13.test(sanitizedIsbn)) {
|
||
return false;
|
||
}
|
||
for (var _i = 0; _i < 12; _i++) {
|
||
checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i);
|
||
}
|
||
if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISSN.js
|
||
var require_isISSN = __commonJS({
|
||
"node_modules/validator/lib/isISSN.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isISSN;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var issn = "^\\d{4}-?\\d{3}[\\dX]$";
|
||
function isISSN(str) {
|
||
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
||
(0, _assertString.default)(str);
|
||
var testIssn = issn;
|
||
testIssn = options.require_hyphen ? testIssn.replace("?", "") : testIssn;
|
||
testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, "i");
|
||
if (!testIssn.test(str)) {
|
||
return false;
|
||
}
|
||
var digits = str.replace("-", "").toUpperCase();
|
||
var checksum = 0;
|
||
for (var i = 0; i < digits.length; i++) {
|
||
var digit = digits[i];
|
||
checksum += (digit === "X" ? 10 : +digit) * (8 - i);
|
||
}
|
||
return checksum % 11 === 0;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/util/algorithms.js
|
||
var require_algorithms = __commonJS({
|
||
"node_modules/validator/lib/util/algorithms.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.iso7064Check = iso7064Check;
|
||
exports.luhnCheck = luhnCheck;
|
||
exports.reverseMultiplyAndSum = reverseMultiplyAndSum;
|
||
exports.verhoeffCheck = verhoeffCheck;
|
||
function iso7064Check(str) {
|
||
var checkvalue = 10;
|
||
for (var i = 0; i < str.length - 1; i++) {
|
||
checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? 10 * 2 % 11 : (parseInt(str[i], 10) + checkvalue) % 10 * 2 % 11;
|
||
}
|
||
checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue;
|
||
return checkvalue === parseInt(str[10], 10);
|
||
}
|
||
function luhnCheck(str) {
|
||
var checksum = 0;
|
||
var second = false;
|
||
for (var i = str.length - 1; i >= 0; i--) {
|
||
if (second) {
|
||
var product = parseInt(str[i], 10) * 2;
|
||
if (product > 9) {
|
||
checksum += product.toString().split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
}).reduce(function(a, b) {
|
||
return a + b;
|
||
}, 0);
|
||
} else {
|
||
checksum += product;
|
||
}
|
||
} else {
|
||
checksum += parseInt(str[i], 10);
|
||
}
|
||
second = !second;
|
||
}
|
||
return checksum % 10 === 0;
|
||
}
|
||
function reverseMultiplyAndSum(digits, base2) {
|
||
var total = 0;
|
||
for (var i = 0; i < digits.length; i++) {
|
||
total += digits[i] * (base2 - i);
|
||
}
|
||
return total;
|
||
}
|
||
function verhoeffCheck(str) {
|
||
var d_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]];
|
||
var p_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]];
|
||
var str_copy = str.split("").reverse().join("");
|
||
var checksum = 0;
|
||
for (var i = 0; i < str_copy.length; i++) {
|
||
checksum = d_table[checksum][p_table[i % 8][parseInt(str_copy[i], 10)]];
|
||
}
|
||
return checksum === 0;
|
||
}
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isTaxID.js
|
||
var require_isTaxID = __commonJS({
|
||
"node_modules/validator/lib/isTaxID.js"(exports, module2) {
|
||
"use strict";
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isTaxID;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var algorithms = _interopRequireWildcard(require_algorithms());
|
||
var _isDate = _interopRequireDefault(require_isDate());
|
||
function _getRequireWildcardCache(e) {
|
||
if ("function" != typeof WeakMap)
|
||
return null;
|
||
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
||
return (_getRequireWildcardCache = function _getRequireWildcardCache2(e2) {
|
||
return e2 ? t : r;
|
||
})(e);
|
||
}
|
||
function _interopRequireWildcard(e, r) {
|
||
if (!r && e && e.__esModule)
|
||
return e;
|
||
if (null === e || "object" != _typeof(e) && "function" != typeof e)
|
||
return { default: e };
|
||
var t = _getRequireWildcardCache(r);
|
||
if (t && t.has(e))
|
||
return t.get(e);
|
||
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||
for (var u in e)
|
||
if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
||
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
||
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
||
}
|
||
return n.default = e, t && t.set(e, n), n;
|
||
}
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _toConsumableArray(arr) {
|
||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
||
}
|
||
function _nonIterableSpread() {
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
function _unsupportedIterableToArray(o, minLen) {
|
||
if (!o)
|
||
return;
|
||
if (typeof o === "string")
|
||
return _arrayLikeToArray(o, minLen);
|
||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||
if (n === "Object" && o.constructor)
|
||
n = o.constructor.name;
|
||
if (n === "Map" || n === "Set")
|
||
return Array.from(o);
|
||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
||
return _arrayLikeToArray(o, minLen);
|
||
}
|
||
function _iterableToArray(iter) {
|
||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
||
return Array.from(iter);
|
||
}
|
||
function _arrayWithoutHoles(arr) {
|
||
if (Array.isArray(arr))
|
||
return _arrayLikeToArray(arr);
|
||
}
|
||
function _arrayLikeToArray(arr, len) {
|
||
if (len == null || len > arr.length)
|
||
len = arr.length;
|
||
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
||
arr2[i] = arr[i];
|
||
return arr2;
|
||
}
|
||
function bgBgCheck(tin) {
|
||
var century_year = tin.slice(0, 2);
|
||
var month = parseInt(tin.slice(2, 4), 10);
|
||
if (month > 40) {
|
||
month -= 40;
|
||
century_year = "20".concat(century_year);
|
||
} else if (month > 20) {
|
||
month -= 20;
|
||
century_year = "18".concat(century_year);
|
||
} else {
|
||
century_year = "19".concat(century_year);
|
||
}
|
||
if (month < 10) {
|
||
month = "0".concat(month);
|
||
}
|
||
var date = "".concat(century_year, "/").concat(month, "/").concat(tin.slice(4, 6));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6];
|
||
var checksum = 0;
|
||
for (var i = 0; i < multip_lookup.length; i++) {
|
||
checksum += digits[i] * multip_lookup[i];
|
||
}
|
||
checksum = checksum % 11 === 10 ? 0 : checksum % 11;
|
||
return checksum === digits[9];
|
||
}
|
||
function isCanadianSIN(input) {
|
||
var digitsArray = input.split("");
|
||
var even = digitsArray.filter(function(_2, idx) {
|
||
return idx % 2;
|
||
}).map(function(i) {
|
||
return Number(i) * 2;
|
||
}).join("").split("");
|
||
var total = digitsArray.filter(function(_2, idx) {
|
||
return !(idx % 2);
|
||
}).concat(even).map(function(i) {
|
||
return Number(i);
|
||
}).reduce(function(acc, cur) {
|
||
return acc + cur;
|
||
});
|
||
return total % 10 === 0;
|
||
}
|
||
function csCzCheck(tin) {
|
||
tin = tin.replace(/\W/, "");
|
||
var full_year = parseInt(tin.slice(0, 2), 10);
|
||
if (tin.length === 10) {
|
||
if (full_year < 54) {
|
||
full_year = "20".concat(full_year);
|
||
} else {
|
||
full_year = "19".concat(full_year);
|
||
}
|
||
} else {
|
||
if (tin.slice(6) === "000") {
|
||
return false;
|
||
}
|
||
if (full_year < 54) {
|
||
full_year = "19".concat(full_year);
|
||
} else {
|
||
return false;
|
||
}
|
||
}
|
||
if (full_year.length === 3) {
|
||
full_year = [full_year.slice(0, 2), "0", full_year.slice(2)].join("");
|
||
}
|
||
var month = parseInt(tin.slice(2, 4), 10);
|
||
if (month > 50) {
|
||
month -= 50;
|
||
}
|
||
if (month > 20) {
|
||
if (parseInt(full_year, 10) < 2004) {
|
||
return false;
|
||
}
|
||
month -= 20;
|
||
}
|
||
if (month < 10) {
|
||
month = "0".concat(month);
|
||
}
|
||
var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
if (tin.length === 10) {
|
||
if (parseInt(tin, 10) % 11 !== 0) {
|
||
var checkdigit = parseInt(tin.slice(0, 9), 10) % 11;
|
||
if (parseInt(full_year, 10) < 1986 && checkdigit === 10) {
|
||
if (parseInt(tin.slice(9), 10) !== 0) {
|
||
return false;
|
||
}
|
||
} else {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function deAtCheck(tin) {
|
||
return algorithms.luhnCheck(tin);
|
||
}
|
||
function deDeCheck(tin) {
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var occurences = [];
|
||
for (var i = 0; i < digits.length - 1; i++) {
|
||
occurences.push("");
|
||
for (var j = 0; j < digits.length - 1; j++) {
|
||
if (digits[i] === digits[j]) {
|
||
occurences[i] += j;
|
||
}
|
||
}
|
||
}
|
||
occurences = occurences.filter(function(a) {
|
||
return a.length > 1;
|
||
});
|
||
if (occurences.length !== 2 && occurences.length !== 3) {
|
||
return false;
|
||
}
|
||
if (occurences[0].length === 3) {
|
||
var trip_locations = occurences[0].split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var recurrent = 0;
|
||
for (var _i = 0; _i < trip_locations.length - 1; _i++) {
|
||
if (trip_locations[_i] + 1 === trip_locations[_i + 1]) {
|
||
recurrent += 1;
|
||
}
|
||
}
|
||
if (recurrent === 2) {
|
||
return false;
|
||
}
|
||
}
|
||
return algorithms.iso7064Check(tin);
|
||
}
|
||
function dkDkCheck(tin) {
|
||
tin = tin.replace(/\W/, "");
|
||
var year = parseInt(tin.slice(4, 6), 10);
|
||
var century_digit = tin.slice(6, 7);
|
||
switch (century_digit) {
|
||
case "0":
|
||
case "1":
|
||
case "2":
|
||
case "3":
|
||
year = "19".concat(year);
|
||
break;
|
||
case "4":
|
||
case "9":
|
||
if (year < 37) {
|
||
year = "20".concat(year);
|
||
} else {
|
||
year = "19".concat(year);
|
||
}
|
||
break;
|
||
default:
|
||
if (year < 37) {
|
||
year = "20".concat(year);
|
||
} else if (year > 58) {
|
||
year = "18".concat(year);
|
||
} else {
|
||
return false;
|
||
}
|
||
break;
|
||
}
|
||
if (year.length === 3) {
|
||
year = [year.slice(0, 2), "0", year.slice(2)].join("");
|
||
}
|
||
var date = "".concat(year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var checksum = 0;
|
||
var weight = 4;
|
||
for (var i = 0; i < 9; i++) {
|
||
checksum += digits[i] * weight;
|
||
weight -= 1;
|
||
if (weight === 1) {
|
||
weight = 7;
|
||
}
|
||
}
|
||
checksum %= 11;
|
||
if (checksum === 1) {
|
||
return false;
|
||
}
|
||
return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum;
|
||
}
|
||
function elCyCheck(tin) {
|
||
var digits = tin.slice(0, 8).split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var checksum = 0;
|
||
for (var i = 1; i < digits.length; i += 2) {
|
||
checksum += digits[i];
|
||
}
|
||
for (var _i2 = 0; _i2 < digits.length; _i2 += 2) {
|
||
if (digits[_i2] < 2) {
|
||
checksum += 1 - digits[_i2];
|
||
} else {
|
||
checksum += 2 * (digits[_i2] - 2) + 5;
|
||
if (digits[_i2] > 4) {
|
||
checksum += 2;
|
||
}
|
||
}
|
||
}
|
||
return String.fromCharCode(checksum % 26 + 65) === tin.charAt(8);
|
||
}
|
||
function elGrCheck(tin) {
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var checksum = 0;
|
||
for (var i = 0; i < 8; i++) {
|
||
checksum += digits[i] * Math.pow(2, 8 - i);
|
||
}
|
||
return checksum % 11 % 10 === digits[8];
|
||
}
|
||
function enIeCheck(tin) {
|
||
var checksum = algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 7).map(function(a) {
|
||
return parseInt(a, 10);
|
||
}), 8);
|
||
if (tin.length === 9 && tin[8] !== "W") {
|
||
checksum += (tin[8].charCodeAt(0) - 64) * 9;
|
||
}
|
||
checksum %= 23;
|
||
if (checksum === 0) {
|
||
return tin[7].toUpperCase() === "W";
|
||
}
|
||
return tin[7].toUpperCase() === String.fromCharCode(64 + checksum);
|
||
}
|
||
var enUsCampusPrefix = {
|
||
andover: ["10", "12"],
|
||
atlanta: ["60", "67"],
|
||
austin: ["50", "53"],
|
||
brookhaven: ["01", "02", "03", "04", "05", "06", "11", "13", "14", "16", "21", "22", "23", "25", "34", "51", "52", "54", "55", "56", "57", "58", "59", "65"],
|
||
cincinnati: ["30", "32", "35", "36", "37", "38", "61"],
|
||
fresno: ["15", "24"],
|
||
internet: ["20", "26", "27", "45", "46", "47"],
|
||
kansas: ["40", "44"],
|
||
memphis: ["94", "95"],
|
||
ogden: ["80", "90"],
|
||
philadelphia: ["33", "39", "41", "42", "43", "46", "48", "62", "63", "64", "66", "68", "71", "72", "73", "74", "75", "76", "77", "81", "82", "83", "84", "85", "86", "87", "88", "91", "92", "93", "98", "99"],
|
||
sba: ["31"]
|
||
};
|
||
function enUsGetPrefixes() {
|
||
var prefixes = [];
|
||
for (var location2 in enUsCampusPrefix) {
|
||
if (enUsCampusPrefix.hasOwnProperty(location2)) {
|
||
prefixes.push.apply(prefixes, _toConsumableArray(enUsCampusPrefix[location2]));
|
||
}
|
||
}
|
||
return prefixes;
|
||
}
|
||
function enUsCheck(tin) {
|
||
return enUsGetPrefixes().indexOf(tin.slice(0, 2)) !== -1;
|
||
}
|
||
function esArCheck(tin) {
|
||
var accum = 0;
|
||
var digits = tin.split("");
|
||
var digit = parseInt(digits.pop(), 10);
|
||
for (var i = 0; i < digits.length; i++) {
|
||
accum += digits[9 - i] * (2 + i % 6);
|
||
}
|
||
var verif = 11 - accum % 11;
|
||
if (verif === 11) {
|
||
verif = 0;
|
||
} else if (verif === 10) {
|
||
verif = 9;
|
||
}
|
||
return digit === verif;
|
||
}
|
||
function esEsCheck(tin) {
|
||
var chars = tin.toUpperCase().split("");
|
||
if (isNaN(parseInt(chars[0], 10)) && chars.length > 1) {
|
||
var lead_replace = 0;
|
||
switch (chars[0]) {
|
||
case "Y":
|
||
lead_replace = 1;
|
||
break;
|
||
case "Z":
|
||
lead_replace = 2;
|
||
break;
|
||
default:
|
||
}
|
||
chars.splice(0, 1, lead_replace);
|
||
} else {
|
||
while (chars.length < 9) {
|
||
chars.unshift(0);
|
||
}
|
||
}
|
||
var lookup = ["T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"];
|
||
chars = chars.join("");
|
||
var checksum = parseInt(chars.slice(0, 8), 10) % 23;
|
||
return chars[8] === lookup[checksum];
|
||
}
|
||
function etEeCheck(tin) {
|
||
var full_year = tin.slice(1, 3);
|
||
var century_digit = tin.slice(0, 1);
|
||
switch (century_digit) {
|
||
case "1":
|
||
case "2":
|
||
full_year = "18".concat(full_year);
|
||
break;
|
||
case "3":
|
||
case "4":
|
||
full_year = "19".concat(full_year);
|
||
break;
|
||
default:
|
||
full_year = "20".concat(full_year);
|
||
break;
|
||
}
|
||
var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var checksum = 0;
|
||
var weight = 1;
|
||
for (var i = 0; i < 10; i++) {
|
||
checksum += digits[i] * weight;
|
||
weight += 1;
|
||
if (weight === 10) {
|
||
weight = 1;
|
||
}
|
||
}
|
||
if (checksum % 11 === 10) {
|
||
checksum = 0;
|
||
weight = 3;
|
||
for (var _i3 = 0; _i3 < 10; _i3++) {
|
||
checksum += digits[_i3] * weight;
|
||
weight += 1;
|
||
if (weight === 10) {
|
||
weight = 1;
|
||
}
|
||
}
|
||
if (checksum % 11 === 10) {
|
||
return digits[10] === 0;
|
||
}
|
||
}
|
||
return checksum % 11 === digits[10];
|
||
}
|
||
function fiFiCheck(tin) {
|
||
var full_year = tin.slice(4, 6);
|
||
var century_symbol = tin.slice(6, 7);
|
||
switch (century_symbol) {
|
||
case "+":
|
||
full_year = "18".concat(full_year);
|
||
break;
|
||
case "-":
|
||
full_year = "19".concat(full_year);
|
||
break;
|
||
default:
|
||
full_year = "20".concat(full_year);
|
||
break;
|
||
}
|
||
var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
var checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31;
|
||
if (checksum < 10) {
|
||
return checksum === parseInt(tin.slice(10), 10);
|
||
}
|
||
checksum -= 10;
|
||
var letters_lookup = ["A", "B", "C", "D", "E", "F", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y"];
|
||
return letters_lookup[checksum] === tin.slice(10);
|
||
}
|
||
function frBeCheck(tin) {
|
||
if (tin.slice(2, 4) !== "00" || tin.slice(4, 6) !== "00") {
|
||
var date = "".concat(tin.slice(0, 2), "/").concat(tin.slice(2, 4), "/").concat(tin.slice(4, 6));
|
||
if (!(0, _isDate.default)(date, "YY/MM/DD")) {
|
||
return false;
|
||
}
|
||
}
|
||
var checksum = 97 - parseInt(tin.slice(0, 9), 10) % 97;
|
||
var checkdigits = parseInt(tin.slice(9, 11), 10);
|
||
if (checksum !== checkdigits) {
|
||
checksum = 97 - parseInt("2".concat(tin.slice(0, 9)), 10) % 97;
|
||
if (checksum !== checkdigits) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function frFrCheck(tin) {
|
||
tin = tin.replace(/\s/g, "");
|
||
var checksum = parseInt(tin.slice(0, 10), 10) % 511;
|
||
var checkdigits = parseInt(tin.slice(10, 13), 10);
|
||
return checksum === checkdigits;
|
||
}
|
||
function frLuCheck(tin) {
|
||
var date = "".concat(tin.slice(0, 4), "/").concat(tin.slice(4, 6), "/").concat(tin.slice(6, 8));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
if (!algorithms.luhnCheck(tin.slice(0, 12))) {
|
||
return false;
|
||
}
|
||
return algorithms.verhoeffCheck("".concat(tin.slice(0, 11)).concat(tin[12]));
|
||
}
|
||
function hrHrCheck(tin) {
|
||
return algorithms.iso7064Check(tin);
|
||
}
|
||
function huHuCheck(tin) {
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var checksum = 8;
|
||
for (var i = 1; i < 9; i++) {
|
||
checksum += digits[i] * (i + 1);
|
||
}
|
||
return checksum % 11 === digits[9];
|
||
}
|
||
function itItNameCheck(name) {
|
||
var vowelflag = false;
|
||
var xflag = false;
|
||
for (var i = 0; i < 3; i++) {
|
||
if (!vowelflag && /[AEIOU]/.test(name[i])) {
|
||
vowelflag = true;
|
||
} else if (!xflag && vowelflag && name[i] === "X") {
|
||
xflag = true;
|
||
} else if (i > 0) {
|
||
if (vowelflag && !xflag) {
|
||
if (!/[AEIOU]/.test(name[i])) {
|
||
return false;
|
||
}
|
||
}
|
||
if (xflag) {
|
||
if (!/X/.test(name[i])) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function itItCheck(tin) {
|
||
var chars = tin.toUpperCase().split("");
|
||
if (!itItNameCheck(chars.slice(0, 3))) {
|
||
return false;
|
||
}
|
||
if (!itItNameCheck(chars.slice(3, 6))) {
|
||
return false;
|
||
}
|
||
var number_locations = [6, 7, 9, 10, 12, 13, 14];
|
||
var number_replace = {
|
||
L: "0",
|
||
M: "1",
|
||
N: "2",
|
||
P: "3",
|
||
Q: "4",
|
||
R: "5",
|
||
S: "6",
|
||
T: "7",
|
||
U: "8",
|
||
V: "9"
|
||
};
|
||
for (var _i4 = 0, _number_locations = number_locations; _i4 < _number_locations.length; _i4++) {
|
||
var i = _number_locations[_i4];
|
||
if (chars[i] in number_replace) {
|
||
chars.splice(i, 1, number_replace[chars[i]]);
|
||
}
|
||
}
|
||
var month_replace = {
|
||
A: "01",
|
||
B: "02",
|
||
C: "03",
|
||
D: "04",
|
||
E: "05",
|
||
H: "06",
|
||
L: "07",
|
||
M: "08",
|
||
P: "09",
|
||
R: "10",
|
||
S: "11",
|
||
T: "12"
|
||
};
|
||
var month = month_replace[chars[8]];
|
||
var day = parseInt(chars[9] + chars[10], 10);
|
||
if (day > 40) {
|
||
day -= 40;
|
||
}
|
||
if (day < 10) {
|
||
day = "0".concat(day);
|
||
}
|
||
var date = "".concat(chars[6]).concat(chars[7], "/").concat(month, "/").concat(day);
|
||
if (!(0, _isDate.default)(date, "YY/MM/DD")) {
|
||
return false;
|
||
}
|
||
var checksum = 0;
|
||
for (var _i5 = 1; _i5 < chars.length - 1; _i5 += 2) {
|
||
var char_to_int = parseInt(chars[_i5], 10);
|
||
if (isNaN(char_to_int)) {
|
||
char_to_int = chars[_i5].charCodeAt(0) - 65;
|
||
}
|
||
checksum += char_to_int;
|
||
}
|
||
var odd_convert = {
|
||
// Maps of characters at odd places
|
||
A: 1,
|
||
B: 0,
|
||
C: 5,
|
||
D: 7,
|
||
E: 9,
|
||
F: 13,
|
||
G: 15,
|
||
H: 17,
|
||
I: 19,
|
||
J: 21,
|
||
K: 2,
|
||
L: 4,
|
||
M: 18,
|
||
N: 20,
|
||
O: 11,
|
||
P: 3,
|
||
Q: 6,
|
||
R: 8,
|
||
S: 12,
|
||
T: 14,
|
||
U: 16,
|
||
V: 10,
|
||
W: 22,
|
||
X: 25,
|
||
Y: 24,
|
||
Z: 23,
|
||
0: 1,
|
||
1: 0
|
||
};
|
||
for (var _i6 = 0; _i6 < chars.length - 1; _i6 += 2) {
|
||
var _char_to_int = 0;
|
||
if (chars[_i6] in odd_convert) {
|
||
_char_to_int = odd_convert[chars[_i6]];
|
||
} else {
|
||
var multiplier = parseInt(chars[_i6], 10);
|
||
_char_to_int = 2 * multiplier + 1;
|
||
if (multiplier > 4) {
|
||
_char_to_int += 2;
|
||
}
|
||
}
|
||
checksum += _char_to_int;
|
||
}
|
||
if (String.fromCharCode(65 + checksum % 26) !== chars[15]) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function lvLvCheck(tin) {
|
||
tin = tin.replace(/\W/, "");
|
||
var day = tin.slice(0, 2);
|
||
if (day !== "32") {
|
||
var month = tin.slice(2, 4);
|
||
if (month !== "00") {
|
||
var full_year = tin.slice(4, 6);
|
||
switch (tin[6]) {
|
||
case "0":
|
||
full_year = "18".concat(full_year);
|
||
break;
|
||
case "1":
|
||
full_year = "19".concat(full_year);
|
||
break;
|
||
default:
|
||
full_year = "20".concat(full_year);
|
||
break;
|
||
}
|
||
var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(day);
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
}
|
||
var checksum = 1101;
|
||
var multip_lookup = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
|
||
for (var i = 0; i < tin.length - 1; i++) {
|
||
checksum -= parseInt(tin[i], 10) * multip_lookup[i];
|
||
}
|
||
return parseInt(tin[10], 10) === checksum % 11;
|
||
}
|
||
return true;
|
||
}
|
||
function mtMtCheck(tin) {
|
||
if (tin.length !== 9) {
|
||
var chars = tin.toUpperCase().split("");
|
||
while (chars.length < 8) {
|
||
chars.unshift(0);
|
||
}
|
||
switch (tin[7]) {
|
||
case "A":
|
||
case "P":
|
||
if (parseInt(chars[6], 10) === 0) {
|
||
return false;
|
||
}
|
||
break;
|
||
default: {
|
||
var first_part = parseInt(chars.join("").slice(0, 5), 10);
|
||
if (first_part > 32e3) {
|
||
return false;
|
||
}
|
||
var second_part = parseInt(chars.join("").slice(5, 7), 10);
|
||
if (first_part === second_part) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function nlNlCheck(tin) {
|
||
return algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 8).map(function(a) {
|
||
return parseInt(a, 10);
|
||
}), 9) % 11 === parseInt(tin[8], 10);
|
||
}
|
||
function plPlCheck(tin) {
|
||
if (tin.length === 10) {
|
||
var lookup = [6, 5, 7, 2, 3, 4, 5, 6, 7];
|
||
var _checksum = 0;
|
||
for (var i = 0; i < lookup.length; i++) {
|
||
_checksum += parseInt(tin[i], 10) * lookup[i];
|
||
}
|
||
_checksum %= 11;
|
||
if (_checksum === 10) {
|
||
return false;
|
||
}
|
||
return _checksum === parseInt(tin[9], 10);
|
||
}
|
||
var full_year = tin.slice(0, 2);
|
||
var month = parseInt(tin.slice(2, 4), 10);
|
||
if (month > 80) {
|
||
full_year = "18".concat(full_year);
|
||
month -= 80;
|
||
} else if (month > 60) {
|
||
full_year = "22".concat(full_year);
|
||
month -= 60;
|
||
} else if (month > 40) {
|
||
full_year = "21".concat(full_year);
|
||
month -= 40;
|
||
} else if (month > 20) {
|
||
full_year = "20".concat(full_year);
|
||
month -= 20;
|
||
} else {
|
||
full_year = "19".concat(full_year);
|
||
}
|
||
if (month < 10) {
|
||
month = "0".concat(month);
|
||
}
|
||
var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
var checksum = 0;
|
||
var multiplier = 1;
|
||
for (var _i7 = 0; _i7 < tin.length - 1; _i7++) {
|
||
checksum += parseInt(tin[_i7], 10) * multiplier % 10;
|
||
multiplier += 2;
|
||
if (multiplier > 10) {
|
||
multiplier = 1;
|
||
} else if (multiplier === 5) {
|
||
multiplier += 2;
|
||
}
|
||
}
|
||
checksum = 10 - checksum % 10;
|
||
return checksum === parseInt(tin[10], 10);
|
||
}
|
||
function ptBrCheck(tin) {
|
||
if (tin.length === 11) {
|
||
var _sum;
|
||
var remainder;
|
||
_sum = 0;
|
||
if (
|
||
// Reject known invalid CPFs
|
||
tin === "11111111111" || tin === "22222222222" || tin === "33333333333" || tin === "44444444444" || tin === "55555555555" || tin === "66666666666" || tin === "77777777777" || tin === "88888888888" || tin === "99999999999" || tin === "00000000000"
|
||
)
|
||
return false;
|
||
for (var i = 1; i <= 9; i++)
|
||
_sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i);
|
||
remainder = _sum * 10 % 11;
|
||
if (remainder === 10)
|
||
remainder = 0;
|
||
if (remainder !== parseInt(tin.substring(9, 10), 10))
|
||
return false;
|
||
_sum = 0;
|
||
for (var _i8 = 1; _i8 <= 10; _i8++)
|
||
_sum += parseInt(tin.substring(_i8 - 1, _i8), 10) * (12 - _i8);
|
||
remainder = _sum * 10 % 11;
|
||
if (remainder === 10)
|
||
remainder = 0;
|
||
if (remainder !== parseInt(tin.substring(10, 11), 10))
|
||
return false;
|
||
return true;
|
||
}
|
||
if (
|
||
// Reject know invalid CNPJs
|
||
tin === "00000000000000" || tin === "11111111111111" || tin === "22222222222222" || tin === "33333333333333" || tin === "44444444444444" || tin === "55555555555555" || tin === "66666666666666" || tin === "77777777777777" || tin === "88888888888888" || tin === "99999999999999"
|
||
) {
|
||
return false;
|
||
}
|
||
var length = tin.length - 2;
|
||
var identifiers = tin.substring(0, length);
|
||
var verificators = tin.substring(length);
|
||
var sum = 0;
|
||
var pos = length - 7;
|
||
for (var _i9 = length; _i9 >= 1; _i9--) {
|
||
sum += identifiers.charAt(length - _i9) * pos;
|
||
pos -= 1;
|
||
if (pos < 2) {
|
||
pos = 9;
|
||
}
|
||
}
|
||
var result = sum % 11 < 2 ? 0 : 11 - sum % 11;
|
||
if (result !== parseInt(verificators.charAt(0), 10)) {
|
||
return false;
|
||
}
|
||
length += 1;
|
||
identifiers = tin.substring(0, length);
|
||
sum = 0;
|
||
pos = length - 7;
|
||
for (var _i10 = length; _i10 >= 1; _i10--) {
|
||
sum += identifiers.charAt(length - _i10) * pos;
|
||
pos -= 1;
|
||
if (pos < 2) {
|
||
pos = 9;
|
||
}
|
||
}
|
||
result = sum % 11 < 2 ? 0 : 11 - sum % 11;
|
||
if (result !== parseInt(verificators.charAt(1), 10)) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
function ptPtCheck(tin) {
|
||
var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 8).map(function(a) {
|
||
return parseInt(a, 10);
|
||
}), 9) % 11;
|
||
if (checksum > 9) {
|
||
return parseInt(tin[8], 10) === 0;
|
||
}
|
||
return checksum === parseInt(tin[8], 10);
|
||
}
|
||
function roRoCheck(tin) {
|
||
if (tin.slice(0, 4) !== "9000") {
|
||
var full_year = tin.slice(1, 3);
|
||
switch (tin[0]) {
|
||
case "1":
|
||
case "2":
|
||
full_year = "19".concat(full_year);
|
||
break;
|
||
case "3":
|
||
case "4":
|
||
full_year = "18".concat(full_year);
|
||
break;
|
||
case "5":
|
||
case "6":
|
||
full_year = "20".concat(full_year);
|
||
break;
|
||
default:
|
||
}
|
||
var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7));
|
||
if (date.length === 8) {
|
||
if (!(0, _isDate.default)(date, "YY/MM/DD")) {
|
||
return false;
|
||
}
|
||
} else if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9];
|
||
var checksum = 0;
|
||
for (var i = 0; i < multipliers.length; i++) {
|
||
checksum += digits[i] * multipliers[i];
|
||
}
|
||
if (checksum % 11 === 10) {
|
||
return digits[12] === 1;
|
||
}
|
||
return digits[12] === checksum % 11;
|
||
}
|
||
return true;
|
||
}
|
||
function skSkCheck(tin) {
|
||
if (tin.length === 9) {
|
||
tin = tin.replace(/\W/, "");
|
||
if (tin.slice(6) === "000") {
|
||
return false;
|
||
}
|
||
var full_year = parseInt(tin.slice(0, 2), 10);
|
||
if (full_year > 53) {
|
||
return false;
|
||
}
|
||
if (full_year < 10) {
|
||
full_year = "190".concat(full_year);
|
||
} else {
|
||
full_year = "19".concat(full_year);
|
||
}
|
||
var month = parseInt(tin.slice(2, 4), 10);
|
||
if (month > 50) {
|
||
month -= 50;
|
||
}
|
||
if (month < 10) {
|
||
month = "0".concat(month);
|
||
}
|
||
var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6));
|
||
if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function slSiCheck(tin) {
|
||
var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 7).map(function(a) {
|
||
return parseInt(a, 10);
|
||
}), 8) % 11;
|
||
if (checksum === 10) {
|
||
return parseInt(tin[7], 10) === 0;
|
||
}
|
||
return checksum === parseInt(tin[7], 10);
|
||
}
|
||
function svSeCheck(tin) {
|
||
var tin_copy = tin.slice(0);
|
||
if (tin.length > 11) {
|
||
tin_copy = tin_copy.slice(2);
|
||
}
|
||
var full_year = "";
|
||
var month = tin_copy.slice(2, 4);
|
||
var day = parseInt(tin_copy.slice(4, 6), 10);
|
||
if (tin.length > 11) {
|
||
full_year = tin.slice(0, 4);
|
||
} else {
|
||
full_year = tin.slice(0, 2);
|
||
if (tin.length === 11 && day < 60) {
|
||
var current_year = new Date().getFullYear().toString();
|
||
var current_century = parseInt(current_year.slice(0, 2), 10);
|
||
current_year = parseInt(current_year, 10);
|
||
if (tin[6] === "-") {
|
||
if (parseInt("".concat(current_century).concat(full_year), 10) > current_year) {
|
||
full_year = "".concat(current_century - 1).concat(full_year);
|
||
} else {
|
||
full_year = "".concat(current_century).concat(full_year);
|
||
}
|
||
} else {
|
||
full_year = "".concat(current_century - 1).concat(full_year);
|
||
if (current_year - parseInt(full_year, 10) < 100) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (day > 60) {
|
||
day -= 60;
|
||
}
|
||
if (day < 10) {
|
||
day = "0".concat(day);
|
||
}
|
||
var date = "".concat(full_year, "/").concat(month, "/").concat(day);
|
||
if (date.length === 8) {
|
||
if (!(0, _isDate.default)(date, "YY/MM/DD")) {
|
||
return false;
|
||
}
|
||
} else if (!(0, _isDate.default)(date, "YYYY/MM/DD")) {
|
||
return false;
|
||
}
|
||
return algorithms.luhnCheck(tin.replace(/\W/, ""));
|
||
}
|
||
function ukUaCheck(tin) {
|
||
var digits = tin.split("").map(function(a) {
|
||
return parseInt(a, 10);
|
||
});
|
||
var multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7];
|
||
var checksum = 0;
|
||
for (var i = 0; i < multipliers.length; i++) {
|
||
checksum += digits[i] * multipliers[i];
|
||
}
|
||
return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11;
|
||
}
|
||
var taxIdFormat = {
|
||
"bg-BG": /^\d{10}$/,
|
||
"cs-CZ": /^\d{6}\/{0,1}\d{3,4}$/,
|
||
"de-AT": /^\d{9}$/,
|
||
"de-DE": /^[1-9]\d{10}$/,
|
||
"dk-DK": /^\d{6}-{0,1}\d{4}$/,
|
||
"el-CY": /^[09]\d{7}[A-Z]$/,
|
||
"el-GR": /^([0-4]|[7-9])\d{8}$/,
|
||
"en-CA": /^\d{9}$/,
|
||
"en-GB": /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,
|
||
"en-IE": /^\d{7}[A-W][A-IW]{0,1}$/i,
|
||
"en-US": /^\d{2}[- ]{0,1}\d{7}$/,
|
||
"es-AR": /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,
|
||
"es-ES": /^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,
|
||
"et-EE": /^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,
|
||
"fi-FI": /^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,
|
||
"fr-BE": /^\d{11}$/,
|
||
"fr-FR": /^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,
|
||
// Conforms both to official spec and provided example
|
||
"fr-LU": /^\d{13}$/,
|
||
"hr-HR": /^\d{11}$/,
|
||
"hu-HU": /^8\d{9}$/,
|
||
"it-IT": /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,
|
||
"lv-LV": /^\d{6}-{0,1}\d{5}$/,
|
||
// Conforms both to DG TAXUD spec and original research
|
||
"mt-MT": /^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,
|
||
"nl-NL": /^\d{9}$/,
|
||
"pl-PL": /^\d{10,11}$/,
|
||
"pt-BR": /(?:^\d{11}$)|(?:^\d{14}$)/,
|
||
"pt-PT": /^\d{9}$/,
|
||
"ro-RO": /^\d{13}$/,
|
||
"sk-SK": /^\d{6}\/{0,1}\d{3,4}$/,
|
||
"sl-SI": /^[1-9]\d{7}$/,
|
||
"sv-SE": /^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/,
|
||
"uk-UA": /^\d{10}$/
|
||
};
|
||
taxIdFormat["lb-LU"] = taxIdFormat["fr-LU"];
|
||
taxIdFormat["lt-LT"] = taxIdFormat["et-EE"];
|
||
taxIdFormat["nl-BE"] = taxIdFormat["fr-BE"];
|
||
taxIdFormat["fr-CA"] = taxIdFormat["en-CA"];
|
||
var taxIdCheck = {
|
||
"bg-BG": bgBgCheck,
|
||
"cs-CZ": csCzCheck,
|
||
"de-AT": deAtCheck,
|
||
"de-DE": deDeCheck,
|
||
"dk-DK": dkDkCheck,
|
||
"el-CY": elCyCheck,
|
||
"el-GR": elGrCheck,
|
||
"en-CA": isCanadianSIN,
|
||
"en-IE": enIeCheck,
|
||
"en-US": enUsCheck,
|
||
"es-AR": esArCheck,
|
||
"es-ES": esEsCheck,
|
||
"et-EE": etEeCheck,
|
||
"fi-FI": fiFiCheck,
|
||
"fr-BE": frBeCheck,
|
||
"fr-FR": frFrCheck,
|
||
"fr-LU": frLuCheck,
|
||
"hr-HR": hrHrCheck,
|
||
"hu-HU": huHuCheck,
|
||
"it-IT": itItCheck,
|
||
"lv-LV": lvLvCheck,
|
||
"mt-MT": mtMtCheck,
|
||
"nl-NL": nlNlCheck,
|
||
"pl-PL": plPlCheck,
|
||
"pt-BR": ptBrCheck,
|
||
"pt-PT": ptPtCheck,
|
||
"ro-RO": roRoCheck,
|
||
"sk-SK": skSkCheck,
|
||
"sl-SI": slSiCheck,
|
||
"sv-SE": svSeCheck,
|
||
"uk-UA": ukUaCheck
|
||
};
|
||
taxIdCheck["lb-LU"] = taxIdCheck["fr-LU"];
|
||
taxIdCheck["lt-LT"] = taxIdCheck["et-EE"];
|
||
taxIdCheck["nl-BE"] = taxIdCheck["fr-BE"];
|
||
taxIdCheck["fr-CA"] = taxIdCheck["en-CA"];
|
||
var allsymbols = /[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g;
|
||
var sanitizeRegexes = {
|
||
"de-AT": allsymbols,
|
||
"de-DE": /[\/\\]/g,
|
||
"fr-BE": allsymbols
|
||
};
|
||
sanitizeRegexes["nl-BE"] = sanitizeRegexes["fr-BE"];
|
||
function isTaxID(str) {
|
||
var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
|
||
(0, _assertString.default)(str);
|
||
var strcopy = str.slice(0);
|
||
if (locale in taxIdFormat) {
|
||
if (locale in sanitizeRegexes) {
|
||
strcopy = strcopy.replace(sanitizeRegexes[locale], "");
|
||
}
|
||
if (!taxIdFormat[locale].test(strcopy)) {
|
||
return false;
|
||
}
|
||
if (locale in taxIdCheck) {
|
||
return taxIdCheck[locale](strcopy);
|
||
}
|
||
return true;
|
||
}
|
||
throw new Error("Invalid locale '".concat(locale, "'"));
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMobilePhone.js
|
||
var require_isMobilePhone = __commonJS({
|
||
"node_modules/validator/lib/isMobilePhone.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMobilePhone;
|
||
exports.locales = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var phones = {
|
||
"am-AM": /^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,
|
||
"ar-AE": /^((\+?971)|0)?5[024568]\d{7}$/,
|
||
"ar-BH": /^(\+?973)?(3|6)\d{7}$/,
|
||
"ar-DZ": /^(\+?213|0)(5|6|7)\d{8}$/,
|
||
"ar-LB": /^(\+?961)?((3|81)\d{6}|7\d{7})$/,
|
||
"ar-EG": /^((\+?20)|0)?1[0125]\d{8}$/,
|
||
"ar-IQ": /^(\+?964|0)?7[0-9]\d{8}$/,
|
||
"ar-JO": /^(\+?962|0)?7[789]\d{7}$/,
|
||
"ar-KW": /^(\+?965)([569]\d{7}|41\d{6})$/,
|
||
"ar-LY": /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,
|
||
"ar-MA": /^(?:(?:\+|00)212|0)[5-7]\d{8}$/,
|
||
"ar-OM": /^((\+|00)968)?(9[1-9])\d{6}$/,
|
||
"ar-PS": /^(\+?970|0)5[6|9](\d{7})$/,
|
||
"ar-SA": /^(!?(\+?966)|0)?5\d{8}$/,
|
||
"ar-SD": /^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,
|
||
"ar-SY": /^(!?(\+?963)|0)?9\d{8}$/,
|
||
"ar-TN": /^(\+?216)?[2459]\d{7}$/,
|
||
"az-AZ": /^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,
|
||
"bs-BA": /^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,
|
||
"be-BY": /^(\+?375)?(24|25|29|33|44)\d{7}$/,
|
||
"bg-BG": /^(\+?359|0)?8[789]\d{7}$/,
|
||
"bn-BD": /^(\+?880|0)1[13456789][0-9]{8}$/,
|
||
"ca-AD": /^(\+376)?[346]\d{5}$/,
|
||
"cs-CZ": /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
|
||
"da-DK": /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
||
"de-DE": /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,
|
||
"de-AT": /^(\+43|0)\d{1,4}\d{3,12}$/,
|
||
"de-CH": /^(\+41|0)([1-9])\d{1,9}$/,
|
||
"de-LU": /^(\+352)?((6\d1)\d{6})$/,
|
||
"dv-MV": /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,
|
||
"el-GR": /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,
|
||
"el-CY": /^(\+?357?)?(9(9|6)\d{6})$/,
|
||
"en-AI": /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,
|
||
"en-AU": /^(\+?61|0)4\d{8}$/,
|
||
"en-AG": /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,
|
||
"en-BM": /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,
|
||
"en-BS": /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,
|
||
"en-GB": /^(\+?44|0)7\d{9}$/,
|
||
"en-GG": /^(\+?44|0)1481\d{6}$/,
|
||
"en-GH": /^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,
|
||
"en-GY": /^(\+592|0)6\d{6}$/,
|
||
"en-HK": /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,
|
||
"en-MO": /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,
|
||
"en-IE": /^(\+?353|0)8[356789]\d{7}$/,
|
||
"en-IN": /^(\+?91|0)?[6789]\d{9}$/,
|
||
"en-JM": /^(\+?876)?\d{7}$/,
|
||
"en-KE": /^(\+?254|0)(7|1)\d{8}$/,
|
||
"fr-CF": /^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,
|
||
"en-SS": /^(\+?211|0)(9[1257])\d{7}$/,
|
||
"en-KI": /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,
|
||
"en-KN": /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,
|
||
"en-LS": /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,
|
||
"en-MT": /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,
|
||
"en-MU": /^(\+?230|0)?\d{8}$/,
|
||
"en-MW": /^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,
|
||
"en-NA": /^(\+?264|0)(6|8)\d{7}$/,
|
||
"en-NG": /^(\+?234|0)?[789]\d{9}$/,
|
||
"en-NZ": /^(\+?64|0)[28]\d{7,9}$/,
|
||
"en-PG": /^(\+?675|0)?(7\d|8[18])\d{6}$/,
|
||
"en-PK": /^((00|\+)?92|0)3[0-6]\d{8}$/,
|
||
"en-PH": /^(09|\+639)\d{9}$/,
|
||
"en-RW": /^(\+?250|0)?[7]\d{8}$/,
|
||
"en-SG": /^(\+65)?[3689]\d{7}$/,
|
||
"en-SL": /^(\+?232|0)\d{8}$/,
|
||
"en-TZ": /^(\+?255|0)?[67]\d{8}$/,
|
||
"en-UG": /^(\+?256|0)?[7]\d{8}$/,
|
||
"en-US": /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,
|
||
"en-ZA": /^(\+?27|0)\d{9}$/,
|
||
"en-ZM": /^(\+?26)?09[567]\d{7}$/,
|
||
"en-ZW": /^(\+263)[0-9]{9}$/,
|
||
"en-BW": /^(\+?267)?(7[1-8]{1})\d{6}$/,
|
||
"es-AR": /^\+?549(11|[2368]\d)\d{8}$/,
|
||
"es-BO": /^(\+?591)?(6|7)\d{7}$/,
|
||
"es-CO": /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,
|
||
"es-CL": /^(\+?56|0)[2-9]\d{1}\d{7}$/,
|
||
"es-CR": /^(\+506)?[2-8]\d{7}$/,
|
||
"es-CU": /^(\+53|0053)?5\d{7}$/,
|
||
"es-DO": /^(\+?1)?8[024]9\d{7}$/,
|
||
"es-HN": /^(\+?504)?[9|8|3|2]\d{7}$/,
|
||
"es-EC": /^(\+?593|0)([2-7]|9[2-9])\d{7}$/,
|
||
"es-ES": /^(\+?34)?[6|7]\d{8}$/,
|
||
"es-PE": /^(\+?51)?9\d{8}$/,
|
||
"es-MX": /^(\+?52)?(1|01)?\d{10,11}$/,
|
||
"es-NI": /^(\+?505)\d{7,8}$/,
|
||
"es-PA": /^(\+?507)\d{7,8}$/,
|
||
"es-PY": /^(\+?595|0)9[9876]\d{7}$/,
|
||
"es-SV": /^(\+?503)?[67]\d{7}$/,
|
||
"es-UY": /^(\+598|0)9[1-9][\d]{6}$/,
|
||
"es-VE": /^(\+?58)?(2|4)\d{9}$/,
|
||
"et-EE": /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,
|
||
"fa-IR": /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,
|
||
"fi-FI": /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,
|
||
"fj-FJ": /^(\+?679)?\s?\d{3}\s?\d{4}$/,
|
||
"fo-FO": /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
||
"fr-BF": /^(\+226|0)[67]\d{7}$/,
|
||
"fr-BJ": /^(\+229)\d{8}$/,
|
||
"fr-CD": /^(\+?243|0)?(8|9)\d{8}$/,
|
||
"fr-CM": /^(\+?237)6[0-9]{8}$/,
|
||
"fr-FR": /^(\+?33|0)[67]\d{8}$/,
|
||
"fr-GF": /^(\+?594|0|00594)[67]\d{8}$/,
|
||
"fr-GP": /^(\+?590|0|00590)[67]\d{8}$/,
|
||
"fr-MQ": /^(\+?596|0|00596)[67]\d{8}$/,
|
||
"fr-PF": /^(\+?689)?8[789]\d{6}$/,
|
||
"fr-RE": /^(\+?262|0|00262)[67]\d{8}$/,
|
||
"fr-WF": /^(\+681)?\d{6}$/,
|
||
"he-IL": /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,
|
||
"hu-HU": /^(\+?36|06)(20|30|31|50|70)\d{7}$/,
|
||
"id-ID": /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,
|
||
"ir-IR": /^(\+98|0)?9\d{9}$/,
|
||
"it-IT": /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
|
||
"it-SM": /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,
|
||
"ja-JP": /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
|
||
"ka-GE": /^(\+?995)?(79\d{7}|5\d{8})$/,
|
||
"kk-KZ": /^(\+?7|8)?7\d{9}$/,
|
||
"kl-GL": /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
||
"ko-KR": /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,
|
||
"ky-KG": /^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,
|
||
"lt-LT": /^(\+370|8)\d{8}$/,
|
||
"lv-LV": /^(\+?371)2\d{7}$/,
|
||
"mg-MG": /^((\+?261|0)(2|3)\d)?\d{7}$/,
|
||
"mn-MN": /^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,
|
||
"my-MM": /^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,
|
||
"ms-MY": /^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,
|
||
"mz-MZ": /^(\+?258)?8[234567]\d{7}$/,
|
||
"nb-NO": /^(\+?47)?[49]\d{7}$/,
|
||
"ne-NP": /^(\+?977)?9[78]\d{8}$/,
|
||
"nl-BE": /^(\+?32|0)4\d{8}$/,
|
||
"nl-NL": /^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,
|
||
"nl-AW": /^(\+)?297(56|59|64|73|74|99)\d{5}$/,
|
||
"nn-NO": /^(\+?47)?[49]\d{7}$/,
|
||
"pl-PL": /^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,
|
||
"pt-BR": /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,
|
||
"pt-PT": /^(\+?351)?9[1236]\d{7}$/,
|
||
"pt-AO": /^(\+244)\d{9}$/,
|
||
"ro-MD": /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,
|
||
"ro-RO": /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,
|
||
"ru-RU": /^(\+?7|8)?9\d{9}$/,
|
||
"si-LK": /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,
|
||
"sl-SI": /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,
|
||
"sk-SK": /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
|
||
"so-SO": /^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,
|
||
"sq-AL": /^(\+355|0)6[789]\d{6}$/,
|
||
"sr-RS": /^(\+3816|06)[- \d]{5,9}$/,
|
||
"sv-SE": /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,
|
||
"tg-TJ": /^(\+?992)?[5][5]\d{7}$/,
|
||
"th-TH": /^(\+66|66|0)\d{9}$/,
|
||
"tr-TR": /^(\+?90|0)?5\d{9}$/,
|
||
"tk-TM": /^(\+993|993|8)\d{8}$/,
|
||
"uk-UA": /^(\+?38|8)?0\d{9}$/,
|
||
"uz-UZ": /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
|
||
"vi-VN": /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
|
||
"zh-CN": /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,
|
||
"zh-TW": /^(\+?886\-?|0)?9\d{8}$/,
|
||
"dz-BT": /^(\+?975|0)?(17|16|77|02)\d{6}$/,
|
||
"ar-YE": /^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,
|
||
"ar-EH": /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,
|
||
"fa-AF": /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/
|
||
};
|
||
phones["en-CA"] = phones["en-US"];
|
||
phones["fr-CA"] = phones["en-CA"];
|
||
phones["fr-BE"] = phones["nl-BE"];
|
||
phones["zh-HK"] = phones["en-HK"];
|
||
phones["zh-MO"] = phones["en-MO"];
|
||
phones["ga-IE"] = phones["en-IE"];
|
||
phones["fr-CH"] = phones["de-CH"];
|
||
phones["it-CH"] = phones["fr-CH"];
|
||
function isMobilePhone(str, locale, options) {
|
||
(0, _assertString.default)(str);
|
||
if (options && options.strictMode && !str.startsWith("+")) {
|
||
return false;
|
||
}
|
||
if (Array.isArray(locale)) {
|
||
return locale.some(function(key3) {
|
||
if (phones.hasOwnProperty(key3)) {
|
||
var phone2 = phones[key3];
|
||
if (phone2.test(str)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
});
|
||
} else if (locale in phones) {
|
||
return phones[locale].test(str);
|
||
} else if (!locale || locale === "any") {
|
||
for (var key2 in phones) {
|
||
if (phones.hasOwnProperty(key2)) {
|
||
var phone = phones[key2];
|
||
if (phone.test(str)) {
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
throw new Error("Invalid locale '".concat(locale, "'"));
|
||
}
|
||
var locales = exports.locales = Object.keys(phones);
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isEthereumAddress.js
|
||
var require_isEthereumAddress = __commonJS({
|
||
"node_modules/validator/lib/isEthereumAddress.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isEthereumAddress;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var eth = /^(0x)[0-9a-f]{40}$/i;
|
||
function isEthereumAddress(str) {
|
||
(0, _assertString.default)(str);
|
||
return eth.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isCurrency.js
|
||
var require_isCurrency = __commonJS({
|
||
"node_modules/validator/lib/isCurrency.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isCurrency;
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function currencyRegex(options) {
|
||
var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}");
|
||
options.digits_after_decimal.forEach(function(digit, index2) {
|
||
if (index2 !== 0)
|
||
decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}");
|
||
});
|
||
var symbol = "(".concat(options.symbol.replace(/\W/, function(m) {
|
||
return "\\".concat(m);
|
||
}), ")").concat(options.require_symbol ? "" : "?"), negative = "-?", whole_dollar_amount_without_sep = "[1-9]\\d*", whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"), valid_whole_dollar_amounts = ["0", whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join("|"), ")?"), decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? "" : "?");
|
||
var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : "");
|
||
if (options.allow_negatives && !options.parens_for_negatives) {
|
||
if (options.negative_sign_after_digits) {
|
||
pattern += negative;
|
||
} else if (options.negative_sign_before_digits) {
|
||
pattern = negative + pattern;
|
||
}
|
||
}
|
||
if (options.allow_negative_sign_placeholder) {
|
||
pattern = "( (?!\\-))?".concat(pattern);
|
||
} else if (options.allow_space_after_symbol) {
|
||
pattern = " ?".concat(pattern);
|
||
} else if (options.allow_space_after_digits) {
|
||
pattern += "( (?!$))?";
|
||
}
|
||
if (options.symbol_after_digits) {
|
||
pattern += symbol;
|
||
} else {
|
||
pattern = symbol + pattern;
|
||
}
|
||
if (options.allow_negatives) {
|
||
if (options.parens_for_negatives) {
|
||
pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")");
|
||
} else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) {
|
||
pattern = negative + pattern;
|
||
}
|
||
}
|
||
return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$"));
|
||
}
|
||
var default_currency_options = {
|
||
symbol: "$",
|
||
require_symbol: false,
|
||
allow_space_after_symbol: false,
|
||
symbol_after_digits: false,
|
||
allow_negatives: true,
|
||
parens_for_negatives: false,
|
||
negative_sign_before_digits: false,
|
||
negative_sign_after_digits: false,
|
||
allow_negative_sign_placeholder: false,
|
||
thousands_separator: ",",
|
||
decimal_separator: ".",
|
||
allow_decimal: true,
|
||
require_decimal: false,
|
||
digits_after_decimal: [2],
|
||
allow_space_after_digits: false
|
||
};
|
||
function isCurrency(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, default_currency_options);
|
||
return currencyRegex(options).test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isBtcAddress.js
|
||
var require_isBtcAddress = __commonJS({
|
||
"node_modules/validator/lib/isBtcAddress.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isBtcAddress;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var bech32 = /^(bc1)[a-z0-9]{25,39}$/;
|
||
var base58 = /^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;
|
||
function isBtcAddress(str) {
|
||
(0, _assertString.default)(str);
|
||
return bech32.test(str) || base58.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISO6346.js
|
||
var require_isISO6346 = __commonJS({
|
||
"node_modules/validator/lib/isISO6346.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.isFreightContainerID = void 0;
|
||
exports.isISO6346 = isISO6346;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var isISO6346Str = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/;
|
||
var isDigit = /^[0-9]$/;
|
||
function isISO6346(str) {
|
||
(0, _assertString.default)(str);
|
||
str = str.toUpperCase();
|
||
if (!isISO6346Str.test(str))
|
||
return false;
|
||
if (str.length === 11) {
|
||
var sum = 0;
|
||
for (var i = 0; i < str.length - 1; i++) {
|
||
if (!isDigit.test(str[i])) {
|
||
var convertedCode = void 0;
|
||
var letterCode = str.charCodeAt(i) - 55;
|
||
if (letterCode < 11)
|
||
convertedCode = letterCode;
|
||
else if (letterCode >= 11 && letterCode <= 20)
|
||
convertedCode = 12 + letterCode % 11;
|
||
else if (letterCode >= 21 && letterCode <= 30)
|
||
convertedCode = 23 + letterCode % 21;
|
||
else
|
||
convertedCode = 34 + letterCode % 31;
|
||
sum += convertedCode * Math.pow(2, i);
|
||
} else
|
||
sum += str[i] * Math.pow(2, i);
|
||
}
|
||
var checkSumDigit = sum % 11;
|
||
return Number(str[str.length - 1]) === checkSumDigit;
|
||
}
|
||
return true;
|
||
}
|
||
var isFreightContainerID = exports.isFreightContainerID = isISO6346;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISO6391.js
|
||
var require_isISO6391 = __commonJS({
|
||
"node_modules/validator/lib/isISO6391.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isISO6391;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var isISO6391Set = /* @__PURE__ */ new Set(["aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu"]);
|
||
function isISO6391(str) {
|
||
(0, _assertString.default)(str);
|
||
return isISO6391Set.has(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISO8601.js
|
||
var require_isISO8601 = __commonJS({
|
||
"node_modules/validator/lib/isISO8601.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isISO8601;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
|
||
var iso8601StrictSeparator = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
|
||
var isValidDate = function isValidDate2(str) {
|
||
var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);
|
||
if (ordinalMatch) {
|
||
var oYear = Number(ordinalMatch[1]);
|
||
var oDay = Number(ordinalMatch[2]);
|
||
if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0)
|
||
return oDay <= 366;
|
||
return oDay <= 365;
|
||
}
|
||
var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number);
|
||
var year = match[1];
|
||
var month = match[2];
|
||
var day = match[3];
|
||
var monthString = month ? "0".concat(month).slice(-2) : month;
|
||
var dayString = day ? "0".concat(day).slice(-2) : day;
|
||
var d = new Date("".concat(year, "-").concat(monthString || "01", "-").concat(dayString || "01"));
|
||
if (month && day) {
|
||
return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day;
|
||
}
|
||
return true;
|
||
};
|
||
function isISO8601(str) {
|
||
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
||
(0, _assertString.default)(str);
|
||
var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str);
|
||
if (check && options.strict)
|
||
return isValidDate(str);
|
||
return check;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isRFC3339.js
|
||
var require_isRFC3339 = __commonJS({
|
||
"node_modules/validator/lib/isRFC3339.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isRFC3339;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var dateFullYear = /[0-9]{4}/;
|
||
var dateMonth = /(0[1-9]|1[0-2])/;
|
||
var dateMDay = /([12]\d|0[1-9]|3[01])/;
|
||
var timeHour = /([01][0-9]|2[0-3])/;
|
||
var timeMinute = /[0-5][0-9]/;
|
||
var timeSecond = /([0-5][0-9]|60)/;
|
||
var timeSecFrac = /(\.[0-9]+)?/;
|
||
var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source));
|
||
var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")"));
|
||
var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source));
|
||
var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source));
|
||
var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source));
|
||
var rfc3339 = new RegExp("^".concat(fullDate.source, "[ tT]").concat(fullTime.source, "$"));
|
||
function isRFC3339(str) {
|
||
(0, _assertString.default)(str);
|
||
return rfc3339.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISO31661Alpha3.js
|
||
var require_isISO31661Alpha3 = __commonJS({
|
||
"node_modules/validator/lib/isISO31661Alpha3.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isISO31661Alpha3;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var validISO31661Alpha3CountriesCodes = /* @__PURE__ */ new Set(["AFG", "ALA", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "KHM", "CMR", "CAN", "CPV", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COG", "COD", "COK", "CRI", "CIV", "HRV", "CUB", "CUW", "CYP", "CZE", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MKD", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "REU", "ROU", "RUS", "RWA", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWZ", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "USA", "UMI", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE"]);
|
||
function isISO31661Alpha3(str) {
|
||
(0, _assertString.default)(str);
|
||
return validISO31661Alpha3CountriesCodes.has(str.toUpperCase());
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isISO4217.js
|
||
var require_isISO4217 = __commonJS({
|
||
"node_modules/validator/lib/isISO4217.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.CurrencyCodes = void 0;
|
||
exports.default = isISO4217;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var validISO4217CurrencyCodes = /* @__PURE__ */ new Set(["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLE", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW", "ZWL"]);
|
||
function isISO4217(str) {
|
||
(0, _assertString.default)(str);
|
||
return validISO4217CurrencyCodes.has(str.toUpperCase());
|
||
}
|
||
var CurrencyCodes = exports.CurrencyCodes = validISO4217CurrencyCodes;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isBase32.js
|
||
var require_isBase32 = __commonJS({
|
||
"node_modules/validator/lib/isBase32.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isBase32;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var base32 = /^[A-Z2-7]+=*$/;
|
||
var crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/;
|
||
var defaultBase32Options = {
|
||
crockford: false
|
||
};
|
||
function isBase32(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, defaultBase32Options);
|
||
if (options.crockford) {
|
||
return crockfordBase32.test(str);
|
||
}
|
||
var len = str.length;
|
||
if (len % 8 === 0 && base32.test(str)) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isBase58.js
|
||
var require_isBase58 = __commonJS({
|
||
"node_modules/validator/lib/isBase58.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isBase58;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/;
|
||
function isBase58(str) {
|
||
(0, _assertString.default)(str);
|
||
if (base58Reg.test(str)) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isDataURI.js
|
||
var require_isDataURI = __commonJS({
|
||
"node_modules/validator/lib/isDataURI.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isDataURI;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var validMediaType = /^[a-z]+\/[a-z0-9\-\+\._]+$/i;
|
||
var validAttribute = /^[a-z\-]+=[a-z0-9\-]+$/i;
|
||
var validData = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;
|
||
function isDataURI(str) {
|
||
(0, _assertString.default)(str);
|
||
var data = str.split(",");
|
||
if (data.length < 2) {
|
||
return false;
|
||
}
|
||
var attributes = data.shift().trim().split(";");
|
||
var schemeAndMediaType = attributes.shift();
|
||
if (schemeAndMediaType.slice(0, 5) !== "data:") {
|
||
return false;
|
||
}
|
||
var mediaType = schemeAndMediaType.slice(5);
|
||
if (mediaType !== "" && !validMediaType.test(mediaType)) {
|
||
return false;
|
||
}
|
||
for (var i = 0; i < attributes.length; i++) {
|
||
if (!(i === attributes.length - 1 && attributes[i].toLowerCase() === "base64") && !validAttribute.test(attributes[i])) {
|
||
return false;
|
||
}
|
||
}
|
||
for (var _i = 0; _i < data.length; _i++) {
|
||
if (!validData.test(data[_i])) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMagnetURI.js
|
||
var require_isMagnetURI = __commonJS({
|
||
"node_modules/validator/lib/isMagnetURI.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMagnetURI;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;
|
||
function isMagnetURI(url) {
|
||
(0, _assertString.default)(url);
|
||
if (url.indexOf("magnet:?") !== 0) {
|
||
return false;
|
||
}
|
||
return magnetURIComponent.test(url);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/rtrim.js
|
||
var require_rtrim = __commonJS({
|
||
"node_modules/validator/lib/rtrim.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = rtrim;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function rtrim(str, chars) {
|
||
(0, _assertString.default)(str);
|
||
if (chars) {
|
||
var pattern = new RegExp("[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "]+$"), "g");
|
||
return str.replace(pattern, "");
|
||
}
|
||
var strIndex = str.length - 1;
|
||
while (/\s/.test(str.charAt(strIndex))) {
|
||
strIndex -= 1;
|
||
}
|
||
return str.slice(0, strIndex + 1);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/ltrim.js
|
||
var require_ltrim = __commonJS({
|
||
"node_modules/validator/lib/ltrim.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = ltrim;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function ltrim(str, chars) {
|
||
(0, _assertString.default)(str);
|
||
var pattern = chars ? new RegExp("^[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "]+"), "g") : /^\s+/g;
|
||
return str.replace(pattern, "");
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/trim.js
|
||
var require_trim = __commonJS({
|
||
"node_modules/validator/lib/trim.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = trim;
|
||
var _rtrim = _interopRequireDefault(require_rtrim());
|
||
var _ltrim = _interopRequireDefault(require_ltrim());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function trim(str, chars) {
|
||
return (0, _rtrim.default)((0, _ltrim.default)(str, chars), chars);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMailtoURI.js
|
||
var require_isMailtoURI = __commonJS({
|
||
"node_modules/validator/lib/isMailtoURI.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMailtoURI;
|
||
var _trim = _interopRequireDefault(require_trim());
|
||
var _isEmail = _interopRequireDefault(require_isEmail());
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function _slicedToArray(arr, i) {
|
||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
||
}
|
||
function _nonIterableRest() {
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
function _iterableToArrayLimit(r, l) {
|
||
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
||
if (null != t) {
|
||
var e, n, i, u, a = [], f = true, o = false;
|
||
try {
|
||
if (i = (t = t.call(r)).next, 0 === l) {
|
||
if (Object(t) !== t)
|
||
return;
|
||
f = false;
|
||
} else
|
||
for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true)
|
||
;
|
||
} catch (r2) {
|
||
o = true, n = r2;
|
||
} finally {
|
||
try {
|
||
if (!f && null != t.return && (u = t.return(), Object(u) !== u))
|
||
return;
|
||
} finally {
|
||
if (o)
|
||
throw n;
|
||
}
|
||
}
|
||
return a;
|
||
}
|
||
}
|
||
function _arrayWithHoles(arr) {
|
||
if (Array.isArray(arr))
|
||
return arr;
|
||
}
|
||
function _createForOfIteratorHelper(o, allowArrayLike) {
|
||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
||
if (!it) {
|
||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
||
if (it)
|
||
o = it;
|
||
var i = 0;
|
||
var F = function F2() {
|
||
};
|
||
return { s: F, n: function n() {
|
||
if (i >= o.length)
|
||
return { done: true };
|
||
return { done: false, value: o[i++] };
|
||
}, e: function e(_e) {
|
||
throw _e;
|
||
}, f: F };
|
||
}
|
||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
var normalCompletion = true, didErr = false, err;
|
||
return { s: function s2() {
|
||
it = it.call(o);
|
||
}, n: function n() {
|
||
var step = it.next();
|
||
normalCompletion = step.done;
|
||
return step;
|
||
}, e: function e(_e2) {
|
||
didErr = true;
|
||
err = _e2;
|
||
}, f: function f() {
|
||
try {
|
||
if (!normalCompletion && it.return != null)
|
||
it.return();
|
||
} finally {
|
||
if (didErr)
|
||
throw err;
|
||
}
|
||
} };
|
||
}
|
||
function _unsupportedIterableToArray(o, minLen) {
|
||
if (!o)
|
||
return;
|
||
if (typeof o === "string")
|
||
return _arrayLikeToArray(o, minLen);
|
||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||
if (n === "Object" && o.constructor)
|
||
n = o.constructor.name;
|
||
if (n === "Map" || n === "Set")
|
||
return Array.from(o);
|
||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
||
return _arrayLikeToArray(o, minLen);
|
||
}
|
||
function _arrayLikeToArray(arr, len) {
|
||
if (len == null || len > arr.length)
|
||
len = arr.length;
|
||
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
||
arr2[i] = arr[i];
|
||
return arr2;
|
||
}
|
||
function parseMailtoQueryString(queryString) {
|
||
var allowedParams = /* @__PURE__ */ new Set(["subject", "body", "cc", "bcc"]), query = {
|
||
cc: "",
|
||
bcc: ""
|
||
};
|
||
var isParseFailed = false;
|
||
var queryParams = queryString.split("&");
|
||
if (queryParams.length > 4) {
|
||
return false;
|
||
}
|
||
var _iterator = _createForOfIteratorHelper(queryParams), _step;
|
||
try {
|
||
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
|
||
var q = _step.value;
|
||
var _q$split = q.split("="), _q$split2 = _slicedToArray(_q$split, 2), key2 = _q$split2[0], value = _q$split2[1];
|
||
if (key2 && !allowedParams.has(key2)) {
|
||
isParseFailed = true;
|
||
break;
|
||
}
|
||
if (value && (key2 === "cc" || key2 === "bcc")) {
|
||
query[key2] = value;
|
||
}
|
||
if (key2) {
|
||
allowedParams.delete(key2);
|
||
}
|
||
}
|
||
} catch (err) {
|
||
_iterator.e(err);
|
||
} finally {
|
||
_iterator.f();
|
||
}
|
||
return isParseFailed ? false : query;
|
||
}
|
||
function isMailtoURI(url, options) {
|
||
(0, _assertString.default)(url);
|
||
if (url.indexOf("mailto:") !== 0) {
|
||
return false;
|
||
}
|
||
var _url$replace$split = url.replace("mailto:", "").split("?"), _url$replace$split2 = _slicedToArray(_url$replace$split, 2), to = _url$replace$split2[0], _url$replace$split2$ = _url$replace$split2[1], queryString = _url$replace$split2$ === void 0 ? "" : _url$replace$split2$;
|
||
if (!to && !queryString) {
|
||
return true;
|
||
}
|
||
var query = parseMailtoQueryString(queryString);
|
||
if (!query) {
|
||
return false;
|
||
}
|
||
return "".concat(to, ",").concat(query.cc, ",").concat(query.bcc).split(",").every(function(email) {
|
||
email = (0, _trim.default)(email, " ");
|
||
if (email) {
|
||
return (0, _isEmail.default)(email, options);
|
||
}
|
||
return true;
|
||
});
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isMimeType.js
|
||
var require_isMimeType = __commonJS({
|
||
"node_modules/validator/lib/isMimeType.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isMimeType;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i;
|
||
var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i;
|
||
var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;
|
||
function isMimeType(str) {
|
||
(0, _assertString.default)(str);
|
||
return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isLatLong.js
|
||
var require_isLatLong = __commonJS({
|
||
"node_modules/validator/lib/isLatLong.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isLatLong;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/;
|
||
var long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/;
|
||
var latDMS = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i;
|
||
var longDMS = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i;
|
||
var defaultLatLongOptions = {
|
||
checkDMS: false
|
||
};
|
||
function isLatLong(str, options) {
|
||
(0, _assertString.default)(str);
|
||
options = (0, _merge.default)(options, defaultLatLongOptions);
|
||
if (!str.includes(","))
|
||
return false;
|
||
var pair = str.split(",");
|
||
if (pair[0].startsWith("(") && !pair[1].endsWith(")") || pair[1].endsWith(")") && !pair[0].startsWith("("))
|
||
return false;
|
||
if (options.checkDMS) {
|
||
return latDMS.test(pair[0]) && longDMS.test(pair[1]);
|
||
}
|
||
return lat.test(pair[0]) && long.test(pair[1]);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isPostalCode.js
|
||
var require_isPostalCode = __commonJS({
|
||
"node_modules/validator/lib/isPostalCode.js"(exports) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isPostalCode;
|
||
exports.locales = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var threeDigit = /^\d{3}$/;
|
||
var fourDigit = /^\d{4}$/;
|
||
var fiveDigit = /^\d{5}$/;
|
||
var sixDigit = /^\d{6}$/;
|
||
var patterns = {
|
||
AD: /^AD\d{3}$/,
|
||
AT: fourDigit,
|
||
AU: fourDigit,
|
||
AZ: /^AZ\d{4}$/,
|
||
BA: /^([7-8]\d{4}$)/,
|
||
BE: fourDigit,
|
||
BG: fourDigit,
|
||
BR: /^\d{5}-\d{3}$/,
|
||
BY: /^2[1-4]\d{4}$/,
|
||
CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,
|
||
CH: fourDigit,
|
||
CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,
|
||
CZ: /^\d{3}\s?\d{2}$/,
|
||
DE: fiveDigit,
|
||
DK: fourDigit,
|
||
DO: fiveDigit,
|
||
DZ: fiveDigit,
|
||
EE: fiveDigit,
|
||
ES: /^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,
|
||
FI: fiveDigit,
|
||
FR: /^\d{2}\s?\d{3}$/,
|
||
GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,
|
||
GR: /^\d{3}\s?\d{2}$/,
|
||
HR: /^([1-5]\d{4}$)/,
|
||
HT: /^HT\d{4}$/,
|
||
HU: fourDigit,
|
||
ID: fiveDigit,
|
||
IE: /^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,
|
||
IL: /^(\d{5}|\d{7})$/,
|
||
IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,
|
||
IR: /^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,
|
||
IS: threeDigit,
|
||
IT: fiveDigit,
|
||
JP: /^\d{3}\-\d{4}$/,
|
||
KE: fiveDigit,
|
||
KR: /^(\d{5}|\d{6})$/,
|
||
LI: /^(948[5-9]|949[0-7])$/,
|
||
LT: /^LT\-\d{5}$/,
|
||
LU: fourDigit,
|
||
LV: /^LV\-\d{4}$/,
|
||
LK: fiveDigit,
|
||
MG: threeDigit,
|
||
MX: fiveDigit,
|
||
MT: /^[A-Za-z]{3}\s{0,1}\d{4}$/,
|
||
MY: fiveDigit,
|
||
NL: /^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,
|
||
NO: fourDigit,
|
||
NP: /^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,
|
||
NZ: fourDigit,
|
||
PL: /^\d{2}\-\d{3}$/,
|
||
PR: /^00[679]\d{2}([ -]\d{4})?$/,
|
||
PT: /^\d{4}\-\d{3}?$/,
|
||
RO: sixDigit,
|
||
RU: sixDigit,
|
||
SA: fiveDigit,
|
||
SE: /^[1-9]\d{2}\s?\d{2}$/,
|
||
SG: sixDigit,
|
||
SI: fourDigit,
|
||
SK: /^\d{3}\s?\d{2}$/,
|
||
TH: fiveDigit,
|
||
TN: fourDigit,
|
||
TW: /^\d{3}(\d{2})?$/,
|
||
UA: fiveDigit,
|
||
US: /^\d{5}(-\d{4})?$/,
|
||
ZA: fourDigit,
|
||
ZM: fiveDigit
|
||
};
|
||
var locales = exports.locales = Object.keys(patterns);
|
||
function isPostalCode(str, locale) {
|
||
(0, _assertString.default)(str);
|
||
if (locale in patterns) {
|
||
return patterns[locale].test(str);
|
||
} else if (locale === "any") {
|
||
for (var key2 in patterns) {
|
||
if (patterns.hasOwnProperty(key2)) {
|
||
var pattern = patterns[key2];
|
||
if (pattern.test(str)) {
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
throw new Error("Invalid locale '".concat(locale, "'"));
|
||
}
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/escape.js
|
||
var require_escape = __commonJS({
|
||
"node_modules/validator/lib/escape.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = escape;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function escape(str) {
|
||
(0, _assertString.default)(str);
|
||
return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/\//g, "/").replace(/\\/g, "\").replace(/`/g, "`");
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/unescape.js
|
||
var require_unescape = __commonJS({
|
||
"node_modules/validator/lib/unescape.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = unescape;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function unescape(str) {
|
||
(0, _assertString.default)(str);
|
||
return str.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(///g, "/").replace(/\/g, "\\").replace(/`/g, "`").replace(/&/g, "&");
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/blacklist.js
|
||
var require_blacklist = __commonJS({
|
||
"node_modules/validator/lib/blacklist.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = blacklist;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function blacklist(str, chars) {
|
||
(0, _assertString.default)(str);
|
||
return str.replace(new RegExp("[".concat(chars, "]+"), "g"), "");
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/stripLow.js
|
||
var require_stripLow = __commonJS({
|
||
"node_modules/validator/lib/stripLow.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = stripLow;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var _blacklist = _interopRequireDefault(require_blacklist());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function stripLow(str, keep_new_lines) {
|
||
(0, _assertString.default)(str);
|
||
var chars = keep_new_lines ? "\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F" : "\\x00-\\x1F\\x7F";
|
||
return (0, _blacklist.default)(str, chars);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/whitelist.js
|
||
var require_whitelist = __commonJS({
|
||
"node_modules/validator/lib/whitelist.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = whitelist;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function whitelist(str, chars) {
|
||
(0, _assertString.default)(str);
|
||
return str.replace(new RegExp("[^".concat(chars, "]+"), "g"), "");
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isWhitelisted.js
|
||
var require_isWhitelisted = __commonJS({
|
||
"node_modules/validator/lib/isWhitelisted.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isWhitelisted;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
function isWhitelisted(str, chars) {
|
||
(0, _assertString.default)(str);
|
||
for (var i = str.length - 1; i >= 0; i--) {
|
||
if (chars.indexOf(str[i]) === -1) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/normalizeEmail.js
|
||
var require_normalizeEmail = __commonJS({
|
||
"node_modules/validator/lib/normalizeEmail.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = normalizeEmail;
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var default_normalize_email_options = {
|
||
// The following options apply to all email addresses
|
||
// Lowercases the local part of the email address.
|
||
// Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024).
|
||
// The domain is always lowercased, as per RFC 1035
|
||
all_lowercase: true,
|
||
// The following conversions are specific to GMail
|
||
// Lowercases the local part of the GMail address (known to be case-insensitive)
|
||
gmail_lowercase: true,
|
||
// Removes dots from the local part of the email address, as that's ignored by GMail
|
||
gmail_remove_dots: true,
|
||
// Removes the subaddress (e.g. "+foo") from the email address
|
||
gmail_remove_subaddress: true,
|
||
// Conversts the googlemail.com domain to gmail.com
|
||
gmail_convert_googlemaildotcom: true,
|
||
// The following conversions are specific to Outlook.com / Windows Live / Hotmail
|
||
// Lowercases the local part of the Outlook.com address (known to be case-insensitive)
|
||
outlookdotcom_lowercase: true,
|
||
// Removes the subaddress (e.g. "+foo") from the email address
|
||
outlookdotcom_remove_subaddress: true,
|
||
// The following conversions are specific to Yahoo
|
||
// Lowercases the local part of the Yahoo address (known to be case-insensitive)
|
||
yahoo_lowercase: true,
|
||
// Removes the subaddress (e.g. "-foo") from the email address
|
||
yahoo_remove_subaddress: true,
|
||
// The following conversions are specific to Yandex
|
||
// Lowercases the local part of the Yandex address (known to be case-insensitive)
|
||
yandex_lowercase: true,
|
||
// The following conversions are specific to iCloud
|
||
// Lowercases the local part of the iCloud address (known to be case-insensitive)
|
||
icloud_lowercase: true,
|
||
// Removes the subaddress (e.g. "+foo") from the email address
|
||
icloud_remove_subaddress: true
|
||
};
|
||
var icloud_domains = ["icloud.com", "me.com"];
|
||
var outlookdotcom_domains = ["hotmail.at", "hotmail.be", "hotmail.ca", "hotmail.cl", "hotmail.co.il", "hotmail.co.nz", "hotmail.co.th", "hotmail.co.uk", "hotmail.com", "hotmail.com.ar", "hotmail.com.au", "hotmail.com.br", "hotmail.com.gr", "hotmail.com.mx", "hotmail.com.pe", "hotmail.com.tr", "hotmail.com.vn", "hotmail.cz", "hotmail.de", "hotmail.dk", "hotmail.es", "hotmail.fr", "hotmail.hu", "hotmail.id", "hotmail.ie", "hotmail.in", "hotmail.it", "hotmail.jp", "hotmail.kr", "hotmail.lv", "hotmail.my", "hotmail.ph", "hotmail.pt", "hotmail.sa", "hotmail.sg", "hotmail.sk", "live.be", "live.co.uk", "live.com", "live.com.ar", "live.com.mx", "live.de", "live.es", "live.eu", "live.fr", "live.it", "live.nl", "msn.com", "outlook.at", "outlook.be", "outlook.cl", "outlook.co.il", "outlook.co.nz", "outlook.co.th", "outlook.com", "outlook.com.ar", "outlook.com.au", "outlook.com.br", "outlook.com.gr", "outlook.com.pe", "outlook.com.tr", "outlook.com.vn", "outlook.cz", "outlook.de", "outlook.dk", "outlook.es", "outlook.fr", "outlook.hu", "outlook.id", "outlook.ie", "outlook.in", "outlook.it", "outlook.jp", "outlook.kr", "outlook.lv", "outlook.my", "outlook.ph", "outlook.pt", "outlook.sa", "outlook.sg", "outlook.sk", "passport.com"];
|
||
var yahoo_domains = ["rocketmail.com", "yahoo.ca", "yahoo.co.uk", "yahoo.com", "yahoo.de", "yahoo.fr", "yahoo.in", "yahoo.it", "ymail.com"];
|
||
var yandex_domains = ["yandex.ru", "yandex.ua", "yandex.kz", "yandex.com", "yandex.by", "ya.ru"];
|
||
function dotsReplacer(match) {
|
||
if (match.length > 1) {
|
||
return match;
|
||
}
|
||
return "";
|
||
}
|
||
function normalizeEmail(email, options) {
|
||
options = (0, _merge.default)(options, default_normalize_email_options);
|
||
var raw_parts = email.split("@");
|
||
var domain = raw_parts.pop();
|
||
var user = raw_parts.join("@");
|
||
var parts = [user, domain];
|
||
parts[1] = parts[1].toLowerCase();
|
||
if (parts[1] === "gmail.com" || parts[1] === "googlemail.com") {
|
||
if (options.gmail_remove_subaddress) {
|
||
parts[0] = parts[0].split("+")[0];
|
||
}
|
||
if (options.gmail_remove_dots) {
|
||
parts[0] = parts[0].replace(/\.+/g, dotsReplacer);
|
||
}
|
||
if (!parts[0].length) {
|
||
return false;
|
||
}
|
||
if (options.all_lowercase || options.gmail_lowercase) {
|
||
parts[0] = parts[0].toLowerCase();
|
||
}
|
||
parts[1] = options.gmail_convert_googlemaildotcom ? "gmail.com" : parts[1];
|
||
} else if (icloud_domains.indexOf(parts[1]) >= 0) {
|
||
if (options.icloud_remove_subaddress) {
|
||
parts[0] = parts[0].split("+")[0];
|
||
}
|
||
if (!parts[0].length) {
|
||
return false;
|
||
}
|
||
if (options.all_lowercase || options.icloud_lowercase) {
|
||
parts[0] = parts[0].toLowerCase();
|
||
}
|
||
} else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) {
|
||
if (options.outlookdotcom_remove_subaddress) {
|
||
parts[0] = parts[0].split("+")[0];
|
||
}
|
||
if (!parts[0].length) {
|
||
return false;
|
||
}
|
||
if (options.all_lowercase || options.outlookdotcom_lowercase) {
|
||
parts[0] = parts[0].toLowerCase();
|
||
}
|
||
} else if (yahoo_domains.indexOf(parts[1]) >= 0) {
|
||
if (options.yahoo_remove_subaddress) {
|
||
var components = parts[0].split("-");
|
||
parts[0] = components.length > 1 ? components.slice(0, -1).join("-") : components[0];
|
||
}
|
||
if (!parts[0].length) {
|
||
return false;
|
||
}
|
||
if (options.all_lowercase || options.yahoo_lowercase) {
|
||
parts[0] = parts[0].toLowerCase();
|
||
}
|
||
} else if (yandex_domains.indexOf(parts[1]) >= 0) {
|
||
if (options.all_lowercase || options.yandex_lowercase) {
|
||
parts[0] = parts[0].toLowerCase();
|
||
}
|
||
parts[1] = "yandex.ru";
|
||
} else if (options.all_lowercase) {
|
||
parts[0] = parts[0].toLowerCase();
|
||
}
|
||
return parts.join("@");
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isSlug.js
|
||
var require_isSlug = __commonJS({
|
||
"node_modules/validator/lib/isSlug.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isSlug;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var charsetRegex = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;
|
||
function isSlug(str) {
|
||
(0, _assertString.default)(str);
|
||
return charsetRegex.test(str);
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isLicensePlate.js
|
||
var require_isLicensePlate = __commonJS({
|
||
"node_modules/validator/lib/isLicensePlate.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isLicensePlate;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var validators = {
|
||
"cs-CZ": function csCZ(str) {
|
||
return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str);
|
||
},
|
||
"de-DE": function deDE(str) {
|
||
return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(str);
|
||
},
|
||
"de-LI": function deLI(str) {
|
||
return /^FL[- ]?\d{1,5}[UZ]?$/.test(str);
|
||
},
|
||
"en-IN": function enIN(str) {
|
||
return /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(str);
|
||
},
|
||
"es-AR": function esAR(str) {
|
||
return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str);
|
||
},
|
||
"fi-FI": function fiFI(str) {
|
||
return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str);
|
||
},
|
||
"hu-HU": function huHU(str) {
|
||
return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(str);
|
||
},
|
||
"pt-BR": function ptBR(str) {
|
||
return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str);
|
||
},
|
||
"pt-PT": function ptPT(str) {
|
||
return /^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(str);
|
||
},
|
||
"sq-AL": function sqAL(str) {
|
||
return /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(str);
|
||
},
|
||
"sv-SE": function svSE(str) {
|
||
return /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim());
|
||
},
|
||
"en-PK": function enPK(str) {
|
||
return /(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(str.trim());
|
||
}
|
||
};
|
||
function isLicensePlate(str, locale) {
|
||
(0, _assertString.default)(str);
|
||
if (locale in validators) {
|
||
return validators[locale](str);
|
||
} else if (locale === "any") {
|
||
for (var key2 in validators) {
|
||
var validator2 = validators[key2];
|
||
if (validator2(str)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
throw new Error("Invalid locale '".concat(locale, "'"));
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isStrongPassword.js
|
||
var require_isStrongPassword = __commonJS({
|
||
"node_modules/validator/lib/isStrongPassword.js"(exports, module2) {
|
||
"use strict";
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isStrongPassword;
|
||
var _merge = _interopRequireDefault(require_merge());
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var upperCaseRegex = /^[A-Z]$/;
|
||
var lowerCaseRegex = /^[a-z]$/;
|
||
var numberRegex = /^[0-9]$/;
|
||
var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/;
|
||
var defaultOptions = {
|
||
minLength: 8,
|
||
minLowercase: 1,
|
||
minUppercase: 1,
|
||
minNumbers: 1,
|
||
minSymbols: 1,
|
||
returnScore: false,
|
||
pointsPerUnique: 1,
|
||
pointsPerRepeat: 0.5,
|
||
pointsForContainingLower: 10,
|
||
pointsForContainingUpper: 10,
|
||
pointsForContainingNumber: 10,
|
||
pointsForContainingSymbol: 10
|
||
};
|
||
function countChars(str) {
|
||
var result = {};
|
||
Array.from(str).forEach(function(char) {
|
||
var curVal = result[char];
|
||
if (curVal) {
|
||
result[char] += 1;
|
||
} else {
|
||
result[char] = 1;
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
function analyzePassword(password) {
|
||
var charMap = countChars(password);
|
||
var analysis = {
|
||
length: password.length,
|
||
uniqueChars: Object.keys(charMap).length,
|
||
uppercaseCount: 0,
|
||
lowercaseCount: 0,
|
||
numberCount: 0,
|
||
symbolCount: 0
|
||
};
|
||
Object.keys(charMap).forEach(function(char) {
|
||
if (upperCaseRegex.test(char)) {
|
||
analysis.uppercaseCount += charMap[char];
|
||
} else if (lowerCaseRegex.test(char)) {
|
||
analysis.lowercaseCount += charMap[char];
|
||
} else if (numberRegex.test(char)) {
|
||
analysis.numberCount += charMap[char];
|
||
} else if (symbolRegex.test(char)) {
|
||
analysis.symbolCount += charMap[char];
|
||
}
|
||
});
|
||
return analysis;
|
||
}
|
||
function scorePassword(analysis, scoringOptions) {
|
||
var points = 0;
|
||
points += analysis.uniqueChars * scoringOptions.pointsPerUnique;
|
||
points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat;
|
||
if (analysis.lowercaseCount > 0) {
|
||
points += scoringOptions.pointsForContainingLower;
|
||
}
|
||
if (analysis.uppercaseCount > 0) {
|
||
points += scoringOptions.pointsForContainingUpper;
|
||
}
|
||
if (analysis.numberCount > 0) {
|
||
points += scoringOptions.pointsForContainingNumber;
|
||
}
|
||
if (analysis.symbolCount > 0) {
|
||
points += scoringOptions.pointsForContainingSymbol;
|
||
}
|
||
return points;
|
||
}
|
||
function isStrongPassword(str) {
|
||
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
||
(0, _assertString.default)(str);
|
||
var analysis = analyzePassword(str);
|
||
options = (0, _merge.default)(options || {}, defaultOptions);
|
||
if (options.returnScore) {
|
||
return scorePassword(analysis, options);
|
||
}
|
||
return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols;
|
||
}
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/lib/isVAT.js
|
||
var require_isVAT = __commonJS({
|
||
"node_modules/validator/lib/isVAT.js"(exports) {
|
||
"use strict";
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = isVAT;
|
||
exports.vatMatchers = void 0;
|
||
var _assertString = _interopRequireDefault(require_assertString());
|
||
var algorithms = _interopRequireWildcard(require_algorithms());
|
||
function _getRequireWildcardCache(e) {
|
||
if ("function" != typeof WeakMap)
|
||
return null;
|
||
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
||
return (_getRequireWildcardCache = function _getRequireWildcardCache2(e2) {
|
||
return e2 ? t : r;
|
||
})(e);
|
||
}
|
||
function _interopRequireWildcard(e, r) {
|
||
if (!r && e && e.__esModule)
|
||
return e;
|
||
if (null === e || "object" != _typeof(e) && "function" != typeof e)
|
||
return { default: e };
|
||
var t = _getRequireWildcardCache(r);
|
||
if (t && t.has(e))
|
||
return t.get(e);
|
||
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||
for (var u in e)
|
||
if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
||
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
||
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
||
}
|
||
return n.default = e, t && t.set(e, n), n;
|
||
}
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var AU = function AU2(str) {
|
||
var match = str.match(/^(AU)?(\d{11})$/);
|
||
if (!match) {
|
||
return false;
|
||
}
|
||
var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
|
||
str = str.replace(/^AU/, "");
|
||
var ABN = (parseInt(str.slice(0, 1), 10) - 1).toString() + str.slice(1);
|
||
var total = 0;
|
||
for (var i = 0; i < 11; i++) {
|
||
total += weights[i] * ABN.charAt(i);
|
||
}
|
||
return total !== 0 && total % 89 === 0;
|
||
};
|
||
var CH = function CH2(str) {
|
||
var hasValidCheckNumber = function hasValidCheckNumber2(digits) {
|
||
var lastDigit = digits.pop();
|
||
var weights = [5, 4, 3, 2, 7, 6, 5, 4];
|
||
var calculatedCheckNumber = (11 - digits.reduce(function(acc, el, idx) {
|
||
return acc + el * weights[idx];
|
||
}, 0) % 11) % 11;
|
||
return lastDigit === calculatedCheckNumber;
|
||
};
|
||
return /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber(str.match(/\d/g).map(function(el) {
|
||
return +el;
|
||
}));
|
||
};
|
||
var PT = function PT2(str) {
|
||
var match = str.match(/^(PT)?(\d{9})$/);
|
||
if (!match) {
|
||
return false;
|
||
}
|
||
var tin = match[2];
|
||
var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 8).map(function(a) {
|
||
return parseInt(a, 10);
|
||
}), 9) % 11;
|
||
if (checksum > 9) {
|
||
return parseInt(tin[8], 10) === 0;
|
||
}
|
||
return checksum === parseInt(tin[8], 10);
|
||
};
|
||
var vatMatchers = exports.vatMatchers = {
|
||
/**
|
||
* European Union VAT identification numbers
|
||
*/
|
||
AT: function AT(str) {
|
||
return /^(AT)?U\d{8}$/.test(str);
|
||
},
|
||
BE: function BE(str) {
|
||
return /^(BE)?\d{10}$/.test(str);
|
||
},
|
||
BG: function BG(str) {
|
||
return /^(BG)?\d{9,10}$/.test(str);
|
||
},
|
||
HR: function HR(str) {
|
||
return /^(HR)?\d{11}$/.test(str);
|
||
},
|
||
CY: function CY(str) {
|
||
return /^(CY)?\w{9}$/.test(str);
|
||
},
|
||
CZ: function CZ(str) {
|
||
return /^(CZ)?\d{8,10}$/.test(str);
|
||
},
|
||
DK: function DK(str) {
|
||
return /^(DK)?\d{8}$/.test(str);
|
||
},
|
||
EE: function EE(str) {
|
||
return /^(EE)?\d{9}$/.test(str);
|
||
},
|
||
FI: function FI(str) {
|
||
return /^(FI)?\d{8}$/.test(str);
|
||
},
|
||
FR: function FR(str) {
|
||
return /^(FR)?\w{2}\d{9}$/.test(str);
|
||
},
|
||
DE: function DE(str) {
|
||
return /^(DE)?\d{9}$/.test(str);
|
||
},
|
||
EL: function EL(str) {
|
||
return /^(EL)?\d{9}$/.test(str);
|
||
},
|
||
HU: function HU(str) {
|
||
return /^(HU)?\d{8}$/.test(str);
|
||
},
|
||
IE: function IE(str) {
|
||
return /^(IE)?\d{7}\w{1}(W)?$/.test(str);
|
||
},
|
||
IT: function IT(str) {
|
||
return /^(IT)?\d{11}$/.test(str);
|
||
},
|
||
LV: function LV(str) {
|
||
return /^(LV)?\d{11}$/.test(str);
|
||
},
|
||
LT: function LT(str) {
|
||
return /^(LT)?\d{9,12}$/.test(str);
|
||
},
|
||
LU: function LU(str) {
|
||
return /^(LU)?\d{8}$/.test(str);
|
||
},
|
||
MT: function MT(str) {
|
||
return /^(MT)?\d{8}$/.test(str);
|
||
},
|
||
NL: function NL(str) {
|
||
return /^(NL)?\d{9}B\d{2}$/.test(str);
|
||
},
|
||
PL: function PL(str) {
|
||
return /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(str);
|
||
},
|
||
PT,
|
||
RO: function RO(str) {
|
||
return /^(RO)?\d{2,10}$/.test(str);
|
||
},
|
||
SK: function SK(str) {
|
||
return /^(SK)?\d{10}$/.test(str);
|
||
},
|
||
SI: function SI(str) {
|
||
return /^(SI)?\d{8}$/.test(str);
|
||
},
|
||
ES: function ES(str) {
|
||
return /^(ES)?\w\d{7}[A-Z]$/.test(str);
|
||
},
|
||
SE: function SE(str) {
|
||
return /^(SE)?\d{12}$/.test(str);
|
||
},
|
||
/**
|
||
* VAT numbers of non-EU countries
|
||
*/
|
||
AL: function AL(str) {
|
||
return /^(AL)?\w{9}[A-Z]$/.test(str);
|
||
},
|
||
MK: function MK(str) {
|
||
return /^(MK)?\d{13}$/.test(str);
|
||
},
|
||
AU,
|
||
BY: function BY(str) {
|
||
return /^(УНП )?\d{9}$/.test(str);
|
||
},
|
||
CA: function CA(str) {
|
||
return /^(CA)?\d{9}$/.test(str);
|
||
},
|
||
IS: function IS(str) {
|
||
return /^(IS)?\d{5,6}$/.test(str);
|
||
},
|
||
IN: function IN(str) {
|
||
return /^(IN)?\d{15}$/.test(str);
|
||
},
|
||
ID: function ID(str) {
|
||
return /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str);
|
||
},
|
||
IL: function IL(str) {
|
||
return /^(IL)?\d{9}$/.test(str);
|
||
},
|
||
KZ: function KZ(str) {
|
||
return /^(KZ)?\d{12}$/.test(str);
|
||
},
|
||
NZ: function NZ(str) {
|
||
return /^(NZ)?\d{9}$/.test(str);
|
||
},
|
||
NG: function NG(str) {
|
||
return /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str);
|
||
},
|
||
NO: function NO(str) {
|
||
return /^(NO)?\d{9}MVA$/.test(str);
|
||
},
|
||
PH: function PH(str) {
|
||
return /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(str);
|
||
},
|
||
RU: function RU(str) {
|
||
return /^(RU)?(\d{10}|\d{12})$/.test(str);
|
||
},
|
||
SM: function SM(str) {
|
||
return /^(SM)?\d{5}$/.test(str);
|
||
},
|
||
SA: function SA(str) {
|
||
return /^(SA)?\d{15}$/.test(str);
|
||
},
|
||
RS: function RS(str) {
|
||
return /^(RS)?\d{9}$/.test(str);
|
||
},
|
||
CH,
|
||
TR: function TR(str) {
|
||
return /^(TR)?\d{10}$/.test(str);
|
||
},
|
||
UA: function UA(str) {
|
||
return /^(UA)?\d{12}$/.test(str);
|
||
},
|
||
GB: function GB(str) {
|
||
return /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str);
|
||
},
|
||
UZ: function UZ(str) {
|
||
return /^(UZ)?\d{9}$/.test(str);
|
||
},
|
||
/**
|
||
* VAT numbers of Latin American countries
|
||
*/
|
||
AR: function AR(str) {
|
||
return /^(AR)?\d{11}$/.test(str);
|
||
},
|
||
BO: function BO(str) {
|
||
return /^(BO)?\d{7}$/.test(str);
|
||
},
|
||
BR: function BR(str) {
|
||
return /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(str);
|
||
},
|
||
CL: function CL(str) {
|
||
return /^(CL)?\d{8}-\d{1}$/.test(str);
|
||
},
|
||
CO: function CO(str) {
|
||
return /^(CO)?\d{10}$/.test(str);
|
||
},
|
||
CR: function CR(str) {
|
||
return /^(CR)?\d{9,12}$/.test(str);
|
||
},
|
||
EC: function EC(str) {
|
||
return /^(EC)?\d{13}$/.test(str);
|
||
},
|
||
SV: function SV(str) {
|
||
return /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(str);
|
||
},
|
||
GT: function GT(str) {
|
||
return /^(GT)?\d{7}-\d{1}$/.test(str);
|
||
},
|
||
HN: function HN(str) {
|
||
return /^(HN)?$/.test(str);
|
||
},
|
||
MX: function MX(str) {
|
||
return /^(MX)?\w{3,4}\d{6}\w{3}$/.test(str);
|
||
},
|
||
NI: function NI(str) {
|
||
return /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(str);
|
||
},
|
||
PA: function PA(str) {
|
||
return /^(PA)?$/.test(str);
|
||
},
|
||
PY: function PY(str) {
|
||
return /^(PY)?\d{6,8}-\d{1}$/.test(str);
|
||
},
|
||
PE: function PE(str) {
|
||
return /^(PE)?\d{11}$/.test(str);
|
||
},
|
||
DO: function DO(str) {
|
||
return /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(str);
|
||
},
|
||
UY: function UY(str) {
|
||
return /^(UY)?\d{12}$/.test(str);
|
||
},
|
||
VE: function VE(str) {
|
||
return /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(str);
|
||
}
|
||
};
|
||
function isVAT(str, countryCode) {
|
||
(0, _assertString.default)(str);
|
||
(0, _assertString.default)(countryCode);
|
||
if (countryCode in vatMatchers) {
|
||
return vatMatchers[countryCode](str);
|
||
}
|
||
throw new Error("Invalid country code: '".concat(countryCode, "'"));
|
||
}
|
||
}
|
||
});
|
||
|
||
// node_modules/validator/index.js
|
||
var require_validator = __commonJS({
|
||
"node_modules/validator/index.js"(exports, module2) {
|
||
"use strict";
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||
return typeof o2;
|
||
} : function(o2) {
|
||
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
||
}, _typeof(o);
|
||
}
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.default = void 0;
|
||
var _toDate = _interopRequireDefault(require_toDate());
|
||
var _toFloat = _interopRequireDefault(require_toFloat());
|
||
var _toInt = _interopRequireDefault(require_toInt());
|
||
var _toBoolean = _interopRequireDefault(require_toBoolean());
|
||
var _equals = _interopRequireDefault(require_equals());
|
||
var _contains = _interopRequireDefault(require_contains());
|
||
var _matches = _interopRequireDefault(require_matches());
|
||
var _isEmail = _interopRequireDefault(require_isEmail());
|
||
var _isURL = _interopRequireDefault(require_isURL());
|
||
var _isMACAddress = _interopRequireDefault(require_isMACAddress());
|
||
var _isIP = _interopRequireDefault(require_isIP());
|
||
var _isIPRange = _interopRequireDefault(require_isIPRange());
|
||
var _isFQDN = _interopRequireDefault(require_isFQDN());
|
||
var _isDate = _interopRequireDefault(require_isDate());
|
||
var _isTime = _interopRequireDefault(require_isTime());
|
||
var _isBoolean = _interopRequireDefault(require_isBoolean());
|
||
var _isLocale = _interopRequireDefault(require_isLocale());
|
||
var _isAbaRouting = _interopRequireDefault(require_isAbaRouting());
|
||
var _isAlpha = _interopRequireWildcard(require_isAlpha());
|
||
var _isAlphanumeric = _interopRequireWildcard(require_isAlphanumeric());
|
||
var _isNumeric = _interopRequireDefault(require_isNumeric());
|
||
var _isPassportNumber = _interopRequireDefault(require_isPassportNumber());
|
||
var _isPort = _interopRequireDefault(require_isPort());
|
||
var _isLowercase = _interopRequireDefault(require_isLowercase());
|
||
var _isUppercase = _interopRequireDefault(require_isUppercase());
|
||
var _isIMEI = _interopRequireDefault(require_isIMEI());
|
||
var _isAscii = _interopRequireDefault(require_isAscii());
|
||
var _isFullWidth = _interopRequireDefault(require_isFullWidth());
|
||
var _isHalfWidth = _interopRequireDefault(require_isHalfWidth());
|
||
var _isVariableWidth = _interopRequireDefault(require_isVariableWidth());
|
||
var _isMultibyte = _interopRequireDefault(require_isMultibyte());
|
||
var _isSemVer = _interopRequireDefault(require_isSemVer());
|
||
var _isSurrogatePair = _interopRequireDefault(require_isSurrogatePair());
|
||
var _isInt = _interopRequireDefault(require_isInt());
|
||
var _isFloat = _interopRequireWildcard(require_isFloat());
|
||
var _isDecimal = _interopRequireDefault(require_isDecimal());
|
||
var _isHexadecimal = _interopRequireDefault(require_isHexadecimal());
|
||
var _isOctal = _interopRequireDefault(require_isOctal());
|
||
var _isDivisibleBy = _interopRequireDefault(require_isDivisibleBy());
|
||
var _isHexColor = _interopRequireDefault(require_isHexColor());
|
||
var _isRgbColor = _interopRequireDefault(require_isRgbColor());
|
||
var _isHSL = _interopRequireDefault(require_isHSL());
|
||
var _isISRC = _interopRequireDefault(require_isISRC());
|
||
var _isIBAN = _interopRequireWildcard(require_isIBAN());
|
||
var _isBIC = _interopRequireDefault(require_isBIC());
|
||
var _isMD = _interopRequireDefault(require_isMD5());
|
||
var _isHash = _interopRequireDefault(require_isHash());
|
||
var _isJWT = _interopRequireDefault(require_isJWT());
|
||
var _isJSON = _interopRequireDefault(require_isJSON());
|
||
var _isEmpty = _interopRequireDefault(require_isEmpty());
|
||
var _isLength = _interopRequireDefault(require_isLength());
|
||
var _isByteLength = _interopRequireDefault(require_isByteLength());
|
||
var _isUUID = _interopRequireDefault(require_isUUID());
|
||
var _isMongoId = _interopRequireDefault(require_isMongoId());
|
||
var _isAfter = _interopRequireDefault(require_isAfter());
|
||
var _isBefore = _interopRequireDefault(require_isBefore());
|
||
var _isIn = _interopRequireDefault(require_isIn());
|
||
var _isLuhnNumber = _interopRequireDefault(require_isLuhnNumber());
|
||
var _isCreditCard = _interopRequireDefault(require_isCreditCard());
|
||
var _isIdentityCard = _interopRequireDefault(require_isIdentityCard());
|
||
var _isEAN = _interopRequireDefault(require_isEAN());
|
||
var _isISIN = _interopRequireDefault(require_isISIN());
|
||
var _isISBN = _interopRequireDefault(require_isISBN());
|
||
var _isISSN = _interopRequireDefault(require_isISSN());
|
||
var _isTaxID = _interopRequireDefault(require_isTaxID());
|
||
var _isMobilePhone = _interopRequireWildcard(require_isMobilePhone());
|
||
var _isEthereumAddress = _interopRequireDefault(require_isEthereumAddress());
|
||
var _isCurrency = _interopRequireDefault(require_isCurrency());
|
||
var _isBtcAddress = _interopRequireDefault(require_isBtcAddress());
|
||
var _isISO = require_isISO6346();
|
||
var _isISO2 = _interopRequireDefault(require_isISO6391());
|
||
var _isISO3 = _interopRequireDefault(require_isISO8601());
|
||
var _isRFC = _interopRequireDefault(require_isRFC3339());
|
||
var _isISO31661Alpha = _interopRequireDefault(require_isISO31661Alpha2());
|
||
var _isISO31661Alpha2 = _interopRequireDefault(require_isISO31661Alpha3());
|
||
var _isISO4 = _interopRequireDefault(require_isISO4217());
|
||
var _isBase = _interopRequireDefault(require_isBase32());
|
||
var _isBase2 = _interopRequireDefault(require_isBase58());
|
||
var _isBase3 = _interopRequireDefault(require_isBase64());
|
||
var _isDataURI = _interopRequireDefault(require_isDataURI());
|
||
var _isMagnetURI = _interopRequireDefault(require_isMagnetURI());
|
||
var _isMailtoURI = _interopRequireDefault(require_isMailtoURI());
|
||
var _isMimeType = _interopRequireDefault(require_isMimeType());
|
||
var _isLatLong = _interopRequireDefault(require_isLatLong());
|
||
var _isPostalCode = _interopRequireWildcard(require_isPostalCode());
|
||
var _ltrim = _interopRequireDefault(require_ltrim());
|
||
var _rtrim = _interopRequireDefault(require_rtrim());
|
||
var _trim = _interopRequireDefault(require_trim());
|
||
var _escape = _interopRequireDefault(require_escape());
|
||
var _unescape = _interopRequireDefault(require_unescape());
|
||
var _stripLow = _interopRequireDefault(require_stripLow());
|
||
var _whitelist = _interopRequireDefault(require_whitelist());
|
||
var _blacklist = _interopRequireDefault(require_blacklist());
|
||
var _isWhitelisted = _interopRequireDefault(require_isWhitelisted());
|
||
var _normalizeEmail = _interopRequireDefault(require_normalizeEmail());
|
||
var _isSlug = _interopRequireDefault(require_isSlug());
|
||
var _isLicensePlate = _interopRequireDefault(require_isLicensePlate());
|
||
var _isStrongPassword = _interopRequireDefault(require_isStrongPassword());
|
||
var _isVAT = _interopRequireDefault(require_isVAT());
|
||
function _getRequireWildcardCache(e) {
|
||
if ("function" != typeof WeakMap)
|
||
return null;
|
||
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
|
||
return (_getRequireWildcardCache = function _getRequireWildcardCache2(e2) {
|
||
return e2 ? t : r;
|
||
})(e);
|
||
}
|
||
function _interopRequireWildcard(e, r) {
|
||
if (!r && e && e.__esModule)
|
||
return e;
|
||
if (null === e || "object" != _typeof(e) && "function" != typeof e)
|
||
return { default: e };
|
||
var t = _getRequireWildcardCache(r);
|
||
if (t && t.has(e))
|
||
return t.get(e);
|
||
var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||
for (var u in e)
|
||
if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
||
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
||
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
||
}
|
||
return n.default = e, t && t.set(e, n), n;
|
||
}
|
||
function _interopRequireDefault(obj) {
|
||
return obj && obj.__esModule ? obj : { default: obj };
|
||
}
|
||
var version = "13.12.0";
|
||
var validator2 = {
|
||
version,
|
||
toDate: _toDate.default,
|
||
toFloat: _toFloat.default,
|
||
toInt: _toInt.default,
|
||
toBoolean: _toBoolean.default,
|
||
equals: _equals.default,
|
||
contains: _contains.default,
|
||
matches: _matches.default,
|
||
isEmail: _isEmail.default,
|
||
isURL: _isURL.default,
|
||
isMACAddress: _isMACAddress.default,
|
||
isIP: _isIP.default,
|
||
isIPRange: _isIPRange.default,
|
||
isFQDN: _isFQDN.default,
|
||
isBoolean: _isBoolean.default,
|
||
isIBAN: _isIBAN.default,
|
||
isBIC: _isBIC.default,
|
||
isAbaRouting: _isAbaRouting.default,
|
||
isAlpha: _isAlpha.default,
|
||
isAlphaLocales: _isAlpha.locales,
|
||
isAlphanumeric: _isAlphanumeric.default,
|
||
isAlphanumericLocales: _isAlphanumeric.locales,
|
||
isNumeric: _isNumeric.default,
|
||
isPassportNumber: _isPassportNumber.default,
|
||
isPort: _isPort.default,
|
||
isLowercase: _isLowercase.default,
|
||
isUppercase: _isUppercase.default,
|
||
isAscii: _isAscii.default,
|
||
isFullWidth: _isFullWidth.default,
|
||
isHalfWidth: _isHalfWidth.default,
|
||
isVariableWidth: _isVariableWidth.default,
|
||
isMultibyte: _isMultibyte.default,
|
||
isSemVer: _isSemVer.default,
|
||
isSurrogatePair: _isSurrogatePair.default,
|
||
isInt: _isInt.default,
|
||
isIMEI: _isIMEI.default,
|
||
isFloat: _isFloat.default,
|
||
isFloatLocales: _isFloat.locales,
|
||
isDecimal: _isDecimal.default,
|
||
isHexadecimal: _isHexadecimal.default,
|
||
isOctal: _isOctal.default,
|
||
isDivisibleBy: _isDivisibleBy.default,
|
||
isHexColor: _isHexColor.default,
|
||
isRgbColor: _isRgbColor.default,
|
||
isHSL: _isHSL.default,
|
||
isISRC: _isISRC.default,
|
||
isMD5: _isMD.default,
|
||
isHash: _isHash.default,
|
||
isJWT: _isJWT.default,
|
||
isJSON: _isJSON.default,
|
||
isEmpty: _isEmpty.default,
|
||
isLength: _isLength.default,
|
||
isLocale: _isLocale.default,
|
||
isByteLength: _isByteLength.default,
|
||
isUUID: _isUUID.default,
|
||
isMongoId: _isMongoId.default,
|
||
isAfter: _isAfter.default,
|
||
isBefore: _isBefore.default,
|
||
isIn: _isIn.default,
|
||
isLuhnNumber: _isLuhnNumber.default,
|
||
isCreditCard: _isCreditCard.default,
|
||
isIdentityCard: _isIdentityCard.default,
|
||
isEAN: _isEAN.default,
|
||
isISIN: _isISIN.default,
|
||
isISBN: _isISBN.default,
|
||
isISSN: _isISSN.default,
|
||
isMobilePhone: _isMobilePhone.default,
|
||
isMobilePhoneLocales: _isMobilePhone.locales,
|
||
isPostalCode: _isPostalCode.default,
|
||
isPostalCodeLocales: _isPostalCode.locales,
|
||
isEthereumAddress: _isEthereumAddress.default,
|
||
isCurrency: _isCurrency.default,
|
||
isBtcAddress: _isBtcAddress.default,
|
||
isISO6346: _isISO.isISO6346,
|
||
isFreightContainerID: _isISO.isFreightContainerID,
|
||
isISO6391: _isISO2.default,
|
||
isISO8601: _isISO3.default,
|
||
isRFC3339: _isRFC.default,
|
||
isISO31661Alpha2: _isISO31661Alpha.default,
|
||
isISO31661Alpha3: _isISO31661Alpha2.default,
|
||
isISO4217: _isISO4.default,
|
||
isBase32: _isBase.default,
|
||
isBase58: _isBase2.default,
|
||
isBase64: _isBase3.default,
|
||
isDataURI: _isDataURI.default,
|
||
isMagnetURI: _isMagnetURI.default,
|
||
isMailtoURI: _isMailtoURI.default,
|
||
isMimeType: _isMimeType.default,
|
||
isLatLong: _isLatLong.default,
|
||
ltrim: _ltrim.default,
|
||
rtrim: _rtrim.default,
|
||
trim: _trim.default,
|
||
escape: _escape.default,
|
||
unescape: _unescape.default,
|
||
stripLow: _stripLow.default,
|
||
whitelist: _whitelist.default,
|
||
blacklist: _blacklist.default,
|
||
isWhitelisted: _isWhitelisted.default,
|
||
normalizeEmail: _normalizeEmail.default,
|
||
toString,
|
||
isSlug: _isSlug.default,
|
||
isStrongPassword: _isStrongPassword.default,
|
||
isTaxID: _isTaxID.default,
|
||
isDate: _isDate.default,
|
||
isTime: _isTime.default,
|
||
isLicensePlate: _isLicensePlate.default,
|
||
isVAT: _isVAT.default,
|
||
ibanLocales: _isIBAN.locales
|
||
};
|
||
var _default = exports.default = validator2;
|
||
module2.exports = exports.default;
|
||
module2.exports.default = exports.default;
|
||
}
|
||
});
|
||
|
||
// node_modules/@simonwep/pickr/dist/pickr.min.js
|
||
var require_pickr_min = __commonJS({
|
||
"node_modules/@simonwep/pickr/dist/pickr.min.js"(exports, module2) {
|
||
!function(t, e) {
|
||
"object" == typeof exports && "object" == typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.Pickr = e() : t.Pickr = e();
|
||
}(self, () => (() => {
|
||
"use strict";
|
||
var t = { d: (e2, o2) => {
|
||
for (var n2 in o2)
|
||
t.o(o2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: o2[n2] });
|
||
}, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => {
|
||
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
|
||
} }, e = {};
|
||
t.d(e, { default: () => E });
|
||
var o = {};
|
||
function n(t2, e2, o2, n2, i2 = {}) {
|
||
e2 instanceof HTMLCollection || e2 instanceof NodeList ? e2 = Array.from(e2) : Array.isArray(e2) || (e2 = [e2]), Array.isArray(o2) || (o2 = [o2]);
|
||
for (const s3 of e2)
|
||
for (const e3 of o2)
|
||
s3[t2](e3, n2, { capture: false, ...i2 });
|
||
return Array.prototype.slice.call(arguments, 1);
|
||
}
|
||
t.r(o), t.d(o, { adjustableInputNumbers: () => p2, createElementFromString: () => r, createFromTemplate: () => a, eventPath: () => l, off: () => s2, on: () => i, resolveElement: () => c });
|
||
const i = n.bind(null, "addEventListener"), s2 = n.bind(null, "removeEventListener");
|
||
function r(t2) {
|
||
const e2 = document.createElement("div");
|
||
return e2.innerHTML = t2.trim(), e2.firstElementChild;
|
||
}
|
||
function a(t2) {
|
||
const e2 = (t3, e3) => {
|
||
const o3 = t3.getAttribute(e3);
|
||
return t3.removeAttribute(e3), o3;
|
||
}, o2 = (t3, n2 = {}) => {
|
||
const i2 = e2(t3, ":obj"), s3 = e2(t3, ":ref"), r2 = i2 ? n2[i2] = {} : n2;
|
||
s3 && (n2[s3] = t3);
|
||
for (const n3 of Array.from(t3.children)) {
|
||
const t4 = e2(n3, ":arr"), i3 = o2(n3, t4 ? {} : r2);
|
||
t4 && (r2[t4] || (r2[t4] = [])).push(Object.keys(i3).length ? i3 : n3);
|
||
}
|
||
return n2;
|
||
};
|
||
return o2(r(t2));
|
||
}
|
||
function l(t2) {
|
||
let e2 = t2.path || t2.composedPath && t2.composedPath();
|
||
if (e2)
|
||
return e2;
|
||
let o2 = t2.target.parentElement;
|
||
for (e2 = [t2.target, o2]; o2 = o2.parentElement; )
|
||
e2.push(o2);
|
||
return e2.push(document, window), e2;
|
||
}
|
||
function c(t2) {
|
||
return t2 instanceof Element ? t2 : "string" == typeof t2 ? t2.split(/>>/g).reduce((t3, e2, o2, n2) => (t3 = t3.querySelector(e2), o2 < n2.length - 1 ? t3.shadowRoot : t3), document) : null;
|
||
}
|
||
function p2(t2, e2 = (t3) => t3) {
|
||
function o2(o3) {
|
||
const n2 = [1e-3, 0.01, 0.1][Number(o3.shiftKey || 2 * o3.ctrlKey)] * (o3.deltaY < 0 ? 1 : -1);
|
||
let i2 = 0, s3 = t2.selectionStart;
|
||
t2.value = t2.value.replace(/[\d.]+/g, (t3, o4) => o4 <= s3 && o4 + t3.length >= s3 ? (s3 = o4, e2(Number(t3), n2, i2)) : (i2++, t3)), t2.focus(), t2.setSelectionRange(s3, s3), o3.preventDefault(), t2.dispatchEvent(new Event("input"));
|
||
}
|
||
i(t2, "focus", () => i(window, "wheel", o2, { passive: false })), i(t2, "blur", () => s2(window, "wheel", o2));
|
||
}
|
||
const { min: u, max: h2, floor: d, round: m } = Math;
|
||
function f(t2, e2, o2) {
|
||
e2 /= 100, o2 /= 100;
|
||
const n2 = d(t2 = t2 / 360 * 6), i2 = t2 - n2, s3 = o2 * (1 - e2), r2 = o2 * (1 - i2 * e2), a2 = o2 * (1 - (1 - i2) * e2), l2 = n2 % 6;
|
||
return [255 * [o2, r2, s3, s3, a2, o2][l2], 255 * [a2, o2, o2, r2, s3, s3][l2], 255 * [s3, s3, a2, o2, o2, r2][l2]];
|
||
}
|
||
function v(t2, e2, o2) {
|
||
const n2 = (2 - (e2 /= 100)) * (o2 /= 100) / 2;
|
||
return 0 !== n2 && (e2 = 1 === n2 ? 0 : n2 < 0.5 ? e2 * o2 / (2 * n2) : e2 * o2 / (2 - 2 * n2)), [t2, 100 * e2, 100 * n2];
|
||
}
|
||
function b(t2, e2, o2) {
|
||
const n2 = u(t2 /= 255, e2 /= 255, o2 /= 255), i2 = h2(t2, e2, o2), s3 = i2 - n2;
|
||
let r2, a2;
|
||
if (0 === s3)
|
||
r2 = a2 = 0;
|
||
else {
|
||
a2 = s3 / i2;
|
||
const n3 = ((i2 - t2) / 6 + s3 / 2) / s3, l2 = ((i2 - e2) / 6 + s3 / 2) / s3, c2 = ((i2 - o2) / 6 + s3 / 2) / s3;
|
||
t2 === i2 ? r2 = c2 - l2 : e2 === i2 ? r2 = 1 / 3 + n3 - c2 : o2 === i2 && (r2 = 2 / 3 + l2 - n3), r2 < 0 ? r2 += 1 : r2 > 1 && (r2 -= 1);
|
||
}
|
||
return [360 * r2, 100 * a2, 100 * i2];
|
||
}
|
||
function y(t2, e2, o2, n2) {
|
||
e2 /= 100, o2 /= 100;
|
||
return [...b(255 * (1 - u(1, (t2 /= 100) * (1 - (n2 /= 100)) + n2)), 255 * (1 - u(1, e2 * (1 - n2) + n2)), 255 * (1 - u(1, o2 * (1 - n2) + n2)))];
|
||
}
|
||
function g(t2, e2, o2) {
|
||
e2 /= 100;
|
||
const n2 = 2 * (e2 *= (o2 /= 100) < 0.5 ? o2 : 1 - o2) / (o2 + e2) * 100, i2 = 100 * (o2 + e2);
|
||
return [t2, isNaN(n2) ? 0 : n2, i2];
|
||
}
|
||
function _2(t2) {
|
||
return b(...t2.match(/.{2}/g).map((t3) => parseInt(t3, 16)));
|
||
}
|
||
function w(t2) {
|
||
t2 = t2.match(/^[a-zA-Z]+$/) ? function(t3) {
|
||
if ("black" === t3.toLowerCase())
|
||
return "#000";
|
||
const e3 = document.createElement("canvas").getContext("2d");
|
||
return e3.fillStyle = t3, "#000" === e3.fillStyle ? null : e3.fillStyle;
|
||
}(t2) : t2;
|
||
const e2 = { cmyk: /^cmyk\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)/i, rgba: /^rgba?\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D*?(([\d.]+)(%?)|$)/i, hsla: /^hsla?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i, hsva: /^hsva?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i, hexa: /^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i }, o2 = (t3) => t3.map((t4) => /^(|\d+)\.\d+|\d+$/.test(t4) ? Number(t4) : void 0);
|
||
let n2;
|
||
t:
|
||
for (const i2 in e2)
|
||
if (n2 = e2[i2].exec(t2))
|
||
switch (i2) {
|
||
case "cmyk": {
|
||
const [, t3, e3, s3, r2] = o2(n2);
|
||
if (t3 > 100 || e3 > 100 || s3 > 100 || r2 > 100)
|
||
break t;
|
||
return { values: y(t3, e3, s3, r2), type: i2 };
|
||
}
|
||
case "rgba": {
|
||
let [, t3, , e3, , s3, , , r2] = o2(n2);
|
||
if (t3 = "%" === n2[2] ? t3 / 100 * 255 : t3, e3 = "%" === n2[4] ? e3 / 100 * 255 : e3, s3 = "%" === n2[6] ? s3 / 100 * 255 : s3, r2 = "%" === n2[9] ? r2 / 100 : r2, t3 > 255 || e3 > 255 || s3 > 255 || r2 < 0 || r2 > 1)
|
||
break t;
|
||
return { values: [...b(t3, e3, s3), r2], a: r2, type: i2 };
|
||
}
|
||
case "hexa": {
|
||
let [, t3] = n2;
|
||
4 !== t3.length && 3 !== t3.length || (t3 = t3.split("").map((t4) => t4 + t4).join(""));
|
||
const e3 = t3.substring(0, 6);
|
||
let o3 = t3.substring(6);
|
||
return o3 = o3 ? parseInt(o3, 16) / 255 : void 0, { values: [..._2(e3), o3], a: o3, type: i2 };
|
||
}
|
||
case "hsla": {
|
||
let [, t3, e3, s3, , r2] = o2(n2);
|
||
if (r2 = "%" === n2[6] ? r2 / 100 : r2, t3 > 360 || e3 > 100 || s3 > 100 || r2 < 0 || r2 > 1)
|
||
break t;
|
||
return { values: [...g(t3, e3, s3), r2], a: r2, type: i2 };
|
||
}
|
||
case "hsva": {
|
||
let [, t3, e3, s3, , r2] = o2(n2);
|
||
if (r2 = "%" === n2[6] ? r2 / 100 : r2, t3 > 360 || e3 > 100 || s3 > 100 || r2 < 0 || r2 > 1)
|
||
break t;
|
||
return { values: [t3, e3, s3, r2], a: r2, type: i2 };
|
||
}
|
||
}
|
||
return { values: null, type: null };
|
||
}
|
||
function A(t2 = 0, e2 = 0, o2 = 0, n2 = 1) {
|
||
const i2 = (t3, e3) => (o3 = -1) => e3(~o3 ? t3.map((t4) => Number(t4.toFixed(o3))) : t3), s3 = { h: t2, s: e2, v: o2, a: n2, toHSVA() {
|
||
const t3 = [s3.h, s3.s, s3.v, s3.a];
|
||
return t3.toString = i2(t3, (t4) => `hsva(${t4[0]}, ${t4[1]}%, ${t4[2]}%, ${s3.a})`), t3;
|
||
}, toHSLA() {
|
||
const t3 = [...v(s3.h, s3.s, s3.v), s3.a];
|
||
return t3.toString = i2(t3, (t4) => `hsla(${t4[0]}, ${t4[1]}%, ${t4[2]}%, ${s3.a})`), t3;
|
||
}, toRGBA() {
|
||
const t3 = [...f(s3.h, s3.s, s3.v), s3.a];
|
||
return t3.toString = i2(t3, (t4) => `rgba(${t4[0]}, ${t4[1]}, ${t4[2]}, ${s3.a})`), t3;
|
||
}, toCMYK() {
|
||
const t3 = function(t4, e3, o3) {
|
||
const n3 = f(t4, e3, o3), i3 = n3[0] / 255, s4 = n3[1] / 255, r2 = n3[2] / 255, a2 = u(1 - i3, 1 - s4, 1 - r2);
|
||
return [100 * (1 === a2 ? 0 : (1 - i3 - a2) / (1 - a2)), 100 * (1 === a2 ? 0 : (1 - s4 - a2) / (1 - a2)), 100 * (1 === a2 ? 0 : (1 - r2 - a2) / (1 - a2)), 100 * a2];
|
||
}(s3.h, s3.s, s3.v);
|
||
return t3.toString = i2(t3, (t4) => `cmyk(${t4[0]}%, ${t4[1]}%, ${t4[2]}%, ${t4[3]}%)`), t3;
|
||
}, toHEXA() {
|
||
const t3 = function(t4, e4, o3) {
|
||
return f(t4, e4, o3).map((t5) => m(t5).toString(16).padStart(2, "0"));
|
||
}(s3.h, s3.s, s3.v), e3 = s3.a >= 1 ? "" : Number((255 * s3.a).toFixed(0)).toString(16).toUpperCase().padStart(2, "0");
|
||
return e3 && t3.push(e3), t3.toString = () => `#${t3.join("").toUpperCase()}`, t3;
|
||
}, clone: () => A(s3.h, s3.s, s3.v, s3.a) };
|
||
return s3;
|
||
}
|
||
const $2 = (t2) => Math.max(Math.min(t2, 1), 0);
|
||
function C(t2) {
|
||
const e2 = { options: Object.assign({ lock: null, onchange: () => 0, onstop: () => 0 }, t2), _keyboard(t3) {
|
||
const { options: o3 } = e2, { type: n3, key: i2 } = t3;
|
||
if (document.activeElement === o3.wrapper) {
|
||
const { lock: o4 } = e2.options, s3 = "ArrowUp" === i2, r3 = "ArrowRight" === i2, a2 = "ArrowDown" === i2, l2 = "ArrowLeft" === i2;
|
||
if ("keydown" === n3 && (s3 || r3 || a2 || l2)) {
|
||
let n4 = 0, i3 = 0;
|
||
"v" === o4 ? n4 = s3 || r3 ? 1 : -1 : "h" === o4 ? n4 = s3 || r3 ? -1 : 1 : (i3 = s3 ? -1 : a2 ? 1 : 0, n4 = l2 ? -1 : r3 ? 1 : 0), e2.update($2(e2.cache.x + 0.01 * n4), $2(e2.cache.y + 0.01 * i3)), t3.preventDefault();
|
||
} else
|
||
i2.startsWith("Arrow") && (e2.options.onstop(), t3.preventDefault());
|
||
}
|
||
}, _tapstart(t3) {
|
||
i(document, ["mouseup", "touchend", "touchcancel"], e2._tapstop), i(document, ["mousemove", "touchmove"], e2._tapmove), t3.cancelable && t3.preventDefault(), e2._tapmove(t3);
|
||
}, _tapmove(t3) {
|
||
const { options: o3, cache: n3 } = e2, { lock: i2, element: s3, wrapper: r3 } = o3, a2 = r3.getBoundingClientRect();
|
||
let l2 = 0, c2 = 0;
|
||
if (t3) {
|
||
const e3 = t3 && t3.touches && t3.touches[0];
|
||
l2 = t3 ? (e3 || t3).clientX : 0, c2 = t3 ? (e3 || t3).clientY : 0, l2 < a2.left ? l2 = a2.left : l2 > a2.left + a2.width && (l2 = a2.left + a2.width), c2 < a2.top ? c2 = a2.top : c2 > a2.top + a2.height && (c2 = a2.top + a2.height), l2 -= a2.left, c2 -= a2.top;
|
||
} else
|
||
n3 && (l2 = n3.x * a2.width, c2 = n3.y * a2.height);
|
||
"h" !== i2 && (s3.style.left = `calc(${l2 / a2.width * 100}% - ${s3.offsetWidth / 2}px)`), "v" !== i2 && (s3.style.top = `calc(${c2 / a2.height * 100}% - ${s3.offsetHeight / 2}px)`), e2.cache = { x: l2 / a2.width, y: c2 / a2.height };
|
||
const p3 = $2(l2 / a2.width), u2 = $2(c2 / a2.height);
|
||
switch (i2) {
|
||
case "v":
|
||
return o3.onchange(p3);
|
||
case "h":
|
||
return o3.onchange(u2);
|
||
default:
|
||
return o3.onchange(p3, u2);
|
||
}
|
||
}, _tapstop() {
|
||
e2.options.onstop(), s2(document, ["mouseup", "touchend", "touchcancel"], e2._tapstop), s2(document, ["mousemove", "touchmove"], e2._tapmove);
|
||
}, trigger() {
|
||
e2._tapmove();
|
||
}, update(t3 = 0, o3 = 0) {
|
||
const { left: n3, top: i2, width: s3, height: r3 } = e2.options.wrapper.getBoundingClientRect();
|
||
"h" === e2.options.lock && (o3 = t3), e2._tapmove({ clientX: n3 + s3 * t3, clientY: i2 + r3 * o3 });
|
||
}, destroy() {
|
||
const { options: t3, _tapstart: o3, _keyboard: n3 } = e2;
|
||
s2(document, ["keydown", "keyup"], n3), s2([t3.wrapper, t3.element], "mousedown", o3), s2([t3.wrapper, t3.element], "touchstart", o3, { passive: false });
|
||
} }, { options: o2, _tapstart: n2, _keyboard: r2 } = e2;
|
||
return i([o2.wrapper, o2.element], "mousedown", n2), i([o2.wrapper, o2.element], "touchstart", n2, { passive: false }), i(document, ["keydown", "keyup"], r2), e2;
|
||
}
|
||
function k(t2 = {}) {
|
||
t2 = Object.assign({ onchange: () => 0, className: "", elements: [] }, t2);
|
||
const e2 = i(t2.elements, "click", (e3) => {
|
||
t2.elements.forEach((o2) => o2.classList[e3.target === o2 ? "add" : "remove"](t2.className)), t2.onchange(e3), e3.stopPropagation();
|
||
});
|
||
return { destroy: () => s2(...e2) };
|
||
}
|
||
const S = { variantFlipOrder: { start: "sme", middle: "mse", end: "ems" }, positionFlipOrder: { top: "tbrl", right: "rltb", bottom: "btrl", left: "lrbt" }, position: "bottom", margin: 8, padding: 0 }, O = (t2, e2, o2) => {
|
||
const n2 = "object" != typeof t2 || t2 instanceof HTMLElement ? { reference: t2, popper: e2, ...o2 } : t2;
|
||
return { update(t3 = n2) {
|
||
const { reference: e3, popper: o3 } = Object.assign(n2, t3);
|
||
if (!o3 || !e3)
|
||
throw new Error("Popper- or reference-element missing.");
|
||
return ((t4, e4, o4) => {
|
||
const { container: n3, arrow: i2, margin: s3, padding: r2, position: a2, variantFlipOrder: l2, positionFlipOrder: c2 } = { container: document.documentElement.getBoundingClientRect(), ...S, ...o4 }, { left: p3, top: u2 } = e4.style;
|
||
e4.style.left = "0", e4.style.top = "0";
|
||
const h3 = t4.getBoundingClientRect(), d2 = e4.getBoundingClientRect(), m2 = { t: h3.top - d2.height - s3, b: h3.bottom + s3, r: h3.right + s3, l: h3.left - d2.width - s3 }, f2 = { vs: h3.left, vm: h3.left + h3.width / 2 - d2.width / 2, ve: h3.left + h3.width - d2.width, hs: h3.top, hm: h3.bottom - h3.height / 2 - d2.height / 2, he: h3.bottom - d2.height }, [v2, b2 = "middle"] = a2.split("-"), y2 = c2[v2], g2 = l2[b2], { top: _3, left: w2, bottom: A2, right: $3 } = n3;
|
||
for (const t5 of y2) {
|
||
const o5 = "t" === t5 || "b" === t5;
|
||
let n4 = m2[t5];
|
||
const [s4, a3] = o5 ? ["top", "left"] : ["left", "top"], [l3, c3] = o5 ? [d2.height, d2.width] : [d2.width, d2.height], [p4, u3] = o5 ? [A2, $3] : [$3, A2], [v3, b3] = o5 ? [_3, w2] : [w2, _3];
|
||
if (!(n4 < v3 || n4 + l3 + r2 > p4))
|
||
for (const p5 of g2) {
|
||
let m3 = f2[(o5 ? "v" : "h") + p5];
|
||
if (!(m3 < b3 || m3 + c3 + r2 > u3)) {
|
||
if (m3 -= d2[a3], n4 -= d2[s4], e4.style[a3] = `${m3}px`, e4.style[s4] = `${n4}px`, i2) {
|
||
const e5 = o5 ? h3.width / 2 : h3.height / 2, r3 = c3 / 2, u4 = e5 > r3, d3 = m3 + { s: u4 ? r3 : e5, m: r3, e: u4 ? r3 : c3 - e5 }[p5], f3 = n4 + { t: l3, b: 0, r: 0, l: l3 }[t5];
|
||
i2.style[a3] = `${d3}px`, i2.style[s4] = `${f3}px`;
|
||
}
|
||
return t5 + p5;
|
||
}
|
||
}
|
||
}
|
||
return e4.style.left = p3, e4.style.top = u2, null;
|
||
})(e3, o3, n2);
|
||
} };
|
||
};
|
||
const _E = class {
|
||
constructor(t2) {
|
||
__publicField(this, "_initializingActive", true);
|
||
__publicField(this, "_recalc", true);
|
||
__publicField(this, "_nanopop", null);
|
||
__publicField(this, "_root", null);
|
||
__publicField(this, "_color", A());
|
||
__publicField(this, "_lastColor", A());
|
||
__publicField(this, "_swatchColors", []);
|
||
__publicField(this, "_setupAnimationFrame", null);
|
||
__publicField(this, "_eventListener", { init: [], save: [], hide: [], show: [], clear: [], change: [], changestop: [], cancel: [], swatchselect: [] });
|
||
this.options = t2 = Object.assign({ ..._E.DEFAULT_OPTIONS }, t2);
|
||
const { swatches: e2, components: o2, theme: n2, sliders: i2, lockOpacity: s3, padding: r2 } = t2;
|
||
["nano", "monolith"].includes(n2) && !i2 && (t2.sliders = "h"), o2.interaction || (o2.interaction = {});
|
||
const { preview: a2, opacity: l2, hue: c2, palette: p3 } = o2;
|
||
o2.opacity = !s3 && l2, o2.palette = p3 || a2 || l2 || c2, this._preBuild(), this._buildComponents(), this._bindEvents(), this._finalBuild(), e2 && e2.length && e2.forEach((t3) => this.addSwatch(t3));
|
||
const { button: u2, app: h3 } = this._root;
|
||
this._nanopop = O(u2, h3, { margin: r2 }), u2.setAttribute("role", "button"), u2.setAttribute("aria-label", this._t("btn:toggle"));
|
||
const d2 = this;
|
||
this._setupAnimationFrame = requestAnimationFrame(function e3() {
|
||
if (!h3.offsetWidth)
|
||
return requestAnimationFrame(e3);
|
||
d2.setColor(t2.default), d2._rePositioningPicker(), t2.defaultRepresentation && (d2._representation = t2.defaultRepresentation, d2.setColorRepresentation(d2._representation)), t2.showAlways && d2.show(), d2._initializingActive = false, d2._emit("init");
|
||
});
|
||
}
|
||
_preBuild() {
|
||
const { options: t2 } = this;
|
||
for (const e2 of ["el", "container"])
|
||
t2[e2] = c(t2[e2]);
|
||
this._root = ((t3) => {
|
||
const { components: e2, useAsButton: o2, inline: n2, appClass: i2, theme: s3, lockOpacity: r2 } = t3.options, l2 = (t4) => t4 ? "" : 'style="display:none" hidden', c2 = (e3) => t3._t(e3), p3 = a(`
|
||
<div :ref="root" class="pickr">
|
||
|
||
${o2 ? "" : '<button type="button" :ref="button" class="pcr-button"></button>'}
|
||
|
||
<div :ref="app" class="pcr-app ${i2 || ""}" data-theme="${s3}" ${n2 ? 'style="position: unset"' : ""} aria-label="${c2("ui:dialog")}" role="window">
|
||
<div class="pcr-selection" ${l2(e2.palette)}>
|
||
<div :obj="preview" class="pcr-color-preview" ${l2(e2.preview)}>
|
||
<button type="button" :ref="lastColor" class="pcr-last-color" aria-label="${c2("btn:last-color")}"></button>
|
||
<div :ref="currentColor" class="pcr-current-color"></div>
|
||
</div>
|
||
|
||
<div :obj="palette" class="pcr-color-palette">
|
||
<div :ref="picker" class="pcr-picker"></div>
|
||
<div :ref="palette" class="pcr-palette" tabindex="0" aria-label="${c2("aria:palette")}" role="listbox"></div>
|
||
</div>
|
||
|
||
<div :obj="hue" class="pcr-color-chooser" ${l2(e2.hue)}>
|
||
<div :ref="picker" class="pcr-picker"></div>
|
||
<div :ref="slider" class="pcr-hue pcr-slider" tabindex="0" aria-label="${c2("aria:hue")}" role="slider"></div>
|
||
</div>
|
||
|
||
<div :obj="opacity" class="pcr-color-opacity" ${l2(e2.opacity)}>
|
||
<div :ref="picker" class="pcr-picker"></div>
|
||
<div :ref="slider" class="pcr-opacity pcr-slider" tabindex="0" aria-label="${c2("aria:opacity")}" role="slider"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="pcr-swatches ${e2.palette ? "" : "pcr-last"}" :ref="swatches"></div>
|
||
|
||
<div :obj="interaction" class="pcr-interaction" ${l2(Object.keys(e2.interaction).length)}>
|
||
<input :ref="result" class="pcr-result" type="text" spellcheck="false" ${l2(e2.interaction.input)} aria-label="${c2("aria:input")}">
|
||
|
||
<input :arr="options" class="pcr-type" data-type="HEXA" value="${r2 ? "HEX" : "HEXA"}" type="button" ${l2(e2.interaction.hex)}>
|
||
<input :arr="options" class="pcr-type" data-type="RGBA" value="${r2 ? "RGB" : "RGBA"}" type="button" ${l2(e2.interaction.rgba)}>
|
||
<input :arr="options" class="pcr-type" data-type="HSLA" value="${r2 ? "HSL" : "HSLA"}" type="button" ${l2(e2.interaction.hsla)}>
|
||
<input :arr="options" class="pcr-type" data-type="HSVA" value="${r2 ? "HSV" : "HSVA"}" type="button" ${l2(e2.interaction.hsva)}>
|
||
<input :arr="options" class="pcr-type" data-type="CMYK" value="CMYK" type="button" ${l2(e2.interaction.cmyk)}>
|
||
|
||
<input :ref="save" class="pcr-save" value="${c2("btn:save")}" type="button" ${l2(e2.interaction.save)} aria-label="${c2("aria:btn:save")}">
|
||
<input :ref="cancel" class="pcr-cancel" value="${c2("btn:cancel")}" type="button" ${l2(e2.interaction.cancel)} aria-label="${c2("aria:btn:cancel")}">
|
||
<input :ref="clear" class="pcr-clear" value="${c2("btn:clear")}" type="button" ${l2(e2.interaction.clear)} aria-label="${c2("aria:btn:clear")}">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`), u2 = p3.interaction;
|
||
return u2.options.find((t4) => !t4.hidden && !t4.classList.add("active")), u2.type = () => u2.options.find((t4) => t4.classList.contains("active")), p3;
|
||
})(this), t2.useAsButton && (this._root.button = t2.el), t2.container.appendChild(this._root.root);
|
||
}
|
||
_finalBuild() {
|
||
const t2 = this.options, e2 = this._root;
|
||
if (t2.container.removeChild(e2.root), t2.inline) {
|
||
const o2 = t2.el.parentElement;
|
||
t2.el.nextSibling ? o2.insertBefore(e2.app, t2.el.nextSibling) : o2.appendChild(e2.app);
|
||
} else
|
||
t2.container.appendChild(e2.app);
|
||
t2.useAsButton ? t2.inline && t2.el.remove() : t2.el.parentNode.replaceChild(e2.root, t2.el), t2.disabled && this.disable(), t2.comparison || (e2.button.style.transition = "none", t2.useAsButton || (e2.preview.lastColor.style.transition = "none")), this.hide();
|
||
}
|
||
_buildComponents() {
|
||
const t2 = this, e2 = this.options.components, o2 = (t2.options.sliders || "v").repeat(2), [n2, i2] = o2.match(/^[vh]+$/g) ? o2 : [], s3 = () => this._color || (this._color = this._lastColor.clone()), r2 = { palette: C({ element: t2._root.palette.picker, wrapper: t2._root.palette.palette, onstop: () => t2._emit("changestop", "slider", t2), onchange(o3, n3) {
|
||
if (!e2.palette)
|
||
return;
|
||
const i3 = s3(), { _root: r3, options: a2 } = t2, { lastColor: l2, currentColor: c2 } = r3.preview;
|
||
t2._recalc && (i3.s = 100 * o3, i3.v = 100 - 100 * n3, i3.v < 0 && (i3.v = 0), t2._updateOutput("slider"));
|
||
const p3 = i3.toRGBA().toString(0);
|
||
this.element.style.background = p3, this.wrapper.style.background = `
|
||
linear-gradient(to top, rgba(0, 0, 0, ${i3.a}), transparent),
|
||
linear-gradient(to left, hsla(${i3.h}, 100%, 50%, ${i3.a}), rgba(255, 255, 255, ${i3.a}))
|
||
`, a2.comparison ? a2.useAsButton || t2._lastColor || l2.style.setProperty("--pcr-color", p3) : (r3.button.style.setProperty("--pcr-color", p3), r3.button.classList.remove("clear"));
|
||
const u2 = i3.toHEXA().toString();
|
||
for (const { el: e3, color: o4 } of t2._swatchColors)
|
||
e3.classList[u2 === o4.toHEXA().toString() ? "add" : "remove"]("pcr-active");
|
||
c2.style.setProperty("--pcr-color", p3);
|
||
} }), hue: C({ lock: "v" === i2 ? "h" : "v", element: t2._root.hue.picker, wrapper: t2._root.hue.slider, onstop: () => t2._emit("changestop", "slider", t2), onchange(o3) {
|
||
if (!e2.hue || !e2.palette)
|
||
return;
|
||
const n3 = s3();
|
||
t2._recalc && (n3.h = 360 * o3), this.element.style.backgroundColor = `hsl(${n3.h}, 100%, 50%)`, r2.palette.trigger();
|
||
} }), opacity: C({ lock: "v" === n2 ? "h" : "v", element: t2._root.opacity.picker, wrapper: t2._root.opacity.slider, onstop: () => t2._emit("changestop", "slider", t2), onchange(o3) {
|
||
if (!e2.opacity || !e2.palette)
|
||
return;
|
||
const n3 = s3();
|
||
t2._recalc && (n3.a = Math.round(100 * o3) / 100), this.element.style.background = `rgba(0, 0, 0, ${n3.a})`, r2.palette.trigger();
|
||
} }), selectable: k({ elements: t2._root.interaction.options, className: "active", onchange(e3) {
|
||
t2._representation = e3.target.getAttribute("data-type").toUpperCase(), t2._recalc && t2._updateOutput("swatch");
|
||
} }) };
|
||
this._components = r2;
|
||
}
|
||
_bindEvents() {
|
||
const { _root: t2, options: e2 } = this, o2 = [i(t2.interaction.clear, "click", () => this._clearColor()), i([t2.interaction.cancel, t2.preview.lastColor], "click", () => {
|
||
this.setHSVA(...(this._lastColor || this._color).toHSVA(), true), this._emit("cancel");
|
||
}), i(t2.interaction.save, "click", () => {
|
||
!this.applyColor() && !e2.showAlways && this.hide();
|
||
}), i(t2.interaction.result, ["keyup", "input"], (t3) => {
|
||
this.setColor(t3.target.value, true) && !this._initializingActive && (this._emit("change", this._color, "input", this), this._emit("changestop", "input", this)), t3.stopImmediatePropagation();
|
||
}), i(t2.interaction.result, ["focus", "blur"], (t3) => {
|
||
this._recalc = "blur" === t3.type, this._recalc && this._updateOutput(null);
|
||
}), i([t2.palette.palette, t2.palette.picker, t2.hue.slider, t2.hue.picker, t2.opacity.slider, t2.opacity.picker], ["mousedown", "touchstart"], () => this._recalc = true, { passive: true })];
|
||
if (!e2.showAlways) {
|
||
const n2 = e2.closeWithKey;
|
||
o2.push(i(t2.button, "click", () => this.isOpen() ? this.hide() : this.show()), i(document, "keyup", (t3) => this.isOpen() && (t3.key === n2 || t3.code === n2) && this.hide()), i(document, ["touchstart", "mousedown"], (e3) => {
|
||
this.isOpen() && !l(e3).some((e4) => e4 === t2.app || e4 === t2.button) && this.hide();
|
||
}, { capture: true }));
|
||
}
|
||
if (e2.adjustableNumbers) {
|
||
const e3 = { rgba: [255, 255, 255, 1], hsva: [360, 100, 100, 1], hsla: [360, 100, 100, 1], cmyk: [100, 100, 100, 100] };
|
||
p2(t2.interaction.result, (t3, o3, n2) => {
|
||
const i2 = e3[this.getColorRepresentation().toLowerCase()];
|
||
if (i2) {
|
||
const e4 = i2[n2], s3 = t3 + (e4 >= 100 ? 1e3 * o3 : o3);
|
||
return s3 <= 0 ? 0 : Number((s3 < e4 ? s3 : e4).toPrecision(3));
|
||
}
|
||
return t3;
|
||
});
|
||
}
|
||
if (e2.autoReposition && !e2.inline) {
|
||
let t3 = null;
|
||
const n2 = this;
|
||
o2.push(i(window, ["scroll", "resize"], () => {
|
||
n2.isOpen() && (e2.closeOnScroll && n2.hide(), null === t3 ? (t3 = setTimeout(() => t3 = null, 100), requestAnimationFrame(function e3() {
|
||
n2._rePositioningPicker(), null !== t3 && requestAnimationFrame(e3);
|
||
})) : (clearTimeout(t3), t3 = setTimeout(() => t3 = null, 100)));
|
||
}, { capture: true }));
|
||
}
|
||
this._eventBindings = o2;
|
||
}
|
||
_rePositioningPicker() {
|
||
const { options: t2 } = this;
|
||
if (!t2.inline) {
|
||
if (!this._nanopop.update({ container: document.body.getBoundingClientRect(), position: t2.position })) {
|
||
const t3 = this._root.app, e2 = t3.getBoundingClientRect();
|
||
t3.style.top = (window.innerHeight - e2.height) / 2 + "px", t3.style.left = (window.innerWidth - e2.width) / 2 + "px";
|
||
}
|
||
}
|
||
}
|
||
_updateOutput(t2) {
|
||
const { _root: e2, _color: o2, options: n2 } = this;
|
||
if (e2.interaction.type()) {
|
||
const t3 = `to${e2.interaction.type().getAttribute("data-type")}`;
|
||
e2.interaction.result.value = "function" == typeof o2[t3] ? o2[t3]().toString(n2.outputPrecision) : "";
|
||
}
|
||
!this._initializingActive && this._recalc && this._emit("change", o2, t2, this);
|
||
}
|
||
_clearColor(t2 = false) {
|
||
const { _root: e2, options: o2 } = this;
|
||
o2.useAsButton || e2.button.style.setProperty("--pcr-color", "rgba(0, 0, 0, 0.15)"), e2.button.classList.add("clear"), o2.showAlways || this.hide(), this._lastColor = null, this._initializingActive || t2 || (this._emit("save", null), this._emit("clear"));
|
||
}
|
||
_parseLocalColor(t2) {
|
||
const { values: e2, type: o2, a: n2 } = w(t2), { lockOpacity: i2 } = this.options, s3 = void 0 !== n2 && 1 !== n2;
|
||
return e2 && 3 === e2.length && (e2[3] = void 0), { values: !e2 || i2 && s3 ? null : e2, type: o2 };
|
||
}
|
||
_t(t2) {
|
||
return this.options.i18n[t2] || _E.I18N_DEFAULTS[t2];
|
||
}
|
||
_emit(t2, ...e2) {
|
||
this._eventListener[t2].forEach((t3) => t3(...e2, this));
|
||
}
|
||
on(t2, e2) {
|
||
return this._eventListener[t2].push(e2), this;
|
||
}
|
||
off(t2, e2) {
|
||
const o2 = this._eventListener[t2] || [], n2 = o2.indexOf(e2);
|
||
return ~n2 && o2.splice(n2, 1), this;
|
||
}
|
||
addSwatch(t2) {
|
||
const { values: e2 } = this._parseLocalColor(t2);
|
||
if (e2) {
|
||
const { _swatchColors: t3, _root: o2 } = this, n2 = A(...e2), s3 = r(`<button type="button" style="--pcr-color: ${n2.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);
|
||
return o2.swatches.appendChild(s3), t3.push({ el: s3, color: n2 }), this._eventBindings.push(i(s3, "click", () => {
|
||
this.setHSVA(...n2.toHSVA(), true), this._emit("swatchselect", n2), this._emit("change", n2, "swatch", this);
|
||
})), true;
|
||
}
|
||
return false;
|
||
}
|
||
removeSwatch(t2) {
|
||
const e2 = this._swatchColors[t2];
|
||
if (e2) {
|
||
const { el: o2 } = e2;
|
||
return this._root.swatches.removeChild(o2), this._swatchColors.splice(t2, 1), true;
|
||
}
|
||
return false;
|
||
}
|
||
applyColor(t2 = false) {
|
||
const { preview: e2, button: o2 } = this._root, n2 = this._color.toRGBA().toString(0);
|
||
return e2.lastColor.style.setProperty("--pcr-color", n2), this.options.useAsButton || o2.style.setProperty("--pcr-color", n2), o2.classList.remove("clear"), this._lastColor = this._color.clone(), this._initializingActive || t2 || this._emit("save", this._color), this;
|
||
}
|
||
destroy() {
|
||
cancelAnimationFrame(this._setupAnimationFrame), this._eventBindings.forEach((t2) => s2(...t2)), Object.keys(this._components).forEach((t2) => this._components[t2].destroy());
|
||
}
|
||
destroyAndRemove() {
|
||
this.destroy();
|
||
const { root: t2, app: e2 } = this._root;
|
||
t2.parentElement && t2.parentElement.removeChild(t2), e2.parentElement.removeChild(e2), Object.keys(this).forEach((t3) => this[t3] = null);
|
||
}
|
||
hide() {
|
||
return !!this.isOpen() && (this._root.app.classList.remove("visible"), this._emit("hide"), true);
|
||
}
|
||
show() {
|
||
return !this.options.disabled && !this.isOpen() && (this._root.app.classList.add("visible"), this._rePositioningPicker(), this._emit("show", this._color), this);
|
||
}
|
||
isOpen() {
|
||
return this._root.app.classList.contains("visible");
|
||
}
|
||
setHSVA(t2 = 360, e2 = 0, o2 = 0, n2 = 1, i2 = false) {
|
||
const s3 = this._recalc;
|
||
if (this._recalc = false, t2 < 0 || t2 > 360 || e2 < 0 || e2 > 100 || o2 < 0 || o2 > 100 || n2 < 0 || n2 > 1)
|
||
return false;
|
||
this._color = A(t2, e2, o2, n2);
|
||
const { hue: r2, opacity: a2, palette: l2 } = this._components;
|
||
return r2.update(t2 / 360), a2.update(n2), l2.update(e2 / 100, 1 - o2 / 100), i2 || this.applyColor(), s3 && this._updateOutput(), this._recalc = s3, true;
|
||
}
|
||
setColor(t2, e2 = false) {
|
||
if (null === t2)
|
||
return this._clearColor(e2), true;
|
||
const { values: o2, type: n2 } = this._parseLocalColor(t2);
|
||
if (o2) {
|
||
const t3 = n2.toUpperCase(), { options: i2 } = this._root.interaction, s3 = i2.find((e3) => e3.getAttribute("data-type") === t3);
|
||
if (s3 && !s3.hidden)
|
||
for (const t4 of i2)
|
||
t4.classList[t4 === s3 ? "add" : "remove"]("active");
|
||
return !!this.setHSVA(...o2, e2) && this.setColorRepresentation(t3);
|
||
}
|
||
return false;
|
||
}
|
||
setColorRepresentation(t2) {
|
||
return t2 = t2.toUpperCase(), !!this._root.interaction.options.find((e2) => e2.getAttribute("data-type").startsWith(t2) && !e2.click());
|
||
}
|
||
getColorRepresentation() {
|
||
return this._representation;
|
||
}
|
||
getColor() {
|
||
return this._color;
|
||
}
|
||
getSelectedColor() {
|
||
return this._lastColor;
|
||
}
|
||
getRoot() {
|
||
return this._root;
|
||
}
|
||
disable() {
|
||
return this.hide(), this.options.disabled = true, this._root.button.classList.add("disabled"), this;
|
||
}
|
||
enable() {
|
||
return this.options.disabled = false, this._root.button.classList.remove("disabled"), this;
|
||
}
|
||
};
|
||
let E = _E;
|
||
__publicField(E, "utils", o);
|
||
__publicField(E, "version", "1.9.1");
|
||
__publicField(E, "I18N_DEFAULTS", { "ui:dialog": "color picker dialog", "btn:toggle": "toggle color picker dialog", "btn:swatch": "color swatch", "btn:last-color": "use previous color", "btn:save": "Save", "btn:cancel": "Cancel", "btn:clear": "Clear", "aria:btn:save": "save and close", "aria:btn:cancel": "cancel and close", "aria:btn:clear": "clear and close", "aria:input": "color input field", "aria:palette": "color selection area", "aria:hue": "hue selection slider", "aria:opacity": "selection slider" });
|
||
__publicField(E, "DEFAULT_OPTIONS", { appClass: null, theme: "classic", useAsButton: false, padding: 8, disabled: false, comparison: true, closeOnScroll: false, outputPrecision: 0, lockOpacity: false, autoReposition: true, container: "body", components: { interaction: {} }, i18n: {}, swatches: null, inline: false, sliders: null, default: "#42445a", defaultRepresentation: null, position: "bottom-middle", adjustableNumbers: true, showAlways: false, closeWithKey: "Escape" });
|
||
__publicField(E, "create", (t2) => new _E(t2));
|
||
return e = e.default;
|
||
})());
|
||
}
|
||
});
|
||
|
||
// src/main.ts
|
||
var main_exports = {};
|
||
__export(main_exports, {
|
||
default: () => CodeBlockCustomizerPlugin
|
||
});
|
||
module.exports = __toCommonJS(main_exports);
|
||
var import_obsidian5 = require("obsidian");
|
||
var _ = __toESM(require_lodash());
|
||
|
||
// src/Settings.ts
|
||
var D_ACTIVE_CODEBLOCK_LINE_COLOR = "#073642";
|
||
var D_ACTIVE_LINE_COLOR = "#468eeb33";
|
||
var D_BACKGROUND_COLOR = "#002B36";
|
||
var D_HIGHLIGHT_COLOR = "#054b5c";
|
||
var D_HEADER_COLOR = "#0a4554";
|
||
var D_HEADER_TEXT_COLOR = "#DADADA";
|
||
var D_HEADER_LINE_COLOR = "#46cced";
|
||
var D_GUTTER_TEXT_COLOR = "#6c6c6c";
|
||
var D_GUTTER_BACKGROUND_COLOR = "#073642";
|
||
var D_LANG_COLOR = "#000000";
|
||
var D_LANG_BACKGROUND_COLOR = "#008080";
|
||
var D_GUTTER_ACTIVE_LINENR_COLOR = "#DADADA";
|
||
var D_INLINE_CODE_BACKGROUND_COLOR = "#054b5c";
|
||
var D_INLINE_CODE_TEXT_COLOR = "#DADADA";
|
||
var L_ACTIVE_CODEBLOCK_LINE_COLOR = "#EDE8D6";
|
||
var L_ACTIVE_LINE_COLOR = "#60460633";
|
||
var L_BACKGROUND_COLOR = "#FCF6E4";
|
||
var L_HIGHLIGHT_COLOR = "#E9DFBA";
|
||
var L_HEADER_COLOR = "#D5CCB4";
|
||
var L_HEADER_TEXT_COLOR = "#866704";
|
||
var L_HEADER_LINE_COLOR = "#EDD489";
|
||
var L_GUTTER_TEXT_COLOR = "#6c6c6c";
|
||
var L_GUTTER_BACKGROUND_COLOR = "#EDE8D6";
|
||
var L_LANG_COLOR = "#C25F30";
|
||
var L_LANG_BACKGROUND_COLOR = "#B8B5AA";
|
||
var L_GUTTER_ACTIVE_LINENR_COLOR = "#866704";
|
||
var L_INLINE_CODE_BACKGROUND_COLOR = "#E9DFBA";
|
||
var L_INLINE_CODE_TEXT_COLOR = "#866704";
|
||
var SELECTION_MATCH_COLOR = "#99ff7780";
|
||
var SolarizedDarkColors = {
|
||
codeblock: {
|
||
activeLineColor: D_ACTIVE_CODEBLOCK_LINE_COLOR,
|
||
backgroundColor: D_BACKGROUND_COLOR,
|
||
highlightColor: D_HIGHLIGHT_COLOR,
|
||
alternateHighlightColors: {},
|
||
languageBorderColors: {},
|
||
textColor: "#A30505",
|
||
bracketHighlightColorMatch: "#36e920",
|
||
bracketHighlightColorNoMatch: "#FF0000",
|
||
bracketHighlightBackgroundColorMatch: D_ACTIVE_CODEBLOCK_LINE_COLOR,
|
||
bracketHighlightBackgroundColorNoMatch: D_ACTIVE_CODEBLOCK_LINE_COLOR,
|
||
selectionMatchHighlightColor: SELECTION_MATCH_COLOR
|
||
},
|
||
header: {
|
||
backgroundColor: D_HEADER_COLOR,
|
||
textColor: D_HEADER_TEXT_COLOR,
|
||
lineColor: D_HEADER_LINE_COLOR,
|
||
codeBlockLangTextColor: D_LANG_COLOR,
|
||
codeBlockLangBackgroundColor: D_LANG_BACKGROUND_COLOR
|
||
},
|
||
gutter: {
|
||
textColor: D_GUTTER_TEXT_COLOR,
|
||
backgroundColor: D_GUTTER_BACKGROUND_COLOR,
|
||
activeLineNrColor: D_GUTTER_ACTIVE_LINENR_COLOR
|
||
},
|
||
inlineCode: {
|
||
backgroundColor: D_INLINE_CODE_BACKGROUND_COLOR,
|
||
textColor: D_INLINE_CODE_TEXT_COLOR
|
||
},
|
||
editorActiveLineColor: D_ACTIVE_LINE_COLOR,
|
||
languageSpecificColors: {}
|
||
};
|
||
var SolarizedLightColors = {
|
||
codeblock: {
|
||
activeLineColor: L_ACTIVE_CODEBLOCK_LINE_COLOR,
|
||
backgroundColor: L_BACKGROUND_COLOR,
|
||
highlightColor: L_HIGHLIGHT_COLOR,
|
||
alternateHighlightColors: {},
|
||
languageBorderColors: {},
|
||
textColor: "#A30505",
|
||
bracketHighlightColorMatch: "#ff01f7",
|
||
bracketHighlightColorNoMatch: "#FF0000",
|
||
bracketHighlightBackgroundColorMatch: L_ACTIVE_CODEBLOCK_LINE_COLOR,
|
||
bracketHighlightBackgroundColorNoMatch: L_ACTIVE_CODEBLOCK_LINE_COLOR,
|
||
selectionMatchHighlightColor: SELECTION_MATCH_COLOR
|
||
},
|
||
header: {
|
||
backgroundColor: L_HEADER_COLOR,
|
||
textColor: L_HEADER_TEXT_COLOR,
|
||
lineColor: L_HEADER_LINE_COLOR,
|
||
codeBlockLangTextColor: L_LANG_COLOR,
|
||
codeBlockLangBackgroundColor: L_LANG_BACKGROUND_COLOR
|
||
},
|
||
gutter: {
|
||
textColor: L_GUTTER_TEXT_COLOR,
|
||
backgroundColor: L_GUTTER_BACKGROUND_COLOR,
|
||
activeLineNrColor: L_GUTTER_ACTIVE_LINENR_COLOR
|
||
},
|
||
inlineCode: {
|
||
backgroundColor: L_INLINE_CODE_BACKGROUND_COLOR,
|
||
textColor: L_INLINE_CODE_TEXT_COLOR
|
||
},
|
||
editorActiveLineColor: L_ACTIVE_LINE_COLOR,
|
||
languageSpecificColors: {}
|
||
};
|
||
var Solarized = {
|
||
baseTheme: "Solarized",
|
||
settings: {
|
||
codeblock: {
|
||
enableLineNumbers: true,
|
||
enableActiveLineHighlight: true,
|
||
codeBlockBorderStylingPosition: "disable",
|
||
showIndentationLines: false,
|
||
enableLinks: false,
|
||
enableLinkUpdate: false,
|
||
enableBracketHighlight: true,
|
||
highlightNonMatchingBrackets: true,
|
||
inverseFold: false,
|
||
enableSelectionMatching: false,
|
||
unwrapcode: false,
|
||
buttons: {
|
||
alwaysShowButtons: false,
|
||
alwaysShowCopyCodeButton: false,
|
||
enableSelectCodeButton: false,
|
||
enableDeleteCodeButton: false,
|
||
enableWrapCodeButton: false
|
||
}
|
||
},
|
||
textHighlight: {
|
||
lineSeparator: "",
|
||
textSeparator: ""
|
||
},
|
||
semiFold: {
|
||
enableSemiFold: false,
|
||
visibleLines: 5,
|
||
showAdditionalUncollapseButon: false
|
||
},
|
||
header: {
|
||
boldText: false,
|
||
italicText: false,
|
||
collapseIconPosition: "hide",
|
||
collapsedCodeText: "",
|
||
codeblockLangBoldText: true,
|
||
codeblockLangItalicText: true,
|
||
alwaysDisplayCodeblockLang: false,
|
||
alwaysDisplayCodeblockIcon: false,
|
||
displayCodeBlockLanguage: true,
|
||
displayCodeBlockIcon: false,
|
||
disableFoldUnlessSpecified: false
|
||
},
|
||
gutter: {
|
||
highlightActiveLineNr: false,
|
||
enableHighlight: false
|
||
},
|
||
inlineCode: {
|
||
enableInlineCodeStyling: false
|
||
},
|
||
printing: {
|
||
enablePrintToPDFStyling: false,
|
||
forceCurrentColorUse: false,
|
||
uncollapseDuringPrint: true
|
||
},
|
||
common: {
|
||
enableInSourceMode: false
|
||
},
|
||
enableEditorActiveLineHighlight: true
|
||
},
|
||
colors: {
|
||
dark: SolarizedDarkColors,
|
||
light: SolarizedLightColors
|
||
}
|
||
};
|
||
var ObsidianDarkColors = {
|
||
codeblock: {
|
||
activeLineColor: "--color-base-30",
|
||
backgroundColor: "--code-background",
|
||
highlightColor: "--text-highlight-bg",
|
||
alternateHighlightColors: {},
|
||
languageBorderColors: {},
|
||
textColor: "#A30505",
|
||
bracketHighlightColorMatch: "#f33bff",
|
||
bracketHighlightColorNoMatch: "#FF0000",
|
||
bracketHighlightBackgroundColorMatch: "--color-base-30",
|
||
bracketHighlightBackgroundColorNoMatch: "--color-base-30",
|
||
selectionMatchHighlightColor: SELECTION_MATCH_COLOR
|
||
},
|
||
header: {
|
||
backgroundColor: "--code-background",
|
||
textColor: "--text-normal",
|
||
lineColor: "--color-base-30",
|
||
codeBlockLangTextColor: "--code-comment",
|
||
codeBlockLangBackgroundColor: "--code-background"
|
||
},
|
||
gutter: {
|
||
textColor: "--text-faint",
|
||
backgroundColor: "--code-background",
|
||
activeLineNrColor: "--text-muted"
|
||
},
|
||
inlineCode: {
|
||
backgroundColor: "--code-background",
|
||
textColor: "--code-normal"
|
||
},
|
||
editorActiveLineColor: "--color-base-20",
|
||
languageSpecificColors: {}
|
||
};
|
||
var ObsidianLightColors = {
|
||
codeblock: {
|
||
activeLineColor: "--color-base-30",
|
||
backgroundColor: "--code-background",
|
||
highlightColor: "--text-highlight-bg",
|
||
alternateHighlightColors: {},
|
||
languageBorderColors: {},
|
||
textColor: "#A30505",
|
||
bracketHighlightColorMatch: "#f33bff",
|
||
bracketHighlightColorNoMatch: "#FF0000",
|
||
bracketHighlightBackgroundColorMatch: "--color-base-30",
|
||
bracketHighlightBackgroundColorNoMatch: "--color-base-30",
|
||
selectionMatchHighlightColor: SELECTION_MATCH_COLOR
|
||
},
|
||
header: {
|
||
backgroundColor: "--code-background",
|
||
textColor: "--text-normal",
|
||
lineColor: "--color-base-30",
|
||
codeBlockLangTextColor: "--code-comment",
|
||
codeBlockLangBackgroundColor: "--code-background"
|
||
},
|
||
gutter: {
|
||
textColor: "--text-faint",
|
||
backgroundColor: "--code-background",
|
||
activeLineNrColor: "--text-muted"
|
||
},
|
||
inlineCode: {
|
||
backgroundColor: "--code-background",
|
||
textColor: "--code-normal"
|
||
},
|
||
editorActiveLineColor: "--color-base-20",
|
||
languageSpecificColors: {}
|
||
};
|
||
var Obsidian = {
|
||
baseTheme: "Obsidian",
|
||
settings: {
|
||
codeblock: {
|
||
enableLineNumbers: true,
|
||
enableActiveLineHighlight: true,
|
||
codeBlockBorderStylingPosition: "disable",
|
||
showIndentationLines: false,
|
||
enableLinks: false,
|
||
enableLinkUpdate: false,
|
||
enableBracketHighlight: true,
|
||
highlightNonMatchingBrackets: true,
|
||
inverseFold: false,
|
||
enableSelectionMatching: false,
|
||
unwrapcode: false,
|
||
buttons: {
|
||
alwaysShowButtons: false,
|
||
alwaysShowCopyCodeButton: false,
|
||
enableSelectCodeButton: false,
|
||
enableDeleteCodeButton: false,
|
||
enableWrapCodeButton: false
|
||
}
|
||
},
|
||
textHighlight: {
|
||
lineSeparator: "",
|
||
textSeparator: ""
|
||
},
|
||
semiFold: {
|
||
enableSemiFold: false,
|
||
visibleLines: 5,
|
||
showAdditionalUncollapseButon: false
|
||
},
|
||
header: {
|
||
boldText: false,
|
||
italicText: false,
|
||
collapseIconPosition: "hide",
|
||
collapsedCodeText: "",
|
||
codeblockLangBoldText: true,
|
||
codeblockLangItalicText: true,
|
||
alwaysDisplayCodeblockLang: false,
|
||
alwaysDisplayCodeblockIcon: false,
|
||
displayCodeBlockLanguage: true,
|
||
displayCodeBlockIcon: false,
|
||
disableFoldUnlessSpecified: false
|
||
},
|
||
gutter: {
|
||
highlightActiveLineNr: true,
|
||
enableHighlight: true
|
||
},
|
||
inlineCode: {
|
||
enableInlineCodeStyling: false
|
||
},
|
||
printing: {
|
||
enablePrintToPDFStyling: false,
|
||
forceCurrentColorUse: false,
|
||
uncollapseDuringPrint: true
|
||
},
|
||
common: {
|
||
enableInSourceMode: false
|
||
},
|
||
enableEditorActiveLineHighlight: true
|
||
},
|
||
colors: {
|
||
dark: ObsidianDarkColors,
|
||
light: ObsidianLightColors
|
||
}
|
||
};
|
||
var DEFAULT_THEMES = {
|
||
"Obsidian": Obsidian,
|
||
"Solarized": Solarized
|
||
};
|
||
var DEFAULT_SETTINGS = {
|
||
Themes: structuredClone(DEFAULT_THEMES),
|
||
ExcludeLangs: "dataview, ad-*",
|
||
SelectedTheme: structuredClone(Obsidian),
|
||
ThemeName: "Obsidian",
|
||
newThemeName: "",
|
||
alternateHighlightColorName: "",
|
||
languageBorderColorName: "",
|
||
foldAllCommand: false,
|
||
settingsType: "basic",
|
||
langSpecificSettingsType: "",
|
||
languageSpecificLanguageName: ""
|
||
};
|
||
|
||
// src/ReadingView.ts
|
||
var import_obsidian2 = require("obsidian");
|
||
|
||
// src/Utils.ts
|
||
var import_obsidian = require("obsidian");
|
||
|
||
// src/Const.ts
|
||
var fadeOutLineCount = 4;
|
||
var SVG_FOLDER_PATH = "/plugins/codeblock-customizer/customSVG/";
|
||
var SVG_FILE_PATH = SVG_FOLDER_PATH + "svg.json";
|
||
var DEFAULT_COLLAPSE_TEXT = "Collapsed Code";
|
||
var DEFAULT_LINE_SEPARATOR = "|";
|
||
var DEFAULT_TEXT_SEPARATOR = ":";
|
||
var Languages = {
|
||
"none": "Plain text",
|
||
"plain": "Plain text",
|
||
"plaintext": "Plain text",
|
||
"text": "Plain text",
|
||
"txt": "Plain text",
|
||
"html": "HTML",
|
||
"xml": "XML",
|
||
"svg": "SVG",
|
||
"mathml": "MathML",
|
||
"ssml": "SSML",
|
||
"rss": "RSS",
|
||
"css": "CSS",
|
||
"clike": "C-like",
|
||
"js": "JavaScript",
|
||
"abap": "ABAP",
|
||
"abnf": "ABNF",
|
||
"al": "AL",
|
||
"antlr4": "ANTLR4",
|
||
"g4": "ANTLR4",
|
||
"apacheconf": "Apache Configuration",
|
||
"apl": "APL",
|
||
"aql": "AQL",
|
||
"ino": "Arduino",
|
||
"arff": "ARFF",
|
||
"armasm": "ARM Assembly",
|
||
"arm-asm": "ARM Assembly",
|
||
"art": "Arturo",
|
||
"asciidoc": "AsciiDoc",
|
||
"adoc": "AsciiDoc",
|
||
"aspnet": "ASP.NET (C#)",
|
||
"asm6502": "6502 Assembly",
|
||
"asmatmel": "Atmel AVR Assembly",
|
||
"autohotkey": "AutoHotkey",
|
||
"autoit": "AutoIt",
|
||
"avisynth": "AviSynth",
|
||
"avs": "AviSynth",
|
||
"avro-idl": "Avro IDL",
|
||
"avdl": "Avro IDL",
|
||
"awk": "AWK",
|
||
"gawk": "GAWK",
|
||
"sh": "Shell",
|
||
"basic": "BASIC",
|
||
"bbcode": "BBcode",
|
||
"bbj": "BBj",
|
||
"bnf": "BNF",
|
||
"rbnf": "RBNF",
|
||
"bqn": "BQN",
|
||
"bsl": "BSL (1C:Enterprise)",
|
||
"oscript": "OneScript",
|
||
"csharp": "C#",
|
||
"cs": "C#",
|
||
"dotnet": "C#",
|
||
"cpp": "C++",
|
||
"cfscript": "CFScript",
|
||
"cfc": "CFScript",
|
||
"cil": "CIL",
|
||
"cilkc": "Cilk/C",
|
||
"cilk-c": "Cilk/C",
|
||
"cilkcpp": "Cilk/C++",
|
||
"cilk-cpp": "Cilk/C++",
|
||
"cilk": "Cilk/C++",
|
||
"cmake": "CMake",
|
||
"cobol": "COBOL",
|
||
"coffee": "CoffeeScript",
|
||
"conc": "Concurnas",
|
||
"csp": "Content-Security-Policy",
|
||
"css-extras": "CSS Extras",
|
||
"csv": "CSV",
|
||
"cue": "CUE",
|
||
"dataweave": "DataWeave",
|
||
"dax": "DAX",
|
||
"django": "Django/Jinja2",
|
||
"jinja2": "Django/Jinja2",
|
||
"dns-zone-file": "DNS zone file",
|
||
"dns-zone": "DNS zone file",
|
||
"dockerfile": "Docker",
|
||
"dot": "DOT (Graphviz)",
|
||
"gv": "DOT (Graphviz)",
|
||
"ebnf": "EBNF",
|
||
"editorconfig": "EditorConfig",
|
||
"ejs": "EJS",
|
||
"etlua": "Embedded Lua templating",
|
||
"erb": "ERB",
|
||
"excel-formula": "Excel Formula",
|
||
"xlsx": "Excel Formula",
|
||
"xls": "Excel Formula",
|
||
"fsharp": "F#",
|
||
"firestore-security-rules": "Firestore security rules",
|
||
"ftl": "FreeMarker Template Language",
|
||
"gml": "GameMaker Language",
|
||
"gamemakerlanguage": "GameMaker Language",
|
||
"gap": "GAP (CAS)",
|
||
"gcode": "G-code",
|
||
"gdscript": "GDScript",
|
||
"gedcom": "GEDCOM",
|
||
"gettext": "gettext",
|
||
"po": "gettext",
|
||
"glsl": "GLSL",
|
||
"gn": "GN",
|
||
"gni": "GN",
|
||
"linker-script": "GNU Linker Script",
|
||
"ld": "GNU Linker Script",
|
||
"go-module": "Go module",
|
||
"go-mod": "Go module",
|
||
"graphql": "GraphQL",
|
||
"hbs": "Handlebars",
|
||
"hs": "Haskell",
|
||
"hcl": "HCL",
|
||
"hlsl": "HLSL",
|
||
"http": "HTTP",
|
||
"hpkp": "HTTP Public-Key-Pins",
|
||
"hsts": "HTTP Strict-Transport-Security",
|
||
"ichigojam": "IchigoJam",
|
||
"icu-message-format": "ICU Message Format",
|
||
"idr": "Idris",
|
||
"ignore": ".ignore",
|
||
"gitignore": ".gitignore",
|
||
"hgignore": ".hgignore",
|
||
"npmignore": ".npmignore",
|
||
"inform7": "Inform 7",
|
||
"javadoc": "JavaDoc",
|
||
"javadoclike": "JavaDoc-like",
|
||
"javastacktrace": "Java stack trace",
|
||
"jq": "JQ",
|
||
"jsdoc": "JSDoc",
|
||
"js-extras": "JS Extras",
|
||
"json": "JSON",
|
||
"webmanifest": "Web App Manifest",
|
||
"json5": "JSON5",
|
||
"jsonp": "JSONP",
|
||
"jsstacktrace": "JS stack trace",
|
||
"js-templates": "JS Templates",
|
||
"keepalived": "Keepalived Configure",
|
||
"kts": "Kotlin Script",
|
||
"kt": "Kotlin",
|
||
"kumir": "KuMir (\u041A\u0443\u041C\u0438\u0440)",
|
||
"kum": "KuMir (\u041A\u0443\u041C\u0438\u0440)",
|
||
"latex": "LaTeX",
|
||
"tex": "TeX",
|
||
"context": "ConTeXt",
|
||
"lilypond": "LilyPond",
|
||
"ly": "LilyPond",
|
||
"emacs": "Lisp",
|
||
"elisp": "Lisp",
|
||
"emacs-lisp": "Lisp",
|
||
"llvm": "LLVM IR",
|
||
"log": "Log file",
|
||
"lolcode": "LOLCODE",
|
||
"magma": "Magma (CAS)",
|
||
"md": "Markdown",
|
||
"markup-templating": "Markup templating",
|
||
"matlab": "MATLAB",
|
||
"maxscript": "MAXScript",
|
||
"mel": "MEL",
|
||
"metafont": "METAFONT",
|
||
"mongodb": "MongoDB",
|
||
"moon": "MoonScript",
|
||
"n1ql": "N1QL",
|
||
"n4js": "N4JS",
|
||
"n4jsd": "N4JS",
|
||
"nand2tetris-hdl": "Nand To Tetris HDL",
|
||
"naniscript": "Naninovel Script",
|
||
"nani": "Naninovel Script",
|
||
"nasm": "NASM",
|
||
"neon": "NEON",
|
||
"nginx": "nginx",
|
||
"nsis": "NSIS",
|
||
"objectivec": "Objective-C",
|
||
"objc": "Objective-C",
|
||
"ocaml": "OCaml",
|
||
"opencl": "OpenCL",
|
||
"openqasm": "OpenQasm",
|
||
"qasm": "OpenQasm",
|
||
"parigp": "PARI/GP",
|
||
"objectpascal": "Object Pascal",
|
||
"psl": "PATROL Scripting Language",
|
||
"pcaxis": "PC-Axis",
|
||
"px": "PC-Axis",
|
||
"peoplecode": "PeopleCode",
|
||
"pcode": "PeopleCode",
|
||
"php": "PHP",
|
||
"phpdoc": "PHPDoc",
|
||
"php-extras": "PHP Extras",
|
||
"plant-uml": "PlantUML",
|
||
"plantuml": "PlantUML",
|
||
"plsql": "PL/SQL",
|
||
"powerquery": "PowerQuery",
|
||
"pq": "PowerQuery",
|
||
"mscript": "PowerQuery",
|
||
"powershell": "PowerShell",
|
||
"promql": "PromQL",
|
||
"properties": ".properties",
|
||
"protobuf": "Protocol Buffers",
|
||
"purebasic": "PureBasic",
|
||
"pbfasm": "PureBasic",
|
||
"purs": "PureScript",
|
||
"py": "Python",
|
||
"qsharp": "Q#",
|
||
"qs": "Q#",
|
||
"q": "Q (kdb+ database)",
|
||
"qml": "QML",
|
||
"rkt": "Racket",
|
||
"cshtml": "Razor C#",
|
||
"razor": "Razor C#",
|
||
"jsx": "React JSX",
|
||
"tsx": "React TSX",
|
||
"renpy": "Ren'py",
|
||
"rpy": "Ren'py",
|
||
"res": "ReScript",
|
||
"rest": "reST (reStructuredText)",
|
||
"robotframework": "Robot Framework",
|
||
"robot": "Robot Framework",
|
||
"rb": "Ruby",
|
||
"sas": "SAS",
|
||
"sass": "Sass (Sass)",
|
||
"scss": "Sass (SCSS)",
|
||
"shell-session": "Shell session",
|
||
"sh-session": "Shell session",
|
||
"shellsession": "Shell session",
|
||
"sml": "SML",
|
||
"smlnj": "SML/NJ",
|
||
"solidity": "Solidity (Ethereum)",
|
||
"sol": "Solidity (Ethereum)",
|
||
"solution-file": "Solution file",
|
||
"sln": "Solution file",
|
||
"soy": "Soy (Closure Template)",
|
||
"sparql": "SPARQL",
|
||
"rq": "SPARQL",
|
||
"splunk-spl": "Splunk SPL",
|
||
"sqf": "SQF: Status Quo Function (Arma 3)",
|
||
"sql": "SQL",
|
||
"stata": "Stata Ado",
|
||
"iecst": "Structured Text (IEC 61131-3)",
|
||
"supercollider": "SuperCollider",
|
||
"sclang": "SuperCollider",
|
||
"systemd": "Systemd configuration file",
|
||
"t4-templating": "T4 templating",
|
||
"t4-cs": "T4 Text Templates (C#)",
|
||
"t4": "T4 Text Templates (C#)",
|
||
"t4-vb": "T4 Text Templates (VB)",
|
||
"tap": "TAP",
|
||
"tt2": "Template Toolkit 2",
|
||
"toml": "TOML",
|
||
"trickle": "trickle",
|
||
"troy": "troy",
|
||
"trig": "TriG",
|
||
"ts": "TypeScript",
|
||
"tsconfig": "TSConfig",
|
||
"uscript": "UnrealScript",
|
||
"uc": "UnrealScript",
|
||
"uorazor": "UO Razor Script",
|
||
"uri": "URI",
|
||
"url": "URL",
|
||
"vbnet": "VB.Net",
|
||
"vhdl": "VHDL",
|
||
"vim": "vim",
|
||
"visual-basic": "Visual Basic",
|
||
"vba": "VBA",
|
||
"vb": "Visual Basic",
|
||
"wasm": "WebAssembly",
|
||
"web-idl": "Web IDL",
|
||
"webidl": "Web IDL",
|
||
"wgsl": "WGSL",
|
||
"wiki": "Wiki markup",
|
||
"wolfram": "Wolfram language",
|
||
"nb": "Mathematica Notebook",
|
||
"wl": "Wolfram language",
|
||
"xeoracube": "XeoraCube",
|
||
"xml-doc": "XML doc (.net)",
|
||
"xojo": "Xojo (REALbasic)",
|
||
"xquery": "XQuery",
|
||
"yaml": "YAML",
|
||
"yml": "YAML",
|
||
"yang": "YANG"
|
||
};
|
||
var manualLang = {
|
||
"css": "CSS",
|
||
"clike": "C-like",
|
||
"javascript": "JavaScript",
|
||
"js": "JavaScript",
|
||
"abap": "ABAP",
|
||
"abnf": "ABNF",
|
||
"actionscript": "ActionScript",
|
||
"ada": "Ada",
|
||
"agda": "Agda",
|
||
"al": "AL",
|
||
"antlr4": "ANTLR4",
|
||
"g4": "ANTLR4",
|
||
"apacheconf": "Apache Configuration",
|
||
"apex": "Apex",
|
||
"apl": "APL",
|
||
"applescript": "AppleScript",
|
||
"aql": "AQL",
|
||
"arduino": "Arduino",
|
||
"ino": "Arduino",
|
||
"arff": "ARFF",
|
||
"armasm": "ARM Assembly",
|
||
"arm-asm": "ARM Assembly",
|
||
"arturo": "Arturo",
|
||
"art": "Arturo",
|
||
"asciidoc": "AsciiDoc",
|
||
"adoc": "AsciiDoc",
|
||
"aspnet": "ASP.NET (C#)",
|
||
"asm6502": "6502 Assembly",
|
||
"asmatmel": "Atmel AVR Assembly",
|
||
"autohotkey": "AutoHotkey",
|
||
"autoit": "AutoIt",
|
||
"avisynth": "AviSynth",
|
||
"avs": "AviSynth",
|
||
"avro-idl": "Avro IDL",
|
||
"avdl": "Avro IDL",
|
||
"awk": "AWK",
|
||
"gawk": "GAWK",
|
||
"bash": "Shell",
|
||
"sh": "Shell",
|
||
"shell": "Shell",
|
||
"basic": "BASIC",
|
||
"batch": "Batch",
|
||
"bbcode": "BBcode",
|
||
"shortcode": "BBcode",
|
||
"bbj": "BBj",
|
||
"birb": "Birb",
|
||
"bison": "Bison",
|
||
"bnf": "BNF",
|
||
"rbnf": "BNF",
|
||
"bqn": "BQN",
|
||
"brainfuck": "Brainfuck",
|
||
"brightscript": "BrightScript",
|
||
"bro": "Bro",
|
||
"bsl": "BSL (1C)",
|
||
"oscript": "BSL (1C)",
|
||
"c": "C",
|
||
"csharp": "C#",
|
||
"cs": "C#",
|
||
"dotnet": "C#",
|
||
"cpp": "C++",
|
||
"cfscript": "CFScript",
|
||
"cfc": "CFScript",
|
||
"chaiscript": "ChaiScript",
|
||
"cil": "CIL",
|
||
"cilkc": "Cilk/C",
|
||
"cilk-c": "Cilk/C",
|
||
"cilkcpp": "Cilk/C++",
|
||
"cilk-cpp": "Cilk/C++",
|
||
"cilk": "Cilk/C++",
|
||
"clojure": "Clojure",
|
||
"cmake": "CMake",
|
||
"cobol": "COBOL",
|
||
"coffeescript": "CoffeeScript",
|
||
"coffee": "CoffeeScript",
|
||
"concurnas": "Concurnas",
|
||
"conc": "Concurnas",
|
||
"csp": "Content-Security-Policy",
|
||
"cooklang": "Cooklang",
|
||
"coq": "Coq",
|
||
"crystal": "Crystal",
|
||
"css-extras": "CSS Extras",
|
||
"csv": "CSV",
|
||
"cue": "CUE",
|
||
"cypher": "Cypher",
|
||
"d": "D",
|
||
"dart": "Dart",
|
||
"dataweave": "DataWeave",
|
||
"dax": "DAX",
|
||
"dhall": "Dhall",
|
||
"diff": "Diff",
|
||
"django": "Django/Jinja2",
|
||
"jinja2": "Django/Jinja2",
|
||
"dns-zone-file": "DNS zone file",
|
||
"dns-zone": "DNS zone file",
|
||
"docker": "Docker",
|
||
"dockerfile": "Docker",
|
||
"dot": "DOT (Graphviz)",
|
||
"gv": "DOT (Graphviz)",
|
||
"ebnf": "EBNF",
|
||
"editorconfig": "EditorConfig",
|
||
"eiffel": "Eiffel",
|
||
"ejs": "EJS",
|
||
"eta": "EJS",
|
||
"elixir": "Elixir",
|
||
"elm": "Elm",
|
||
"etlua": "Embedded Lua templating",
|
||
"erb": "ERB",
|
||
"erlang": "Erlang",
|
||
"excel-formula": "Excel Formula",
|
||
"xlsx": "Excel Formula",
|
||
"xls": "Excel Formula",
|
||
"fsharp": "F#",
|
||
"factor": "Factor",
|
||
"false": "False",
|
||
"firestore-security-rules": "Firestore security rules",
|
||
"flow": "Flow",
|
||
"fortran": "Fortran",
|
||
"ftl": "FreeMarker Template Language",
|
||
"gml": "GameMaker Language",
|
||
"gamemakerlanguage": "GameMaker Language",
|
||
"gap": "GAP (CAS)",
|
||
"gcode": "G-code",
|
||
"gdscript": "GDScript",
|
||
"gedcom": "GEDCOM",
|
||
"gettext": "gettext",
|
||
"po": "gettext",
|
||
"gherkin": "Gherkin",
|
||
"git": "Git",
|
||
"glsl": "GLSL",
|
||
"gn": "GN",
|
||
"gni": "GN",
|
||
"linker-script": "GNU Linker Script",
|
||
"ld": "GNU Linker Script",
|
||
"go": "Go",
|
||
"go-module": "Go module",
|
||
"go-mod": "Go module",
|
||
"gradle": "Gradle",
|
||
"graphql": "GraphQL",
|
||
"groovy": "Groovy",
|
||
"haml": "Haml",
|
||
"handlebars": "Handlebars",
|
||
"hbs": "Handlebars",
|
||
"mustache": "Handlebars",
|
||
"haskell": "Haskell",
|
||
"hs": "Haskell",
|
||
"haxe": "Haxe",
|
||
"hcl": "HCL",
|
||
"hlsl": "HLSL",
|
||
"hoon": "Hoon",
|
||
"http": "HTTP",
|
||
"hpkp": "HTTP Public-Key-Pins",
|
||
"hsts": "HTTP Strict-Transport-Security",
|
||
"ichigojam": "IchigoJam",
|
||
"icon": "Icon",
|
||
"icu-message-format": "ICU Message Format",
|
||
"idris": "Idris",
|
||
"idr": "Idris",
|
||
"ignore": ".ignore",
|
||
"gitignore": ".ignore",
|
||
"hgignore": ".ignore",
|
||
"npmignore": ".ignore",
|
||
"inform7": "Inform 7",
|
||
"ini": "Ini",
|
||
"io": "Io",
|
||
"j": "J",
|
||
"java": "Java",
|
||
"javadoc": "JavaDoc",
|
||
"javadoclike": "JavaDoc-like",
|
||
"javastacktrace": "Java stack trace",
|
||
"jexl": "Jexl",
|
||
"jolie": "Jolie",
|
||
"jq": "JQ",
|
||
"jsdoc": "JSDoc",
|
||
"js-extras": "JS Extras",
|
||
"json": "JSON",
|
||
"webmanifest": "JSON",
|
||
"json5": "JSON5",
|
||
"jsonp": "JSONP",
|
||
"jsstacktrace": "JS stack trace",
|
||
"js-templates": "JS Templates",
|
||
"julia": "Julia",
|
||
"keepalived": "Keepalived Configure",
|
||
"keyman": "Keyman",
|
||
"kotlin": "Kotlin",
|
||
"kt": "Kotlin",
|
||
"kts": "Kotlin",
|
||
"kumir": "KuMir (\u041A\u0443\u041C\u0438\u0440)",
|
||
"kum": "KuMir (\u041A\u0443\u041C\u0438\u0440)",
|
||
"kusto": "Kusto",
|
||
"latex": "LaTeX",
|
||
"tex": "LaTeX",
|
||
"context": "LaTeX",
|
||
"latte": "Latte",
|
||
"less": "Less",
|
||
"lilypond": "LilyPond",
|
||
"ly": "LilyPond",
|
||
"liquid": "Liquid",
|
||
"lisp": "Lisp",
|
||
"emacs": "Lisp",
|
||
"elisp": "Lisp",
|
||
"emacs-lisp": "Lisp",
|
||
"livescript": "LiveScript",
|
||
"llvm": "LLVM IR",
|
||
"log": "Log file",
|
||
"lolcode": "LOLCODE",
|
||
"lua": "Lua",
|
||
"magma": "Magma (CAS)",
|
||
"makefile": "Makefile",
|
||
"markdown": "Markdown",
|
||
"md": "Markdown",
|
||
"markup-templating": "Markup templating",
|
||
"mata": "Mata",
|
||
"matlab": "MATLAB",
|
||
"maxscript": "MAXScript",
|
||
"mel": "MEL",
|
||
"mermaid": "Mermaid",
|
||
"metafont": "METAFONT",
|
||
"mizar": "Mizar",
|
||
"mongodb": "MongoDB",
|
||
"monkey": "Monkey",
|
||
"moonscript": "MoonScript",
|
||
"moon": "MoonScript",
|
||
"n1ql": "N1QL",
|
||
"n4js": "N4JS",
|
||
"n4jsd": "N4JS",
|
||
"nand2tetris-hdl": "Nand To Tetris HDL",
|
||
"naniscript": "Naninovel Script",
|
||
"nani": "Naninovel Script",
|
||
"nasm": "NASM",
|
||
"neon": "NEON",
|
||
"nevod": "Nevod",
|
||
"nginx": "nginx",
|
||
"nim": "Nim",
|
||
"nix": "Nix",
|
||
"nsis": "NSIS",
|
||
"objectivec": "Objective-C",
|
||
"objc": "Objective-C",
|
||
"ocaml": "OCaml",
|
||
"odin": "Odin",
|
||
"opencl": "OpenCL",
|
||
"openqasm": "OpenQasm",
|
||
"qasm": "OpenQasm",
|
||
"oz": "Oz",
|
||
"parigp": "PARI/GP",
|
||
"parser": "Parser",
|
||
"pascal": "Pascal",
|
||
"objectpascal": "Pascal",
|
||
"pascaligo": "Pascaligo",
|
||
"psl": "PATROL Scripting Language",
|
||
"pcaxis": "PC-Axis",
|
||
"px": "PC-Axis",
|
||
"peoplecode": "PeopleCode",
|
||
"pcode": "PeopleCode",
|
||
"perl": "Perl",
|
||
"php": "PHP",
|
||
"phpdoc": "PHPDoc",
|
||
"php-extras": "PHP Extras",
|
||
"plant-uml": "PlantUML",
|
||
"plantuml": "PlantUML",
|
||
"plsql": "PL/SQL",
|
||
"powerquery": "PowerQuery",
|
||
"pq": "PowerQuery",
|
||
"mscript": "PowerQuery",
|
||
"powershell": "PowerShell",
|
||
"processing": "Processing",
|
||
"prolog": "Prolog",
|
||
"promql": "PromQL",
|
||
"properties": ".properties",
|
||
"protobuf": "Protocol Buffers",
|
||
"pug": "Pug",
|
||
"puppet": "Puppet",
|
||
"pure": "Pure",
|
||
"purebasic": "PureBasic",
|
||
"pbfasm": "PureBasic",
|
||
"purescript": "PureScript",
|
||
"purs": "PureScript",
|
||
"python": "Python",
|
||
"py": "Python",
|
||
"qsharp": "Q#",
|
||
"qs": "Q#",
|
||
"q": "Q (kdb+ database)",
|
||
"qml": "QML",
|
||
"qore": "Qore",
|
||
"r": "R",
|
||
"racket": "Racket",
|
||
"rkt": "Racket",
|
||
"cshtml": "Razor C#",
|
||
"jsx": "React JSX",
|
||
"tsx": "React TSX",
|
||
"reason": "Reason",
|
||
"regex": "Regex",
|
||
"rego": "Rego",
|
||
"renpy": "Ren'py",
|
||
"rpy": "Ren'py",
|
||
"rescript": "ReScript",
|
||
"res": "ReScript",
|
||
"rest": "reST (reStructuredText)",
|
||
"rip": "Rip",
|
||
"roboconf": "Roboconf",
|
||
"robotframework": "Robot Framework",
|
||
"robot": "Robot Framework",
|
||
"ruby": "Ruby",
|
||
"rb": "Ruby",
|
||
"rust": "Rust",
|
||
"sas": "SAS",
|
||
"sass": "Sass (Sass)",
|
||
"scss": "Sass (SCSS)",
|
||
"scala": "Scala",
|
||
"scheme": "Scheme",
|
||
"shell-session": "Shell session",
|
||
"sh-session": "Shell session",
|
||
"shellsession": "Shell session",
|
||
"smali": "Smali",
|
||
"smalltalk": "Smalltalk",
|
||
"smarty": "Smarty",
|
||
"sml": "SML",
|
||
"smlnj": "SML",
|
||
"solidity": "Solidity (Ethereum)",
|
||
"sol": "Solidity (Ethereum)",
|
||
"solution-file": "Solution file",
|
||
"sln": "Solution file",
|
||
"soy": "Soy (Closure Template)",
|
||
"sparql": "SPARQL",
|
||
"rq": "SPARQL",
|
||
"splunk-spl": "Splunk SPL",
|
||
"sqf": "SQF",
|
||
"sql": "SQL",
|
||
"squirrel": "Squirrel",
|
||
"stan": "Stan",
|
||
"stata": "Stata Ado",
|
||
"iecst": "Structured Text (IEC 61131-3)",
|
||
"stylus": "Stylus",
|
||
"supercollider": "SuperCollider",
|
||
"sclang": "SuperCollider",
|
||
"swift": "Swift",
|
||
"systemd": "Systemd configuration file",
|
||
"t4-templating": "T4 templating",
|
||
"t4-cs": "T4 Text Templates (C#)",
|
||
"t4": "T4 Text Templates (C#)",
|
||
"t4-vb": "T4 Text Templates (VB)",
|
||
"tap": "TAP",
|
||
"tcl": "Tcl",
|
||
"tt2": "Template Toolkit 2",
|
||
"textile": "Textile",
|
||
"toml": "TOML",
|
||
"tremor": "Tremor",
|
||
"trickle": "Tremor",
|
||
"troy": "Tremor",
|
||
"turtle": "Turtle",
|
||
"trig": "Turtle",
|
||
"twig": "Twig",
|
||
"typescript": "TypeScript",
|
||
"ts": "TypeScript",
|
||
"typoscript": "TypoScript",
|
||
"tsconfig": "TypoScript",
|
||
"unrealscript": "UnrealScript",
|
||
"uscript": "UnrealScript",
|
||
"uc": "UnrealScript",
|
||
"uorazor": "UO Razor Script",
|
||
"uri": "URI",
|
||
"url": "URI",
|
||
"v": "V",
|
||
"vala": "Vala",
|
||
"vbnet": "VB.Net",
|
||
"velocity": "Velocity",
|
||
"verilog": "Verilog",
|
||
"vhdl": "VHDL",
|
||
"vim": "vim",
|
||
"visual-basic": "Visual Basic",
|
||
"vb": "Visual Basic",
|
||
"vba": "Visual Basic",
|
||
"warpscript": "WarpScript",
|
||
"wasm": "WebAssembly",
|
||
"web-idl": "Web IDL",
|
||
"webidl": "Web IDL",
|
||
"wgsl": "WGSL",
|
||
"wiki": "Wiki markup",
|
||
"wolfram": "Wolfram language",
|
||
"mathematica": "Wolfram language",
|
||
"nb": "Wolfram language",
|
||
"wl": "Wolfram language",
|
||
"wren": "Wren",
|
||
"xeora": "Xeora",
|
||
"xeoracube": "Xeora",
|
||
"xml-doc": "XML doc (.net)",
|
||
"xojo": "Xojo (REALbasic)",
|
||
"xquery": "XQuery",
|
||
"yaml": "YAML",
|
||
"yml": "YAML",
|
||
"yang": "YANG",
|
||
"zig": "Zig"
|
||
};
|
||
var Icons = {
|
||
".gitignore": `<path d="M29.472,14.753,17.247,2.528a1.8,1.8,0,0,0-2.55,0L12.158,5.067l3.22,3.22a2.141,2.141,0,0,1,2.712,2.73l3.1,3.1a2.143,2.143,0,1,1-1.285,1.21l-2.895-2.895v7.617a2.141,2.141,0,1,1-1.764-.062V12.3a2.146,2.146,0,0,1-1.165-2.814L10.911,6.314,2.528,14.7a1.8,1.8,0,0,0,0,2.551L14.753,29.472a1.8,1.8,0,0,0,2.55,0L29.472,17.3a1.8,1.8,0,0,0,0-2.551" style="fill:#dd4c35"/><path d="M12.158,5.067l3.22,3.22a2.141,2.141,0,0,1,2.712,2.73l3.1,3.1a2.143,2.143,0,1,1-1.285,1.21l-2.895-2.895v7.617a2.141,2.141,0,1,1-1.764-.062V12.3a2.146,2.146,0,0,1-1.165-2.814L10.911,6.314" style="fill:#fff"/>`,
|
||
".hgignore": `<path d="M28.042,23.172c4.989-8.3-1.054-21.751-12.1-20.384C5.955,4.022,5.794,14.53,14.593,17.026c7.614,2.162,1.573,6.992,1.749,10.208s6.62,4.382,11.7-4.063" style="fill:#1b1b1b"/><circle cx="9.784" cy="24.257" r="4.332" style="fill:#1b1b1b"/><circle cx="4.835" cy="15.099" r="2.835" style="fill:#1b1b1b"/><path d="M28.231,22.835c4.989-8.3-1.054-21.751-12.1-20.384C6.144,3.686,5.983,14.194,14.781,16.69c7.614,2.162,1.573,6.992,1.749,10.208s6.62,4.382,11.7-4.063" style="fill:#bfbfbf"/><circle cx="9.972" cy="23.921" r="4.332" style="fill:#bfbfbf"/><circle cx="5.023" cy="14.762" r="2.835" style="fill:#bfbfbf"/><path d="M17.811,28.168a.669.669,0,0,1,.635-.994,7,7,0,0,0,3.7-.746c3.247-1.841,8.244-10.7,5.731-16.285A12.77,12.77,0,0,0,25.049,5.7c-.236-.249-.1-.236.059-.152a10.08,10.08,0,0,1,2.857,3.676,14.578,14.578,0,0,1,1.1,10.279c-.494,1.817-2.2,5.928-4.691,7.706s-5.424,2.8-6.563.955M15.548,16.673c-1.7-.5-3.894-1.208-5.163-2.867A8.088,8.088,0,0,1,8.854,10.49c-.043-.27-.08-.5,0-.558a21.882,21.882,0,0,0,1.688,2.723,6.487,6.487,0,0,0,3.526,2.256,12.383,12.383,0,0,1,3.867,1.37c.739.629.8,1.989.552,2.142s-.759-1.1-2.938-1.749m-8.155,10.4c3.369,3.121,8.439-1.166,6.207-4.954-.251-.425-.576-.749-.469-.423.714,2.178.054,3.9-1.176,4.788a4.063,4.063,0,0,1-4.192.328c-.39-.2-.551.092-.37.261m-3.93-10.16c.018.2.292.458.722.576a2.969,2.969,0,0,0,2.55-.413,2.759,2.759,0,0,0,.81-3.452c-.172-.308-.4-.533-.218-.041A2.68,2.68,0,0,1,6.148,16.53a2.439,2.439,0,0,1-2.1.164c-.391-.119-.6.016-.58.223"/><path d="M19.056,28.407c-.033.389.414.466,1.016.376a6.755,6.755,0,0,0,2.313-.648,9.54,9.54,0,0,0,3.314-2.63c2.662-3.473,3.6-7.582,3.46-8.173A16.172,16.172,0,0,1,27,22.692c-1.888,2.968-3.256,4.548-6.413,5.314-.879.213-1.485-.112-1.529.4m-7-13.5A7.967,7.967,0,0,0,14.6,16.089a12.2,12.2,0,0,1,2.96,1.31c.378.253.618.819.642.317s-.285-.934-.976-1.164a15.274,15.274,0,0,0-2.009-.674c-.485-.1-1.273-.285-1.949-.493-.371-.114-.748-.313-1.214-.483M10.037,27.718c.429-.09,2.924-.736,3.51-2.788.183-.64.215-.511.164-.165a3.8,3.8,0,0,1-3.358,3.123c-.289.03-.668-.1-.315-.17M5.046,17.2a7.991,7.991,0,0,0,1.195-.336,2.383,2.383,0,0,0,1.232-1.741c.064-.505.083-.378.109-.1a2.627,2.627,0,0,1-2.147,2.324c-.2.028-.56.011-.389-.143" style="fill:#fff"/><path d="M27.54,17.446c2.124-6.123-2.321-15.37-11.315-14.258-8.126,1-8.257,9.557-1.1,11.59,8.112,1.228,3.227,7.347,2.535,10.433-.621,2.766,6.555,3.221,9.876-7.765M7.219,26.2a2.028,2.028,0,0,1,1.332.442,3.525,3.525,0,0,0,3.755-.983A4.154,4.154,0,0,0,12.869,22c-.806-2.319-4.229-2.278-5.758-.353-1.654,2.15-.4,4.539.108,4.548M2.676,15.451a1.166,1.166,0,0,0,.908.863c.731.1.88.434,1.743.263A2.464,2.464,0,0,0,7.1,14.916a1.771,1.771,0,0,0-.824-2.14,2.689,2.689,0,0,0-3.047.363,2.263,2.263,0,0,0-.558,2.312" style="fill:#999"/><path d="M21.981,22.228c-2.2-.272-5.36,4.69-2.378,4.109h0a5.645,5.645,0,0,0,3.683-1.932,23.136,23.136,0,0,0,4.055-7.2c.5-1.861.251-4.745-.269-2.036-.533,2.781-2.893,7.336-5.091,7.064M10.523,26.362A2.778,2.778,0,0,0,12.5,22.99c-.165-1.276-.861,1.584-2.15,2.012-1.953.648-1.733,1.861.176,1.361m-4.978-10.2c.663-.173,1.54-1.077,1.1-1.767-.537-.85-2.033-.122-2.084.824s.277,1.127.979.943" style="fill:#f3f3f3"/>`,
|
||
".npmignore": `<path d="M2,10.555H30v9.335H16v1.556H9.778V19.889H2Zm1.556,7.779H6.667V13.666H8.222v4.667H9.778V12.111H3.556Zm7.778-6.223v7.779h3.111V18.334h3.111V12.111Zm3.111,1.556H16v3.112H14.444Zm4.667-1.556v6.223h3.111V13.666h1.556v4.667h1.556V13.666h1.556v4.667h1.556V12.111Z" style="fill:#cb3837"/>`,
|
||
".properties": `<path d="M23.265,24.381l.9-.894c4.164.136,4.228-.01,4.411-.438l1.144-2.785L29.805,20l-.093-.231c-.049-.122-.2-.486-2.8-2.965V15.5c3-2.89,2.936-3.038,2.765-3.461L28.538,9.225c-.171-.422-.236-.587-4.37-.474l-.9-.93a20.166,20.166,0,0,0-.141-4.106l-.116-.263-2.974-1.3c-.438-.2-.592-.272-3.4,2.786l-1.262-.019c-2.891-3.086-3.028-3.03-3.461-2.855L9.149,3.182c-.433.175-.586.237-.418,4.437l-.893.89c-4.162-.136-4.226.012-4.407.438L2.285,11.733,2.195,12l.094.232c.049.12.194.48,2.8,2.962l0,1.3c-3,2.89-2.935,3.038-2.763,3.462l1.138,2.817c.174.431.236.584,4.369.476l.9.935a20.243,20.243,0,0,0,.137,4.1l.116.265,2.993,1.308c.435.182.586.247,3.386-2.8l1.262.016c2.895,3.09,3.043,3.03,3.466,2.859l2.759-1.115C23.288,28.644,23.44,28.583,23.265,24.381ZM11.407,17.857a4.957,4.957,0,1,1,6.488,2.824A5.014,5.014,0,0,1,11.407,17.857Z" style="fill:#99b8c4"/>`,
|
||
"6502 Assembly": `<defs><linearGradient id="a" x1="836.63" y1="36.205" x2="843.802" y2="14.48" gradientTransform="translate(525.922 30.249) rotate(180) scale(0.607 0.607)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#fff" stop-opacity="0.275"/></linearGradient></defs><title>file_type_assembly</title><path d="M16,2c-1.246,3.056-2,5.057-3.391,8.022A21.884,21.884,0,0,0,16.2,13.156a14.858,14.858,0,0,1-4-2.283C10.43,14.579,7.646,19.855,2,30c5.186-2.994,9.012-4.648,12.691-4.966V24.2h-.834v-.837h.834V24.2h1.675V22.521H14.691v-.834h-.834V20.013h.834v-.834h1.675v.834H17.2v.837h-.837v-.837H14.691v1.675h1.675v.834H17.2V24.2h-.837v.783c3.98.1,8.006,1.772,13.634,5.021-.863-1.589-1.636-3.021-2.372-4.385a25.526,25.526,0,0,0-4.833-3.333A14.436,14.436,0,0,1,26.65,23.8C19.17,9.872,18.565,8.02,16,2ZM10.511,19.179h1.671v.834h.837v5.021h-.837V22.521H10.511v2.512H9.673V20.013h.837Zm0,.834v1.675h1.671V20.013Zm7.526-.834h.837v.834h.837v.837h.834v-.837h.837v-.834h.837v5.855h-.837V20.85h-.837v.837h-.834V20.85h-.837v4.184h-.837Z" style="fill:#0000bf"/><path d="M23.881,18.642c-6.069-8.237-7.476-14.876-7.832-16.461A175.217,175.217,0,0,0,23.881,18.642Z" style="fill:#fff;fill-opacity:0.165680468082428"/><path d="M16.051,2.12,15.6,3.227c-.159.391-.311.765-.461,1.131s-.3.724-.448,1.077-.3.7-.448,1.053-.3.706-.465,1.066-.329.729-.506,1.111-.362.778-.561,1.193c-.028.057-.061.123-.089.181A21.872,21.872,0,0,0,16.2,13.156a14.879,14.879,0,0,1-3.989-2.276l-.14.287c-.065.133-.144.283-.212.42l-.106.219c-.878,1.793-2.006,3.984-3.524,6.822,3.551-2,7.381-4.887,14.338-2.4-.349-.661-.67-1.28-.971-1.863s-.581-1.128-.841-1.644-.5-1-.725-1.463-.433-.9-.629-1.313-.38-.818-.554-1.2-.339-.754-.5-1.118S18.047,6.9,17.9,6.546s-.291-.709-.434-1.066c-.036-.091-.073-.186-.109-.277C16.949,4.247,16.536,3.258,16.051,2.12Z" style="fill:url(#a)"/>`,
|
||
"ActionScript": `<path d="M2,15.281c1.918,0,2.11-1.055,2.11-1.918a17.119,17.119,0,0,0-.192-2.205,18.723,18.723,0,0,1-.192-2.205c0-2.4,1.63-3.452,3.836-3.452h.575V6.938H7.658c-1.534,0-2.11.767-2.11,2.205a14.412,14.412,0,0,0,.192,1.918,14.306,14.306,0,0,1,.192,2.014c0,1.726-.671,2.493-1.918,2.877v.1c1.151.288,1.918,1.151,1.918,2.877a14.306,14.306,0,0,1-.192,2.014,13,13,0,0,0-.192,1.918c0,1.438.575,2.3,2.11,2.3h.479V26.6H7.562c-2.205,0-3.836-.959-3.836-3.644a18.723,18.723,0,0,1,.192-2.205,15.68,15.68,0,0,0,.192-2.11c0-.863-.288-1.918-2.11-1.918Z" style="fill:#c41718"/><path d="M9.479,18.062,8.233,21.8H6.6L10.63,9.911h1.822L16.479,21.8H14.945L13.7,18.062Zm3.932-1.151L12.26,13.459a9.364,9.364,0,0,1-.575-2.205h0c-.192.671-.384,1.438-.575,2.11L9.959,16.815h3.452Z" style="fill:#c41718"/><path d="M17.918,19.979a5.941,5.941,0,0,0,2.781.767c1.534,0,2.493-.863,2.493-2.014s-.671-1.726-2.205-2.4c-1.918-.671-3.164-1.726-3.164-3.356,0-1.822,1.534-3.26,3.836-3.26a5.135,5.135,0,0,1,2.589.575l-.384,1.247a5.519,5.519,0,0,0-2.3-.479c-1.63,0-2.205.959-2.205,1.822,0,1.151.767,1.63,2.4,2.3,2.014.767,3.068,1.726,3.068,3.452,0,1.822-1.342,3.452-4.123,3.452a5.807,5.807,0,0,1-3.068-.767Z" style="fill:#c41718"/><path d="M30,16.623c-1.918,0-2.11,1.151-2.11,1.918a15.68,15.68,0,0,0,.192,2.11,15.738,15.738,0,0,1,.192,2.205c0,2.685-1.63,3.644-3.836,3.644h-.575V25.062h.479c1.438,0,2.11-.863,2.11-2.3a13,13,0,0,0-.192-1.918,14.306,14.306,0,0,1-.192-2.014c0-1.726.767-2.589,1.918-2.877v-.1c-1.151-.288-1.918-1.151-1.918-2.877a14.306,14.306,0,0,1,.192-2.014,13,13,0,0,0,.192-1.918c0-1.438-.575-2.205-2.11-2.3h-.479V5.4h.575c2.205,0,3.836,1.055,3.836,3.452a17.119,17.119,0,0,1-.192,2.205,17.119,17.119,0,0,0-.192,2.205c0,.959.288,1.918,2.11,1.918Z" style="fill:#c41718"/>`,
|
||
"Ada": `<path d="M24.554,20.075c.209.27,1.356.961,1.37,1.246a6.921,6.921,0,0,0-1.4-.324c-.468-.142-.951-.293-1.412-.48a9.2,9.2,0,0,1-2.375-1.3A3.146,3.146,0,0,1,19.3,16.75a1.722,1.722,0,0,1,1.767-1.822,3.584,3.584,0,0,1,1.593.321c.146.066,1.31.606,1.256.809a5.5,5.5,0,0,0-1.41-.112c-.649.244-.4.828-.168,1.311a7.877,7.877,0,0,0,1.078,1.554C23.58,19.005,24.3,20.082,24.554,20.075Z" style="fill:#0f23c3"/><path d="M24.141,16.276c.128-.59.819-1.384,1.344-.773a4.2,4.2,0,0,1,.578,1.918c.12.656.2,1.327.261,1.982.038.379.34,1.794.123,2.075a23.24,23.24,0,0,1-2.922-2.838,3.763,3.763,0,0,1-.925-1.7C22.5,15.867,23.479,16.21,24.141,16.276Z" style="fill:#1a1978"/><path d="M26.3,17.781c.141-.732-.406-2.592-1.067-2.949a.06.06,0,0,0,.044-.007c-.156-.444-1.359,1.116-1.228,1.174-.316-.138.774-1.984.988-2.16.7-.578,1.372-.086,1.845.543a6.036,6.036,0,0,1,.733,4.434,4.5,4.5,0,0,1-.421,1.312c-.1.22-.45,1.1-.682,1.174A14.754,14.754,0,0,0,26.3,17.781Z" style="fill:#0f23c3"/><path d="M3.687,8.4c.179-.188-.041-1.527.324-1.548.262-.015.553,1.741.627,1.968a9.2,9.2,0,0,0,1.127,2.329,7.529,7.529,0,0,0,4.016,2.978,4.55,4.55,0,0,0,2.366.2c.931-.208,1.82-.577,2.757-.765,1.35-.27,3.342-.352,4.438.647.7.641.376.76.043,1.421a2.445,2.445,0,0,0,.178,2.562c.235.342,1.033.827.675,1.094-.567.424-1.277-.452-1.636-.776-1.4-1.264-2.711-1.313-4.492-1.074a8.987,8.987,0,0,1-4.883-.708A9.469,9.469,0,0,1,3.687,8.4Z" style="fill:#d2d2d2"/><path d="M19.941,30a3.615,3.615,0,0,1-2.325-.817c.469-.092,1.021.025,1.508-.044a9.7,9.7,0,0,0,1.754-.43A10.537,10.537,0,0,0,23.9,27.155a6.55,6.55,0,0,0,2.757-5.214c.149-.088.316,1.034.319,1.091a5.789,5.789,0,0,1-.19,1.727,6.867,6.867,0,0,1-1.423,2.774A7.286,7.286,0,0,1,19.941,30Z" style="fill:#d2d2d2"/><path d="M18.962,19.109a5.76,5.76,0,0,1-2.05.859,13.38,13.38,0,0,1-2.224.549,8.861,8.861,0,0,1-4.435-.51,9.939,9.939,0,0,1-3.849-2.4C6.052,17.24,4.3,15.19,4.856,14.557c.248-.282.875.846,1,.992a5,5,0,0,0,1.357,1.11,10.917,10.917,0,0,0,4.035,1.456,6.693,6.693,0,0,0,2.34-.094,12.743,12.743,0,0,1,1.694-.485,4,4,0,0,1,2.113.457C17.739,18.163,18.918,18.736,18.962,19.109Z" style="fill:#d2d2d2"/><path d="M28.313,15.078a19.277,19.277,0,0,1-.453,3.774c-.176-.242.016-1.47,0-1.792a6.032,6.032,0,0,0-.384-2.087A4.925,4.925,0,0,0,26.1,13.312a14.728,14.728,0,0,1-1.27-1.536c-1.837-2.382-3.245-5.211-2.9-8.3.034-.308.069-1.448.411-1.445.152,0,.266,1.561.29,1.718a12.527,12.527,0,0,0,1.224,4.116c.67,1.222,1.947,2.023,2.825,3.1A6.579,6.579,0,0,1,28.313,15.078Z" style="fill:#d2d2d2"/><path d="M15.7,26.935a10.845,10.845,0,0,0,6.436-.687,6.941,6.941,0,0,0,4.278-4.418c.319.2-.048,1.529-.128,1.781a5.726,5.726,0,0,1-1.01,1.813,8.933,8.933,0,0,1-3.257,2.514C20.316,28.71,16.357,29.59,15.7,26.935Z" style="fill:#d2d2d2"/><path d="M19.151,19.376c.367,2.107-2.957,3.124-4.478,3.213-1.859.11-4.929-.292-6.06-2.031-.673-1.035.781-.09,1.188.058a8.663,8.663,0,0,0,3.06.5,11.6,11.6,0,0,0,3.305-.5,13.725,13.725,0,0,0,1.533-.576C18,19.908,18.823,19.349,19.151,19.376Z" style="fill:#d2d2d2"/><path d="M24.142,23.46c.4-.945-1.883-1.578-2.445-1.858a4.857,4.857,0,0,1-1.315-.867c-.181-.181-.872-.92-.807-1.219a4.912,4.912,0,0,1,1.087-.175,5.93,5.93,0,0,1,.855.588,10.323,10.323,0,0,0,.964.5A15.615,15.615,0,0,0,24.6,21.2c.308.09,1.549.208,1.727.428C26.287,21.924,24.357,23.649,24.142,23.46Z" style="fill:#d2d2d2"/><path d="M26.1,22.172c.265.43-1.08,1.831-1.363,2.105a9.34,9.34,0,0,1-2.566,1.728,7.748,7.748,0,0,1-2.56.753c-.679.058-1.966-.124-2.141-.979a6.951,6.951,0,0,1,1.177-.086c.462-.059.921-.149,1.376-.246a13.065,13.065,0,0,0,2.184-.645,11.506,11.506,0,0,0,2.084-1.11,10.872,10.872,0,0,0,1.078-.822C25.474,22.781,25.986,22.168,26.1,22.172Z" style="fill:#d2d2d2"/><path d="M18.758,11.965c-.1-1.308,2.612-1.3,3.271-1.092a5.976,5.976,0,0,1,2.982,2.475c-1.082.8-2.449.094-3.3-.654a4.324,4.324,0,0,0-1.481-1.029C19.421,11.4,19.412,11.759,18.758,11.965Z" style="fill:#d2d2d2"/><path d="M25.783,13.341c-.444-.029-.316.071-.647-.212-.358-.307-.614-.795-.945-1.141-.534-.558-1.242-.895-1.723-1.485a7.269,7.269,0,0,1-1.624-4.848c.018-1.489.407.187.551.675a12.276,12.276,0,0,0,1.126,2.708,46.055,46.055,0,0,0,3.4,4.321C25.882,13.361,25.824,13.338,25.783,13.341Z" style="fill:#d2d2d2"/><path d="M20.068,14.756c.033-.625-.911-.792-1.211-1.42-.164-.343-.211-.569.029-.7.082-.045.383.012.5-.02.271-.076.335-.273.581-.4A1.193,1.193,0,0,1,21.6,13.237,1.821,1.821,0,0,1,20.068,14.756Z" style="fill:#d2d2d2"/><path d="M20.5,14.745a1.931,1.931,0,0,0,1.323-1.7c.524.139.928.658,1.521.771a2.584,2.584,0,0,0,1.029-.017c.207-.045.54-.274.721-.259-.033.163-.464.546-.565.717a4.242,4.242,0,0,0-.388.9c-.229.741-.061.739-.709.311a4.284,4.284,0,0,0-1.957-.72C21.209,14.722,20.594,14.767,20.5,14.745Z" style="fill:#d2d2d2"/><path d="M19.905,20.734a2.008,2.008,0,0,1-1.4,1.712c-.205.091-2.018.733-2.032.348-.007-.2,1.624-.954,1.809-1.11a3.355,3.355,0,0,0,.867-1.071c.055-.112.232-.925.271-.943C19.644,19.564,19.908,20.6,19.905,20.734Z" style="fill:#d2d2d2"/><path d="M11.373,12.532a10.625,10.625,0,0,1,3.71-.914,10.282,10.282,0,0,1,1.865.024c.366.039,1.469.054,1.74.343a.255.255,0,0,1-.273.173c-.037.077.251.371.3.425-.034.034-1.445-.4-1.572-.424a10.632,10.632,0,0,0-2.282-.134,16,16,0,0,0-1.841.194A6.224,6.224,0,0,1,11.373,12.532Z" style="fill:#d2d2d2"/><path d="M22.512,10.731a1.888,1.888,0,0,1-1.517-.6c-.247-.349-.737-1.692-.385-2.021.209-.2.384.662.484.846A10.822,10.822,0,0,0,22.512,10.731Z" style="fill:#d2d2d2"/><path d="M27.788,19.2a19.212,19.212,0,0,1-.749,3.313c-.173-.077-.275-.778-.562-.95a4.07,4.07,0,0,0,.76-1.154C27.389,20.107,27.54,19.363,27.788,19.2Z" style="fill:#d2d2d2"/><path d="M19.981,11.843c-.132.268-.932,1.1-1.118.481C18.756,11.968,19.739,11.483,19.981,11.843Zm-.747.45c.228.006.012-.248.012-.266C19.245,11.984,18.878,12.293,19.234,12.293Z" style="fill:#d2d2d2"/>`,
|
||
"AL": `<path d="M11.616,7.986A1.559,1.559,0,0,0,10.16,7H10.1a1.558,1.558,0,0,0-1.456.986L2,25H5.806l1.015-2.834h6.621L14.457,25h3.8ZM7.944,18.956l2.188-6.111,2.188,6.116Z" style="fill:#2ea98e"/><path d="M23.829,21.671V7.129H20.3V22.747A2.346,2.346,0,0,0,22.57,25H30V21.672Z" style="fill:#2ea98e"/>`,
|
||
"ANTLR4": `<path d="M14.177,7.278a2.08,2.08,0,0,1,3.041-.8A3.571,3.571,0,0,1,18.2,8.022c1.356,3.122,2.9,6.165,4.119,9.345.645,1.5,1.429,2.938,1.994,4.468a1.455,1.455,0,0,1-2.258,1.376c-2.8-1.572-5.628-3.094-8.385-4.731,2.009.008,4.018-.008,6.025.013a19.707,19.707,0,0,0-1.288-2.918c-.781-1.858-1.6-3.7-2.358-5.565a9.783,9.783,0,0,0-1.032,2.125c-1.3,3.182-2.87,6.241-4.136,9.435-.281.59-.424,1.344-1.035,1.69a1.447,1.447,0,0,1-2.094-.738c-.241-.61.151-1.2.382-1.743.779-1.725,1.645-3.413,2.283-5.2C11.65,12.8,12.916,10.041,14.177,7.278Z" style="fill:#fefefe"/><path d="M13.817,2.2A13.923,13.923,0,0,1,29.526,12.549a13.733,13.733,0,0,1-2.082,11.519A14.074,14.074,0,0,1,7.738,27.293a13.852,13.852,0,0,1-5.615-9.483A14.152,14.152,0,0,1,3.451,9.85,13.961,13.961,0,0,1,13.817,2.2m.359,5.08c-1.261,2.762-2.526,5.525-3.762,8.3-.638,1.786-1.5,3.473-2.283,5.2-.231.542-.623,1.133-.382,1.743a1.447,1.447,0,0,0,2.094.738c.61-.347.753-1.1,1.035-1.69,1.266-3.194,2.833-6.253,4.136-9.435a9.783,9.783,0,0,1,1.032-2.125c.756,1.868,1.577,3.707,2.358,5.565a19.707,19.707,0,0,1,1.288,2.918c-2.007-.02-4.016-.005-6.025-.013,2.757,1.637,5.588,3.159,8.385,4.731a1.455,1.455,0,0,0,2.258-1.376c-.565-1.529-1.349-2.971-1.994-4.468-1.22-3.179-2.762-6.223-4.119-9.345a3.571,3.571,0,0,0-.982-1.544A2.08,2.08,0,0,0,14.177,7.278Z" style="fill:#e44a32"/>`,
|
||
"Apache Configuration": `<defs><linearGradient id="a" x1="-5602.682" y1="768.541" x2="-5598.727" y2="763.917" gradientTransform="matrix(0.423, -0.906, -0.906, -0.423, 3082.853, -4748.551)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f69923"/><stop offset="0.312" stop-color="#f79a23"/><stop offset="0.838" stop-color="#e97826"/></linearGradient><linearGradient id="b" x1="-5631.952" y1="769.052" x2="-5603.737" y2="769.052" gradientTransform="matrix(0.423, -0.906, -0.906, -0.423, 3082.853, -4748.551)" gradientUnits="userSpaceOnUse"><stop offset="0.323" stop-color="#9e2064"/><stop offset="0.63" stop-color="#c92037"/><stop offset="0.751" stop-color="#cd2335"/><stop offset="1" stop-color="#e97826"/></linearGradient><linearGradient id="c" x1="-5628.546" y1="766.221" x2="-5611.733" y2="766.221" gradientTransform="matrix(0.423, -0.906, -0.906, -0.423, 3082.853, -4748.551)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#282662"/><stop offset="0.095" stop-color="#662e8d"/><stop offset="0.788" stop-color="#9f2064"/><stop offset="0.949" stop-color="#cd2032"/></linearGradient><linearGradient id="d" x1="-5630.367" y1="769.316" x2="-5602.152" y2="769.316" xlink:href="#b"/><linearGradient id="e" x1="-5628.31" y1="768.933" x2="-5613.482" y2="768.933" xlink:href="#c"/><linearGradient id="f" x1="-5630.367" y1="766.394" x2="-5602.152" y2="766.394" xlink:href="#b"/><linearGradient id="g" x1="-5632.118" y1="766.539" x2="-5603.902" y2="766.539" xlink:href="#b"/><linearGradient id="h" x1="-5630.367" y1="765.526" x2="-5602.152" y2="765.526" xlink:href="#b"/><linearGradient id="i" x1="-5630.367" y1="765.625" x2="-5602.152" y2="765.625" xlink:href="#b"/><linearGradient id="j" x1="-5614.516" y1="765.645" x2="-5608.28" y2="765.645" xlink:href="#b"/></defs><title>file_type_apache</title><path d="M19.993,2.133a10.267,10.267,0,0,0-2.04,2.056l.8,1.51a19.733,19.733,0,0,1,1.708-2.144c.044-.049.068-.072.068-.072l-.068.072a17.865,17.865,0,0,0-1.6,2.174,30.1,30.1,0,0,0,3.111-.385,3.288,3.288,0,0,0-.3-2.5S20.9,1.6,19.993,2.133Z" style="fill:url(#a)"/><path d="M18.638,10.749l.018,0-.115.013-.021.009Z" style="fill:none"/><path d="M17.821,13.455c-.066.015-.132.026-.2.036C17.689,13.481,17.756,13.469,17.821,13.455Z" style="fill:none"/><path d="M12.27,19.524c.009-.023.017-.045.025-.068q.264-.7.523-1.357.291-.741.575-1.436.3-.733.59-1.418.305-.718.6-1.384.24-.542.474-1.049.078-.169.155-.335.153-.329.3-.645.138-.291.274-.57c.03-.062.06-.123.09-.185l.015-.03-.1.011-.078-.154c-.007.015-.015.03-.023.045q-.211.418-.417.845-.119.246-.238.495-.328.689-.645,1.389T13.766,15.1q-.3.7-.594,1.4t-.567,1.387q-.289.72-.562,1.426-.062.159-.123.318-.219.569-.426,1.124l.123.243.11-.012.012-.033Q12.008,20.216,12.27,19.524Z" style="fill:none"/><path d="M17.57,13.5Z" style="fill:none"/><path d="M17.305,14.818l-.315.055h0l.161-.025C17.2,14.839,17.253,14.829,17.305,14.818Z" style="fill:#be202e"/><path d="M17.305,14.818l-.315.055h0l.161-.025C17.2,14.839,17.253,14.829,17.305,14.818Z" style="fill:#be202e;opacity:0.3499999940395355;isolation:isolate"/><path d="M17.573,13.5h0l.05-.007c.068-.01.135-.022.2-.036l-.248.042Z" style="fill:#be202e"/><path d="M17.573,13.5h0l.05-.007c.068-.01.135-.022.2-.036l-.248.042Z" style="fill:#be202e;opacity:0.3499999940395355;isolation:isolate"/><path d="M16.394,9.6q.365-.682.739-1.332.388-.674.784-1.305l.046-.075q.392-.62.79-1.191l-.8-1.51-.182.225c-.231.288-.47.6-.716.925-.277.37-.562.764-.851,1.179-.267.383-.538.784-.809,1.2-.231.353-.462.717-.692,1.09l-.026.042L15.718,10.9Q16.052,10.244,16.394,9.6Z" style="fill:url(#b)"/><path d="M11.651,21.192q-.207.568-.415,1.159l-.006.017-.059.167c-.093.266-.175.5-.361,1.049a2.107,2.107,0,0,1,.786.926,1.68,1.68,0,0,0-.544-1.154,3.621,3.621,0,0,0,3.489-1.42,2.791,2.791,0,0,0,.165-.313,1.451,1.451,0,0,1-1.4.513l0,0,0,0a4.059,4.059,0,0,0,2.046-1.672c.111-.178.218-.372.328-.587a3.3,3.3,0,0,1-3.109,1.01l-.842.092C11.7,21.05,11.677,21.121,11.651,21.192Z" style="fill:url(#c)"/><path d="M12.044,19.306q.273-.706.562-1.426.276-.69.567-1.387t.594-1.4q.308-.711.629-1.419t.645-1.389q.118-.248.238-.495.207-.426.417-.845c.007-.015.015-.03.023-.045L14.677,8.847l-.051.083c-.242.4-.484.8-.721,1.216s-.475.844-.7,1.276q-.291.547-.568,1.1l-.11.225c-.227.467-.432.918-.617,1.352q-.315.737-.556,1.406c-.107.293-.2.576-.292.847-.073.232-.142.464-.208.7q-.234.818-.4,1.631L11.5,20.748q.208-.554.426-1.124Z" style="fill:url(#d)"/><path d="M10.435,18.755a16.07,16.07,0,0,0-.272,1.974c0,.023,0,.046-.005.069a4.15,4.15,0,0,0-1.2-1.029,5.825,5.825,0,0,1,1.172,2.693,2.642,2.642,0,0,1-1.325-.226,2.662,2.662,0,0,0,1.13.686,3.247,3.247,0,0,0-1.571.783,3.359,3.359,0,0,1,1.861-.342C9.51,25.389,8.793,27.626,8.076,30a.625.625,0,0,0,.425-.413c.128-.43.976-3.251,2.306-6.959l.115-.318.032-.089q.211-.583.437-1.19l.1-.277,0-.005L10.45,18.684C10.445,18.707,10.439,18.731,10.435,18.755Z" style="fill:url(#e)"/><path d="M15.88,11.078l-.09.185q-.135.279-.274.57-.15.315-.3.645c-.052.111-.1.222-.155.335q-.234.508-.474,1.049-.3.666-.6,1.384-.291.685-.59,1.418-.284.7-.575,1.436-.259.661-.523,1.357c-.009.023-.017.045-.025.068q-.262.693-.529,1.422l-.012.033.842-.092-.05-.009a6,6,0,0,0,3.21-1.807,7.984,7.984,0,0,0,1.1-1.524,13.139,13.139,0,0,0,.706-1.467c.195-.472.382-.982.562-1.536a3.053,3.053,0,0,1-.788.274c-.051.011-.1.021-.156.03s-.107.018-.161.025h0a3.668,3.668,0,0,0,1.962-1.913,3.344,3.344,0,0,1-1.13.495c-.066.015-.132.026-.2.036l-.05.007h0a3.821,3.821,0,0,0,.839-.469c.051-.038.1-.078.148-.12.073-.063.142-.129.208-.2.042-.044.083-.09.123-.138a3.27,3.27,0,0,0,.263-.362c.025-.04.05-.08.074-.122.031-.06.061-.119.09-.178.131-.264.236-.5.319-.706.042-.1.078-.2.109-.288.013-.035.025-.07.036-.1.033-.1.06-.187.081-.265a2.605,2.605,0,0,0,.062-.275h0a1.01,1.01,0,0,1-.109.075,3.965,3.965,0,0,1-1.162.4l.773-.085-.773.085-.018,0-.119.019.021-.009-2.645.29Z" style="fill:url(#f)"/><path d="M18.858,5.73c-.235.361-.492.771-.768,1.236l-.044.074q-.358.6-.759,1.327-.346.626-.719,1.347-.326.629-.672,1.336l2.645-.29A3.216,3.216,0,0,0,19.99,9.62c.089-.128.178-.262.267-.4.272-.424.538-.891.776-1.355a14.074,14.074,0,0,0,.588-1.294,6.8,6.8,0,0,0,.233-.7c.048-.184.086-.358.115-.524A30.152,30.152,0,0,1,18.858,5.73Z" style="fill:url(#g)"/><path d="M17.149,14.848c-.053.009-.107.018-.161.025h0C17.042,14.866,17.1,14.857,17.149,14.848Z" style="fill:#be202e"/><path d="M17.149,14.848c-.053.009-.107.018-.161.025h0C17.042,14.866,17.1,14.857,17.149,14.848Z" style="fill:#be202e;opacity:0.3499999940395355;isolation:isolate"/><path d="M17.149,14.848c-.053.009-.107.018-.161.025h0C17.042,14.866,17.1,14.857,17.149,14.848Z" style="fill:url(#h)"/><path d="M17.57,13.5l.05-.007-.05.007Z" style="fill:#be202e"/><path d="M17.57,13.5l.05-.007-.05.007Z" style="fill:#be202e;opacity:0.3499999940395355;isolation:isolate"/><path d="M17.57,13.5l.05-.007-.05.007Z" style="fill:url(#i)"/><path d="M17.572,13.5h0Z" style="fill:#be202e"/><path d="M17.572,13.5h0Z" style="fill:#be202e;opacity:0.3499999940395355;isolation:isolate"/><path d="M17.572,13.5h0Z" style="fill:url(#j)"/>`,
|
||
"Apex": `<path d="M13.652,8.338A4.906,4.906,0,0,1,17.2,6.814a4.957,4.957,0,0,1,4.32,2.56,5.972,5.972,0,0,1,2.442-.519,6.089,6.089,0,1,1-1.189,12.06,4.412,4.412,0,0,1-5.782,1.816A5.034,5.034,0,0,1,7.634,22.5a4.646,4.646,0,0,1-.96.1,4.732,4.732,0,0,1-2.337-8.812,5.438,5.438,0,0,1,9.315-5.453" style="fill:#0f9bd7"/><path d="M25.376,30.966h-.561a4.658,4.658,0,0,1-1.284-.137,1.9,1.9,0,0,1-.818-.482,1.726,1.726,0,0,1-.455-.843,6.77,6.77,0,0,1-.106-1.413,5.889,5.889,0,0,0-.084-1.33,1,1,0,0,0-.3-.544,1.223,1.223,0,0,0-.66-.179l-.236-.014V24.145l.236-.014a1.482,1.482,0,0,0,.549-.1.706.706,0,0,0,.273-.264,1.394,1.394,0,0,0,.181-.529,6.683,6.683,0,0,0,.044-.939,8.132,8.132,0,0,1,.112-1.643,1.7,1.7,0,0,1,.448-.841,2.144,2.144,0,0,1,.906-.492,4.514,4.514,0,0,1,1.2-.116h.561v1.9h-.25a2.589,2.589,0,0,0-.743.056.284.284,0,0,0-.148.117.839.839,0,0,0-.054.386q0,.372-.053,1.413a3.74,3.74,0,0,1-.166,1.009,1.945,1.945,0,0,1-.693,1,2.01,2.01,0,0,1,.7,1.044,4.627,4.627,0,0,1,.163,1.079c.027.657.041,1.074.041,1.256a.871.871,0,0,0,.057.408A.343.343,0,0,0,24.4,29a2.382,2.382,0,0,0,.728.06h.25Z" style="fill:#fff"/><path d="M21.118,25.788V24.382a1.752,1.752,0,0,0,.645-.129.936.936,0,0,0,.375-.354,1.621,1.621,0,0,0,.217-.624A6.88,6.88,0,0,0,22.4,22.3a8,8,0,0,1,.105-1.585,1.456,1.456,0,0,1,.381-.721,1.9,1.9,0,0,1,.8-.431,4.336,4.336,0,0,1,1.125-.105h.311v1.4a2.876,2.876,0,0,0-.835.073.53.53,0,0,0-.272.223,1.079,1.079,0,0,0-.088.513q0,.369-.053,1.4a3.531,3.531,0,0,1-.152.94,1.918,1.918,0,0,1-.313.595,2.47,2.47,0,0,1-.583.486,2.045,2.045,0,0,1,.565.466,1.869,1.869,0,0,1,.337.647,4.41,4.41,0,0,1,.152,1.02q.041.973.041,1.242a1.1,1.1,0,0,0,.094.539.584.584,0,0,0,.284.231,2.649,2.649,0,0,0,.823.079v1.406h-.311A4.474,4.474,0,0,1,23.6,30.59a1.644,1.644,0,0,1-.712-.419,1.478,1.478,0,0,1-.39-.724,6.621,6.621,0,0,1-.1-1.356,6.374,6.374,0,0,0-.094-1.4,1.232,1.232,0,0,0-.39-.671A1.431,1.431,0,0,0,21.118,25.788Z" style="fill:#0072a0"/><path d="M27.011,30.966H26.45V29.059h.25A2.329,2.329,0,0,0,27.426,29a.323.323,0,0,0,.165-.127.812.812,0,0,0,.058-.379q0-.36.05-1.375a3.725,3.725,0,0,1,.173-1.047,2.223,2.223,0,0,1,.387-.7,2.145,2.145,0,0,1,.3-.292,2.141,2.141,0,0,1-.4-.4,2.612,2.612,0,0,1-.421-1.092,17.525,17.525,0,0,1-.1-1.841,1.357,1.357,0,0,0-.053-.479c-.008-.016-.031-.062-.136-.106a2.524,2.524,0,0,0-.757-.06h-.25V19.2h.561a4.793,4.793,0,0,1,1.283.133,1.841,1.841,0,0,1,.818.485,1.781,1.781,0,0,1,.453.843,6.6,6.6,0,0,1,.109,1.414,6.359,6.359,0,0,0,.079,1.336.992.992,0,0,0,.3.537,1.226,1.226,0,0,0,.664.18l.236.014v1.879l-.236.014a1.482,1.482,0,0,0-.549.1.686.686,0,0,0-.27.262,1.484,1.484,0,0,0-.186.534,6.743,6.743,0,0,0-.043.931,8.383,8.383,0,0,1-.108,1.644,1.694,1.694,0,0,1-.446.846,2.143,2.143,0,0,1-.913.492A4.5,4.5,0,0,1,27.011,30.966Z" style="fill:#fff"/><path d="M30.708,25.788a1.752,1.752,0,0,0-.645.129.918.918,0,0,0-.372.354,1.725,1.725,0,0,0-.22.624,6.82,6.82,0,0,0-.047.973,8.27,8.27,0,0,1-.1,1.588,1.439,1.439,0,0,1-.378.724,1.9,1.9,0,0,1-.809.431,4.336,4.336,0,0,1-1.125.105H26.7V29.31a2.652,2.652,0,0,0,.82-.079A.572.572,0,0,0,27.8,29,1.05,1.05,0,0,0,27.9,28.5q0-.357.05-1.365a3.53,3.53,0,0,1,.158-.976,1.976,1.976,0,0,1,.343-.621A2.038,2.038,0,0,1,29,25.085a2.416,2.416,0,0,1-.633-.551,2.339,2.339,0,0,1-.375-.984,17.564,17.564,0,0,1-.094-1.8,1.571,1.571,0,0,0-.079-.586.487.487,0,0,0-.264-.226,2.8,2.8,0,0,0-.853-.079v-1.4h.311a4.576,4.576,0,0,1,1.213.123,1.587,1.587,0,0,1,.709.419,1.529,1.529,0,0,1,.39.727,6.436,6.436,0,0,1,.1,1.356,6.842,6.842,0,0,0,.088,1.4,1.223,1.223,0,0,0,.393.671,1.447,1.447,0,0,0,.8.231Z" style="fill:#0072a0"/>`,
|
||
"APL": `<path d="M30,28.275,16,2,2,28.275H14.162V30h3.676V28.275ZM17.838,24.826V13.161l6.215,11.665Zm-9.891,0,6.215-11.665V24.826Z" style="fill:#d2d2d2"/>`,
|
||
"AppleScript": `<path d="M17.181,4.437A5.993,5.993,0,0,1,21.579,2a5.979,5.979,0,0,1-1.447,4.476,4.729,4.729,0,0,1-4.17,1.961A5.2,5.2,0,0,1,17.181,4.437Z" style="fill:#a8c2ab"/><path d="M16.2,10.034c.946,0,2.7-1.3,4.989-1.3a6.249,6.249,0,0,1,5.484,2.8,6.08,6.08,0,0,0-3.028,5.3,6.235,6.235,0,0,0,3.772,5.7s-2.637,7.422-6.2,7.422c-1.636,0-2.908-1.1-4.631-1.1-1.757,0-3.5,1.144-4.635,1.144C8.7,30,4.587,22.959,4.587,17.3c0-5.568,3.478-8.489,6.74-8.489C13.448,8.811,15.093,10.034,16.2,10.034Z" style="fill:#a8c2ab"/>`,
|
||
"Arduino": `<defs><radialGradient id="a" cx="767.179" cy="5169.543" r="14.989" gradientTransform="translate(-718.112 -4953.917) scale(0.955 0.962)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#36bac0"/><stop offset="1" stop-color="#2d9094"/></radialGradient></defs><title>file_type_arduino</title><path d="M29.645,15.925A13.77,13.77,0,1,1,15.876,2.056,13.819,13.819,0,0,1,29.645,15.925Z" style="stroke:#02797e;stroke-linejoin:round;stroke-width:1.1367228454969267px;fill:url(#a)"/><path d="M10.581,11.648c2.41-.076,3.359.834,4.605,2.069.285.282.579.59.9.921l.922-.991a6.223,6.223,0,0,1,3.256-1.93c1.939-.211,3.119-.122,4.311.814a5.023,5.023,0,0,1,2.245,3.9,5.653,5.653,0,0,1-3.25,5.156,5.975,5.975,0,0,1-3.913.135,7.656,7.656,0,0,1-3.541-2.987c-1.678,2.142-3.187,3.253-5.235,3.155-7.452-.354-6.842-10.075-.3-10.247Zm1.657,7.994a9.193,9.193,0,0,0,2.856-2.9c-.74-1.243-2.209-2.824-3.455-3.134a4.328,4.328,0,0,0-3.224.777,3.384,3.384,0,0,0-.762,3.686,3.674,3.674,0,0,0,4.585,1.57Zm-2.98-3.487,3.278.005v1.21l-3.283.005Zm13.448,3.6A3.843,3.843,0,0,0,24.937,17a3.458,3.458,0,0,0-1.863-3.109,3.648,3.648,0,0,0-4.2.728,7.364,7.364,0,0,0-1.649,2.151A8.936,8.936,0,0,0,19.2,19.252,4.022,4.022,0,0,0,22.706,19.754Zm-1.955-2.376-1.088-.008,0-1.217,1.091,0V15.075l1.107-.008-.007,1.093,1.085,0v1.165l-1.021-.008v1.12H20.753Z" style="stroke:#000;stroke-width:0.12103096480927482px;opacity:0.1680999994277954;isolation:isolate"/><path d="M4.917,16.337c0,5.348,7.354,7.34,10.987,1.894,3.765,5.647,10.824,3.28,10.824-1.9S19.7,8.656,15.9,14.441c-3.6-5.719-10.987-3.453-10.987,1.9Zm1.931,0c0-3.86,5.455-5.078,7.992,0-2.588,4.889-7.992,3.859-7.992,0Zm10.119,0c2.286-5.178,7.889-3.751,7.872.008S19.186,21.277,16.967,16.337Z" style="fill:#fff;stroke:#000;stroke-width:0.24206192961854964px"/><rect x="8.898" y="15.795" width="3.237" height="1.067" style="fill:#fff"/><polygon points="20.644 16.846 19.576 16.846 19.576 15.712 20.644 15.712 20.644 14.644 21.779 14.644 21.779 15.712 22.847 15.712 22.847 16.846 21.779 16.846 21.779 17.914 20.644 17.914 20.644 16.846" style="fill:#fff"/>`,
|
||
"ARM Assembly": `<defs><linearGradient id="a" x1="836.63" y1="36.205" x2="843.802" y2="14.48" gradientTransform="translate(525.922 30.249) rotate(180) scale(0.607 0.607)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#fff" stop-opacity="0.275"/></linearGradient></defs><title>file_type_assembly</title><path d="M16,2c-1.246,3.056-2,5.057-3.391,8.022A21.884,21.884,0,0,0,16.2,13.156a14.858,14.858,0,0,1-4-2.283C10.43,14.579,7.646,19.855,2,30c5.186-2.994,9.012-4.648,12.691-4.966V24.2h-.834v-.837h.834V24.2h1.675V22.521H14.691v-.834h-.834V20.013h.834v-.834h1.675v.834H17.2v.837h-.837v-.837H14.691v1.675h1.675v.834H17.2V24.2h-.837v.783c3.98.1,8.006,1.772,13.634,5.021-.863-1.589-1.636-3.021-2.372-4.385a25.526,25.526,0,0,0-4.833-3.333A14.436,14.436,0,0,1,26.65,23.8C19.17,9.872,18.565,8.02,16,2ZM10.511,19.179h1.671v.834h.837v5.021h-.837V22.521H10.511v2.512H9.673V20.013h.837Zm0,.834v1.675h1.671V20.013Zm7.526-.834h.837v.834h.837v.837h.834v-.837h.837v-.834h.837v5.855h-.837V20.85h-.837v.837h-.834V20.85h-.837v4.184h-.837Z" style="fill:#0000bf"/><path d="M23.881,18.642c-6.069-8.237-7.476-14.876-7.832-16.461A175.217,175.217,0,0,0,23.881,18.642Z" style="fill:#fff;fill-opacity:0.165680468082428"/><path d="M16.051,2.12,15.6,3.227c-.159.391-.311.765-.461,1.131s-.3.724-.448,1.077-.3.7-.448,1.053-.3.706-.465,1.066-.329.729-.506,1.111-.362.778-.561,1.193c-.028.057-.061.123-.089.181A21.872,21.872,0,0,0,16.2,13.156a14.879,14.879,0,0,1-3.989-2.276l-.14.287c-.065.133-.144.283-.212.42l-.106.219c-.878,1.793-2.006,3.984-3.524,6.822,3.551-2,7.381-4.887,14.338-2.4-.349-.661-.67-1.28-.971-1.863s-.581-1.128-.841-1.644-.5-1-.725-1.463-.433-.9-.629-1.313-.38-.818-.554-1.2-.339-.754-.5-1.118S18.047,6.9,17.9,6.546s-.291-.709-.434-1.066c-.036-.091-.073-.186-.109-.277C16.949,4.247,16.536,3.258,16.051,2.12Z" style="fill:url(#a)"/>`,
|
||
"AsciiDoc": `<path d="M30,30H2V2H30Z" style="fill:#e40046"/><path d="M23.731,24.83a.589.589,0,0,1-.763-.337L16.724,9.269,13.93,15.99h1.833a.59.59,0,0,1-.024,1.18H8.9a.59.59,0,0,1,.024-1.18h3.727l0-.013L16.184,7.5a.591.591,0,0,1,.533-.363h0a.592.592,0,0,1,.557.366l6.785,16.546.009.021A.59.59,0,0,1,23.731,24.83Z" style="fill:#fff"/><path d="M14.516,18.791H7.679a.59.59,0,0,0-.024,1.18H11L9.309,24.043a.59.59,0,0,0,1.085.464l0-.011,1.875-4.509.005-.016h2.215a.59.59,0,0,0,.023-1.18Z" style="fill:#fff"/>`,
|
||
"ASP.NET (C#)": `<title>file_type_aspx</title><polygon points="22.75 2 6.35 2 6.35 30 29.65 30 29.65 9 22.75 2" style="fill:#c5c5c5"/><polygon points="27.35 27.7 8.75 27.7 8.75 4.3 20.45 4.3 20.45 11.3 27.45 11.3 27.45 27.7 27.35 27.7" style="fill:#f5f5f5"/><path d="M12.1,30.994A11.094,11.094,0,1,1,23.194,19.9,11.106,11.106,0,0,1,12.1,30.994Zm0-20.3A9.2,9.2,0,1,0,21.3,19.9,9.216,9.216,0,0,0,12.1,10.7Z" style="fill:#33a9dc"/><rect x="2.099" y="19.455" width="20.003" height="0.89" style="fill:#33a9dc;stroke:#33a9dc;stroke-miterlimit:10"/><path d="M12.325,15.763a31.93,31.93,0,0,1-8.484-1.11l.242-.807a31.374,31.374,0,0,0,15.992,0l.239.807A28.076,28.076,0,0,1,12.325,15.763Z" style="fill:#33a9dc;stroke:#33a9dc;stroke-miterlimit:10"/><path d="M4.1,25.724l-.239-.807a31.652,31.652,0,0,1,16.472,0l-.242.807A31.38,31.38,0,0,0,4.1,25.724Z" style="fill:#33a9dc;stroke:#33a9dc;stroke-miterlimit:10"/><path d="M8.536,29.055A25.438,25.438,0,0,1,8,10.608l.776.331a24.558,24.558,0,0,0,.533,17.783Z" style="fill:#33a9dc;stroke:#33a9dc;stroke-miterlimit:10"/><path d="M15.6,29.055l-.776-.333a24.559,24.559,0,0,0,.531-17.783l.776-.331A25.443,25.443,0,0,1,15.6,29.055Z" style="fill:#33a9dc;stroke:#33a9dc;stroke-miterlimit:10"/><rect x="11.655" y="9.898" width="0.889" height="20.371" style="fill:#33a9dc;stroke:#33a9dc;stroke-miterlimit:10"/>`,
|
||
"AutoHotkey": `<defs><linearGradient id="a" x1="54.604" y1="168.388" x2="54.604" y2="194.885" gradientTransform="translate(-38.604 -165.636)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#d8d8d8"/><stop offset="1" stop-color="#a3a3a3"/></linearGradient><linearGradient id="b" x1="68.756" y1="209.152" x2="91.638" y2="209.152" gradientTransform="translate(-50.601 -159.449) scale(0.832 0.837)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#d7d7d7"/><stop offset="0.5" stop-color="#e7e7e7"/><stop offset="1" stop-color="#d7d7d7"/></linearGradient></defs><title>file_type_autohotkey</title><rect x="2" y="2.824" width="28" height="26.353" rx="3.088" ry="3.088" style="fill:url(#a)"/><path d="M26.856,29.181H5.144A3.148,3.148,0,0,1,2,26.037V5.963A3.148,3.148,0,0,1,5.144,2.819H26.856A3.148,3.148,0,0,1,30,5.963V26.037A3.148,3.148,0,0,1,26.856,29.181ZM5.144,2.963a3,3,0,0,0-3,3h0V26.037a3,3,0,0,0,3,3H26.856a3,3,0,0,0,3-3V5.963a3,3,0,0,0-3-3Z" style="fill:#8d8d8d"/><rect x="4.313" y="4.641" width="23.169" height="21.94" rx="2.571" ry="2.571" style="fill:url(#b)"/><path d="M24.911,26.641H6.884A2.634,2.634,0,0,1,4.253,24.01V7.212A2.634,2.634,0,0,1,6.884,4.581H24.911a2.634,2.634,0,0,1,2.631,2.631v16.8A2.634,2.634,0,0,1,24.911,26.641ZM6.884,4.7A2.514,2.514,0,0,0,4.373,7.212v16.8a2.514,2.514,0,0,0,2.511,2.511H24.911a2.514,2.514,0,0,0,2.511-2.511V7.212A2.514,2.514,0,0,0,24.911,4.7Z" style="fill:#f8f8f8"/><path d="M6.145,23.9l2.343-6.1h.87l2.5,6.1h-.92l-.712-1.848H7.673L7,23.9ZM7.9,21.4H9.974l-.637-1.7q-.291-.77-.433-1.265A7.776,7.776,0,0,1,8.576,19.6Z"/><path d="M13.607,23.9V17.8h.807v2.5h3.171V17.8h.807v6.1h-.807V21.021h-3.17V23.9Z"/><path d="M20.478,23.9V17.8h.807v3.025l3.03-3.025h1.094L22.85,20.267,25.522,23.9H24.456l-2.172-3.088-1,.974V23.9Z"/>`,
|
||
"AutoIt": `<circle cx="16" cy="16" r="12.551" style="fill:#5d83ac"/><path d="M2,16A14,14,0,1,1,16,30,14,14,0,0,1,2,16ZM16,4.789A11.211,11.211,0,1,0,27.211,16,11.211,11.211,0,0,0,16,4.789Z" style="fill:#f0f0f0"/><path d="M24.576,20.156l-6.4-9.264a3.131,3.131,0,0,0-.819-.819,2.36,2.36,0,0,0-2.442.023,3.543,3.543,0,0,0-.812.8L7.533,20.156h3.752l4.808-6.8,1.838,2.71q.26.368.544.789t.5.7q-.368-.031-.865-.031h-3.53l-1.914,2.634Z" style="fill:#f0f0f0"/>`,
|
||
"Avro IDL": `<path d="M2,11.649h.025a4.785,4.785,0,0,0,2.911,1.336c2.308.221,4.59-.485,6.9-.326a7.03,7.03,0,0,1,2.68.664c.5-.319.989-.662,1.486-.989.5.327.984.674,1.488.989a6.834,6.834,0,0,1,2.487-.65c1.995-.167,3.967.308,5.957.359a5.2,5.2,0,0,0,4.026-1.383H30v.236c-.178.747-.882,1.176-1.284,1.79a4.948,4.948,0,0,1-.731.791,3.8,3.8,0,0,1-.565.748,2.551,2.551,0,0,0-.594.541,2.181,2.181,0,0,1-.96.749,1.149,1.149,0,0,1-.565.56,6.69,6.69,0,0,1-1.94.184c.723.548,1.5,1.02,2.246,1.535.782.513,1.54,1.061,2.326,1.568H4.089c1.5-1.058,3.057-2.035,4.55-3.1A6.8,6.8,0,0,1,6.7,17.065a1.155,1.155,0,0,1-.569-.562,2.28,2.28,0,0,1-1.043-.86c-.268-.3-.67-.466-.853-.843-.2-.436-.658-.664-.909-1.067-.4-.642-1.137-1.076-1.327-1.846v-.239m2.939,8.528q11.059.009,22.12,0c-3.668-2.51-7.376-4.961-11.059-7.448-3.684,2.487-7.392,4.941-11.061,7.449M4.167,13.2a7.842,7.842,0,0,0,2.84.731c1.163.123,2.341.046,3.5.236a2.7,2.7,0,0,1,1.607.781c.659-.452,1.332-.885,1.987-1.342l.012-.064a5.294,5.294,0,0,0-1.877-.5c-2.693-.316-5.387.712-8.067.16m13.652.356c.688.466,1.382.925,2.07,1.392a2.488,2.488,0,0,1,1.3-.719,19.859,19.859,0,0,1,3.137-.248,9.105,9.105,0,0,0,3.5-.768c-2.582.5-5.168-.409-7.761-.2a6.256,6.256,0,0,0-2.245.545M3.339,13.166a7.264,7.264,0,0,0,2.723,1.3c-.219-.153-.376-.416-.657-.457a7.955,7.955,0,0,1-2.066-.844m23.333.825c-.317.023-.5.3-.733.473a7.232,7.232,0,0,0,2.724-1.3,8.106,8.106,0,0,1-1.991.824m-22.5.126a5.121,5.121,0,0,0,2.589,1.1c-.115-.128-.209-.312-.4-.334a10.459,10.459,0,0,1-2.19-.771m21.467.768c-.189.022-.284.2-.394.336a5.187,5.187,0,0,0,2.6-1.109,10.477,10.477,0,0,1-2.2.773M6.3,14.206a3.243,3.243,0,0,0,2.445.352c-.1-.08-.181-.215-.325-.206q-1.063-.04-2.12-.146m17.351.139c-.171-.019-.291.1-.406.211a3.108,3.108,0,0,0,2.42-.352q-1,.112-2.014.141m-16.741.538a3.669,3.669,0,0,0,2.482.319,1.107,1.107,0,0,0-.281-.376,5.158,5.158,0,0,1-2.2.057m15.7.318a3.678,3.678,0,0,0,2.487-.319,5.127,5.127,0,0,1-2.2-.057,1.1,1.1,0,0,0-.283.376M4.838,14.977a4.11,4.11,0,0,0,2.133.841c-.057-.084-.114-.168-.171-.254a6.948,6.948,0,0,1-1.962-.587m20.361.589-.169.253a4.141,4.141,0,0,0,2.136-.843,7.015,7.015,0,0,1-1.967.59m-18.1-.13a.8.8,0,0,0,.534.31,7.579,7.579,0,0,0,2.037-.073c-.009-.03-.027-.09-.036-.12-.457-.051-.923.074-1.385.047A7.054,7.054,0,0,1,7.1,15.437m16.191.151a6.28,6.28,0,0,0-.913-.041l-.042.126a7.416,7.416,0,0,0,2.045.072.7.7,0,0,0,.522-.331,4.349,4.349,0,0,1-1.613.174m-17.52.327a3.12,3.12,0,0,0,1.754.481c-.065-.24-.334-.2-.523-.236-.419-.041-.816-.186-1.231-.246M25,16.163c-.188.041-.452-.006-.521.232a2.874,2.874,0,0,0,1.732-.482c-.4.079-.8.207-1.211.251M7.735,16.119a1,1,0,0,0,.789.275,9.331,9.331,0,0,0,1.325-.158c-.021-.093-.009-.278-.163-.228a9.983,9.983,0,0,1-1.951.111m14.415.118a8.157,8.157,0,0,0,1.412.154.9.9,0,0,0,.7-.274,9.387,9.387,0,0,1-1.934-.11c-.16-.06-.155.132-.176.23m-15.438.44a1.962,1.962,0,0,0,1.3.181l-.091-.126c-.4.006-.807-.022-1.209-.055m1.615.043a1.03,1.03,0,0,0,.716.294c.179-.125.358-.252.531-.386a5.747,5.747,0,0,1-1.247.092m14.1-.093c.237.144.467.477.782.345.166-.05.369-.089.461-.257a5.271,5.271,0,0,1-1.243-.088m1.713.263a2.007,2.007,0,0,0,1.145-.213,10.269,10.269,0,0,1-1.144.049C23.993,16.667,23.984,16.961,24.138,16.89Z" style="fill:#0040ff"/><path d="M7.435,18.886Q11.719,16.013,16,13.137l9.3,6.244c.221.147.439.3.648.464q-9.947-.01-19.894,0c.443-.344.92-.64,1.383-.958m8.255-5.066c-.457,1.859-.907,3.719-1.375,5.576.52.015,1.041.012,1.562,0q-.013-2.841,0-5.68l-.184.1m-2.5,1.684c.255.859.48,1.728.763,2.579.289-1.238.6-2.471.9-3.707-.55.386-1.114.75-1.668,1.129m3.357-.873c-.006.682,0,1.364,0,2.046a2.1,2.1,0,0,0,1.014-.254c.193-.145.1-.409.011-.586a4.276,4.276,0,0,0-1.024-1.207M18.327,16.4c-.1.544-.666.792-1.151.9.474.7.96,1.389,1.416,2.1.469.024.94.011,1.411.009a1.631,1.631,0,0,1,.16-2.976c-.834-.6-1.7-1.14-2.544-1.727.349.5.831,1.037.708,1.7m-6.822.242c.267.921.529,1.845.794,2.767.44,0,.88.008,1.321-.007-.339-1.161-.685-2.319-1.009-3.484-.385.215-.737.482-1.1.724m8.8.452a.946.946,0,0,0,.057,1.7c.533.09.855-.533.779-.99-.026-.4-.4-.861-.836-.714M7.4,19.4q1.324.018,2.65,0c.256-.7.413-1.468.629-2.2-1.1.715-2.187,1.461-3.279,2.194m14.377-1.9a1.616,1.616,0,0,1-.876,1.9c1.233.018,2.465.015,3.7,0-.934-.644-1.883-1.266-2.822-1.9m-5.223.115c-.01.6,0,1.2,0,1.8.415,0,.831,0,1.248,0-.419-.6-.8-1.219-1.243-1.794m-5.546.941h.346c-.055-.187-.108-.376-.166-.562a3.751,3.751,0,0,0-.181.563m-.18.693c-.015.04-.045.119-.061.159.275-.026.59.071.842-.05C11.453,19.112,11.074,19.275,10.826,19.244Z" style="fill:#0040ff"/>`,
|
||
"AWK": `<path d="M26.925,27.737C23.431,26.1,24.606,14.588,13.81,8.319,14.089,5.792,14.758-.5,7.961,3,6.845,3.128,4.907,2.331,4,4.831v.114C16.918,3.9.088,10.53,16.75,25.844c-.373.176-.674-.325-1.97.1l-.014.016c-1.722,1.135,1.933.768,4.154,1.274-1.611.417-5.594-1.137-6.3,1.645.877-.37,1,.329,1.076,1.077A26.277,26.277,0,0,1,22.379,27.5c1.1.285,4.118,2.049,5.122.551C27.519,27.93,27.221,27.876,26.925,27.737Z"/><path d="M10.446,2.97l-.121.088a.266.266,0,0,0-.011.377.211.211,0,0,0,.045.039.416.416,0,0,0,.521-.063.263.263,0,0,0,.078-.364l-.01-.014c-.076-.143-.163-.177-.34-.127C10.553,2.925,10.5,2.946,10.446,2.97Z" style="fill:#d2d2d2"/><path d="M18,26.368c.151-.041.318-.828.174-.949A6.29,6.29,0,0,0,19.4,26.485c1.023,1.007,2.665-.032,3.482.759a10.736,10.736,0,0,0,1.957,1.027c-.139-.151-.029-.144.179-.011-.13-.338-4.421-5.156-5.226-7.18.095.293-1.608-.824-2.076-1.419-.028.056-.092-.251-.228-.434-.041.05-.2-.433-.3-.728.037.187-.462-.5-.65-.818-.056.09-.719.372-.809.286-.729-.4,2.529,4.066.122,2.559.676.683.614.4-1.095-.852.364.452-.317.312-1.553-1.523.186.2-.218-.576-.218-.576a2.692,2.692,0,0,0-.133-.483c-.056-.32-.241-.723-.12-.65-1.444-1.556,1.314-3.3.719-3.671-.111,0-.027.017-.151-.106-.09,0-.468.285-.587-.234.006.132-.034.406-.153-.1-.023.052.015.1-.03.145-.225-.576-.772-1.6-1.217-2.539-.158.155-.138-.076-.193-1.092.053.144-.225,1.921-.2.13-.128.007.108,1.258-.343.21-.141.05-.305-.363-.341-1.178-.048.623-.29.187-.5-.923-.269.508-1.6,1.743-.333,7.622-.053-.313.186.341.755,2.427.021-.039-.022-.083.038-.131a6.324,6.324,0,0,0,.677,1.365c.544.658.995,2.074.8,1.277a11.867,11.867,0,0,0,2.554,3.249A34.423,34.423,0,0,0,18,26.368Z" style="fill:#d2d2d2"/><path d="M10.823,2.557a.291.291,0,0,0-.051-.022c-.221-.04-.429.153-.654.032-.145.085-.257-.036-.375-.073a.224.224,0,0,0-.2.014,5.823,5.823,0,0,0-.814.582,1.037,1.037,0,0,0-.273.449c-.021.048-.037.126.05.137a2.3,2.3,0,0,0,.682.045c.177-.028.277-.152.418-.221a1.2,1.2,0,0,0,.592-.68c.064-.175.161-.167.28-.2S10.7,2.62,10.823,2.557Z" style="fill:#d2d2d2"/><path d="M10.325,3.058l.121-.088a.117.117,0,0,1,.12.064c.044.1.106.112.193.047.033-.025.071-.058.118-.027a.119.119,0,0,1,.041.128.276.276,0,0,1-.187.248.266.266,0,0,1-.3-.03C10.341,3.308,10.26,3.2,10.325,3.058Z"/>`,
|
||
"Batch": `<path d="M29.4,27.6H2.5V4.5H29.4Zm-25.9-1H28.4V5.5H3.5Z" style="fill:#d9b400"/><polygon points="6.077 19.316 5.522 18.484 10.366 15.255 5.479 11.184 6.12 10.416 12.035 15.344 6.077 19.316" style="fill:#d9b400"/><rect x="12.7" y="18.2" width="7.8" height="1" style="fill:#d9b400"/><rect x="2.5" y="5.5" width="26.9" height="1.9" style="fill:#d9b400"/>`,
|
||
"C#": `<title>file_type_csharp</title><path d="M19.792,7.071h2.553V9.624H24.9V7.071h2.552V9.624H30v2.552h-2.55v2.551H30V17.28H27.449v2.552H24.9v-2.55l-2.55,0,0,2.552H19.793v-2.55l-2.553,0V14.725h2.553V12.179H17.24V9.622h2.554Zm2.553,7.658H24.9V12.176H22.345Z" style="fill:#368832"/><path d="M14.689,24.013a10.2,10.2,0,0,1-4.653.915,7.6,7.6,0,0,1-5.89-2.336A8.839,8.839,0,0,1,2,16.367,9.436,9.436,0,0,1,4.412,9.648a8.181,8.181,0,0,1,6.259-2.577,11.1,11.1,0,0,1,4.018.638v3.745a6.81,6.81,0,0,0-3.723-1.036,4.793,4.793,0,0,0-3.7,1.529,5.879,5.879,0,0,0-1.407,4.142,5.774,5.774,0,0,0,1.328,3.992,4.551,4.551,0,0,0,3.575,1.487,7.288,7.288,0,0,0,3.927-1.108Z" style="fill:#368832"/>`,
|
||
"C": `<title>file_type_c</title><path d="M10.676,15.973a10.052,10.052,0,0,0,1.175,5.151,5.446,5.446,0,0,0,6.306,2.408,4.284,4.284,0,0,0,3.09-3.6c.107-.6.109-.61.109-.61,1.737.251,4.537.658,6.274.906l-.11.44a11.256,11.256,0,0,1-2.7,5.39,9.439,9.439,0,0,1-5.366,2.688,14.61,14.61,0,0,1-8.277-.819A10.151,10.151,0,0,1,5.4,21.687a16.225,16.225,0,0,1,.019-11.45,10.538,10.538,0,0,1,8.963-7.054,13.353,13.353,0,0,1,6.666.555,9.571,9.571,0,0,1,6.167,6.9c.094.352.114.417.114.417-1.932.351-4.319.8-6.238,1.215-.362-1.915-1.265-3.428-3.2-3.9a5.263,5.263,0,0,0-6.616,3.57,10.49,10.49,0,0,0-.385,1.439A12.31,12.31,0,0,0,10.676,15.973Z" style="fill:#005f91"/>`,
|
||
"C++": `<title>file_type_cpp</title><path d="M14.742,24.047a10.242,10.242,0,0,1-4.673.919A7.628,7.628,0,0,1,4.155,22.62,8.876,8.876,0,0,1,2,16.369,9.476,9.476,0,0,1,4.422,9.621a8.216,8.216,0,0,1,6.285-2.588,11.151,11.151,0,0,1,4.035.641v3.761A6.839,6.839,0,0,0,11,10.395,4.813,4.813,0,0,0,7.288,11.93a5.9,5.9,0,0,0-1.413,4.159A5.8,5.8,0,0,0,7.209,20.1a4.57,4.57,0,0,0,3.59,1.493,7.319,7.319,0,0,0,3.943-1.113Z" style="fill:#984c93"/><polygon points="17.112 14.829 17.112 12.485 19.456 12.485 19.456 14.829 21.8 14.829 21.8 17.172 19.456 17.172 19.456 19.515 17.112 19.515 17.112 17.172 14.77 17.172 14.77 14.828 17.112 14.829" style="fill:#984c93"/><polygon points="25.313 14.829 25.313 12.485 27.657 12.485 27.657 14.829 30 14.829 30 17.172 27.657 17.172 27.657 19.515 25.313 19.515 25.313 17.172 22.971 17.172 22.971 14.828 25.313 14.829" style="fill:#984c93"/>`,
|
||
"Clojure": `<path d="M16,2A14,14,0,1,0,30,16,14.016,14.016,0,0,0,16,2" style="fill:#fff"/><path d="M15.488,16.252c-.126.273-.265.579-.408.9A22.963,22.963,0,0,0,13.8,20.605a5.181,5.181,0,0,0-.119,1.155c0,.174.009.356.024.542a6.658,6.658,0,0,0,4.413.067,3.966,3.966,0,0,1-.44-.466c-.9-1.146-1.4-2.827-2.194-5.652" style="fill:#91dc47"/><path d="M12.169,10.556a6.677,6.677,0,0,0-.077,10.881c.411-1.71,1.44-3.276,2.983-6.415-.092-.252-.2-.527-.313-.817a10.207,10.207,0,0,0-1.6-2.882,4.439,4.439,0,0,0-1-.767" style="fill:#91dc47"/><path d="M21.84,23.7a10.877,10.877,0,0,1-2.257-.471A8.036,8.036,0,0,1,10.716,9.982a5.9,5.9,0,0,0-1.4-.171c-2.358.022-4.848,1.327-5.884,4.852a6.606,6.606,0,0,0-.074,1.361,12.649,12.649,0,0,0,23,7.274,14.737,14.737,0,0,1-3.448.459A8.881,8.881,0,0,1,21.84,23.7" style="fill:#63b132"/><path d="M19.463,21.244a3.53,3.53,0,0,0,.5.172A6.69,6.69,0,0,0,22.7,16.023h0a6.681,6.681,0,0,0-8.79-6.348c1.358,1.548,2.011,3.761,2.643,6.181v0s.2.673.547,1.562a15.434,15.434,0,0,0,1.363,2.788,2.924,2.924,0,0,0,1,1.036" style="fill:#90b4fe"/><path d="M16.013,3.372A12.632,12.632,0,0,0,5.731,8.656a6.425,6.425,0,0,1,3.48-1.009,6.8,6.8,0,0,1,3.182.772c.134.077.261.16.386.246a8.038,8.038,0,0,1,11.273,7.358h0a8.013,8.013,0,0,1-2.391,5.719,9.871,9.871,0,0,0,1.143.064,6.24,6.24,0,0,0,4.051-1.263,5.348,5.348,0,0,0,1.7-2.906A12.632,12.632,0,0,0,16.013,3.372" style="fill:#5881d8"/>`,
|
||
"CMake": `<defs><linearGradient id="a" x1="9.955" y1="9.096" x2="16.68" y2="23.324" gradientTransform="matrix(1, 0, 0, -1, 0, 32)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1011a1"/><stop offset="1" stop-color="#6969e1"/></linearGradient><linearGradient id="b" x1="16.231" y1="19.655" x2="25.618" y2="3.782" gradientTransform="matrix(1, 0, 0, -1, 0, 32)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b40e0e"/><stop offset="1" stop-color="#ff5959"/></linearGradient><linearGradient id="c" x1="21.663" y1="4.823" x2="8.381" y2="5.938" gradientTransform="matrix(1, 0, 0, -1, 0, 32)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#01a300"/><stop offset="1" stop-color="#01df00"/></linearGradient><linearGradient id="d" x1="14.643" y1="8.368" x2="14.472" y2="14.145" gradientTransform="matrix(1, 0, 0, -1, 0, 32)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#848484"/><stop offset="1" stop-color="#d2d2d2"/></linearGradient></defs><title>file_type_cmake</title><path d="M17.257,16.919,2.246,29.749,15.994,2.283Z" style="fill:url(#a)"/><path d="M2.262,29.768l-.038-.03L16.012,2.193l.008.088L17.283,16.93l-.01.008ZM15.977,2.374,2.324,29.649,17.23,16.908Z"/><path d="M17.952,24.931,16,2.28,29.767,29.751Z" style="fill:url(#b)"/><path d="M29.818,29.8l-.061-.025L17.929,24.948l0-.015L15.975,2.282l.047-.013ZM17.976,24.913,29.715,29.7,16.036,2.408Z"/><path d="M11.16,22.094l18.621,7.654H2.25Z" style="fill:url(#c)"/><path d="M29.781,29.773H2.183l.051-.044,8.921-7.665.014.006,18.622,7.655Zm-27.464-.05H29.654l-18.489-7.6Z"/><path d="M11.189,22.112l6.059-5.168.843,7.98Z" style="fill:url(#d)"/><path d="M18.149,25l-.077-.032-6.978-2.842,6.194-5.283.01.094Zm-6.865-2.9,6.748,2.749-.824-7.8Z"/><path d="M29.7,29.911H2.285a.221.221,0,0,1-.182-.088.222.222,0,0,1,.022-.2L15.864,2.187a.169.169,0,0,1,.14-.1h0a.154.154,0,0,1,.13.085L29.867,29.607a.238.238,0,0,1,.02.226A.211.211,0,0,1,29.7,29.911Zm-27.468-.16a.484.484,0,0,0,.057.011h27.4l.073-.009a.221.221,0,0,0-.028-.077L16,2.248,16,2.26,2.261,29.684a.279.279,0,0,0-.025.067Z"/>`,
|
||
"COBOL": `<path d="M22.24,6.546a4.449,4.449,0,0,0,1.765-2.522,4.636,4.636,0,0,1-.018,2.157c-.223.582-.567,1.107-.834,1.669a21.772,21.772,0,0,1,4.559-2.938C27.23,6.4,25.891,7.3,24.907,8.442c.19.409.28.989.8,1.109a5.036,5.036,0,0,0,2.5.155c.912-.313,1.345-1.258,1.8-2.035V9.14a15.738,15.738,0,0,1-.582,1.748c.2.547.409,1.092.582,1.647v.952c-.214.368-.442.726-.663,1.089a5.293,5.293,0,0,0-1.068-1.162,4.03,4.03,0,0,0-1.851-.125,3.212,3.212,0,0,0,2.413,1.47c-.359.37-.663.912-1.23.969-1.641.247-3.207-.505-4.839-.5-.282.02-.707.024-.785.372,0,.735.217,1.453.19,2.188-.059,1.258-.512,2.466-.529,3.726a13.785,13.785,0,0,0,.838,3.448c-.523-.077-1.044-.166-1.562-.26-.1.208-.184.42-.26.634A4.514,4.514,0,0,0,21.8,26.531c-.061.127-.182.381-.241.508l-.573.138c-.131.247-.263.492-.4.739a4.421,4.421,0,0,0-2.2.061c-.466-.186-.928-.376-1.389-.567a5.939,5.939,0,0,0,.407-2.315c-.282-.982-1.6-.984-2-1.877a6.233,6.233,0,0,1-1.022-2.851c-.823-.433-1.455-1.221-2.4-1.4-.048.409-.083.82-.153,1.227A6.015,6.015,0,0,1,10.481,22.6c.039.422.079.842.12,1.265.346.324.691.648,1.033.974a9.752,9.752,0,0,1-1.426.713,11.114,11.114,0,0,1-1.687.077c-.258-.254-.518-.508-.777-.764a4.871,4.871,0,0,0,.114-2.608c.171-.4.326-.812.475-1.221a5.565,5.565,0,0,1-3.01.206,5.12,5.12,0,0,1-3.29-4.33,3.859,3.859,0,0,1,1.407-3.268A6.41,6.41,0,0,0,3.2,16.259a3.038,3.038,0,0,0,2.5,2.466,3.462,3.462,0,0,0,1.96-.643,7.48,7.48,0,0,1,.363-4.133,5.524,5.524,0,0,1,3.586-2.66,4.235,4.235,0,0,0,2.011-1.566,10.67,10.67,0,0,1,1.529-1.33c-.228-.219-.453-.44-.68-.659A2.154,2.154,0,0,0,15.9,6.023c1.284-.3,2.551-.661,3.82-1.011a3.793,3.793,0,0,0,1.415.606c.317.346.494,1.157,1.1.928M18.458,19.908c.042.768-.048,1.665.674,2.155,0-.755-.046-1.507-.1-2.26Z" style="fill:#005ca5"/>`,
|
||
"CoffeeScript": `<path d="M13.114,5.728c.025.153-.051.28-.306.408a3.457,3.457,0,0,0-1.63-.229c-.637.051-1.172.255-1.1.688.1.433.713.688,1.808.586,2.674-.229,2.649-2.038,6.571-2.394,3.056-.28,4.763.662,4.992,1.808.178.891-.56,1.757-2.776,1.936-1.961.178-3.107-.357-3.209-.891-.051-.28.1-.688,1.044-.79.1.433.637.891,1.91.764C21.341,7.536,22.1,7.2,22,6.7c-.1-.535-1.07-.84-2.6-.713-3.107.28-3.871,1.987-6.52,2.216C11,8.376,9.472,7.689,9.268,6.67c-.076-.382-.076-1.273,1.91-1.452,1.019-.076,1.834.1,1.936.509ZM3.181,16.374A5.279,5.279,0,0,0,2.01,19.99a4.206,4.206,0,0,0,1.655,3.056,4,4,0,0,0,3.362.79,11.434,11.434,0,0,0,1.5-.484,4.238,4.238,0,0,1-2.751-1.019,4.13,4.13,0,0,1-1.732-2.827A3.79,3.79,0,0,1,4.658,16.5,3.977,3.977,0,0,1,7.409,15a4.806,4.806,0,0,1,3.209.942,6.95,6.95,0,0,0-.866-.866,4.1,4.1,0,0,0-3.464-.688,5.2,5.2,0,0,0-3.107,1.987ZM16.833,10.49A40.837,40.837,0,0,1,8.5,9.7C6.237,9.14,5.04,8.529,5.04,7.74c0-.331.153-.611.611-.942-1.426.56-2.19,1.019-2.19,1.732.076.79,1.35,1.579,3.948,2.19a39.443,39.443,0,0,0,9.347.942A38.993,38.993,0,0,0,26.1,10.72c2.6-.611,3.846-1.426,3.846-2.19,0-.56-.56-1.1-1.579-1.5a.862.862,0,0,1,.408.688c0,.79-1.172,1.426-3.54,1.961A39.324,39.324,0,0,1,16.833,10.49Zm9.373,2.19a42.315,42.315,0,0,1-9.347.942,44.144,44.144,0,0,1-9.424-.942c-2.19-.56-3.362-1.172-3.769-1.808a23.186,23.186,0,0,0,2.6,7.641c.942,1.426,1.885,2.674,2.827,4.024a9.883,9.883,0,0,1,.866,2.369,4.559,4.559,0,0,0,2.6,1.732,10.611,10.611,0,0,0,4.177.611h.153a11.839,11.839,0,0,0,4.3-.611,4.869,4.869,0,0,0,2.521-1.732h.076a9.592,9.592,0,0,1,.79-2.369c.942-1.35,1.885-2.6,2.827-4.024A24.62,24.62,0,0,0,30,10.872C29.491,11.585,28.319,12.2,26.205,12.681Z" style="fill:#6f4e37"/>`,
|
||
"Crystal": `<path d="M29.941,19.816,19.8,29.928c-.028.028-.085.028-.169.028L5.8,26.267c-.028,0-.084-.028-.113-.113L2,12.352a.419.419,0,0,1,.028-.169L12.168,2.072c.028-.028.084-.028.169-.028l13.83,3.718c.028,0,.084.028.113.113l3.69,13.8C30.026,19.732,30,19.788,29.941,19.816ZM16.393,8.832,2.817,12.493q-.042,0,0,.084L12.76,22.52c.028.028.028,0,.084,0L16.506,8.972C16.449,8.832,16.393,8.832,16.393,8.832Z" style="fill:#c8c8c8"/>`,
|
||
"CSS": `<polygon points="5.902 27.201 3.656 2 28.344 2 26.095 27.197 15.985 30 5.902 27.201" style="fill:#1572b6"/><polygon points="16 27.858 24.17 25.593 26.092 4.061 16 4.061 16 27.858" style="fill:#33a9dc"/><polygon points="16 13.191 20.09 13.191 20.372 10.026 16 10.026 16 6.935 16.011 6.935 23.75 6.935 23.676 7.764 22.917 16.282 16 16.282 16 13.191" style="fill:#fff"/><polygon points="16.019 21.218 16.005 21.222 12.563 20.292 12.343 17.827 10.67 17.827 9.24 17.827 9.673 22.68 16.004 24.438 16.019 24.434 16.019 21.218" style="fill:#ebebeb"/><polygon points="19.827 16.151 19.455 20.29 16.008 21.22 16.008 24.436 22.344 22.68 22.391 22.158 22.928 16.151 19.827 16.151" style="fill:#fff"/><polygon points="16.011 6.935 16.011 8.855 16.011 10.018 16.011 10.026 8.555 10.026 8.555 10.026 8.545 10.026 8.483 9.331 8.342 7.764 8.268 6.935 16.011 6.935" style="fill:#ebebeb"/><polygon points="16 13.191 16 15.111 16 16.274 16 16.282 12.611 16.282 12.611 16.282 12.601 16.282 12.539 15.587 12.399 14.02 12.325 13.191 16 13.191" style="fill:#ebebeb"/>`,
|
||
"CSV": `<path d="M22.038,2H6.375a1.755,1.755,0,0,0-1.75,1.75v24.5A1.755,1.755,0,0,0,6.375,30h19.25a1.755,1.755,0,0,0,1.75-1.75V6.856Zm.525,2.844,1.663,1.531H22.563ZM6.375,28.25V3.75H20.813V8.125h4.813V28.25Z" style="fill:#c2c2c2"/><rect x="8.125" y="15.097" width="13.076" height="1.75" style="fill:#829ec2"/><rect x="8.125" y="24.439" width="9.762" height="1.75" style="fill:#829ec2"/><rect x="8.125" y="19.763" width="15.75" height="1.75" style="fill:#829ec2"/><rect x="8.125" y="10.23" width="15.75" height="1.75" style="fill:#829ec2"/>`,
|
||
"D": `<defs><linearGradient id="a" x1="185.455" y1="1601.641" x2="181.955" y2="1630.224" gradientTransform="translate(-62.523 -666.646) scale(0.427)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="b" x1="176.136" y1="1600.5" x2="172.636" y2="1629.083" xlink:href="#a"/></defs><title>file_type_dlang</title><path d="M3.978,15.462,3.969,8.509A.588.588,0,0,1,4.5,7.947a.658.658,0,0,1,.076,0l6.074-.009a15.7,15.7,0,0,1,6.067.95,8.9,8.9,0,0,1,2.244,1.359,4.469,4.469,0,0,1,2.946-1.083,4.11,4.11,0,0,1,4.276,3.92A4.11,4.11,0,0,1,21.907,17c-.089,0-.177-.008-.265-.012a6.617,6.617,0,0,1-.232.953,85.383,85.383,0,0,1,8.59,2.6V2H2V15.4Q2.992,15.42,3.978,15.462Zm22.8-7.944a1.32,1.32,0,0,1,1.374,1.259,1.379,1.379,0,0,1-2.747,0A1.32,1.32,0,0,1,26.78,7.517Z" style="fill:#b03931"/><path d="M17.861,15.787a4.114,4.114,0,0,0-1.748-3.458,5.814,5.814,0,0,0-1.508-.822,7.354,7.354,0,0,0-1.629-.438,21.629,21.629,0,0,0-2.588-.1l-2.619,0,.006,4.737a88.827,88.827,0,0,1,9.91,1.408A4.919,4.919,0,0,0,17.861,15.787Z" style="fill:#b03931"/><path d="M20.993,18.979a7.906,7.906,0,0,1-2.128,2.582,9.739,9.739,0,0,1-3.256,1.71,11.558,11.558,0,0,1-1.971.472h-.015a31.857,31.857,0,0,1-3.326.111l-5.625.022a.616.616,0,0,1-.686-.681l-.01-7.734Q2.992,15.42,2,15.4V30H30V20.544a85.383,85.383,0,0,0-8.59-2.6A6.985,6.985,0,0,1,20.993,18.979Z" style="fill:#b03931"/><path d="M20.993,18.979a7.906,7.906,0,0,1-2.128,2.582,9.739,9.739,0,0,1-3.256,1.71,11.558,11.558,0,0,1-1.971.472h-.015a31.857,31.857,0,0,1-3.326.111l-5.625.022a.616.616,0,0,1-.686-.681l-.01-7.734Q2.992,15.42,2,15.4V30H30V20.544a85.383,85.383,0,0,0-8.59-2.6A6.985,6.985,0,0,1,20.993,18.979Z" style="opacity:0.300000011920929;isolation:isolate;fill:url(#a)"/><path d="M10.477,20.835a16.014,16.014,0,0,0,2.877-.2,7.633,7.633,0,0,0,1.628-.5,5.628,5.628,0,0,0,1.187-.748,4.457,4.457,0,0,0,1.518-2.271,88.691,88.691,0,0,0-9.91-1.408l.006,5.133Z" style="fill:#b03931"/><path d="M10.477,20.835a16.014,16.014,0,0,0,2.877-.2,7.633,7.633,0,0,0,1.628-.5,5.628,5.628,0,0,0,1.187-.748,4.457,4.457,0,0,0,1.518-2.271,88.691,88.691,0,0,0-9.91-1.408l.006,5.133Z" style="opacity:0.300000011920929;isolation:isolate;fill:url(#b)"/><path d="M20.383,11.746a6.993,6.993,0,0,1,1.36,4.148,6.618,6.618,0,0,1-.1,1.1c.088,0,.176.012.265.012a4.11,4.11,0,0,0,4.276-3.92,4.11,4.11,0,0,0-4.276-3.92,4.47,4.47,0,0,0-2.946,1.083A8.123,8.123,0,0,1,20.383,11.746Z" style="fill:#fff"/><ellipse cx="26.78" cy="8.777" rx="1.374" ry="1.259" style="fill:#fff"/><path d="M4.673,23.877l5.625-.022a31.871,31.871,0,0,0,3.326-.111h.015a11.49,11.49,0,0,0,1.971-.472,9.739,9.739,0,0,0,3.256-1.71,7.906,7.906,0,0,0,2.128-2.582,6.985,6.985,0,0,0,.417-1.034,7.056,7.056,0,0,0,.332-2.051,6.992,6.992,0,0,0-1.36-4.148,8.1,8.1,0,0,0-1.421-1.5,8.878,8.878,0,0,0-2.244-1.359,15.686,15.686,0,0,0-6.067-.95l-6.074.009a.658.658,0,0,0-.076,0,.588.588,0,0,0-.532.562l.009,6.952.01,7.734A.616.616,0,0,0,4.673,23.877Zm3.1-12.908,2.619,0a21.623,21.623,0,0,1,2.588.1,7.354,7.354,0,0,1,1.629.438,5.814,5.814,0,0,1,1.508.822,4.116,4.116,0,0,1,1.748,3.458,4.905,4.905,0,0,1-.175,1.327,4.457,4.457,0,0,1-1.518,2.271,5.613,5.613,0,0,1-1.187.748,7.666,7.666,0,0,1-1.628.5,16.009,16.009,0,0,1-2.877.2l-2.694,0-.006-5.133Z" style="fill:#fff"/>`,
|
||
"Dart": `<path d="M16.739,2.037a1.314,1.314,0,0,0-.916.377l-.013.01L7.22,7.389l8.566,8.566v.006l10.3,10.3,1.963-3.536L20.968,5.728l-3.3-3.3a1.307,1.307,0,0,0-.927-.388Z" style="fill:#66c3fa"/><path d="M7.25,7.35,2.288,15.931l-.01.013a1.322,1.322,0,0,0-.378.919,1.3,1.3,0,0,0,.387.924L6.4,21.9l16.084,6.327,3.636-2.02-.1-.1-.025,0-10.083-10.1H15.9L7.25,7.35Z" style="fill:#215896"/><path d="M7.192,7.362l8.764,8.773h.013l10.087,10.1,3.839-.732L29.9,14.14l-4.054-3.973a6.521,6.521,0,0,0-3.624-1.616l0-.044L7.192,7.362Z" style="fill:#235997"/><path d="M7.256,7.411l8.768,8.768v.013L26.116,26.284l-.734,3.839H14.022l-3.971-4.056a6.522,6.522,0,0,1-1.614-3.625l-.044,0L7.256,7.411Z" style="fill:#58b6f0"/>`,
|
||
"Dhall": `<path d="M16,2.07A13.93,13.93,0,1,1,2,16,13.93,13.93,0,0,1,16,2.07ZM13.28,22.32a1.49,1.49,0,1,1-1,1.83A1.49,1.49,0,0,1,13.28,22.32Zm8-15.68a.53.53,0,0,1,.38.66.52.52,0,0,1-.65.38l-.5-.13a42.67,42.67,0,0,0-.37,7.07C18.06,16.45,14.39,22,14.39,22l1.93-7.18a1,1,0,0,0,.89-.65.91.91,0,0,0-1.75-.47,1,1,0,0,0,.45,1L14,21.85a68.38,68.38,0,0,0-1.34-9.25,34.28,34.28,0,0,0,3.21-6.31l-.5-.13A.55.55,0,0,1,15,5.5a.53.53,0,0,1,.66-.38l5.68,1.52Z" style="fill:#b7b7b7;fill-rule:evenodd"/>`,
|
||
"Diff": `<rect x="6.975" y="3" width="18.05" height="6.017" style="fill:#c00000"/><path d="M12.992,10.95v6.017H6.975v6.017h6.017V29h6.017V22.983h6.017V16.967H19.008V10.95Z" style="fill:green"/>`,
|
||
"Django/Jinja2": `<defs><radialGradient id="a" cx="16" cy="-119.283" r="13.5" gradientTransform="matrix(1, 0, 0, -0.945, 0, -96.735)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#575757"/><stop offset="1" stop-color="#2f2f2f"/></radialGradient></defs><title>file_type_jinja</title><path d="M29.34,3.241a38.271,38.271,0,0,1-9.451,3.04c-4.241.55-12.329,1.1-13.935.712A23.3,23.3,0,0,1,3.2,6.151l.334,1.132L2.5,8.188l.183.323.424.032,1.3.162.183.582.727.066.364,1.228s1.544.13,2,.13,1.363-.064,1.363-.064l.03.485.334.064v.55l-.728.648.183.032v.225a15.816,15.816,0,0,1-2.3.034c-.666-.1-.788-.1-.788-.1l-.06.064-.03.291h.151l.06,1.262,3.363-.13-.243,4.365-.03.549-2.848-.162-.03-1.164h.635l.061-.453.575-.13.091-.128-2.151-.518-1.636.485.273.227h.273l.03.389.575.032V18.7l-.635.162.121.257.151.1v.873h.394v4.041l-.637.1.091,1.164.393.066-.06,2.651,1.727.032-.364-2.619,2.605-.064-.181,1.422-.243,1,2.635.032.03-2.586,1.817-.162-.09,1.649-.061.969h1.546l-.061-2.651.213.034.06-1.262h-.243l-.09-.518L13.8,21.9l.06-1.713h.333V19.149l-.424.032.061-1.22.493-.049.023-.4.28-.041.287-.218L13.187,16.9l-1.712.379.167.274.181-.015.211-.008.039.5.477-.023.009,1.082-2.053-.047.069-1.156.067-1.051V15.455L10.7,14l4.111-.21,4.892-.282.046.929-.174,2.231L19.5,18.744l-1.8-.032-.009-1.455.667-.024.03-.411.273-.041-.014-.081.273-.015.151-.2L17.034,16,15,16.44l.144.251.227-.017v.114h.28v.46l.6.008-.007,1.277h-.605l-.009.291.213.024-.023,1.108.447.024-.053,4.39-.591.12.007.21h.206v1.124h.34l-.09,1.536L15.974,28.7l2.151.056-.069-1.164-.158-.969-.031-.841,1.826-.032-.053,1.3-.009,1.374,1.031.081,1.4-.056.44-.13-.243-.736-.06-1.156-.114-.824,1.742-.064-.076,1.01-.007,1.585.7.064.69-.015.333-.105-.2-1.5L25.2,25.445l.3-.032L25.5,24.4l.083-.017-.014-.218h-.341l-.069-.744L25.13,20.2l.257-.008V19.133l.107.017v-.21l-.38-.034.009-1.228.635-.056-.037-.413.28-.024-.016-.081.371-.186-1.886-.379-1.916.389.121.226.3-.024.016.1h.25l.014.485.621-.008.053,1.188-2.2-.017-.257-1.786-.206-.946-.166-1.7.1-.993,4.377-.332.014-1.479.22-.056-.014-.225-.167-.1s-2.393.355-3.151.436l-.371.04-.023-.274-.905-.474.011-.552.311-.009.023-.759a24.807,24.807,0,0,0,2.544-.283c.689-.162,1.666-.323,1.666-.323L26.2,7.809l.917-.267.076-.21,2.074-.574.236-.194-.788-1.722.076-.389.4-.21.288-.881ZM19.374,9.8l-.011.626.47.02-.03.594-.921.6-.057.174.371,0,0,.146-2.814.137.019-.416.128-.207.009-.133,0-.286.08-.19.03-.154v-.11l.121-.485Zm-5.885.533-.069.421.22.259-.014.453.2.315-.053.372.151.218-2.871.113-.007-.1.333-.041.016-.122-.727-.395-.039-.631.348-.017.03-.68Zm4.249,9.7,1.742.113L19.42,22.5l.227,1.923L17.8,24.354Zm-11.663.1,2.788.145L8.62,21.9v1.359l.2.759-2.727.13Zm17.843.015v4.01l-1.772.13-.061-2.118-.2-1.973ZM10.5,20.24l2.06.008.021,3.718L10.657,24l-.1-1.205-.007-1.2Z" style="stroke:red;stroke-width:0.5px;fill:url(#a)"/>`,
|
||
"Docker": `<path d="M16.54,12.663H19.4v2.924h1.446a6.272,6.272,0,0,0,1.988-.333,5.091,5.091,0,0,0,.966-.436,3.584,3.584,0,0,1-.67-1.849,3.907,3.907,0,0,1,.7-2.753l.3-.348.358.288a4.558,4.558,0,0,1,1.795,2.892,4.375,4.375,0,0,1,3.319.309l.393.226-.207.4a4.141,4.141,0,0,1-4.157,1.983c-2.48,6.168-7.871,9.088-14.409,9.088-3.378,0-6.476-1.263-8.241-4.259l-.029-.049L2.7,20.227a8.316,8.316,0,0,1-.659-4.208l.04-.433H4.526V12.663H7.387V9.8h5.721V6.942H16.54v5.721Z" style="fill:#0096e6"/><path d="M12.006,24.567a6.022,6.022,0,0,1-3.14-3.089,10.329,10.329,0,0,1-2.264.343q-.5.028-1.045.028-.632,0-1.331-.037a9.051,9.051,0,0,0,7,2.769Q11.618,24.581,12.006,24.567Z" style="fill:#fff"/><path d="M7.08,13.346h.2v2.067h-.2Zm-.376,0h.2v2.067H6.7V13.346Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.368,0h.2v2.067h-.2V13.346ZM5,13.14H7.482v2.479H5Zm2.859-2.861h2.48v2.479H7.863Zm2.077.207h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2V10.486Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.368,0h.2v2.066h-.2Zm-.207,2.653h2.48v2.48H7.863V13.14Zm2.077.207h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2V13.346Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.368,0h.2v2.067h-.2Zm2.654-.207H13.2v2.48h-2.48V13.14Zm2.076.207H13v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.368,0h.2v2.067h-.2Zm-.206-3.067H13.2v2.479h-2.48V10.279Zm2.076.207H13v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.368,0h.2v2.066h-.2Zm2.654,2.653h2.479v2.48h-2.48V13.14Zm2.076.207h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.368,0h.192v2.067h-.2V13.346Zm-.206-3.067h2.479v2.479h-2.48V10.279Zm2.076.207h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.376,0h.2v2.066h-.2Zm-.368,0h.192v2.066h-.2V10.486Zm-.206-3.067h2.479V9.9h-2.48V7.419Zm2.076.206h.2V9.691h-.2Zm-.376,0h.2V9.691h-.2Zm-.376,0h.2V9.691h-.2Zm-.376,0h.2V9.691h-.2Zm-.376,0h.2V9.691h-.2Zm-.368,0h.192V9.691h-.2V7.625Zm2.654,5.514h2.479v2.48h-2.48V13.14Zm2.076.207h.195v2.067h-.2V13.346Zm-.376,0h.206v2.067h-.206Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.2Zm-.376,0h.2v2.067h-.205V13.346Zm-.368,0h.2v2.067h-.194V13.346Z" style="fill:#fff"/><path d="M10.188,19.638a.684.684,0,1,1-.684.684A.684.684,0,0,1,10.188,19.638Zm0,.194a.489.489,0,0,1,.177.033.2.2,0,1,0,.275.269.49.49,0,1,1-.453-.3Z" style="fill:#fff"/>`,
|
||
"DOT (Graphviz)": `<polygon points="23.942 30 12.679 30 1.417 30 1.417 16 1.417 2 12.679 2 23.942 2 23.942 16 23.942 30" style="fill:#e6e6e6"/><rect x="2.132" y="3.202" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="7.42" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="11.638" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="15.856" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="20.074" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="24.293" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="28.511" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2" y="3.202" width="0.264" height="25.573" style="fill:#4ed1f8"/><rect x="6.218" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="10.436" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="14.655" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="18.873" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="23.091" y="3.202" width="0.264" height="25.573" style="fill:#4ed1f8"/><g style="opacity:0.5"><rect x="2.132" y="27.456" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="26.402" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="25.347" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="23.238" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="22.184" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="21.129" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="19.02" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="17.965" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="16.911" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="14.802" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="13.747" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="12.693" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="10.583" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="9.529" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="8.474" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="6.365" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="5.311" width="21.135" height="0.264" style="fill:#4ed1f8"/><rect x="2.132" y="4.256" width="21.135" height="0.264" style="fill:#4ed1f8"/></g><g style="opacity:0.5"><rect x="22.036" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="20.982" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="19.927" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="17.818" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="16.764" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="15.709" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="13.6" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="12.545" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="11.491" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="9.382" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="8.327" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="7.273" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="5.164" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="4.109" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/><rect x="3.055" y="3.333" width="0.264" height="25.331" style="fill:#4ed1f8"/></g><path d="M13,8.976c-2.308,0-4.131-1.274-4.193-2.969h0a2.775,2.775,0,0,1,1.253-2.32,5.3,5.3,0,0,1,2.943-.963,5.294,5.294,0,0,1,3.006.743,2.775,2.775,0,0,1,1.421,2.221c.065,1.752-1.779,3.194-4.2,3.283C13.158,8.974,13.08,8.976,13,8.976Zm.232-5.2q-.095,0-.19,0a4.238,4.238,0,0,0-2.354.756,1.761,1.761,0,0,0-.828,1.435C9.9,7.09,11.428,7.978,13.2,7.917s3.223-1.069,3.181-2.191a1.761,1.761,0,0,0-.932-1.369A4.165,4.165,0,0,0,13.234,3.773Z" style="fill:#656565"/><path d="M6.4,29.281A5.238,5.238,0,0,1,3.6,28.519a2.775,2.775,0,0,1-1.41-2.229c-.056-1.752,1.8-3.185,4.213-3.262s4.356,1.236,4.412,2.988A2.775,2.775,0,0,1,9.548,28.33a5.3,5.3,0,0,1-2.948.948Q6.5,29.281,6.4,29.281Zm.186-5.2-.156,0c-1.766.056-3.229,1.052-3.193,2.174a1.761,1.761,0,0,0,.924,1.374,4.235,4.235,0,0,0,2.4.593,4.235,4.235,0,0,0,2.357-.744,1.761,1.761,0,0,0,.835-1.43C9.724,24.961,8.29,24.08,6.591,24.08Z" style="fill:#656565"/><path d="M19.261,29.26a5.238,5.238,0,0,1-2.807-.762,2.775,2.775,0,0,1-1.41-2.229h0c-.055-1.752,1.8-3.185,4.213-3.262a5.3,5.3,0,0,1,3,.759A2.6,2.6,0,0,1,22.4,28.31a5.3,5.3,0,0,1-2.948.948Q19.358,29.26,19.261,29.26ZM16.1,26.236a1.761,1.761,0,0,0,.924,1.374,4.57,4.57,0,0,0,4.757-.151,1.558,1.558,0,0,0-.089-2.8,4.226,4.226,0,0,0-2.4-.593c-1.766.056-3.228,1.052-3.193,2.174Z" style="fill:#656565"/><path d="M6.2,23.477A27.4,27.4,0,0,1,9.769,8.986l.687.391A26.609,26.609,0,0,0,6.986,23.45Z" style="fill:#656565"/><path d="M10.853,7.957a7.171,7.171,0,0,0-.075,2.32l-.758-.93-1.178-.23A7.165,7.165,0,0,0,10.853,7.957Z" style="fill:#656565"/><path d="M19.854,23.477l-.79-.027a26.59,26.59,0,0,0-.915-7.884,26.624,26.624,0,0,0-2.554-6.189l.687-.391a27.423,27.423,0,0,1,2.63,6.373A27.372,27.372,0,0,1,19.854,23.477Z" style="fill:#656565"/><path d="M15.2,7.957a7.171,7.171,0,0,0,2.011,1.159l-1.178.23-.758.93A7.165,7.165,0,0,0,15.2,7.957Z" style="fill:#656565"/><rect x="11.348" y="9.945" width="3.515" height="0.791" transform="matrix(0.016, -1, 1, 0.016, 2.557, 23.279)" style="fill:#656565"/><path d="M13.054,13.529a7.171,7.171,0,0,0-1.1-2.046l1.122.426,1.135-.39A7.165,7.165,0,0,0,13.054,13.529Z" style="fill:#656565"/><rect x="7.809" y="20.081" width="4.757" height="0.791" transform="translate(-12.56 18.108) rotate(-57.603)" style="fill:#656565"/><path d="M8.147,23.694a7.171,7.171,0,0,0,.133-2.317l.734.949,1.171.26A7.165,7.165,0,0,0,8.147,23.694Z" style="fill:#656565"/><rect x="15.418" y="18.051" width="0.791" height="4.919" transform="translate(-8.257 10.951) rotate(-30.708)" style="fill:#656565"/><path d="M17.8,23.856a7.171,7.171,0,0,0-2.006-1.168l1.179-.225.762-.927A7.165,7.165,0,0,0,17.8,23.856Z" style="fill:#656565"/><path d="M13.024,19.125a5.238,5.238,0,0,1-2.807-.762,2.775,2.775,0,0,1-1.41-2.229,2.775,2.775,0,0,1,1.266-2.314,5.3,5.3,0,0,1,2.948-.948,6.712,6.712,0,0,1,2.134.313l-.331,1a5.668,5.668,0,0,0-1.769-.261,4.238,4.238,0,0,0-2.358.744,1.761,1.761,0,0,0-.835,1.43,1.761,1.761,0,0,0,.924,1.374,4.242,4.242,0,0,0,2.4.593,5.7,5.7,0,0,0,1.678-.378l.378.985a6.844,6.844,0,0,1-2.022.448Q13.121,19.125,13.024,19.125Z" style="fill:#656565"/><path d="M15.435,12.876a4.338,4.338,0,0,0-.984,1.622,2.064,2.064,0,0,1-.016,2.806,4.4,4.4,0,0,0,.982,1.6,3.932,3.932,0,0,0,.078-5.986C15.476,12.9,15.454,12.893,15.435,12.876Z" style="fill:#656565"/><path d="M19.525,15.278a27.931,27.931,0,0,0-1.263-3.742,4.376,4.376,0,0,0-1.777.517,26.063,26.063,0,0,1,1.253,3.685,26.038,26.038,0,0,1,.734,4.534,4.347,4.347,0,0,0,1.825-.351A27.9,27.9,0,0,0,19.525,15.278Z" style="fill:#656565"/><path d="M16.153,12.229A4.437,4.437,0,1,0,22.3,13.5,4.437,4.437,0,0,0,16.153,12.229Zm4.812,7.332a4.346,4.346,0,1,1,1.249-6.018A4.346,4.346,0,0,1,20.965,19.561Z" style="fill:#2c2928"/><path d="M22.015,19.186a.822.822,0,0,0-.192-.209,4.347,4.347,0,0,1-.333.319,4.522,4.522,0,0,1-.446.337,4.73,4.73,0,0,1-.94.477.669.669,0,0,0,.031.1.64.64,0,0,0,.047.094l.487.8L22.5,19.984Z" style="fill:#282828"/><rect x="20.793" y="20.784" width="2.147" height="0.44" transform="translate(-7.74 14.465) rotate(-31.394)" style="fill:#282828"/><rect x="22.868" y="20.96" width="2.147" height="6.887" transform="translate(-9.207 16.044) rotate(-31.394)" style="fill:#282828"/><path d="M27.054,27.443l-.236-.387-1.833,1.119.236.387a.924.924,0,0,0,1.279.159l.11-.067A.924.924,0,0,0,27.054,27.443Z" style="fill:#282828"/><path d="M20.68,14.845a.315.315,0,0,1,.338.027,1.078,1.078,0,0,1,.294.578,1.1,1.1,0,0,1,.029.654.327.327,0,0,1-.278.2.468.468,0,0,1-.37-.1.922.922,0,0,1-.262-.5.955.955,0,0,1-.01-.585A.466.466,0,0,1,20.68,14.845Zm.06.227a.149.149,0,0,0-.074.063.247.247,0,0,0-.027.132,1.626,1.626,0,0,0,.064.355,1.592,1.592,0,0,0,.112.329.268.268,0,0,0,.094.11.142.142,0,0,0,.094.015.121.121,0,0,0,.078-.048.211.211,0,0,0,.028-.128,2.643,2.643,0,0,0-.186-.722.235.235,0,0,0-.093-.107A.116.116,0,0,0,20.739,15.072Z" style="fill:#00ff80"/><path d="M21.694,14.4a.3.3,0,0,1,.346.057,1.493,1.493,0,0,1,.325.7,1.521,1.521,0,0,1,.06.771.31.31,0,0,1-.27.228.446.446,0,0,1-.379-.137,1.31,1.31,0,0,1-.292-.617,1.341,1.341,0,0,1-.041-.7A.441.441,0,0,1,21.694,14.4Zm.072.273a.136.136,0,0,0-.072.069.315.315,0,0,0-.021.155,2.351,2.351,0,0,0,.084.427,2.31,2.31,0,0,0,.131.4.347.347,0,0,0,.1.135.13.13,0,0,0,.1.021.11.11,0,0,0,.076-.054.275.275,0,0,0,.022-.15,3.773,3.773,0,0,0-.224-.862.311.311,0,0,0-.1-.132A.1.1,0,0,0,21.766,14.674Z" style="fill:#00ff80"/><path d="M23.472,15.934l-.269.038-.379-1.439a.955.955,0,0,1-.257.392l-.087-.331a.841.841,0,0,0,.169-.26.874.874,0,0,0,.075-.383l.2-.089Z" style="fill:#00ff80"/><path d="M24.455,15.794l-.269.038-.429-1.625a1,1,0,0,1-.247.429l-.1-.376a.874.874,0,0,0,.162-.284,1.028,1.028,0,0,0,.064-.424l.2-.089Z" style="fill:#00ff80"/><path d="M24.636,13.117c.127-.055.249-.008.369.144a3.11,3.11,0,0,1,.416,1.034,3.143,3.143,0,0,1,.151,1.11c-.029.19-.111.294-.247.312s-.272-.059-.4-.231a2.855,2.855,0,0,1-.381-.95,2.871,2.871,0,0,1-.132-1.039A.437.437,0,0,1,24.636,13.117Zm.107.4a.124.124,0,0,0-.067.088.584.584,0,0,0,0,.221,5.218,5.218,0,0,0,.139.635,5.153,5.153,0,0,0,.184.6.66.66,0,0,0,.12.208.118.118,0,0,0,.1.04.1.1,0,0,0,.071-.072.528.528,0,0,0,0-.216,5.442,5.442,0,0,0-.144-.653,5.447,5.447,0,0,0-.189-.619.612.612,0,0,0-.119-.205A.093.093,0,0,0,24.743,13.522Z" style="fill:#00ff80"/><path d="M26.638,15.488l-.269.038-.54-2.039A1.151,1.151,0,0,1,25.6,14l-.126-.475a.99.99,0,0,0,.148-.337,1.436,1.436,0,0,0,.039-.515l.2-.088Z" style="fill:#00ff80"/><path d="M26.666,12.236c.127-.055.255.012.385.2a4.584,4.584,0,0,1,.478,1.268,4.62,4.62,0,0,1,.213,1.343c-.018.229-.1.352-.232.37s-.278-.081-.421-.3a4.284,4.284,0,0,1-.443-1.179,4.283,4.283,0,0,1-.194-1.272C26.468,12.438,26.539,12.291,26.666,12.236Zm.131.5q-.046.018-.064.1a.829.829,0,0,0,.009.266,7.856,7.856,0,0,0,.178.779q.143.541.221.738a.947.947,0,0,0,.134.258.119.119,0,0,0,.1.052q.048-.009.068-.085a.762.762,0,0,0-.008-.262,8.117,8.117,0,0,0-.182-.8q-.148-.557-.227-.757a.892.892,0,0,0-.133-.256Q26.843,12.714,26.8,12.732Z" style="fill:#00ff80"/><path d="M27.681,11.8c.127-.055.257.023.393.234a5.431,5.431,0,0,1,.509,1.385,5.467,5.467,0,0,1,.244,1.46c-.013.249-.088.381-.224.4s-.281-.092-.43-.328a5.11,5.11,0,0,1-.473-1.294,5.1,5.1,0,0,1-.225-1.388C27.486,12.008,27.555,11.851,27.681,11.8Zm.144.542q-.046.018-.062.106a.97.97,0,0,0,.015.289q.04.259.2.851t.24.807a1.112,1.112,0,0,0,.14.284q.057.067.106.059t.066-.091a.9.9,0,0,0-.014-.284q-.04-.26-.2-.867t-.245-.827a1.053,1.053,0,0,0-.14-.281Q27.871,12.32,27.825,12.338Z" style="fill:#00ff80"/><path d="M29.915,15.034l-.27.037-.706-2.661a1.478,1.478,0,0,1-.192.636l-.166-.625A1.248,1.248,0,0,0,28.708,12a2.214,2.214,0,0,0,0-.653l.2-.088Z" style="fill:#00ff80"/><path d="M29.712,10.921c.127-.054.263.043.409.294a7.345,7.345,0,0,1,.572,1.619A7.382,7.382,0,0,1,31,14.527c0,.288-.072.44-.209.458s-.286-.114-.447-.393a6.984,6.984,0,0,1-.535-1.524,6.944,6.944,0,0,1-.287-1.621C29.523,11.151,29.586,10.975,29.712,10.921Zm.168.633q-.046.018-.059.119a1.287,1.287,0,0,0,.027.334q.051.3.235.994t.277.946a1.484,1.484,0,0,0,.154.334q.06.08.109.071t.063-.1a1.2,1.2,0,0,0-.026-.33q-.051-.3-.239-1.011t-.282-.965a1.42,1.42,0,0,0-.153-.332Q29.926,11.536,29.88,11.553Z" style="fill:#00ff80"/><path d="M21.167,16.362a.422.422,0,0,1,.318.185,1.005,1.005,0,0,1-.277,1.03.42.42,0,0,1-.366,0,.59.59,0,0,1-.311-.261.808.808,0,0,1,.254-.893A.561.561,0,0,1,21.167,16.362Zm-.051.189a.175.175,0,0,0-.192.087,1.487,1.487,0,0,0-.155.567.216.216,0,0,0,.039.124.191.191,0,0,0,.084.058.145.145,0,0,0,.188-.069,1.666,1.666,0,0,0,.164-.6.189.189,0,0,0-.04-.121A.163.163,0,0,0,21.117,16.551Z" style="fill:#00ff80"/><path d="M22.376,16.548a.382.382,0,0,1,.311.212,1.024,1.024,0,0,1-.019.66,1.022,1.022,0,0,1-.315.581.38.38,0,0,1-.373.025.533.533,0,0,1-.3-.29,1.189,1.189,0,0,1,.309-1.1A.5.5,0,0,1,22.376,16.548Zm-.062.23a.167.167,0,0,0-.1.013.235.235,0,0,0-.1.1,2.219,2.219,0,0,0-.189.694.269.269,0,0,0,.033.147.167.167,0,0,0,.083.064.143.143,0,0,0,.1,0,.206.206,0,0,0,.094-.1,2.436,2.436,0,0,0,.2-.727.24.24,0,0,0-.034-.144A.141.141,0,0,0,22.314,16.778Z" style="fill:#00ff80"/><path d="M23.37,18.541l-.281-.11.328-1.225a1,1,0,0,1-.442.152l.075-.281a.881.881,0,0,0,.292-.1.68.68,0,0,0,.259-.238l.242.037Z" style="fill:#00ff80"/><path d="M24.793,16.919a.348.348,0,0,1,.3.266,1.751,1.751,0,0,1-.075.87,1.749,1.749,0,0,1-.371.791.345.345,0,0,1-.388.078.488.488,0,0,1-.288-.348,1.587,1.587,0,0,1,.067-.79,1.577,1.577,0,0,1,.354-.727A.457.457,0,0,1,24.793,16.919Zm-.084.312a.143.143,0,0,0-.107.025.353.353,0,0,0-.106.141,4.126,4.126,0,0,0-.257.948.408.408,0,0,0,.021.192.143.143,0,0,0,.08.075.12.12,0,0,0,.1-.011.318.318,0,0,0,.105-.137,4.418,4.418,0,0,0,.266-.981.374.374,0,0,0-.022-.189A.119.119,0,0,0,24.71,17.231Z" style="fill:#00ff80"/><path d="M25.649,19.43l-.281-.11.428-1.6a1.033,1.033,0,0,1-.462.227l.1-.371a.9.9,0,0,0,.3-.151.93.93,0,0,0,.281-.321l.242.037Z" style="fill:#00ff80"/><path d="M27.211,17.291a.344.344,0,0,1,.282.319,2.692,2.692,0,0,1-.131,1.08,2.69,2.69,0,0,1-.427,1,.34.34,0,0,1-.4.13.487.487,0,0,1-.273-.405,2.494,2.494,0,0,1,.122-1,2.47,2.47,0,0,1,.41-.937A.451.451,0,0,1,27.211,17.291Zm-.106.394a.133.133,0,0,0-.11.036.509.509,0,0,0-.117.182,6.622,6.622,0,0,0-.325,1.2.591.591,0,0,0,.009.237.133.133,0,0,0,.077.086.11.11,0,0,0,.107-.023.465.465,0,0,0,.116-.178,4.639,4.639,0,0,0,.2-.619,4.658,4.658,0,0,0,.136-.615.552.552,0,0,0-.01-.235A.11.11,0,0,0,27.105,17.685Z" style="fill:#00ff80"/><path d="M27.927,20.32l-.281-.11.528-1.971a1.134,1.134,0,0,1-.482.3l.123-.46a.972.972,0,0,0,.317-.2,1.248,1.248,0,0,0,.3-.4l.242.037Z" style="fill:#00ff80"/><path d="M28.953,20.721l-.281-.11.573-2.139a1.2,1.2,0,0,1-.491.336l.134-.5a1.02,1.02,0,0,0,.323-.22,1.413,1.413,0,0,0,.314-.44l.242.037Z" style="fill:#00ff80"/><path d="M30.717,17.83c.151.023.238.155.262.4a4.436,4.436,0,0,1-.213,1.385,4.434,4.434,0,0,1-.509,1.307c-.14.195-.28.263-.422.207s-.226-.22-.25-.489a4.194,4.194,0,0,1,.2-1.3,4.143,4.143,0,0,1,.492-1.241C30.42,17.9,30.566,17.807,30.717,17.83Zm-.137.513a.132.132,0,0,0-.115.053.8.8,0,0,0-.133.241,7.587,7.587,0,0,0-.244.791,7.539,7.539,0,0,0-.18.779.93.93,0,0,0-.009.3.131.131,0,0,0,.073.1.108.108,0,0,0,.111-.039.742.742,0,0,0,.132-.237,7.8,7.8,0,0,0,.248-.806,7.835,7.835,0,0,0,.185-.8.884.884,0,0,0,.008-.3Q30.633,18.353,30.58,18.343Z" style="fill:#00ff80"/>`,
|
||
"EditorConfig": `<path d="M8.709,18.351a1.267,1.267,0,0,0,.532-1.379C8.692,17.207,8.718,17.749,8.709,18.351Z" style="fill:#e3e3f8"/><path d="M14.924,19.852a.871.871,0,0,0,.62-1.135A1.43,1.43,0,0,0,14.924,19.852Z" style="fill:#e3e3f8"/><path d="M2.713,27.079a1.538,1.538,0,0,0,.524,1.353c1.414.794,6.372.175,8.056-.2a14.994,14.994,0,0,0,2.426-1.213,22.643,22.643,0,0,0,4.713-2.557c1.082-.794,2.8-3.029,2.985-4.364l-1.475-.332c-.035,1.5-.375,1.842-1.711,2.191a10.662,10.662,0,0,1-3.57.14,3.362,3.362,0,0,1-2.313-1.562c-1.065-1.414.236-2.4-1.449-2.5-1.772,2.173-4.9.611-6.267.393a30.066,30.066,0,0,0-1.938,7.6,2.748,2.748,0,0,1,2.138.323c2.688,1.039.34,1.955-.733,1.685C3.368,27.864,3.141,27.384,2.713,27.079Z" style="fill:#fdfdfd"/><path d="M6.231,14.537a11.539,11.539,0,0,1,2.985,1.126c1.51.751,1.781.646,1.92,1.693.017.192-.017.3.532.471.925.288-.532-.227,1.946-.218A16.64,16.64,0,0,1,19.559,18.9c.454.288.367.655,1.9.611a18.767,18.767,0,0,0-1.2-6.162c-.864-2.007-2.007-2.313-4.338-3.064-1.362-.436-5.359-.916-6.6-.148-1.161.724-1.379,1.589-2.461,3.107A5.366,5.366,0,0,0,6.231,14.537Z" style="fill:#fdfdfd"/><path d="M15.84,18.246c.873.358-.044,2.671-1.257,2.112-.393-1.108.541-1.737.794-2.234a8.51,8.51,0,0,0-2.461-.148c-.576.218-.707,1.449-.41,2.025,1.4,2.741,7.567,2.156,6.913.026-.262-.864-.506-1-1.388-1.3A6.885,6.885,0,0,0,15.84,18.246Z" style="fill:#fdfdfd"/><path d="M4.869,17.941c.7.672,2.278.777,3.3.829C8.3,17.417,8.413,16.4,9.5,16.483a1.6,1.6,0,0,1-.305,2.13,1.386,1.386,0,0,0,1.362-1.763,14.542,14.542,0,0,0-4.46-1.894A9.506,9.506,0,0,0,4.869,17.941Z" style="fill:#fdfdfd"/><path d="M3.228,26.581c.576-.052,2.077.384,2.2.873C4.494,27.568,3.307,27.48,3.228,26.581Zm-.515.5c.428.305.655.786,1.388.96,1.074.271,3.421-.646.733-1.685A2.748,2.748,0,0,0,2.7,26.032a30.066,30.066,0,0,1,1.938-7.6c1.37.218,4.495,1.781,6.267-.393,1.685.1.384,1.082,1.449,2.5A3.362,3.362,0,0,0,14.662,22.1a10.662,10.662,0,0,0,3.57-.14c1.335-.349,1.676-.69,1.711-2.191l1.475.332c-.183,1.335-1.9,3.57-2.985,4.364a22.643,22.643,0,0,1-4.713,2.557,14.994,14.994,0,0,1-2.426,1.213c-1.685.375-6.642,1-8.056.2A1.538,1.538,0,0,1,2.713,27.079Zm12.211-7.227a1.43,1.43,0,0,1,.62-1.135A.871.871,0,0,1,14.924,19.852Zm.916-1.606a6.885,6.885,0,0,1,2.191.48c.882.3,1.126.436,1.388,1.3.655,2.13-5.516,2.714-6.913-.026-.3-.576-.166-1.807.41-2.025a8.51,8.51,0,0,1,2.461.148c-.253.5-1.187,1.126-.794,2.234C15.8,20.917,16.713,18.6,15.84,18.246Zm-7.131.1c.009-.6-.017-1.143.532-1.379A1.267,1.267,0,0,1,8.709,18.351Zm-3.84-.41a9.506,9.506,0,0,1,1.222-2.985,14.542,14.542,0,0,1,4.46,1.894A1.386,1.386,0,0,1,9.19,18.613a1.6,1.6,0,0,0,.305-2.13c-1.082-.079-1.2.934-1.327,2.287C7.147,18.717,5.567,18.613,4.869,17.941ZM4,17.242c-.323-.89-.323-2.278,1.047-2.392l-.7,1.946C4.162,17.216,4.162,17.12,4,17.242Zm2.234-2.706a5.366,5.366,0,0,1,.628-1.292c1.082-1.519,1.3-2.383,2.461-3.107,1.239-.768,5.237-.288,6.6.148,2.33.751,3.474,1.056,4.338,3.064a18.767,18.767,0,0,1,1.2,6.162c-1.536.044-1.449-.323-1.9-.611a16.64,16.64,0,0,0-5.944-1.292c-2.479-.009-1.021.506-1.946.218-.55-.175-.515-.279-.532-.471-.14-1.047-.41-.943-1.92-1.693A11.539,11.539,0,0,0,6.231,14.537Zm15.449-.428c-.166-.55.14-.515.672-.89a9.021,9.021,0,0,1,.925-.655c1.405-.786,4.024-.916,5.141.017A2.479,2.479,0,0,1,29.5,14.65a5.838,5.838,0,0,1-2.618,3.832,5.213,5.213,0,0,1-4.783,1.2c-.157-.384-.035-2.819-.218-3.718-.166-.8-.079-.89.384-1.37,1.362-1.414,4.312-2.444,5.988-1.231.707.524.506.724.873,1.126.454-.489-.393-2.13-3.517-2.025C23.486,12.529,22.57,14.187,21.68,14.109ZM8.971,9.143a8.094,8.094,0,0,1,2.278-4.6C12.6,3.5,14.016,2.509,16.094,3.687c.515.288.489.436.541,1.152a3.312,3.312,0,0,1-.192,1.5c-1.379,4.451-2.531,1.894-6.948,2.95a6.374,6.374,0,0,1,2.121-3.413c1.2-1.161,2.06-1.911,3.858-1.667a1.842,1.842,0,0,1-.052,2.322c-.8,1.292-1,1.213-.882,2.095.628-.157.82-.768,1.108-1.379,1.754-3.666-.794-4.111-2.357-3.439A10.372,10.372,0,0,0,9.766,7.554c-.122.244-.253.559-.367.829Zm6.913.183C16.067,8.235,17.15,7.964,17.15,4.6c0-1.449-1.781-2.749-4.111-1.781-2,.82-2.3,1.449-3.369,3.055-1,1.519-.969,3.186-1.833,4.591-.253.4-.48.541-.759.943-.2.3-.349.672-.55,1.021A12.94,12.94,0,0,0,5.367,14.4c-1.047.026-1.929.044-2.034,1.126-.14,1.484.559,1.85.559,2.409-.009.6-2.453,6.677-1.772,10.3.192,1,.847,1,1.894,1.126a17.93,17.93,0,0,0,8.056-.707l4.1-1.964a18.85,18.85,0,0,0,3.561-2.5,12.383,12.383,0,0,0,1.309-1.719,3.213,3.213,0,0,0,.8-2.208,8.473,8.473,0,0,1,2.985,1c-.061.6-.358.314-.358.855a1.355,1.355,0,0,0,1.047-.89c-.358-.524-.733-.436-1.248-.855a8.212,8.212,0,0,1,1.719-.707c1.222-.506,3.308-2.042,3.823-3.439a4.449,4.449,0,0,0-.559-3.736,5.444,5.444,0,0,0-3.648-1.161c-1.58,0-3.212,1.135-4.486,1.623-.489-.428-.524-.916-.882-1.388A12.281,12.281,0,0,0,15.884,9.326Z" style="fill:#020202"/><path d="M21.68,14.109c.89.079,1.807-1.58,3.928-1.65,3.125-.1,3.971,1.536,3.517,2.025-.367-.4-.166-.6-.873-1.126-1.676-1.213-4.626-.183-5.988,1.231-.463.48-.55.567-.384,1.37.183.9.061,3.334.218,3.718a5.213,5.213,0,0,0,4.783-1.2A5.838,5.838,0,0,0,29.5,14.65a2.479,2.479,0,0,0-1.082-2.069c-1.117-.934-3.736-.8-5.141-.017a9.021,9.021,0,0,0-.925.655C21.819,13.594,21.514,13.559,21.68,14.109Z" style="fill:#fdf2f2"/><path d="M8.971,9.143,9.4,8.383c.113-.271.244-.585.367-.829A10.372,10.372,0,0,1,13.292,3.81c1.562-.672,4.111-.227,2.357,3.439-.288.611-.48,1.222-1.108,1.379-.122-.882.079-.8.882-2.095a1.842,1.842,0,0,0,.052-2.322c-1.8-.244-2.662.506-3.858,1.667A6.374,6.374,0,0,0,9.5,9.291c4.416-1.056,5.569,1.5,6.948-2.95a3.312,3.312,0,0,0,.192-1.5c-.052-.716-.026-.864-.541-1.152-2.077-1.178-3.491-.192-4.844.855A8.094,8.094,0,0,0,8.971,9.143Z" style="fill:#fef3f3"/><path d="M4,17.242c.166-.122.166-.026.349-.445l.7-1.946C3.673,14.964,3.673,16.352,4,17.242Z" style="fill:#efefef"/><path d="M5.428,27.454c-.122-.489-1.623-.925-2.2-.873C3.307,27.48,4.494,27.568,5.428,27.454Z" style="fill:#faf1f1"/>`,
|
||
"EJS": `<path d="M2,17.672V14.328l11.86-6.2V11.2L5.1,15.939l8.762,4.835v3.1Zm27.814-8.88L19.465,23.229H15.912L26.281,8.791ZM26.947,21.5a.794.794,0,0,0,.619-.278,1.061,1.061,0,0,0,.248-.732,1.141,1.141,0,0,0-.248-.753.768.768,0,0,0-1.217,0,1.141,1.141,0,0,0-.248.753,1.09,1.09,0,0,0,.237.732A.763.763,0,0,0,26.947,21.5Zm2.186,1.042a3.237,3.237,0,0,1-4.352-.01,2.864,2.864,0,0,1,0-4.1,3.223,3.223,0,0,1,4.352,0A2.773,2.773,0,0,1,30,20.486,2.74,2.74,0,0,1,29.134,22.538ZM18.821,13.061a.794.794,0,0,0,.619-.278,1.061,1.061,0,0,0,.248-.732,1.141,1.141,0,0,0-.248-.753.769.769,0,0,0-1.217,0,1.141,1.141,0,0,0-.248.753,1.09,1.09,0,0,0,.237.732A.763.763,0,0,0,18.821,13.061ZM21.007,14.1a3.237,3.237,0,0,1-4.352-.01,2.864,2.864,0,0,1,0-4.1,3.223,3.223,0,0,1,4.352,0,2.773,2.773,0,0,1,.866,2.063A2.74,2.74,0,0,1,21.007,14.1Z" style="fill:#90a93a"/>`,
|
||
"Elixir": `<defs><linearGradient id="a" x1="17.249" y1="-335.597" x2="14.973" y2="-309.994" gradientTransform="matrix(1, 0, 0, -1, 0, -306)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff" stop-opacity="0"/><stop offset="0.01" stop-color="#f7f6f8" stop-opacity="0.04"/><stop offset="0.09" stop-color="#aa9cb3" stop-opacity="0.39"/><stop offset="0.2" stop-color="#6f567e" stop-opacity="0.66"/><stop offset="0.32" stop-color="#452459" stop-opacity="0.86"/><stop offset="0.5" stop-color="#2d0843" stop-opacity="0.97"/><stop offset="1" stop-color="#26003d"/></linearGradient></defs><title>file_type_elixir</title><path d="M17.8,8.591c2.079,4.584,7.64,6.5,7.141,12.474-.582,7.017-5.551,8.784-8.316,8.909a8.815,8.815,0,0,1-9.4-7.485C5.618,15.046,12.655,3.632,16.709,2A15.083,15.083,0,0,0,17.8,8.591Zm-.166,18.857a.423.423,0,0,0-.057-.327c-.593-1.1-5.81-1.645-6.907-1.752a8.272,8.272,0,0,0,1.635,1.3,7.766,7.766,0,0,0,2.814,1.041C15.922,27.831,17.467,27.933,17.635,27.447Z" style="fill:#7c648f"/><g style="opacity:0.25"><path d="M18.248,10.618c4.47,4.823,6.445,4.979,6.237,10.478-.249,6.476-4.543,8.191-7.058,8.42-4.2.551-7.495-1.528-8.358-5.686C7.312,17.063,12.978,6.023,16.637,4.36A15.323,15.323,0,0,0,18.258,10.6Z" style="fill:#26003d"/></g><g style="opacity:0.75"><path d="M17.385,9.921C20.369,14,24.319,13.7,25,19.641c.094,6.923-3.6,9.283-6.237,9.948-4.5,1.279-8.514-.645-10.094-5-3.035-7,2.651-18.514,6.31-20.915a15.083,15.083,0,0,0,2.37,6.237Z" style="fill:url(#a)"/></g>`,
|
||
"Elm": `<path d="M16,16.768,2.768,30H29.232Z" style="fill:#5fb4cb"/><path d="M24.13,23.362,30,29.232V17.492Z" style="fill:#eea400"/><path d="M15.232,16,2,2.768V29.232Z" style="fill:#596277"/><path d="M30,14.448V2H17.552Z" style="fill:#5fb4cb"/><path d="M23.392,9.376l6.594,6.594-6.624,6.624L16.768,16ZM2.768,2,8.863,8.1H22.111L16.016,2Z" style="fill:#8cd636"/><path d="M16,15.232l6.051-6.051H9.949Z" style="fill:#eea400"/>`,
|
||
"ERB": `<path d="M7.25,24.75h17.5L12.5,12.5,7.25,17.75ZM2,30H30V2H16L2,16Zm25.375-2.625H4.625v-10.5l12.25-12.25h10.5Z" style="fill:#921a1e"/>`,
|
||
"Erlang": `<path d="M6.388,23.867a11.012,11.012,0,0,1-3.441-8.234,10.765,10.765,0,0,1,2.864-7.5H2v15.73Zm20.066,0a16.44,16.44,0,0,0,2.537-3.136l-4.218-1.873a8.306,8.306,0,0,1-6.641,4.12c-4.359-.014-6.072-3.329-6.063-7.584H28.36a6.465,6.465,0,0,0,0-.935,9.057,9.057,0,0,0-2.029-6.326H30v15.73H26.456ZM12.332,11.742a3.723,3.723,0,0,1,3.9-3.23,3.29,3.29,0,0,1,3.532,3.23Z" style="fill:#a2003e"/>`,
|
||
"F#": `<path d="M2,16,15.288,2.712V9.356L8.644,16l6.644,6.644v6.644Z" style="fill:#378bba"/><path d="M10.542,16l4.746-4.746v9.492Z" style="fill:#378bba"/><path d="M30,16,16.237,2.712V9.356L22.881,16l-6.644,6.644v6.644Z" style="fill:#30b9db"/>`,
|
||
"Firestore security rules": `<path d="M5.8,24.6l.17-.237L13.99,9.149l.017-.161-3.535-6.64a.656.656,0,0,0-1.227.207Z" style="fill:#ffc24a"/><path d="M5.9,24.42l.128-.25L13.965,9.114,10.439,2.448a.6.6,0,0,0-1.133.206Z" style="fill:#ffa712"/><path d="M16.584,14.01l2.632-2.7L16.583,6.289a.678.678,0,0,0-1.195,0L13.981,8.971V9.2Z" style="fill:#f4bd62"/><path d="M16.537,13.9,19.1,11.28,16.537,6.4a.589.589,0,0,0-1.074-.047L14.049,9.082l-.042.139Z" style="fill:#ffa50e"/><polygon points="5.802 24.601 5.879 24.523 6.158 24.41 16.418 14.188 16.548 13.834 13.989 8.956 5.802 24.601" style="fill:#f6820c"/><path d="M16.912,29.756,26.2,24.577,23.546,8.246A.635.635,0,0,0,22.471,7.9L5.8,24.6l9.233,5.155a1.927,1.927,0,0,0,1.878,0" style="fill:#fde068"/><path d="M26.115,24.534,23.483,8.326a.557.557,0,0,0-.967-.353L5.9,24.569l9.131,5.1a1.912,1.912,0,0,0,1.863,0Z" style="fill:#fcca3f"/><path d="M16.912,29.6a1.927,1.927,0,0,1-1.878,0L5.876,24.522,5.8,24.6l9.233,5.155a1.927,1.927,0,0,0,1.878,0L26.2,24.577l-.023-.14Z" style="fill:#eeab37"/><polygon points="23.201 13 15.405 16.534 15.405 27.603 21.625 24.785 21.625 31 31 26.743 31 16.534 23.201 13" style="fill:#252525"/><polygon points="23.201 14.73 16.985 17.549 16.985 20.327 23.201 17.507 29.421 20.327 29.421 17.549 23.201 14.73" style="fill:#fff"/><polygon points="23.201 19.564 16.985 22.381 16.985 25.158 23.201 22.337 29.421 25.158 29.421 22.381 23.201 19.564" style="fill:#fff"/><polygon points="28.606 26.098 25.551 24.712 23.201 25.778 23.201 28.548 28.606 26.098" style="fill:#fff"/>`,
|
||
"Flow": `<defs><linearGradient id="a" x1="-67.907" y1="-308.551" x2="-67.857" y2="-308.564" gradientTransform="matrix(87.822, 0, 0, -88.533, 5984.532, -27290.617)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd441"/><stop offset="1" stop-color="#ffb047"/></linearGradient><linearGradient id="b" x1="-67.674" y1="-310.121" x2="-67.647" y2="-310.063" gradientTransform="matrix(87.822, 0, 0, -88.533, 5964.667, -27443)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd754"/><stop offset="1" stop-color="#ffb532"/></linearGradient><linearGradient id="c" x1="-67.029" y1="-310.91" x2="-67.029" y2="-310.86" gradientTransform="matrix(87.822, 0, 0, -88.533, 5902.8, -27518.733)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd642"/><stop offset="0" stop-color="#ffd441"/><stop offset="1" stop-color="#ffb532"/></linearGradient><linearGradient id="d" x1="-66.252" y1="-310.377" x2="-66.32" y2="-310.362" gradientTransform="matrix(106.198, 0, 0, -88.551, 7048.428, -27474.167)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd441"/><stop offset="1" stop-color="#ffa829"/></linearGradient></defs><title>file_type_flow</title><path d="M23.426,29.41V22.172h-7.18l7.18,7.238" style="fill:#ffdf51;fill-opacity:0.699999988079071"/><path d="M24.231,25.306V17.477H16.466l7.766,7.829" style="fill:#ff8900;fill-opacity:0.699999988079071"/><path d="M19.515,22.171V30h7.766l-7.766-7.829" style="fill-opacity:0.699999988079071;fill:url(#a)"/><path d="M22.608,18V11.809H16.466L22.608,18" style="fill:#ffdf4f;fill-opacity:0.699999988079071"/><path d="M25.524,16.525V8.7H17.759l7.766,7.829" style="fill-opacity:0.799999952316284;fill:url(#b)"/><path d="M12.288,2V9.829h7.766L12.288,2" style="fill-opacity:0.800000011920929;fill:url(#c)"/><path d="M14.11,14.262V6.433H4.719l7.732,7.83,1.659,0" style="fill-opacity:0.879999995231628;fill:url(#d)"/><path d="M14.11,29.958V20.487H4.719l9.391,9.471" style="fill:#ffb700;fill-opacity:0.699999988079071"/><path d="M14.112,22.114V14.285H6.346l7.766,7.829" style="fill:#ffb700;fill-opacity:0.5"/><path d="M16.465,11.809v7.829h7.766l-7.766-7.829" style="fill:#ffcd25;fill-opacity:0.699999988079071"/><path d="M14.092,12.691V4.862H6.326l7.766,7.829" style="fill:#ff8900;fill-opacity:0.700000047683716"/><path d="M16.246,22.171V30h7.766l-7.766-7.829" style="fill:#ff8900;fill-opacity:0.699999988079071"/><polygon points="21.122 22.172 18.609 19.638 16.465 19.638 16.466 11.809 20.847 11.809 18.882 9.829 14.092 9.829 14.11 14.262 14.11 20.487 14.11 30 16.246 30 16.246 22.172 21.122 22.172" style="fill:#fff"/>`,
|
||
"Fortran": `<g id="g3768"><rect id="rect881" x="2.34" y="2.34" width="27.33" height="27.33" rx="5.08" style="fill:#734f96"/><path id="path1412" d="M6.06,25.5c0-1.09,0-1.19.1-1.19l1.25-.06c1,0,1.18-.06,1.42-.19a.74.74,0,0,0,.39-.37c.12-.23.12-.29.12-7.72,0-7,0-7.5-.1-7.67a1.06,1.06,0,0,0-.63-.5,10.23,10.23,0,0,0-1.38-.1l-1.17,0V5.32H25.94v8.82H24.89a8.56,8.56,0,0,1-1.2-.05c-.14,0-.15-.05-.22-.95a12.73,12.73,0,0,0-.35-2.43,3.22,3.22,0,0,0-2.63-2.81c-.57-.1-3.1-.2-5.19-.2H13.87v6.63l.75,0A6.33,6.33,0,0,0,16.49,14a1.88,1.88,0,0,0,.89-.91,5.86,5.86,0,0,0,.39-1.75c0-.33.08-.66.1-.73s0-.13,1.18-.13H20.2V21.06H17.85l0-.61a7.85,7.85,0,0,0-.54-2.66c-.36-.68-1.05-1-2.45-1.08l-.76-.07-.2,0,0,3.34c0,3.51,0,3.65.3,3.94s.43.32,3.22.42c.05,0,.07.28.07,1.19v1.18H6.06Z" style="fill:#fff"/></g>`,
|
||
"FreeMarker Template Language": `<path d="M24.023,20.9,25.408,23l4.615-7L25.408,9l-1.385,2.1L27.255,16Z" style="fill:#0050b2"/><path d="M7.977,11.1,6.592,9,1.977,16l4.615,7,1.385-2.1L4.745,16Z" style="fill:#0050b2"/><path d="M13.035,9h2.8l-.494,2.8h2.8L18.635,9h2.8l-.494,2.8h2.8l-.495,2.8h-2.8l-.493,2.8h2.8l-.494,2.8h-2.8L18.967,23h-2.8l.493-2.8-2.8,0L13.375,23H10.567l.493-2.8-2.8,0,.494-2.8h2.8l.493-2.793h-2.8L9.741,11.8h2.8Zm1.319,8.4h2.8l.494-2.8h-2.8Z" style="fill:#0050b2"/>`,
|
||
"GameMaker Language": `<path d="M14.216,24.167h-.989a3.24,3.24,0,0,1-2.811-1.649L6.667,16l4.681-8.167H16.2l-4.34,8.176.057.032L13.936,19.5H16.82ZM8.455,10.535l-1.27-2.21a1,1,0,0,0-.859-.492H2l4,6.992ZM21.54,9.482a3.239,3.239,0,0,0-2.812-1.649H17.523L15.045,12.5H18.02L20.083,16l-4.531,8.167h5.056L25.333,16ZM26,17.172l-2.47,4.27,1.283,2.233a1,1,0,0,0,.859.492H30Z" style="fill:#8bc34a"/>`,
|
||
"G-code": `<path d="M17.333,16.356h0L17.309,20.8l-2.1-1.018.023-4.437h0l10.558-3.038,2.106,1.013Z" style="fill:#8e0000"/><path d="M24.492,18.576a14.909,14.909,0,0,1-1.343,3.074,7.86,7.86,0,0,1-1.39,1.829,6.8,6.8,0,0,1-1.7,1.324,7.405,7.405,0,0,1-2.006.855,6,6,0,0,1-3.072.23A4.668,4.668,0,0,1,12.44,24.64a5.322,5.322,0,0,1-.636-.629l-.508-.244a4.717,4.717,0,0,0,.457.181,5.52,5.52,0,0,1-1.015-1.758,8.135,8.135,0,0,1-.43-1.533c-.023-.131-.043-.239-.061-.34a7.292,7.292,0,0,0,.377,1.354,5.836,5.836,0,0,0,1.614,2.319c.06.054.127.1.19.148.04.008.078.022.119.029a6.454,6.454,0,0,0,2.928-.219,8.4,8.4,0,0,0,1.91-.807,7.658,7.658,0,0,0,1.589-1.227,8.662,8.662,0,0,0,1.29-1.69,12.667,12.667,0,0,0,1.019-2.194L23.3,19c.056-.153.091-.254.091-.254Z" style="fill:#8e0000"/><path d="M24.524,4.013a11.6,11.6,0,0,0-6.588-1.994,13.8,13.8,0,0,0-9.373,4.84A18.243,18.243,0,0,0,4,18.8c.021,3.851,1.481,7.806,5.112,9.575a13.563,13.563,0,0,0,4.159,1.564,12.114,12.114,0,0,0,6.869-1.529c-2.734,1.333-6.12,1.993-8.894.4-2.689-1.543-3.983-4.724-4.221-7.7-.512-6.4,3.1-13.64,9.132-16.281,3.512-1.537,7.307-1.585,10.239,1.1C26.727,5.244,25,4.305,24.524,4.013Zm-14.359,24.8-.138-.093Z" style="fill:#8e0000"/><path d="M22.529,26.788c-3.044,2.582-7.92,4.149-11.554,1.857C7.24,26.289,6.53,21.089,7.212,17.083a17.218,17.218,0,0,1,6.7-10.97c3.771-2.636,8.88-3.49,12.489-.182l-2.27,3.291c-2.51-2.355-6.3-1.956-8.945-.052A12.434,12.434,0,0,0,10.5,16.2c-.662,2.623-.5,6.011,1.5,8.047,2.088,2.129,5.112,2.116,7.656.8A10.334,10.334,0,0,0,24.5,18.636L17.307,20.8l.022-4.438L27.89,13.319l.1.806h0A16.625,16.625,0,0,1,22.529,26.788Z" style="fill:#ba0000"/>`,
|
||
"GDScript": `<path d="M28.166,21.029v1.652a.374.374,0,0,1-.26.357l-2.6.841a.367.367,0,0,1-.335-.054.374.374,0,0,1-.155-.3v-1.8l-2.438.464V24.02a.375.375,0,0,1-.325.371l-3.525.483c-.016,0-.034,0-.051,0A.374.374,0,0,1,18.1,24.5V22.557l-1.819.008h-.267l-1.819-.008V24.5a.375.375,0,0,1-.375.376c-.017,0-.034,0-.052,0l-3.525-.483a.375.375,0,0,1-.324-.371V22.184l-2.439-.464v1.8a.374.374,0,0,1-.154.3.37.37,0,0,1-.336.054l-2.6-.841a.374.374,0,0,1-.259-.357V21.029l-1.608-.541a4.558,4.558,0,0,0-.124,1.04c0,4.317,6.082,7.65,13.6,7.674h.019c7.517-.024,13.6-3.356,13.6-7.674a4.54,4.54,0,0,0-.1-.95Z" fill="#478cbf"/><path d="M3.711,13.373V20.1l.907.306a.374.374,0,0,1,.256.355v1.65l1.855.6V21.267a.376.376,0,0,1,.445-.369l3.189.609a.374.374,0,0,1,.305.368v1.818l2.775.379v-1.89a.374.374,0,0,1,.376-.375h0l2.327.009,2.326-.009a.374.374,0,0,1,.377.375v1.89l2.775-.379V21.874a.373.373,0,0,1,.3-.368l3.189-.609a.377.377,0,0,1,.446.369v1.741l1.855-.6V20.76a.374.374,0,0,1,.255-.355l.618-.208V13.373h.017A26.792,26.792,0,0,0,30,10.931a19.02,19.02,0,0,0-2.509-3.288A24.507,24.507,0,0,0,25,9.091a13.01,13.01,0,0,0-1.279-1.052,15.365,15.365,0,0,0-1.375-.894,28.353,28.353,0,0,0,.232-3.071A15.968,15.968,0,0,0,18.847,2.8a26.44,26.44,0,0,0-1.385,2.7,9.46,9.46,0,0,0-1.453-.116h-.018a9.457,9.457,0,0,0-1.454.116,26.275,26.275,0,0,0-1.385-2.7A15.961,15.961,0,0,0,9.422,4.075a28.142,28.142,0,0,0,.232,3.071,15.312,15.312,0,0,0-1.376.894A13.06,13.06,0,0,0,7,9.091a24.553,24.553,0,0,0-2.49-1.448A19.02,19.02,0,0,0,2,10.931a26.792,26.792,0,0,0,1.694,2.443Z" fill="#478cbf"/><path d="m12.462 16.6a2.739 2.739 0 1 1-2.74-2.738 2.739 2.739 0 0 1 2.74 2.738" fill="#fff"/><path d="m11.8 16.764a1.819 1.819 0 1 1-1.819-1.819 1.817 1.817 0 0 1 1.819 1.819" fill="#414042"/><path d="M16.166,19.59a.844.844,0,0,1-.882-.8V16.267a.886.886,0,0,1,1.764,0v2.522a.845.845,0,0,1-.883.8" fill="#fff"/><path d="m19.871 16.6a2.739 2.739 0 1 0 2.74-2.738 2.739 2.739 0 0 0-2.74 2.738" fill="#fff"/><path d="m20.531 16.764a1.818 1.818 0 1 0 1.817-1.819 1.817 1.817 0 0 0-1.817 1.819" fill="#414042"/>`,
|
||
"Git": `<path d="M29.472,14.753,17.247,2.528a1.8,1.8,0,0,0-2.55,0L12.158,5.067l3.22,3.22a2.141,2.141,0,0,1,2.712,2.73l3.1,3.1a2.143,2.143,0,1,1-1.285,1.21l-2.895-2.895v7.617a2.141,2.141,0,1,1-1.764-.062V12.3a2.146,2.146,0,0,1-1.165-2.814L10.911,6.314,2.528,14.7a1.8,1.8,0,0,0,0,2.551L14.753,29.472a1.8,1.8,0,0,0,2.55,0L29.472,17.3a1.8,1.8,0,0,0,0-2.551" style="fill:#dd4c35"/><path d="M12.158,5.067l3.22,3.22a2.141,2.141,0,0,1,2.712,2.73l3.1,3.1a2.143,2.143,0,1,1-1.285,1.21l-2.895-2.895v7.617a2.141,2.141,0,1,1-1.764-.062V12.3a2.146,2.146,0,0,1-1.165-2.814L10.911,6.314" style="fill:#fff"/>`,
|
||
"GLSL": `<path d="M7.779,18.923A2.333,2.333,0,0,1,5.4,17.16c.306,1.462,1.961,2.892,7.183,3.529a14.228,14.228,0,0,0,9.232-1.612s.733-.322.293.176c0,0-3.107,2.873-9.2,2.9S1.97,19.107,2,16c-.029-3.107,4.806-6.185,10.9-6.155s9.2,2.9,9.2,2.9c.44.5-.293.176-.293.176-1.084-.7-4.286-2.089-9.232-1.612-4.866.469-6.453,2.122-6.981,3.235a3.254,3.254,0,0,0-.318,1.24,2.424,2.424,0,0,1,2.5-2.316A2.507,2.507,0,0,1,10.3,16.195,2.506,2.506,0,0,1,7.779,18.92Zm19.647-1.074H30v.937H26.344V13.609h1.082v4.24ZM23.454,16h2.163v2.791H24.9l-.108-.649a1.9,1.9,0,0,1-1.614.786,2.414,2.414,0,0,1-2.379-2.711,2.485,2.485,0,0,1,2.531-2.74A2.053,2.053,0,0,1,25.6,15.217H24.515a1.136,1.136,0,0,0-1.132-.851c-.771,0-1.485.534-1.485,1.86,0,1.413.771,1.781,1.506,1.781a1.28,1.28,0,0,0,1.254-1.139h-1.2V16ZM7.781,14.1a1.86,1.86,0,0,0-1.8,2.105,1.86,1.86,0,0,0,1.8,2.105,1.86,1.86,0,0,0,1.8-2.105A1.86,1.86,0,0,0,7.781,14.1Zm2.911,1.383h.525v.468h.013a1.12,1.12,0,0,1,.987-.563,1.565,1.565,0,0,1,1.506,1.677,1.675,1.675,0,0,1-1.583,1.824,1,1,0,0,1-.88-.443h-.013V20.1h-.557V15.479ZM12.1,18.4c.608,0,1.019-.527,1.019-1.254,0-.424-.171-1.264-1.032-1.264-.8,0-.893.867-.893,1.406,0,.88.551,1.114.905,1.114Zm5-.652a1.378,1.378,0,0,1-1.488,1.133,1.487,1.487,0,0,1-1.482-1.658c0-1.025.494-1.842,1.588-1.842.956,0,1.424.76,1.424,1.931H14.721c0,.69.323,1.089.962,1.089a.841.841,0,0,0,.854-.652H17.1Zm-.59-.88c-.032-.513-.247-.987-.924-.987a.972.972,0,0,0-.918.987h1.842Zm3.713,1.917h-.557V16.751c0-.576-.165-.867-.709-.867-.317,0-.874.2-.874,1.1v1.8h-.557V15.479h.525v.468h.013a1.2,1.2,0,0,1,1-.563,1.046,1.046,0,0,1,1.158,1.152v2.253" style="fill:#4386b5"/>`,
|
||
"Go module": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 254.5 225"><title>file_type_go_package</title><path d="M61.949,13.068c16.06-.147,32.143,0,48.211-.062-3.81,16.408-7.466,32.862-11.261,49.277H25.548c-2.319,0-4.637.077-6.956-.093C33,45.775,47.566,29.5,61.949,13.068Z" style="fill:#f2e6c9"/><path d="M143.509,13.014h48.072c14.437,16.431,29.013,32.723,43.411,49.177-9.274.193-18.549,0-27.823.085H154.654C151.006,45.837,147.111,29.46,143.509,13.014Z" style="fill:#f2e6c9"/><path d="M110.16,13.014h33.349c3.6,16.446,7.489,32.823,11.16,49.254H98.9C102.694,45.868,106.35,29.422,110.16,13.014Z" style="fill:#efc75e"/><path d="M18.592,62.183c2.319.17,4.637.085,6.956.093H98.9q0,26.026.054,52.052a18.857,18.857,0,0,0,1.979.139h52.114a14.693,14.693,0,0,0,1.546-.108c.147-17.366,0-34.732.07-52.1h52.516c9.274-.046,18.549.108,27.823-.085V212.62H18.6Q18.592,137.405,18.592,62.183Z" style="fill:#e7bf55"/><path d="M98.9,62.291h55.769c-.062,17.366.085,34.732-.07,52.1-.518.054-1.036.093-1.546.108H100.94a18.857,18.857,0,0,1-1.971-.131C98.861,96.993,98.969,79.634,98.9,62.291Z" style="fill:#dbb551"/><rect x="34.389" y="163.682" width="72.417" height="27.885" style="fill:#f2f2f2"/><path d="M61.422,137.085c-.388,0-.487-.194-.291-.487l2.041-2.625a1.393,1.393,0,0,1,1.069-.487h34.7c.388,0,.487.291.291.584L97.582,136.6a1.481,1.481,0,0,1-.972.584Z" style="fill:#ce3262"/><path d="M46.74,146.028c-.388,0-.487-.194-.291-.487l2.041-2.625a1.393,1.393,0,0,1,1.069-.487H93.89a.447.447,0,0,1,.487.584l-.778,2.333a.85.85,0,0,1-.875.584Z" style="fill:#ce3262"/><path d="M70.264,154.971c-.388,0-.487-.291-.291-.584l1.357-2.43a1.289,1.289,0,0,1,.972-.584H91.747c.388,0,.584.291.584.681l-.194,2.333a.731.731,0,0,1-.681.681Z" style="fill:#ce3262"/><path d="M171.163,135.335c-6.124,1.556-10.3,2.722-16.33,4.28-1.462.388-1.556.487-2.819-.972a13.011,13.011,0,0,0-4.569-3.694c-6.124-3.013-12.054-2.138-17.594,1.462a20.671,20.671,0,0,0-9.918,18.469,15.242,15.242,0,0,0,13.123,15.261c6.61.875,12.151-1.462,16.525-6.415.875-1.069,1.653-2.236,2.625-3.6H133.446c-2.041,0-2.528-1.263-1.847-2.916,1.263-3.013,3.6-8.068,4.958-10.6a2.625,2.625,0,0,1,2.43-1.556h35.384c-.194,2.625-.194,5.249-.584,7.874a41.456,41.456,0,0,1-7.967,19.042c-6.995,9.234-16.136,14.97-27.7,16.525-9.526,1.263-18.374-.584-26.148-6.415A30.533,30.533,0,0,1,99.625,160.51c-1.263-10.6,1.847-20.122,8.262-28.481A43.137,43.137,0,0,1,135.1,115.212c9.137-1.653,17.886-.584,25.76,4.763A30.471,30.471,0,0,1,172.14,133.68C172.719,134.558,172.33,135.044,171.163,135.335Z" style="fill:#ce3262"/><path d="M203.338,189.09c-8.846-.194-16.913-2.722-23.719-8.554a30.485,30.485,0,0,1-10.5-18.761c-1.75-10.984,1.263-20.7,7.874-29.356,7.1-9.331,15.651-14.192,27.218-16.233,9.918-1.75,19.247-.778,27.7,4.958,7.68,5.249,12.442,12.345,13.706,21.676,1.653,13.123-2.138,23.816-11.179,32.953a44.542,44.542,0,0,1-23.329,12.442C208.49,188.7,205.866,188.8,203.338,189.09Zm23.135-39.271a27.978,27.978,0,0,0-.291-3.208,16.013,16.013,0,0,0-18.375-13.235q-.734.119-1.454.306c-9.04,2.041-14.873,7.777-17.011,16.913a16.009,16.009,0,0,0,8.943,18.374,17.82,17.82,0,0,0,15.845-.584c7.679-3.985,11.859-10.206,12.348-18.566Z" style="fill:#ce3262"/></svg>`,
|
||
"Go": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 254.5 225"><title>file_type_go</title><path d="M-46.926,89c-.621,0-.777-.311-.466-.777l3.262-4.194a2.225,2.225,0,0,1,1.708-.777H13.026c.621,0,.777.466.466.932l-2.64,4.038a2.367,2.367,0,0,1-1.553.932Z" style="fill:#00acd7"/><path d="M-70.379,103.285c-.621,0-.777-.311-.466-.777l3.262-4.194a2.225,2.225,0,0,1,1.708-.777H4.95a.714.714,0,0,1,.777.932L4.484,102.2a1.358,1.358,0,0,1-1.4.932Z" style="fill:#00acd7"/><path d="M-32.792,117.574c-.621,0-.777-.466-.466-.932l2.174-3.883a2.06,2.06,0,0,1,1.553-.932H1.533c.621,0,.932.466.932,1.087l-.311,3.728a1.167,1.167,0,0,1-1.087,1.087Z" style="fill:#00acd7"/><path d="M128.426,86.2c-9.785,2.485-16.464,4.349-26.093,6.834-2.33.621-2.485.777-4.5-1.553-2.33-2.64-4.038-4.349-7.3-5.9-9.785-4.815-19.259-3.417-28.112,2.33-10.561,6.834-16,16.929-15.842,29.51.155,12.425,8.7,22.676,20.968,24.385,10.561,1.4,19.414-2.33,26.4-10.251,1.4-1.708,2.64-3.572,4.194-5.747H68.163c-3.262,0-4.038-2.019-2.951-4.659,2.019-4.815,5.747-12.891,7.921-16.929a4.194,4.194,0,0,1,3.883-2.485h56.535c-.311,4.194-.311,8.387-.932,12.581a66.239,66.239,0,0,1-12.736,30.442C108.7,159.51,94.1,168.673,75.618,171.158c-15.221,2.019-29.355-.932-41.78-10.251a48.785,48.785,0,0,1-19.725-34.48c-2.019-16.929,2.951-32.15,13.2-45.508C38.342,66.475,52.942,57.312,70.8,54.05c14.6-2.64,28.578-.932,41.159,7.61a48.686,48.686,0,0,1,18.017,21.9C130.911,84.958,130.289,85.735,128.426,86.2Z" style="fill:#00acd7"/><path d="M179.835,172.09c-14.134-.311-27.025-4.349-37.9-13.668a48.711,48.711,0,0,1-16.774-29.976c-2.8-17.551,2.019-33.082,12.581-46.905,11.338-14.91,25.006-22.676,43.488-25.938,15.842-2.8,30.753-1.243,44.265,7.921,12.27,8.387,19.88,19.725,21.9,34.635,2.64,20.968-3.417,38.052-17.861,52.652a71.17,71.17,0,0,1-37.276,19.88C188.067,171.469,183.874,171.624,179.835,172.09ZM216.8,109.343a44.7,44.7,0,0,0-.466-5.125c-2.8-15.376-16.929-24.074-31.684-20.657-14.444,3.262-23.763,12.425-27.18,27.025a25.579,25.579,0,0,0,14.289,29.355c8.542,3.728,17.085,3.262,25.317-.932C209.345,132.64,216.024,122.7,216.8,109.343Z" style="fill:#00acd7"/></svg>`,
|
||
"Gradle": `<path d="M13.5,6.965h7.923l4,6.887H29.98A14.1,14.1,0,0,0,11.024,2.932L13.5,6.965" style="fill:#006533"/><path d="M25.628,18l-4.209,7.252H10.806L5.5,16.108,9.739,8.8,7.4,4.981A14.03,14.03,0,1,0,30,18H25.628" style="fill:#82b816"/><path d="M21.061,15.963a5.026,5.026,0,1,1-5.026-5,5.013,5.013,0,0,1,5.026,5" style="fill:#006532"/>`,
|
||
"GraphQL": `<rect x="-0.43" y="12.534" width="22.901" height="1.187" transform="translate(-5.858 16.107) rotate(-59.999)" style="fill:#e10098"/><rect x="4.545" y="21.162" width="22.902" height="1.187" style="fill:#e10098"/><rect x="10.43" y="18.008" width="1.187" height="13.227" transform="translate(-15.812 21.857) rotate(-59.999)" style="fill:#e10098"/><rect x="20.381" y="0.771" width="1.187" height="13.227" transform="translate(4.092 21.856) rotate(-59.999)" style="fill:#e10098"/><rect x="4.412" y="6.787" width="13.227" height="1.187" transform="translate(-2.213 6.502) rotate(-30.001)" style="fill:#e10098"/><rect x="20.389" y="1.677" width="1.187" height="22.901" transform="translate(-3.753 12.25) rotate(-30.001)" style="fill:#e10098"/><rect x="5.454" y="9.386" width="1.187" height="13.228" style="fill:#e10098"/><rect x="25.36" y="9.386" width="1.187" height="13.228" style="fill:#e10098"/><rect x="15.222" y="24.097" width="11.504" height="1.037" transform="translate(-9.498 13.785) rotate(-30.001)" style="fill:#e10098"/><path d="M28.12,23a2.5,2.5,0,1,1-.915-3.411A2.5,2.5,0,0,1,28.12,23" style="fill:#e10098"/><path d="M8.2,11.5a2.5,2.5,0,1,1-.915-3.411A2.5,2.5,0,0,1,8.2,11.5" style="fill:#e10098"/><path d="M3.88,23a2.5,2.5,0,1,1,3.411.915A2.5,2.5,0,0,1,3.88,23" style="fill:#e10098"/><path d="M23.8,11.5a2.5,2.5,0,1,1,3.411.915A2.5,2.5,0,0,1,23.8,11.5" style="fill:#e10098"/><path d="M16,30a2.5,2.5,0,1,1,2.5-2.5A2.493,2.493,0,0,1,16,30" style="fill:#e10098"/><path d="M16,6.991a2.5,2.5,0,1,1,2.5-2.5,2.493,2.493,0,0,1-2.5,2.5" style="fill:#e10098"/>`,
|
||
"Groovy": `<path d="M7.453,29.865c0-.074.494-1.717,1.1-3.651A21.808,21.808,0,0,0,9.5,22.6c-.079-.056-.35.045-.6.224-.764.538-.92.4-1.491-1.356-.617-1.9-.639-2.091-.317-2.81.21-.47.2-.579-.147-1.277a3.75,3.75,0,0,1-.377-1.044c0-.26-1.413-1.438-3.647-3.04A3.845,3.845,0,0,1,2,12.5a10.477,10.477,0,0,1,2.378-.039l2.378.1.232-.741c.981-3.13,2.463-5.957,3.122-5.957.137,0,.416.265.619.588.331.527.376.853.435,3.126a23.013,23.013,0,0,0,.165,2.739c.055.11.228-.035.385-.322.2-.367.412-.467.71-.335s.485.043.646-.345c.242-.582,1.455-4.513,1.455-4.717,0-.069.24-.9.534-1.846s.631-2.036.751-2.424c.213-.688.246-.607,1.524,3.726,1.32,4.474,2.03,6.124,2.385,5.544.248-.4,1.55-.428,1.914-.034.207.224.338.221.453-.01.237-.48.8-.4.953.14.117.423.147.423.32,0a.812.812,0,0,1,.692-.466c.389,0,.538.164.666.735l.165.735,2.558-.183A11.521,11.521,0,0,1,30,12.468a20.79,20.79,0,0,1-2.321,1.889c-1.277.96-2.342,1.775-2.368,1.81a17.607,17.607,0,0,0,.128,1.867,11.075,11.075,0,0,1-.544,5.713,4.308,4.308,0,0,1-1.021,1.49c-.278.186-.506.4-.506.486s.3,1.077.66,2.212A9.682,9.682,0,0,1,24.568,30c-.109,0-2.757-2.07-6.876-5.373a11.143,11.143,0,0,0-1.643-1.184c-.171,0-1.649,1.133-5.984,4.588-2.514,2-2.612,2.073-2.612,1.835Zm5.158-4.727c1.337-1.051,2.664-2.078,2.947-2.282.488-.351.651-.263,3.021,1.631,1.378,1.1,2.737,2.174,3.021,2.384s.868.666,1.3,1.013c.491.4.742.492.674.256-.77-2.634-.793-2.678-1.327-2.476-.644.244-1.043-.006-1.249-.783a1.739,1.739,0,0,1,.24-1.451,2.377,2.377,0,0,0-.221-2.731,4.289,4.289,0,0,1-.686-1.53l-.241-1.023-.517.71c-.636.873-1.411.918-2.059.119l-.477-.588-.554.762c-.555.763-1.194.862-1.844.284-.179-.159-.258-.1-.258.2a1.24,1.24,0,0,1-.375.777c-.619.57-1.223.419-1.633-.409L12,19.249l-.3.775a7.032,7.032,0,0,1-.853,1.479,13.891,13.891,0,0,0-1.455,3.663c-.5,1.627-.9,3.042-.9,3.143s.381-.141.847-.538,1.942-1.582,3.279-2.633Zm11.343-1.131c1.015-1.154,1.25-3.288.8-7.271-.375-3.329-.562-4.419-.784-4.565-.154-.1-.177.01-.091.426.562,2.7.593,4.053.1,4.434-.337.262-.695-.719-.976-2.675-.218-1.515-.445-2.2-.617-1.85a3.359,3.359,0,0,0,.16,1.07,26.718,26.718,0,0,1,.394,3.381,21.757,21.757,0,0,0,.375,3.151c.309.985.8.747,1.118-.54s.35-.425.044,1.055c-.317,1.536-1.26,2-2.352,1.15-.175-.136-.234,0-.234.555a4.988,4.988,0,0,1-.3,1.5l-.3.765.408.139A2.247,2.247,0,0,0,23.954,24.007ZM9.346,21.468c2.118-1.232,2.5-2.668,1.793-6.805a21.941,21.941,0,0,1-.3-2.3c0-1.029-.256-.554-.448.832-.254,1.832-1.016,3.389-1.657,3.383-.557-.005-.738-.21-.968-1.094-.413-1.585.037-4.018,1.184-6.406.84-1.749,1.3-1.908,1.3-.448,0,2.276-.776,5.625-1.184,5.115a3.814,3.814,0,0,1,.065-2.2c.2-.72.157-1.818-.066-1.818-.259,0-.773,1.91-.841,3.127-.06,1.076-.022,1.338.231,1.612.888.962,2.052-1.973,2.111-5.323.031-1.759-.138-2.254-.674-1.982-.781.4-2.883,5.883-2.883,7.523,0,1.283.319,2.186.88,2.491.954.519,1.876-.4,2.529-2.531l.275-.894V14.97c0,1.759-.567,2.686-2.357,3.852a8.893,8.893,0,0,0-.852.6,9.758,9.758,0,0,0,.892,2.534,5.283,5.283,0,0,0,.969-.484Zm12.764-2.184c.213-.475.25-.992.2-2.817-.05-1.986-.1-2.337-.486-3.144-.691-1.458-1.544-1.086-1.045.455.265.82.589.68.475-.205-.091-.7.079-.723.375-.041.556,1.281.416,3.055-.242,3.055-.45,0-.59-.39-.883-2.459a6.752,6.752,0,0,0-.362-1.714c-.217,0-.314.388-.179.718a28.23,28.23,0,0,1,.452,2.859c.441,3.507,1.057,4.707,1.69,3.293Zm-8.38.056a3.385,3.385,0,0,0,.095-1.33c-.06-1.008-.094-1.081-.364-.79-.387.419-.8-.375-.944-1.8-.107-1.082-.14-1.061.64-.415.1.081.346-.194.553-.611.377-.763.5-1.68.228-1.68-.081,0-.147.134-.147.3,0,.429-.4.368-.494-.075-.053-.258-.166-.167-.367.3-.16.369-.356.671-.434.671s-.185-.3-.237-.671c-.09-.646-.1-.65-.3-.113a.951.951,0,0,0-.01.964,18.818,18.818,0,0,1,.521,3.791c0,1.174.8,2.1,1.267,1.463Zm2.688-1.556a7.055,7.055,0,0,0,.416-4.259c-.236-1.141-.645-1.568-1.222-1.275-.429.218-1.082,2.746-1.084,4.2,0,2.262,1.06,3.015,1.89,1.337Zm-1.007-1.792a3.77,3.77,0,0,1-.29-1.416c0-.745.022-.772.2-.3.22.586.611.688.761.2a1.035,1.035,0,0,0-.065-.656c-.232-.469-.2-1.107.049-1.107.28,0,.672,1.154.672,1.982,0,.609-.613,1.893-.9,1.893-.07,0-.26-.268-.422-.6ZM19.348,17.7a6.447,6.447,0,0,0-.141-4.918c-.358-.773-1.153-.906-1.479-.248a11.607,11.607,0,0,0-.489,3.895C17.477,18.348,18.716,19.1,19.348,17.7ZM18.1,15.527a2.492,2.492,0,0,1-.318-1.565c.008-.909.031-.991.135-.472.153.764.473,1.052.753.679.174-.231.166-.341-.05-.676-.288-.447-.344-1.079-.1-1.079a5.037,5.037,0,0,1,1.017,2.25c0,.48-.564,1.327-.884,1.327C18.527,15.991,18.276,15.782,18.1,15.527Zm8.662-1.318,1.547-1.175-1.658-.012c-1.484-.011-1.658.043-1.656.51a11.532,11.532,0,0,0,.2,1.857c.011,0,.716-.534,1.567-1.18ZM6.535,14l.158-.949L5.3,12.956c-.764-.052-1.389-.012-1.389.088a14.1,14.1,0,0,0,2.447,1.934C6.371,14.961,6.448,14.521,6.535,14Zm9.526-2.941a1.624,1.624,0,0,1,.819.6c.192.349.276.326.573-.163.191-.315.44-.572.553-.572s.2-.066.2-.146c0-.278-2.122-7.306-2.2-7.3s-2.27,7.386-2.337,7.925c-.028.226.06.309.231.219.152-.081.363.063.468.319.17.415.24.382.644-.306.384-.654.544-.742,1.048-.579Z" style="fill:#333"/><path d="M14.5,12.175a.85.85,0,0,1-.115-.2.737.737,0,0,0-.194-.29.281.281,0,0,0-.3-.061c-.087.035-.111.039-.15.024-.065-.026-.089-.106-.07-.242.023-.169.2-.825.548-2.054.711-2.5,1.666-5.646,1.772-5.839.012-.021.012-.021.024,0,.063.114.432,1.266.937,2.922.682,2.24,1.25,4.21,1.25,4.339,0,.079-.06.127-.186.147-.157.026-.339.212-.587.6a1.674,1.674,0,0,1-.226.31c-.048.046-.052.048-.1.048s-.056,0-.1-.043a.958.958,0,0,1-.1-.144,1.268,1.268,0,0,0-.414-.422,1.525,1.525,0,0,0-.738-.281.434.434,0,0,0-.4.156,2.718,2.718,0,0,0-.416.6c-.257.425-.348.513-.441.426Z" style="fill:#6398aa"/><path d="M6.252,14.928a19.055,19.055,0,0,1-2.3-1.838c-.031-.038-.034-.044-.025-.057a2.7,2.7,0,0,1,1.14-.085c.23.012,1.619.1,1.621.108s-.3,1.779-.321,1.881C6.357,14.981,6.337,14.979,6.252,14.928Z" style="fill:#6398aa"/><path d="M25.177,15.35A14.239,14.239,0,0,1,25,13.56a.553.553,0,0,1,.044-.29c.081-.151.245-.205.7-.23.228-.013,1.281-.015,2.025,0l.521.008L27.029,14c-1.144.867-1.81,1.369-1.834,1.382-.006,0-.012-.006-.018-.027h0Z" style="fill:#6398aa"/><path d="M8.506,28.281c0-.071.149-.6.527-1.878.905-3.057,1.319-4.165,1.827-4.892a7.664,7.664,0,0,0,.969-1.792L12,19.292l.225.448c.394.784.632,1.011,1.062,1.016a1.239,1.239,0,0,0,1.1-1.137c0-.124.044-.251.086-.251a1.119,1.119,0,0,1,.226.14,1.271,1.271,0,0,0,.666.3.879.879,0,0,0,.609-.148,2.47,2.47,0,0,0,.711-.764c.187-.252.347-.459.354-.459s.143.159.3.352a5.091,5.091,0,0,0,.422.467,1.049,1.049,0,0,0,1.549-.08,6.111,6.111,0,0,0,.467-.572c.168-.228.307-.41.31-.4s.066.269.141.584.169.67.209.789a3.826,3.826,0,0,0,.642,1.234,2.17,2.17,0,0,1,.466,1.246,3.051,3.051,0,0,1-.352,1.447,2.07,2.07,0,0,0-.267.934,2.017,2.017,0,0,0,.213.851.773.773,0,0,0,1.069.413,1.351,1.351,0,0,1,.316-.068c.2,0,.315.193.542.881.157.474.5,1.637.5,1.695,0,.03-.016.051-.039.051a1.486,1.486,0,0,1-.407-.224c-.2-.144-2.612-2.029-3.408-2.663-2.128-1.693-2.828-2.233-3.171-2.446-.37-.23-.622-.285-.827-.177-.254.133-3.726,2.847-5.751,4.5A10.846,10.846,0,0,1,8.65,28.251c-.149.083-.143.081-.143.03Z" style="fill:#6398aa"/>`,
|
||
"Haml": `<path d="M15.311,16.043,13.4,29.726a6.322,6.322,0,0,1-5.956-1.25l3.1-13.266L4.69,3.34a8.031,8.031,0,0,1,3.79-.646l5.144,9.7,8.914-7.581s3,1.041,3.27,2.041l-10.5,9.184Z" style="fill:#ecdfa7"/><path d="M27.016,17.411a4.244,4.244,0,0,0-.541-.812,5.7,5.7,0,0,0-1.458-1.187,7.331,7.331,0,0,0-1.687-.791l-.229-.062-.187-.062c-.125-.042-.229-.1-.333-.146a1.282,1.282,0,0,1-.458-.417A1.754,1.754,0,0,1,22,12.642a2.518,2.518,0,0,1,.1-.375c.042-.125.083-.25.125-.4a2.691,2.691,0,0,0,.062-.6l.1-.083,1.25-1.041c.229-.187.458-.4.687-.583a2.2,2.2,0,0,1,.229.146s.646.062,1-.916l-.187-.125.125-.1.312-.271a.613.613,0,0,0,.229-.375.529.529,0,0,0-.417.125l-.333.25-.229.167L22.184,6.478c.146-.125.271-.229.417-.354l.6-.541.062-.062c.062.042.1.083.167.125.146.1.312.208.458.292l.916.5c.292.167.6.333.916.479a3.323,3.323,0,0,0,.479.208c.083.021.167.062.25.083.042,0,.1.021.146.021h.1a.151.151,0,0,0,.125-.083V7.123a.077.077,0,0,1,.021-.062V6.977a.108.108,0,0,0-.042-.083c-.021-.042-.062-.083-.083-.125a1.59,1.59,0,0,0-.187-.187c-.125-.125-.271-.229-.4-.333-.271-.208-.562-.4-.854-.583a7.545,7.545,0,0,0-.9-.5,3.323,3.323,0,0,0-.479-.208c-.083-.021-.167-.062-.271-.083-.042,0-.1-.021-.167-.021a.31.31,0,0,0-.125.021.522.522,0,0,0-.167.1,1.6,1.6,0,0,0-.375.208l-.625.354c-.187.146-.4.312-.583.458l-.208-.146s-.875.083-.583.646l.083.083c-.833.687-1.645,1.4-2.457,2.083-.833.708-1.645,1.416-2.478,2.145l-1.229,1.083a1.878,1.878,0,0,1-.208.187c-.042-.125-.1-.229-.146-.333l-.292-.625-.562-1.25c-.375-.833-.75-1.666-1.145-2.5L11.209,4.895l-.187-.375h.25s.083-.687-.417-.812a1.4,1.4,0,0,0-.208.021c-.187-.375-.354-.75-.541-1.125h0l-.083-.312A.33.33,0,0,0,9.9,2.1a.352.352,0,0,0-.1-.042c-.062-.021-.1-.021-.167-.042A1.281,1.281,0,0,0,9.355,2a4.057,4.057,0,0,0-.521.042,8.767,8.767,0,0,0-1.02.187c-.333.083-.666.167-1,.271a3.272,3.272,0,0,0-.479.187l-.25.125c-.042.021-.083.062-.125.083L5.9,2.958c-.021.021-.021.042-.042.062v.062h0V3.1a.164.164,0,0,0,.1.125c.042.021.062.042.083.042a1.327,1.327,0,0,1,.146.042,1.188,1.188,0,0,0,.271.021,4.384,4.384,0,0,0,.521-.042c.333-.042.687-.083,1.02-.146l1.02-.167c.167-.021.333-.062.521-.1.146.292.292.6.437.9-.958.083-2.457.208-3.395.312-.1-.187-.187-.354-.292-.541a.127.127,0,0,0-.146-.062.108.108,0,0,0-.062.146c.062.167.125.312.187.479a1.167,1.167,0,0,0-.5.125A1.828,1.828,0,0,0,6.4,5.645a3.567,3.567,0,0,1,.458-.125l.437,1,1.25,2.832,1.27,2.832c.417.937.854,1.874,1.291,2.832h0a.02.02,0,0,0,.021.021l-.187.625-.5,1.749c-.312,1.166-.6,2.353-.9,3.52L9.105,22.7l-.417,1.77c-.292,1.187-.562,2.353-.9,3.52a.125.125,0,0,0,.021.083,3.076,3.076,0,0,0,.6.562,6.048,6.048,0,0,0,.687.417,9.4,9.4,0,0,0,1.5.6,6.972,6.972,0,0,0,1.624.271,3.728,3.728,0,0,0,.833-.042,6.547,6.547,0,0,0,.833-.167.254.254,0,0,0,.167-.187v-.021c.229-1.145.417-2.312.625-3.457l.583-3.478c.187-1.166.4-2.312.583-3.478.021-.125.042-.271.062-.4.042.042.062.1.1.146a4.137,4.137,0,0,0,.708.646,7.212,7.212,0,0,0,1.583.833,11.774,11.774,0,0,0,1.666.5,10.182,10.182,0,0,0,1.1.187,2.621,2.621,0,0,0-.25,1.208.115.115,0,0,0,.062.1h.021a5.164,5.164,0,0,0,1.27.479,4.333,4.333,0,0,0,1.375.062,2.627,2.627,0,0,0,1.333-.562,2.824,2.824,0,0,0,.812-1.166l.021-.021V21.1l.062-.562v-.021a5.427,5.427,0,0,0,.625-.417,2.71,2.71,0,0,0,.646-.729,1.833,1.833,0,0,0,.25-1,2.563,2.563,0,0,0-.292-.958Zm-.4-10.5Zm-1.479-1.1a7.12,7.12,0,0,1,.833.541c.125.1.271.187.4.312a1.257,1.257,0,0,1,.167.167l.042.042h-.042c-.083-.021-.146-.042-.229-.062-.146-.062-.312-.125-.458-.187a7.132,7.132,0,0,1-.875-.479A5.61,5.61,0,0,1,24.2,5.52a2.5,2.5,0,0,1-.229-.25l.312.125a6.4,6.4,0,0,1,.854.417Zm-1.416-.916.021.021v.042a.02.02,0,0,0-.021-.021V4.895ZM8.876,2.562a5.021,5.021,0,0,1-.937.333,5.347,5.347,0,0,1-.979.167,4.013,4.013,0,0,1-.5.021.781.781,0,0,1-.229-.021H6.169c.021,0,.021-.021.042-.021.062-.042.146-.062.208-.1.146-.062.312-.1.458-.167.312-.083.646-.167.979-.229a8.4,8.4,0,0,1,.979-.125A1.576,1.576,0,0,0,9.147,2.4a1.536,1.536,0,0,1-.271.167Zm14.453,7.1-1.291,1-1.291,1.02c-.354.292-.708.583-1.062.854.021-.021.042-.062.062-.083.167-.229.333-.437.5-.646.354-.417.687-.854,1.062-1.25s.771-.791,1.166-1.145a4.872,4.872,0,0,1,.646-.5l.187-.125c.187.146.4.292.583.437-.167.146-.375.292-.562.437ZM8.064,7.1l.1.1a5.63,5.63,0,0,1,.583.646,2.21,2.21,0,0,1,.375.729.921.921,0,0,1-.062.625l-.021-.062L8.064,7.1Zm1.02,2.166a.72.72,0,0,0,.146-.25.866.866,0,0,0,.042-.458A1.7,1.7,0,0,0,8.9,7.727a4.015,4.015,0,0,0-.979-.9l-.229-.479c-.146-.312-.292-.625-.458-.916.312-.083.687-.208,1.1-.312A20.313,20.313,0,0,1,9.355,7a7.963,7.963,0,0,1,.771,2.541c.021.208,0,.437,0,.666s0,.458.021.687a7.609,7.609,0,0,0,.146.958L9.084,9.268ZM14,26.242a.9.9,0,0,1-.187.208.4.4,0,0,1-.333.1.358.358,0,0,1-.229-.229.981.981,0,0,1-.083-.354,2.275,2.275,0,0,1,.042-.75,2.816,2.816,0,0,1,.229-.708,1.478,1.478,0,0,1,.208-.292.341.341,0,0,1,.292-.125c.1,0,.208.1.271.208a.74.74,0,0,1,.083.187l-.25,1.479c-.021.1-.021.187-.042.271Zm1.229-7.185-.375,2.187a3.329,3.329,0,0,0-.1-.437c-.1-.4-.229-.771-.354-1.145a15.537,15.537,0,0,0-.958-2.166c.229.771.5,1.5.771,2.249.146.375.271.75.4,1.1l.187.562c0,.021.021.062.021.083-.062.333-.125.666-.167,1.02l-.312,1.9c-.021-.042-.021-.083-.042-.125a.486.486,0,0,0-.312-.292.525.525,0,0,0-.417.125,1.944,1.944,0,0,0-.271.312,2.036,2.036,0,0,0-.271.75,2.131,2.131,0,0,0,0,.812,1.021,1.021,0,0,0,.146.4.486.486,0,0,0,.333.271.428.428,0,0,0,.375-.167c.042-.042.083-.1.125-.146-.146.979-.312,1.958-.458,2.957a2.727,2.727,0,0,1-.562.125c-.25.042-.5.062-.75.083a5.531,5.531,0,0,1-1.541-.146,7.846,7.846,0,0,1-1.5-.479,3.625,3.625,0,0,1-1.229-.854c.312-1.145.666-2.291,1.02-3.436l.541-1.729.521-1.749c.354-1.166.708-2.333,1.041-3.5.167-.583.312-1.166.479-1.749a3.626,3.626,0,0,0,.187-1.833v-.021c-.021-.021-.042-.021-.042,0a3.109,3.109,0,0,0-.25.292c-.229-.521-.479-1.02-.708-1.541a4.765,4.765,0,0,1-.167-.583,7.165,7.165,0,0,1-.208-1.312c-.021-.229-.021-.437-.021-.666s.021-.458,0-.687a7.625,7.625,0,0,0-.833-2.6,12.587,12.587,0,0,0-1.1-1.833c.687-.187,1.416-.375,2-.479.083.187.187.354.271.541L11.938,7.6l1.25,2.437.625,1.208.312.6c.083.125.125.271.208.375l-.812.75a.069.069,0,0,0,0,.1.073.073,0,0,0,.1.021c.437-.312.875-.646,1.312-.979l1.312-1c.875-.666,1.729-1.333,2.582-2s1.708-1.354,2.562-2.041l.021-.021a24.316,24.316,0,0,0,1.874,1.645,6.162,6.162,0,0,0-.875.541,8.943,8.943,0,0,0-1.229,1.125,12.279,12.279,0,0,0-1.041,1.291,11.778,11.778,0,0,0-.646,1c-1.27,1.041-2.52,2.1-3.728,3.207a.128.128,0,0,0-.021.146.138.138,0,0,0,.146.042,9.134,9.134,0,0,0-.312,1.25c-.125.583-.25,1.166-.354,1.749Zm9.205,2.791a2.527,2.527,0,0,1-1.02.458,3.767,3.767,0,0,1-1.187.042,7.361,7.361,0,0,1-1.145-.208,2.037,2.037,0,0,1,.167-1.041c.146.021.271.021.417.042a.114.114,0,0,0,.125-.083.124.124,0,0,0-.083-.167h0c-.1-.042-.187-.062-.292-.1a2.771,2.771,0,0,1,.292-.4c.125-.125.25-.25.375-.354a3.992,3.992,0,0,0,.854.4,2.881,2.881,0,0,0,1.125.1,1.55,1.55,0,0,0,1.02-.541,1.524,1.524,0,0,0,.354-.916.85.85,0,0,1,.021.4,4.511,4.511,0,0,1-.083.521l-.062.312L25,20.494a.919.919,0,0,0-.333.354.751.751,0,0,0,.479,0c.021,0,.021-.021.042-.021-.021.062-.021.1-.042.167a2.552,2.552,0,0,1-.708.854ZM26.5,19.119a2.2,2.2,0,0,1-.458.625,2.638,2.638,0,0,1-.271.229,2.585,2.585,0,0,0-.062-.562,1.534,1.534,0,0,0-.083-.292.531.531,0,0,0-.187-.25h0c-.021,0-.042,0-.042.021h0a1.95,1.95,0,0,1-.562.771,1.429,1.429,0,0,1-.812.292,2.857,2.857,0,0,1-.916-.125c-.312-.083-.625-.187-.937-.292l-.042-.021a.2.2,0,0,0-.187.042c-.167.208-.292.4-.437.6-.1.167-.187.312-.271.479-.375-.146-.729-.271-1.1-.417-.521-.208-1.041-.417-1.52-.666a7.648,7.648,0,0,1-1.4-.812,2.949,2.949,0,0,1-.979-1.062v-.021a.409.409,0,0,0-.187-.187c0-.042.021-.1.021-.146a7.37,7.37,0,0,0,.1-1.52c1.687-1.187,3.332-2.437,4.957-3.728l-.062.187a3.27,3.27,0,0,0-.146,1.02A2.089,2.089,0,0,0,22.122,15.1a2.825,2.825,0,0,0,.479.187l.25.062.208.042a6.645,6.645,0,0,1,1.541.625,6.156,6.156,0,0,1,1.312.979,2.275,2.275,0,0,1,.708,1.333,1.51,1.51,0,0,1-.125.791Z" style="fill:#3f3e29"/><path d="M12.667,23.909a2.161,2.161,0,0,0-.354.771,1.556,1.556,0,0,0-.062.417l-.021.417a4.533,4.533,0,0,0,.146,1.666,7.647,7.647,0,0,0,.666,1.52c-.083-.271-.187-.521-.271-.771s-.167-.521-.229-.791a5.89,5.89,0,0,1-.1-1.6l.021-.417a2.552,2.552,0,0,1,.042-.4,3.137,3.137,0,0,1,.292-.729,2.967,2.967,0,0,1,.521-.625,2.591,2.591,0,0,1,.666-.479,2.76,2.76,0,0,0-1.312,1.02Z" style="fill:#3f3e29"/>`,
|
||
"Handlebars": `<path d="M12.3,13.1a4.238,4.238,0,0,1,2.728.9A4.592,4.592,0,0,1,16,15.127a4.144,4.144,0,0,1,2.039-1.747,4.757,4.757,0,0,1,3.286.019,7.833,7.833,0,0,1,2.443,1.558c.568.5,1.094,1.05,1.679,1.533a3.4,3.4,0,0,0,1.019.614,1.42,1.42,0,0,0,1.46-.379.965.965,0,0,0-.055-1.323.545.545,0,0,0-.8.108.659.659,0,0,0,.05.686,1.222,1.222,0,0,1-.6-.926,1.022,1.022,0,0,1,.691-1.032,2.005,2.005,0,0,1,2.312.661,3.258,3.258,0,0,1,.44,2.308,2.762,2.762,0,0,1-1.137,1.872,5.051,5.051,0,0,1-3.013.8,8.488,8.488,0,0,1-2.932-.63c-1.558-.626-3.016-1.492-4.625-1.992a13.977,13.977,0,0,0-1.7-.363c-.43.007-.861-.015-1.29.015a5.692,5.692,0,0,0-1.534.349c-1.636.509-3.116,1.4-4.7,2.024a7.625,7.625,0,0,1-4.249.474,3.74,3.74,0,0,1-2.125-1.14A2.856,2.856,0,0,1,2,16.668a2.722,2.722,0,0,1,.555-1.874,1.994,1.994,0,0,1,1.687-.68,1.425,1.425,0,0,1,1.063.52,1.04,1.04,0,0,1,.122.911,1.457,1.457,0,0,1-.556.644.643.643,0,0,0,.051-.681.547.547,0,0,0-.831-.079.975.975,0,0,0-.151,1.11,1.331,1.331,0,0,0,1.032.623,2.332,2.332,0,0,0,1.6-.7A28.526,28.526,0,0,1,9.4,14.053,5.251,5.251,0,0,1,12.3,13.1Z" style="fill:#c19770"/>`,
|
||
"Haskell": `<defs><linearGradient id="a" x1="0.996" y1="-206.057" x2="0.951" y2="-206.057" gradientTransform="matrix(259.941, 0, 0, -183.487, -237.941, -37792.788)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#faba09"/><stop offset="1" stop-color="#b42c01"/></linearGradient></defs><title>file_type_haskell2</title><path d="M2,25.882,8.588,16,2,6.118H6.941L13.529,16,6.941,25.882Zm6.588,0L15.177,16,8.588,6.118h4.941L26.706,25.882H21.765l-4.117-6.176-4.118,6.176ZM24.51,20.118l-2.2-3.294H30v3.294Zm-3.294-4.941-2.2-3.294H30v3.294Z" style="fill:url(#a)"/>`,
|
||
"Haxe": `<path d="M16,5.5,5.5,16,16,26.5,26.5,16,16,5.5" style="fill:#f68712"/><path d="M2,2,16,5.5,5.5,16,2,2" style="fill:#fab20b"/><path d="M30,2,26.5,16,16,5.5,30,2" style="fill:#f47216"/><path d="M30,30,16,26.5,26.5,16,30,30" style="fill:#f25c19"/><path d="M2,30,5.5,16,16,26.5,2,30" style="fill:#f89c0e"/><path d="M16,5.5,2,2H9l7,3.5" style="fill:#fbc707"/><path d="M16,5.5,30,2H23L16,5.5" style="fill:#fbc707"/><path d="M16,26.5,30,30H23l-7-3.5" style="fill:#f68712"/><path d="M16,26.5,2,30H9l7-3.5" style="fill:#f25c19"/><path d="M5.5,16,2,30V23l3.5-7" style="fill:#fff200"/><path d="M5.5,16,2,2V9l3.5,7" style="fill:#fff200"/><path d="M26.5,16,30,2V9l-3.5,7" style="fill:#f1471d"/><path d="M26.5,16,30,30V23l-3.5-7" style="fill:#f1471d"/>`,
|
||
"HLSL": `<polygon points="9.525 21.947 7.56 21.947 7.56 17.1 3.958 17.1 3.958 21.947 2 21.947 2 10.044 3.958 10.044 3.958 14.792 7.56 14.792 7.56 10.044 9.525 10.044 9.525 21.947" style="fill:blue"/><polygon points="16.692 21.947 11.513 21.947 11.513 10.044 13.472 10.044 13.472 19.773 16.692 19.773 16.692 21.947" style="fill:blue"/><path d="M17.462,21.491V18.834a3.676,3.676,0,0,0,1.146.909,2.809,2.809,0,0,0,1.249.3,2.05,2.05,0,0,0,.646-.092,1.309,1.309,0,0,0,.461-.252,1.029,1.029,0,0,0,.276-.382,1.231,1.231,0,0,0,.091-.478,1.3,1.3,0,0,0-.145-.623,1.907,1.907,0,0,0-.4-.506,4.077,4.077,0,0,0-.6-.448q-.346-.215-.746-.439a4.045,4.045,0,0,1-1.519-1.419,3.884,3.884,0,0,1-.5-2.026,4.232,4.232,0,0,1,.273-1.6,3.02,3.02,0,0,1,.744-1.1,2.938,2.938,0,0,1,1.088-.634,4.167,4.167,0,0,1,1.31-.2,5.816,5.816,0,0,1,1.2.111,3.8,3.8,0,0,1,.967.345v2.482a2.859,2.859,0,0,0-.476-.365,3.212,3.212,0,0,0-.53-.262A3.1,3.1,0,0,0,21.46,12a2.794,2.794,0,0,0-.512-.05,1.994,1.994,0,0,0-.606.087,1.347,1.347,0,0,0-.461.245,1.092,1.092,0,0,0-.291.377,1.144,1.144,0,0,0-.1.494,1.2,1.2,0,0,0,.115.536,1.657,1.657,0,0,0,.328.448,3.461,3.461,0,0,0,.515.415c.2.136.43.275.686.419a7.094,7.094,0,0,1,.936.635,3.712,3.712,0,0,1,.713.759,3.269,3.269,0,0,1,.455.967,4.573,4.573,0,0,1,.158,1.266,4.439,4.439,0,0,1-.277,1.672,2.888,2.888,0,0,1-.749,1.1,2.823,2.823,0,0,1-1.1.6,4.742,4.742,0,0,1-1.325.182,5.476,5.476,0,0,1-1.361-.166A3.41,3.41,0,0,1,17.462,21.491Z" style="fill:blue"/><polygon points="30 21.947 24.822 21.947 24.822 10.044 26.78 10.044 26.78 19.773 30 19.773 30 21.947" style="fill:blue"/>`,
|
||
"HTML": `<polygon points="5.902 27.201 3.655 2 28.345 2 26.095 27.197 15.985 30 5.902 27.201" style="fill:#e44f26"/><polygon points="16 27.858 24.17 25.593 26.092 4.061 16 4.061 16 27.858" style="fill:#f1662a"/><polygon points="16 13.407 11.91 13.407 11.628 10.242 16 10.242 16 7.151 15.989 7.151 8.25 7.151 8.324 7.981 9.083 16.498 16 16.498 16 13.407" style="fill:#ebebeb"/><polygon points="16 21.434 15.986 21.438 12.544 20.509 12.324 18.044 10.651 18.044 9.221 18.044 9.654 22.896 15.986 24.654 16 24.65 16 21.434" style="fill:#ebebeb"/><polygon points="15.989 13.407 15.989 16.498 19.795 16.498 19.437 20.507 15.989 21.437 15.989 24.653 22.326 22.896 22.372 22.374 23.098 14.237 23.174 13.407 22.341 13.407 15.989 13.407" style="fill:#fff"/><polygon points="15.989 7.151 15.989 9.071 15.989 10.235 15.989 10.242 23.445 10.242 23.445 10.242 23.455 10.242 23.517 9.548 23.658 7.981 23.732 7.151 15.989 7.151" style="fill:#fff"/>`,
|
||
"HTTP": `<defs><radialGradient id="a" cx="12.278" cy="24.557" r="18.371" gradientTransform="matrix(1, 0, 0, -1, -0.001, 34.001)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#d3e9ff"/><stop offset="0.155" stop-color="#d3e9ff"/><stop offset="0.75" stop-color="#4074ae"/><stop offset="1" stop-color="#36486c"/></radialGradient><radialGradient id="b" cx="10.657" cy="26.746" r="26.66" gradientTransform="matrix(1, 0, 0, -1, -0.001, 34.001)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0.165"/></radialGradient><radialGradient id="c" cx="-45.05" cy="9.285" r="4.115" gradientTransform="translate(-21.971 41.942) rotate(143.734)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></radialGradient><radialGradient id="d" cx="-41.456" cy="32.154" r="4.115" gradientTransform="translate(3.571 87.075) rotate(143.734) scale(1.297)" xlink:href="#c"/><radialGradient id="e" cx="-48.485" cy="13.239" r="4.115" gradientTransform="translate(-23.084 55.413) rotate(143.734)" xlink:href="#c"/><radialGradient id="f" cx="-40.883" cy="16.036" r="4.115" gradientTransform="matrix(-0.87, 0.639, -0.638, -0.87, -9.351, 47.706)" xlink:href="#c"/><linearGradient id="g" x1="-66.502" y1="2.219" x2="-64.626" y2="6.749" gradientTransform="matrix(0.939, -0.879, -0.683, -0.73, 84.81, -33.628)" xlink:href="#c"/><linearGradient id="h" x1="-26.791" y1="39.159" x2="-24.999" y2="44.683" gradientTransform="matrix(1.131, 0.613, 0.477, -0.879, 21.648, 69.071)" xlink:href="#c"/><linearGradient id="i" x1="-63.384" y1="8.177" x2="-63.57" y2="4.69" gradientTransform="matrix(0.918, -0.859, -0.668, -0.713, 77.857, -36.493)" xlink:href="#c"/><linearGradient id="j" x1="-99.259" y1="89.545" x2="-98.825" y2="93.023" gradientTransform="matrix(-1.28, -0.126, -0.098, 0.995, -101.637, -93.015)" xlink:href="#c"/><radialGradient id="k" cx="-20.712" cy="57.61" r="2.836" gradientTransform="matrix(0, -0.843, -0.721, 0, 26.625, -21.696)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#729fcf"/><stop offset="1" stop-color="#3b61a6"/></radialGradient><radialGradient id="l" cx="-20.712" cy="39.858" r="2.836" gradientTransform="translate(26.625 63.096) rotate(90) scale(0.843 0.721)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#729fcf"/><stop offset="1" stop-color="#509e2f"/></radialGradient></defs><title>file_type_http</title><path d="M28.026,14.2A11.877,11.877,0,1,1,16.149,2.325,11.878,11.878,0,0,1,28.026,14.2Z" style="fill:url(#a)"/><path d="M16.149,26.386A12.183,12.183,0,1,1,28.333,14.2,12.2,12.2,0,0,1,16.149,26.386Zm0-23.754A11.571,11.571,0,1,0,27.72,14.2,11.584,11.584,0,0,0,16.149,2.632Z" style="fill:#39396c"/><path d="M27.693,12.424h0l-.328.371a7,7,0,0,0-.656-.644l-.5.074-.46-.519v.643l.394.3.262.3.35-.4c.088.165.175.33.263.5v.495l-.394.445-.722.5-.546.545-.35-.4.175-.445-.35-.4-.591-1.262-.5-.569L23.6,12.1l.2.718.371.421a17.069,17.069,0,0,0,.7,1.783,9.979,9.979,0,0,0,1.268-.1v.347l-.525,1.287-.481.544-.394.843V19.33l.132.545-.219.247-.482.3-.5.421.416.47-.569.5.109.321-.853.966H22.2l-.481.3h-.307v-.4l-.13-.793c-.169-.5-.346-.991-.525-1.484,0-.364.022-.725.044-1.089l.219-.495-.307-.595.022-.817-.416-.47.208-.68-.338-.384H19.6l-.2-.223-.591.372-.24-.273-.547.47L16.911,15.27l-.437-1.04.394-.593-.219-.247.481-1.139c.395-.491.807-.963,1.225-1.436l.744-.2.831-.1.569.149.809.816.284-.321.393-.049.744.247H23.3l.394-.347.175-.247-.394-.247-.656-.049a6.6,6.6,0,0,0-.568-.743l-.219.1-.088.644-.394-.445-.087-.5-.437-.346h-.176l.438.495-.175.445-.35.1.219-.445-.394-.2-.349-.4-.657.148-.087.2-.394.248-.219.545-.546.272-.241-.272H17.83V9.428l.569-.3h.437l-.088-.346L18.4,8.438l.59-.124.328-.371.262-.446h.482l-.132-.346.307-.2v.4l.656.148.656-.544.044-.248.568-.4a4.353,4.353,0,0,0-.612.1V5.963l.219-.5h-.219l-.48.445-.132.248.132.347-.219.593-.35-.2-.306-.346-.482.346-.175-.792.831-.544v-.3l.525-.346.831-.2.569.2,1.049.2-.262.3H22.51l.569.594.437-.495.133-.218a15.53,15.53,0,0,1,2.635,3.147A11.452,11.452,0,0,1,27.693,12.424Z" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M16.861,5.517l-.044.3.307.2.524-.346-.262-.3-.35.2-.174-.05" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M17.343,3.488l-1.138-.446-1.312.148-1.619.445-.306.3,1.006.693v.4l-.394.4.525,1.04.349-.2.438-.693a15.053,15.053,0,0,0,1.924-.743l.525-1.337" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M18.524,7.647,18.349,7.2l-.307.1.088.544.394-.2" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M18.7,7.547l-.088.595.481-.1.35-.346-.306-.3c-.1-.274-.221-.529-.35-.792h-.262v.3l.174.2v.445" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M12.225,16.953l-.35-.693-.656-.148-.35-.94-.875.1-.743-.544-.788.693v.109a3,3,0,0,1-.743-.209l-.175-.495V14.28l-.525.049q.066-.52.131-1.039H6.845l-.306.4-.306.148L5.8,13.587l-.044-.545.088-.594.656-.495H7.02l.087-.3.656.148.481.595.088-.991.831-.693.306-.743.612-.247.35-.495.787-.149.394-.593H10.432l.744-.347H11.7l.744-.248.088-.3-.263-.248-.306-.1.088-.3-.219-.445-.525.2.088-.4-.612-.347L10.3,6.8l.044.3-.481.2-.306.643-.131-.594L8.594,7l-.131-.445,1.094-.644.481-.445.044-.544-.262-.149-.35-.05-.219.545s-.366.072-.46.095A12.5,12.5,0,0,0,4.6,13.371a6.789,6.789,0,0,0,.409.711l.918.544.918.248.394.5.612.445.35-.049.262.118v.08l-.35.94-.263.4.088.2-.219.742.787,1.436.787.693.35.495L9.6,21.9l.263.593L9.6,23.637s-.021-.007.013.107a5.278,5.278,0,0,0,1.488.809l.161-.123-.087-.247.35-.347.131-.347.569-.2.437-1.089-.131-.3.306-.445.656-.149.35-.792-.088-.99.525-.743.088-.743c-.718-.356-1.43-.723-2.143-1.089" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M11.263,5.715l.437.3h.35V5.666l-.437-.2-.35.247" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M10.126,5.319l-.219.544h.438l.219-.5c.189-.133.376-.268.568-.4l.438.149.875.594.438-.4-.482-.2-.219-.446-.831-.1-.044-.248-.394.1-.175.346-.219-.446-.087.2.044.5-.35.3" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M11.7,4.081l.219-.2.438-.1a6.9,6.9,0,0,1,.918-.347l-.174-.3-.565.081-.267.266-.44.064-.391.184-.19.092-.116.155.568.1" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M12.444,8.785l.263-.4-.394-.3.131.693" style="fill:#204a87;fill-opacity:0.7134503126144409"/><path d="M16.149,25.783A11.58,11.58,0,1,1,27.729,14.2,11.593,11.593,0,0,1,16.149,25.783Zm0-22.548A10.968,10.968,0,1,0,27.117,14.2,10.98,10.98,0,0,0,16.149,3.235Z" style="opacity:0.3956044018268585;isolation:isolate;fill:url(#b)"/><path d="M5.541,10.241a4.115,4.115,0,1,0,6.636-4.866h0A4.115,4.115,0,0,0,5.54,10.24Z" style="fill:url(#c)"/><path d="M7.836,8.558a1.268,1.268,0,1,0,2.046-1.5h0a1.268,1.268,0,0,0-2.046,1.5Z" style="fill:#fff"/><path d="M17.952,24.8a5.337,5.337,0,1,0,8.607-6.312v0A5.337,5.337,0,0,0,17.95,24.8Z" style="fill:url(#d)"/><path d="M20.928,22.616a1.645,1.645,0,1,0,2.653-1.946h0a1.645,1.645,0,0,0-2.653,1.946Z" style="fill:#fff"/><path d="M4.859,18.493A4.115,4.115,0,1,0,11.5,13.626h0a4.115,4.115,0,0,0-6.636,4.866Z" style="fill:url(#e)"/><path d="M7.154,16.809a1.268,1.268,0,1,0,2.046-1.5h0a1.268,1.268,0,0,0-2.046,1.5Z" style="fill:#fff"/><path d="M12.408,10.269A4.441,4.441,0,1,0,19.57,5.016h0a4.441,4.441,0,1,0-7.162,5.253Z" style="fill:url(#f)"/><path d="M14.885,8.452a1.369,1.369,0,1,0,2.208-1.619h0a1.369,1.369,0,1,0-2.208,1.619Z" style="fill:#fff"/><path d="M12.68,26.238a3.83,3.83,0,0,1-2.909-1.087c-1.133-1.21-1.2-3.255-.2-5.757a21.542,21.542,0,0,1,5.307-7.326C20.064,7.215,25.945,5.356,28.27,7.839c1.133,1.211,1.2,3.255.2,5.757a21.553,21.553,0,0,1-5.308,7.326A21.551,21.551,0,0,1,15.5,25.733,9.229,9.229,0,0,1,12.68,26.238ZM25.342,7.28c-2.7,0-6.6,1.908-10.1,5.183A21,21,0,0,0,10.071,19.6c-.921,2.3-.887,4.138.094,5.187s2.817,1.2,5.169.437a21,21,0,0,0,7.46-4.692,21,21,0,0,0,5.175-7.132c.921-2.3.888-4.138-.095-5.187A3.34,3.34,0,0,0,25.342,7.28Z" style="fill:url(#g)"/><path d="M21.681,22.094a20.633,20.633,0,0,1-9.339-2.759C6.1,15.95,2.473,10.957,4.094,7.968c.79-1.458,2.7-2.175,5.4-2.012A21.542,21.542,0,0,1,18.12,8.674a21.545,21.545,0,0,1,6.987,5.746c1.6,2.167,2.051,4.163,1.261,5.621C25.622,21.416,23.915,22.094,21.681,22.094ZM8.759,6.474c-2.1,0-3.572.612-4.19,1.751C3.117,10.9,6.72,15.674,12.6,18.86s11.843,3.6,13.294.924c.685-1.263.251-3.054-1.22-5.042a21,21,0,0,0-6.81-5.593A21,21,0,0,0,9.459,6.5Q9.1,6.474,8.759,6.474Z" style="fill:url(#h)"/><path d="M10,24.078a3.757,3.757,0,0,1-2.851-1.065c-1.11-1.187-1.181-3.189-.2-5.639a21.062,21.062,0,0,1,5.189-7.163c5.073-4.747,10.83-6.563,13.1-4.132h0c2.275,2.431.083,8.053-4.99,12.8a21.059,21.059,0,0,1-7.491,4.7A9.024,9.024,0,0,1,10,24.078ZM22.373,5.553c-2.63,0-6.439,1.864-9.856,5.062A20.5,20.5,0,0,0,7.463,17.58c-.9,2.239-.866,4.034.09,5.055s2.745,1.172,5.038.424a20.513,20.513,0,0,0,7.284-4.582c4.766-4.46,6.994-9.853,4.965-12.02h0A3.256,3.256,0,0,0,22.373,5.553Z" style="fill:url(#i)"/><path d="M17.512,19.413c-.86,0-1.748-.043-2.659-.133C7.784,18.584,2.507,15.388,2.84,12h0c.333-3.383,6.133-5.49,13.2-4.791s12.345,3.892,12.012,7.275C27.763,17.436,23.324,19.413,17.512,19.413ZM3.378,12.057c-.3,3.031,4.873,6.03,11.528,6.686s12.312-1.277,12.611-4.308S22.644,8.406,15.988,7.75,3.677,9.027,3.378,12.057Z" style="fill:url(#j)"/><path d="M6.251,29.966h6.674V20.809h2.981L9.548,11.434,3.295,20.782l2.958.031Z" style="fill:url(#k)"/><path d="M12.924,30.045H6.251a.049.049,0,0,1-.039-.023c-.01-.015-.016-3.135-.016-3.156l0-5.975-2.9-.03a.06.06,0,0,1-.051-.048.1.1,0,0,1,.011-.085L9.508,11.38a.056.056,0,0,1,.041-.025.05.05,0,0,1,.04.024l6.357,9.375a.1.1,0,0,1,.011.086.059.059,0,0,1-.051.048H12.98v9.078C12.98,30.01,12.955,30.045,12.924,30.045Zm-6.618-.158h6.562V20.809c0-.044.025-.079.056-.079h2.85L9.549,11.549,3.424,20.7l2.83.03c.031,0,.055.036.055.079Z" style="fill:#183868"/><path d="M19.053,20.587l-2.958.031,6.254,9.348,6.357-9.375H25.724V11.434H19.051Z" style="fill:url(#l)"/><path d="M25.78,11.434v9.078h2.925a.059.059,0,0,1,.051.048.1.1,0,0,1-.011.086l-6.357,9.375a.05.05,0,0,1-.04.024.056.056,0,0,1-.041-.025l-6.254-9.348a.1.1,0,0,1-.011-.085.06.06,0,0,1,.051-.048l2.9-.03,0-5.975c0-.021.006-3.141.016-3.156a.049.049,0,0,1,.039-.023h6.674C25.755,11.355,25.78,11.39,25.78,11.434Zm-6.672,9.153c0,.043-.025.079-.055.079l-2.83.03,6.125,9.156,6.226-9.181h-2.85c-.031,0-.056-.035-.056-.079V11.513H19.107Z" style="fill:#183868"/>`,
|
||
"Idris": `<path d="M13.376,6.2c3.6,1.1,4.5,2,5.8,5.2-.3-4-1.9-5.6-5.8-5.2Z" style="fill:#8a0819"/><path d="M8.376,12.4c2.3.7,5,1.3,6,5.7.4-5.5-2.2-5.8-6-5.7Z" style="fill:#8a0819"/><path d="M9.976,8.8c3.5.7,5.7,1.7,7,6.2.3-5.8-2.9-6.4-7-6.2Z" style="fill:#8a0819"/><path d="M14.576,2c19.1,12.4-4.2,12.7.8,27.1l3,.9c-8.3-11.2,18.4-17-3.8-28Z" style="fill:#8a0819"/>`,
|
||
"Ini": `<path d="M23.265,24.381l.9-.894c4.164.136,4.228-.01,4.411-.438l1.144-2.785L29.805,20l-.093-.231c-.049-.122-.2-.486-2.8-2.965V15.5c3-2.89,2.936-3.038,2.765-3.461L28.538,9.225c-.171-.422-.236-.587-4.37-.474l-.9-.93a20.166,20.166,0,0,0-.141-4.106l-.116-.263-2.974-1.3c-.438-.2-.592-.272-3.4,2.786l-1.262-.019c-2.891-3.086-3.028-3.03-3.461-2.855L9.149,3.182c-.433.175-.586.237-.418,4.437l-.893.89c-4.162-.136-4.226.012-4.407.438L2.285,11.733,2.195,12l.094.232c.049.12.194.48,2.8,2.962l0,1.3c-3,2.89-2.935,3.038-2.763,3.462l1.138,2.817c.174.431.236.584,4.369.476l.9.935a20.243,20.243,0,0,0,.137,4.1l.116.265,2.993,1.308c.435.182.586.247,3.386-2.8l1.262.016c2.895,3.09,3.043,3.03,3.466,2.859l2.759-1.115C23.288,28.644,23.44,28.583,23.265,24.381ZM11.407,17.857a4.957,4.957,0,1,1,6.488,2.824A5.014,5.014,0,0,1,11.407,17.857Z" style="fill:#99b8c4"/>`,
|
||
"Io": `<path d="M2,2.887H7.075V7.51H2Zm.052,6.83H7.04V28.626H2.052Z" style="fill:#c2c2c2"/><path d="M13.271,26.454a9.791,9.791,0,0,1-2.616-7.178,10.148,10.148,0,0,1,2.616-7.343,9.321,9.321,0,0,1,7.047-2.72,9.34,9.34,0,0,1,7.075,2.72A10.168,10.168,0,0,1,30,19.276a9.809,9.809,0,0,1-2.607,7.178,9.456,9.456,0,0,1-7.075,2.659A9.436,9.436,0,0,1,13.271,26.454Zm10.436-2.972a6.7,6.7,0,0,0,1.166-4.258,6.943,6.943,0,0,0-1.166-4.354,4.047,4.047,0,0,0-3.389-1.486,4.022,4.022,0,0,0-3.38,1.486,6.991,6.991,0,0,0-1.156,4.354,6.744,6.744,0,0,0,1.156,4.258,4.053,4.053,0,0,0,3.38,1.46A4.078,4.078,0,0,0,23.707,23.482Z" style="fill:#c2c2c2"/>`,
|
||
"Java": `<path d="M12.325,23.654s-1.07.622.761.833a16.023,16.023,0,0,0,5.8-.246,10.088,10.088,0,0,0,1.541.752c-5.481,2.349-12.405-.136-8.1-1.339" style="fill:#5382a1"/><path d="M11.656,20.588s-1.2.888.633,1.078a22.618,22.618,0,0,0,7.481-.359,3.32,3.32,0,0,0,1.152.7c-6.627,1.938-14.009.153-9.266-1.421" style="fill:#5382a1"/><path d="M17.3,15.388a2.051,2.051,0,0,1-.355,2.954s3.429-1.77,1.854-3.987c-1.471-2.067-2.6-3.095,3.508-6.636,0,0-9.586,2.394-5.007,7.669" style="fill:#5382a1"/><path d="M24.552,25.921s.792.652-.872,1.157c-3.164.958-13.168,1.248-15.948.038-1-.435.874-1.038,1.464-1.164a3.8,3.8,0,0,1,.966-.108c-1.111-.783-7.181,1.537-3.083,2.2,11.176,1.812,20.372-.816,17.473-2.124" style="fill:#5382a1"/><path d="M12.84,17.412s-5.089,1.209-1.8,1.648a38.225,38.225,0,0,0,6.731-.072c2.106-.178,4.221-.555,4.221-.555a8.934,8.934,0,0,0-1.28.685c-5.168,1.359-15.151.727-12.277-.663a9.629,9.629,0,0,1,4.407-1.042" style="fill:#5382a1"/><path d="M21.969,22.515c5.253-2.73,2.824-5.353,1.129-5a3.932,3.932,0,0,0-.6.161.957.957,0,0,1,.449-.346c3.354-1.179,5.933,3.478-1.083,5.322a.458.458,0,0,0,.106-.138" style="fill:#5382a1"/><path d="M18.8,2s2.909,2.91-2.759,7.386c-4.546,3.59-1.037,5.637,0,7.975-2.653-2.394-4.6-4.5-3.294-6.463C14.664,8.019,19.976,6.623,18.8,2" style="fill:#5382a1"/><path d="M13.356,29.912c5.042.323,12.786-.179,12.969-2.565,0,0-.353.9-4.167,1.623a41.458,41.458,0,0,1-12.76.2s.645.533,3.959.746" style="fill:#5382a1"/>`,
|
||
"JavaScript": `<rect x="2" y="2" width="28" height="28" style="fill:#f5de19"/><path d="M20.809,23.875a2.866,2.866,0,0,0,2.6,1.6c1.09,0,1.787-.545,1.787-1.3,0-.9-.716-1.222-1.916-1.747l-.658-.282c-1.9-.809-3.16-1.822-3.16-3.964,0-1.973,1.5-3.476,3.853-3.476a3.889,3.889,0,0,1,3.742,2.107L25,18.128A1.789,1.789,0,0,0,23.311,17a1.145,1.145,0,0,0-1.259,1.128c0,.789.489,1.109,1.618,1.6l.658.282c2.236.959,3.5,1.936,3.5,4.133,0,2.369-1.861,3.667-4.36,3.667a5.055,5.055,0,0,1-4.795-2.691Zm-9.295.228c.413.733.789,1.353,1.693,1.353.864,0,1.41-.338,1.41-1.653V14.856h2.631v8.982c0,2.724-1.6,3.964-3.929,3.964a4.085,4.085,0,0,1-3.947-2.4Z"/>`,
|
||
"JSON": `<path d="M4.014,14.976a2.51,2.51,0,0,0,1.567-.518A2.377,2.377,0,0,0,6.386,13.1,15.261,15.261,0,0,0,6.6,10.156q.012-2.085.075-2.747a5.236,5.236,0,0,1,.418-1.686,3.025,3.025,0,0,1,.755-1.018A3.046,3.046,0,0,1,9,4.125,6.762,6.762,0,0,1,10.544,4h.7V5.96h-.387a2.338,2.338,0,0,0-1.723.468A3.4,3.4,0,0,0,8.709,8.52a36.054,36.054,0,0,1-.137,4.133,4.734,4.734,0,0,1-.768,2.06A4.567,4.567,0,0,1,6.1,16a3.809,3.809,0,0,1,1.992,1.754,8.861,8.861,0,0,1,.618,3.865q0,2.435.05,2.9A1.755,1.755,0,0,0,9.264,25.7a2.639,2.639,0,0,0,1.592.337h.387V28h-.7a5.655,5.655,0,0,1-1.773-.2,2.97,2.97,0,0,1-1.324-.93,3.353,3.353,0,0,1-.681-1.63A24.175,24.175,0,0,1,6.6,22.006,16.469,16.469,0,0,0,6.386,18.9a2.408,2.408,0,0,0-.805-1.361,2.489,2.489,0,0,0-1.567-.524Z" style="fill:#f5de19"/><path d="M27.986,17.011a2.489,2.489,0,0,0-1.567.524,2.408,2.408,0,0,0-.805,1.361,16.469,16.469,0,0,0-.212,3.109,24.175,24.175,0,0,1-.169,3.234,3.353,3.353,0,0,1-.681,1.63,2.97,2.97,0,0,1-1.324.93,5.655,5.655,0,0,1-1.773.2h-.7V26.04h.387a2.639,2.639,0,0,0,1.592-.337,1.755,1.755,0,0,0,.506-1.186q.05-.462.05-2.9a8.861,8.861,0,0,1,.618-3.865A3.809,3.809,0,0,1,25.9,16a4.567,4.567,0,0,1-1.7-1.286,4.734,4.734,0,0,1-.768-2.06,36.054,36.054,0,0,1-.137-4.133,3.4,3.4,0,0,0-.425-2.092,2.338,2.338,0,0,0-1.723-.468h-.387V4h.7A6.762,6.762,0,0,1,23,4.125a3.046,3.046,0,0,1,1.149.581,3.025,3.025,0,0,1,.755,1.018,5.236,5.236,0,0,1,.418,1.686q.062.662.075,2.747a15.261,15.261,0,0,0,.212,2.947,2.377,2.377,0,0,0,.805,1.355,2.51,2.51,0,0,0,1.567.518Z" style="fill:#f5de19"/>`,
|
||
"JSON5": `<path d="M12.815,15.167l.68-5.676h6.489v2h-4.4L15.329,13.7a2.4,2.4,0,0,1,.252-.122,2.962,2.962,0,0,1,.374-.13,2.9,2.9,0,0,1,.458-.106,2.834,2.834,0,0,1,.512-.046,3.983,3.983,0,0,1,1.466.252,2.736,2.736,0,0,1,1.076.723,3.167,3.167,0,0,1,.664,1.168,5,5,0,0,1,.228,1.588,4.157,4.157,0,0,1-.236,1.387,3.307,3.307,0,0,1-1.9,2.029,4.3,4.3,0,0,1-1.715.312,4.75,4.75,0,0,1-1.458-.228,4.054,4.054,0,0,1-1.252-.656,3.359,3.359,0,0,1-.878-1.046,2.787,2.787,0,0,1-.32-1.382H15.18a1.458,1.458,0,0,0,.39.97,1.383,1.383,0,0,0,1.558.206,1.089,1.089,0,0,0,.4-.412,1.749,1.749,0,0,0,.206-.618,4.3,4.3,0,0,0,.062-.74,2.709,2.709,0,0,0-.092-.74,1.506,1.506,0,0,0-.282-.558,1.229,1.229,0,0,0-.5-.349,1.78,1.78,0,0,0-.718-.13,2.121,2.121,0,0,0-.5.054,1.805,1.805,0,0,0-.382.138,1.318,1.318,0,0,0-.274.19,1.28,1.28,0,0,0-.19.2l-2.048-.482" style="fill:#fff"/><path d="M5.985,23.343a4.45,4.45,0,0,1-1.311-.58,3.2,3.2,0,0,1-.848-.824,3.012,3.012,0,0,1-.458-1.008,4.879,4.879,0,0,1-.13-1.143v-1.55a2.3,2.3,0,0,0-.076-.618,1.184,1.184,0,0,0-.222-.466.969.969,0,0,0-.382-.306A1.324,1.324,0,0,0,2,16.744V15.012a1.074,1.074,0,0,0,.937-.4,1.841,1.841,0,0,0,.3-1.1v-1.55a4.879,4.879,0,0,1,.13-1.143,3.037,3.037,0,0,1,.458-1.008A3.17,3.17,0,0,1,4.671,9a4.482,4.482,0,0,1,1.311-.58l.48,1.344a1.222,1.222,0,0,0-.488.328,1.742,1.742,0,0,0-.306.5,2.524,2.524,0,0,0-.16.634,5.827,5.827,0,0,0-.046.74v1.55A2.844,2.844,0,0,1,5.126,14.9a2.37,2.37,0,0,1-1.076.983,2.356,2.356,0,0,1,1.076.992,2.808,2.808,0,0,1,.336,1.374v1.55a5.827,5.827,0,0,0,.046.74,2.586,2.586,0,0,0,.16.634,1.684,1.684,0,0,0,.306.5A1.222,1.222,0,0,0,6.462,22c0-.005-.477,1.344-.477,1.344" style="fill:#999"/><path d="M8.215,19.393a1.289,1.289,0,0,1,.1-.512,1.212,1.212,0,0,1,.29-.4,1.373,1.373,0,0,1,.45-.274,1.637,1.637,0,0,1,.58-.1,1.555,1.555,0,0,1,.572.1,1.269,1.269,0,0,1,.45.274,1.077,1.077,0,0,1,.29.4,1.294,1.294,0,0,1,0,1.024,1.151,1.151,0,0,1-.29.412,1.388,1.388,0,0,1-.45.268,1.613,1.613,0,0,1-.572.1,1.578,1.578,0,0,1-.58-.1,1.409,1.409,0,0,1-.45-.268,1.229,1.229,0,0,1-.39-.924m0-6.088a1.289,1.289,0,0,1,.1-.512,1.212,1.212,0,0,1,.29-.4,1.373,1.373,0,0,1,.45-.274,1.637,1.637,0,0,1,.58-.1,1.555,1.555,0,0,1,.572.1,1.269,1.269,0,0,1,.45.274,1.077,1.077,0,0,1,.29.4,1.294,1.294,0,0,1,0,1.024,1.151,1.151,0,0,1-.29.412,1.388,1.388,0,0,1-.45.268,1.613,1.613,0,0,1-.572.1,1.578,1.578,0,0,1-.58-.1,1.409,1.409,0,0,1-.45-.268,1.229,1.229,0,0,1-.39-.924" style="fill:#999"/><path d="M24.24,20.293a3.648,3.648,0,0,1-.122.929,4.534,4.534,0,0,1-.336.891,4.706,4.706,0,0,1-.5.807,4.005,4.005,0,0,1-.61.664l-1.3-.61c.081-.173.168-.349.26-.526a4.846,4.846,0,0,0,.268-.558,4.443,4.443,0,0,0,.206-.656,3.406,3.406,0,0,0,.084-.8V18.656h2.059l-.008,1.636" style="fill:#999"/><path d="M25.538,21.994a1.251,1.251,0,0,0,.488-.328,1.707,1.707,0,0,0,.306-.5,2.525,2.525,0,0,0,.16-.634,5.826,5.826,0,0,0,.046-.74v-1.55a2.844,2.844,0,0,1,.336-1.382,2.364,2.364,0,0,1,1.084-.983,2.364,2.364,0,0,1-1.084-.983,2.844,2.844,0,0,1-.336-1.382v-1.55a5.827,5.827,0,0,0-.046-.74,2.586,2.586,0,0,0-.16-.634,1.684,1.684,0,0,0-.306-.5,1.222,1.222,0,0,0-.488-.328l.48-1.338A4.45,4.45,0,0,1,27.329,9a3.092,3.092,0,0,1,.848.815,2.892,2.892,0,0,1,.45,1.008,4.606,4.606,0,0,1,.138,1.143v1.55a2.655,2.655,0,0,0,.068.626,1.448,1.448,0,0,0,.222.474,1.037,1.037,0,0,0,.382.3,1.376,1.376,0,0,0,.564.106v1.731a1.077,1.077,0,0,0-.946.412,1.828,1.828,0,0,0-.29,1.084v1.55a4.606,4.606,0,0,1-.138,1.143,2.915,2.915,0,0,1-.45,1.008,3.157,3.157,0,0,1-.848.824,4.482,4.482,0,0,1-1.311.58l-.48-1.352" style="fill:#999"/>`,
|
||
"Julia": `<path d="M7.448,21.983V13.775l-2.432.669v8.729a2.66,2.66,0,0,1-.106.929.336.336,0,0,1-.308.239.405.405,0,0,1-.212-.074,1.282,1.282,0,0,1-.287-.3,2.813,2.813,0,0,0-.377-.409.874.874,0,0,0-.611-.207,1.22,1.22,0,0,0-.812.255.789.789,0,0,0-.3.627A.907.907,0,0,0,2.542,25a3.115,3.115,0,0,0,1.561.319,7.065,7.065,0,0,0,1.37-.122,2.361,2.361,0,0,0,1.057-.483,2.292,2.292,0,0,0,.68-1.014,5.094,5.094,0,0,0,.239-1.715Z" style="fill:#252525"/><path d="M10.825,14.008H8.4v5.618a2.241,2.241,0,0,0,.218.977,2.489,2.489,0,0,0,.6.8,2.9,2.9,0,0,0,.892.536,3.045,3.045,0,0,0,1.1.2,2.55,2.55,0,0,0,1.051-.244,4.347,4.347,0,0,0,1.019-.648v.743H15.71V14.008H13.289v5.756a2.764,2.764,0,0,1-.648.706,1.139,1.139,0,0,1-.648.281,1.155,1.155,0,0,1-.457-.09,1.263,1.263,0,0,1-.372-.239,1.06,1.06,0,0,1-.25-.356,1.091,1.091,0,0,1-.09-.441Z" style="fill:#252525"/><path d="M19.074,21.983V10.132l-2.411.669V21.983Z" style="fill:#252525"/><path d="M20.038,14.444v7.54h2.421V13.775Z" style="fill:#252525"/><path d="M27.568,17.863v2.3q-.372.276-.674.457a1.165,1.165,0,0,1-.6.181.468.468,0,0,1-.276-.09,1,1,0,0,1-.234-.239,1.138,1.138,0,0,1-.165-.356,1.576,1.576,0,0,1-.058-.43.968.968,0,0,1,.181-.552,2.306,2.306,0,0,1,.473-.5,4.572,4.572,0,0,1,.648-.43,7.612,7.612,0,0,1,.706-.345ZM30,21.983V16a2.083,2.083,0,0,0-.191-.9,1.779,1.779,0,0,0-.595-.69,3.006,3.006,0,0,0-1.025-.441,6.225,6.225,0,0,0-1.481-.154,5.735,5.735,0,0,0-1.327.149,4.6,4.6,0,0,0-1.1.4,2.373,2.373,0,0,0-.759.611,1.216,1.216,0,0,0-.281.77.958.958,0,0,0,.319.738,1.178,1.178,0,0,0,.828.292,1.364,1.364,0,0,0,.547-.1.8.8,0,0,0,.335-.255.986.986,0,0,0,.165-.372,1.978,1.978,0,0,0,.048-.435,1.031,1.031,0,0,1,.223-.669.975.975,0,0,1,.8-.276,1.008,1.008,0,0,1,.781.319,1.594,1.594,0,0,1,.292,1.083v.786l-.265.064q-.488.149-.988.313t-.961.361a7.884,7.884,0,0,0-.865.43,3.511,3.511,0,0,0-.706.531,2.319,2.319,0,0,0-.478.669,1.918,1.918,0,0,0-.175.828,2.034,2.034,0,0,0,.165.823,1.876,1.876,0,0,0,.473.653,2.255,2.255,0,0,0,.749.435,2.907,2.907,0,0,0,.993.159,3.679,3.679,0,0,0,.7-.058,2.509,2.509,0,0,0,.536-.165,2.209,2.209,0,0,0,.43-.25q.191-.143.393-.313v.637Z" style="fill:#252525"/><circle cx="6.204" cy="11.672" r="1.5" style="fill:#6682df"/><path d="M6.2,13.287a1.615,1.615,0,1,1,1.615-1.615A1.617,1.617,0,0,1,6.2,13.287Zm0-3a1.385,1.385,0,1,0,1.385,1.385A1.386,1.386,0,0,0,6.2,10.287Z" style="fill:#4063d8"/><circle cx="21.417" cy="11.672" r="1.5" style="fill:#d5635c"/><path d="M21.417,13.287a1.615,1.615,0,1,1,1.615-1.615A1.617,1.617,0,0,1,21.417,13.287Zm0-3A1.385,1.385,0,1,0,22.8,11.672,1.386,1.386,0,0,0,21.417,10.287Z" style="fill:#cb3c33"/><circle cx="23.385" cy="8.297" r="1.5" style="fill:#60ad51"/><path d="M23.385,9.912A1.615,1.615,0,1,1,25,8.3,1.617,1.617,0,0,1,23.385,9.912Zm0-3A1.385,1.385,0,1,0,24.77,8.3,1.386,1.386,0,0,0,23.385,6.912Z" style="fill:#389826"/><circle cx="25.354" cy="11.672" r="1.5" style="fill:#aa79c1"/><path d="M25.354,13.287a1.615,1.615,0,1,1,1.615-1.615A1.617,1.617,0,0,1,25.354,13.287Zm0-3a1.385,1.385,0,1,0,1.385,1.385A1.386,1.386,0,0,0,25.354,10.287Z" style="fill:#9558b2"/>`,
|
||
"Kotlin": `<defs><linearGradient id="a" x1="311.336" y1="1452.064" x2="283.342" y2="1480.058" gradientTransform="translate(-281.4 -1450)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e44857"/><stop offset="0.47" stop-color="#9d4b9d"/><stop offset="1" stop-color="#6d5faa"/></linearGradient></defs><title>file_type_kotlin</title><path d="M30,30H2V2H30L16,16Z" style="fill:url(#a)"/>`,
|
||
"Kusto": `<rect x="0.55" y="22.339" width="15.433" height="2.796" rx="0.439" transform="translate(-14.363 12.797) rotate(-44.999)" style="fill:#b8d432"/><rect x="1.372" y="16.382" width="9.859" height="2.796" rx="0.439" transform="translate(-10.727 9.663) rotate(-44.999)" style="fill:#b8d432"/><rect x="9.232" y="24.301" width="9.859" height="2.796" rx="0.439" transform="translate(-14.024 17.541) rotate(-44.999)" style="fill:#b8d432"/><polygon points="30 2 2 2 30 29.999 30 2" style="fill:#0078d4"/><polygon points="10.282 10.282 21.718 21.718 30 13.436 30 2 18.564 2 10.282 10.282" style="fill:#59b4d9"/><polygon points="30 29.999 30 2 16 16 30 29.999" style="fill:#fff;opacity:0.20000000298023224;isolation:isolate"/><rect x="16.226" y="9.001" width="2.796" height="2.796" rx="0.622" transform="translate(-2.192 15.507) rotate(-44.999)" style="fill:#fff"/><rect x="20.18" y="5.048" width="2.796" height="2.796" rx="0.622" transform="translate(1.762 17.146) rotate(-44.999)" style="fill:#fff"/><rect x="20.18" y="12.955" width="2.796" height="2.796" rx="0.622" transform="translate(-3.829 19.461) rotate(-44.999)" style="fill:#fff"/><rect x="24.133" y="9.002" width="2.796" height="2.796" rx="0.622" transform="translate(0.124 21.099) rotate(-44.999)" style="fill:#fff"/>`,
|
||
"LaTeX": `<path d="M11.333,13.122c-.128-1.562-.241-2.756-2.287-2.756H7.91v8.4h2.145v.611l-3.083-.029-3.082.029v-.611H6.034v-8.4H4.884c-2.046,0-2.159,1.208-2.287,2.756H2l.284-3.367h9.362l.284,3.367h-.6Z" style="fill:#cfcfcf"/><path d="M19.289,22.53H10.41V21.92h1.506V13.467H10.41v-.611h8.637l.412,3.367h-.6c-.213-1.833-.682-2.756-2.855-2.756H13.791V17.2h.838c1.364,0,1.505-.6,1.505-1.662h.6v3.935h-.6c0-1.08-.142-1.662-1.505-1.662h-.838v4.106h2.216c2.472,0,3-1.108,3.3-3.225h.6Z" style="fill:#cfcfcf"/><path d="M27.727,19.186c-.54,0-1.96,0-2.415.029V18.6h1.179l-2.557-3.552-2.529,3.381A4.1,4.1,0,0,0,22.7,18.6v.611c-.355-.029-1.576-.029-2.017-.029-.4,0-1.548,0-1.875.029V18.6h.383a7.459,7.459,0,0,0,.824-.043c.5-.043.54-.085.667-.256L23.536,14.5l-3.153-4.418H19V9.47c.384.028,1.79.028,2.273.028.582,0,1.918,0,2.429-.028v.611H22.528l2.117,2.955,2.074-2.784a4.1,4.1,0,0,0-1.293-.17V9.47c.356.028,1.591.028,2.032.028.4,0,1.534,0,1.861-.028v.611h-.369a5.264,5.264,0,0,0-.838.043c-.469.043-.526.071-.667.256l-2.4,3.21L28.636,18.6H30v.611C29.645,19.186,28.182,19.186,27.727,19.186Z" style="fill:#cfcfcf"/>`,
|
||
"Less": `<defs><linearGradient id="a" x1="-3.609" y1="-492.685" x2="-3.609" y2="-480.271" gradientTransform="translate(19.712 502.891)" gradientUnits="userSpaceOnUse"><stop offset="0.15" stop-color="#2a4f84"/><stop offset="0.388" stop-color="#294e82"/><stop offset="1" stop-color="#172e4e"/></linearGradient></defs><title>file_type_less</title><path d="M28.559,20.226a2.4,2.4,0,0,1-2.394,2.394H6.04a2.4,2.4,0,0,1-2.394-2.394V12.6A2.4,2.4,0,0,1,6.04,10.206H26.165A2.4,2.4,0,0,1,28.559,12.6Z" style="fill:url(#a)"/><path d="M24.349,16.25a1.972,1.972,0,0,1,1.578,1.891,1.69,1.69,0,0,1-.653,1.4,2.934,2.934,0,0,1-1.862.559,4.558,4.558,0,0,1-2.241-.618,1.986,1.986,0,0,1,.16-.669,1.83,1.83,0,0,1,.35-.576,3.7,3.7,0,0,0,1.649.493.965.965,0,0,0,.51-.112.339.339,0,0,0,.178-.3q0-.353-.546-.529l-.653-.247q-1.482-.54-1.482-1.762a1.753,1.753,0,0,1,.623-1.416,2.587,2.587,0,0,1,1.678-.648,5.094,5.094,0,0,1,1.15.147,4.555,4.555,0,0,1,1.032.472,1.668,1.668,0,0,1-.13.722,1.22,1.22,0,0,1-.38.558,4.261,4.261,0,0,0-1.66-.446.544.544,0,0,0-.362.106.338.338,0,0,0-.124.27q0,.282.451.446l.736.259Z" style="fill:#f6f6f6"/><path d="M19.1,16.25a1.972,1.972,0,0,1,1.577,1.891,1.691,1.691,0,0,1-.652,1.4,2.937,2.937,0,0,1-1.862.559,4.56,4.56,0,0,1-2.241-.618,1.981,1.981,0,0,1,.16-.669,1.821,1.821,0,0,1,.35-.576,3.7,3.7,0,0,0,1.649.493.963.963,0,0,0,.51-.112.34.34,0,0,0,.178-.3q0-.353-.546-.529l-.653-.247q-1.482-.54-1.482-1.762a1.752,1.752,0,0,1,.623-1.416,2.585,2.585,0,0,1,1.677-.648,5.088,5.088,0,0,1,1.15.147,4.552,4.552,0,0,1,1.032.472,1.668,1.668,0,0,1-.13.722,1.22,1.22,0,0,1-.38.558,4.263,4.263,0,0,0-1.661-.446.543.543,0,0,0-.362.106.339.339,0,0,0-.124.27q0,.282.451.446l.736.259Z" style="fill:#f6f6f6"/><path d="M15.264,16.333a2.822,2.822,0,0,0-.172-1,2.239,2.239,0,0,0-.492-.787,2.28,2.28,0,0,0-.777-.517,2.737,2.737,0,0,0-1.026-.314,2.8,2.8,0,0,0-1.18.361,2.256,2.256,0,0,0-.83.646,2.765,2.765,0,0,0-.487.969,4.4,4.4,0,0,0-.16,1.216,5.681,5.681,0,0,0,.13,1.257,2.628,2.628,0,0,0,.445,1,2.107,2.107,0,0,0,.818.657,2.935,2.935,0,0,0,1.251.277,3.952,3.952,0,0,0,2.324-.712,1.865,1.865,0,0,0-.484-1.081,6.188,6.188,0,0,1-.857.262,3.208,3.208,0,0,1-.656.079,1.017,1.017,0,0,1-.815-.29,1.187,1.187,0,0,1-.271-.77h3.083A4.447,4.447,0,0,0,15.264,16.333Zm-3.248.081a2.433,2.433,0,0,1,.218-1,.632.632,0,0,1,.559-.264.66.66,0,0,1,.582.282,1.749,1.749,0,0,1,.194.856v.13H12.016Z" style="fill:#f6f6f6"/><path d="M29.18,17.2a1.605,1.605,0,0,0-.53,1.265v2.051a1.81,1.81,0,0,1-.683,1.557,2.8,2.8,0,0,1-1.654.549l-.373,0V21.594a1.241,1.241,0,0,0,.595-.334,1.369,1.369,0,0,0,.419-1.047V18.556a2.545,2.545,0,0,1,.257-1.323,2.5,2.5,0,0,1,1.2-.838,2.528,2.528,0,0,1-1.324-1.179,2.956,2.956,0,0,1-.135-1.165V12.533a1.458,1.458,0,0,0-.366-1.054,1.152,1.152,0,0,0-.648-.314v-.96c.445,0,.669,0,.928,0a1.676,1.676,0,0,1,1.023.442,2,2,0,0,1,.673,1.009,2.33,2.33,0,0,1,.086.7v1.757a1.846,1.846,0,0,0,.5,1.383,2.113,2.113,0,0,0,.854.479v.794a1.943,1.943,0,0,0-.82.426Z" style="fill:#f6f6f6;stroke:#404040;stroke-miterlimit:10;stroke-width:0.25px"/><path d="M5.594,10.206H5.26a1.673,1.673,0,0,0-1.023.442,1.71,1.71,0,0,0-.673,1.009,3.531,3.531,0,0,0-.038.7v1.757A1.867,1.867,0,0,1,2.981,15.5,2.847,2.847,0,0,1,2,15.977v.793a2.552,2.552,0,0,1,.947.426,1.638,1.638,0,0,1,.577,1.265v2.051A1.781,1.781,0,0,0,4.16,22.07a2.8,2.8,0,0,0,1.654.55l.421,0V21.594a1.47,1.47,0,0,1-.643-.334,1.355,1.355,0,0,1-.371-1.047V18.557a2.516,2.516,0,0,0-.305-1.323,2.5,2.5,0,0,0-1.2-.838,2.529,2.529,0,0,0,1.324-1.178,2.857,2.857,0,0,0,.183-1.165V12.534A1.462,1.462,0,0,1,5.54,11.48a1.313,1.313,0,0,1,.575-.271l.428,0V10.206H5.594Z" style="fill:#f6f6f6;stroke:#404040;stroke-miterlimit:10;stroke-width:0.25px"/><path d="M9.537,18.529h-.32c-.348,0-.479-.183-.479-.551V11.219a1.256,1.256,0,0,0-.268-.856c-.15-.164-.411-.162-.783-.162H6.964l-.085,0v8.106a1.875,1.875,0,0,0,.352,1.24,1.441,1.441,0,0,0,1.145.393,7.859,7.859,0,0,0,1.269-.118,2.23,2.23,0,0,0,.036-.509,2.278,2.278,0,0,0-.142-.782Z" style="fill:#f6f6f6"/>`,
|
||
"Liquid": `<path d="M29.988,22.372l-.748.048a5.209,5.209,0,0,1-2.99-.671,7.8,7.8,0,0,0-7.8,0,5.275,5.275,0,0,1-5.3.01A7.262,7.262,0,0,0,9.263,20.7a7.229,7.229,0,0,0-3.94,1.06,4.751,4.751,0,0,1-2.47.7l-.838,0c0,.889-.009,1.739-.015,2.515l.861,0a7.237,7.237,0,0,0,3.75-1.052,4.763,4.763,0,0,1,2.659-.7,4.835,4.835,0,0,1,2.634.718,7.794,7.794,0,0,0,7.8,0,5.287,5.287,0,0,1,5.319,0,7.709,7.709,0,0,0,4.4.989L30,24.888C29.995,24.1,29.991,23.249,29.988,22.372Z" style="fill:#004999"/><path d="M29.983,15.581l-.743.047a5.226,5.226,0,0,1-2.99-.671,7.8,7.8,0,0,0-7.8,0,5.278,5.278,0,0,1-5.3.01A7.312,7.312,0,0,0,9.263,13.91a7.3,7.3,0,0,0-3.941,1.06,4.742,4.742,0,0,1-2.469.7l-.828,0c0,.849,0,1.693,0,2.515l.84,0a7.237,7.237,0,0,0,3.75-1.052,4.7,4.7,0,0,1,2.659-.7,4.8,4.8,0,0,1,2.634.718,7.794,7.794,0,0,0,7.8,0,5.287,5.287,0,0,1,5.319,0,7.709,7.709,0,0,0,4.4.989l.568-.037C29.983,17.269,29.983,16.424,29.983,15.581Z" style="fill:#004999"/><path d="M29.24,9.137a5.254,5.254,0,0,1-2.99-.671,7.8,7.8,0,0,0-7.8,0,5.275,5.275,0,0,1-5.3.009A7.16,7.16,0,0,0,9.263,7.42a7.159,7.159,0,0,0-3.94,1.059,4.738,4.738,0,0,1-2.469.7l-.834,0c0,.82,0,1.664,0,2.517l.836,0a7.237,7.237,0,0,0,3.75-1.052,4.738,4.738,0,0,1,2.659-.706,4.814,4.814,0,0,1,2.634.719,7.791,7.791,0,0,0,7.8,0,5.293,5.293,0,0,1,5.319,0,7.732,7.732,0,0,0,4.4.988l.568-.037c0-.859,0-1.7.007-2.516Z" style="fill:#004999"/>`,
|
||
"Lisp": `<defs><linearGradient id="a" x1="1925.785" y1="-1383.075" x2="2302.351" y2="-1868.557" gradientTransform="matrix(0.048, 0, 0, -0.045, -82.539, -54.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8381c5"/><stop offset="0.566" stop-color="#7e55b3" stop-opacity="0.996"/><stop offset="1" stop-color="#a52ecb" stop-opacity="0.992"/></linearGradient><linearGradient id="b" x1="2214.187" y1="-1750.225" x2="1930.974" y2="-1408.342" gradientTransform="matrix(0.054, 0, 0, -0.054, -95.188, -68.487)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#411f5d"/><stop offset="1" stop-color="#5b2a85"/></linearGradient></defs><title>file_type_emacs</title><path d="M29.363,16A13.364,13.364,0,1,1,16,2.5,13.432,13.432,0,0,1,29.363,16Z" style="stroke-width:0.75px;fill:url(#a);stroke:url(#b)"/><path d="M11.406,25.483a18.157,18.157,0,0,0,2.587-.048,41.728,41.728,0,0,0,4.5-.639,30.671,30.671,0,0,0,3.132-.839c1.142-.421,1.764-.778,2.043-1.284a.62.62,0,0,0-.441-.692c-1.347-.565-2.908-.463-6-.528-3.427-.118-4.567-.691-5.174-1.153-.582-.469-.29-1.765,2.206-2.907a54.266,54.266,0,0,1,6.184-1.73c-1.659-.82-4.753-2.262-5.389-2.573-.558-.273-1.451-.684-1.644-1.182-.219-.478.518-.889.93-1.007a20.3,20.3,0,0,1,4.9-.647,4.308,4.308,0,0,0,1-.069A1.767,1.767,0,0,0,21.879,7.9a2.775,2.775,0,0,0-3.286-1.81C17.22,6.338,13.908,7.3,13.908,7.3c4.093-.035,4.779.033,5.085.461.181.253-.082.6-1.174.777-1.189.194-3.659.428-3.659.428-2.37.141-4.04.15-4.54,1.21-.327.693.349,1.3.645,1.688a12.728,12.728,0,0,0,4.225,2.7c.438.208,1.723.6,1.723.6a11.52,11.52,0,0,0-8.1,2.287c-1.807,1.672-1.008,3.665,2.695,4.891a12.755,12.755,0,0,0,6.534.772c1.922-.1,2.224-.042,2.244.116.027.222-2.134.773-2.724.944-1.5.433-5.436,1.307-5.456,1.312Z" style="fill:#fff"/>`,
|
||
"LiveScript": `<polygon points="5.504 2.007 8.986 2 8.986 21.746 10.759 19.987 10.759 3.755 12.497 3.755 12.497 18.24 14.253 16.487 14.253 3.755 15.997 3.755 15.997 14.729 17.735 12.962 17.735 3.755 19.461 3.755 19.461 11.225 21.245 9.461 21.245 3.755 22.972 3.755 22.972 7.723 24.738 5.975 24.739 3.755 26.483 3.755 26.483 5.482 28.209 5.482 28.209 7.267 25.911 7.268 24.184 8.993 28.209 8.993 28.209 10.719 22.438 10.719 20.698 12.504 28.209 12.504 28.209 14.23 18.961 14.23 17.205 16.014 28.209 16.014 28.209 17.741 15.455 17.741 13.715 19.496 28.209 19.496 28.209 21.252 11.98 21.252 10.242 22.978 29.982 22.978 29.989 26.489 8.986 26.489 8.986 30 5.504 30 5.504 26.489 2.011 26.489 2.011 22.978 5.504 22.978 5.503 2 5.504 2.007" style="fill:#317eac"/>`,
|
||
"Log file": `<path d="M29.4,27.6H2.5V4.5H29.4Zm-25.9-1H28.4V5.5H3.5Z" style="fill:#00bd02"/><rect x="2.5" y="5.5" width="26.9" height="1.9" style="fill:#00bd02"/><rect x="11.333" y="9.5" width="8.167" height="1" style="fill:#00bd02"/><rect x="11.333" y="12.083" width="12.5" height="1" style="fill:#00bd02"/><rect x="11.333" y="14.75" width="10.617" height="1" style="fill:#00bd02"/><rect x="11.333" y="17.583" width="14.167" height="1" style="fill:#00bd02"/><rect x="11.333" y="20.5" width="9.834" height="1" style="fill:#00bd02"/><rect x="11.5" y="23.083" width="12.167" height="1" style="fill:#00bd02"/><rect x="5.5" y="9.5" width="4.333" height="1" style="fill:#00bd02"/><rect x="5.5" y="12.083" width="4.333" height="1" style="fill:#00bd02"/><rect x="5.5" y="12.083" width="4.333" height="1" style="fill:#00bd02"/><rect x="5.5" y="14.667" width="4.333" height="1" style="fill:#00bd02"/><rect x="5.5" y="17.25" width="4.333" height="1" style="fill:#00bd02"/><rect x="5.5" y="20.5" width="4.333" height="1" style="fill:#00bd02"/><rect x="5.5" y="23.083" width="4.333" height="1" style="fill:#00bd02"/>`,
|
||
"LOLCODE": `<path d="M21.3,3.73a3.94,3.94,0,0,1,1.041-.62,8.435,8.435,0,0,1,.556,3.385,24.865,24.865,0,0,1-.643,5.019c-.368-.18-.736-.364-1.1-.554a11.754,11.754,0,0,0,.273-3.747,3.08,3.08,0,0,0-.255-.865,5.142,5.142,0,0,0-2.016,2.07c-.319-.24-.652-.459-.985-.676A15.716,15.716,0,0,1,21.3,3.73Z" style="fill:#ededed"/><path d="M19.451,8.6a4.574,4.574,0,0,1,1.509-1.563,6.685,6.685,0,0,1,.09,2.671C20.517,9.343,19.975,8.987,19.451,8.6Z" style="fill:#ededed"/><path d="M16.461,10.076c-.038-1.134-.031-2.269-.026-3.4-.9.493-1.758,1.071-2.648,1.589-.453.27-.908.536-1.36.808.224-.163.457-.312.69-.462-.861-1.224-1.971-2.5-3.53-2.748a10.964,10.964,0,0,0-.365,5.147c.318-.195.633-.4.962-.572-.474.319-.964.615-1.446.92-.957.6-1.922,1.192-2.892,1.777a1.232,1.232,0,0,0-.391.32c-.1,1.395-.34,4.392-.34,4.392-.254,3.668-.522,7.336-.826,11,4.062.343,8.118.742,12.179,1.076C16.458,23.3,16.472,16.69,16.461,10.076Z" style="fill:#ededed"/><path d="M21.1,2.977A5.884,5.884,0,0,1,22.706,2a10.064,10.064,0,0,1,.772,4.606,24.591,24.591,0,0,1-.508,4.459c1.2.846,2.433,1.645,3.618,2.509q.44,6.38.907,12.758c.066.839.094,1.68.216,2.513-3.029.279-6.057.591-9.085.886a19.137,19.137,0,0,0-2.158.27v-.083c-.01-6.614,0-13.227-.007-19.841-.038-1.134-.031-2.269-.026-3.4v-.1c.406.292.826.562,1.243.839A16.274,16.274,0,0,1,21.1,2.977Zm.2.752a15.716,15.716,0,0,0-3.128,4.011c.334.217.666.437.985.676a5.142,5.142,0,0,1,2.016-2.07,3.08,3.08,0,0,1,.255.865,11.754,11.754,0,0,1-.273,3.747c.364.19.731.374,1.1.554a24.865,24.865,0,0,0,.643-5.019,8.435,8.435,0,0,0-.556-3.385A3.94,3.94,0,0,0,21.3,3.73ZM19.451,8.6c.524.383,1.066.739,1.6,1.108a6.685,6.685,0,0,0-.09-2.671A4.574,4.574,0,0,0,19.451,8.6Z" style="fill:#8d2701"/><path d="M9.219,5.062a3.581,3.581,0,0,1,2.205.748A12.9,12.9,0,0,1,13.788,8.26c-.453.27-.908.536-1.36.808.224-.163.457-.312.69-.462-.861-1.224-1.971-2.5-3.53-2.748a10.964,10.964,0,0,0-.365,5.147c.318-.195.633-.4.962-.572-.474.319-.964.615-1.446.92A14.1,14.1,0,0,1,9.219,5.062Z" style="fill:#8d2701"/><path d="M10.507,8.476a2.455,2.455,0,0,1,1.517.88l-.36.2A2.69,2.69,0,0,0,10.739,9a3.318,3.318,0,0,0-.165,1.281l-.344.11A7.021,7.021,0,0,1,10.507,8.476Z" style="fill:#8d2701"/><path d="M12.139,10.693a.487.487,0,0,1,.542.01,1.552,1.552,0,0,1,.062.6c-.039.784.024,1.573-.076,2.354a1.013,1.013,0,0,1-1.012.886c-.233-.05-.278-.341-.278-.541,0-.675.1-1.347.066-2.024A1.3,1.3,0,0,1,12.139,10.693Zm.15,1.084a.891.891,0,0,0,.251-.866C12.218,11.061,11.9,11.507,12.289,11.777Z" style="fill:#8d2701"/><path d="M14.5,13.728a17.671,17.671,0,0,1,1.928-.822c-.024.064-.069.191-.092.255-.649.358-1.36.6-2.021.938a12.118,12.118,0,0,0-3.238,2.248A7.2,7.2,0,0,1,10,17.381a4.166,4.166,0,0,1,.98-1.246A12.727,12.727,0,0,1,14.5,13.728Z" style="fill:#8d2701"/><path d="M7.628,13.231a.989.989,0,0,1,.594-.152,18.114,18.114,0,0,1-.1,2.654.713.713,0,0,1-.892.658,21.1,21.1,0,0,1,.082-2.226A1.383,1.383,0,0,1,7.628,13.231Zm.179.831c.268-.112.319-.413.412-.654C7.82,13.312,7.775,13.783,7.807,14.062Z" style="fill:#8d2701"/><path d="M10.823,17.094a13.934,13.934,0,0,1,4.612-1.968c-.01.068-.029.206-.039.274a14.273,14.273,0,0,0-4.475,1.914,2.626,2.626,0,0,1-.681.343C10.3,17.356,10.6,17.249,10.823,17.094Z" style="fill:#8d2701"/><path d="M5.264,17.59A5.144,5.144,0,0,1,8,17.1a1.5,1.5,0,0,1,1.142.665A6.854,6.854,0,0,0,7.6,17.278a6.967,6.967,0,0,0-2.484.564Z" style="fill:#8d2701"/><path d="M10.578,17.725a9.59,9.59,0,0,1,3.61-.566c.24.021.321.2.313.424a3.238,3.238,0,0,0-1.956-.09,21.688,21.688,0,0,0-2.557.658C9.995,17.829,10.345,17.809,10.578,17.725Z" style="fill:#8d2701"/><path d="M9.268,17.676c.149-.176.533-.332.664-.062a1.3,1.3,0,0,1-.516.993C9.268,18.337,8.973,17.952,9.268,17.676Z" style="fill:#8d2701"/><path d="M5.744,18.629a5.9,5.9,0,0,1,3.182-.618c-.182.235-.493.178-.751.208a5.663,5.663,0,0,0-1.72.33c-.344.128-.665.31-1.02.409A.6.6,0,0,1,5.744,18.629Z" style="fill:#8d2701"/><path d="M6.9,19.114a9.676,9.676,0,0,1,2.2-.854c-.1.3-.441.338-.7.444a7.839,7.839,0,0,0-2.564,1.415C5.938,19.584,6.488,19.369,6.9,19.114Z" style="fill:#8d2701"/><path d="M11.635,19.7a3.11,3.11,0,0,0,1.91-1.383c.347-.1.273.275.26.494a2.056,2.056,0,0,1-.95,1.036,12.365,12.365,0,0,1-1.827,6.419A2.342,2.342,0,0,1,8.879,27.5a2.251,2.251,0,0,1-1.535-1.49,10.894,10.894,0,0,1-.69-4.665c-.157-.112-.369-.179-.46-.362-.13-.2.011-.425.047-.631.19.151.345.392.606.42a3.617,3.617,0,0,0,1.863-.4,1.588,1.588,0,0,0,.709-.662,3.881,3.881,0,0,0,.431.266A4.28,4.28,0,0,0,11.635,19.7Zm-2.2.835a4.132,4.132,0,0,1-2.462.809,11.049,11.049,0,0,0,.358,3.526,3.226,3.226,0,0,1,.9-1.282,2.055,2.055,0,0,1,2.3-.2,2.3,2.3,0,0,1,.884,1.172,14.659,14.659,0,0,0,1.005-4.489A5.167,5.167,0,0,1,9.435,20.532Zm-.329,3.26a2.273,2.273,0,0,0-1.5,1.434c-.123.269.1.517.225.738.331.462.795,1,1.431.893a2.868,2.868,0,0,0,1.769-1.6A1.6,1.6,0,0,0,9.106,23.792Z" style="fill:#8d2701"/>`,
|
||
"Lua": `<path d="M16.5,30l-.011-.321c.4-.014.8-.045,1.19-.094l.039.319C17.312,29.952,16.9,29.984,16.5,30Zm-1.222-.011c-.4-.021-.814-.061-1.216-.118l.045-.318c.393.055.793.094,1.188.115ZM18.92,29.7l-.067-.314c.387-.083.776-.184,1.155-.3l.094.307C19.714,29.511,19.316,29.615,18.92,29.7Zm-6.063-.053c-.4-.091-.791-.2-1.177-.326l.1-.306c.377.122.764.23,1.15.319Zm8.4-.665-.121-.3c.364-.148.728-.314,1.08-.493l.006,0,.145.286,0,0C22,28.661,21.626,28.831,21.253,28.982Zm-10.718-.088c-.374-.158-.745-.335-1.1-.524l.15-.284c.35.186.713.358,1.078.512Zm12.893-1.021-.17-.273c.337-.21.668-.437.984-.675l.193.257C24.111,27.425,23.772,27.658,23.428,27.873ZM8.379,27.751c-.341-.22-.676-.459-1-.708l.2-.253c.312.243.64.476.972.691Zm17-1.346-.215-.239c.294-.265.58-.546.851-.836l.235.219C25.972,25.846,25.679,26.134,25.378,26.4ZM6.454,26.252c-.3-.276-.585-.569-.856-.87l.239-.215c.265.294.547.58.836.85ZM27.041,24.62l-.253-.2c.244-.312.476-.639.692-.972l.27.175C27.529,23.966,27.29,24.3,27.041,24.62ZM4.82,24.439c-.244-.324-.476-.662-.692-1.007l.272-.17c.21.337.438.668.676.984Zm23.547-1.867-.284-.151c.186-.35.358-.713.513-1.078l.3.125C28.735,21.843,28.558,22.214,28.368,22.572Zm-24.841-.2-.006-.012c-.183-.359-.352-.728-.5-1.1l.3-.121c.147.362.312.724.491,1.074l.006.012ZM29.32,20.325l-.306-.1c.122-.377.23-.764.319-1.15l.313.072C29.555,19.543,29.446,19.939,29.32,20.325ZM2.608,20.107c-.12-.388-.223-.786-.308-1.182l.314-.067c.083.387.184.776.3,1.155ZM29.87,17.946l-.318-.045c.056-.393.094-.793.115-1.188l.321.017C29.967,17.135,29.927,17.544,29.87,17.946ZM2.1,17.72c-.05-.4-.082-.812-.1-1.218l.321-.011c.014.4.046.8.094,1.19Zm27.582-2.2c-.014-.4-.045-.8-.093-1.19l.319-.039c.049.4.082.813.1,1.218ZM2.331,15.3,2.01,15.28c.021-.405.061-.814.117-1.216l.318.045C2.39,14.5,2.352,14.9,2.331,15.3Zm27.057-2.144c-.083-.387-.184-.776-.3-1.155L29.4,11.9c.119.388.223.786.307,1.183ZM2.663,12.934l-.313-.072c.091-.4.2-.791.326-1.177l.306.1C2.859,12.161,2.752,12.548,2.663,12.934Zm26.026-2.062c-.149-.366-.315-.732-.5-1.086l.286-.146c.185.363.355.736.507,1.111ZM3.4,10.665l-.3-.125c.158-.374.334-.745.524-1.1l.284.15C3.724,9.937,3.552,10.3,3.4,10.665ZM4.513,8.557l-.27-.174c.22-.341.458-.676.707-1l.254.2C4.961,7.9,4.728,8.224,4.513,8.557ZM5.977,6.676l-.235-.219c.276-.3.569-.585.87-.857l.215.239C6.533,6.1,6.247,6.386,5.977,6.676Zm1.77-1.6-.193-.257c.323-.244.662-.477,1.007-.692l.17.272C8.394,4.614,8.063,4.841,7.747,5.079Zm15.705-.558-.018-.012.175-.27.018.011Zm-1.047-.616c-.35-.186-.713-.358-1.078-.512l.125-.3c.374.158.745.334,1.1.524ZM9.769,3.815l-.146-.286.018-.009c.356-.181.724-.349,1.093-.5l.121.3c-.361.147-.72.311-1.068.488Zm10.44-.838c-.377-.122-.764-.229-1.151-.317l.072-.313c.4.091.792.2,1.178.325Zm-8.229-.06-.094-.307c.388-.119.786-.223,1.182-.308l.067.314C12.747,2.7,12.359,2.8,11.98,2.917Zm5.9-.473c-.393-.055-.793-.092-1.188-.113l.016-.321c.405.021.814.059,1.216.115Zm-3.572-.026-.04-.319c.4-.05.812-.083,1.218-.1l.012.321C15.106,2.337,14.705,2.369,14.312,2.418Z" style="fill:gray"/><circle cx="16" cy="15.998" r="10.708" style="fill:navy"/><circle cx="20.435" cy="11.562" r="3.136" style="fill:#fff"/><circle cx="26.708" cy="5.29" r="3.137" style="fill:navy"/><path d="M13.1,21.352v-.79H9.629V14.326h-.9v7.026H13.1" style="fill:#fff"/><path d="M17.916,21.352V16.3h-.8v2.785c0,1.031-.54,1.706-1.378,1.706A.95.95,0,0,1,14.7,19.8V16.3h-.8v3.817c0,.838.626,1.378,1.609,1.378a1.863,1.863,0,0,0,1.687-.925v.781h.723" style="fill:#fff"/><path d="M23.791,21.333v-.607a.664.664,0,0,1-.173.019c-.279,0-.434-.145-.434-.4V17.536c0-.9-.655-1.378-1.9-1.378-1.224,0-1.976.472-2.024,1.638h.81c.067-.617.434-.9,1.185-.9.723,0,1.128.27,1.128.752v.212c0,.337-.2.482-.838.559a5.763,5.763,0,0,0-1.619.308,1.327,1.327,0,0,0-.887,1.311c0,.916.636,1.455,1.658,1.455a2.363,2.363,0,0,0,1.715-.742.855.855,0,0,0,.829.665,1.967,1.967,0,0,0,.549-.087m-1.407-1.725a1.366,1.366,0,0,1-1.513,1.185c-.626,0-.993-.222-.993-.771,0-.53.357-.761,1.214-.887a4,4,0,0,0,1.291-.279v.752" style="fill:#fff"/>`,
|
||
"Markdown": `<rect x="2.5" y="7.955" width="27" height="16.091" style="fill:none;stroke:#755838"/><polygon points="5.909 20.636 5.909 11.364 8.636 11.364 11.364 14.773 14.091 11.364 16.818 11.364 16.818 20.636 14.091 20.636 14.091 15.318 11.364 18.727 8.636 15.318 8.636 20.636 5.909 20.636" style="fill:#755838"/><polygon points="22.955 20.636 18.864 16.136 21.591 16.136 21.591 11.364 24.318 11.364 24.318 16.136 27.045 16.136 22.955 20.636" style="fill:#755838"/>`,
|
||
"MATLAB": `<defs><linearGradient id="a" x1="16.803" y1="16.631" x2="15.013" y2="22.411" gradientTransform="matrix(1, 0, 0, -1, 0, 32)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#512"/><stop offset="0.23" stop-color="#523"/><stop offset="0.36" stop-color="#534"/><stop offset="0.51" stop-color="#645"/><stop offset="0.66" stop-color="#568"/><stop offset="0.84" stop-color="#29d"/></linearGradient><linearGradient id="b" x1="29.71" y1="18.983" x2="11.71" y2="14.563" gradientUnits="userSpaceOnUse"><stop offset="0.081" stop-color="#c33"/><stop offset="0.189" stop-color="#de5239"/><stop offset="0.313" stop-color="#f06e3e"/><stop offset="0.421" stop-color="#fa8042"/><stop offset="0.5" stop-color="#fe8643"/><stop offset="0.58" stop-color="#fa7f42"/><stop offset="0.696" stop-color="#ef6c3e"/><stop offset="0.833" stop-color="#dc4c37"/><stop offset="0.916" stop-color="#cf3633"/></linearGradient></defs><title>file_type_matlab</title><path d="M2,17.55l7.97-3.22a20.7,20.7,0,0,1,2.72-2.95c.66-.35,1.9-.16,4.17-2.98,2.2-2.75,2.9-5.1,3.93-5.1,1.63,0,2.83,3.52,4.65,8.85A115.629,115.629,0,0,0,30,24.12c-1.9-1.77-3.52-3.68-5.37-3.63-1.72.04-3.63,2.08-5.72,4.7-1.66,2.1-3.86,3.54-4.72,3.51,0,0-2.22-6.28-4.08-7.3a2.641,2.641,0,0,0-2.39.2L2,17.54Z" style="fill:#49d"/><path d="M19.8,4.02c-.67.9-1.48,2.55-2.94,4.38-2.27,2.82-3.5,2.63-4.17,2.98a19.674,19.674,0,0,0-2.72,2.95l3.3,2.41c2.8-3.82,4.3-7.96,5.47-10.64A13.579,13.579,0,0,1,19.8,4.02Z" style="fill:url(#a)"/><path d="M20.8,3.3c-2.18,0-3.67,11.48-11.72,17.89,2.26-.37,4.22,5.24,5.12,7.51,4-.68,7.2-8.33,10.43-8.21,1.85.07,3.47,1.86,5.37,3.63C25.66,15,23.63,3.3,20.8,3.3Z" style="fill:url(#b)"/>`,
|
||
"MAXScript": `<path d="M14.4,7.568,20.212,2H7.273L4.848,7.536l9.557.032ZM4.848,7.536l6.844,2.6L14.4,7.568m-.013,3.622-2.7-1.053L5.263,16.1l6.286,5.823,2.808-1.1L14.4,7.568m0,0,12.8,8.376L20.212,2M27.2,15.944,14.391,11.19m-.035,9.636-.032,3.685M20.228,30l-8.679-8.073L4.8,24.464,7.257,30Zm0,0L27.2,15.944,14.325,24.512M27.2,15.944,14.357,20.826" style="fill:none;stroke:#1d1d1b;stroke-miterlimit:22.92558479309082;stroke-width:0.028349999338388443px"/><polygon points="14.391 11.19 27.2 15.944 14.405 7.568 14.391 11.19 14.391 11.19" style="fill:#181b17;fill-rule:evenodd"/><polygon points="27.2 15.944 14.357 20.826 14.325 24.509 14.326 24.511 27.2 15.944 27.2 15.944" style="fill:#1a1d1a;fill-rule:evenodd"/><polygon points="14.405 7.568 27.2 15.944 20.212 2 14.405 7.568 14.405 7.568" style="fill:#005f5e;fill-rule:evenodd"/><polygon points="27.2 15.944 14.326 24.511 20.228 30 27.2 15.944 27.2 15.944" style="fill:#004242;fill-rule:evenodd"/><polygon points="14.357 20.826 27.2 15.944 14.391 11.19 14.357 20.826 14.357 20.826" style="fill:#005152;fill-rule:evenodd"/><polygon points="14.357 20.826 14.391 11.19 11.692 10.137 5.263 16.104 11.549 21.927 14.357 20.826 14.357 20.826" style="fill:#00696b;fill-rule:evenodd"/><polygon points="11.692 10.137 14.391 11.19 14.405 7.568 11.692 10.137 11.692 10.137" style="fill:#1b2725;fill-rule:evenodd"/><polygon points="14.357 20.826 11.549 21.927 14.325 24.509 14.357 20.826 14.357 20.826" style="fill:#1c2624;fill-rule:evenodd"/><polygon points="14.325 24.512 4.8 24.464 7.257 30 20.228 30 14.326 24.511 14.325 24.512 14.325 24.512" style="fill:#006466;fill-rule:evenodd"/><polygon points="4.848 7.536 14.405 7.568 20.212 2 7.273 2 4.848 7.536 4.848 7.536" style="fill:#00767a;fill-rule:evenodd"/><polygon points="14.405 7.568 4.848 7.536 11.692 10.137 14.405 7.568 14.405 7.568" style="fill:#1e3938;fill-rule:evenodd"/><polygon points="11.549 21.927 4.8 24.464 14.325 24.512 14.325 24.509 11.549 21.927 11.549 21.927" style="fill:#20302e;fill-rule:evenodd"/>`,
|
||
"MEL": `<defs><linearGradient id="a" x1="-611.348" y1="-67.488" x2="-600.272" y2="-65.335" gradientTransform="matrix(1.437, 0, 0, -1.437, 894.417, -82.292)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0f6067"/><stop offset="0.5" stop-color="#05abac"/><stop offset="1" stop-color="#58bec4"/></linearGradient><linearGradient id="b" x1="-603.594" y1="-77.699" x2="-602.011" y2="-59.604" gradientTransform="matrix(1.437, 0, 0, -1.437, 894.417, -82.292)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#117c83"/><stop offset="0.5" stop-color="#21b5b5"/><stop offset="1" stop-color="#7ed4d4"/></linearGradient><linearGradient id="c" x1="-612.757" y1="-59.906" x2="-616.934" y2="-72.76" gradientTransform="matrix(1.437, 0, 0, -1.437, 894.417, -82.292)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#9accd3"/><stop offset="0.5" stop-color="#72aeb3"/><stop offset="1" stop-color="#317d7f"/></linearGradient><linearGradient id="d" x1="-621.851" y1="-74.579" x2="-614.84" y2="-72.301" gradientTransform="matrix(1.437, 0, 0, -1.437, 894.417, -82.292)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#21626e"/><stop offset="0.5" stop-color="#157c84"/><stop offset="1" stop-color="#03a3a5"/></linearGradient><linearGradient id="e" x1="-616.369" y1="-64.469" x2="-625.34" y2="-72.835" gradientTransform="matrix(1.437, 0, 0, -1.437, 894.417, -82.292)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0b7c81"/><stop offset="0.5" stop-color="#068d90"/><stop offset="1" stop-color="#16b1b1"/></linearGradient><linearGradient id="f" x1="-608.072" y1="-74.678" x2="-603.488" y2="-70.966" gradientTransform="matrix(1.437, 0, 0, -1.437, 894.417, -82.292)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0a8a8f"/><stop offset="0.5" stop-color="#0f7c82"/><stop offset="1" stop-color="#1a5964"/></linearGradient><linearGradient id="g" x1="-601.134" y1="-70.113" x2="-606.008" y2="-67.067" gradientTransform="matrix(1.437, 0, 0, -1.437, 894.417, -82.292)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#256a77"/><stop offset="0.5" stop-color="#0d9499"/><stop offset="1" stop-color="#06a0a2"/></linearGradient></defs><title>file_type_maya</title><path d="M21.6,3.462H30L18.767,24.211s-1.893-5.5-2.706-7.459" style="fill:url(#a)"/><path d="M23.669,29.118H30V3.462C29.995,16.869,24.36,29.118,23.669,29.118Z" style="fill:url(#b)"/><path d="M18.767,24.211H13.541L2,3.462c2.047-.26,6.135-.611,8.16-.776Z" style="fill:url(#c)"/><path d="M8.693,16.019C6.96,22.866,1.995,29.32,2,29.314c5.752,0,6.991-.835,6.991-1.276V16.54C8.89,16.37,8.794,16.194,8.693,16.019Z" style="fill:url(#d)"/><path d="M2,3.462V29.314c3.147-5.2,4.981-8.6,6.6-13.45C4.6,8.794,2,3.462,2,3.462Z" style="fill:url(#e)"/><polyline points="23.233 28.102 23.669 29.118 23.669 15.647 23.233 16.375" style="fill:url(#f)"/><path d="M23.647,15.673v13.4l.016.043c.452,0,6.332-14.5,6.332-25.656C29.995,3.462,26.406,10.947,23.647,15.673Z" style="fill:url(#g)"/>`,
|
||
"MongoDB": `<defs><linearGradient id="a" x1="-645.732" y1="839.188" x2="-654.59" y2="839.25" gradientTransform="matrix(-0.977, -0.323, -0.29, 0.877, -375.944, -928.287)" gradientUnits="userSpaceOnUse"><stop offset="0.231" stop-color="#999875"/><stop offset="0.563" stop-color="#9b9977"/><stop offset="0.683" stop-color="#a09f7e"/><stop offset="0.768" stop-color="#a9a889"/><stop offset="0.837" stop-color="#b7b69a"/><stop offset="0.896" stop-color="#c9c7b0"/><stop offset="0.948" stop-color="#deddcb"/><stop offset="0.994" stop-color="#f8f6eb"/><stop offset="1" stop-color="#fbf9ef"/></linearGradient><linearGradient id="b" x1="-644.287" y1="823.405" x2="-657.028" y2="845.476" gradientTransform="matrix(-0.977, -0.323, -0.29, 0.877, -375.944, -928.287)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#48a547"/><stop offset="1" stop-color="#3f9143"/></linearGradient><linearGradient id="c" x1="-643.386" y1="839.485" x2="-652.418" y2="833.417" gradientTransform="matrix(-0.977, -0.323, -0.29, 0.877, -375.944, -928.287)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#41a247"/><stop offset="0.352" stop-color="#4ba74b"/><stop offset="0.956" stop-color="#67b554"/><stop offset="1" stop-color="#69b655"/></linearGradient></defs><title>file_type_mongo</title><path d="M16.62,30l-.751-.249s.1-3.8-1.275-4.067c-.9-1.048.133-44.741,3.423-.149a2.712,2.712,0,0,0-1.333,1.523A14.1,14.1,0,0,0,16.62,30Z" style="fill:url(#a)"/><path d="M17.026,26.329a13.223,13.223,0,0,0,5-13.225C20.556,6.619,17.075,4.487,16.7,3.673a9.792,9.792,0,0,1-.825-1.6l.277,18.069S15.578,25.664,17.026,26.329Z" style="fill:url(#b)"/><path d="M15.487,26.569S9.366,22.4,9.72,15.025A15.54,15.54,0,0,1,15.239,3.377,1.725,1.725,0,0,0,15.846,2c.381.82.319,12.243.359,13.579C16.36,20.776,15.916,25.588,15.487,26.569Z" style="fill:url(#c)"/>`,
|
||
"nginx": `<path d="M15.948,2h.065a10.418,10.418,0,0,1,.972.528Q22.414,5.65,27.843,8.774a.792.792,0,0,1,.414.788c-.008,4.389,0,8.777-.005,13.164a.813.813,0,0,1-.356.507q-5.773,3.324-11.547,6.644a.587.587,0,0,1-.657.037Q9.912,26.6,4.143,23.274a.7.7,0,0,1-.4-.666q0-6.582,0-13.163a.693.693,0,0,1,.387-.67Q9.552,5.657,14.974,2.535c.322-.184.638-.379.974-.535" style="fill:#019639"/><path d="M8.767,10.538q0,5.429,0,10.859a1.509,1.509,0,0,0,.427,1.087,1.647,1.647,0,0,0,2.06.206,1.564,1.564,0,0,0,.685-1.293c0-2.62-.005-5.24,0-7.86q3.583,4.29,7.181,8.568a2.833,2.833,0,0,0,2.6.782,1.561,1.561,0,0,0,1.251-1.371q.008-5.541,0-11.081a1.582,1.582,0,0,0-3.152,0c0,2.662-.016,5.321,0,7.982-2.346-2.766-4.663-5.556-7-8.332A2.817,2.817,0,0,0,10.17,9.033,1.579,1.579,0,0,0,8.767,10.538Z" style="fill:#fff"/>`,
|
||
"Nim": `<path d="M16.111,6.405s-1.073.847-2.167,1.69a15.361,15.361,0,0,0-4.527.651c-1.1-.7-2.07-1.469-2.07-1.469S6.52,8.7,6,9.535a11.382,11.382,0,0,0-2.236,1.482C2.961,10.7,2.03,10.31,2,10.3c1.063,2.145,1.778,4.292,3.722,5.583,3.1-4.889,17.48-4.439,20.639-.028C28.4,14.787,29.2,12.5,30,10.38c-.088.029-1.181.395-1.889.665a11.489,11.489,0,0,0-1.986-1.51c-.537-.984-1.319-2.313-1.319-2.313s-.927.689-2,1.44a21.265,21.265,0,0,0-4.681-.512c-1-.826-2.014-1.746-2.014-1.746Z" style="fill:#f3d400"/><path d="M3.1,14.854l2.554,6.185c4.435,5.85,15.759,6.257,20.7.113,1.168-2.633,2.745-6.333,2.745-6.333a13.379,13.379,0,0,1-4.6,3.869,12.217,12.217,0,0,1-2.983.793l-5.465-2.832-5.5,2.775a15.679,15.679,0,0,1-2.983-.764A14.076,14.076,0,0,1,3.1,14.854Z" style="fill:#ffe953"/>`,
|
||
"Nix": `<path d="M13,11.115,6.183,23.76,4.59,20.87l1.839-3.387-3.651-.01L2,16.029l.8-1.477,5.2.018,1.868-3.447Z" style="fill:#7ebae4;fill-rule:evenodd"/><path d="M13.527,21.223h13.64l-1.541,2.922-3.658-.011,1.817,3.389-.779,1.449-1.593,0-2.584-4.825-3.722-.008Z" style="fill:#7ebae4;fill-rule:evenodd"/><path d="M21.467,15.682,14.647,3.037l3.134-.032L19.6,6.4l1.834-3.379h1.557L23.786,4.5,21.174,9.307l1.854,3.455Z" style="fill:#7ebae4;fill-rule:evenodd"/><path d="M10.542,16.324l6.821,12.645L14.229,29l-1.821-3.4-1.834,3.38H9.016l-.8-1.476L10.831,22.7,8.976,19.243Z" style="fill:#5277c3;fill-rule:evenodd"/><path d="M18.464,10.751H4.823L6.365,7.829l3.658.011L8.207,4.451,8.986,3l1.592,0,2.584,4.825,3.722.008Z" style="fill:#5277c3;fill-rule:evenodd"/><path d="M19,20.888,25.817,8.244l1.593,2.89L25.571,14.52l3.651.01L30,15.979l-.8,1.477-5.2-.018-1.868,3.447Z" style="fill:#5277c3;fill-rule:evenodd"/>`,
|
||
"NSIS": `<path d="M27.435,16.037,22.012,21.46l5.423,5.423" style="fill:#00577b"/><path d="M26.884,15.5H16.048l5.423,5.423" style="fill:#0079aa"/><path d="M26.884,14.712,21.461,9.289l-5.423,5.423" style="fill:#0096d3"/><path d="M20.528,9.131H9.683l5.423,5.423M27.435,3.325,22.012,8.748l5.423,5.423" style="fill:#01b0f0"/><path d="M20.528,8.356,15.105,2.933,9.683,8.356" style="fill:#27bcf3"/><path d="M14.172,2.775H3.327L8.749,8.2" style="fill:#4fc9f5"/><path d="M4.568,15.963,9.991,10.54,4.568,5.117" style="fill:#79201b"/><path d="M10.541,11.091,5.119,16.513H15.964" style="fill:#a42d26"/><path d="M5.119,17.288l5.423,5.423,5.423-5.423" style="fill:#cc382f"/><path d="M4.568,17.829V28.675l5.423-5.423L8.4,21.665m13.916,1.2L16.9,17.447l-5.423,5.423" style="fill:#f0453f"/><path d="M11.475,23.644,16.9,29.067l5.423-5.423" style="fill:#f2625d"/><path d="M17.84,29.225H28.685L23.263,23.8" style="fill:#f47f7d"/><path d="M29.889,29.337l-1.68-1.68V2.392a.374.374,0,0,0-.243-.355A.263.263,0,0,0,27.827,2a.359.359,0,0,0-.271.112L21.471,8.2,15.385,2.112,15.3,2.037h-.037A.307.307,0,0,0,15.105,2H2.4a.434.434,0,0,0-.289.112A.38.38,0,0,0,2,2.392a.359.359,0,0,0,.112.271l1.68,1.68V29.617a.374.374,0,0,0,.243.355A.387.387,0,0,0,4.185,30a.359.359,0,0,0,.271-.112L10.541,23.8l6.085,6.085.084.075h.037A.254.254,0,0,0,16.9,30H29.609a.395.395,0,0,0,.28-.663ZM27.435,3.325V14.171L22.012,8.748l5.423-5.423ZM9.991,10.54,4.568,15.963V5.117L9.991,10.54ZM9.683,9.131H20.528l-5.423,5.423L9.683,9.131Zm.859,1.96,5.423,5.423H5.119l5.423-5.423ZM16.9,17.447l5.423,5.423H11.475L16.9,17.447ZM16.048,15.5H26.893l-5.423,5.423L16.048,15.5Zm5.964,5.964,5.423-5.423V26.883L22.012,21.46Zm4.872-6.748H16.048l5.423-5.423,5.413,5.423ZM20.528,8.356H9.683l5.423-5.423,5.423,5.423ZM3.327,2.775H14.172L8.749,8.2Zm1.241,25.9V17.829L8.4,21.665l1.587,1.587L4.568,28.675Zm.551-11.387H15.964l-5.423,5.423L5.119,17.288ZM16.9,29.067l-5.423-5.423H22.32L16.9,29.067Zm.943.159L23.263,23.8l5.423,5.423Z" style="fill:#464049"/>`,
|
||
"Object Pascal": `<defs><linearGradient id="a" x1="16" y1="-0.443" x2="16" y2="22.042" gradientUnits="userSpaceOnUse"><stop offset="0.021" stop-color="#ff0c15"/><stop offset="1" stop-color="#9a0c0f"/></linearGradient></defs><title>file_type_delphi</title><circle cx="16" cy="16" r="14" style="fill:url(#a)"/><path d="M27.545,16.243H4.924a.914.914,0,0,0-1.092.82q.033.429.1.849a12.4,12.4,0,0,0,24.532,0q.075-.5.108-1.021C28.478,16.523,28.211,16.207,27.545,16.243Z" style="fill:#ff6443"/><polyline points="18.48 11.64 23.707 7.266 19.787 5.88 16 11.053" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="15.68 11.026 18.64 5.88 14.853 5.88 13.307 11.293" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="13.04 11.373 13.6 6.706 10.587 7.96 11.013 12.76" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="10.747 13 9.787 8.76 7.707 10.84 9.653 14.68" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.387 15.053 7.493 12.376 6.64 14.466 9.04 16.517" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.04 16.757 6.64 15.213 6.48 17.4 9.2 18.333" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.227 18.846 6.64 18.04 7.227 19.8 9.547 19.8" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.707 20.093 7.707 20.386 8.627 21.746 10.267 21" style="fill:#fae7e3;fill-rule:evenodd"/><path d="M20.023,13.089a6.61,6.61,0,0,0-4.53-2A6.293,6.293,0,0,0,11.3,22.07l4.941.129-2.08-4.16Z" style="fill:#eee;fill-rule:evenodd"/><path d="M16.5,22.366l-5.267-.138-.044-.039a6.453,6.453,0,0,1,4.3-11.264,6.787,6.787,0,0,1,4.643,2.05l.123.123-5.9,4.982Zm-5.14-.455,4.616.121L13.961,18l5.825-4.919a6.43,6.43,0,0,0-4.292-1.835,6.133,6.133,0,0,0-4.131,10.667Z" style="fill:#ee4b2e"/><path d="M12.013,20.493c-4.173-5.813,2.109-8.172,2.478-8.453.451-.344-7.59,1.785-3.226,8.88Z" style="fill:#f04e31;fill-rule:evenodd"/><polygon points="20.72 12.6 13.52 17.567 13.733 18.573 21.467 17.026 20.72 12.6" style="fill:#eee;fill-rule:evenodd"/><path d="M13.61,18.761,13.341,17.5l7.495-5.17.814,4.828Zm.089-1.123.158.747L21.283,16.9,20.6,12.874Z" style="fill:#ee4b2e"/><path d="M15.723,21.319c-3.93-.668-4.283.428-4.283.428L10.267,24.44s1.12-.907,5.493,0l.76-1.388Z" style="fill:#dd0c13;fill-rule:evenodd"/><path d="M14.122,21.6c-.02-.2-1.1-.319-1.677-.123-.732.249-1.219,1.142-1.045,1.213a1.975,1.975,0,0,1,1.125-.986C13.447,21.493,14.142,21.8,14.122,21.6Z" style="fill:#ff6e4f;fill-rule:evenodd"/><path d="M15.52,18.606a11.1,11.1,0,0,0,1.547,1.487,6.9,6.9,0,0,1,2.72,4.107c-.107,1.067-1.973,1.76-1.973,1.76l-3.307-7.194Z" style="fill:#eee;fill-rule:evenodd"/><path d="M17.73,26.161l-3.457-7.521,1.32-.208.057.081a10.869,10.869,0,0,0,1.512,1.451,7,7,0,0,1,2.782,4.207l0,.022,0,.022c-.115,1.153-2,1.864-2.077,1.894Zm-2.99-7.27,3.155,6.863c.414-.178,1.63-.763,1.73-1.548a6.793,6.793,0,0,0-2.648-3.981l-.01-.007a11.94,11.94,0,0,1-1.517-1.439Z" style="fill:#ee4b2e"/><path d="M28,12.742c.025.394.034.792.025,1.194a13.946,13.946,0,0,1-19.9,12.3A12.86,12.86,0,0,0,28,12.742Z" style="fill:#eae0df;fill-rule:evenodd;opacity:0.2"/><path d="M2.383,13.893A13.941,13.941,0,0,1,25.7,5.83s-5.009,5.979-10.584,7.907S2.383,13.893,2.383,13.893Z" style="fill:#eae0df;opacity:0.2"/><path d="M3.618,18.694c-.044-.392-.072-.79-.083-1.191C3.329,9.807,10.012,4.2,17.708,3.991a14.2,14.2,0,0,1,5.719,1.458,13.128,13.128,0,0,0-7.188-2.369c-7.1.19-13.306,5.3-13.116,12.4A12.873,12.873,0,0,0,3.618,18.694Z" style="fill:#eae0df;fill-rule:evenodd;opacity:0.2"/>`,
|
||
"Objective-C": `<path d="M11.29,15.976a8.892,8.892,0,0,0,1.039,4.557,4.818,4.818,0,0,0,5.579,2.13,3.789,3.789,0,0,0,2.734-3.181c.095-.535.1-.54.1-.54,1.537.222,4.014.582,5.55.8l-.1.389A9.958,9.958,0,0,1,23.8,24.9a8.35,8.35,0,0,1-4.747,2.378,12.925,12.925,0,0,1-7.322-.725,8.98,8.98,0,0,1-5.106-5.524A14.353,14.353,0,0,1,6.642,10.9a9.323,9.323,0,0,1,7.929-6.24,11.812,11.812,0,0,1,5.9.491,8.467,8.467,0,0,1,5.456,6.1c.083.311.1.369.1.369-1.709.311-3.821.705-5.518,1.075C20.186,11,19.387,9.666,17.678,9.25a4.656,4.656,0,0,0-5.853,3.158,9.28,9.28,0,0,0-.341,1.273A10.89,10.89,0,0,0,11.29,15.976Z" style="fill:#c2c2c2"/><polygon points="2.033 30 2.033 2 7.967 2 7.967 4.227 4.723 4.227 4.723 27.773 7.967 27.773 7.967 30 2.033 30" style="fill:#c2c2c2"/><polygon points="29.967 29.999 24.033 29.999 24.033 27.771 27.277 27.771 27.277 4.226 24.033 4.226 24.033 1.999 29.967 1.999 29.967 29.999" style="fill:#c2c2c2"/>`,
|
||
"OCaml": `<defs><linearGradient id="a" x1="-745.623" y1="-92.76" x2="-745.623" y2="-85.108" gradientTransform="translate(758 113.28)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f29104"/><stop offset="1" stop-color="#ec6813"/></linearGradient><linearGradient id="b" x1="-741.99" y1="-109.477" x2="-741.99" y2="-85.099" xlink:href="#a"/><linearGradient id="c" x1="-752.111" y1="-93.918" x2="-752.111" y2="-85.284" xlink:href="#a"/></defs><title>file_type_ocaml</title><path d="M16.571,25.246a4.28,4.28,0,0,0-.039-.709c-.059-.2-.2-.217-.3-.374a3.507,3.507,0,0,1-.532-1.477c-.02-.453-.2-.886-.217-1.339-.02-.217.02-.453,0-.669a1.963,1.963,0,0,0-.039-.315,1.133,1.133,0,0,0-.039-.2l.059-.138a2.72,2.72,0,0,1,.65-.039c.256,0,.512.02.768.02a7.961,7.961,0,0,0,1.536-.059,3.722,3.722,0,0,0,1.949-.847,4.946,4.946,0,0,0,1.536-2.008c.177-.394.177-1.083.551-1.4.433-.374,1.181-.335,1.693-.571a1.187,1.187,0,0,1,.807-.138c.217.039.63.315.729-.059-.079-.039-.1-.138-.138-.177.414-.039,0-1-.158-1.2A2.225,2.225,0,0,0,24.25,13a3.509,3.509,0,0,0-1.536-.217c-.886.177-.827-.335-1.339-.335-.63,0-1.733.039-1.93.63a1.54,1.54,0,0,1-.335.512c-.138.177.02.354-.039.571-.079.217-.177.985-.276,1.26-.177.453-.394,1.024-.788,1.024a3.152,3.152,0,0,1-1.437-.079c-.276-.1-.729-.256-.945-.335-1.024-.433-1.2-.906-1.2-.906a3.026,3.026,0,0,1-.512-.866c-.118-.414-.315-.768-.394-1s-.3-.591-.453-.985a2.667,2.667,0,0,0-.709-1.063c-.315-.276-.61-.729-1.26-.591a1.641,1.641,0,0,0-.866.315c-.217.177-.3.571-.492.886-.118.177-.315.709-.512,1.162a1.929,1.929,0,0,1-.335.65c-.118.079-.256.2-.414.138a.924.924,0,0,1-.315-.2,5.334,5.334,0,0,1-.709-1.122,11.1,11.1,0,0,0-.788-1.241,1.016,1.016,0,0,0-.985-.551c-1.024,0-1.1.571-1.556,1.418a5.574,5.574,0,0,1-.669,1.4c-.236.256-.945,1.339-1.457,1.516H2v7.62c.039-.1.059-.2.1-.276.2-.414.65-.807.906-1.221a3.5,3.5,0,0,0,.374-.709,3.743,3.743,0,0,1,.236-.709.794.794,0,0,1,.571-.335c.354-.059.65.492,1.083.709.2.079,1.063.394,1.319.453.433.1.906.2,1.339.276.236.039.453.079.709.1a7.3,7.3,0,0,1,1.083.1,2.277,2.277,0,0,0-.807,1.221c-.158.433-.276.925-.473,1.339-.217.473-.669.669-.61,1.221a2.668,2.668,0,0,1,.02.689,4.009,4.009,0,0,1-.217.689c-.1.315-.217,1.359-.354,1.674l.906-.118h0A10.692,10.692,0,0,0,8.4,26.388a3.737,3.737,0,0,1,.729-1.28c.335-.374.315-.847.512-1.3a12.488,12.488,0,0,1,.768-1.3c.492-.807.807-1.812,1.851-2.028a3.3,3.3,0,0,1,1.024.709,4.452,4.452,0,0,1,.886,1.1,12.851,12.851,0,0,1,.886,2.678,1.227,1.227,0,0,0,.394.709,5.462,5.462,0,0,1,.433.729c.079.177.2.571.3.788a6.267,6.267,0,0,1,.315.827l.847-.02h.02v-.02A9.754,9.754,0,0,1,16.571,25.246Z" style="fill:#fff"/><path d="M16.217,27.235c-.1-.2-.217-.61-.3-.788a5.462,5.462,0,0,0-.433-.729,1.119,1.119,0,0,1-.394-.709,12.487,12.487,0,0,0-.886-2.678,4.452,4.452,0,0,0-.886-1.1,3.3,3.3,0,0,0-1.024-.709c-1.044.2-1.359,1.221-1.851,2.028a12.488,12.488,0,0,0-.768,1.3c-.2.433-.177.925-.512,1.3a3.443,3.443,0,0,0-.729,1.28c-.039.1-.118,1.083-.217,1.319h0l1.536-.1c1.437.1,1.024.65,3.249.532l3.525-.118h0A6.267,6.267,0,0,0,16.217,27.235Z" style="fill:url(#a)"/><path d="M26.456,3.8H5.544A3.521,3.521,0,0,0,2.02,7.328v7.679h0c.512-.177,1.221-1.26,1.457-1.516a5.913,5.913,0,0,0,.669-1.4c.453-.827.532-1.418,1.556-1.418a1.016,1.016,0,0,1,.985.551,9.547,9.547,0,0,1,.788,1.241,4.849,4.849,0,0,0,.709,1.122,2,2,0,0,0,.315.2c.158.059.3-.059.414-.138A1.929,1.929,0,0,0,9.246,13c.2-.453.394-.965.512-1.162.2-.315.276-.709.492-.886a1.59,1.59,0,0,1,.866-.315c.65-.138.945.315,1.26.591a3.285,3.285,0,0,1,.709,1.063c.158.394.354.768.453.985a8.946,8.946,0,0,1,.394,1,3.713,3.713,0,0,0,.512.866s.177.473,1.2.906a8.749,8.749,0,0,0,.945.335,3.152,3.152,0,0,0,1.437.079c.394,0,.61-.571.788-1.024.1-.276.217-1.044.276-1.26s-.1-.374.039-.571c.158-.217.256-.236.335-.512.2-.61,1.3-.63,1.93-.63.532,0,.453.512,1.339.335a3.243,3.243,0,0,1,1.536.217,2.225,2.225,0,0,1,1.142.551c.158.2.571,1.162.158,1.2.039.039.079.138.138.177-.1.374-.492.1-.729.059a1.187,1.187,0,0,0-.807.138c-.512.217-1.241.2-1.693.571-.374.315-.374,1-.551,1.4a5.167,5.167,0,0,1-1.536,2.008,3.9,3.9,0,0,1-1.949.847,7.961,7.961,0,0,1-1.536.059c-.256-.02-.512-.02-.768-.02-.158,0-.669-.02-.65.039l-.059.138a.7.7,0,0,0,.039.2c.02.118.02.217.039.315,0,.217-.02.453,0,.669.02.453.2.866.217,1.339a3.26,3.26,0,0,0,.532,1.477c.1.158.236.177.3.374a4.163,4.163,0,0,1,.039.709,9.685,9.685,0,0,0,.827,2.757v.02h0c.512-.079,1.044-.276,1.713-.374,1.241-.177,2.954-.1,4.056-.2,2.8-.256,4.312,1.142,6.813.571V7.328A3.551,3.551,0,0,0,26.456,3.8ZM16.02,20.343Z" style="fill:url(#b)"/><path d="M8.478,23.573c.2-.433.315-.906.473-1.339a2.277,2.277,0,0,1,.807-1.221,7.3,7.3,0,0,0-1.083-.1c-.236-.02-.473-.059-.709-.1-.433-.079-.925-.177-1.339-.276-.256-.059-1.142-.374-1.319-.453-.453-.2-.748-.768-1.083-.709a.794.794,0,0,0-.571.335,3.743,3.743,0,0,0-.236.709c-.1.236-.256.473-.374.709a12.289,12.289,0,0,0-.925,1.2c-.039.1-.059.2-.1.3v4.745a5.4,5.4,0,0,1,.729.158,8.77,8.77,0,0,0,4.371.354l.177-.02h0c.138-.315.256-1.359.354-1.674a5.494,5.494,0,0,0,.217-.689,2.668,2.668,0,0,0-.02-.689C7.809,24.242,8.262,24.045,8.478,23.573Z" style="fill:url(#c)"/>`,
|
||
"OpenCL": `<defs><linearGradient id="a" x1="29.662" y1="18.026" x2="21.419" y2="20.234" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="red"/><stop offset="1" stop-color="#ff6a6a"/></linearGradient><linearGradient id="b" x1="24.588" y1="9.748" x2="18.776" y2="15.56" xlink:href="#a"/><linearGradient id="c" x1="18.466" y1="6.619" x2="15.924" y2="13.603" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#cfa40c"/><stop offset="1" stop-color="#edd480"/></linearGradient><linearGradient id="d" x1="13.17" y1="6.51" x2="13.17" y2="12.997" xlink:href="#c"/><linearGradient id="e" x1="8.808" y1="8.486" x2="10.988" y2="13.161" xlink:href="#c"/><linearGradient id="f" x1="5.505" y1="11.477" x2="8.546" y2="14.519" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11a119"/><stop offset="1" stop-color="#37ae3d"/></linearGradient><linearGradient id="g" x1="3.639" y1="14.285" x2="6.883" y2="16.158" xlink:href="#f"/><linearGradient id="h" x1="2.265" y1="17.799" x2="5.379" y2="18.933" xlink:href="#f"/><linearGradient id="i" x1="2" y1="21.614" x2="4.833" y2="21.614" xlink:href="#f"/><linearGradient id="j" x1="20.662" y1="18.949" x2="18.026" y2="17.428" gradientUnits="userSpaceOnUse"><stop offset="0.5" stop-color="#646464"/><stop offset="1" stop-color="#cbcbcb"/></linearGradient><linearGradient id="k" x1="16.021" y1="25.264" x2="16.021" y2="22.691" xlink:href="#j"/></defs><title>file_type_opencl</title><path d="M27.828,13.574a14.676,14.676,0,0,1,.835,1.542A14.964,14.964,0,0,1,29.92,22.9H22.133a10.377,10.377,0,0,0-.967-4.424Z" style="fill:url(#a)"/><path d="M17.753,14.43a10.074,10.074,0,0,1,2.772,2.878l6.273-5.2a15.54,15.54,0,0,0-4.988-4.15Z" style="fill:url(#b)"/><path d="M14.781,13.086a8.827,8.827,0,0,1,2.376.966L20.666,7.43a12.7,12.7,0,0,0-4.645-.952Z" style="fill:url(#c)"/><path d="M14.364,13l.612-6.488a12.46,12.46,0,0,0-3.611.813l.507,5.638A7.219,7.219,0,0,1,14.364,13" style="fill:url(#d)"/><path d="M10.948,13.179l-.683-5.373A14.588,14.588,0,0,0,7.773,9.379l1.74,4.42a7.518,7.518,0,0,1,1.435-.619" style="fill:url(#e)"/><path d="M8.86,14.206,6.474,10.511c-.453.44-.79.82-1.006,1.074q-.227.267-.436.538L7.48,15.387a8.87,8.87,0,0,1,1.38-1.182" style="fill:url(#f)"/><path d="M7.046,15.875,4.335,13.112a14.259,14.259,0,0,0-1.25,2.429l3.007,1.71a9.826,9.826,0,0,1,.954-1.376" style="fill:url(#g)"/><path d="M5.527,18.393l-2.77-1.945a15.452,15.452,0,0,0-.63,2.83l2.906.607a10.343,10.343,0,0,1,.494-1.492" style="fill:url(#h)"/><path d="M4.833,20.9a10.684,10.684,0,0,0-.1,2H2.093a14.333,14.333,0,0,1-.064-2.573Z" style="fill:url(#i)"/><path d="M22.551,12.478,14.751,23.1A1.544,1.544,0,0,1,17.5,24.428Z" style="fill:url(#j)"/><path d="M16.021,25.522a1.544,1.544,0,1,1,1.092-.452A1.533,1.533,0,0,1,16.021,25.522Z" style="fill:#646464"/><path d="M17.308,23.978a1.287,1.287,0,1,1-.377-.91A1.283,1.283,0,0,1,17.308,23.978Z" style="fill:url(#k)"/>`,
|
||
"Pascal": `<defs><linearGradient id="a" x1="16" y1="-0.443" x2="16" y2="22.042" gradientUnits="userSpaceOnUse"><stop offset="0.021" stop-color="#ff0c15"/><stop offset="1" stop-color="#9a0c0f"/></linearGradient></defs><title>file_type_delphi</title><circle cx="16" cy="16" r="14" style="fill:url(#a)"/><path d="M27.545,16.243H4.924a.914.914,0,0,0-1.092.82q.033.429.1.849a12.4,12.4,0,0,0,24.532,0q.075-.5.108-1.021C28.478,16.523,28.211,16.207,27.545,16.243Z" style="fill:#ff6443"/><polyline points="18.48 11.64 23.707 7.266 19.787 5.88 16 11.053" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="15.68 11.026 18.64 5.88 14.853 5.88 13.307 11.293" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="13.04 11.373 13.6 6.706 10.587 7.96 11.013 12.76" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="10.747 13 9.787 8.76 7.707 10.84 9.653 14.68" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.387 15.053 7.493 12.376 6.64 14.466 9.04 16.517" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.04 16.757 6.64 15.213 6.48 17.4 9.2 18.333" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.227 18.846 6.64 18.04 7.227 19.8 9.547 19.8" style="fill:#fae7e3;fill-rule:evenodd"/><polyline points="9.707 20.093 7.707 20.386 8.627 21.746 10.267 21" style="fill:#fae7e3;fill-rule:evenodd"/><path d="M20.023,13.089a6.61,6.61,0,0,0-4.53-2A6.293,6.293,0,0,0,11.3,22.07l4.941.129-2.08-4.16Z" style="fill:#eee;fill-rule:evenodd"/><path d="M16.5,22.366l-5.267-.138-.044-.039a6.453,6.453,0,0,1,4.3-11.264,6.787,6.787,0,0,1,4.643,2.05l.123.123-5.9,4.982Zm-5.14-.455,4.616.121L13.961,18l5.825-4.919a6.43,6.43,0,0,0-4.292-1.835,6.133,6.133,0,0,0-4.131,10.667Z" style="fill:#ee4b2e"/><path d="M12.013,20.493c-4.173-5.813,2.109-8.172,2.478-8.453.451-.344-7.59,1.785-3.226,8.88Z" style="fill:#f04e31;fill-rule:evenodd"/><polygon points="20.72 12.6 13.52 17.567 13.733 18.573 21.467 17.026 20.72 12.6" style="fill:#eee;fill-rule:evenodd"/><path d="M13.61,18.761,13.341,17.5l7.495-5.17.814,4.828Zm.089-1.123.158.747L21.283,16.9,20.6,12.874Z" style="fill:#ee4b2e"/><path d="M15.723,21.319c-3.93-.668-4.283.428-4.283.428L10.267,24.44s1.12-.907,5.493,0l.76-1.388Z" style="fill:#dd0c13;fill-rule:evenodd"/><path d="M14.122,21.6c-.02-.2-1.1-.319-1.677-.123-.732.249-1.219,1.142-1.045,1.213a1.975,1.975,0,0,1,1.125-.986C13.447,21.493,14.142,21.8,14.122,21.6Z" style="fill:#ff6e4f;fill-rule:evenodd"/><path d="M15.52,18.606a11.1,11.1,0,0,0,1.547,1.487,6.9,6.9,0,0,1,2.72,4.107c-.107,1.067-1.973,1.76-1.973,1.76l-3.307-7.194Z" style="fill:#eee;fill-rule:evenodd"/><path d="M17.73,26.161l-3.457-7.521,1.32-.208.057.081a10.869,10.869,0,0,0,1.512,1.451,7,7,0,0,1,2.782,4.207l0,.022,0,.022c-.115,1.153-2,1.864-2.077,1.894Zm-2.99-7.27,3.155,6.863c.414-.178,1.63-.763,1.73-1.548a6.793,6.793,0,0,0-2.648-3.981l-.01-.007a11.94,11.94,0,0,1-1.517-1.439Z" style="fill:#ee4b2e"/><path d="M28,12.742c.025.394.034.792.025,1.194a13.946,13.946,0,0,1-19.9,12.3A12.86,12.86,0,0,0,28,12.742Z" style="fill:#eae0df;fill-rule:evenodd;opacity:0.2"/><path d="M2.383,13.893A13.941,13.941,0,0,1,25.7,5.83s-5.009,5.979-10.584,7.907S2.383,13.893,2.383,13.893Z" style="fill:#eae0df;opacity:0.2"/><path d="M3.618,18.694c-.044-.392-.072-.79-.083-1.191C3.329,9.807,10.012,4.2,17.708,3.991a14.2,14.2,0,0,1,5.719,1.458,13.128,13.128,0,0,0-7.188-2.369c-7.1.19-13.306,5.3-13.116,12.4A12.873,12.873,0,0,0,3.618,18.694Z" style="fill:#eae0df;fill-rule:evenodd;opacity:0.2"/>`,
|
||
"Perl": `<path d="M29.25,13.8a6.888,6.888,0,0,0-.742-2.268,1.011,1.011,0,0,0-.172-.233,9.471,9.471,0,0,1-1.725-2.4,8.632,8.632,0,0,0-1.395-2.382A6.906,6.906,0,0,1,24.1,4.644,4.572,4.572,0,0,0,21.99,1.727a1.009,1.009,0,0,0-.1-.054,8.886,8.886,0,0,0-1.3-.468,1.022,1.022,0,0,0-.263-.035,1.009,1.009,0,0,0-.2.021,5.607,5.607,0,0,1-.807.107c-.05,0-.1-.006-.149-.006a2.842,2.842,0,0,0-1.416.453c-.094.052-.188.106-.284.149q-.041.018-.078.039A1.637,1.637,0,0,1,17.066,2a3.109,3.109,0,0,0-.772.194,1,1,0,0,0-.508.483,2.184,2.184,0,0,1-.469.5A4.382,4.382,0,0,0,14.555,4a.964.964,0,0,0-.116.234,4.687,4.687,0,0,1-1.574,2.2,6.471,6.471,0,0,0-.8.613,2.734,2.734,0,0,0-.627-1.634c-.017-.019-.035-.038-.053-.056l0-.014a2.378,2.378,0,0,0-.135-.586,1,1,0,0,0-.132-.236A5.167,5.167,0,0,0,9.511,3.113a.988.988,0,0,0-.346-.119,1.5,1.5,0,0,1-.148-.077,2.06,2.06,0,0,0-1-.311,1.476,1.476,0,0,0-.681.166.987.987,0,0,0-.274.206,1.328,1.328,0,0,1-.125.063,1.9,1.9,0,0,0-.908.778,2.539,2.539,0,0,0-.541.106,1.656,1.656,0,0,1-.383.057,2.3,2.3,0,0,0-1.5.545l-.106.1a2.533,2.533,0,0,0-1,2.525,1.08,1.08,0,0,0,.068.165A2.294,2.294,0,0,0,4.446,8.478c-.1.238-.2.473-.314.7a1.009,1.009,0,0,0-.087.293A11.052,11.052,0,0,0,4,12.039c0,.02,0,.04.007.06a5.278,5.278,0,0,1,.041.547,2.926,2.926,0,0,0,.931,2.4c.017.014.034.026.052.039l.008.031a2.8,2.8,0,0,0,.151.447,1.185,1.185,0,0,0,.632.617,1.289,1.289,0,0,0,.248.571,1,1,0,0,0,.332.279,2.453,2.453,0,0,0,.465.176l.064.018a.976.976,0,0,0,.192.171A5.879,5.879,0,0,1,7.873,18a1.13,1.13,0,0,0,1.351.427,1.5,1.5,0,0,0,.765.215,1.421,1.421,0,0,0,.624-.145l.114-.026c.024.408.033.817.028,1.223a1.043,1.043,0,0,0,.026.242,10.744,10.744,0,0,1,.266,1.828.931.931,0,0,0,.031.2,8.492,8.492,0,0,1,.268,1.815c0,.031,0,.063.008.094a6.083,6.083,0,0,1-.61,3.575.994.994,0,0,0-.089.261,1.093,1.093,0,0,0-.234.079l-.05.022a2.013,2.013,0,0,0-1.2,1.065,1.322,1.322,0,0,0,.074,1.054,1,1,0,0,0,.324.371,3.547,3.547,0,0,0,3.509.3,1.546,1.546,0,0,0,.829-1.653l-.005-.067a.989.989,0,0,0,.056-.158,11.186,11.186,0,0,0,.288-2.068,8.939,8.939,0,0,1,.259-1.822,4.727,4.727,0,0,0,.389-1.588l.042.048a12.661,12.661,0,0,0,1.255,1.129,10.3,10.3,0,0,1,1.1.989l-.011.038a.532.532,0,0,1-.342.359l-.049.017a1.921,1.921,0,0,0-1.184,1.334,1.313,1.313,0,0,0,.452,1.234,1,1,0,0,0,.441.222,4.908,4.908,0,0,0,2.735-.181,1.556,1.556,0,0,0,.266-.124,1.411,1.411,0,0,0,.97.372,2.326,2.326,0,0,0,1-.274c.049-.023.1-.045.14-.062a1,1,0,0,0,.637-.864,4.553,4.553,0,0,0-.468-2.343,1.56,1.56,0,0,0-.51-.6,10.8,10.8,0,0,1,1.3-2.15,2.193,2.193,0,0,0,.451-2.026,2.519,2.519,0,0,1-.043-.394,1.046,1.046,0,0,0,0-.148,5.756,5.756,0,0,1,.012-1.279,7.161,7.161,0,0,0,.951,1.793,7.892,7.892,0,0,1,.133,1.1,10.733,10.733,0,0,0,.133,1.186,9.36,9.36,0,0,1-.224,3.9,1,1,0,0,0-.032.34h0a.98.98,0,0,0-.1.179,2.238,2.238,0,0,0-.312,1.235,1.007,1.007,0,0,0,.039.2,1.315,1.315,0,0,0,1.328.963c.086,0,.177-.006.268-.014l.019,0,.038.013a2.109,2.109,0,0,0,2.517-1.088,1,1,0,0,0,.058-.735,5.285,5.285,0,0,1-.208-1.027,1.011,1.011,0,0,0-.046-.217,6.47,6.47,0,0,1-.221-3.22,1.112,1.112,0,0,0,.015-.114,3.907,3.907,0,0,1,.074-.443,2.738,2.738,0,0,0-.193-2.1,4.339,4.339,0,0,1,.021-.476c.011-.147.023-.3.027-.463a1.59,1.59,0,0,0,.862-.851,12.83,12.83,0,0,0,.947-2.23,1.719,1.719,0,0,0,.172-1.185,1.234,1.234,0,0,0,.111-.251A1.467,1.467,0,0,0,29.25,13.8ZM18.863,22.768c-.026,0-.053-.008-.08-.01l-.024,0a2.748,2.748,0,0,1-.236-.323c-.059-.088-.118-.175-.178-.258a2.253,2.253,0,0,0,.208-.234,1.255,1.255,0,0,0,.629-.321A3.186,3.186,0,0,1,18.863,22.768Z" style="fill:#ededed"/><path d="M19.289,2.3c-.548-.065-.961.3-1.419.506-.368.206-.815.152-1.185.309-.282.579-.941.908-1.3,1.443a5.7,5.7,0,0,1-1.942,2.694,5.464,5.464,0,0,0-2.368,3.394c-.145.3-.122.746-.277,1-.511.143-.239-.516-.3-.825-.074-.47.341-.77.373-1.226a1.834,1.834,0,0,0,.209-1.053c-.056-.814.189-1.807-.393-2.477-.349-.2-.239-.623-.366-.947a4.214,4.214,0,0,0-1.3-1.139c-.419-.041-.806-.542-1.232-.323-.266.309-.763.305-.922.713-.1.516-.688.374-1.068.5-.488.185-1.118.006-1.518.382-.411.41-1.034.961-.835,1.606.457.882,1.645.438,2.317.974A17.99,17.99,0,0,1,5.036,9.61a10.051,10.051,0,0,0-.044,2.332c.123.773-.083,1.772.606,2.319.38.137.357.572.5.887.134.29.427-.113.543.193.338.184.037.561.22.8.263.137.639.128.822.426a6.844,6.844,0,0,1,.975.806c.23.467.531-.454.783-.109.17.285.506.522.819.285a2.993,2.993,0,0,0,1.324-.556,18.033,18.033,0,0,1,.171,2.718,11.733,11.733,0,0,1,.29,2,9.409,9.409,0,0,1,.3,2.03,7.111,7.111,0,0,1-.709,4.16,1.012,1.012,0,0,1-.807.8c-.291.13-.9.366-.692.776a2.549,2.549,0,0,0,2.52.214c.51-.243.073-.858.334-1.226.343-1.3.174-2.691.575-3.985a3.762,3.762,0,0,0,.3-2.1c.079-.44-.105-.969.187-1.329a1.813,1.813,0,0,1,.483-1.2,14.762,14.762,0,0,0,.144-2.026,3.214,3.214,0,0,1,1.267-.127c.018.375-.272.812-.19,1.234A1.948,1.948,0,0,1,15.5,20.3a2.849,2.849,0,0,0,.168,2.308c.782.839,1.8,1.432,2.536,2.327.314.205.2.517.038.784a1.528,1.528,0,0,1-.987,1.034c-.308.121-.806.566-.442.882a3.906,3.906,0,0,0,2.178-.144c.476-.171.3-.738.488-1.088.3.233.423.765.711,1.069.3.433.807.073,1.156-.062a3.549,3.549,0,0,0-.372-1.842c-.167-.378-.8-.385-.77-.852a11.761,11.761,0,0,1,1.712-3c.51-.479.13-1.191.158-1.8A6.765,6.765,0,0,1,23.158,15.5a15.889,15.889,0,0,0,.692,2.14,6.23,6.23,0,0,0,1.1,2.246c.237.811.176,1.71.331,2.551a10.44,10.44,0,0,1-.242,4.347c.04.518-.457.9-.415,1.408.14.469.7.093.99.29a1.11,1.11,0,0,0,1.324-.572,6.212,6.212,0,0,1-.247-1.223,7.454,7.454,0,0,1-.255-3.719c.046-.669.457-1.5-.073-2.072-.148-.619.1-1.285-.049-1.915a12.877,12.877,0,0,1-.122-4.933c.093-.227.013-.649.247-.775a1.851,1.851,0,0,1,.315,1.232,3.7,3.7,0,0,1,.079,2.081c-.424.531-.163,1.248-.109,1.85.068.422.516.118.589-.144a11.851,11.851,0,0,0,.944-2.241c.269-.356.014-.77,0-1.142.413-.049.256-.506.035-.7a5.93,5.93,0,0,0-.667-2.2,10.464,10.464,0,0,1-1.941-2.723c-.528-1.639-2.042-2.726-2.556-4.379a3.556,3.556,0,0,0-1.652-2.317A7.881,7.881,0,0,0,20.32,2.17,6.5,6.5,0,0,1,19.289,2.3Zm.4,14.66a38.907,38.907,0,0,1,.5,4.291,4.175,4.175,0,0,1-.76,2.517c-.12.425-.486.012-.751-.016-.643-.018-.882-.683-1.232-1.107-.36-.344-.1-.8.133-1.131.252-.179.35-.579.708-.548.4-.007.316-.487.26-.743.238-.362.092-.892.328-1.283.419-.182.294-.82.442-1.18.115-.256.017-.749.334-.854.037-.006.049.012.042.052Z" style="fill:#3a3c5b"/>`,
|
||
"PHP": `<defs><radialGradient id="a" cx="-16.114" cy="20.532" r="18.384" gradientTransform="translate(26.52 -9.307)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="0.5" stop-color="#4c6b96"/><stop offset="1" stop-color="#231f20"/></radialGradient></defs><title>file_type_php</title><ellipse cx="16" cy="16" rx="14" ry="7.365" style="fill:url(#a)"/><ellipse cx="16" cy="16" rx="13.453" ry="6.818" style="fill:#6280b6"/><path d="M18.725,18.2l.667-3.434a1.752,1.752,0,0,0-.372-1.719,2.929,2.929,0,0,0-2-.525H15.867l.331-1.7a.219.219,0,0,0-.215-.26h-1.6a.219.219,0,0,0-.215.177l-.709,3.646a2.051,2.051,0,0,0-.477-1.054,2.783,2.783,0,0,0-2.2-.807H7.7a.219.219,0,0,0-.215.177l-1.434,7.38a.219.219,0,0,0,.215.26H7.869a.219.219,0,0,0,.215-.177l.347-1.785h1.2a5.167,5.167,0,0,0,1.568-.2,3.068,3.068,0,0,0,1.15-.689,3.538,3.538,0,0,0,.68-.844l-.287,1.475a.219.219,0,0,0,.215.26h1.6a.219.219,0,0,0,.215-.177l.787-4.051h1.094c.466,0,.6.093.64.133s.1.165.025.569l-.635,3.265a.219.219,0,0,0,.215.26h1.62A.219.219,0,0,0,18.725,18.2ZM11.33,15.366a1.749,1.749,0,0,1-.561,1.092,2.171,2.171,0,0,1-1.315.321H8.742l.515-2.651h.921c.677,0,.949.145,1.059.266A1.181,1.181,0,0,1,11.33,15.366Z" style="fill:#fff"/><path d="M25.546,13.332a2.783,2.783,0,0,0-2.2-.807H20.255a.219.219,0,0,0-.215.177l-1.434,7.38a.219.219,0,0,0,.215.26h1.608a.219.219,0,0,0,.215-.177l.347-1.785h1.2a5.167,5.167,0,0,0,1.568-.2,3.068,3.068,0,0,0,1.15-.689,3.425,3.425,0,0,0,1.076-1.927A2.512,2.512,0,0,0,25.546,13.332Zm-1.667,2.034a1.749,1.749,0,0,1-.561,1.092A2.171,2.171,0,0,1,22,16.778H21.29l.515-2.651h.921c.677,0,.949.145,1.059.266A1.181,1.181,0,0,1,23.879,15.366Z" style="fill:#fff"/><path d="M10.178,13.908a1.645,1.645,0,0,1,1.221.338,1.34,1.34,0,0,1,.145,1.161,1.945,1.945,0,0,1-.642,1.223A2.361,2.361,0,0,1,9.454,17H8.476l.6-3.089ZM6.261,20.124H7.869l.381-1.962H9.627a4.931,4.931,0,0,0,1.5-.191,2.84,2.84,0,0,0,1.07-.642,3.207,3.207,0,0,0,1.01-1.808,2.3,2.3,0,0,0-.385-2.044,2.568,2.568,0,0,0-2.035-.732H7.7Z" style="fill:#000004"/><path d="M14.387,10.782h1.6L15.6,12.744h1.421a2.767,2.767,0,0,1,1.85.468,1.548,1.548,0,0,1,.305,1.516l-.667,3.434H16.89l.635-3.265a.886.886,0,0,0-.08-.76,1.121,1.121,0,0,0-.8-.2H15.37l-.822,4.228h-1.6Z" style="fill:#000004"/><path d="M22.727,13.908a1.645,1.645,0,0,1,1.221.338,1.34,1.34,0,0,1,.145,1.161,1.945,1.945,0,0,1-.642,1.223A2.361,2.361,0,0,1,22,17h-.978l.6-3.089ZM18.81,20.124h1.608l.381-1.962h1.377a4.931,4.931,0,0,0,1.5-.191,2.84,2.84,0,0,0,1.07-.642,3.207,3.207,0,0,0,1.01-1.808,2.3,2.3,0,0,0-.385-2.044,2.568,2.568,0,0,0-2.035-.732H20.244Z" style="fill:#000004"/>`,
|
||
"PL/SQL": `<path d="M8.562,15.256A21.159,21.159,0,0,0,16,16.449a21.159,21.159,0,0,0,7.438-1.194c1.864-.727,2.525-1.535,2.525-2V9.7a10.357,10.357,0,0,1-2.084,1.076A22.293,22.293,0,0,1,16,12.078a22.36,22.36,0,0,1-7.879-1.3A10.28,10.28,0,0,1,6.037,9.7v3.55C6.037,13.724,6.7,14.528,8.562,15.256Z" style="fill:red"/><path d="M8.562,21.961a15.611,15.611,0,0,0,2.6.741A24.9,24.9,0,0,0,16,23.155a24.9,24.9,0,0,0,4.838-.452,15.614,15.614,0,0,0,2.6-.741c1.864-.727,2.525-1.535,2.525-2v-3.39a10.706,10.706,0,0,1-1.692.825A23.49,23.49,0,0,1,16,18.74a23.49,23.49,0,0,1-8.271-1.348,10.829,10.829,0,0,1-1.692-.825V19.96C6.037,20.426,6.7,21.231,8.562,21.961Z" style="fill:red"/><path d="M16,30c5.5,0,9.963-1.744,9.963-3.894V23.269a10.5,10.5,0,0,1-1.535.762l-.157.063A23.487,23.487,0,0,1,16,25.445a23.422,23.422,0,0,1-8.271-1.351c-.054-.02-.106-.043-.157-.063a10.5,10.5,0,0,1-1.535-.762v2.837C6.037,28.256,10.5,30,16,30Z" style="fill:red"/><ellipse cx="16" cy="5.894" rx="9.963" ry="3.894" style="fill:red"/>`,
|
||
"Plain text": `<path d="M22.038,2H6.375a1.755,1.755,0,0,0-1.75,1.75v24.5A1.755,1.755,0,0,0,6.375,30h19.25a1.755,1.755,0,0,0,1.75-1.75V6.856Zm.525,2.844,1.663,1.531H22.563ZM6.375,28.25V3.75H20.813V8.125h4.813V28.25Z" style="fill:#c2c2c2"/><rect x="8.125" y="15.097" width="13.076" height="1.75" style="fill:#829ec2"/><rect x="8.125" y="24.439" width="9.762" height="1.75" style="fill:#829ec2"/><rect x="8.125" y="19.763" width="15.75" height="1.75" style="fill:#829ec2"/><rect x="8.125" y="10.23" width="15.75" height="1.75" style="fill:#829ec2"/>`,
|
||
"PlantUML": `<defs><linearGradient id="a" x1="-33.423" y1="-250.911" x2="-33.353" y2="-250.858" gradientTransform="matrix(37.134, 26.001, 13.575, -19.387, 4673.473, -3982.019)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#767676"/><stop offset="1"/></linearGradient><linearGradient id="b" x1="-32.107" y1="-242.563" x2="-32.028" y2="-242.586" gradientTransform="matrix(81.081, 56.774, 17.306, -24.715, 6804.021, -4149.644)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0079b9"/><stop offset="1"/></linearGradient><linearGradient id="c" x1="-33.282" y1="-243.423" x2="-33.224" y2="-243.455" gradientTransform="matrix(60.003, 42.015, 34.184, -48.82, 10343.005, -10469.084)" xlink:href="#b"/><linearGradient id="d" x1="12.356" y1="26.268" x2="14.011" y2="26.268" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#595959"/><stop offset="0.087" stop-color="#6e6e6e"/><stop offset="0.242" stop-color="#8c8c8c"/><stop offset="0.405" stop-color="#a4a4a4"/><stop offset="0.577" stop-color="#b5b5b5"/><stop offset="0.765" stop-color="#bfbfbf"/><stop offset="1" stop-color="#c2c2c2"/></linearGradient><linearGradient id="e" x1="18.291" y1="26.171" x2="19.946" y2="26.171" xlink:href="#d"/><linearGradient id="f" x1="24.44" y1="26.171" x2="26.096" y2="26.171" xlink:href="#d"/></defs><title>file_type_plantuml</title><polygon points="20.305 17.872 27.16 22.418 21.72 25.493 14.861 20.999 20.305 17.872" style="fill:#1c0a42"/><path d="M21.716,25.619l-.055-.036-7.005-4.59,5.653-3.247,7.056,4.68Zm-6.65-4.613,6.658,4.362,5.231-2.957L20.3,18Z"/><polygon points="26.401 11.909 29.418 13.592 27.07 15.088 24.213 13.247 26.401 11.909" style="fill:url(#a)"/><path d="M27.069,15.215l-3.058-1.97,2.387-1.46,3.228,1.8Zm-2.654-1.966L27.07,14.96,29.208,13.6l-2.8-1.565Z"/><polygon points="14.498 17.807 21.354 22.354 15.914 25.429 9.055 20.935 14.498 17.807" style="fill:#ffbd3f"/><path d="M15.91,25.554l-.055-.036L8.85,20.929,14.5,17.681l7.056,4.68ZM9.26,20.941,15.918,25.3l5.231-2.957-6.654-4.413Z"/><polygon points="7.99 17.966 14.954 22.366 9.577 25.504 2.218 20.849 7.99 17.966" style="fill:#a11f40"/><path d="M9.575,25.629,2,20.838l6-3,7.164,4.527ZM2.436,20.86,9.58,25.378l5.168-3.016L7.984,18.089Z"/><polygon points="2.111 21.021 9.443 25.515 9.443 29.063 2.111 24.332 2.111 21.021" style="fill:url(#b)"/><path d="M9.55,29.26,2,24.391V20.829L9.55,25.455ZM2.218,24.274l7.118,4.592V25.575L2.218,21.213Z"/><polygon points="24.071 13.343 27.009 15.222 27.009 22.131 24.071 20.247 24.071 13.343" style="fill:url(#c)"/><path d="M27.063,22.229l-3.045-1.953V13.245l3.045,1.947Zm-2.938-2.012,2.831,1.815V15.251l-2.831-1.81Z"/><polygon points="27.149 22.526 27.149 15.194 29.514 13.775 29.514 29.149 28.331 29.149 9.646 29.149 9.646 25.601 15.086 22.526 15.785 25.601 15.796 25.601 21.472 22.526 21.891 25.601 21.945 25.601 27.149 22.526" style="fill:#fff"/><path d="M29.621,29.256H9.539V25.538l5.62-3.177.7,3.083,5.7-3.087.422,3.1,5.061-2.991V15.133l2.58-1.548ZM9.753,29.041H29.407V13.964l-2.151,1.29v7.332l-.053.031-5.229,3.09H21.8l-.411-3.014-5.564,3.014H15.7l-.686-3.018-5.26,2.973Z"/><rect x="12.356" y="25.44" width="1.656" height="1.656" rx="0.215" ry="0.215" style="fill:url(#d)"/><path d="M13.8,27.2H12.57a.322.322,0,0,1-.322-.322V25.655a.322.322,0,0,1,.322-.322H13.8a.322.322,0,0,1,.322.322v1.226A.322.322,0,0,1,13.8,27.2ZM12.57,25.547a.108.108,0,0,0-.107.107v1.226a.108.108,0,0,0,.107.107H13.8a.108.108,0,0,0,.107-.107V25.655a.108.108,0,0,0-.107-.107Z"/><rect x="18.291" y="25.343" width="1.656" height="1.656" rx="0.215" ry="0.215" style="fill:url(#e)"/><path d="M19.732,27.106H18.505a.322.322,0,0,1-.322-.322V25.558a.322.322,0,0,1,.322-.322h1.226a.322.322,0,0,1,.322.322v1.226A.322.322,0,0,1,19.732,27.106Zm-1.226-1.656a.108.108,0,0,0-.107.107v1.226a.108.108,0,0,0,.107.107h1.226a.108.108,0,0,0,.107-.107V25.558a.108.108,0,0,0-.107-.107Z"/><rect x="24.44" y="25.343" width="1.656" height="1.656" rx="0.215" ry="0.215" style="fill:url(#f)"/><path d="M25.881,27.106H24.655a.322.322,0,0,1-.322-.322V25.558a.322.322,0,0,1,.322-.322h1.226a.322.322,0,0,1,.322.322v1.226A.322.322,0,0,1,25.881,27.106Zm-1.226-1.656a.108.108,0,0,0-.107.107v1.226a.108.108,0,0,0,.107.107h1.226a.108.108,0,0,0,.107-.107V25.558a.108.108,0,0,0-.107-.107Z"/><path d="M27.215,11.23c-.052.069-.417-.262-.653-.526a4.408,4.408,0,0,1-.516-.73A2.6,2.6,0,0,1,25.7,9.2a2.358,2.358,0,0,1-.052-.682,2.959,2.959,0,0,1,.129-.749,3.142,3.142,0,0,1,.787-1.207,15.532,15.532,0,0,0,1.283-1.4,3.062,3.062,0,0,0,.479-.927,3.979,3.979,0,0,0,.151-.855c.019-.364-.025-.593.023-.613s.215.274.287.564a3.167,3.167,0,0,1-.458,2.1,6.9,6.9,0,0,1-1.094,1.448,2.8,2.8,0,0,0-.849,1.234A2.466,2.466,0,0,0,26.3,8.8a3.465,3.465,0,0,0,.476,1.542C27.064,10.914,27.256,11.175,27.215,11.23Z" style="fill:#ea2d2e"/><path d="M27.193,11.266c-.124,0-.492-.365-.651-.544a4.478,4.478,0,0,1-.52-.734,2.628,2.628,0,0,1-.346-.781,2.375,2.375,0,0,1-.053-.69,2.978,2.978,0,0,1,.13-.756,3.208,3.208,0,0,1,.793-1.216c.294-.331.5-.528.659-.686a4.393,4.393,0,0,0,.622-.711,3.052,3.052,0,0,0,.476-.919,3.951,3.951,0,0,0,.15-.849c.008-.159,0-.294,0-.393,0-.159-.006-.225.038-.243a.05.05,0,0,1,.043,0,1.226,1.226,0,0,1,.28.579,3.167,3.167,0,0,1-.46,2.121,6.928,6.928,0,0,1-1.1,1.453c-.055.06-.109.116-.162.171a2.3,2.3,0,0,0-.681,1.052,2.47,2.47,0,0,0-.082.673,3.458,3.458,0,0,0,.473,1.53c.114.231.215.415.289.549.129.235.178.323.142.369h0a.051.051,0,0,1-.04.02ZM28.512,2.8a.863.863,0,0,0,0,.19c0,.1.007.236,0,.4a4.021,4.021,0,0,1-.152.861,3.106,3.106,0,0,1-.483.934,4.437,4.437,0,0,1-.629.719c-.162.158-.364.354-.657.683a3.168,3.168,0,0,0-.782,1.2,2.933,2.933,0,0,0-.128.743,2.325,2.325,0,0,0,.052.675,2.59,2.59,0,0,0,.341.767,4.422,4.422,0,0,0,.513.725,2.035,2.035,0,0,0,.611.526,1.183,1.183,0,0,0-.147-.31c-.074-.134-.175-.318-.29-.551A3.5,3.5,0,0,1,26.278,8.8a2.53,2.53,0,0,1,.084-.688,2.375,2.375,0,0,1,.694-1.075c.052-.055.106-.111.161-.171a6.879,6.879,0,0,0,1.09-1.442,3.119,3.119,0,0,0,.456-2.083A1.281,1.281,0,0,0,28.512,2.8Z"/><path d="M29.972,6.087c-.019-.088-.432-.04-.766.073a2.6,2.6,0,0,0-1.059.722,2.8,2.8,0,0,0-.916,1.855,2.972,2.972,0,0,0,.258,1.06c.221.572.455.773.444,1.225-.007.3-.114.484-.048.549s.314-.1.462-.313a1.8,1.8,0,0,0,.259-1.022c-.046-.815-.6-1.015-.608-1.8a1.858,1.858,0,0,1,.129-.676C28.57,6.509,30.008,6.252,29.972,6.087Z" style="fill:#ea2d2e"/><path d="M27.934,11.617a.094.094,0,0,1-.069-.026c-.046-.046-.03-.122-.005-.237a1.718,1.718,0,0,0,.045-.331,1.374,1.374,0,0,0-.214-.72,5,5,0,0,1-.228-.495,2.98,2.98,0,0,1-.259-1.07,2.81,2.81,0,0,1,.923-1.874,2.64,2.64,0,0,1,1.07-.729,1.482,1.482,0,0,1,.766-.1A.065.065,0,0,1,30,6.081h0c.015.07-.092.121-.306.224a2.73,2.73,0,0,0-1.542,1.463,1.827,1.827,0,0,0-.127.667,1.645,1.645,0,0,0,.291.885,1.889,1.889,0,0,1,.317.914,1.814,1.814,0,0,1-.264,1.039.809.809,0,0,1-.421.342Zm1.889-5.549a2.117,2.117,0,0,0-.608.117,2.588,2.588,0,0,0-1.048.715,2.764,2.764,0,0,0-.909,1.837,2.935,2.935,0,0,0,.256,1.05,4.955,4.955,0,0,0,.225.49,1.433,1.433,0,0,1,.22.745,1.765,1.765,0,0,1-.047.341c-.019.091-.035.163-.009.188a.046.046,0,0,0,.038.01.769.769,0,0,0,.382-.32,1.793,1.793,0,0,0,.254-1.005,1.844,1.844,0,0,0-.31-.89,1.711,1.711,0,0,1-.3-.911,1.877,1.877,0,0,1,.13-.686A2.776,2.776,0,0,1,29.67,6.257c.126-.061.283-.136.277-.164l-.008-.007A.264.264,0,0,0,29.823,6.068Z"/>`,
|
||
"PowerQuery": `<path d="M30,25.583H25.757V15.378a8.271,8.271,0,0,0-.832-4.261A3.061,3.061,0,0,0,22.118,9.8a3.383,3.383,0,0,0-2.826,1.664,6.791,6.791,0,0,0-1.161,3.987V25.583H13.869V15.031q0-5.231-3.694-5.231a3.332,3.332,0,0,0-2.826,1.573,6.935,6.935,0,0,0-1.106,4.078V25.583H2V6.856H6.243V9.818h.073a6.488,6.488,0,0,1,5.907-3.4,5.569,5.569,0,0,1,3.393,1.07A5.328,5.328,0,0,1,17.6,10.294a6.683,6.683,0,0,1,6.218-3.877Q30,6.417,30,14.043Z" style="fill:#cfcfcf"/>`,
|
||
"PowerShell": `<defs><linearGradient id="a" x1="23.325" y1="-118.543" x2="7.26" y2="-104.193" gradientTransform="matrix(1, 0, 0, -1, 0, -96)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5391fe"/><stop offset="1" stop-color="#3e6dbf"/></linearGradient><linearGradient id="b" x1="7.1" y1="-104.002" x2="23.001" y2="-118.292" xlink:href="#a"/></defs><title>file_type_powershell</title><path d="M3.174,26.589a1.154,1.154,0,0,1-.928-.423,1.234,1.234,0,0,1-.21-1.052L6.233,6.78A1.8,1.8,0,0,1,7.914,5.41H28.826a1.157,1.157,0,0,1,.928.423,1.235,1.235,0,0,1,.21,1.052l-4.2,18.335a1.8,1.8,0,0,1-1.681,1.37H3.174Z" style="fill-rule:evenodd;fill:url(#a)"/><path d="M7.914,5.646H28.826a.913.913,0,0,1,.908,1.187l-4.2,18.334a1.575,1.575,0,0,1-1.451,1.187H3.174a.913.913,0,0,1-.908-1.187l4.2-18.334A1.574,1.574,0,0,1,7.914,5.646Z" style="fill-rule:evenodd;fill:url(#b)"/><path d="M16.04,21.544h5.086a1.118,1.118,0,0,1,0,2.234H16.04a1.118,1.118,0,0,1,0-2.234Z" style="fill:#2c5591;fill-rule:evenodd"/><path d="M19.339,16.578a1.762,1.762,0,0,1-.591.6L9.309,23.953a1.224,1.224,0,0,1-1.438-1.977l8.512-6.164v-.126L11.035,10a1.224,1.224,0,0,1,1.782-1.672l6.418,6.827A1.166,1.166,0,0,1,19.339,16.578Z" style="fill:#2c5591;fill-rule:evenodd"/><path d="M19.1,16.342a1.749,1.749,0,0,1-.59.6L9.074,23.718a1.225,1.225,0,0,1-1.439-1.977l8.513-6.164V15.45L10.8,9.761a1.224,1.224,0,0,1,1.783-1.672L19,14.916A1.162,1.162,0,0,1,19.1,16.342Z" style="fill:#fff;fill-rule:evenodd"/><path d="M15.9,21.412h5.086a1.059,1.059,0,1,1,0,2.118H15.9a1.059,1.059,0,1,1,0-2.118Z" style="fill:#fff;fill-rule:evenodd"/>`,
|
||
"Processing": `<defs><linearGradient id="a" x1="16" y1="3" x2="16" y2="29" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1c4c70"/><stop offset="1" stop-color="#0c2b42"/></linearGradient></defs><title>file_type_processinglang</title><path d="M15.922,19.962a13,13,0,0,1-1.647-.077v5.552a27.76,27.76,0,0,1,3.332.461V29H5.968V25.9A27.988,27.988,0,0,1,9.3,25.438V6.715a28.215,28.215,0,0,1-3.331-.46v-3.1H8.955C10.18,3.153,13.549,3,16.23,3c6.318,0,9.8,2.948,9.8,8C26.031,16.018,22.2,19.962,15.922,19.962ZM16,7.058c-.613,0-1.149,0-1.723.038v8.615a9.694,9.694,0,0,0,1.455.115c3.025-.038,5.13-1.723,5.13-4.519C20.862,8.7,19.407,7.058,16,7.058Z" style="fill:url(#a)"/>`,
|
||
"Prolog": `<defs><radialGradient id="a" cx="1341.25" cy="-3396.866" r="18.299" gradientTransform="translate(-1327.077 3405.935)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="0.181" stop-color="#fbfbfb"/><stop offset="0.365" stop-color="#efeff0"/><stop offset="0.552" stop-color="#dadbdc"/><stop offset="0.738" stop-color="#bebfc2"/><stop offset="0.824" stop-color="#aeb0b3"/></radialGradient><radialGradient id="b" cx="6.678" cy="84.74" r="15.554" gradientTransform="translate(-1.884 -86.154) scale(1.072 1.166)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fafdff"/><stop offset="0.079" stop-color="#eef5fa"/><stop offset="0.22" stop-color="#cfdfec"/><stop offset="0.407" stop-color="#9dbbd5"/><stop offset="0.631" stop-color="#588ab5"/><stop offset="0.745" stop-color="#326fa4"/><stop offset="0.799" stop-color="#2b6698"/><stop offset="0.897" stop-color="#174e78"/><stop offset="0.994" stop-color="#003152"/></radialGradient><radialGradient id="c" cx="11.241" cy="-9.897" r="16.594" gradientTransform="translate(0 22.631) scale(1 1.062)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd540"/><stop offset="0.667" stop-color="#ec1c24"/><stop offset="0.994" stop-color="#760000"/></radialGradient><radialGradient id="d" cx="12.286" cy="26.127" r="2.083" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dddfe0"/><stop offset="0.174" stop-color="#d9dbdc"/><stop offset="0.351" stop-color="#cdcfd0"/><stop offset="0.531" stop-color="#b8babb"/><stop offset="0.711" stop-color="#9c9e9f"/><stop offset="0.891" stop-color="#78797b"/><stop offset="1" stop-color="#5e5f61"/></radialGradient><radialGradient id="e" cx="19.064" cy="26.127" r="2.083" xlink:href="#d"/><radialGradient id="f" cx="15.434" cy="16.191" r="2.687" gradientTransform="translate(0 0.461)" xlink:href="#d"/></defs><title>file_type_prolog</title><g style="isolation:isolate"><circle cx="16" cy="16" r="14" transform="translate(-6.602 14.92) rotate(-42.265)" style="fill:url(#a)"/><path d="M19.938,6.309a9.785,9.785,0,0,0-6.5-2.339C8.564,3.97,3.774,7.7,3.405,14.961c-.4,7.8,4.75,12.862,12,12.862,10.733,0,16.672-9.78,10.027-20.388,4.671,10.6-.527,17.279-7.236,17.279-5.441,0-9.61-3.651-9.61-10.345C8.582,4.709,15.823,4.039,19.938,6.309Z" style="fill:url(#b)"/><path d="M22.7,10.415c-.293-.94-.645-2.788.634-3.86a3.729,3.729,0,0,0-3.844,1.534A9.165,9.165,0,0,0,12,8.1,3.729,3.729,0,0,0,8.152,6.555c1.309,1.1.91,3.005.614,3.923A10.517,10.517,0,0,0,6.1,17.524c0,2.174,1.4,4.645,1.675,7.955l1.768-1.532a11.743,11.743,0,0,0,6.212,1.433,11.741,11.741,0,0,0,6.212-1.433l1.769,1.532c.28-3.31,1.675-5.781,1.675-7.955A10.512,10.512,0,0,0,22.7,10.415Z" style="fill:url(#c)"/><path d="M10.722,27.867a1.621,1.621,0,1,1,3.24,0c0,.018,0,.035,0,.053a2.234,2.234,0,1,0-3.228.126C10.725,27.987,10.722,27.927,10.722,27.867Z" style="fill:url(#d)"/><path d="M20.629,27.867a1.621,1.621,0,1,0-3.24,0c0,.018,0,.035,0,.053a2.234,2.234,0,1,1,3.228.126A1.678,1.678,0,0,0,20.629,27.867Z" style="fill:url(#e)"/><g style="opacity:0.53;mix-blend-mode:multiply"><path d="M8.346,18.4c-.132.667-.971.877-.971.877A1.359,1.359,0,0,1,6.809,18.1a2.929,2.929,0,0,0,.443,1.793A2.927,2.927,0,0,0,8.346,18.4Z" style="fill:#231f20"/><path d="M10.008,18.737c-.132.667-.972.877-.972.877a1.36,1.36,0,0,1-.566-1.182,2.929,2.929,0,0,0,.444,1.793A2.926,2.926,0,0,0,10.008,18.737Z" style="fill:#231f20"/><path d="M8.833,20.249c-.132.667-.971.877-.971.877A1.359,1.359,0,0,1,7.3,19.944a2.929,2.929,0,0,0,.443,1.793A2.925,2.925,0,0,0,8.833,20.249Z" style="fill:#231f20"/><path d="M10.5,20.583c-.132.667-.971.877-.971.877a1.36,1.36,0,0,1-.566-1.182A2.929,2.929,0,0,0,9.4,22.072,2.927,2.927,0,0,0,10.5,20.583Z" style="fill:#231f20"/><path d="M9.328,22.121c-.132.667-.972.877-.972.877a1.36,1.36,0,0,1-.565-1.182,2.929,2.929,0,0,0,.443,1.793A2.926,2.926,0,0,0,9.328,22.121Z" style="fill:#231f20"/><path d="M11.664,19.07c-.132.667-.972.877-.972.877a1.359,1.359,0,0,1-.565-1.182,2.93,2.93,0,0,0,.443,1.793A2.927,2.927,0,0,0,11.664,19.07Z" style="fill:#231f20"/></g><g style="opacity:0.53;mix-blend-mode:multiply"><path d="M23.157,18.4c.132.667.971.877.971.877a1.359,1.359,0,0,0,.566-1.182,2.93,2.93,0,0,1-.443,1.793A2.927,2.927,0,0,1,23.157,18.4Z" style="fill:#231f20"/><path d="M21.495,18.737c.132.667.972.877.972.877a1.36,1.36,0,0,0,.565-1.182,2.931,2.931,0,0,1-.444,1.793A2.926,2.926,0,0,1,21.495,18.737Z" style="fill:#231f20"/><path d="M22.669,20.249c.132.667.971.877.971.877a1.36,1.36,0,0,0,.566-1.182,2.929,2.929,0,0,1-.443,1.793A2.926,2.926,0,0,1,22.669,20.249Z" style="fill:#231f20"/><path d="M21.008,20.583c.132.667.971.877.971.877a1.359,1.359,0,0,0,.565-1.182,2.928,2.928,0,0,1-.443,1.793A2.927,2.927,0,0,1,21.008,20.583Z" style="fill:#231f20"/><path d="M22.175,22.121c.132.667.972.877.972.877a1.36,1.36,0,0,0,.565-1.182,2.928,2.928,0,0,1-.444,1.793A2.927,2.927,0,0,1,22.175,22.121Z" style="fill:#231f20"/><path d="M19.838,19.07c.132.667.972.877.972.877a1.359,1.359,0,0,0,.565-1.182,2.928,2.928,0,0,1-.443,1.793A2.928,2.928,0,0,1,19.838,19.07Z" style="fill:#231f20"/></g><circle cx="11.339" cy="14.074" r="3.816" style="fill:#fff"/><circle cx="12.13" cy="14.446" r="1.861" style="fill:#bdbfc1"/><circle cx="12.13" cy="14.446" r="1.191" style="fill:#231f20"/><circle cx="11.603" cy="14.027" r="0.357" style="fill:#fff"/><circle cx="20.112" cy="14.074" r="3.816" style="fill:#fff"/><circle cx="20.903" cy="14.446" r="1.861" style="fill:#bdbfc1"/><circle cx="20.903" cy="14.446" r="1.191" style="fill:#231f20"/><circle cx="20.375" cy="14.027" r="0.357" style="fill:#fff"/><path d="M15.706,21.52c0-1.412,2.157-3.413,2.157-4.887a2.157,2.157,0,0,0-4.313,0C13.55,18.107,15.706,20.108,15.706,21.52Z" style="fill:url(#f)"/></g>`,
|
||
"Protocol Buffers": `<polygon points="15.996 3.22 26.966 9.7 26.954 22.3 16 28.78 5.038 22.408 5.034 9.628 15.996 3.22" style="fill:#fff"/><path d="M16,2,3.987,9.02l0,14L16,30l12-7.1.013-13.8ZM26.954,22.3,16,28.78,5.038,22.408l0-12.78L16,3.22,26.966,9.7Z" style="fill:#171c1e"/><polygon points="25.569 13.654 19.946 16.964 19.943 24.89 25.59 21.565 25.569 13.654" style="fill:#1ea8ff"/><polygon points="23.282 12.303 25.569 13.654 19.946 16.964 19.943 24.89 17.327 23.37 17.348 15.875 23.282 12.303" style="fill:#50bfff"/><polygon points="22.512 10.35 22.514 11.816 16.411 15.498 16.418 23.597 14.998 24.431 14.994 14.856 22.512 10.35" style="fill:#97ff27"/><polygon points="20.008 8.871 22.512 10.35 14.994 14.856 14.998 24.431 12.194 22.801 12.189 13.413 20.008 8.871" style="fill:#c2ff72"/><polygon points="19.226 6.606 19.226 8.374 11.21 13.074 11.21 23.172 9.808 23.988 9.835 12.277 19.226 6.606" style="fill:#ff274b"/><polygon points="16.16 4.784 6.53 10.394 6.529 22.071 9.827 23.988 9.835 12.277 19.235 6.606 16.16 4.784" style="fill:#ff5c77"/>`,
|
||
"Pug": `<path d="M25.514,12.846c-.052-.938.209-1.825-.209-2.554-1.043-1.825-3.649-2.867-8.863-2.867V7.372h0v.052c-5.735,0-8.185,1.043-9.227,2.867a5.6,5.6,0,0,0-.469,2.554,9.546,9.546,0,0,0-.261,2.45c.156,1.147.261,2.294.417,3.336.156.886,1.408,1.564,1.564,2.4.313,2.242,2.294,3.284,8.028,3.284v.261h-.1v-.261c5.213,0,7.4-1.043,7.716-3.284.1-.834,1.147-1.512,1.3-2.4.156-1.043.209-2.19.365-3.336A11.774,11.774,0,0,0,25.514,12.846Z" style="fill:#efcca3"/><path d="M16.182,13.68a3.241,3.241,0,0,1,2.19,1.147c.73.626,1.929,1.043,2.45,1.616a4.715,4.715,0,0,1,1.408,1.981,8.9,8.9,0,0,1,.313,2.242c0,.261.156.209.573,0a9.02,9.02,0,0,0,2.19-1.877c-.156.886-1.251,1.668-1.355,2.5-.313,2.242-2.5,3.336-7.872,3.336h.313" style="fill:#ccac8d"/><path d="M19.519,11.908c.209.678.886,3.024-.469,2.242a2.557,2.557,0,0,1,.938,1.564,1.831,1.831,0,0,0,1.3,1.408,3.479,3.479,0,0,0,2.554-.626,2.956,2.956,0,0,0,.678-3.284,2.43,2.43,0,0,0-2.137-1.616C21.4,11.334,19.31,11.126,19.519,11.908Z" style="fill:#ccac8d"/><circle cx="22.178" cy="14.41" r="1.929"/><circle cx="21.656" cy="13.524" r="0.521" style="fill:#fff"/><path d="M19.206,14.306a17.68,17.68,0,0,1,2.711,2.346c.938,1.2.938,1.408.938,1.408l-.678.313a7.1,7.1,0,0,0-2.137-2.5c-1.2-.678-1.355-1.251-1.355-1.251Z" style="fill:#efcca3"/><path d="M16.235,13.68a3.605,3.605,0,0,0-2.346,1.147c-.73.626-2.033,1.043-2.5,1.616a4.806,4.806,0,0,0-1.46,1.981,8.9,8.9,0,0,0-.313,2.242c0,.261.052.313-.626,0A7.972,7.972,0,0,1,6.8,18.789c.156.886,1.251,1.668,1.355,2.5.313,2.19,2.5,3.284,7.872,3.284h.365" style="fill:#ccac8d"/><path d="M21.239,17.277a6.552,6.552,0,0,0-5.109-2.607h0a6.638,6.638,0,0,0-5.109,2.607,3.861,3.861,0,0,0-1.043,3.18c0,4.64,1.616,3.232,2.711,3.806a7.466,7.466,0,0,0,3.389.313h0a7.4,7.4,0,0,0,3.389-.313c1.095-.573,2.711.834,2.711-3.806A3.386,3.386,0,0,0,21.239,17.277Z" style="fill:#56332b"/><path d="M16.026,15.974a9.549,9.549,0,0,1-.469,2.554l.573-.156Z" style="fill:#442823"/><path d="M16.182,15.974a9.549,9.549,0,0,0,.469,2.554l-.573-.156Z" style="fill:#442823"/><path d="M14.358,15.453c-.209-.521.573-1.355,1.825-1.355s2.033.834,1.825,1.355-1.043.678-1.825.678C15.348,16.13,14.566,15.974,14.358,15.453Z" style="fill:#56332b"/><path d="M16.182,15.974c0-.1.73-.1,1.147-.365,0,0-.834.261-.991.156a.656.656,0,0,1-.209-.365.656.656,0,0,1-.209.365c-.156.1-1.095-.156-1.095-.156a8.058,8.058,0,0,1,1.2.365v.417a10.492,10.492,0,0,0,.1,2.033c.156.209.1-1.46.1-2.033A1.3,1.3,0,0,1,16.182,15.974Z"/><path d="M16.182,18.945a3.35,3.35,0,0,1,1.616.678,3.121,3.121,0,0,0-1.616-1.095,3.036,3.036,0,0,0-1.825,1.2A3.312,3.312,0,0,1,16.182,18.945Z" style="fill:#7f4a41"/><path d="M16.078,22.8a8.9,8.9,0,0,1-2.4-.469c-.156-.052-.313.052-.469,0a6.172,6.172,0,0,1-3.18-2.137v.209c0,4.64,1.616,3.232,2.711,3.806a7.466,7.466,0,0,0,3.389.313h0a7.4,7.4,0,0,0,3.389-.313c1.095-.573,2.711.834,2.711-3.806v-.469A5.914,5.914,0,0,1,19,22.282c-.156.052-.417-.052-.573-.052A7.045,7.045,0,0,1,16.078,22.8Z" style="fill:#442823"/><path d="M13.941,20.3s-.573,1.668-.156,2.4l-.521-.209A15.433,15.433,0,0,1,13.941,20.3Z" style="fill:#442823"/><path d="M18.32,20.3s.573,1.668.156,2.4L19,22.491A10.629,10.629,0,0,0,18.32,20.3Z" style="fill:#442823"/><path d="M12.585,11.908c-.209.678-.886,3.024.469,2.242a2.557,2.557,0,0,0-.938,1.564,1.831,1.831,0,0,1-1.3,1.408A3.479,3.479,0,0,1,8.258,16.5a2.956,2.956,0,0,1-.678-3.284,2.43,2.43,0,0,1,2.137-1.616C10.709,11.334,12.794,11.126,12.585,11.908Z" style="fill:#ccac8d"/><path d="M16.13,18.528a3.393,3.393,0,0,1,2.45,2.867v-.1a3.051,3.051,0,0,0-2.45-2.919,3,3,0,0,0-2.45,2.919v.1A3.463,3.463,0,0,1,16.13,18.528Z"/><ellipse cx="16.546" cy="15.138" rx="0.156" ry="0.313" transform="translate(-3.256 4.611) rotate(-14.46)" style="fill:#331712"/><ellipse cx="15.609" cy="15.146" rx="0.313" ry="0.156" transform="translate(-3.482 25.567) rotate(-72.765)" style="fill:#331712"/><circle cx="10.031" cy="14.41" r="1.929"/><circle cx="10.552" cy="13.524" r="0.521" style="fill:#fff"/><path d="M16.7,14.41s-.521.209-.626.261a2.492,2.492,0,0,1-.626-.261H16.7Z" style="fill:#7f4a41"/><path d="M12.9,14.306a17.68,17.68,0,0,0-2.711,2.346c-.938,1.2-.938,1.408-.938,1.408l.678.313a7.1,7.1,0,0,1,2.137-2.5c1.2-.678,1.355-1.251,1.355-1.251Z" style="fill:#efcca3"/><path d="M9.092,10.813a4.519,4.519,0,0,1-1.929,2.294A2.19,2.19,0,0,0,9.092,10.813Z" style="fill:#ccac8d"/><path d="M22.908,10.813a4.519,4.519,0,0,0,1.929,2.294A2.19,2.19,0,0,1,22.908,10.813Z" style="fill:#ccac8d"/><path d="M19.31,13.836a5.16,5.16,0,0,0-3.076-1.408h.156a3.852,3.852,0,0,0-3.024,1.408,4.832,4.832,0,0,1,3.024-1.043h0A5.785,5.785,0,0,1,19.31,13.836Z" style="fill:#ccac8d"/><path d="M17.746,10.969a2.455,2.455,0,0,0-1.564-.938h.156a1.786,1.786,0,0,0-1.512.938,2.187,2.187,0,0,1,1.512-.678h0A1.894,1.894,0,0,1,17.746,10.969Z" style="fill:#ccac8d"/><path d="M10.031,17.746a2.545,2.545,0,0,1-1.773.209H8.05a3.68,3.68,0,0,1-.886-1.512A2.27,2.27,0,0,0,10.031,17.746Z" style="fill:#ccac8d"/><path d="M22.126,17.746a2.545,2.545,0,0,0,1.773.209H23.69a1.749,1.749,0,0,0,1.095-1.512A2.02,2.02,0,0,1,22.126,17.746Z" style="fill:#ccac8d"/><path d="M11.23,10.709a4.75,4.75,0,0,1,2.242.1c.938.313.209,1.564.365,1.616a2.865,2.865,0,0,1,2.242-.73c1.773.1,1.981.886,2.242.73.261-.1-.261-2.19,2.45-1.72,0,0-2.763-.73-2.659,1.251a3.675,3.675,0,0,0-3.858-.1S14.827,9.927,11.23,10.709Z" style="fill:#ccac8d"/><path d="M10.5,8s-2.4,2.972-2.711,4.118c-.365,1.147-.626,5.943-.938,6.621L5.756,14.045l2.033-4.9Z" style="fill:#ccac8d"/><path d="M21.656,8s2.4,2.972,2.711,4.118c.365,1.147.626,5.943.938,6.621L26.4,14.045l-2.033-4.9Z" style="fill:#ccac8d"/><path d="M21.5,8a11.617,11.617,0,0,1,3.284,4.588c.73,2.45.417,5.474.991,5.839.834.521,1.72-2.607,2.033-2.919.469-.521,2.085-1.877,2.19-2.137s-3.232-3.91-4.744-4.64C23.585,7.893,21.4,7.789,21.5,8Z" style="fill:#56332b"/><path d="M23.69,9.3a15.379,15.379,0,0,1,2.972,8.654l1.2-2.45A16.564,16.564,0,0,0,23.69,9.3Z" style="fill:#442823"/><path d="M10.5,8a11.617,11.617,0,0,0-3.284,4.588c-.73,2.45-.417,5.474-.991,5.839-.834.521-1.72-2.607-2.033-2.919-.469-.521-2.085-1.877-2.19-2.137s3.232-3.91,4.744-4.64C8.415,7.893,10.6,7.789,10.5,8Z" style="fill:#56332b"/><path d="M8.31,9.3a15.379,15.379,0,0,0-2.972,8.654L4.14,15.5A16.564,16.564,0,0,1,8.31,9.3Z" style="fill:#442823"/><path d="M6.642,18.007a4.118,4.118,0,0,0,.573,1.564c.365.365.1-.313.1-.313s-.365-.209-.313-1.72S6.642,18.007,6.642,18.007Z" style="fill:#ccac8d"/><path d="M25.41,18.007a4.118,4.118,0,0,1-.573,1.564c-.365.365-.1-.313-.1-.313s.365-.209.313-1.72C24.993,16.078,25.41,18.007,25.41,18.007Z" style="fill:#ccac8d"/><circle cx="13.889" cy="17.121" r="0.156" style="fill:#442823"/><circle cx="12.846" cy="18.216" r="0.156" style="fill:#442823"/><circle cx="12.533" cy="17.121" r="0.156" style="fill:#442823"/><circle cx="18.164" cy="17.121" r="0.156" style="fill:#442823"/><circle cx="19.154" cy="18.216" r="0.156" style="fill:#442823"/><circle cx="19.467" cy="17.121" r="0.156" style="fill:#442823"/>`,
|
||
"Puppet": `<path d="M25.089,11.822H18.7L15.267,8.388V2H6.911v8.357H13.3l3.422,3.422h0v4.431h0l-3.434,3.434H6.911V30h8.357V23.612h0L18.7,20.178h6.388ZM9.7,4.786h2.786V7.571H9.7ZM12.482,27.2H9.7V24.417h2.786Z" style="fill:#ffae1a"/>`,
|
||
"PureScript": `<rect width="32" height="32" style="fill:#16171b"/><polygon points="21.892 22.136 19.706 20.095 10.107 20.095 12.293 22.136 21.892 22.136" style="fill:#fff"/><polygon points="12.293 14.98 10.107 17.021 19.706 17.021 21.892 14.98 12.293 14.98" style="fill:#fff"/><polygon points="21.891 11.906 19.706 9.864 10.107 9.864 12.293 11.906 21.891 11.906" style="fill:#fff"/><path d="M9.1,13.926,7.652,12.482,2.3,17.836a1.023,1.023,0,0,0,0,1.443l5.354,5.354L9.1,23.19,4.464,18.558Z" style="fill:#fff"/><path d="M29.7,12.721,24.348,7.366,22.9,8.81l4.63,4.632L22.9,18.075l1.443,1.443L29.7,14.165a1.021,1.021,0,0,0,0-1.444Z" style="fill:#fff"/>`,
|
||
"Python": `<defs><linearGradient id="a" x1="-133.268" y1="-202.91" x2="-133.198" y2="-202.84" gradientTransform="translate(25243.061 38519.17) scale(189.38 189.81)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#387eb8"/><stop offset="1" stop-color="#366994"/></linearGradient><linearGradient id="b" x1="-133.575" y1="-203.203" x2="-133.495" y2="-203.133" gradientTransform="translate(25309.061 38583.42) scale(189.38 189.81)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffe052"/><stop offset="1" stop-color="#ffc331"/></linearGradient></defs><title>file_type_python</title><path d="M15.885,2.1c-7.1,0-6.651,3.07-6.651,3.07V8.36h6.752v1H6.545S2,8.8,2,16.005s4.013,6.912,4.013,6.912H8.33V19.556s-.13-4.013,3.9-4.013h6.762s3.772.06,3.772-3.652V5.8s.572-3.712-6.842-3.712h0ZM12.153,4.237a1.214,1.214,0,1,1-1.183,1.244v-.02a1.214,1.214,0,0,1,1.214-1.214h0Z" style="fill:url(#a)"/><path d="M16.085,29.91c7.1,0,6.651-3.08,6.651-3.08V23.65H15.985v-1h9.47S30,23.158,30,15.995s-4.013-6.912-4.013-6.912H23.64V12.4s.13,4.013-3.9,4.013H12.975S9.2,16.356,9.2,20.068V26.2s-.572,3.712,6.842,3.712h.04Zm3.732-2.147A1.214,1.214,0,1,1,21,26.519v.03a1.214,1.214,0,0,1-1.214,1.214h.03Z" style="fill:url(#b)"/>`,
|
||
"Q (kdb+ database)": `<path d="M20.092,29V19.682A6.953,6.953,0,0,1,17.7,21.645a6.743,6.743,0,0,1-3.089.724A6.557,6.557,0,0,1,9.413,20,11.081,11.081,0,0,1,7,12.475,10.033,10.033,0,0,1,9.264,5.5,7.251,7.251,0,0,1,14.874,3a6.266,6.266,0,0,1,3.2.785,7.329,7.329,0,0,1,2.4,2.373V3.419H25V29Zm.157-16.542a6.492,6.492,0,0,0-1.16-4.232,3.634,3.634,0,0,0-2.905-1.387,3.742,3.742,0,0,0-2.975,1.413,6.881,6.881,0,0,0-1.2,4.485,6.767,6.767,0,0,0,1.152,4.406A3.593,3.593,0,0,0,16.009,18.5a3.786,3.786,0,0,0,2.966-1.518A6.889,6.889,0,0,0,20.249,12.458Z" style="fill:#1e78b3"/>`,
|
||
"Q#": `<path d="M19.451,6.218h2.638V8.856h2.637V6.218h2.637V8.856H30V11.5H27.364v2.636H30V16.77H27.364v2.637H24.727V16.769H22.091l0,2.637H19.453V16.768H16.815V14.127h2.638V11.5H16.815V8.853h2.639Zm2.638,7.914h2.637V11.5H22.089Z" style="fill:#33c"/><path d="M14.018,21.524a11.436,11.436,0,0,0,1.572-6.192,10.877,10.877,0,0,0-1.858-6.6A5.889,5.889,0,0,0,8.808,6.153a5.921,5.921,0,0,0-4.94,2.581A10.842,10.842,0,0,0,2,15.333a10.853,10.853,0,0,0,1.868,6.592,5.918,5.918,0,0,0,4.941,2.588,5.743,5.743,0,0,0,3.26-.987l2.306,2.321,1.577-2.4Zm-5.17-1.218,1.117,1.121a3.229,3.229,0,0,1-1.174.217,3.335,3.335,0,0,1-2.837-1.593,8.125,8.125,0,0,1-1.18-4.719,8.1,8.1,0,0,1,1.184-4.724,3.372,3.372,0,0,1,2.87-1.588,3.31,3.31,0,0,1,2.819,1.585,8.178,8.178,0,0,1,1.172,4.726,9.113,9.113,0,0,1-.833,4.15l-1.56-1.571Z" style="fill:#33c"/>`,
|
||
"QML": `<path d="M27.3,5H5.886L2,8.958V26H26.114L30,22.042V5ZM16.9,23.07l-1.828.852L13.5,21.331a3.968,3.968,0,0,1-1.082.106c-1.845,0-3.123-.5-3.85-1.49a8.03,8.03,0,0,1-1.082-4.7,8.351,8.351,0,0,1,1.1-4.773,4.379,4.379,0,0,1,3.833-1.561c1.828,0,3.087.515,3.833,1.544a8.351,8.351,0,0,1,1.1,4.773,10.809,10.809,0,0,1-.452,3.44,3.9,3.9,0,0,1-1.473,2Zm5.848-1.67a2.735,2.735,0,0,1-2.168-.692A4.192,4.192,0,0,1,20,18.1V14H19V12h1V9h2v3h2v2H22v3.9a3.907,3.907,0,0,0,.168,1.437c.112.231.393.355.86.355l1.533-.053.093,1.544A12.519,12.519,0,0,1,22.748,21.4ZM12.416,10.614a2.4,2.4,0,0,0-2.289,1.1,7.657,7.657,0,0,0-.6,3.513,7.131,7.131,0,0,0,.6,3.442A2.44,2.44,0,0,0,12.433,19.7a2.417,2.417,0,0,0,2.289-1.011,7.343,7.343,0,0,0,.586-3.442,7.692,7.692,0,0,0-.6-3.531A2.4,2.4,0,0,0,12.416,10.614Z" style="fill:#41cd52"/>`,
|
||
"R": `<defs><linearGradient id="a" x1="-134.811" y1="-103.284" x2="-134.772" y2="-103.323" gradientTransform="matrix(721.094, 0, 0, -482.937, 97213.595, -49874.512)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#cbced0"/><stop offset="1" stop-color="#84838b"/></linearGradient><linearGradient id="b" x1="-135.378" y1="-102.985" x2="-135.339" y2="-103.024" gradientTransform="matrix(398, 0, 0, -406.124, 53893, -41812.836)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#276dc3"/><stop offset="1" stop-color="#165caa"/></linearGradient></defs><title>file_type_r</title><path d="M16,23.956c-7.732,0-14-4.2-14-9.376S8.268,5.2,16,5.2,30,9.4,30,14.58,23.732,23.956,16,23.956ZM18.143,8.87C12.266,8.87,7.5,11.74,7.5,15.28s4.764,6.41,10.641,6.41,10.214-1.962,10.214-6.41S24.02,8.87,18.143,8.87Z" style="fill:url(#a)"/><path d="M23.321,19.726a10.545,10.545,0,0,1,1.34.5,2.591,2.591,0,0,1,.68.485,1.835,1.835,0,0,1,.311.447l3.339,5.63-5.4,0-2.524-4.74a6.1,6.1,0,0,0-.835-1.145.879.879,0,0,0-.641-.291H18.311v6.173l-4.776,0V11.026h9.591S27.5,11.1,27.5,15.261,23.321,19.726,23.321,19.726Zm-2.077-5.28-2.891,0v2.681h2.893a1.323,1.323,0,0,0,1.34-1.364A1.247,1.247,0,0,0,21.244,14.447Z" style="fill:url(#b)"/>`,
|
||
"Racket": `<circle cx="16" cy="16" r="14" style="fill:#fff"/><path d="M27.016,24.641a14,14,0,0,0-15.8-21.8C16.9,5.822,24.413,15.549,27.016,24.641Z" style="fill:#3e5ba9"/><path d="M13.995,10.93a24.3,24.3,0,0,0-7.22-5.46A14,14,0,0,0,5.463,25.217,39.56,39.56,0,0,1,13.995,10.93Z" style="fill:#9f1d20"/><path d="M16.575,14.1A32.645,32.645,0,0,0,9.43,28.365a14.016,14.016,0,0,0,13.3-.089A38.642,38.642,0,0,0,16.575,14.1Z" style="fill:#9f1d20"/>`,
|
||
"Razor C#": `<path d="M23.844,27.692a16.332,16.332,0,0,1-6.645,1.3q-6.364,0-10.013-3.243a11.3,11.3,0,0,1-3.649-8.9A13.716,13.716,0,0,1,7.322,6.951,12.716,12.716,0,0,1,16.9,3.008a11.676,11.676,0,0,1,8.425,3.006,9.994,9.994,0,0,1,3.142,7.533,10.187,10.187,0,0,1-2.318,7.114,7.532,7.532,0,0,1-5.817,2.547,2.613,2.613,0,0,1-1.845-.642,2.323,2.323,0,0,1-.764-1.6,4.9,4.9,0,0,1-4.148,2.243,4.6,4.6,0,0,1-3.507-1.479,5.706,5.706,0,0,1-1.384-4.063,9.913,9.913,0,0,1,2.2-6.357q2.2-2.763,4.8-2.763a5.063,5.063,0,0,1,4.256,1.716l.311-1.338h2.405l-2.081,9.08a10.716,10.716,0,0,0-.352,2.243q0,.972.744.972a4.819,4.819,0,0,0,3.877-2.047,8.93,8.93,0,0,0,1.621-5.681,7.98,7.98,0,0,0-2.675-6.175,9.887,9.887,0,0,0-6.919-2.432A10.6,10.6,0,0,0,8.713,8.352a12.066,12.066,0,0,0-3.2,8.495,9.561,9.561,0,0,0,3.06,7.573q3.06,2.7,8.586,2.7a13.757,13.757,0,0,0,5.675-1.054ZM19.466,12.25a3.977,3.977,0,0,0-3.6-1.716q-1.824,0-3.263,2.23a8.726,8.726,0,0,0-1.439,4.824q0,3.635,2.905,3.635A3.771,3.771,0,0,0,16.72,20.04a6.309,6.309,0,0,0,1.7-3.2Z" style="fill:#368832"/>`,
|
||
"React JSX": `<circle cx="16" cy="15.974" r="2.5" style="fill:#00d8ff"/><path d="M16,21.706a28.385,28.385,0,0,1-8.88-1.2,11.3,11.3,0,0,1-3.657-1.958A3.543,3.543,0,0,1,2,15.974c0-1.653,1.816-3.273,4.858-4.333A28.755,28.755,0,0,1,16,10.293a28.674,28.674,0,0,1,9.022,1.324,11.376,11.376,0,0,1,3.538,1.866A3.391,3.391,0,0,1,30,15.974c0,1.718-2.03,3.459-5.3,4.541A28.8,28.8,0,0,1,16,21.706Zm0-10.217a27.948,27.948,0,0,0-8.749,1.282c-2.8.977-4.055,2.313-4.055,3.2,0,.928,1.349,2.387,4.311,3.4A27.21,27.21,0,0,0,16,20.51a27.6,27.6,0,0,0,8.325-1.13C27.4,18.361,28.8,16.9,28.8,15.974a2.327,2.327,0,0,0-1.01-1.573,10.194,10.194,0,0,0-3.161-1.654A27.462,27.462,0,0,0,16,11.489Z" style="fill:#00d8ff"/><path d="M10.32,28.443a2.639,2.639,0,0,1-1.336-.328c-1.432-.826-1.928-3.208-1.327-6.373a28.755,28.755,0,0,1,3.4-8.593h0A28.676,28.676,0,0,1,16.71,5.995a11.376,11.376,0,0,1,3.384-2.133,3.391,3.391,0,0,1,2.878,0c1.489.858,1.982,3.486,1.287,6.859a28.806,28.806,0,0,1-3.316,8.133,28.385,28.385,0,0,1-5.476,7.093,11.3,11.3,0,0,1-3.523,2.189A4.926,4.926,0,0,1,10.32,28.443Zm1.773-14.7a27.948,27.948,0,0,0-3.26,8.219c-.553,2.915-.022,4.668.75,5.114.8.463,2.742.024,5.1-2.036a27.209,27.209,0,0,0,5.227-6.79,27.6,27.6,0,0,0,3.181-7.776c.654-3.175.089-5.119-.713-5.581a2.327,2.327,0,0,0-1.868.089A10.194,10.194,0,0,0,17.5,6.9a27.464,27.464,0,0,0-5.4,6.849Z" style="fill:#00d8ff"/><path d="M21.677,28.456c-1.355,0-3.076-.82-4.868-2.361a28.756,28.756,0,0,1-5.747-7.237h0a28.676,28.676,0,0,1-3.374-8.471,11.376,11.376,0,0,1-.158-4A3.391,3.391,0,0,1,8.964,3.9c1.487-.861,4.01.024,6.585,2.31a28.8,28.8,0,0,1,5.39,6.934,28.384,28.384,0,0,1,3.41,8.287,11.3,11.3,0,0,1,.137,4.146,3.543,3.543,0,0,1-1.494,2.555A2.59,2.59,0,0,1,21.677,28.456Zm-9.58-10.2a27.949,27.949,0,0,0,5.492,6.929c2.249,1.935,4.033,2.351,4.8,1.9.8-.465,1.39-2.363.782-5.434A27.212,27.212,0,0,0,19.9,13.74,27.6,27.6,0,0,0,14.755,7.1c-2.424-2.152-4.39-2.633-5.191-2.169a2.327,2.327,0,0,0-.855,1.662,10.194,10.194,0,0,0,.153,3.565,27.465,27.465,0,0,0,3.236,8.1Z" style="fill:#00d8ff"/>`,
|
||
"React TSX": `<circle cx="16" cy="15.974" r="2.5" style="fill:#007acc"/><path d="M16,21.706a28.385,28.385,0,0,1-8.88-1.2,11.3,11.3,0,0,1-3.657-1.958A3.543,3.543,0,0,1,2,15.974c0-1.653,1.816-3.273,4.858-4.333A28.755,28.755,0,0,1,16,10.293a28.674,28.674,0,0,1,9.022,1.324,11.376,11.376,0,0,1,3.538,1.866A3.391,3.391,0,0,1,30,15.974c0,1.718-2.03,3.459-5.3,4.541A28.8,28.8,0,0,1,16,21.706Zm0-10.217a27.948,27.948,0,0,0-8.749,1.282c-2.8.977-4.055,2.313-4.055,3.2,0,.928,1.349,2.387,4.311,3.4A27.21,27.21,0,0,0,16,20.51a27.6,27.6,0,0,0,8.325-1.13C27.4,18.361,28.8,16.9,28.8,15.974a2.327,2.327,0,0,0-1.01-1.573,10.194,10.194,0,0,0-3.161-1.654A27.462,27.462,0,0,0,16,11.489Z" style="fill:#007acc"/><path d="M10.32,28.443a2.639,2.639,0,0,1-1.336-.328c-1.432-.826-1.928-3.208-1.327-6.373a28.755,28.755,0,0,1,3.4-8.593h0A28.676,28.676,0,0,1,16.71,5.995a11.376,11.376,0,0,1,3.384-2.133,3.391,3.391,0,0,1,2.878,0c1.489.858,1.982,3.486,1.287,6.859a28.806,28.806,0,0,1-3.316,8.133,28.385,28.385,0,0,1-5.476,7.093,11.3,11.3,0,0,1-3.523,2.189A4.926,4.926,0,0,1,10.32,28.443Zm1.773-14.7a27.948,27.948,0,0,0-3.26,8.219c-.553,2.915-.022,4.668.75,5.114.8.463,2.742.024,5.1-2.036a27.209,27.209,0,0,0,5.227-6.79,27.6,27.6,0,0,0,3.181-7.776c.654-3.175.089-5.119-.713-5.581a2.327,2.327,0,0,0-1.868.089A10.194,10.194,0,0,0,17.5,6.9a27.464,27.464,0,0,0-5.4,6.849Z" style="fill:#007acc"/><path d="M21.677,28.456c-1.355,0-3.076-.82-4.868-2.361a28.756,28.756,0,0,1-5.747-7.237h0a28.676,28.676,0,0,1-3.374-8.471,11.376,11.376,0,0,1-.158-4A3.391,3.391,0,0,1,8.964,3.9c1.487-.861,4.01.024,6.585,2.31a28.8,28.8,0,0,1,5.39,6.934,28.384,28.384,0,0,1,3.41,8.287,11.3,11.3,0,0,1,.137,4.146,3.543,3.543,0,0,1-1.494,2.555A2.59,2.59,0,0,1,21.677,28.456Zm-9.58-10.2a27.949,27.949,0,0,0,5.492,6.929c2.249,1.935,4.033,2.351,4.8,1.9.8-.465,1.39-2.363.782-5.434A27.212,27.212,0,0,0,19.9,13.74,27.6,27.6,0,0,0,14.755,7.1c-2.424-2.152-4.39-2.633-5.191-2.169a2.327,2.327,0,0,0-.855,1.662,10.194,10.194,0,0,0,.153,3.565,27.465,27.465,0,0,0,3.236,8.1Z" style="fill:#007acc"/>`,
|
||
"Reason": `<polyline points="2 2 30 2 30 30 2 30 2 2" style="fill:#dd4b39"/><path d="M9.051,17.527q2.537,0,5.072,0A4.947,4.947,0,0,1,17.1,18.5a3.29,3.29,0,0,1,1.128,2.267,4.117,4.117,0,0,1-.778,3.022,3.6,3.6,0,0,1-1.137.905l2.247,3.549-3.061,0-1.6-3.043-2.154,0,0,3.032H9.051V17.527m2.69,2.128,0,3.438,1.989,0a2.184,2.184,0,0,0,1.468-.452,1.814,1.814,0,0,0,.482-1.544,1.469,1.469,0,0,0-.705-1.18,2.768,2.768,0,0,0-1.437-.269C12.94,19.654,11.741,19.655,11.741,19.655Zm8.384-2.13h8.35v2.13h-5.66V21.8l5.11,0v2.119H22.82V26.1h5.824v2.142H20.125V17.525Z" style="fill:#fff"/>`,
|
||
"Rego": `<defs><clipPath id="a"><path d="M7.055,16.241c3.415-10.22,14.759-9.473,17.924,0l.1,5.893a15.562,15.562,0,0,0-9.036,7.246A17.641,17.641,0,0,0,7.03,22.346Z" style="fill:none"/></clipPath></defs><title>file_type_rego</title><path d="M7.03,16.241l2.6-4.559c-2.418-.312-2.606-3.431-.8-9.062C3.809,8.853,2.42,10.228,7.03,16.241Z" style="fill:#bfbfbf;fill-rule:evenodd"/><path d="M24.97,16.241l-2.595-4.559c2.418-.312,2.606-3.431.8-9.062C28.191,8.853,29.58,10.228,24.97,16.241Z" style="fill:#bfbfbf;fill-rule:evenodd"/><path d="M7.055,16.241c3.415-10.22,14.759-9.473,17.924,0l.1,5.893a15.562,15.562,0,0,0-9.036,7.246A17.641,17.641,0,0,0,7.03,22.346Z" style="fill:none"/><g style="clip-path:url(#a)"><rect x="16.053" y="7.962" width="9.549" height="21.899" style="fill:#536367"/><rect x="5.322" y="7.962" width="10.732" height="21.899" style="fill:#78929a"/></g><circle cx="16.04" cy="16.241" r="1.166" style="fill:#fff"/>`,
|
||
"ReScript": `<defs><linearGradient id="a" x1="11.421" y1="-221.705" x2="21.509" y2="-248.792" gradientTransform="matrix(1, 0, 0, -1, 0, -218)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e84f4f"/><stop offset="0.409" stop-color="#db4646"/><stop offset="0.999" stop-color="#cb3939"/></linearGradient></defs><title>file_type_rescript</title><path d="M2,10.97c0-3.738,0-5.6.952-6.916a4.992,4.992,0,0,1,1.1-1.1C5.364,2,7.233,2,10.969,2H21.03c3.738,0,5.605,0,6.916.951a4.992,4.992,0,0,1,1.1,1.1C30,5.364,30,7.232,30,10.97V21.03c0,3.737,0,5.605-.952,6.916a4.966,4.966,0,0,1-1.1,1.1C26.636,30,24.768,30,21.03,30H10.969c-3.736,0-5.6,0-6.915-.952a4.966,4.966,0,0,1-1.1-1.1C2,26.636,2,24.767,2,21.03Z" style="fill:url(#a)"/><path d="M20.974,15.554a3.325,3.325,0,1,0-3.324-3.325A3.325,3.325,0,0,0,20.974,15.554Z" style="fill:#fff"/><path d="M9.316,11.809a4.676,4.676,0,0,1,.206-1.987A1.886,1.886,0,0,1,10.345,9a4.7,4.7,0,0,1,1.987-.205h2.64V21.045a4.686,4.686,0,0,1-.144,1.664,1.892,1.892,0,0,1-1.02,1.02,4.72,4.72,0,0,1-1.664.143,4.717,4.717,0,0,1-1.664-.143,1.892,1.892,0,0,1-1.02-1.02,4.72,4.72,0,0,1-.143-1.664Z" style="fill:#fff"/>`,
|
||
"reST (reStructuredText)": `<path d="M16,30A13.859,13.859,0,0,1,2.286,16,14.149,14.149,0,0,1,6.3,6.1,13.517,13.517,0,0,1,25.7,6.1,14.149,14.149,0,0,1,29.714,16,13.859,13.859,0,0,1,16,30Z" style="fill:#ce3f31"/><path d="M11.869,23.015h-.4a4.263,4.263,0,0,1-1.048-.113,1.387,1.387,0,0,1-.767-.548,2.2,2.2,0,0,1-.409-1.026A13.28,13.28,0,0,1,9.159,19.6a12.78,12.78,0,0,0-.08-1.687,1.773,1.773,0,0,0-.405-.924,1.325,1.325,0,0,0-1.026-.391V15.4a1.325,1.325,0,0,0,1.026-.391,1.773,1.773,0,0,0,.405-.924,12.78,12.78,0,0,0,.08-1.687,13.28,13.28,0,0,1,.084-1.731,2.2,2.2,0,0,1,.409-1.026,1.387,1.387,0,0,1,.767-.548,4.263,4.263,0,0,1,1.048-.113h.4v1.14h-.226q-.76,0-.931.4a7.72,7.72,0,0,0-.172,2.17,4.876,4.876,0,0,1-.416,2.316A2.117,2.117,0,0,1,8.859,16a2.089,2.089,0,0,1,1.264.986A4.876,4.876,0,0,1,10.54,19.3a7.72,7.72,0,0,0,.172,2.17q.172.4.931.4h.226Zm1.6-3.141h1.035V16.42h1.459l1.97,3.454h1.184L17.04,16.308a2.243,2.243,0,0,0,1.833-2.319c0-1.7-1.2-2.294-2.855-2.294H13.474Zm1.035-4.3V12.53h1.359c1.272,0,1.97.386,1.97,1.459s-.7,1.583-1.97,1.583Zm5.557-6.591h.4a4.263,4.263,0,0,1,1.048.113,1.387,1.387,0,0,1,.767.548,2.2,2.2,0,0,1,.409,1.026,13.28,13.28,0,0,1,.084,1.731,12.78,12.78,0,0,0,.08,1.687,1.773,1.773,0,0,0,.405.924,1.325,1.325,0,0,0,1.026.391v1.191a1.325,1.325,0,0,0-1.026.391,1.773,1.773,0,0,0-.405.924,12.78,12.78,0,0,0-.08,1.687,13.28,13.28,0,0,1-.084,1.731,2.2,2.2,0,0,1-.409,1.026,1.387,1.387,0,0,1-.767.548,4.263,4.263,0,0,1-1.048.113h-.4v-1.14h.226q.76,0,.931-.4A7.72,7.72,0,0,0,21.4,19.3a4.876,4.876,0,0,1,.416-2.316A2.089,2.089,0,0,1,23.075,16a2.117,2.117,0,0,1-1.264-.994,4.876,4.876,0,0,1-.416-2.316,7.72,7.72,0,0,0-.172-2.17q-.172-.4-.931-.4h-.226Z" style="fill:#fff"/>`,
|
||
"Robot Framework": `<circle cx="16" cy="16" r="14" style="fill:#fff"/><path d="M10.387,14.6a2.727,2.727,0,0,1,5.453,0,.99.99,0,1,1-1.98,0,.746.746,0,0,0-1.492,0,.99.99,0,1,1-1.98,0m11.3,4.586a.991.991,0,0,1-.992.992H11.508a.992.992,0,0,1,0-1.984h9.184a.994.994,0,0,1,.992.992M17.391,15.16a.992.992,0,0,1,.27-1.375l2.293-1.551a.989.989,0,1,1,1.109,1.637l-2.3,1.551a.965.965,0,0,1-.551.172.994.994,0,0,1-.824-.434m6.289,6.094a.707.707,0,0,1-.207.5l-1.707,1.707a.707.707,0,0,1-.5.207H10.8a.707.707,0,0,1-.5-.207L8.6,21.754a.707.707,0,0,1-.207-.5V10.8a.707.707,0,0,1,.207-.5L10.3,8.594a.707.707,0,0,1,.5-.207H21.266a.707.707,0,0,1,.5.207L23.473,10.3a.707.707,0,0,1,.207.5ZM25.129,9.16,22.9,6.93A1.807,1.807,0,0,0,21.629,6.4H10.438a1.807,1.807,0,0,0-1.273.527L6.938,9.16a1.8,1.8,0,0,0-.527,1.27V21.621a1.8,1.8,0,0,0,.527,1.273l2.227,2.23a1.81,1.81,0,0,0,1.273.523H21.629a1.8,1.8,0,0,0,1.273-.523l2.227-2.23a1.784,1.784,0,0,0,.527-1.273V10.434a1.784,1.784,0,0,0-.527-1.273"/>`,
|
||
"Ruby": `<defs><linearGradient id="a" x1="-235.957" y1="-308.579" x2="-235.986" y2="-308.527" gradientTransform="matrix(202.935, 0, 0, -202.78, 47910.461, -62541.16)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fb7655"/><stop offset="0.41" stop-color="#e42b1e"/><stop offset="0.99" stop-color="#900"/><stop offset="1" stop-color="#900"/></linearGradient><linearGradient id="b" x1="-235.571" y1="-309.087" x2="-235.697" y2="-309.041" gradientTransform="matrix(60.308, 0, 0, -111.778, 14236.351, -34525.395)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#871101"/><stop offset="0.99" stop-color="#911209"/><stop offset="1" stop-color="#911209"/></linearGradient><linearGradient id="c" x1="-235.896" y1="-313.362" x2="-235.937" y2="-313.129" gradientTransform="matrix(188.32, 0, 0, -21.986, 44447.302, -6856.882)" xlink:href="#b"/><linearGradient id="d" x1="-233.515" y1="-309.082" x2="-233.497" y2="-309.161" gradientTransform="matrix(65.222, 0, 0, -97.1, 15237.802, -29991.814)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="0.23" stop-color="#e57252"/><stop offset="0.46" stop-color="#de3b20"/><stop offset="0.99" stop-color="#a60003"/><stop offset="1" stop-color="#a60003"/></linearGradient><linearGradient id="e" x1="-235.314" y1="-309.534" x2="-235.31" y2="-309.607" gradientTransform="matrix(105.32, 0, 0, -106.825, 24798.925, -33053.152)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="0.23" stop-color="#e4714e"/><stop offset="0.56" stop-color="#be1a0d"/><stop offset="0.99" stop-color="#a80d00"/><stop offset="1" stop-color="#a80d00"/></linearGradient><linearGradient id="f" x1="-235.882" y1="-311.851" x2="-235.869" y2="-311.935" gradientTransform="matrix(94.321, 0, 0, -66.418, 22271.499, -20707.004)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="0.18" stop-color="#e46342"/><stop offset="0.4" stop-color="#c82410"/><stop offset="0.99" stop-color="#a80d00"/><stop offset="1" stop-color="#a80d00"/></linearGradient><linearGradient id="g" x1="-235.412" y1="-321.074" x2="-235.333" y2="-320.958" gradientTransform="matrix(70.767, 0, 0, -24.301, 16678.116, -7798.647)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="0.54" stop-color="#c81f11"/><stop offset="0.99" stop-color="#bf0905"/><stop offset="1" stop-color="#bf0905"/></linearGradient><linearGradient id="h" x1="-223.821" y1="-310.116" x2="-223.796" y2="-310.18" gradientTransform="matrix(18.177, 0, 0, -72.645, 4071.017, -22510.233)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="0.31" stop-color="#de4024"/><stop offset="0.99" stop-color="#bf190b"/><stop offset="1" stop-color="#bf190b"/></linearGradient><linearGradient id="i" x1="-235.561" y1="-309.258" x2="-235.424" y2="-309.116" gradientTransform="matrix(158.162, 0, 0, -157.937, 37256.313, -48819.382)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#bd0012"/><stop offset="0.07" stop-color="#fff"/><stop offset="0.17" stop-color="#fff"/><stop offset="0.27" stop-color="#c82f1c"/><stop offset="0.33" stop-color="#820c01"/><stop offset="0.46" stop-color="#a31601"/><stop offset="0.72" stop-color="#b31301"/><stop offset="0.99" stop-color="#e82609"/><stop offset="1" stop-color="#e82609"/></linearGradient><linearGradient id="j" x1="-235.424" y1="-309.143" x2="-235.476" y2="-309.126" gradientTransform="matrix(127.074, 0, 0, -97.409, 29932.229, -30086.947)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8c0c01"/><stop offset="0.54" stop-color="#990c00"/><stop offset="0.99" stop-color="#a80d0e"/><stop offset="1" stop-color="#a80d0e"/></linearGradient><linearGradient id="k" x1="-235.839" y1="-309.604" x2="-235.901" y2="-309.555" gradientTransform="matrix(94.011, 0, 0, -105.603, 22198.743, -32676.856)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7e110b"/><stop offset="0.99" stop-color="#9e0c00"/><stop offset="1" stop-color="#9e0c00"/></linearGradient><linearGradient id="l" x1="-235.854" y1="-311.24" x2="-235.891" y2="-311.202" gradientTransform="matrix(79.702, 0, 0, -81.791, 18827.397, -25447.905)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#79130d"/><stop offset="0.99" stop-color="#9e120b"/><stop offset="1" stop-color="#9e120b"/></linearGradient><radialGradient id="m" cx="-235.882" cy="-312.543" r="0.076" gradientTransform="matrix(93.113, 0, 0, -48.655, 21986.073, -15193.61)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a80d00"/><stop offset="0.99" stop-color="#7e0e08"/><stop offset="1" stop-color="#7e0e08"/></radialGradient><radialGradient id="n" cx="-235.282" cy="-309.704" r="0.097" gradientTransform="matrix(97.434, 0, 0, -75.848, 22937.057, -23467.84)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#a30c00"/><stop offset="0.99" stop-color="#800e08"/><stop offset="1" stop-color="#800e08"/></radialGradient><linearGradient id="o" x1="-231.241" y1="-309.435" x2="-231.299" y2="-309.337" gradientTransform="matrix(40.137, 0, 0, -81.143, 9286.998, -25078.589)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8b2114"/><stop offset="0.43" stop-color="#9e100a"/><stop offset="0.99" stop-color="#b3100c"/><stop offset="1" stop-color="#b3100c"/></linearGradient><linearGradient id="p" x1="-235.898" y1="-317.466" x2="-235.831" y2="-317.537" gradientTransform="matrix(78.099, 0, 0, -32.624, 18447.361, -10353.553)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b31000"/><stop offset="0.44" stop-color="#910f08"/><stop offset="0.99" stop-color="#791c12"/><stop offset="1" stop-color="#791c12"/></linearGradient></defs><title>file_type_ruby</title><path d="M23.693,20.469,7.707,29.961l20.7-1.4L30,7.685Z" style="fill:url(#a)"/><path d="M28.44,28.542,26.661,16.263l-4.846,6.4Z" style="fill:url(#b)"/><path d="M28.464,28.542,15.43,27.519,7.776,29.934Z" style="fill:url(#c)"/><path d="M7.794,29.937,11.05,19.27,3.885,20.8Z" style="fill:url(#d)"/><path d="M21.813,22.7l-3-11.735L10.243,19Z" style="fill:url(#e)"/><path d="M29.32,11.127l-8.1-6.619-2.257,7.3Z" style="fill:url(#f)"/><path d="M25.53,2.148,20.763,4.782l-3.007-2.67Z" style="fill:url(#g)"/><path d="M2,24.38l2-3.642L2.382,16.4Z" style="fill:url(#h)"/><path d="M2.274,16.263,3.9,20.873l7.062-1.584L19.024,11.8,21.3,4.569l-3.583-2.53-6.091,2.28C9.706,6.1,5.982,9.635,5.848,9.7s-2.459,4.464-3.574,6.562Z" style="fill:#fff"/><path d="M7.981,7.981C12.14,3.858,17.5,1.421,19.559,3.5s-.124,7.121-4.283,11.244S5.821,21.434,3.765,19.358,3.822,12.1,7.981,7.981Z" style="fill:url(#i)"/><path d="M7.794,29.933l3.231-10.7,10.729,3.447c-3.879,3.638-8.194,6.713-13.96,7.254Z" style="fill:url(#j)"/><path d="M19.038,11.774l2.754,10.91c3.24-3.407,6.149-7.07,7.573-11.6l-10.328.691Z" style="fill:url(#k)"/><path d="M29.337,11.139c1.1-3.327,1.357-8.1-3.841-8.985L21.231,4.509l8.106,6.629Z" style="fill:url(#l)"/><path d="M2,24.332c.153,5.49,4.114,5.572,5.8,5.62l-3.9-9.1L2,24.332Z" style="fill:#9e1209"/><path d="M19.053,11.791c2.49,1.531,7.509,4.6,7.61,4.661a17.552,17.552,0,0,0,2.619-5.343l-10.229.683Z" style="fill:url(#m)"/><path d="M11.021,19.232l4.319,8.332a27.924,27.924,0,0,0,6.385-4.88l-10.7-3.452Z" style="fill:url(#n)"/><path d="M3.887,20.861l-.612,7.287c1.155,1.577,2.743,1.714,4.409,1.591-1.205-3-3.614-9-3.8-8.878Z" style="fill:url(#o)"/><path d="M21.206,4.528l8.58,1.2c-.458-1.94-1.864-3.192-4.261-3.584l-4.319,2.38Z" style="fill:url(#p)"/>`,
|
||
"Rust": `<defs><radialGradient id="a" cx="-492.035" cy="-883.37" r="13.998" gradientTransform="matrix(0.866, -0.5, -0.3, -0.52, 177.106, -689.033)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7d7d7d"/><stop offset="0.267" stop-color="#7e7c7a"/><stop offset="0.45" stop-color="#817871"/><stop offset="0.608" stop-color="#867162"/><stop offset="0.753" stop-color="#8d684c"/><stop offset="0.886" stop-color="#965c30"/><stop offset="1" stop-color="#a04f12"/></radialGradient></defs><title>file_type_rust</title><path d="M15.124,5.3a.832.832,0,1,1,.832.832h0a.831.831,0,0,1-.832-.832M5.2,12.834a.832.832,0,1,1,.832.832h0a.832.832,0,0,1-.832-.832m19.856.039a.832.832,0,1,1,.832.832.831.831,0,0,1-.832-.832h0M7.605,14.013a.76.76,0,0,0,.386-1l-.369-.835H9.074v6.545H6.144a10.247,10.247,0,0,1-.332-3.911Zm6.074.161V12.245h3.458c.179,0,1.261.206,1.261,1.016,0,.672-.83.913-1.513.913ZM8.958,24.561a.832.832,0,1,1,.832.832.831.831,0,0,1-.832-.832h0m12.331.039a.832.832,0,1,1,.832.832.832.832,0,0,1-.832-.832h0m.257-1.887a.758.758,0,0,0-.9.584l-.418,1.949a10.249,10.249,0,0,1-8.545-.041l-.417-1.949a.759.759,0,0,0-.9-.583h0l-1.721.37a10.233,10.233,0,0,1-.89-1.049h8.374c.095,0,.158-.017.158-.1V18.928c0-.086-.063-.1-.158-.1h-2.45V16.947h2.649a1.665,1.665,0,0,1,1.629,1.412c.105.413.336,1.757.494,2.187.157.483.8,1.447,1.482,1.447h4.323a10.243,10.243,0,0,1-.949,1.1Zm4.65-7.821a10.261,10.261,0,0,1,.022,1.779H25.167c-.105,0-.148.069-.148.172v.483c0,1.136-.641,1.384-1.2,1.447-.535.06-1.128-.224-1.2-.551a3.616,3.616,0,0,0-1.671-2.808c1.03-.654,2.1-1.619,2.1-2.911A3.292,3.292,0,0,0,21.44,9.8a4.559,4.559,0,0,0-2.2-.724H8.367A10.246,10.246,0,0,1,14.1,5.84l1.282,1.344a.758.758,0,0,0,1.072.026h0l1.434-1.372a10.248,10.248,0,0,1,7.015,5l-.982,2.217a.761.761,0,0,0,.386,1Zm2.448.036-.033-.343,1.011-.943a.42.42,0,0,0-.013-.595.428.428,0,0,0-.121-.081L28.2,12.483l-.1-.334.806-1.12a.422.422,0,0,0-.13-.581.43.43,0,0,0-.133-.055l-1.363-.222-.164-.306.573-1.257a.419.419,0,0,0-.236-.544.426.426,0,0,0-.146-.029l-1.383.048L25.7,7.819l.318-1.347a.421.421,0,0,0-.343-.487.435.435,0,0,0-.144,0L24.183,6.3l-.266-.219L23.966,4.7a.421.421,0,0,0-.431-.411.426.426,0,0,0-.141.028l-1.257.573-.306-.164-.222-1.363a.421.421,0,0,0-.5-.318.43.43,0,0,0-.133.055l-1.121.806-.333-.1-.483-1.293a.421.421,0,0,0-.555-.215.442.442,0,0,0-.12.08L17.418,3.39l-.343-.033L16.347,2.18a.421.421,0,0,0-.688,0l-.728,1.177-.343.033-.943-1.012a.421.421,0,0,0-.595.015.442.442,0,0,0-.08.12L12.483,3.8l-.333.1-1.12-.8a.422.422,0,0,0-.581.13.43.43,0,0,0-.055.133l-.222,1.363-.306.164L8.608,4.317a.421.421,0,0,0-.544.239.444.444,0,0,0-.028.144l.048,1.383L7.818,6.3,6.471,5.984a.421.421,0,0,0-.487.343.435.435,0,0,0,0,.144L6.3,7.819l-.218.265L4.7,8.036a.422.422,0,0,0-.383.573L4.89,9.866l-.164.306-1.363.222a.42.42,0,0,0-.318.5.43.43,0,0,0,.055.133l.806,1.12-.1.334-1.293.483a.421.421,0,0,0-.215.555.414.414,0,0,0,.081.121l1.011.943-.033.343-1.177.728a.421.421,0,0,0,0,.688l1.177.728.033.343-1.011.943a.421.421,0,0,0,.015.595.436.436,0,0,0,.119.08l1.293.483.1.334L3.1,20.972a.421.421,0,0,0,.131.581.43.43,0,0,0,.133.055l1.363.222.164.307-.573,1.257a.422.422,0,0,0,.24.545.438.438,0,0,0,.143.028l1.383-.048.219.266-.317,1.348a.42.42,0,0,0,.341.486.4.4,0,0,0,.146,0L7.818,25.7l.266.218L8.035,27.3a.419.419,0,0,0,.429.41.413.413,0,0,0,.143-.028l1.257-.573.306.164.222,1.362a.421.421,0,0,0,.5.319.407.407,0,0,0,.133-.055l1.12-.807.334.1.483,1.292a.422.422,0,0,0,.556.214.436.436,0,0,0,.119-.08l.943-1.011.343.034.728,1.177a.422.422,0,0,0,.588.1.413.413,0,0,0,.1-.1l.728-1.177.343-.034.943,1.011a.421.421,0,0,0,.595-.015.436.436,0,0,0,.08-.119l.483-1.292.334-.1,1.12.807a.421.421,0,0,0,.581-.131.43.43,0,0,0,.055-.133l.222-1.362.306-.164,1.257.573a.421.421,0,0,0,.544-.239.438.438,0,0,0,.028-.143l-.048-1.384.265-.218,1.347.317a.421.421,0,0,0,.487-.34.447.447,0,0,0,0-.146L25.7,24.183l.218-.266,1.383.048a.421.421,0,0,0,.41-.431.4.4,0,0,0-.028-.142l-.573-1.257.164-.307,1.363-.222a.421.421,0,0,0,.319-.5.434.434,0,0,0-.056-.135l-.806-1.12.1-.334,1.293-.483a.42.42,0,0,0,.215-.554.414.414,0,0,0-.081-.121l-1.011-.943.033-.343,1.177-.728a.421.421,0,0,0,0-.688Z" style="fill:url(#a)"/>`,
|
||
"SAS": `<path d="M16.018,30A14,14,0,1,1,30,16.2,14,14,0,0,1,16.018,30Z" style="fill:#002bb5"/><path d="M9.17,22.63c.026.061.046.124.077.183,2.215,4.206,7.738,4.616,10.756,2.454a6.017,6.017,0,0,0,1.731-8.583,15.7,15.7,0,0,0-1.318-1.731c-.881-1.067-1.755-2.14-2.636-3.207-.366-.443-.767-.835-1.416-.683a1.393,1.393,0,0,0-.816,2.311c.888,1.106,1.819,2.177,2.7,3.286a3.874,3.874,0,0,1,.589,4.4,5.423,5.423,0,0,1-5,3.134A6.6,6.6,0,0,1,9.17,22.63Z" style="fill:#fff"/><path d="M22.494,9.609c.08-.248-.066-.37-.141-.509A7.477,7.477,0,0,0,12.6,6.237c-3.3,1.63-5.1,5.352-2.637,9.147a56.53,56.53,0,0,0,4.135,5.12,1.012,1.012,0,0,0,.709.345,1.384,1.384,0,0,0,1.428-.765,1.247,1.247,0,0,0-.173-1.507c-.876-1.051-1.769-2.088-2.615-3.162a4.13,4.13,0,0,1,.323-5.771A6.054,6.054,0,0,1,19.984,8.13,5.19,5.19,0,0,1,22.494,9.609Z" style="fill:#fff"/>`,
|
||
"Sass (Sass)": `<path d="M26.11,17.572a5.8,5.8,0,0,0-2.537.588,5.345,5.345,0,0,1-.568-1.314,3.53,3.53,0,0,1-.051-1.1,9.811,9.811,0,0,1,.332-1.192c-.005-.051-.061-.292-.624-.3s-1.048.107-1.1.256a6.171,6.171,0,0,0-.235.834,19.686,19.686,0,0,1-1.713,3.294,3.186,3.186,0,0,1-.44-2.066,9.811,9.811,0,0,1,.332-1.192c-.005-.051-.061-.292-.624-.3s-1.048.107-1.1.256-.118.5-.235.834-1.483,3.386-1.841,4.173c-.184.4-.343.726-.455.946h0a.233.233,0,0,1-.02.041c-.1.189-.153.292-.153.292v.005c-.077.138-.159.266-.2.266a1.711,1.711,0,0,1,.01-.869c.2-1.059.69-2.705.685-2.762,0-.031.092-.317-.317-.465a.508.508,0,0,0-.578.1c-.036,0-.061.087-.061.087s.445-1.851-.849-1.851a3.855,3.855,0,0,0-2.475,1.683c-.348.189-1.089.593-1.882,1.028-.3.169-.614.338-.905.5-.02-.02-.041-.046-.061-.066C6.87,17.6,3.975,16.416,4.1,14.171c.046-.818.327-2.966,5.559-5.575,4.306-2.122,7.733-1.534,8.326-.23.849,1.862-1.836,5.319-6.285,5.82a3.351,3.351,0,0,1-2.813-.711c-.235-.256-.271-.271-.358-.22-.143.077-.051.307,0,.44a2.626,2.626,0,0,0,1.606,1.263,8.55,8.55,0,0,0,5.217-.517c2.7-1.043,4.8-3.943,4.184-6.372-.619-2.465-4.71-3.278-8.582-1.9A19.5,19.5,0,0,0,4.359,9.952c-2.133,1.995-2.47,3.728-2.332,4.455.5,2.578,4.051,4.255,5.472,5.5-.072.041-.138.077-.194.107-.711.353-3.421,1.77-4.1,3.268-.767,1.7.123,2.915.711,3.079a4.374,4.374,0,0,0,4.71-1.908A4.725,4.725,0,0,0,9.049,20.1a.107.107,0,0,0-.02-.031l.557-.327c.363-.215.721-.414,1.028-.578a6.74,6.74,0,0,0-.363,1.862,3.886,3.886,0,0,0,.834,2.7.921.921,0,0,0,.675.22c.6,0,.875-.5,1.176-1.094.368-.726.7-1.57.7-1.57s-.414,2.281.711,2.281c.409,0,.823-.532,1.008-.8v.005s.01-.015.031-.051l.066-.107v-.01c.164-.286.532-.936,1.079-2.015.706-1.391,1.386-3.13,1.386-3.13a8.888,8.888,0,0,0,.271,1.13,10.643,10.643,0,0,0,.583,1.309c-.164.23-.266.358-.266.358l.005.005c-.133.174-.276.363-.435.547a16.3,16.3,0,0,0-1.314,1.647.447.447,0,0,0,.123.6,1.116,1.116,0,0,0,.685.113,3.147,3.147,0,0,0,1.028-.235,3.45,3.45,0,0,0,.885-.465,1.98,1.98,0,0,0,.849-1.744,3.521,3.521,0,0,0-.322-1.233c.051-.072.1-.143.148-.215a23.428,23.428,0,0,0,1.534-2.649,8.888,8.888,0,0,0,.271,1.13,7.57,7.57,0,0,0,.5,1.125A4.861,4.861,0,0,0,20.965,20.8c-.322.931-.072,1.35.4,1.447a1.425,1.425,0,0,0,.747-.153,3.4,3.4,0,0,0,.946-.486,2.126,2.126,0,0,0,1.043-1.729,3.268,3.268,0,0,0-.235-1.023,5.356,5.356,0,0,1,2.716-.312c2.434.286,2.915,1.805,2.823,2.445a1.618,1.618,0,0,1-.772,1.094c-.169.107-.225.143-.21.22.02.113.1.107.245.087A1.9,1.9,0,0,0,30,20.7c.077-1.5-1.355-3.145-3.887-3.13ZM7.33,23.9c-.808.88-1.933,1.212-2.419.931-.522-.3-.317-1.6.675-2.532a12.884,12.884,0,0,1,1.9-1.417c.118-.072.292-.174.5-.3l.056-.031h0l.123-.077A3.493,3.493,0,0,1,7.33,23.9Zm5.881-4c-.281.685-.869,2.44-1.227,2.342-.307-.082-.5-1.412-.061-2.726a6.193,6.193,0,0,1,.956-1.754c.44-.491.926-.655,1.043-.455a9.062,9.062,0,0,1-.711,2.593Zm4.853,2.322c-.118.061-.23.1-.281.072-.036-.02.051-.1.051-.1s.609-.655.849-.951c.138-.174.3-.378.476-.609V20.7c0,.782-.757,1.309-1.094,1.524Zm3.744-.854c-.087-.061-.072-.266.22-.905a3.408,3.408,0,0,1,.834-1.074,1.448,1.448,0,0,1,.082.471,1.547,1.547,0,0,1-1.135,1.509Z" style="fill:#cd6799"/>`,
|
||
"Sass (SCSS)": `<path d="M16.171,18.7c-.481.221-1.008.509-2.063,1.088-.4.225-.818.45-1.207.662-.027-.027-.055-.061-.082-.089-2.087-2.23-5.947-3.805-5.783-6.8.061-1.091.436-3.955,7.413-7.433,5.742-2.83,10.311-2.046,11.1-.307C26.683,8.3,23.1,12.913,17.17,13.582a4.469,4.469,0,0,1-3.751-.948c-.314-.341-.361-.361-.477-.293-.191.1-.068.409,0,.586a3.5,3.5,0,0,0,2.141,1.684,11.4,11.4,0,0,0,6.956-.689c3.594-1.391,6.4-5.258,5.578-8.5-.825-3.287-6.281-4.371-11.443-2.537a26,26,0,0,0-8.79,5.047c-2.844,2.66-3.294,4.972-3.11,5.94.662,3.437,5.4,5.674,7.3,7.331-.1.055-.184.1-.259.143-.948.471-4.562,2.36-5.463,4.358-1.023,2.264.164,3.887.948,4.105a5.832,5.832,0,0,0,6.281-2.544,6.3,6.3,0,0,0,.559-5.8,5.03,5.03,0,0,1,.716-.477c.484-.286.945-.568,1.354-.786l0,0a10.475,10.475,0,0,1,4.475-.989c3.246.382,3.887,2.407,3.764,3.26a2.157,2.157,0,0,1-1.03,1.459c-.225.143-.3.191-.28.293.027.15.136.143.327.116a2.535,2.535,0,0,0,1.766-2.257c.1-2-1.807-4.194-5.183-4.174a7.753,7.753,0,0,0-2.946.587q-.225.093-.437.2Zm-4.825,7.839c-1.078,1.173-2.578,1.616-3.226,1.241-.7-.4-.423-2.135.9-3.376a17.18,17.18,0,0,1,2.53-1.889c.157-.1.389-.232.668-.4.048-.027.075-.041.075-.041l.164-.1A4.658,4.658,0,0,1,11.346,26.539Z" style="fill:#cd6799"/>`,
|
||
"Scala": `<defs><linearGradient id="a" x1="-134.907" y1="204.572" x2="-134.896" y2="204.572" gradientTransform="matrix(1538, 0, 0, -961.25, 207495, 196661)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e62d2a"/><stop offset="0.6" stop-color="#df3f3d"/><stop offset="0.8" stop-color="#df3f3d"/><stop offset="1" stop-color="#e62d2a"/></linearGradient><linearGradient id="b" x1="-134.907" y1="203.781" x2="-134.896" y2="203.781" gradientTransform="matrix(1538, 0, 0, -961.25, 207495, 195892)" xlink:href="#a"/><linearGradient id="c" x1="-134.907" y1="205.363" x2="-134.896" y2="205.363" gradientTransform="matrix(1538, 0, 0, -961.25, 207495, 197430)" xlink:href="#a"/></defs><title>file_type_scala</title><path d="M7.384,19.231v2.154c0,.363,7.833.971,12.937,2.154,2.465-.571,4.295-1.277,4.295-2.154V19.231c0-.877-1.83-1.582-4.295-2.154-5.1,1.183-12.937,1.791-12.937,2.154" style="fill:#7f0c1d"/><path d="M7.384,10.615v2.154c0,.363,7.833.971,12.937,2.154,2.465-.571,4.295-1.277,4.295-2.154V10.615c0-.877-1.83-1.582-4.295-2.154-5.1,1.183-12.937,1.791-12.937,2.154" style="fill:#7f0c1d"/><path d="M7.384,14.923v6.462c0-.538,17.232-1.615,17.232-4.308V10.615c0,2.692-17.232,3.769-17.232,4.308" style="fill:url(#a)"/><path d="M7.384,6.308V12.77c0-.538,17.232-1.615,17.232-4.308V2c0,2.692-17.232,3.769-17.232,4.308" style="fill:url(#b)"/><path d="M7.384,23.538V30c0-.538,17.232-1.615,17.232-4.308V19.231c0,2.692-17.232,3.769-17.232,4.308" style="fill:url(#c)"/>`,
|
||
"Shell session": `<path d="M29.4,27.6H2.5V4.5H29.4Zm-25.9-1H28.4V5.5H3.5Z" style="fill:#d9b400"/><polygon points="6.077 19.316 5.522 18.484 10.366 15.255 5.479 11.184 6.12 10.416 12.035 15.344 6.077 19.316" style="fill:#d9b400"/><rect x="12.7" y="18.2" width="7.8" height="1" style="fill:#d9b400"/><rect x="2.5" y="5.5" width="26.9" height="1.9" style="fill:#d9b400"/>`,
|
||
"Shell": `<path d="M29.4,27.6H2.5V4.5H29.4Zm-25.9-1H28.4V5.5H3.5Z" style="fill:#d9b400"/><polygon points="6.077 19.316 5.522 18.484 10.366 15.255 5.479 11.184 6.12 10.416 12.035 15.344 6.077 19.316" style="fill:#d9b400"/><rect x="12.7" y="18.2" width="7.8" height="1" style="fill:#d9b400"/><rect x="2.5" y="5.5" width="26.9" height="1.9" style="fill:#d9b400"/>`,
|
||
"Smarty": `<defs><linearGradient id="a" x1="13.859" y1="29.219" x2="18.106" y2="29.219" gradientUnits="userSpaceOnUse"><stop offset="0.034" stop-color="#636361"/><stop offset="0.178" stop-color="#6c6d70"/><stop offset="0.219" stop-color="#6f7175"/><stop offset="0.309" stop-color="#616366"/><stop offset="0.481" stop-color="#3c3d3f"/><stop offset="0.716" stop-color="#010101"/><stop offset="0.719"/><stop offset="1" stop-color="#636a6e"/></linearGradient><linearGradient id="b" x1="15.178" y1="29.734" x2="16.787" y2="29.734" xlink:href="#a"/><linearGradient id="c" x1="15.277" y1="29.881" x2="16.688" y2="29.881" gradientUnits="userSpaceOnUse"><stop offset="0.034" stop-color="#9b9b98"/><stop offset="0.131" stop-color="#a4a5a7"/><stop offset="0.219" stop-color="#aeb1b8"/><stop offset="0.352" stop-color="#9fa4ab"/><stop offset="0.605" stop-color="#788188"/><stop offset="0.719" stop-color="#657076"/><stop offset="1" stop-color="#8b949a"/></linearGradient><radialGradient id="d" cx="-8.456" cy="-16.616" r="19.383" gradientTransform="translate(34.042 37.063) scale(1.054)" gradientUnits="userSpaceOnUse"><stop offset="0.034" stop-color="#70706e"/><stop offset="0.112" stop-color="#616261"/><stop offset="0.219" stop-color="#46474a"/><stop offset="0.408" stop-color="#48494c"/><stop offset="0.487" stop-color="#4e5053"/><stop offset="0.544" stop-color="#5a5c5f"/><stop offset="0.592" stop-color="#6a6e71"/><stop offset="0.633" stop-color="#7f8588"/><stop offset="0.667" stop-color="#979ea1"/><stop offset="0.719" stop-color="#3d4447"/><stop offset="1" stop-color="#656c70"/></radialGradient><linearGradient id="e" x1="16.126" y1="28.108" x2="16.05" y2="26.893" gradientUnits="userSpaceOnUse"><stop offset="0.034" stop-color="#9b9b98"/><stop offset="0.109" stop-color="#a5a6a7"/><stop offset="0.219" stop-color="#babcc4"/><stop offset="0.311" stop-color="#abaeb5"/><stop offset="0.487" stop-color="#84898f"/><stop offset="0.719" stop-color="#485054"/><stop offset="1" stop-color="#8b949a"/></linearGradient><linearGradient id="f" x1="16.013" y1="26.542" x2="15.895" y2="24.635" xlink:href="#e"/><linearGradient id="g" x1="16.023" y1="25.546" x2="15.887" y2="23.355" xlink:href="#e"/><linearGradient id="h" x1="16.013" y1="27.627" x2="15.895" y2="25.72" xlink:href="#e"/><linearGradient id="j" x1="13.68" y1="28.805" x2="18.284" y2="28.805" gradientUnits="userSpaceOnUse"><stop offset="0.034" stop-color="#545453"/><stop offset="0.071" stop-color="#616262"/><stop offset="0.143" stop-color="#848589"/><stop offset="0.219" stop-color="#aeb1b8"/><stop offset="0.352" stop-color="#9fa4ab"/><stop offset="0.605" stop-color="#788188"/><stop offset="0.719" stop-color="#657076"/><stop offset="1" stop-color="#505659"/></linearGradient><linearGradient id="k" x1="12.159" y1="25.813" x2="19.475" y2="25.813" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e5e1df"/><stop offset="0" stop-color="#dddad6"/><stop offset="0.038" stop-color="#ceccc9"/><stop offset="0.112" stop-color="#a7a9a8"/><stop offset="0.212" stop-color="#697072"/><stop offset="0.264" stop-color="#465054"/><stop offset="0.303" stop-color="#636c6f"/><stop offset="0.398" stop-color="#a5aaac"/><stop offset="0.478" stop-color="#d5d7d9"/><stop offset="0.539" stop-color="#f3f4f5"/><stop offset="0.573" stop-color="#fefeff"/><stop offset="0.62" stop-color="#f4f5f6"/><stop offset="0.699" stop-color="#dadcdf"/><stop offset="0.8" stop-color="#b0b4b9"/><stop offset="0.876" stop-color="#8b9298"/><stop offset="1" stop-color="#d1d3d4"/><stop offset="1" stop-color="#a7a9ac"/></linearGradient><linearGradient id="l" x1="12.159" y1="24.728" x2="19.475" y2="24.728" xlink:href="#k"/><linearGradient id="m" x1="12.159" y1="23.548" x2="19.475" y2="23.548" xlink:href="#k"/><linearGradient id="n" x1="12.159" y1="26.898" x2="19.475" y2="26.898" xlink:href="#k"/><linearGradient id="o" x1="12.159" y1="25.967" x2="19.475" y2="25.967" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e5e1df"/><stop offset="0" stop-color="#dde8d0"/><stop offset="0" stop-color="#d2f3ba"/><stop offset="0.036" stop-color="#c5e4b1"/><stop offset="0.105" stop-color="#a4bd98"/><stop offset="0.199" stop-color="#6e7f71"/><stop offset="0.264" stop-color="#465054"/><stop offset="0.303" stop-color="#636c6f"/><stop offset="0.398" stop-color="#a5aaac"/><stop offset="0.478" stop-color="#d5d7d9"/><stop offset="0.539" stop-color="#f3f4f5"/><stop offset="0.573" stop-color="#fefeff"/><stop offset="0.62" stop-color="#f4f5f6"/><stop offset="0.699" stop-color="#dadcdf"/><stop offset="0.8" stop-color="#b0b4b9"/><stop offset="0.876" stop-color="#8b9298"/><stop offset="1" stop-color="#d1d3d4"/><stop offset="1" stop-color="#a7a9ac"/></linearGradient><linearGradient id="p" x1="12.159" y1="24.883" x2="19.475" y2="24.883" xlink:href="#o"/><linearGradient id="q" x1="12.159" y1="27.05" x2="19.475" y2="27.05" xlink:href="#o"/><linearGradient id="r" x1="11.902" y1="23.201" x2="19.884" y2="23.201" xlink:href="#e"/><radialGradient id="s" cx="-16.983" cy="-22.948" r="10.718" gradientTransform="translate(34.042 37.063) scale(1.054)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffffd1"/><stop offset="0.505" stop-color="#ff0"/><stop offset="0.568" stop-color="#fdf700"/><stop offset="0.664" stop-color="#f6e200"/><stop offset="0.782" stop-color="#ebbf00"/><stop offset="0.906" stop-color="#de9200"/><stop offset="1" stop-color="#da9819"/></radialGradient></defs><title>file_type_smarty</title><path d="M13.859,28.776a.242.242,0,0,0,.128.191,12,12,0,0,0,1.392.622,4.3,4.3,0,0,0,.578.072h.052a4.3,4.3,0,0,0,.578-.072,12.014,12.014,0,0,0,1.392-.622.243.243,0,0,0,.128-.191l-2.137.192Z" style="fill:url(#a)"/><path d="M16.014,30a1.123,1.123,0,0,0,.688-.247.175.175,0,0,0,.085-.126v-.105a3.235,3.235,0,0,0-.773-.053h-.063a3.237,3.237,0,0,0-.773.053v.105a.175.175,0,0,0,.085.126,1.122,1.122,0,0,0,.688.247Z" style="fill:url(#b)"/><path d="M15.951,29.807a4.732,4.732,0,0,1-.674-.044,1.105,1.105,0,0,0,.674.237h.063a1.106,1.106,0,0,0,.675-.237,4.733,4.733,0,0,1-.675.044Z" style="fill:url(#c)"/><path d="M19.809,26.838a1,1,0,0,0-.234.389c-.036.181-.1.585-1.326,1.406l-.025.017a.435.435,0,0,1-.086.037,9.968,9.968,0,0,1-2.155.209,9.968,9.968,0,0,1-2.156-.209.436.436,0,0,1-.085-.036l-.025-.017a4.579,4.579,0,0,1-1.12-.957c-.164-.219-.373-.257-.39-.345a21.055,21.055,0,0,0,3.855.057,13.049,13.049,0,0,0,3.761-.654A.692.692,0,0,1,19.809,26.838Z" style="fill:url(#d)"/><path d="M19.772,26.88a.985.985,0,0,1-.246.129c-.076.028-.245.078-.245.078a25.15,25.15,0,0,1-6.458.436c-.136-.009-.32-.028-.32-.028a1.062,1.062,0,0,1-.14-.028,1.016,1.016,0,0,1,.14.107c.16.013.319.019.319.019a26.864,26.864,0,0,0,6.743-.323l.009-.042A.885.885,0,0,1,19.772,26.88Z" style="fill:url(#e)"/><path d="M19.439,25.382s.245-.07.245-.162a.114.114,0,0,0-.013-.065.214.214,0,0,1-.061-.144.437.437,0,0,1,.119-.27,1.069,1.069,0,0,1-.2.1c-.076.028-.245.078-.245.078a25.151,25.151,0,0,1-6.458.436c-.136-.009-.32-.028-.32-.028a1.055,1.055,0,0,1-.181-.041.377.377,0,0,1,.078.217.716.716,0,0,1-.254.432.673.673,0,0,1,.368-.079A26.2,26.2,0,0,0,19.439,25.382Z" style="fill:url(#f)"/><path d="M19.439,24.229s.245-.078.245-.182a.143.143,0,0,0-.013-.073.254.254,0,0,1-.061-.162.514.514,0,0,1,.119-.3,1.026,1.026,0,0,1-.2.111c-.076.032-.245.088-.245.088a22.507,22.507,0,0,1-6.458.489c-.136-.01-.32-.032-.32-.032a.953.953,0,0,1-.181-.046.455.455,0,0,1,.078.243.825.825,0,0,1-.254.484.614.614,0,0,1,.368-.089C13.014,24.758,16.935,25.041,19.439,24.229Z" style="fill:url(#g)"/><path d="M19.439,26.467s.245-.07.245-.163a.115.115,0,0,0-.013-.065.214.214,0,0,1-.061-.144.435.435,0,0,1,.119-.27,1.07,1.07,0,0,1-.2.1c-.076.028-.245.078-.245.078a25.162,25.162,0,0,1-6.458.436c-.136-.009-.32-.028-.32-.028a1.042,1.042,0,0,1-.181-.041.377.377,0,0,1,.078.217.717.717,0,0,1-.254.432.67.67,0,0,1,.368-.079A26.207,26.207,0,0,0,19.439,26.467Z" style="fill:url(#h)"/><path d="M19.439,26.467s.245-.07.245-.163a.115.115,0,0,0-.013-.065.214.214,0,0,1-.061-.144.435.435,0,0,1,.119-.27,1.07,1.07,0,0,1-.2.1c-.076.028-.245.078-.245.078a25.168,25.168,0,0,1-6.458.436c-.136-.009-.32-.028-.32-.028a1.042,1.042,0,0,1-.181-.041.376.376,0,0,1,.078.217.717.717,0,0,1-.254.432.67.67,0,0,1,.368-.079A26.207,26.207,0,0,0,19.439,26.467Z" style="fill:url(#h)"/><path d="M18.224,28.65a.435.435,0,0,1-.086.037,9.968,9.968,0,0,1-2.155.209,9.968,9.968,0,0,1-2.156-.209.436.436,0,0,1-.085-.036l-.025-.017-.029-.019a.112.112,0,0,0,0,.073c.024.073.147.1.147.1a9.943,9.943,0,0,0,2.15.209,9.942,9.942,0,0,0,2.15-.209s.126-.029.147-.1a.118.118,0,0,0,0-.073l-.029.019Z" style="fill:url(#j)"/><path d="M19.944,25.5s.041.252-.418.423c-.076.028-.245.078-.245.078a25.162,25.162,0,0,1-6.458.436c-.136-.009-.32-.028-.32-.028-.276-.038-.467-.16-.455-.308,0,0-.033-.249.466-.249a26.2,26.2,0,0,0,6.925-.472s.245-.07.245-.162a.111.111,0,0,0-.013-.066S19.944,25.312,19.944,25.5Z" style="fill:url(#k)"/><path d="M19.944,24.416s.041.252-.418.423c-.076.028-.245.078-.245.078a25.151,25.151,0,0,1-6.458.436c-.136-.009-.32-.028-.32-.028-.276-.038-.467-.16-.455-.308,0,0-.033-.248.466-.248a26.193,26.193,0,0,0,6.925-.472s.245-.07.245-.162a.11.11,0,0,0-.013-.065S19.944,24.227,19.944,24.416Z" style="fill:url(#l)"/><path d="M19.893,24.406v-.021c-.012.076-.078.236-.417.355-.076.026-.245.073-.245.073a22.372,22.372,0,0,1-5.1.5h0a22.155,22.155,0,0,0,5.1-.441s.169-.047.245-.073C19.933,24.643,19.893,24.406,19.893,24.406Z" style="fill:#fff"/><path d="M19.893,25.491V25.47c-.012.076-.078.236-.417.355-.076.027-.245.073-.245.073a22.38,22.38,0,0,1-5.1.5h0a22.171,22.171,0,0,0,5.1-.441s.169-.047.245-.073C19.933,25.728,19.893,25.491,19.893,25.491Z" style="fill:#fff"/><path d="M19.944,23.034s.041.329-.418.552c-.076.037-.245.1-.245.1a19.409,19.409,0,0,1-6.458.569c-.136-.012-.32-.037-.32-.037-.276-.05-.467-.209-.455-.4,0,0-.033-.324.466-.324a18.283,18.283,0,0,0,6.925-.461,1.014,1.014,0,0,0,.444-.238A.53.53,0,0,1,19.944,23.034Z" style="fill:url(#m)"/><path d="M19.944,26.586s.041.252-.418.423c-.076.028-.245.078-.245.078a25.15,25.15,0,0,1-6.458.436c-.136-.009-.32-.028-.32-.028-.276-.038-.467-.16-.455-.308,0,0-.033-.248.466-.248a26.207,26.207,0,0,0,6.925-.472s.245-.07.245-.163a.111.111,0,0,0-.013-.065S19.944,26.4,19.944,26.586Z" style="fill:url(#n)"/><path d="M19.893,26.576v-.021c-.012.076-.078.236-.417.355-.076.026-.245.073-.245.073a22.372,22.372,0,0,1-5.1.5h0a22.163,22.163,0,0,0,5.1-.441s.169-.047.245-.073C19.933,26.813,19.893,26.576,19.893,26.576Z" style="fill:#fff"/><path d="M19.893,23.321V23.3c-.012.076-.078.236-.417.355-.076.027-.245.073-.245.073a22.372,22.372,0,0,1-5.1.5h0a22.156,22.156,0,0,0,5.1-.441s.169-.047.245-.073C19.933,23.558,19.893,23.321,19.893,23.321Z" style="fill:#fff"/><path d="M12.417,25.881s-.236,0-.241.08.246.085.246.085.175,0,.3.005c.619-.013,1.993-.038,3.437-.166C14.384,25.958,12.723,25.883,12.417,25.881Z" style="fill:url(#o)"/><path d="M12.417,24.8s-.236,0-.241.08.246.085.246.085.175,0,.3.005c.619-.012,1.993-.038,3.437-.166C14.384,24.874,12.723,24.8,12.417,24.8Z" style="fill:url(#p)"/><path d="M12.417,26.965s-.236,0-.241.08.246.085.246.085.175,0,.3.005c.619-.012,1.993-.038,3.437-.166C14.384,27.042,12.723,26.966,12.417,26.965Z" style="fill:url(#q)"/><path d="M11.965,22.779s-.274.315.319.711c0,0,5.775.587,7.6-.695C19.884,22.795,13.623,23.32,11.965,22.779Z" style="fill:url(#r)"/><path d="M20.035,22.779a4.449,4.449,0,0,0,.81-1.155,3.386,3.386,0,0,0,.2-1.115,6.733,6.733,0,0,1,.632-2.91c.534-1.014,2.81-4.447,2.81-7.462A8.012,8.012,0,0,0,16,2a8.012,8.012,0,0,0-8.483,8.136c0,3.015,2.276,6.448,2.81,7.462a6.731,6.731,0,0,1,.632,2.91,3.384,3.384,0,0,0,.2,1.115,4.453,4.453,0,0,0,.81,1.155,13.866,13.866,0,0,0,3.987.37A15.151,15.151,0,0,0,20.035,22.779Z" style="fill:url(#s)"/>`,
|
||
"Solidity (Ethereum)": `<path d="M20.477,2l-4.5,8h-9l4.5-8h9" style="fill:#c1c1c1;opacity:0.45;isolation:isolate"/><path d="M11.52,30l4.5-8h9l-4.5,8h-9" style="fill:#c1c1c1;opacity:0.45;isolation:isolate"/><path d="M15.975,10h9l-4.5-8h-9Z" style="fill:#c1c1c1;opacity:0.6;isolation:isolate"/><path d="M16.022,22h-9l4.5,8h9Z" style="fill:#c1c1c1;opacity:0.6;isolation:isolate"/><path d="M11.477,18l4.5-8-4.5-8-4.5,8Z" style="fill:#c1c1c1;opacity:0.8;isolation:isolate"/><path d="M20.52,14l-4.5,8,4.5,8,4.5-8Z" style="fill:#c1c1c1;opacity:0.8;isolation:isolate"/>`,
|
||
"Solution file": `<defs><linearGradient id="a" x1="16" y1="-182.072" x2="16" y2="-209.928" gradientTransform="matrix(1, 0, 0, -1, 0, -180)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient></defs><title>file_type_sln</title><path d="M6.045,23.991a1.166,1.166,0,0,1-1.208.191L2.718,23.3A1.168,1.168,0,0,1,2,22.222V9.778A1.165,1.165,0,0,1,2.718,8.7l2.119-.883a1.169,1.169,0,0,1,1.208.191l.476.408A.646.646,0,0,0,5.5,8.942V23.058a.646.646,0,0,0,1.021.525Z" style="fill:#52218a"/><path d="M2.718,23.3A1.169,1.169,0,0,1,2,22.222v-.1a.674.674,0,0,0,1.174.452L21.25,2.583a1.743,1.743,0,0,1,1.99-.338l5.769,2.778A1.749,1.749,0,0,1,30,6.6v.067a1.1,1.1,0,0,0-1.8-.854L6.521,23.583l-.476.408a1.166,1.166,0,0,1-1.208.191Z" style="fill:#6c33af"/><path d="M2.718,8.7A1.168,1.168,0,0,0,2,9.778v.1a.674.674,0,0,1,1.174-.452L21.25,29.416a1.743,1.743,0,0,0,1.99.338l5.769-2.778A1.747,1.747,0,0,0,30,25.4v-.068a1.1,1.1,0,0,1-1.8.855L6.521,8.417l-.476-.408a1.166,1.166,0,0,0-1.208-.191Z" style="fill:#854cc7"/><path d="M23.24,29.755a1.743,1.743,0,0,1-1.99-.338A1.025,1.025,0,0,0,23,28.692V3.308a1.025,1.025,0,0,0-1.75-.725,1.743,1.743,0,0,1,1.99-.338l5.768,2.774A1.749,1.749,0,0,1,30,6.6V25.405a1.751,1.751,0,0,1-.991,1.577Z" style="fill:#b179f1"/><g style="opacity:0.25"><path d="M22.093,29.883a1.74,1.74,0,0,0,1.147-.128l5.768-2.774A1.749,1.749,0,0,0,30,25.4V6.6a1.75,1.75,0,0,0-.992-1.577L23.24,2.245a1.742,1.742,0,0,0-1.99.339l-9.3,10.284L6.521,8.416l-.476-.408a1.168,1.168,0,0,0-1.207-.191L2.719,8.7A1.167,1.167,0,0,0,2,9.689c0,.029,0,.059,0,.088V22.221c0,.03,0,.059,0,.088a1.167,1.167,0,0,0,.715.989l2.119.883a1.226,1.226,0,0,0,.155.052,1.165,1.165,0,0,0,1.052-.243l.476-.408,5.43-4.452,9.3,10.285A1.733,1.733,0,0,0,22.093,29.883ZM23,10.072,15.77,16,23,21.927ZM5.5,12l3.619,4L5.5,20Z" style="fill-rule:evenodd;fill:url(#a)"/></g>`,
|
||
"SPARQL": `<path d="M26.284,20.361c-.165-.084-.359-.164-.523-.248H25.9s-1.158-.5-1.24-4.176c-.111-3.655,1.1-4.289,1.1-4.289a4.96,4.96,0,0,0,2.176-2.143,5.122,5.122,0,0,0-2.122-6.927,5.342,5.342,0,0,0-7.138,2.146,5.067,5.067,0,0,0-.523,3.214L18.1,7.855s.3,1.319-2.839,3.272c-3.115,1.95-4.549.962-4.549.962l.082.138a2.131,2.131,0,0,0-.273-.167,5.117,5.117,0,1,0,.825,8.52l-.025.055s1.129-.933,4.407.827c2.592,1.374,2.979,2.748,3.033,3.24a5.1,5.1,0,0,0,2.7,4.7,5.124,5.124,0,1,0,4.825-9.041Zm-5.79.685c-.412.138-1.6.3-4.077-1.017-2.7-1.454-3.115-2.664-3.169-3.021a5.406,5.406,0,0,0-.057-1.319l.029.026S13,14.534,16.084,12.639c2.757-1.705,4.026-1.374,4.245-1.293a2.83,2.83,0,0,0,.47.277,4.082,4.082,0,0,0,.964.383c.387.357,1.076,1.374,1.158,4.1s-.717,3.764-1.158,4.121A5.04,5.04,0,0,0,20.494,21.047Z" style="fill:#0c479c"/><path d="M20.135,4.229a3.861,3.861,0,0,0-.082,5.386c-.717-.685-.688-2.117.029-3.462a.673.673,0,0,1,.746-.277c.025,0,.054.029.082.029a.993.993,0,0,0,.276.026A1.056,1.056,0,0,0,22.2,4.805a.934.934,0,0,0-.3-.685c1.38-.907,2.95-1.017,3.61-.412h.029A3.826,3.826,0,0,0,20.135,4.229ZM5.145,13.846a3.859,3.859,0,0,0-.082,5.389c-.717-.689-.692-2.117.025-3.465a.668.668,0,0,1,.746-.273c.025,0,.054.029.082.029a1,1,0,0,0,.276.026A1.056,1.056,0,0,0,7.21,14.425a.945.945,0,0,0-.3-.689c1.377-.907,2.947-1.017,3.61-.412h.025A3.852,3.852,0,0,0,5.145,13.846Zm15.872,8.163a3.865,3.865,0,0,0-.082,5.389c-.717-.689-.688-2.117.029-3.465a.668.668,0,0,1,.746-.273c.025,0,.054.026.082.026a.887.887,0,0,0,.276.029,1.057,1.057,0,0,0,1.018-1.126.936.936,0,0,0-.3-.689c1.38-.907,2.95-1.017,3.61-.412h.029A3.829,3.829,0,0,0,21.017,22.009Z" style="fill:#fff"/>`,
|
||
"SQF": `<path d="M25,23.5H7a5.015,5.015,0,0,1-5-5v-6a5.015,5.015,0,0,1,5-5H25a5.015,5.015,0,0,1,5,5v6a5.015,5.015,0,0,1-5,5Z"/><path d="M7,19.461a4.81,4.81,0,0,1-1.414-.2,5.052,5.052,0,0,1-1.111-.472l-.4.432h-.5L3.5,16.052H4a8.462,8.462,0,0,0,.431.953,4.638,4.638,0,0,0,.606.9,3.177,3.177,0,0,0,.8.675,1.985,1.985,0,0,0,1.029.26,1.672,1.672,0,0,0,1.216-.411A1.382,1.382,0,0,0,8.5,17.391a1.156,1.156,0,0,0-.359-.862,2.945,2.945,0,0,0-1.111-.6q-.49-.167-.9-.31t-.773-.292a2.58,2.58,0,0,1-1.239-1.007,2.73,2.73,0,0,1-.405-1.465,2.406,2.406,0,0,1,.21-.986,2.608,2.608,0,0,1,.612-.85,2.967,2.967,0,0,1,.985-.575,3.722,3.722,0,0,1,1.306-.223,3.984,3.984,0,0,1,1.288.2,5.151,5.151,0,0,1,.944.408l.356-.37h.507l.047,2.988h-.5q-.175-.483-.411-.987a4.332,4.332,0,0,0-.5-.839,2.3,2.3,0,0,0-.659-.573,1.729,1.729,0,0,0-.875-.214A1.437,1.437,0,0,0,6,11.212a1.233,1.233,0,0,0-.4.934,1.141,1.141,0,0,0,.347.86,2.951,2.951,0,0,0,1.082.588q.431.154.88.309t.8.3a2.885,2.885,0,0,1,1.286.955,2.512,2.512,0,0,1,.44,1.512,2.632,2.632,0,0,1-.927,1.985,3.367,3.367,0,0,1-1.079.6A4.391,4.391,0,0,1,7,19.461Z" style="fill:#c2c2c2"/><path d="M18.921,11.434a4.338,4.338,0,0,1,.971,1.432,4.834,4.834,0,0,1,.359,1.914,4.958,4.958,0,0,1-.72,2.68,4.036,4.036,0,0,1-2.038,1.661,2.151,2.151,0,0,0,.42,1.272,1.168,1.168,0,0,0,.95.537,3.563,3.563,0,0,0,.592-.043q.254-.043.458-.1v.543a5.753,5.753,0,0,1-.985.3,6.054,6.054,0,0,1-1.37.151,2.206,2.206,0,0,1-1.612-.621,2.574,2.574,0,0,1-.708-1.732A4.579,4.579,0,0,1,13.7,19a4.186,4.186,0,0,1-1.253-.932,4.388,4.388,0,0,1-.842-1.377,4.769,4.769,0,0,1-.312-1.753,5.237,5.237,0,0,1,.347-1.948,4.5,4.5,0,0,1,.953-1.5,4.119,4.119,0,0,1,1.425-.942,4.86,4.86,0,0,1,3.5-.009A4.247,4.247,0,0,1,18.921,11.434Zm-1.5,6.266a4.857,4.857,0,0,0,.379-1.273,9.981,9.981,0,0,0,.117-1.606,10.534,10.534,0,0,0-.1-1.48,4.936,4.936,0,0,0-.347-1.282,2.41,2.41,0,0,0-.665-.9,1.571,1.571,0,0,0-1.032-.34,1.73,1.73,0,0,0-1.6,1.06,6.634,6.634,0,0,0-.548,2.993,9.583,9.583,0,0,0,.12,1.551,4.8,4.8,0,0,0,.376,1.273,2.286,2.286,0,0,0,.665.856,1.591,1.591,0,0,0,.991.306,1.611,1.611,0,0,0,.991-.309A2.135,2.135,0,0,0,17.423,17.7Z" style="fill:#c2c2c2"/><path d="M28.5,12.8h-.455a3.93,3.93,0,0,0-.6-1.086,1.385,1.385,0,0,0-.812-.63c-.116-.016-.272-.031-.465-.043s-.373-.019-.535-.019H24.349v3.433h.822a1.969,1.969,0,0,0,.606-.083,1.054,1.054,0,0,0,.455-.3,1.591,1.591,0,0,0,.283-.516,2.635,2.635,0,0,0,.166-.621h.443v3.686h-.443a2.471,2.471,0,0,0-.181-.676,2.094,2.094,0,0,0-.268-.528,1.012,1.012,0,0,0-.431-.293,1.842,1.842,0,0,0-.63-.1h-.822v2.9a.842.842,0,0,0,.079.38.58.58,0,0,0,.3.256,1.87,1.87,0,0,0,.353.1q.224.046.446.071v.482h-4.46v-.482l.449-.052a1.525,1.525,0,0,0,.391-.083.547.547,0,0,0,.292-.241.842.842,0,0,0,.082-.4v-6.18a.867.867,0,0,0-.073-.367.575.575,0,0,0-.3-.262,2.341,2.341,0,0,0-.431-.136q-.268-.062-.408-.08v-.482H28.5Z" style="fill:#c2c2c2"/>`,
|
||
"SQF: Status Quo Function (Arma 3)": `<path d="M25,23.5H7a5.015,5.015,0,0,1-5-5v-6a5.015,5.015,0,0,1,5-5H25a5.015,5.015,0,0,1,5,5v6a5.015,5.015,0,0,1-5,5Z"/><path d="M7,19.461a4.81,4.81,0,0,1-1.414-.2,5.052,5.052,0,0,1-1.111-.472l-.4.432h-.5L3.5,16.052H4a8.462,8.462,0,0,0,.431.953,4.638,4.638,0,0,0,.606.9,3.177,3.177,0,0,0,.8.675,1.985,1.985,0,0,0,1.029.26,1.672,1.672,0,0,0,1.216-.411A1.382,1.382,0,0,0,8.5,17.391a1.156,1.156,0,0,0-.359-.862,2.945,2.945,0,0,0-1.111-.6q-.49-.167-.9-.31t-.773-.292a2.58,2.58,0,0,1-1.239-1.007,2.73,2.73,0,0,1-.405-1.465,2.406,2.406,0,0,1,.21-.986,2.608,2.608,0,0,1,.612-.85,2.967,2.967,0,0,1,.985-.575,3.722,3.722,0,0,1,1.306-.223,3.984,3.984,0,0,1,1.288.2,5.151,5.151,0,0,1,.944.408l.356-.37h.507l.047,2.988h-.5q-.175-.483-.411-.987a4.332,4.332,0,0,0-.5-.839,2.3,2.3,0,0,0-.659-.573,1.729,1.729,0,0,0-.875-.214A1.437,1.437,0,0,0,6,11.212a1.233,1.233,0,0,0-.4.934,1.141,1.141,0,0,0,.347.86,2.951,2.951,0,0,0,1.082.588q.431.154.88.309t.8.3a2.885,2.885,0,0,1,1.286.955,2.512,2.512,0,0,1,.44,1.512,2.632,2.632,0,0,1-.927,1.985,3.367,3.367,0,0,1-1.079.6A4.391,4.391,0,0,1,7,19.461Z" style="fill:#c2c2c2"/><path d="M18.921,11.434a4.338,4.338,0,0,1,.971,1.432,4.834,4.834,0,0,1,.359,1.914,4.958,4.958,0,0,1-.72,2.68,4.036,4.036,0,0,1-2.038,1.661,2.151,2.151,0,0,0,.42,1.272,1.168,1.168,0,0,0,.95.537,3.563,3.563,0,0,0,.592-.043q.254-.043.458-.1v.543a5.753,5.753,0,0,1-.985.3,6.054,6.054,0,0,1-1.37.151,2.206,2.206,0,0,1-1.612-.621,2.574,2.574,0,0,1-.708-1.732A4.579,4.579,0,0,1,13.7,19a4.186,4.186,0,0,1-1.253-.932,4.388,4.388,0,0,1-.842-1.377,4.769,4.769,0,0,1-.312-1.753,5.237,5.237,0,0,1,.347-1.948,4.5,4.5,0,0,1,.953-1.5,4.119,4.119,0,0,1,1.425-.942,4.86,4.86,0,0,1,3.5-.009A4.247,4.247,0,0,1,18.921,11.434Zm-1.5,6.266a4.857,4.857,0,0,0,.379-1.273,9.981,9.981,0,0,0,.117-1.606,10.534,10.534,0,0,0-.1-1.48,4.936,4.936,0,0,0-.347-1.282,2.41,2.41,0,0,0-.665-.9,1.571,1.571,0,0,0-1.032-.34,1.73,1.73,0,0,0-1.6,1.06,6.634,6.634,0,0,0-.548,2.993,9.583,9.583,0,0,0,.12,1.551,4.8,4.8,0,0,0,.376,1.273,2.286,2.286,0,0,0,.665.856,1.591,1.591,0,0,0,.991.306,1.611,1.611,0,0,0,.991-.309A2.135,2.135,0,0,0,17.423,17.7Z" style="fill:#c2c2c2"/><path d="M28.5,12.8h-.455a3.93,3.93,0,0,0-.6-1.086,1.385,1.385,0,0,0-.812-.63c-.116-.016-.272-.031-.465-.043s-.373-.019-.535-.019H24.349v3.433h.822a1.969,1.969,0,0,0,.606-.083,1.054,1.054,0,0,0,.455-.3,1.591,1.591,0,0,0,.283-.516,2.635,2.635,0,0,0,.166-.621h.443v3.686h-.443a2.471,2.471,0,0,0-.181-.676,2.094,2.094,0,0,0-.268-.528,1.012,1.012,0,0,0-.431-.293,1.842,1.842,0,0,0-.63-.1h-.822v2.9a.842.842,0,0,0,.079.38.58.58,0,0,0,.3.256,1.87,1.87,0,0,0,.353.1q.224.046.446.071v.482h-4.46v-.482l.449-.052a1.525,1.525,0,0,0,.391-.083.547.547,0,0,0,.292-.241.842.842,0,0,0,.082-.4v-6.18a.867.867,0,0,0-.073-.367.575.575,0,0,0-.3-.262,2.341,2.341,0,0,0-.431-.136q-.268-.062-.408-.08v-.482H28.5Z" style="fill:#c2c2c2"/>`,
|
||
"SQL": `<path d="M8.562,15.256A21.159,21.159,0,0,0,16,16.449a21.159,21.159,0,0,0,7.438-1.194c1.864-.727,2.525-1.535,2.525-2V9.7a10.357,10.357,0,0,1-2.084,1.076A22.293,22.293,0,0,1,16,12.078a22.36,22.36,0,0,1-7.879-1.3A10.28,10.28,0,0,1,6.037,9.7v3.55C6.037,13.724,6.7,14.528,8.562,15.256Z" style="fill:#ffda44"/><path d="M8.562,21.961a15.611,15.611,0,0,0,2.6.741A24.9,24.9,0,0,0,16,23.155a24.9,24.9,0,0,0,4.838-.452,15.614,15.614,0,0,0,2.6-.741c1.864-.727,2.525-1.535,2.525-2v-3.39a10.706,10.706,0,0,1-1.692.825A23.49,23.49,0,0,1,16,18.74a23.49,23.49,0,0,1-8.271-1.348,10.829,10.829,0,0,1-1.692-.825V19.96C6.037,20.426,6.7,21.231,8.562,21.961Z" style="fill:#ffda44"/><path d="M16,30c5.5,0,9.963-1.744,9.963-3.894V23.269a10.5,10.5,0,0,1-1.535.762l-.157.063A23.487,23.487,0,0,1,16,25.445a23.422,23.422,0,0,1-8.271-1.351c-.054-.02-.106-.043-.157-.063a10.5,10.5,0,0,1-1.535-.762v2.837C6.037,28.256,10.5,30,16,30Z" style="fill:#ffda44"/><ellipse cx="16" cy="5.894" rx="9.963" ry="3.894" style="fill:#ffda44"/>`,
|
||
"Squirrel": `<path d="M12.966,27.3a18.926,18.926,0,0,1-5.707-.915c-1.832-.592-4.044-1.54-4.931-3.645a.557.557,0,0,1-.025-.073,12.214,12.214,0,0,1,.763-7.531c1.522-4.008,3.71-6.739,6.5-8.116a10.422,10.422,0,0,1,7.6-.55,10.426,10.426,0,0,1,6.04,4.639,11.057,11.057,0,0,1,1.058,2.326,10.66,10.66,0,0,1-5.378,12.689l-.02.009A14.832,14.832,0,0,1,12.966,27.3Z"/><path d="M22.72,11.393a10.144,10.144,0,0,0-12.9-3.869C6.7,9.061,4.784,12.2,3.593,15.334a11.9,11.9,0,0,0-.746,7.187c.783,1.86,2.779,2.744,4.582,3.327a16.206,16.206,0,0,0,11.213-.232A10.11,10.11,0,0,0,23.727,13.6,10.488,10.488,0,0,0,22.72,11.393Z" style="fill:#a05a2c"/><path d="M15.782,6.72A8.263,8.263,0,0,1,17.64,8.084,9.65,9.65,0,0,1,19.08,9.8a9.317,9.317,0,0,1-1.531,11.921A14.933,14.933,0,0,1,7.656,24.7a7.581,7.581,0,0,1-4.135-1.1,8.454,8.454,0,0,0,3.907,2.241,16.208,16.208,0,0,0,11.214-.233A10.112,10.112,0,0,0,23.727,13.6a10.487,10.487,0,0,0-1.007-2.211A9.973,9.973,0,0,0,15.782,6.72Z" style="fill-opacity:0.3137255012989044"/><path d="M23.476,13.389l-1.062-2.895.152-.236A6.875,6.875,0,0,1,27.509,7.7a2.177,2.177,0,0,1,1.879.588,3.376,3.376,0,0,1,.1,3.729c-.343.292-.751.124-1.222-.07a2.821,2.821,0,0,0-2.133-.27,10.2,10.2,0,0,0-2.047,1.209Z"/><path d="M23.039,10.563c1.223-1.9,5.107-2.915,5.912-1.923a2.97,2.97,0,0,1,.177,2.945c-.245.207-1.837-1.059-3.225-.423A10.574,10.574,0,0,0,23.73,12.45Z" style="fill:#502d16"/><path d="M29.4,9.727a.8.8,0,0,1-.2.469c-.229.162-1.9-.506-3.238.056a12.439,12.439,0,0,0-2.071,1.07L23.2,10.34c-.057.074-.116.147-.165.223l.692,1.886A10.577,10.577,0,0,1,25.9,11.162c1.388-.636,2.98.631,3.225.423A2.846,2.846,0,0,0,29.4,9.727Z" style="fill-opacity:0.3137255012989044"/><path d="M21.382,25.18a2.236,2.236,0,0,1-1.147-.323.563.563,0,0,1-.082-.888c.737-.684.607-2.173-.41-4.689a36.526,36.526,0,0,0-5.123-8.825l-.35-.43c-1.512-1.865-2.358-2.815-3.554-2.3a.562.562,0,0,1-.413.016.571.571,0,0,1-.377-.592,2.119,2.119,0,0,1,1.461-2c4.716-1.481,10.26.814,12.905,5.344a11.2,11.2,0,0,1-1.431,13.991A1.919,1.919,0,0,1,21.382,25.18Z"/><path d="M23.812,10.783c-2.444-4.192-7.73-6.528-12.27-5.093-1.007.248-1.065,1.535-1.052,1.517,1.776-.767,2.953.919,4.566,2.89a36.9,36.9,0,0,1,5.209,8.971c.89,2.2,1.4,4.267.27,5.312a1.5,1.5,0,0,0,1.909-.274A10.646,10.646,0,0,0,23.812,10.783Z" style="fill:#502d16"/><path d="M23.649,10.346a9.314,9.314,0,0,1-2.518,7.725c-.455.486-.873.177-1.263.063.138.313.271.626.4.936.89,2.2,1.4,4.266.271,5.312a1.5,1.5,0,0,0,1.909-.274C26.089,20.183,26.357,14.919,23.649,10.346Z" style="fill-opacity:0.3137255012989044"/>`,
|
||
"Stan": `<title>file_type_stan</title><path d="M16,2A14,14,0,0,0,5.688,25.469c1.7-.514,3.411-.992,4.806-1.357,4.037-1.054,10.948-2.836,11.946-5.082-.28.78-1.218,2.87-1.218,2.87-1.279,1.247-7.09,2.631-10.917,3.367-1.22.235-2.614.507-4.026.806A14,14,0,0,0,28.467,9.628c-2.526.408-10.5,1.854-12.539,2.315-2.255.509-6.789,1.433-7.694,2.993C8.8,13.5,10.492,9.744,10.492,9.744c1.216-2,6.6-3.425,10.358-4.463.876-.242,1.922-.539,3.023-.858A13.934,13.934,0,0,0,16,2Z" style="fill:#b2001d"/><path d="M8.223,14.987c-.252,1.175,3.52,2.313,6.921,3.389a26.362,26.362,0,0,1,5.667,2.192,3.085,3.085,0,0,0,1.662-1.614c.377-1.489-3.013-3.393-5.274-4.229a33.337,33.337,0,0,1-4.407-2.042c-4.316,1.143-4.569,2.3-4.569,2.3Z" style="fill:#590815"/>`,
|
||
"Stata Ado": `<defs><linearGradient id="a" x1="16" y1="2" x2="16" y2="30" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8aa7c0"/><stop offset="1" stop-color="#3c6e8f"/></linearGradient></defs><title>file_type_stata</title><rect x="2" y="2" width="28" height="28" rx="1.556" ry="1.556" style="fill:url(#a)"/><rect x="13.171" y="6.015" width="5.756" height="5.756" style="fill:#fff"/><rect x="20.326" y="6.015" width="5.756" height="5.756" style="fill:#fff"/><rect x="20.326" y="13.171" width="5.756" height="5.756" style="fill:#fff"/><rect x="13.171" y="13.171" width="5.756" height="5.756" style="fill:#fff"/><rect x="6.015" y="13.171" width="5.756" height="5.756" style="fill:#fff"/><rect x="6.015" y="20.326" width="5.756" height="5.756" style="fill:#fff"/><rect x="13.171" y="20.326" width="5.756" height="5.756" style="fill:#fff"/>`,
|
||
"Stylus": `<title>file_type_stylus</title><path d="M6.315,20.776c.726-.869.812-1.766.249-3.432-.356-1.054-.947-1.865-.513-2.521.463-.7,1.445-.021.627.911l.164.114c.983.114,1.467-1.232.733-1.616-1.937-1.011-3.631.933-2.884,3.183.32.954.769,1.965.406,2.77A1.794,1.794,0,0,1,3.773,21.3c-.847.043-.285-1.9.691-2.385.085-.043.206-.1.093-.242a2.134,2.134,0,0,0-2.314,1.2C1.061,22.121,4.485,22.954,6.315,20.776Z" style="fill:#c2c2c2"/><path d="M27.462,14.14c.278.684.7,1.36.449,1.958-.206.513-.477.726-.776.776-.42.071-.306-1.246.413-1.638.064-.036.157-.206.071-.306a1.636,1.636,0,0,0-1.7.961c-.8,1.687,1.823,2.15,3.112.491.513-.662.534-1.317.043-2.506-.313-.755-.79-1.317-.491-1.816.32-.527,1.089-.071.513.634l.128.071c.748.043,1.054-.954.484-1.2A1.834,1.834,0,0,0,27.462,14.14Z" style="fill:#c2c2c2"/><path d="M17.95,12.338c-.52-.413-1.979.278-2.392,1.3a16.213,16.213,0,0,1-2.043,4.037c-.8.876-.876.2-.8-.306A15.327,15.327,0,0,1,14.7,12.652c-.235-.349-1.773-.3-2.841,1.36-.4.627-1.31,2.713-2.321,4.358-.221.356-.5.107-.285-.726a39.8,39.8,0,0,1,1.873-5.682,39.072,39.072,0,0,1,6.921-.819c.263-.071.441-.306,0-.32a46.778,46.778,0,0,0-6.593.441,4.923,4.923,0,0,1,1.445-1.944,1.787,1.787,0,0,0-2.264.719,12.287,12.287,0,0,0-.819,1.453,24.194,24.194,0,0,0-3.98.862c-.783.3-.7,1.246-.221,1.068a31.631,31.631,0,0,1,3.816-1.1,30.292,30.292,0,0,0-1.865,5.682c-.441,2.492,1.1,2.478,1.858,1.5.819-1.075,2.528-4.856,2.791-5.255.078-.135.185-.064.128.057-1.908,3.809-1.744,5.283-.2,4.956a4.929,4.929,0,0,0,2.214-1.965c.064-.15.2-.135.171-.071-1.21,3.14-2.748,5.682-3.781,6.479-.94.719-1.638-.84,1.687-3.076.491-.335.263-.79-.292-.634h0a29.793,29.793,0,0,0-8.786,3.325c-.164.114-.313.206-.306.441.007.135.242.085.356.014A22.771,22.771,0,0,1,11.1,20.9a.158.158,0,0,0,.114.007c.121-.028.114.036.036.085-.178.1-.356.192-.4.206-1.766.691-2.834,2.214-2.456,2.99.32.669,2.051.427,2.869-.014,2.008-1.089,3.468-3.225,4.464-6.173C16.6,15.386,17.693,12.424,17.95,12.338Z" style="fill:#c2c2c2"/><path d="M29.62,18.369a48.145,48.145,0,0,0-13.429.968c-.926.242-.669.733-.2.641.007,0,.206-.05.214-.05a42.279,42.279,0,0,1,12.375-.242C29.014,19.765,30.317,18.462,29.62,18.369Z" style="fill:#c2c2c2"/><path d="M18.861,17.985c.911-.456,2.264-3.275,3.154-4.82.064-.114.178-.021.114.057-2.25,3.873-1.3,4.322-.406,4.265,1.189-.071,2.286-1.78,2.528-2.165.1-.15.157-.028.1.078-.057.178-.263.491-.456.919-.271.605.014.84.249.947.37.178,1.381.064,1.538-.555-1.011-.021,1.41-4.792,1.659-5.084a1.718,1.718,0,0,0-2.2.975c-1.018,2.015-1.873,3.638-2.407,3.667-1.04.057,1.2-4.493,1.559-4.635-.221-.32-1.638-.185-2.428,1.04-.285.441-2.022,3.517-2.449,4.023-.755.9-.812.128-.6-.769a10.569,10.569,0,0,1,.349-1.132,5.324,5.324,0,0,1,1.36-1.844c2.2-2.442,3.46-4.422,2.962-5.2-.441-.691-1.915-.384-2.862,1.04-1.744,2.613-3.354,6.195-3.56,7.832S18.056,18.383,18.861,17.985Zm.926-4.792c.078-.178.128-.228.263-.527h0A24.934,24.934,0,0,1,22.492,8.28c.42-.441,1.011.157-.057,1.794a16.462,16.462,0,0,1-2.115,2.642v.007c-.2.221-.377.406-.456.513C19.808,13.307,19.744,13.292,19.787,13.193Z" style="fill:#c2c2c2"/>`,
|
||
"SVG": `<path d="M7.674,14.488a2.218,2.218,0,1,0,0,3.137H24.326a2.218,2.218,0,1,0,0-3.137Z" style="fill:#ffb13b;stroke:#000;stroke-width:3.73000001907349px"/><path d="M11.222,9.06A2.218,2.218,0,1,0,9,11.278L20.778,23.052A2.218,2.218,0,1,0,23,20.834Z" style="fill:#ffb13b;stroke:#000;stroke-width:3.73000001907349px"/><path d="M17.568,7.73a2.218,2.218,0,1,0-3.137,0V24.382a2.218,2.218,0,1,0,3.137,0Z" style="fill:#ffb13b;stroke:#000;stroke-width:3.73000001907349px"/><path d="M23,11.278A2.218,2.218,0,1,0,20.778,9.06L9,20.834a2.218,2.218,0,1,0,2.218,2.218Z" style="fill:#ffb13b;stroke:#000;stroke-width:3.73000001907349px"/><path d="M7.674,14.488a2.218,2.218,0,1,0,0,3.137H24.326a2.218,2.218,0,1,0,0-3.137Z" style="fill:#ffb13b"/><path d="M11.222,9.06A2.218,2.218,0,1,0,9,11.278L20.778,23.052A2.218,2.218,0,1,0,23,20.834Z" style="fill:#ffb13b"/><path d="M17.568,7.73a2.218,2.218,0,1,0-3.137,0V24.382a2.218,2.218,0,1,0,3.137,0Z" style="fill:#ffb13b"/><path d="M23,11.278A2.218,2.218,0,1,0,20.778,9.06L9,20.834a2.218,2.218,0,1,0,2.218,2.218Z" style="fill:#ffb13b"/><path d="M2,16.056H30V25.95a4.035,4.035,0,0,1-4.106,4.106H6.106A4.035,4.035,0,0,1,2,25.95Z"/><path d="M6.2,23.045A3.628,3.628,0,1,1,12.4,20.48H10.27A1.5,1.5,0,1,0,7.7,21.541h0a1.6,1.6,0,0,0,1.062.441h0a4.118,4.118,0,0,1,2.566,1.063h0a3.628,3.628,0,1,1-6.194,2.565H7.264A1.5,1.5,0,1,0,9.83,24.55h0a1.948,1.948,0,0,0-1.063-.44h0A4.465,4.465,0,0,1,6.2,23.045Z" style="fill:#fff"/><path d="M19.651,16.852,17.085,29.24H14.96L12.4,16.852H14.52l1.5,7.255,1.5-7.255Z" style="fill:#fff"/><path d="M23.28,21.983h3.628v3.628h0a3.628,3.628,0,1,1-7.257,0h0V20.48h0a3.628,3.628,0,0,1,7.257,0H24.783a1.5,1.5,0,1,0-3.005,0v5.13h0a1.5,1.5,0,0,0,3.005,0h0v-1.5h-1.5V21.983Z" style="fill:#fff"/>`,
|
||
"Swift": `<defs><linearGradient id="a" x1="-134.494" y1="-171.82" x2="-134.497" y2="-171.89" gradientTransform="matrix(240, 0, 0, -205.6, 32295, -35312.585)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f88535"/><stop offset="1" stop-color="#fd2221"/></linearGradient></defs><title>file_type_swift</title><path d="M19.422,4.007s6.217,3.554,7.844,9.2c1.466,5.1.292,7.534.292,7.534a8.915,8.915,0,0,1,1.742,2.8,4.825,4.825,0,0,1,.29,4.453s-.1-2.08-3.2-2.511c-2.841-.4-3.874,2.366-9.3,2.232A18.435,18.435,0,0,1,2,19.354C4.651,20.8,8.124,23.045,12.449,22.7s5.228-1.674,5.228-1.674A66.9,66.9,0,0,1,4.891,7.643c3.4,2.845,11.822,8.507,11.626,8.363A75.826,75.826,0,0,1,8.092,6.24S20.728,16.629,21.745,16.563c.418-.861,2.579-5.318-2.324-12.557Z" style="fill:url(#a)"/>`,
|
||
"Systemd configuration file": `<path d="M2,12v8H5.256V18.769H3.3V13.231H5.256V12Z" style="fill:#d2d2d2"/><path d="M26.744,12v1.231H28.7v5.538H26.744V20H30V12Z" style="fill:#d2d2d2"/><path d="M17.628,16l5.21-2.769v5.538Z" style="fill:#30d475"/><ellipse cx="12.093" cy="16" rx="2.93" ry="2.769" style="fill:#30d475"/>`,
|
||
"T4 templating": `<path d="M19.545,6.035H13.27V24H8.3V6.035H2.055V2h17.49Z" style="fill:#1e88e5"/><path d="M27.567,10V22.608h2.4V25.9h-2.4V30H23.551V25.9H14.834V22.455q1.158-1.3,2.4-2.838t2.4-3.173q1.158-1.632,2.155-3.285A32.925,32.925,0,0,0,23.481,10ZM18.781,22.608h4.77V15.621q-.488.907-1.06,1.834t-1.2,1.827q-.628.9-1.269,1.743T18.781,22.608Z" style="fill:#1e88e5"/>`,
|
||
"T4 Text Templates (C#)": `<path d="M19.545,6.035H13.27V24H8.3V6.035H2.055V2h17.49Z" style="fill:#1e88e5"/><path d="M27.567,10V22.608h2.4V25.9h-2.4V30H23.551V25.9H14.834V22.455q1.158-1.3,2.4-2.838t2.4-3.173q1.158-1.632,2.155-3.285A32.925,32.925,0,0,0,23.481,10ZM18.781,22.608h4.77V15.621q-.488.907-1.06,1.834t-1.2,1.827q-.628.9-1.269,1.743T18.781,22.608Z" style="fill:#1e88e5"/>`,
|
||
"T4 Text Templates (VB)": `<path d="M19.545,6.035H13.27V24H8.3V6.035H2.055V2h17.49Z" style="fill:#1e88e5"/><path d="M27.567,10V22.608h2.4V25.9h-2.4V30H23.551V25.9H14.834V22.455q1.158-1.3,2.4-2.838t2.4-3.173q1.158-1.632,2.155-3.285A32.925,32.925,0,0,0,23.481,10ZM18.781,22.608h4.77V15.621q-.488.907-1.06,1.834t-1.2,1.827q-.628.9-1.269,1.743T18.781,22.608Z" style="fill:#1e88e5"/>`,
|
||
"Tcl": `<path d="M21.942,2.876c.04,2.468-.033,4.91-2.169,7.23l-.079.089h.119l.873.013c-1.418,2.95-2.341,5.892-4.38,8.83l-.073.106.126-.023,1.078-.2a5.851,5.851,0,0,1-3.484,3.65c-.39-5.455,2.333-10.27,4.645-15.071l.007-.013-.086-.06c-3.786,4.233-5.491,10.2-6.136,15.127a4.582,4.582,0,0,1-2.145-2.988l.9.377.093.04-.02-.1c-.681-3.028.376-5.2,1.4-8.056l.737.493.086.06,0-.1c-.058-2.32,1.5-4.649,3.577-6.727l.288.77.04.1.056-.1.631-1.051,0-.007A6.1,6.1,0,0,1,21.942,2.876Z" style="fill:#c3b15f"/><path d="M21.948,2.875a6.131,6.131,0,0,0-3.926,2.388l0,.007-.631,1.051-.056.1-.04-.1L17,5.544c-2.072,2.078-3.635,4.407-3.577,6.727l0,.1-.086-.06-.737-.493c-1.025,2.856-2.083,5.029-1.4,8.056l.02.1-.093-.04-.886-.374c0,.018.007.035.01.053a4.533,4.533,0,0,0,2.126,2.932c.05-.381.105-.771.169-1.164-1.543-3.614-.2-6.271.407-8.661l.939.542c-.13-2.238,1.184-4.651,2.893-6.757l.5.873C18.555,4.769,19.56,3.72,21.948,2.875Z" style="fill:#eff1cb;stroke:#eff1cb"/><path d="M22.518,2l-.056.01c-2.082.363-4.121,1.128-5.015,2.959l-.377-.658-.033-.06-.05.05a20.85,20.85,0,0,0-2.939,3.5A5.939,5.939,0,0,0,12.835,11l-.532-.664-.053-.066-.036.076a27.535,27.535,0,0,0-1.693,4.7,6.73,6.73,0,0,0-.159,3.719l-.876-.509-.073-.043-.007.086a5.529,5.529,0,0,0,2.017,4.843l-.972.241-.2.05.2.053a4.258,4.258,0,0,1,1.455.6,1.325,1.325,0,0,1,.516,1.3V28.1l.01.013,1.217,1.745.1.139V25.719a3.466,3.466,0,0,1,.621-1.484A1.639,1.639,0,0,1,15.5,23.7l.182-.023-.165-.076-.641-.3a9.112,9.112,0,0,0,3.693-5.322l.02-.086-.083.023-.793.215a11.669,11.669,0,0,0,2.089-3.5C20.512,13,21.18,11.166,21.728,9.7l.03-.079-.083.007-.612.043a6.655,6.655,0,0,0,1.382-3.527,17.039,17.039,0,0,0,.079-4.086Zm-.575.876c.04,2.468-.033,4.91-2.169,7.23l-.079.089h.119l.873.013c-1.418,2.95-2.341,5.892-4.38,8.83l-.073.106.126-.023,1.078-.2a5.851,5.851,0,0,1-3.484,3.65c-.39-5.455,2.333-10.27,4.645-15.071l.007-.013-.086-.06c-3.786,4.233-5.491,10.2-6.136,15.127a4.582,4.582,0,0,1-2.145-2.988l.9.377.093.04-.02-.1c-.681-3.028.376-5.2,1.4-8.056l.737.493.086.06,0-.1c-.058-2.32,1.5-4.649,3.577-6.727l.288.77.04.1.056-.1.631-1.051,0-.007A6.1,6.1,0,0,1,21.942,2.876Z"/>`,
|
||
"Template Toolkit 2": `<path d="M8.907,23.021H8.878a3.305,3.305,0,0,1-2.011-.661A2.561,2.561,0,0,1,5.83,20.334V16.1H4.288a3.05,3.05,0,0,1-2.738-1.69,3.3,3.3,0,0,1,.441-3.53,2.265,2.265,0,0,1,1.815-.9h9.65a3.05,3.05,0,0,1,2.738,1.69,3.3,3.3,0,0,1-.441,3.53,2.265,2.265,0,0,1-1.815.9H11.955v4.231a2.561,2.561,0,0,1-1.037,2.026A3.305,3.305,0,0,1,8.907,23.021ZM4.264,11.636a1.39,1.39,0,0,0-1.388,1.388v.033a1.39,1.39,0,0,0,1.388,1.388H7.487v5.881c0,.572.624,1.037,1.39,1.037h.029c.767,0,1.39-.465,1.39-1.037V14.446h3.223a1.39,1.39,0,0,0,1.388-1.388v-.033a1.39,1.39,0,0,0-1.388-1.388Z" style="fill:#015d9a"/><path d="M14.981,12.953v.033a1.533,1.533,0,0,1-1.533,1.533H10.37v5.737a1.393,1.393,0,0,1-1.535,1.181H8.806a1.393,1.393,0,0,1-1.535-1.181V14.518H4.192A1.533,1.533,0,0,1,2.66,12.986v-.033A1.533,1.533,0,0,1,4.192,11.42h9.257A1.533,1.533,0,0,1,14.981,12.953Zm-4.223,9.222a2.418,2.418,0,0,0,.98-1.912V15.888h2.127a2.114,2.114,0,0,0,1.7-.846,2.992,2.992,0,0,0-2.18-4.99H3.735a2.114,2.114,0,0,0-1.7.846,2.992,2.992,0,0,0,2.18,4.99H5.9v4.375a2.418,2.418,0,0,0,.98,1.912,3.16,3.16,0,0,0,1.923.631h.029A3.16,3.16,0,0,0,10.758,22.174Z" style="fill:#3bcefc"/><path d="M23.607,23.021h-.029a3.305,3.305,0,0,1-2.011-.661,2.561,2.561,0,0,1-1.037-2.026V16.1H18.988a3.05,3.05,0,0,1-2.738-1.69,3.3,3.3,0,0,1,.441-3.53,2.265,2.265,0,0,1,1.815-.9h9.65a3.05,3.05,0,0,1,2.738,1.69,3.3,3.3,0,0,1-.441,3.53,2.265,2.265,0,0,1-1.815.9H26.655v4.231a2.561,2.561,0,0,1-1.037,2.026A3.305,3.305,0,0,1,23.607,23.021ZM18.964,11.636a1.39,1.39,0,0,0-1.388,1.388v.033a1.39,1.39,0,0,0,1.388,1.388h3.223v5.881c0,.572.624,1.037,1.39,1.037h.029c.767,0,1.39-.465,1.39-1.037V14.446h3.223a1.39,1.39,0,0,0,1.388-1.388v-.033a1.39,1.39,0,0,0-1.388-1.388Z" style="fill:#015d9a"/><path d="M29.681,12.953v.033a1.533,1.533,0,0,1-1.533,1.533H25.07v5.737a1.393,1.393,0,0,1-1.535,1.181h-.029a1.393,1.393,0,0,1-1.535-1.181V14.518H18.892a1.533,1.533,0,0,1-1.533-1.533v-.033a1.533,1.533,0,0,1,1.533-1.533h9.257A1.533,1.533,0,0,1,29.681,12.953Zm-4.223,9.222a2.418,2.418,0,0,0,.98-1.912V15.888h2.127a2.114,2.114,0,0,0,1.7-.846,2.992,2.992,0,0,0-2.18-4.99h-9.65a2.114,2.114,0,0,0-1.7.846,2.992,2.992,0,0,0,2.18,4.99H20.6v4.375a2.418,2.418,0,0,0,.98,1.912,3.16,3.16,0,0,0,1.923.631h.029A3.16,3.16,0,0,0,25.458,22.174Z" style="fill:#3bcefc"/>`,
|
||
"TeX": `<path d="M11.333,13.122c-.128-1.562-.241-2.756-2.287-2.756H7.91v8.4h2.145v.611l-3.083-.029-3.082.029v-.611H6.034v-8.4H4.884c-2.046,0-2.159,1.208-2.287,2.756H2l.284-3.367h9.362l.284,3.367h-.6Z" style="fill:#cfcfcf"/><path d="M19.289,22.53H10.41V21.92h1.506V13.467H10.41v-.611h8.637l.412,3.367h-.6c-.213-1.833-.682-2.756-2.855-2.756H13.791V17.2h.838c1.364,0,1.505-.6,1.505-1.662h.6v3.935h-.6c0-1.08-.142-1.662-1.505-1.662h-.838v4.106h2.216c2.472,0,3-1.108,3.3-3.225h.6Z" style="fill:#cfcfcf"/><path d="M27.727,19.186c-.54,0-1.96,0-2.415.029V18.6h1.179l-2.557-3.552-2.529,3.381A4.1,4.1,0,0,0,22.7,18.6v.611c-.355-.029-1.576-.029-2.017-.029-.4,0-1.548,0-1.875.029V18.6h.383a7.459,7.459,0,0,0,.824-.043c.5-.043.54-.085.667-.256L23.536,14.5l-3.153-4.418H19V9.47c.384.028,1.79.028,2.273.028.582,0,1.918,0,2.429-.028v.611H22.528l2.117,2.955,2.074-2.784a4.1,4.1,0,0,0-1.293-.17V9.47c.356.028,1.591.028,2.032.028.4,0,1.534,0,1.861-.028v.611h-.369a5.264,5.264,0,0,0-.838.043c-.469.043-.526.071-.667.256l-2.4,3.21L28.636,18.6H30v.611C29.645,19.186,28.182,19.186,27.727,19.186Z" style="fill:#cfcfcf"/>`,
|
||
"Textile": `<path d="M28.681,26.075H3.319A1.317,1.317,0,0,1,2,24.756V7.244A1.317,1.317,0,0,1,3.319,5.925H28.681A1.317,1.317,0,0,1,30,7.244V24.76A1.316,1.316,0,0,1,28.681,26.075Z" style="fill:#ffe7ac"/><path d="M6.066,12.848a4.987,4.987,0,0,1,1.508-.659V10.664a3.7,3.7,0,0,1,.743-.33,7.869,7.869,0,0,1,1.327-.347h.642v2.391h2.484V13.6H10.286v4.848a3.172,3.172,0,0,0,.29,1.609,1.07,1.07,0,0,0,.971.448,7.127,7.127,0,0,0,.76-.048,3.338,3.338,0,0,0,.782-.18l.132.62a2.388,2.388,0,0,1-.5.356,5.457,5.457,0,0,1-.752.356,5.837,5.837,0,0,1-.923.281A4.769,4.769,0,0,1,10,22a2.385,2.385,0,0,1-1.824-.637,2.947,2.947,0,0,1-.6-2.062V13.591H6.066Z"/><path d="M14.607,20.453a1.447,1.447,0,0,1,.431-1.09,1.591,1.591,0,0,1,1.147-.413,1.649,1.649,0,0,1,1.165.413,1.422,1.422,0,0,1,.453,1.09,1.369,1.369,0,0,1-.453,1.081,1.692,1.692,0,0,1-1.165.4,1.61,1.61,0,0,1-1.147-.4A1.427,1.427,0,0,1,14.607,20.453Z"/>`,
|
||
"TOML": `<path d="M22.76,6.83v3.25h-5V25.17H14.26V10.08h-5V6.83Z" style="fill:#7f7f7f"/><path d="M2,2H8.2V5.09H5.34v21.8H8.2V30H2Z" style="fill:#bfbfbf"/><path d="M30,30H23.8V26.91h2.86V5.11H23.8V2H30Z" style="fill:#bfbfbf"/>`,
|
||
"TSConfig": `<path d="M23.827,8.243A4.424,4.424,0,0,1,26.05,9.524a5.853,5.853,0,0,1,.852,1.143c.011.045-1.534,1.083-2.471,1.662-.034.023-.169-.124-.322-.35a2.014,2.014,0,0,0-1.67-1c-1.077-.074-1.771.49-1.766,1.433a1.3,1.3,0,0,0,.153.666c.237.49.677.784,2.059,1.383,2.544,1.1,3.636,1.817,4.31,2.843a5.158,5.158,0,0,1,.416,4.333,4.764,4.764,0,0,1-3.932,2.815,10.9,10.9,0,0,1-2.708-.028,6.531,6.531,0,0,1-3.616-1.884,6.278,6.278,0,0,1-.926-1.371,2.655,2.655,0,0,1,.327-.208c.158-.09.756-.434,1.32-.761l1.024-.6.214.312a4.771,4.771,0,0,0,1.35,1.292,3.3,3.3,0,0,0,3.458-.175,1.545,1.545,0,0,0,.2-1.974c-.276-.4-.84-.727-2.443-1.422a8.8,8.8,0,0,1-3.349-2.055,4.687,4.687,0,0,1-.976-1.777,7.116,7.116,0,0,1-.062-2.268,4.332,4.332,0,0,1,3.644-3.374A9,9,0,0,1,23.827,8.243ZM15.484,9.726l.011,1.454h-4.63V24.328H7.6V11.183H2.97V9.755a13.986,13.986,0,0,1,.04-1.466c.017-.023,2.832-.034,6.245-.028l6.211.017Z" style="fill:#007acc"/><path d="M27.075,25.107l.363-.361c1.68.055,1.706,0,1.78-.177l.462-1.124.034-.107-.038-.093c-.02-.049-.081-.2-1.13-1.2v-.526c1.211-1.166,1.185-1.226,1.116-1.4l-.46-1.136c-.069-.17-.1-.237-1.763-.191l-.364-.367a8.138,8.138,0,0,0-.057-1.657l-.047-.106-1.2-.525c-.177-.081-.239-.11-1.372,1.124l-.509-.008c-1.167-1.245-1.222-1.223-1.4-1.152l-1.115.452c-.175.071-.236.1-.169,1.79l-.36.359c-1.68-.055-1.7,0-1.778.177L18.606,20l-.036.108.038.094c.02.048.078.194,1.13,1.2v.525c-1.211,1.166-1.184,1.226-1.115,1.4l.459,1.137c.07.174.1.236,1.763.192l.363.377a8.169,8.169,0,0,0,.055,1.654l.047.107,1.208.528c.176.073.236.1,1.366-1.13l.509.006c1.168,1.247,1.228,1.223,1.4,1.154l1.113-.45C27.082,26.827,27.143,26.8,27.075,25.107Zm-4.788-2.632a2,2,0,1,1,2.618,1.14A2.023,2.023,0,0,1,22.287,22.475Z" style="fill:#99b8c4"/>`,
|
||
"Twig": `<path d="M4.574,5.463c.262.4,2.5-1.608,4.454-1.161,2.061.472,4.014,3.724,4.848,13.7a40.18,40.18,0,0,1,3.541,3.61q.53.614,1.013,1.22a11.847,11.847,0,0,1,.229-1.4,12.3,12.3,0,0,1,1.981-4.4A19.151,19.151,0,0,0,17.272,7.9c-1.03-1.445-4.6-6.478-8.546-5.843C6.182,2.465,4.3,5.054,4.574,5.463Z" style="fill:#63bf6a"/><path d="M24.4,30c-.32-2.567-.448-4.76-.5-6.449-.094-3.232.1-4.541.9-5.756.193-.295,1.288-1.975,2.58-1.863,1.466.128,2.213,2.414,2.362,2.337.175-.09-.36-3.543-2.532-4.431-2.6-1.063-6.312,2.07-7.8,5.154a12.223,12.223,0,0,0-.857,2.81,32.555,32.555,0,0,0-.71,8.2Z" style="fill:#74d74d"/><path d="M2.238,13.935c.145-.447,2.468-.259,4.54.293,2.5.666,7,2.344,11.651,8.606A12.544,12.544,0,0,1,20.279,30H10.386a21.875,21.875,0,0,0-.175-4.62,14.9,14.9,0,0,0-2.459-7.158C5.441,15.159,2.055,14.5,2.238,13.935Z" style="fill:#78dc50"/><path d="M17.3,21.323a1.753,1.753,0,1,1-.513-1.24A1.748,1.748,0,0,1,17.3,21.323Z" style="fill:#fff"/><path d="M21.975,21.323a1.753,1.753,0,1,1-.513-1.24A1.748,1.748,0,0,1,21.975,21.323Z" style="fill:#fff"/>`,
|
||
"TypeScript": `<rect x="2" y="2" width="28" height="28" rx="1.312" style="fill:#3178c6"/><path d="M18.245,23.759v3.068a6.492,6.492,0,0,0,1.764.575,11.56,11.56,0,0,0,2.146.192,9.968,9.968,0,0,0,2.088-.211,5.11,5.11,0,0,0,1.735-.7,3.542,3.542,0,0,0,1.181-1.266,4.469,4.469,0,0,0,.186-3.394,3.409,3.409,0,0,0-.717-1.117,5.236,5.236,0,0,0-1.123-.877,12.027,12.027,0,0,0-1.477-.734q-.6-.249-1.08-.484a5.5,5.5,0,0,1-.813-.479,2.089,2.089,0,0,1-.516-.518,1.091,1.091,0,0,1-.181-.618,1.039,1.039,0,0,1,.162-.571,1.4,1.4,0,0,1,.459-.436,2.439,2.439,0,0,1,.726-.283,4.211,4.211,0,0,1,.956-.1,5.942,5.942,0,0,1,.808.058,6.292,6.292,0,0,1,.856.177,5.994,5.994,0,0,1,.836.3,4.657,4.657,0,0,1,.751.422V13.9a7.509,7.509,0,0,0-1.525-.4,12.426,12.426,0,0,0-1.9-.129,8.767,8.767,0,0,0-2.064.235,5.239,5.239,0,0,0-1.716.733,3.655,3.655,0,0,0-1.171,1.271,3.731,3.731,0,0,0-.431,1.845,3.588,3.588,0,0,0,.789,2.34,6,6,0,0,0,2.395,1.639q.63.26,1.175.509a6.458,6.458,0,0,1,.942.517,2.463,2.463,0,0,1,.626.585,1.2,1.2,0,0,1,.23.719,1.1,1.1,0,0,1-.144.552,1.269,1.269,0,0,1-.435.441,2.381,2.381,0,0,1-.726.292,4.377,4.377,0,0,1-1.018.105,5.773,5.773,0,0,1-1.969-.35A5.874,5.874,0,0,1,18.245,23.759Zm-5.154-7.638h4V13.594H5.938v2.527H9.92V27.375h3.171Z" style="fill:#fff;fill-rule:evenodd"/>`,
|
||
"TypoScript": `<path d="M23.093,21.3a3.847,3.847,0,0,1-1.18.165c-3.555,0-8.778-12.424-8.778-16.559,0-1.523.362-2.031.87-2.466C9.653,2.943,4.43,4.539,2.761,6.57a4.048,4.048,0,0,0-.58,2.321C2.181,15.348,9.072,30,13.933,30c2.248,0,6.041-3.7,9.16-8.7" style="fill:#ff8700"/><path d="M20.823,2c4.5,0,9,.725,9,3.264,0,5.151-3.264,11.389-4.933,11.389-2.974,0-6.673-8.269-6.673-12.4,0-1.886.725-2.249,2.611-2.249" style="fill:#ff8700"/>`,
|
||
"V": `<path d="M20.467,29.288,29.952,2.913a.5.5,0,0,0-.566-.728L21.927,2.9a1.464,1.464,0,0,0-1.141.9L12.007,29.006a.573.573,0,0,0,.578.813h7.26a.657.657,0,0,0,.577-.4Z" style="fill:#536b8a"/><path d="M2.614,2.185l7.459.719a1.466,1.466,0,0,1,1.142.9L20.18,29.413a.286.286,0,0,1-.289.406H12.585a1.311,1.311,0,0,1-1.152-.81L2.048,2.913A.5.5,0,0,1,2.614,2.185Z" style="fill:#5d87bf"/>`,
|
||
"Vala": `<path d="M12.509,17.193c-.165-6.836-.325-12.455-.357-12.487A7.916,7.916,0,0,0,9.879,5.874,7.606,7.606,0,0,0,7.324,9.188a8.422,8.422,0,0,0-.587,3.543,4.665,4.665,0,0,0,.2,1.962,3.417,3.417,0,0,1,.182.56c-.012.009-.338-.018-.724-.061-1.868-.207-2.786-1.05-3-2.757A6.312,6.312,0,0,1,4.85,7.719a15.134,15.134,0,0,1,8.414-5.163,12.891,12.891,0,0,1,2.542-.235l1.748-.05.059,2.506c.032,1.378.1,6.358.161,11.067s-.252,8.29-.219,8.4C19.5,17.879,22,13.073,24.367,6.253l1.427-3.983H28.54c-.022.063-2.751,6.5-5.514,13.916l-5.473,13.55H12.976C12.976,27.906,12.535,18.486,12.509,17.193Z" style="fill:#403757"/><path d="M17.732,30H12.713v-.263c0-1.137-.17-5.192-.307-8.452-.081-1.929-.15-3.6-.161-4.087-.156-6.479-.286-11-.336-12.163a11.674,11.674,0,0,0-1.874,1.049,7.348,7.348,0,0,0-2.466,3.2A8.146,8.146,0,0,0,7,12.731,4.37,4.37,0,0,0,7.185,14.6c.215.569.273.723.1.859-.093.073-.107.084-.916-.007-1.976-.219-3-1.167-3.234-2.986A6.568,6.568,0,0,1,4.64,7.561,15.439,15.439,0,0,1,13.2,2.3,13.176,13.176,0,0,1,15.8,2.058L17.811,2l.065,2.77c.032,1.392.106,6.461.161,11.07.031,2.616-.052,4.915-.124,6.43.931-2.763,1.958-5.27,3.033-7.9,1.043-2.547,2.122-5.18,3.173-8.207l1.491-4.16h3.3l-.125.351c0,.007-.031.076-.084.2-1.1,2.622-3.259,7.889-5.43,13.717Zm-4.495-.526h4.14l5.407-13.386c2.124-5.7,4.243-10.876,5.362-13.555H25.979L24.614,6.342c-1.055,3.038-2.137,5.678-3.183,8.231-1.311,3.2-2.55,6.226-3.626,9.747l-.255.831-.248-.833a3.274,3.274,0,0,1,.021-.839c.074-1.35.229-4.158.188-7.633-.055-4.607-.129-9.674-.161-11.064L17.3,2.541l-1.484.043a12.729,12.729,0,0,0-2.49.228A14.887,14.887,0,0,0,5.06,7.877a6.071,6.071,0,0,0-1.4,4.524c.2,1.58,1.028,2.336,2.77,2.529l.333.035c-.019-.054-.041-.114-.066-.179a4.893,4.893,0,0,1-.219-2.055,8.7,8.7,0,0,1,.6-3.638,7.883,7.883,0,0,1,2.644-3.43c.022-.016,2.232-1.525,2.615-1.142.092.092.131.131.433,12.666h0c.01.485.08,2.149.16,4.076C13.06,24.313,13.217,28.06,13.237,29.474Z" style="fill:#c8c8c8"/>`,
|
||
"VB.Net": `<path d="M6.67,7.836,9,18.915,11.336,7.836H16L11.336,24.164H6.672L2,7.836Z" style="fill:#00519a"/><path d="M18.331,7.836h7.6a4.08,4.08,0,0,1,2.9,1.749,3.78,3.78,0,0,1,.571,2.04,3.985,3.985,0,0,1-.571,2.034,4.108,4.108,0,0,1-2.341,1.763,4.1,4.1,0,0,1,2.929,1.756,3.8,3.8,0,0,1,.58,2.1,4.663,4.663,0,0,1-.579,2.546,5.047,5.047,0,0,1-3.5,2.338H18.331ZM23,14.252h1.166a1.754,1.754,0,0,0,0-3.5H23Zm0,7H24.39a2.047,2.047,0,0,0,0-4.089H23Z" style="fill:#00519a"/>`,
|
||
"VBA": `<polygon points="10.457 11.092 16.014 13.839 16.014 18.307 10.457 15.382 10.457 11.092" style="fill:#6483c0"/><path d="M16.2,18.613l-5.926-3.12V10.8L16.2,13.724ZM10.642,15.27,15.83,18V13.953l-5.188-2.564Z"/><polygon points="16.371 13.839 16.371 18.307 21.315 15.814 21.315 11.354 16.371 13.839" style="fill:#6483c0"/><path d="M16.186,18.607V13.725l5.313-2.67v4.873Zm.369-4.655v4.055L21.13,15.7V11.653Z"/><polygon points="10.703 10.797 16.186 13.58 21.082 11.064 15.777 8.389 10.703 10.797" style="fill:#6483c0"/><path d="M16.187,13.788l-5.9-3,5.5-2.608,5.709,2.879ZM11.122,10.8l5.064,2.57,4.49-2.308-4.9-2.471Z"/><polygon points="18.957 15.829 24.515 18.575 24.515 23.043 18.957 20.118 18.957 15.829" style="fill:#952781"/><path d="M24.7,23.349l-5.926-3.12v-4.7L24.7,18.46Zm-5.557-3.343,5.188,2.731V18.689l-5.188-2.564Z"/><polygon points="24.871 18.575 24.871 23.043 29.815 20.55 29.815 16.09 24.871 18.575" style="fill:#952781"/><path d="M24.687,23.343V18.461L30,15.791v4.873Zm.369-4.655v4.055l4.575-2.308V16.389Z"/><polygon points="19.203 15.546 24.687 18.329 29.583 15.812 24.364 13.346 19.203 15.546" style="fill:#952781"/><path d="M24.687,18.536l-5.92-3.005,5.6-2.387L30,15.805ZM19.64,15.56l5.046,2.561,4.479-2.3-4.806-2.27Z"/><polygon points="2.19 15.496 7.748 18.243 7.748 22.711 2.19 19.786 2.19 15.496" style="fill:#d87b30"/><path d="M7.932,23.017,2.006,19.9V15.2l5.926,2.929ZM2.375,19.674l5.188,2.731V18.357L2.375,15.793Z"/><polygon points="8.104 18.243 8.104 22.711 13.048 20.218 13.048 15.758 8.104 18.243" style="fill:#d87b30"/><path d="M7.92,23.011V18.129l5.313-2.67v4.873Zm.369-4.655v4.055L12.864,20.1V16.057Z"/><polygon points="2.436 15.213 7.92 17.997 12.816 15.48 7.597 13.014 2.436 15.213" style="fill:#d87b30"/><path d="M7.92,18.2,2,15.2l5.6-2.387,5.632,2.661ZM2.873,15.228l5.046,2.561,4.479-2.3-4.806-2.27Z"/><polygon points="10.875 16.296 16.432 19.042 16.432 23.511 10.875 20.585 10.875 16.296" style="fill:#e0d400"/><path d="M16.617,23.816,10.691,20.7V16l5.926,2.929ZM11.06,20.474l5.188,2.731V19.157L11.06,16.593Z"/><polygon points="16.789 19.042 16.789 23.511 21.733 21.017 21.733 16.557 16.789 19.042" style="fill:#e0d400"/><path d="M16.6,23.811V18.929l5.313-2.67v4.873Zm.369-4.655v4.055L21.549,20.9V16.857Z"/><polygon points="11.121 16.001 16.605 18.784 21.501 16.267 16.196 13.593 11.121 16.001" style="fill:#e0d400"/><path d="M16.605,18.991l-5.9-3,5.5-2.608,5.709,2.879ZM11.54,16.006l5.064,2.57,4.49-2.308-4.9-2.471Z"/>`,
|
||
"Velocity": `<path d="M16.245,24.187A8.352,8.352,0,1,1,24.6,15.835,8.362,8.362,0,0,1,16.245,24.187Zm0-14.762a6.41,6.41,0,1,0,6.41,6.41A6.417,6.417,0,0,0,16.245,9.425Z"/><polygon points="29.132 8.551 25.451 6.531 25.451 7.474 15.821 7.474 15.821 9.424 25.451 9.424 25.451 10.571 29.132 8.551" style="fill:#262692"/><polygon points="8.984 2 6.964 5.687 7.906 5.687 7.906 15.328 9.857 15.328 9.857 5.687 11.004 5.687 8.984 2" style="fill:#262693"/><polygon points="23.705 30 21.685 26.243 22.628 26.243 22.628 16.417 24.578 16.417 24.578 26.243 25.725 26.243 23.705 30" style="fill:#262693"/><polygon points="2.868 23.32 6.634 21.3 6.634 22.242 16.484 22.242 16.484 24.192 6.634 24.192 6.634 25.34 2.868 23.32" style="fill:#262692"/>`,
|
||
"Verilog": `<path d="M29.007,17.4h.037a1.449,1.449,0,0,0,.938-.316,1.473,1.473,0,0,0,.519-1.031V15.9a1.413,1.413,0,0,0-1.376-1.3h-.009c-.687,0-1.374,0-2.062,0H25.5V11.956l3.513,0h.034A1.411,1.411,0,0,0,30.5,10.6l0-.09,0-.032a1.412,1.412,0,0,0-.646-1.1,1.455,1.455,0,0,0-.835-.225H25.456a2.96,2.96,0,0,0-.278-1.034,2.909,2.909,0,0,0-1.7-1.461,2.684,2.684,0,0,0-.629-.13V4.947c0-.69,0-1.38,0-2.063A1.414,1.414,0,0,0,21.481,1.5h-.116a1.4,1.4,0,0,0-1.319,1.388q0,1.154,0,2.306V6.5H17.4V4.981c0-.7,0-1.4,0-2.087A1.41,1.41,0,0,0,16.053,1.5H15.9a1.408,1.408,0,0,0-1.3,1.383c0,.688,0,1.376,0,2.064V6.508q-1.319,0-2.639,0V4.888c0-.666,0-1.332,0-1.989a1.366,1.366,0,0,0-.4-.975,1.4,1.4,0,0,0-.984-.424H10.5A1.41,1.41,0,0,0,9.159,2.881c0,.683,0,1.366,0,2.049v1.6a2.933,2.933,0,0,0-2.466,1.9,2.878,2.878,0,0,0-.161.726H4.957c-.693,0-1.386,0-2.073,0H2.876A1.413,1.413,0,0,0,1.5,10.5v.095a1.417,1.417,0,0,0,.575,1.091,1.463,1.463,0,0,0,.887.273h.017l3.522,0V14.6H4.948c-.686,0-1.375,0-2.057,0A1.428,1.428,0,0,0,1.5,15.913V16.1a1.4,1.4,0,0,0,1.386,1.3c.711,0,1.423,0,2.135,0H6.5V20.05l-.292,0c-.613-.007-1.226,0-1.838,0H3.087a1.633,1.633,0,0,0-.918.211A1.437,1.437,0,0,0,1.5,21.4V21.5a1.417,1.417,0,0,0,1.375,1.337h.005q.645,0,1.29,0H6.546a2.832,2.832,0,0,0,1.978,2.5,2.712,2.712,0,0,0,.631.128v1.62c0,.678,0,1.354,0,2.025a1.4,1.4,0,1,0,2.8-.092l0-3.527H14.6v3.516A1.414,1.414,0,0,0,15.947,30.5H16.1a1.411,1.411,0,0,0,1.3-1.385q.006-1.066,0-2.131V25.5h2.644V29.1A1.423,1.423,0,0,0,21.4,30.5h.119a1.408,1.408,0,0,0,1.16-.741,1.643,1.643,0,0,0,.167-.833V25.474a2.671,2.671,0,0,0,.62-.128,2.928,2.928,0,0,0,1.886-1.888,2.834,2.834,0,0,0,.123-.613h1.581c.687,0,1.375,0,2.057,0h.008A1.422,1.422,0,0,0,30.5,21.481v-.118a1.409,1.409,0,0,0-1.382-1.318h0c-.718,0-1.436,0-2.154,0H25.5V17.4Z" style="fill:#c5c5c5;opacity:0.3"/><path d="M10.515,2h.056a.91.91,0,0,1,.886.893c.006,1.108,0,2.216,0,3.324-.6,0-1.2,0-1.8,0,0-1.111,0-2.222,0-3.333A.907.907,0,0,1,10.515,2Z" style="fill:#1a348f"/><path d="M15.937,2h.116a.912.912,0,0,1,.846.889c.006,1.109,0,2.219,0,3.329H15.1c0-1.11,0-2.22,0-3.33A.911.911,0,0,1,15.937,2Z" style="fill:#1a348f"/><path d="M21.392,2h.089a.907.907,0,0,1,.859.881c.007,1.112,0,2.225,0,3.337h-1.8c0-1.109,0-2.217,0-3.326A.912.912,0,0,1,21.392,2Z" style="fill:#1a348f"/><path d="M2,10.518a.908.908,0,0,1,.882-.859c1.112-.007,2.223,0,3.334,0q0,.9,0,1.8c-1.079,0-2.158,0-3.237,0a.983.983,0,0,1-.6-.173A.924.924,0,0,1,2,10.571Z" style="fill:#1a348f"/><path d="M25.786,9.655h3.233a1,1,0,0,1,.561.143.924.924,0,0,1,.42.716v.058a.933.933,0,0,1-.3.651.957.957,0,0,1-.677.234c-1.079,0-2.158,0-3.237,0Q25.786,10.556,25.786,9.655Z" style="fill:#1a348f"/><path d="M2,15.944a.913.913,0,0,1,.888-.842c1.109-.007,2.219,0,3.328,0q0,.9,0,1.8c-1.109,0-2.217,0-3.326,0A.915.915,0,0,1,2,16.063Z" style="fill:#1a348f"/><path d="M25.786,15.1c1.109,0,2.218,0,3.326,0a.914.914,0,0,1,.889.835v.117a.946.946,0,0,1-.331.641.973.973,0,0,1-.651.207H25.786Q25.785,16,25.786,15.1Z" style="fill:#1a348f"/><path d="M2.433,20.678a1.121,1.121,0,0,1,.643-.136c1.043.006,2.086-.006,3.129.006.028.6,0,1.2.012,1.8-1.11,0-2.221,0-3.331,0A.911.911,0,0,1,2,21.483V21.4A.925.925,0,0,1,2.433,20.678Z" style="fill:#1a348f"/><path d="M25.786,20.543c1.108,0,2.216,0,3.324,0a.914.914,0,0,1,.89.847v.09a.911.911,0,0,1-.888.859c-1.109.007-2.218,0-3.326,0C25.786,21.743,25.785,21.143,25.786,20.543Z" style="fill:#1a348f"/><path d="M9.656,25.781h1.8c0,1.081,0,2.162,0,3.243a.957.957,0,0,1-.235.677.931.931,0,0,1-.653.3h-.052a.907.907,0,0,1-.86-.882C9.651,28.006,9.658,26.894,9.656,25.781Z" style="fill:#1a348f"/><path d="M15.1,25.781h1.8c0,1.11,0,2.22,0,3.33a.914.914,0,0,1-.836.889h-.116a.94.94,0,0,1-.619-.306.962.962,0,0,1-.228-.673Q15.1,27.4,15.1,25.781Z" style="fill:#1a348f"/><path d="M20.547,29.106c0-1.108,0-2.217,0-3.325h1.8c0,1.048,0,2.1,0,3.144a1.178,1.178,0,0,1-.105.59.92.92,0,0,1-.756.484H21.4A.911.911,0,0,1,20.547,29.106Z" style="fill:#1a348f"/><path d="M24.732,8.349A2.429,2.429,0,0,0,23.31,7.131,3.245,3.245,0,0,0,22.254,7c-4.3.008-8.6-.011-12.905.01A2.436,2.436,0,0,0,7.157,8.606,3.611,3.611,0,0,0,7,9.934q0,6.25,0,12.5a2.673,2.673,0,0,0,.268,1.219A2.431,2.431,0,0,0,8.688,24.87,3.756,3.756,0,0,0,9.927,25H22.07a3.762,3.762,0,0,0,1.243-.127A2.429,2.429,0,0,0,24.875,23.3,3.8,3.8,0,0,0,25,22.071q0-6.25,0-12.5A2.686,2.686,0,0,0,24.732,8.349Z" style="fill:#1a348f"/><path d="M7.5,8.307l.084-.2q.968,0,1.935.024h.394q.179,0,.394-.012.776-.036,2.807-.036.406,0,.788.006t.741.018a.234.234,0,0,1,.108.108l-.024.191q-.072.119-.358.119h-.1a10.3,10.3,0,0,0-1.1.054,2.179,2.179,0,0,0-1,.245.432.432,0,0,0-.155.346,4.05,4.05,0,0,0,.394,1.4l1.818,4.217.634,1.4q.921,2.222,1.819,4.539.1.251.179.454l.8-1.959q.62-1.481,1.252-3.154l.823-2.246q.024-.072.131-.478a17.026,17.026,0,0,0,1.157-4,.561.561,0,0,0-.161-.364,1.165,1.165,0,0,0-.52-.3,7.723,7.723,0,0,0-.932-.143l-.884-.108a.337.337,0,0,1-.108-.2l.036-.1,3.87-.036H23.6a3.1,3.1,0,0,1,.885.084l.012.1a.641.641,0,0,1-.072.251,2.449,2.449,0,0,1-.526.119,3.6,3.6,0,0,0-1.244.281,1.815,1.815,0,0,0-.5.687l-3.134,7.765q-1.466,3.5-2.086,5.423l-.345,1.039a.531.531,0,0,1-.263.1,1.383,1.383,0,0,1-.3-.036q-1.422-3.676-2.318-5.681L10.055,9.92a3.247,3.247,0,0,0-.591-.89,5.463,5.463,0,0,0-1.379-.424,4.347,4.347,0,0,1-.466-.119A.326.326,0,0,1,7.5,8.307Z" style="fill:#c5c2ff"/>`,
|
||
"VHDL": `<path d="M2,2H30V30H2Zm1.689.067A1.624,1.624,0,0,0,2.063,3.692V28.314A1.625,1.625,0,0,0,3.689,29.94H28.316a1.625,1.625,0,0,0,1.626-1.626V3.692a1.624,1.624,0,0,0-1.626-1.625ZM3.008,28.079a.911.911,0,0,0,.911.912H28.083a.911.911,0,0,0,.911-.912V3.919a.91.91,0,0,0-.911-.911H3.919a.91.91,0,0,0-.911.911Z" style="fill:#0d9b35"/><polygon points="25.52 5.502 18.858 26.491 13.154 26.491 6.492 5.502 10.508 5.502 16.029 22.795 21.504 5.502 25.52 5.502" style="fill:#fff"/>`,
|
||
"vim": `<defs><clipPath id="a"><polygon points="2 2 30 2 30 30 2 30 2 2 2 2" style="fill:none;clip-rule:evenodd"/></clipPath></defs><title>file_type_vim</title><polygon points="29.989 15.856 15.856 2.011 2.011 16.136 15.856 29.989 29.989 15.856 29.989 15.856" style="fill:#231f20;fill-rule:evenodd"/><g style="clip-path:url(#a)"><polygon points="29.989 15.856 15.856 2.011 2.011 16.136 15.856 29.989 29.989 15.856 29.989 15.856" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/></g><polygon points="28.575 15.856 29.422 15.856 15.856 29.422 15.856 28.575 28.575 15.856 28.575 15.856" style="fill:#29695d;fill-rule:evenodd"/><polygon points="28.575 15.856 29.422 15.856 15.856 29.422 15.856 28.575 28.575 15.856 28.575 15.856" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="2.578 16.136 3.425 16.136 15.856 28.575 15.856 29.422 2.578 16.136 2.578 16.136" style="fill:#317367;fill-rule:evenodd"/><polygon points="2.578 16.136 3.425 16.136 15.856 28.575 15.856 29.422 2.578 16.136 2.578 16.136" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="15.856 3.418 15.856 2.578 2.578 16.136 3.425 16.136 15.856 3.418 15.856 3.418" style="fill:#60c2ac;fill-rule:evenodd"/><polygon points="15.856 3.418 15.856 2.578 2.578 16.136 3.425 16.136 15.856 3.418 15.856 3.418" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="15.856 2.578 15.856 3.418 28.575 15.856 29.422 15.856 15.856 2.578 15.856 2.578" style="fill:#43b54a;fill-rule:evenodd"/><polygon points="15.856 2.578 15.856 3.418 28.575 15.856 29.422 15.856 15.856 2.578 15.856 2.578" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="15.856 28.575 28.575 15.856 15.856 3.418 3.425 16.136 15.856 28.575 15.856 28.575" style="fill:#3c8376;fill-rule:evenodd"/><polygon points="15.856 28.575 28.575 15.856 15.856 3.418 3.425 16.136 15.856 28.575 15.856 28.575" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="18.498 6.246 19.345 7.1 13.502 13.028 13.502 7.1 14.069 7.1 14.916 6.246 14.916 3.992 14.069 3.138 4.652 3.138 3.805 3.992 3.805 6.246 4.652 7.1 5.312 7.1 5.312 26.314 6.346 27.161 9.267 27.161 29.516 6.246 29.516 3.992 28.669 3.138 19.438 3.138 18.498 3.992 18.498 6.246 18.498 6.246" style="fill:#231f20;fill-rule:evenodd"/><polygon points="18.498 6.246 19.345 7.1 13.502 13.028 13.502 7.1 14.069 7.1 14.916 6.246 14.916 3.992 14.069 3.138 4.652 3.138 3.805 3.992 3.805 6.246 4.652 7.1 5.312 7.1 5.312 26.314 6.346 27.161 9.267 27.161 29.516 6.246 29.516 3.992 28.669 3.138 19.438 3.138 18.498 3.992 18.498 6.246 18.498 6.246" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="4.932 6.533 4.365 5.966 4.365 4.272 4.932 3.705 13.789 3.698 14.349 4.272 13.789 4.544 13.502 4.272 4.932 5.679 4.932 6.533 4.932 6.533" style="fill:#fff;fill-rule:evenodd"/><polygon points="4.932 6.533 4.365 5.966 4.365 4.272 4.932 3.705 13.789 3.698 14.349 4.272 13.789 4.544 13.502 4.272 4.932 5.679 4.932 6.533 4.932 6.533" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="6.626 26.594 5.966 26.027 5.966 6.526 6.626 5.966 6.626 26.594 6.626 26.594" style="fill:#fff;fill-rule:evenodd"/><polygon points="6.626 26.594 5.966 26.027 5.966 6.526 6.626 5.966 6.626 26.594 6.626 26.594" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="20.759 6.533 21.326 5.966 21.326 7.1 11.902 16.703 12.942 14.442 20.759 6.533 20.759 6.533" style="fill:#fff;fill-rule:evenodd"/><polygon points="20.759 6.533 21.326 5.966 21.326 7.1 11.902 16.703 12.942 14.442 20.759 6.533 20.759 6.533" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="6.82 5.686 6.626 5.966 5.966 6.533 4.932 6.533 4.932 5.399 6.82 5.686 6.82 5.686" style="fill:#929497;fill-rule:evenodd"/><polygon points="6.82 5.686 6.626 5.966 5.966 6.533 4.932 6.533 4.932 5.399 6.82 5.686 6.82 5.686" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="12.942 6.533 12.942 14.442 11.902 16.696 11.902 5.958 13.502 5.958 13.789 5.678 13.502 4.272 14.349 4.272 14.349 5.966 13.789 6.533 12.942 6.533 12.942 6.533" style="fill:#929497;fill-rule:evenodd"/><polygon points="12.942 6.533 12.942 14.442 11.902 16.696 11.902 5.958 13.502 5.958 13.789 5.678 13.502 4.272 14.349 4.272 14.349 5.966 13.789 6.533 12.942 6.533 12.942 6.533" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="19.625 6.533 19.065 5.966 19.065 4.272 19.718 3.705 28.295 3.705 28.956 4.272 28.008 5.119 19.625 5.679 19.625 6.533 19.625 6.533" style="fill:#fff;fill-rule:evenodd"/><polygon points="19.625 6.533 19.065 5.966 19.065 4.272 19.718 3.705 28.295 3.705 28.956 4.272 28.008 5.119 19.625 5.679 19.625 6.533 19.625 6.533" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="28.956 5.966 9.074 26.594 6.626 26.594 6.626 25.747 8.42 25.747 28.295 5.399 28.008 4.272 28.956 4.272 28.956 5.966 28.956 5.966" style="fill:#929497;fill-rule:evenodd"/><polygon points="28.956 5.966 9.074 26.594 6.626 26.594 6.626 25.747 8.42 25.747 28.295 5.399 28.008 4.272 28.956 4.272 28.956 5.966 28.956 5.966" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="21.512 5.686 21.319 5.966 20.759 6.533 19.625 6.533 19.625 5.399 21.512 5.686 21.512 5.686" style="fill:#929497;fill-rule:evenodd"/><polygon points="21.512 5.686 21.319 5.966 20.759 6.533 19.625 6.533 19.625 5.399 21.512 5.686 21.512 5.686" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="11.902 16.696 11.902 5.958 13.502 5.958 13.789 5.679 13.789 4.544 13.502 4.265 5.212 4.265 4.932 4.544 4.932 5.679 5.212 5.958 6.626 5.958 6.626 25.747 6.992 26.027 8.607 26.027 28.389 5.399 28.389 4.588 28.102 4.265 19.912 4.265 19.625 4.544 19.625 5.686 19.912 5.966 21.326 5.966 21.326 7.1 11.902 16.696 11.902 16.696" style="fill:#d0d2d3;fill-rule:evenodd"/><polygon points="11.902 16.696 11.902 5.958 13.502 5.958 13.789 5.679 13.789 4.544 13.502 4.265 5.212 4.265 4.932 4.544 4.932 5.679 5.212 5.958 6.626 5.958 6.626 25.747 6.992 26.027 8.607 26.027 28.389 5.399 28.389 4.588 28.102 4.265 19.912 4.265 19.625 4.544 19.625 5.686 19.912 5.966 21.326 5.966 21.326 7.1 11.902 16.696 11.902 16.696" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="17.041 16.711 17.701 16.144 19.395 16.144 19.869 16.711 19.302 18.405 18.649 18.972 16.955 18.972 16.474 18.405 17.041 16.711 17.041 16.711" style="fill:#231f20;fill-rule:evenodd"/><polygon points="17.041 16.711 17.701 16.144 19.395 16.144 19.869 16.711 19.302 18.405 18.649 18.972 16.955 18.972 16.474 18.405 17.041 16.711 17.041 16.711" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="17.608 26.034 19.309 20.953 18.742 20.953 19.309 19.251 21.843 19.251 22.41 19.819 22.79 19.819 23.35 19.251 25.238 19.251 25.805 19.819 26.178 19.819 26.745 19.251 28.812 19.251 29.566 20.386 28.331 24.405 28.891 24.405 28.346 26.034 24.951 26.034 26.278 22.079 25.431 22.079 24.649 24.391 25.209 24.391 24.678 26.034 21.283 26.034 22.603 22.079 21.756 22.079 20.967 24.405 21.534 24.405 21.003 26.034 17.608 26.034 17.608 26.034" style="fill:#231f20;fill-rule:evenodd"/><polygon points="17.608 26.034 19.309 20.953 18.742 20.953 19.309 19.251 21.843 19.251 22.41 19.819 22.79 19.819 23.35 19.251 25.238 19.251 25.805 19.819 26.178 19.819 26.745 19.251 28.812 19.251 29.566 20.386 28.331 24.405 28.891 24.405 28.346 26.034 24.951 26.034 26.278 22.079 25.431 22.079 24.649 24.391 25.209 24.391 24.678 26.034 21.283 26.034 22.603 22.079 21.756 22.079 20.967 24.405 21.534 24.405 21.003 26.034 17.608 26.034 17.608 26.034" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="28.554 19.819 28.992 20.443 27.599 24.907 28.159 24.907 27.972 25.467 25.711 25.467 27.032 21.512 25.051 21.512 23.924 24.907 24.484 24.907 24.297 25.467 22.036 25.467 23.357 21.512 21.376 21.512 20.249 24.907 20.816 24.907 20.622 25.467 18.361 25.467 20.063 20.386 19.495 20.386 19.682 19.819 21.756 19.819 22.323 20.386 22.883 20.386 23.45 19.819 25.144 19.819 25.711 20.386 26.278 20.386 26.845 19.819 28.554 19.819 28.554 19.819" style="fill:#d0d2d3;fill-rule:evenodd"/><polygon points="28.554 19.819 28.992 20.443 27.599 24.907 28.159 24.907 27.972 25.467 25.711 25.467 27.032 21.512 25.051 21.512 23.924 24.907 24.484 24.907 24.297 25.467 22.036 25.467 23.357 21.512 21.376 21.512 20.249 24.907 20.816 24.907 20.622 25.467 18.361 25.467 20.063 20.386 19.495 20.386 19.682 19.819 21.756 19.819 22.323 20.386 22.883 20.386 23.45 19.819 25.144 19.819 25.711 20.386 26.278 20.386 26.845 19.819 28.554 19.819 28.554 19.819" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><path d="M19.022,19.251,17.292,24.4h.589l-.56,1.637H13.933l1.694-5.082H15.06l3.962-1.7Zm-3.962,1.7.567-1.7h3.4l-3.962,1.7Z" style="fill:#231f20;fill-rule:evenodd"/><path d="M19.022,19.251,17.292,24.4h.589l-.56,1.637H13.933l1.694-5.082H15.06l3.962-1.7Zm-3.962,1.7.567-1.7h3.4l-3.962,1.7Z" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="16.947 25.467 17.134 24.907 16.567 24.907 18.268 19.819 15.914 19.819 15.72 20.386 16.38 20.386 14.686 25.467 16.947 25.467 16.947 25.467" style="fill:#d0d2d3;fill-rule:evenodd"/><polygon points="16.947 25.467 17.134 24.907 16.567 24.907 18.268 19.819 15.914 19.819 15.72 20.386 16.38 20.386 14.686 25.467 16.947 25.467 16.947 25.467" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/><polygon points="18.828 18.125 19.208 16.991 19.022 16.711 17.888 16.711 17.514 16.991 17.134 18.125 17.328 18.405 18.462 18.405 18.828 18.125 18.828 18.125" style="fill:#d0d2d3;fill-rule:evenodd"/><polygon points="18.828 18.125 19.208 16.991 19.022 16.711 17.888 16.711 17.514 16.991 17.134 18.125 17.328 18.405 18.462 18.405 18.828 18.125 18.828 18.125" style="fill:none;stroke:#231f20;stroke-miterlimit:10;stroke-width:0.216000005602837px"/>`,
|
||
"Visual Basic": `<path d="M6.67,7.836,9,18.915,11.336,7.836H16L11.336,24.164H6.672L2,7.836Z" style="fill:#00519a"/><path d="M18.331,7.836h7.6a4.08,4.08,0,0,1,2.9,1.749,3.78,3.78,0,0,1,.571,2.04,3.985,3.985,0,0,1-.571,2.034,4.108,4.108,0,0,1-2.341,1.763,4.1,4.1,0,0,1,2.929,1.756,3.8,3.8,0,0,1,.58,2.1,4.663,4.663,0,0,1-.579,2.546,5.047,5.047,0,0,1-3.5,2.338H18.331ZM23,14.252h1.166a1.754,1.754,0,0,0,0-3.5H23Zm0,7H24.39a2.047,2.047,0,0,0,0-4.089H23Z" style="fill:#00519a"/>`,
|
||
"WebAssembly": `<path d="M19.153,2.35V2.5a3.2,3.2,0,1,1-6.4,0h0V2.35H2V30.269H29.919V2.35Z" style="fill:#654ff0"/><path d="M8.485,17.4h1.85L11.6,24.123h.023L13.14,17.4h1.731l1.371,6.81h.027l1.44-6.81h1.815l-2.358,9.885H15.329l-1.36-6.728h-.036l-1.456,6.728h-1.87Zm13.124,0h2.917l2.9,9.885H25.515l-.63-2.2H21.562l-.486,2.2H19.217Zm1.11,2.437-.807,3.627h2.512L23.5,19.832Z" style="fill:#fff"/>`,
|
||
"Wolfram language": `<path d="M30,20.55,25.94,16,30,11.45l-5.948-1.294.595-6.067L19.071,6.543,15.993,1.279,12.929,6.543,7.353,4.089l.595,6.067L2,11.45,6.059,16,2,20.55l5.948,1.294-.595,6.067,5.576-2.454,3.078,5.264,3.063-5.264,5.591,2.454-.61-6.067Z" style="fill:#d10"/><path d="M19.353,11.45a6.968,6.968,0,0,1-3.42.862,5.446,5.446,0,0,1-3.212-.862A7.1,7.1,0,0,1,12.5,14.8a6.225,6.225,0,0,1-1.874,2.914,7.454,7.454,0,0,1,3.138,1.19,9.659,9.659,0,0,1,2.216,2.721,8.194,8.194,0,0,1,2.141-2.691,7.605,7.605,0,0,1,3.242-1.2,12.562,12.562,0,0,1-1.933-2.944A6.718,6.718,0,0,1,19.353,11.45Zm-1.9,6.543a5.233,5.233,0,0,0-1.457,1.636,6.236,6.236,0,0,0-1.5-1.621,5.191,5.191,0,0,0-1.948-.848,6.839,6.839,0,0,0,1.115-2.007,6.18,6.18,0,0,0,.223-2.082,6.317,6.317,0,0,0,2.082.446,6.552,6.552,0,0,0,2.171-.461,4.521,4.521,0,0,0,.074,2.156,6.71,6.71,0,0,0,1.249,1.933A7.031,7.031,0,0,0,17.45,17.993Zm4.238-4.015c-.357-1.175.654-6.706.654-6.706S18.55,9.844,15.888,9.844s-6.23-2.572-6.23-2.572,1.175,4.015.461,6.587-4.387,5.472-4.387,5.472,4.788.283,6.6,1.5,3.658,5.948,3.658,5.948,2.454-5.2,3.48-5.948,6.8-1.5,6.8-1.5-4.223-4.178-4.58-5.353Zm-2.84,5.963a9.444,9.444,0,0,0-2.84,4.178s-1.413-3.152-2.974-4.223S8.3,18.543,8.3,18.543s2.454-2.171,3.048-4.1a11.923,11.923,0,0,0-.1-4.952,11.3,11.3,0,0,0,4.669,1.621c2.037,0,4.848-1.621,4.848-1.621s-.818,3.033-.164,4.922,3.108,4.134,3.108,4.134a10.557,10.557,0,0,0-4.862,1.4Z" style="fill:#fff"/>`,
|
||
"XML": `<path d="M20.42,21.157l2.211,2.211L30,16,22.631,8.631,20.42,10.843,25.58,16Z" style="fill:#f1662a"/><path d="M11.58,10.843,9.369,8.631,2,16l7.369,7.369,2.211-2.211L6.42,16Z" style="fill:#f1662a"/><path d="M17.411,7.677l1.6.437-4.42,16.209-1.6-.437,4.42-16.209Z" style="fill:#f1662a"/>`,
|
||
"XQuery": `<path d="M20.42,21.157l2.211,2.211L30,16,22.631,8.631,20.42,10.843,25.58,16ZM11.58,10.843,9.369,8.631,2,16l7.369,7.369,2.211-2.211L6.42,16Zm5.831-3.166,1.6.437-4.42,16.209-1.6-.437Z" style="fill:#f1662a"/><path d="M20.332,18.462a3.354,3.354,0,0,1,.975-1.423,4.014,4.014,0,0,1,1.617-.8A9.118,9.118,0,0,1,25.138,16a5.472,5.472,0,0,1,3.681,1.039A3.5,3.5,0,0,1,30,19.808a4.47,4.47,0,0,1-.24,1.491,3.124,3.124,0,0,1-.838,1.239l-1.675,1.6a1.512,1.512,0,0,0-.424.789,5.307,5.307,0,0,0-.1,1.1H23v-.54a6.32,6.32,0,0,1,.207-1.778,2.886,2.886,0,0,1,.78-1.24l1.352-1.289a1.84,1.84,0,0,0,.563-.894,3.682,3.682,0,0,0,.1-.8,1.5,1.5,0,0,0-.252-.9.9.9,0,0,0-.779-.346,1.255,1.255,0,0,0-.483.086.724.724,0,0,0-.344.337,2.347,2.347,0,0,0-.217.721,7.614,7.614,0,0,0-.081,1.24H20A6.155,6.155,0,0,1,20.332,18.462Zm6.457,8.5V30H22.936V26.962Z" style="fill:#fcba00"/>`,
|
||
"YAML": `<path d="M2,12.218c.755,0,1.51-.008,2.264,0l.053.038Q5.7,13.638,7.078,15.014c.891-.906,1.8-1.794,2.7-2.7.053-.052.11-.113.192-.1.608,0,1.215,0,1.823,0a1.4,1.4,0,0,1,.353.019c-.7.67-1.377,1.369-2.069,2.05L5.545,18.8c-.331.324-.648.663-.989.975-.754.022-1.511.007-2.266.007,1.223-1.209,2.431-2.433,3.658-3.637C4.627,14.841,3.318,13.525,2,12.218Z" style="fill:#ffe885"/><path d="M12.7,12.218c.613,0,1.226,0,1.839,0q0,3.783,0,7.566c-.611,0-1.222.012-1.832-.008,0-1.664,0-3.329,0-4.994-1.6,1.607-3.209,3.2-4.811,4.8-.089.08-.166.217-.305.194-.824-.006-1.649,0-2.474,0Q8.916,16,12.7,12.218Z" style="fill:#ffe885"/><path d="M14.958,12.22c.47-.009.939,0,1.409,0,.836.853,1.69,1.689,2.536,2.532q1.268-1.267,2.539-2.532.7,0,1.4,0-.008,3.784,0,7.567c-.471,0-.943.006-1.414,0q.008-2.387,0-4.773c-.844.843-1.676,1.7-2.526,2.536-.856-.835-1.687-1.695-2.532-2.541,0,1.594-.006,3.188.006,4.781-.472,0-.943.005-1.415,0Q14.958,16,14.958,12.22Z" style="fill:#ffe885"/><path d="M23.259,12.217c.472,0,.944-.007,1.416,0q-.007,3.083,0,6.166c1.26,0,2.521,0,3.782,0,.063.006.144-.012.191.045.448.454.907.9,1.353,1.354q-3.371.007-6.741,0Q23.267,16,23.259,12.217Z" style="fill:#ffe885"/>`,
|
||
"YANG": `<path d="M8.877,23.159c0-5.535,3.992-7.168,7.894-7.168,3.357,0,5.988-3.811,5.988-6.624,0-3.621-2.487-5.831-4.882-7.12A13.881,13.881,0,1,0,14.5,29.8C10.491,28.248,8.877,25.324,8.877,23.159Z" style="fill:#fff"/><path d="M14.482,29.917A14,14,0,0,1,16,2a14.154,14.154,0,0,1,1.893.131l.04.013c2.255,1.213,4.944,3.452,4.944,7.223,0,2.715-2.564,6.741-6.106,6.741-2.9,0-7.776.916-7.776,7.05,0,2.022,1.451,4.946,5.542,6.531ZM16,2.236A13.765,13.765,0,0,0,13.637,29.56c-3.581-1.684-4.877-4.447-4.877-6.4,0-6.576,5.6-7.286,8.012-7.286,3.406,0,5.87-3.886,5.87-6.506,0-3.645-2.606-5.82-4.8-7.006A13.928,13.928,0,0,0,16,2.236Z" style="fill:#231f20"/><path d="M29.882,16a13.882,13.882,0,0,0-12-13.752c2.4,1.289,4.882,3.5,4.882,7.12,0,2.813-2.631,6.624-5.988,6.624-3.9,0-7.894,1.633-7.894,7.168,0,2.166,1.613,5.089,5.618,6.641A13.875,13.875,0,0,0,29.882,16Z" style="fill:#231f20"/><path d="M16,30a14.2,14.2,0,0,1-1.518-.083l-.03-.007c-4.2-1.628-5.693-4.654-5.693-6.75,0-6.576,5.6-7.286,8.012-7.286,3.406,0,5.87-3.886,5.87-6.506,0-3.655-2.621-5.833-4.82-7.016l.072-.221A14,14,0,0,1,16,30Zm-1.477-.316A13.756,13.756,0,0,0,29.764,16,13.807,13.807,0,0,0,18.5,2.466c2.115,1.272,4.377,3.441,4.377,6.9,0,2.715-2.564,6.741-6.106,6.741-2.9,0-7.776.916-7.776,7.05C9,25.178,10.443,28.1,14.523,29.684Z" style="fill:#231f20"/><circle cx="15.943" cy="22.787" r="1.506" style="fill:#fff"/><circle cx="16.007" cy="9.142" r="1.506" style="fill:#231f20"/>`,
|
||
"Zig": `<polygon points="5.733 19.731 5.733 12.264 8.533 12.264 8.533 8.531 2 8.531 2 23.464 5.547 23.464 8.907 19.731 5.733 19.731" style="fill:#f7a41d"/><polygon points="26.453 8.531 23.093 12.264 26.267 12.264 26.267 19.731 23.467 19.731 23.467 23.464 30 23.464 30 8.531 26.453 8.531" style="fill:#f7a41d"/><polygon points="26.875 6.707 20.513 8.531 9.467 8.531 9.467 12.264 16.847 12.264 5.115 25.293 11.497 23.464 22.533 23.464 22.533 19.731 15.148 19.731 26.875 6.707" style="fill:#f7a41d"/>`
|
||
};
|
||
|
||
// src/Utils.ts
|
||
var import_validator = __toESM(require_validator());
|
||
function getCurrentMode() {
|
||
const body3 = document.querySelector("body");
|
||
if (body3 !== null) {
|
||
if (body3.classList.contains("theme-light")) {
|
||
return "light";
|
||
} else if (body3.classList.contains("theme-dark")) {
|
||
return "dark";
|
||
}
|
||
} else {
|
||
}
|
||
return "dark";
|
||
}
|
||
function splitAndTrimString(str) {
|
||
if (!str) {
|
||
return [];
|
||
}
|
||
str = str.replace(/\*/g, ".*");
|
||
if (!str.includes(",")) {
|
||
return [str];
|
||
}
|
||
return str.split(",").map((s2) => s2.trim());
|
||
}
|
||
function extractFileTitle(parsedParameters) {
|
||
const file = extractParameter(parsedParameters, "file");
|
||
const title = extractParameter(parsedParameters, "title");
|
||
if (file && title)
|
||
return file;
|
||
else if (file && !title)
|
||
return file;
|
||
else if (!file && title)
|
||
return title;
|
||
else
|
||
return "";
|
||
}
|
||
function getCodeBlockLanguage(str) {
|
||
const searchTerm = "```";
|
||
const originalStr = str;
|
||
str = str.toLowerCase();
|
||
function removeLeadingBackticks(input) {
|
||
let cleanedInput = input;
|
||
while (cleanedInput.startsWith("`")) {
|
||
cleanedInput = cleanedInput.substring(1);
|
||
}
|
||
return cleanedInput;
|
||
}
|
||
if (str.startsWith(searchTerm)) {
|
||
const startIndex = searchTerm.length;
|
||
const endIndex = str.indexOf(" ", startIndex);
|
||
let word = "";
|
||
if (endIndex !== -1) {
|
||
word = originalStr.substring(startIndex, endIndex);
|
||
} else {
|
||
word = originalStr.substring(startIndex);
|
||
}
|
||
if (!word.includes(":")) {
|
||
if (word.toLowerCase() === "fold" || word.toLowerCase() === "unfold")
|
||
return "";
|
||
else
|
||
return removeLeadingBackticks(word);
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
function isFoldDefined(str) {
|
||
return isParameterDefined("fold", str);
|
||
}
|
||
function isUnFoldDefined(str) {
|
||
return isParameterDefined("unfold", str);
|
||
}
|
||
function isParameterDefined(searchTerm, str) {
|
||
str = str.toLowerCase();
|
||
searchTerm = searchTerm.toLowerCase();
|
||
if (str.includes(` ${searchTerm} `)) {
|
||
return true;
|
||
}
|
||
const index2 = str.indexOf(searchTerm);
|
||
if (index2 !== -1 && index2 === str.length - searchTerm.length && str[index2 - 1] === " ") {
|
||
return true;
|
||
}
|
||
if (str.includes("```" + searchTerm + " ")) {
|
||
return true;
|
||
}
|
||
if (str.includes("```" + searchTerm) && str.indexOf("```" + searchTerm) + ("```" + searchTerm).length === str.length) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
function parseParameters(input) {
|
||
const params = {};
|
||
const backticks = "`".repeat(getBacktickCount(input));
|
||
const backtickRegex = new RegExp(`^${backticks}`);
|
||
const cleanedLine = input.replace(backtickRegex, "").trim();
|
||
const regex = /(\S+?)([:=])(["'](?:\\.|[^\\])*?["']|(?:\\.|[^\\\s])+)/g;
|
||
let match;
|
||
while ((match = regex.exec(cleanedLine)) !== null) {
|
||
const [, key2, , value] = match;
|
||
let cleanedValue = value ? value.trim() : "";
|
||
if (cleanedValue.startsWith('"') && cleanedValue.endsWith('"') || cleanedValue.startsWith("'") && cleanedValue.endsWith("'")) {
|
||
cleanedValue = cleanedValue.slice(1, -1);
|
||
}
|
||
cleanedValue = cleanedValue.replace(/\\(["'])/g, "$1");
|
||
params[key2.trim().toLowerCase()] = cleanedValue;
|
||
}
|
||
return params;
|
||
}
|
||
function getBacktickCount(lineText) {
|
||
var _a2;
|
||
return ((_a2 = lineText.trim().match(/^`+(?!.*`)/)) == null ? void 0 : _a2[0].length) || 0;
|
||
}
|
||
function getAllParameters(originalLineText, settings) {
|
||
var _a2, _b;
|
||
const lineText = originalLineText.trim();
|
||
const parsedParameters = parseParameters(lineText);
|
||
const backtickCount = getBacktickCount(originalLineText);
|
||
const { level, characters: characters2 } = getIndentationLevel(originalLineText);
|
||
const lsep = (_a2 = extractParameter(parsedParameters, "lsep")) == null ? void 0 : _a2.charAt(0);
|
||
const lineSeparator = lsep || settings.SelectedTheme.settings.textHighlight.lineSeparator || DEFAULT_LINE_SEPARATOR;
|
||
const tsep = (_b = extractParameter(parsedParameters, "tsep")) == null ? void 0 : _b.charAt(0);
|
||
const textSeparator = tsep || settings.SelectedTheme.settings.textHighlight.textSeparator || DEFAULT_TEXT_SEPARATOR;
|
||
const defaultLinesToHighlight = getHighlightedLines(parsedParameters, "HL", textSeparator, lineSeparator);
|
||
const defaultTextToHighlight = getTextHighlight(parsedParameters, "hlt", textSeparator, lineSeparator);
|
||
const { alternativeLinesToHighlight, alternativeTextToHighlight } = extractAlternativeHighlights(parsedParameters, textSeparator, lineSeparator, settings);
|
||
const { isSpecificNumber, showNumbers, lineNumberOffset } = determineLineNumberDisplay(parsedParameters);
|
||
let headerDisplayText = extractFileTitle(parsedParameters);
|
||
let fold = isFoldDefined(lineText);
|
||
const unfold = isUnFoldDefined(lineText);
|
||
if (settings.SelectedTheme.settings.codeblock.inverseFold) {
|
||
fold = unfold ? false : true;
|
||
}
|
||
const language = getCodeBlockLanguage(lineText);
|
||
const displayLanguage = getDisplayLanguageName(language);
|
||
const exclude = isExcluded(lineText, settings.ExcludeLangs);
|
||
let specificHeader = true;
|
||
let hasLangBorderColor = false;
|
||
if (!exclude) {
|
||
if (headerDisplayText === null || headerDisplayText === "") {
|
||
headerDisplayText = settings.SelectedTheme.settings.header.collapsedCodeText || DEFAULT_COLLAPSE_TEXT;
|
||
if (!fold && !(language.length > 0 && (settings.SelectedTheme.settings.header.alwaysDisplayCodeblockIcon || settings.SelectedTheme.settings.header.alwaysDisplayCodeblockLang)))
|
||
specificHeader = false;
|
||
}
|
||
hasLangBorderColor = getBorderColorByLanguage(language, getPropertyFromLanguageSpecificColors("codeblock.borderColor", settings)).length > 0 ? true : false;
|
||
}
|
||
return {
|
||
defaultLinesToHighlight,
|
||
defaultTextToHighlight,
|
||
alternativeLinesToHighlight,
|
||
alternativeTextToHighlight,
|
||
isSpecificNumber,
|
||
lineNumberOffset,
|
||
showNumbers,
|
||
headerDisplayText,
|
||
fold,
|
||
unfold,
|
||
language,
|
||
displayLanguage,
|
||
specificHeader,
|
||
hasLangBorderColor,
|
||
exclude,
|
||
backtickCount,
|
||
indentLevel: level,
|
||
indentCharacter: characters2,
|
||
lineSeparator,
|
||
textSeparator
|
||
};
|
||
}
|
||
function getDefaultParameters() {
|
||
return {
|
||
defaultLinesToHighlight: { lineNumbers: [], words: [], lineSpecificWords: [] },
|
||
defaultTextToHighlight: { allWordsInLine: [], lineSpecificTextBetween: [], lineSpecificWords: [], textBetween: [], words: [] },
|
||
alternativeLinesToHighlight: { lines: [], words: [], lineSpecificWords: [] },
|
||
alternativeTextToHighlight: { allWordsInLine: [], lineSpecificWords: [], words: [], textBetween: [], lineSpecificTextBetween: [] },
|
||
isSpecificNumber: false,
|
||
lineNumberOffset: 0,
|
||
showNumbers: "",
|
||
headerDisplayText: "",
|
||
fold: false,
|
||
unfold: false,
|
||
language: "",
|
||
displayLanguage: "",
|
||
specificHeader: false,
|
||
hasLangBorderColor: false,
|
||
exclude: false,
|
||
backtickCount: 0,
|
||
indentLevel: 0,
|
||
indentCharacter: 0,
|
||
lineSeparator: "",
|
||
textSeparator: ""
|
||
};
|
||
}
|
||
function sortAndRemoveDuplicates(numbers) {
|
||
numbers.sort((a, b) => a - b);
|
||
const uniqueNumbers = numbers.filter((value, index2, array) => {
|
||
return index2 === 0 || value !== array[index2 - 1];
|
||
});
|
||
return uniqueNumbers;
|
||
}
|
||
function getHighlightedLines(parsedParameters, parameter, textSeparator, lineSeparator) {
|
||
const result = {
|
||
lineNumbers: [],
|
||
words: [],
|
||
lineSpecificWords: []
|
||
};
|
||
const parameterValue = extractParameter(parsedParameters, parameter);
|
||
if (!parameterValue) {
|
||
return result;
|
||
}
|
||
const trimmedParams = parameterValue.trim();
|
||
const segments = trimmedParams.split(",");
|
||
for (const segment of segments) {
|
||
const { line, range, word, from, to } = parseSegment(segment, textSeparator, lineSeparator);
|
||
if ((line || range) && !word && !from && !to) {
|
||
if (line) {
|
||
result.lineNumbers = result.lineNumbers.concat(getLineRanges(line));
|
||
}
|
||
if (range) {
|
||
result.lineNumbers = result.lineNumbers.concat(getLineRanges(range));
|
||
}
|
||
}
|
||
if (word && !line && !range && !from && !to) {
|
||
result.words.push(word);
|
||
}
|
||
if (word && (line || range) && !from && !to) {
|
||
getLineSpecificWords(result, line, range, word);
|
||
}
|
||
}
|
||
result.lineNumbers = sortAndRemoveDuplicates(result.lineNumbers);
|
||
return result;
|
||
}
|
||
function getTextHighlight(parsedParameters, parameter, textSeparator, lineSeparator) {
|
||
const result = {
|
||
allWordsInLine: [],
|
||
words: [],
|
||
lineSpecificWords: [],
|
||
textBetween: [],
|
||
lineSpecificTextBetween: []
|
||
};
|
||
if (!parameter) {
|
||
return result;
|
||
}
|
||
const parameterValue = extractParameter(parsedParameters, parameter);
|
||
if (!parameterValue) {
|
||
return result;
|
||
}
|
||
const trimmedParams = parameterValue.trim();
|
||
const segments = trimmedParams.split(",");
|
||
for (const segment of segments) {
|
||
const { line, range, word, from, to } = parseSegment(segment, textSeparator, lineSeparator);
|
||
if ((line || range) && !word && !from && !to) {
|
||
getAllWordsInLine(result, line, range);
|
||
}
|
||
if (word && !line && !range && !from && !to) {
|
||
result.words.push(word);
|
||
}
|
||
if (word && (line || range) && !from && !to) {
|
||
getLineSpecificWords(result, line, range, word);
|
||
}
|
||
if ((from || to) && !word && !line && !range) {
|
||
result.textBetween.push({ from, to });
|
||
}
|
||
if ((from || to) && !word && (line || range)) {
|
||
getLineSpecificTextBetween(result, line, range, from, to);
|
||
}
|
||
}
|
||
result.allWordsInLine = sortAndRemoveDuplicates(result.allWordsInLine);
|
||
return result;
|
||
}
|
||
function getAllWordsInLine(result, line, range) {
|
||
if (line && isWholeNumber(line)) {
|
||
result.allWordsInLine.push(Number(line));
|
||
} else if (range) {
|
||
const ranges = getLineRanges(range);
|
||
result.allWordsInLine.push(...ranges);
|
||
}
|
||
}
|
||
function getLineSpecificWords(result, line, range, word) {
|
||
if (range !== "") {
|
||
processRange(range, word, result.lineSpecificWords);
|
||
} else {
|
||
const lineNum = Number(line);
|
||
const existingEntry = result.lineSpecificWords.find((entry) => entry.lineNumber === lineNum);
|
||
const words = word.split(",");
|
||
if (existingEntry) {
|
||
existingEntry.words.push(...words);
|
||
} else {
|
||
result.lineSpecificWords.push({ lineNumber: lineNum, words });
|
||
}
|
||
}
|
||
}
|
||
function getLineSpecificTextBetween(result, line, range, from, to) {
|
||
if (range !== "") {
|
||
const ranges = getLineRanges(range);
|
||
ranges.forEach((num) => {
|
||
result.lineSpecificTextBetween.push({ lineNumber: num, from, to });
|
||
});
|
||
} else if (!isNaN(Number(line))) {
|
||
const lineNum = Number(line);
|
||
result.lineSpecificTextBetween.push({ lineNumber: lineNum, from, to });
|
||
}
|
||
}
|
||
function isWholeNumber(input) {
|
||
return import_validator.default.isInt(input, { allow_leading_zeroes: false });
|
||
}
|
||
function parseSegment(segment, textSeparator, lineSeparator) {
|
||
let from = "";
|
||
let to = "";
|
||
let line = "";
|
||
let range = "";
|
||
let word = "";
|
||
const lineSeparatorIndex = segment.indexOf(lineSeparator);
|
||
const fromToSeparatorIndex = segment.indexOf(textSeparator);
|
||
if (lineSeparatorIndex !== -1 && fromToSeparatorIndex !== -1) {
|
||
if (lineSeparatorIndex > fromToSeparatorIndex) {
|
||
from = segment.substring(0, fromToSeparatorIndex).trim();
|
||
to = segment.substring(fromToSeparatorIndex + 1).trim();
|
||
} else {
|
||
const lineOrRange = segment.substring(0, lineSeparatorIndex).trim();
|
||
const val = segment.substring(lineSeparatorIndex + 1).trim();
|
||
if (lineOrRange.includes("-"))
|
||
range = lineOrRange;
|
||
else if (isWholeNumber(lineOrRange))
|
||
line = lineOrRange;
|
||
const valFromToSeparatorIndex = val.indexOf(textSeparator);
|
||
if (valFromToSeparatorIndex !== -1) {
|
||
from = val.substring(0, valFromToSeparatorIndex).trim();
|
||
to = val.substring(valFromToSeparatorIndex + 1).trim();
|
||
} else {
|
||
word = val;
|
||
}
|
||
}
|
||
} else if (fromToSeparatorIndex !== -1 && lineSeparatorIndex === -1) {
|
||
from = segment.substring(0, fromToSeparatorIndex).trim();
|
||
to = segment.substring(fromToSeparatorIndex + 1).trim();
|
||
} else if (lineSeparatorIndex !== -1 && fromToSeparatorIndex === -1) {
|
||
const lineOrRange = segment.substring(0, lineSeparatorIndex).trim();
|
||
const val = segment.substring(lineSeparatorIndex + 1).trim();
|
||
if (lineOrRange.includes("-"))
|
||
range = lineOrRange;
|
||
else if (isWholeNumber(lineOrRange))
|
||
line = lineOrRange;
|
||
word = val;
|
||
} else {
|
||
if (segment.includes("-"))
|
||
range = segment.trim();
|
||
else if (isWholeNumber(segment))
|
||
line = segment.trim();
|
||
else
|
||
word = segment.trim();
|
||
}
|
||
return { line, range, word, from, to };
|
||
}
|
||
function extractAlternativeHighlights(parsedParameters, textSeparator, lineSeparator, settings) {
|
||
const currentMode = getCurrentMode();
|
||
const alternateColors = settings.SelectedTheme.colors[currentMode].codeblock.alternateHighlightColors || {};
|
||
const alternativeTextToHighlight = {
|
||
allWordsInLine: [],
|
||
words: [],
|
||
lineSpecificWords: [],
|
||
textBetween: [],
|
||
lineSpecificTextBetween: []
|
||
};
|
||
const alternativeLinesToHighlight = {
|
||
lines: [],
|
||
words: [],
|
||
lineSpecificWords: []
|
||
};
|
||
for (const [alternateColorName] of Object.entries(alternateColors)) {
|
||
const lineHighlight = getHighlightedLines(parsedParameters, alternateColorName, textSeparator, lineSeparator);
|
||
const textHighlight2 = getTextHighlight(parsedParameters, `${alternateColorName}t`, textSeparator, lineSeparator);
|
||
if (lineHighlight.lineNumbers.length > 0) {
|
||
alternativeLinesToHighlight.lines.push({ lineNumbers: lineHighlight.lineNumbers, colorName: alternateColorName });
|
||
}
|
||
if (lineHighlight.words.length > 0) {
|
||
alternativeLinesToHighlight.words.push({ words: lineHighlight.words, colorName: alternateColorName });
|
||
}
|
||
if (lineHighlight.lineSpecificWords.length > 0) {
|
||
lineHighlight.lineSpecificWords.forEach((lineSpecificWord) => {
|
||
alternativeLinesToHighlight.lineSpecificWords.push({ ...lineSpecificWord, colorName: alternateColorName });
|
||
});
|
||
}
|
||
if (textHighlight2.allWordsInLine.length > 0) {
|
||
alternativeTextToHighlight.allWordsInLine.push({ allWordsInLine: textHighlight2.allWordsInLine, colorName: alternateColorName });
|
||
}
|
||
if (textHighlight2.lineSpecificWords.length > 0) {
|
||
textHighlight2.lineSpecificWords.forEach((lineSpecificWord) => {
|
||
alternativeTextToHighlight.lineSpecificWords.push({ ...lineSpecificWord, colorName: alternateColorName });
|
||
});
|
||
}
|
||
if (textHighlight2.words.length > 0) {
|
||
alternativeTextToHighlight.words.push({ words: textHighlight2.words, colorName: alternateColorName });
|
||
}
|
||
if (textHighlight2.textBetween.length > 0) {
|
||
textHighlight2.textBetween.forEach((textBetween) => {
|
||
alternativeTextToHighlight.textBetween.push({ ...textBetween, colorName: alternateColorName });
|
||
});
|
||
}
|
||
if (textHighlight2.lineSpecificTextBetween.length > 0) {
|
||
textHighlight2.lineSpecificTextBetween.forEach((lineSpecificTextBetween) => {
|
||
alternativeTextToHighlight.lineSpecificTextBetween.push({ ...lineSpecificTextBetween, colorName: alternateColorName });
|
||
});
|
||
}
|
||
}
|
||
return { alternativeLinesToHighlight, alternativeTextToHighlight };
|
||
}
|
||
function determineLineNumberDisplay(parsedParameters) {
|
||
const specificLN = extractParameter(parsedParameters, "ln") || "";
|
||
let isSpecificNumber = false;
|
||
let showNumbers = "";
|
||
let lineNumberOffset = 0;
|
||
if (specificLN.toLowerCase() === "true") {
|
||
showNumbers = "specific";
|
||
} else if (specificLN.toLowerCase() === "false") {
|
||
showNumbers = "hide";
|
||
} else {
|
||
lineNumberOffset = parseInt(specificLN);
|
||
if (!isNaN(lineNumberOffset) && lineNumberOffset >= 0) {
|
||
showNumbers = "specific";
|
||
isSpecificNumber = true;
|
||
} else {
|
||
lineNumberOffset = 0;
|
||
}
|
||
}
|
||
lineNumberOffset = lineNumberOffset === 0 ? lineNumberOffset : lineNumberOffset - 1;
|
||
return { isSpecificNumber, showNumbers, lineNumberOffset };
|
||
}
|
||
function extractParameter(parsedParameters, searchTerm) {
|
||
return parsedParameters[searchTerm.toLowerCase()] || null;
|
||
}
|
||
function processRange(segment, segmentValue, result) {
|
||
const range = getLineRanges(segment);
|
||
const words = segmentValue.split(",");
|
||
range.forEach((num) => {
|
||
const existingEntry = result.find((entry) => entry.lineNumber === num);
|
||
if (existingEntry) {
|
||
existingEntry.words.push(...words);
|
||
} else {
|
||
result.push({
|
||
lineNumber: num,
|
||
words
|
||
});
|
||
}
|
||
});
|
||
}
|
||
function getLineRanges(params) {
|
||
if (!params) {
|
||
return [];
|
||
}
|
||
const trimmedParams = params.trim();
|
||
const lines = trimmedParams.split(",");
|
||
return lines.map((line) => {
|
||
if (line.includes("-")) {
|
||
const range = line.split("-");
|
||
const start = parseInt(range[0], 10);
|
||
const end = parseInt(range[1], 10);
|
||
if (isNaN(start) || isNaN(end)) {
|
||
return [];
|
||
}
|
||
return Array.from({ length: end - start + 1 }, (_2, i) => start + i);
|
||
}
|
||
const number2 = parseInt(line, 10);
|
||
if (isNaN(number2)) {
|
||
return [];
|
||
}
|
||
return number2;
|
||
}).flat();
|
||
}
|
||
function isExcluded(lineText, excludeLangs) {
|
||
if (isParameterDefined("exclude", lineText))
|
||
return true;
|
||
const codeBlockLang = getCodeBlockLanguage(lineText);
|
||
const regexLangs = splitAndTrimString(excludeLangs).map((lang) => new RegExp(`^${lang.replace(/\*/g, ".*")}$`, "i"));
|
||
for (const regexLang of regexLangs) {
|
||
if (codeBlockLang && regexLang.test(codeBlockLang)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function getLanguageIcon(DisplayName) {
|
||
if (!DisplayName)
|
||
return "";
|
||
if (Icons.hasOwnProperty(DisplayName)) {
|
||
return Icons[DisplayName];
|
||
}
|
||
return null;
|
||
}
|
||
function getDisplayLanguageName(code) {
|
||
if (!code)
|
||
return "";
|
||
code = code.toLowerCase();
|
||
if (Languages.hasOwnProperty(code)) {
|
||
return Languages[code];
|
||
} else if (manualLang.hasOwnProperty(code)) {
|
||
return manualLang[code];
|
||
} else if (code) {
|
||
return code.charAt(0).toUpperCase() + code.slice(1);
|
||
}
|
||
return "";
|
||
}
|
||
var BLOBS = {};
|
||
async function loadIcons(plugin) {
|
||
for (const [key2, value] of Object.entries(Icons)) {
|
||
BLOBS[key2.replace(/\s/g, "_")] = `data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32">${value}</svg>`)}`;
|
||
}
|
||
await loadCustomIcons(plugin);
|
||
}
|
||
async function loadCustomIcons(plugin) {
|
||
const svgJsonExists = await plugin.app.vault.adapter.exists(plugin.app.vault.configDir + SVG_FILE_PATH);
|
||
if (!svgJsonExists)
|
||
return;
|
||
const svgJsonContent = await plugin.app.vault.adapter.read(plugin.app.vault.configDir + SVG_FILE_PATH);
|
||
if (!svgJsonContent)
|
||
return;
|
||
let languageConfig;
|
||
try {
|
||
languageConfig = JSON.parse(svgJsonContent);
|
||
} catch (error) {
|
||
console.error("Invalid JSON content in the SVG configuration file:", error);
|
||
return;
|
||
}
|
||
plugin.customLanguageConfig = languageConfig;
|
||
for (const lang of languageConfig.languages) {
|
||
if (lang.svgFile) {
|
||
const svgFilePath = plugin.app.vault.configDir + SVG_FOLDER_PATH + lang.svgFile;
|
||
const svgFileExists = await plugin.app.vault.adapter.exists(svgFilePath);
|
||
if (svgFileExists) {
|
||
const svgContent = await plugin.app.vault.adapter.read(svgFilePath);
|
||
const base64SVG = `data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32">${svgContent}</svg>`)}`;
|
||
Icons[lang.displayName] = svgContent;
|
||
BLOBS[lang.displayName.replace(/\s/g, "_")] = `${base64SVG}`;
|
||
}
|
||
}
|
||
for (const language of lang.codeblockLanguages) {
|
||
manualLang[language] = lang.displayName;
|
||
}
|
||
}
|
||
}
|
||
function loadSyntaxHighlightForCustomLanguages(plugin, unload = false) {
|
||
const customLanguageConfig2 = plugin.customLanguageConfig;
|
||
if (!customLanguageConfig2)
|
||
return;
|
||
for (const lang of customLanguageConfig2.languages) {
|
||
if (lang.format && lang.format.length > 0) {
|
||
for (const language of lang.codeblockLanguages) {
|
||
registerEditorSyntaxHighlightingForLanguage(language, lang.format, unload);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function getLanguageConfig(codeblockLanguage, plugin) {
|
||
codeblockLanguage = codeblockLanguage.toLowerCase();
|
||
if (!plugin.customLanguageConfig)
|
||
return void 0;
|
||
return plugin.customLanguageConfig.languages.find(
|
||
(langConfig) => langConfig.codeblockLanguages.includes(codeblockLanguage)
|
||
);
|
||
}
|
||
function registerEditorSyntaxHighlightingForLanguage(codeblockLanguage, requiredSyntax, unload) {
|
||
if (!codeblockLanguage || codeblockLanguage.length === 0)
|
||
return;
|
||
if (!unload && (!requiredSyntax || requiredSyntax.length === 0))
|
||
return;
|
||
window.CodeMirror.defineMode(
|
||
codeblockLanguage,
|
||
(config) => window.CodeMirror.getMode(config, unload ? "null" : requiredSyntax)
|
||
);
|
||
}
|
||
function createContainer(specific, languageName, hasLangBorderColor, codeblockLanguageSpecificClass) {
|
||
const lang = languageName.length > 0 ? languageName.toLowerCase() : "nolang";
|
||
const container = createDiv({ cls: `codeblock-customizer-header-container${specific ? "-specific" : ""}` });
|
||
container.classList.add(`codeblock-customizer-language-${lang.toLowerCase()}`);
|
||
if (codeblockLanguageSpecificClass)
|
||
container.classList.add(codeblockLanguageSpecificClass);
|
||
if (hasLangBorderColor)
|
||
container.classList.add(`hasLangBorderColor`);
|
||
return container;
|
||
}
|
||
function createCodeblockLang(lang) {
|
||
const codeblockLang = createDiv({ cls: `codeblock-customizer-header-language-tag`, text: getDisplayLanguageName(lang) });
|
||
return codeblockLang;
|
||
}
|
||
function createCodeblockIcon(displayLang) {
|
||
const div = createDiv({ cls: `codeblock-customizer-icon-container` });
|
||
const img = document.createElement("img");
|
||
img.classList.add("codeblock-customizer-icon");
|
||
img.width = 28;
|
||
img.src = BLOBS[displayLang.replace(/\s/g, "_")];
|
||
div.appendChild(img);
|
||
return div;
|
||
}
|
||
function createCodeblockCollapse(defaultFold) {
|
||
const collapse = createDiv({ cls: `codeblock-customizer-header-collapse` });
|
||
if (defaultFold)
|
||
(0, import_obsidian.setIcon)(collapse, "chevrons-down-up");
|
||
else
|
||
(0, import_obsidian.setIcon)(collapse, "chevrons-up-down");
|
||
return collapse;
|
||
}
|
||
function createFileName(text2, enableLinks, sourcePath, plugin) {
|
||
const fileName = createDiv({ cls: "codeblock-customizer-header-text" });
|
||
if (enableLinks) {
|
||
import_obsidian.MarkdownRenderer.render(plugin.app, text2, fileName, sourcePath, plugin);
|
||
} else {
|
||
fileName.innerText = text2;
|
||
}
|
||
return fileName;
|
||
}
|
||
function createUncollapseCodeButton() {
|
||
const uncollapseCodeButton = createSpan({ cls: `codeblock-customizer-uncollapse-code` });
|
||
uncollapseCodeButton.setAttribute("aria-label", "Uncollapse code block");
|
||
(0, import_obsidian.setIcon)(uncollapseCodeButton, "chevron-down");
|
||
return uncollapseCodeButton;
|
||
}
|
||
function getBorderColorByLanguage(languageName, languageBorderColors) {
|
||
const lang = languageName.length > 0 ? languageName : "nolang";
|
||
const lowercaseLanguageName = lang.toLowerCase();
|
||
for (const key2 in languageBorderColors) {
|
||
if (key2.toLowerCase() === lowercaseLanguageName) {
|
||
return languageBorderColors[key2];
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
var stylesDict = {
|
||
"codeblock.activeLineColor": "codeblock-active-line-color",
|
||
"editorActiveLineColor": "editor-active-line-color",
|
||
"codeblock.backgroundColor": "codeblock-background-color",
|
||
"codeblock.highlightColor": "codeblock-highlight-color",
|
||
"codeblock.bracketHighlightColorMatch": "codeblock-bracket-highlight-color-match",
|
||
"codeblock.bracketHighlightColorNoMatch": "codeblock-bracket-highlight-color-nomatch",
|
||
"codeblock.bracketHighlightBackgroundColorMatch": "codeblock-bracket-highlight-background-color-match",
|
||
"codeblock.bracketHighlightBackgroundColorNoMatch": "codeblock-bracket-highlight-background-color-nomatch",
|
||
"codeblock.selectionMatchHighlightColor": "codeblock-selectionmatch-highlight-color",
|
||
"header.backgroundColor": "header-background-color",
|
||
"header.textColor": "header-text-color",
|
||
"header.lineColor": "header-line-color",
|
||
"gutter.textColor": "gutter-text-color",
|
||
"gutter.backgroundColor": "gutter-background-color",
|
||
"header.codeBlockLangTextColor": "header-language-tag-text-color",
|
||
"header.codeBlockLangBackgroundColor": "header-language-tag-background-color",
|
||
"gutter.activeLineNrColor": "gutter-active-linenr-color",
|
||
"inlineCode.backgroundColor": "inline-code-background-color",
|
||
"inlineCode.textColor": "inline-code-text-color"
|
||
};
|
||
function updateSettingStyles(settings, app) {
|
||
const styleId = "codeblock-customizer-styles";
|
||
let styleTag = document.getElementById(styleId);
|
||
if (typeof styleTag == "undefined" || styleTag == null) {
|
||
styleTag = document.createElement("style");
|
||
styleTag.id = styleId;
|
||
document.getElementsByTagName("head")[0].appendChild(styleTag);
|
||
}
|
||
const currentMode = getCurrentMode();
|
||
const altHighlightStyling = Object.entries(settings.SelectedTheme.colors[currentMode].codeblock.alternateHighlightColors || {}).reduce((styling, [colorName, hexValue]) => {
|
||
return styling + `
|
||
.codeblock-customizer-line-highlighted-${colorName.replace(/\s+/g, "-").toLowerCase()} {
|
||
background-color: var(--codeblock-customizer-highlight-${colorName.replace(/\s+/g, "-").toLowerCase()}-color, ${hexValue}) !important;
|
||
}
|
||
|
||
.codeblock-customizer-highlighted-text-${colorName.replace(/\s+/g, "-").toLowerCase()}{
|
||
background-color: var(--codeblock-customizer-highlight-${colorName.replace(/\s+/g, "-").toLowerCase()}-color, ${hexValue}) !important;
|
||
}
|
||
`;
|
||
}, "");
|
||
const languageSpecificStyling = Object.entries(settings.SelectedTheme.colors[currentMode].languageSpecificColors || {}).reduce((styling, [language, attributes]) => {
|
||
const languageStyling = Object.entries(attributes || {}).reduce((languageStyling2, [attribute, hexValue]) => {
|
||
const attributeName = attribute.toLowerCase().replace(/\./g, "-");
|
||
const mappedAttributeName = stylesDict[attribute] || attributeName;
|
||
let selector = `.codeblock-customizer-languageSpecific-${language.toLowerCase()}`;
|
||
let style2 = `${mappedAttributeName}: ${hexValue}`;
|
||
if (mappedAttributeName === "codeblock-textcolor") {
|
||
selector += `,
|
||
.markdown-source-view .codeblock-customizer-languageSpecific-${language.toLowerCase()} [class^="cm-"],
|
||
.markdown-reading-view .codeblock-customizer-languageSpecific-${language.toLowerCase()} .codeblock-customizer-line-text,
|
||
.markdown-reading-view .codeblock-customizer-languageSpecific-${language.toLowerCase()} .token`;
|
||
style2 = `color: ${hexValue} !important`;
|
||
}
|
||
if (mappedAttributeName === "codeblock-bracket-highlight-color-match" || mappedAttributeName === "codeblock-bracket-highlight-background-color-match") {
|
||
selector += ` .codeblock-customizer-bracket-highlight-match`;
|
||
}
|
||
if (mappedAttributeName === "codeblock-bracket-highlight-color-nomatch" || mappedAttributeName === "codeblock-bracket-highlight-background-color-nomatch") {
|
||
selector += ` .codeblock-customizer-bracket-highlight-nomatch`;
|
||
}
|
||
return languageStyling2 + `
|
||
${selector} {
|
||
${mappedAttributeName === "codeblock-textcolor" ? "" : "--"}${style2};
|
||
}
|
||
`;
|
||
}, "");
|
||
return styling + languageStyling;
|
||
}, "");
|
||
const textSettingsStyles = `
|
||
body.codeblock-customizer .codeblock-customizer-header-language-tag {
|
||
--codeblock-customizer-language-tag-text-bold: ${settings.SelectedTheme.settings.header.codeblockLangBoldText ? "bold" : "normal"};
|
||
--codeblock-customizer-language-tag-text-italic: ${settings.SelectedTheme.settings.header.codeblockLangItalicText ? "italic" : "normal"};
|
||
}
|
||
body.codeblock-customizer .codeblock-customizer-header-text {
|
||
--codeblock-customizer-header-text-bold: ${settings.SelectedTheme.settings.header.boldText ? "bold" : "normal"};
|
||
--codeblock-customizer-header-text-italic: ${settings.SelectedTheme.settings.header.italicText ? "italic" : "normal"};
|
||
}
|
||
`;
|
||
const theme = app.vault.getConfig("cssTheme");
|
||
let minimalSpecificStyling = "";
|
||
if (theme.toLowerCase() === "minimal") {
|
||
minimalSpecificStyling = `
|
||
.markdown-source-view.is-readable-line-width .indented-line {
|
||
left: calc(var(--list-indent) * calc(var(--level) * 0.5)) !important;
|
||
width: calc(var(--line-width) - calc(var(--list-indent) * var(--level))) !important;
|
||
}
|
||
`;
|
||
} else {
|
||
minimalSpecificStyling = `
|
||
.markdown-source-view.is-readable-line-width .indented-line {
|
||
left: calc(var(--list-indent) * var(--level));
|
||
width: calc(100% - var(--list-indent) * var(--level));
|
||
}
|
||
`;
|
||
}
|
||
styleTag.innerText = (formatStyles(settings.SelectedTheme.colors, settings.SelectedTheme.settings, settings.SelectedTheme.colors[currentMode].codeblock.alternateHighlightColors, settings.SelectedTheme.settings.printing.forceCurrentColorUse) + altHighlightStyling + languageSpecificStyling + textSettingsStyles + minimalSpecificStyling).trim().replace(/[\r\n\s]+/g, " ");
|
||
updateSettingClasses(settings.SelectedTheme.settings);
|
||
}
|
||
function updateSettingClasses(settings) {
|
||
document.body.classList.remove("codeblock-customizer-active-line-highlight", "codeblock-customizer-active-line-highlight-codeblock", "codeblock-customizer-active-line-highlight-editor");
|
||
if (settings.enableEditorActiveLineHighlight && settings.codeblock.enableActiveLineHighlight) {
|
||
document.body.classList.add("codeblock-customizer-active-line-highlight");
|
||
} else if (settings.enableEditorActiveLineHighlight && !settings.codeblock.enableActiveLineHighlight) {
|
||
document.body.classList.add("codeblock-customizer-active-line-highlight-editor");
|
||
} else if (!settings.enableEditorActiveLineHighlight && settings.codeblock.enableActiveLineHighlight) {
|
||
document.body.classList.add("codeblock-customizer-active-line-highlight-codeblock");
|
||
}
|
||
if (settings.codeblock.enableLineNumbers) {
|
||
document.body.classList.add("codeblock-customizer-show-line-numbers");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-show-line-numbers");
|
||
}
|
||
document.body.classList.remove("codeblock-customizer-show-langnames", "codeblock-customizer-show-langnames-always");
|
||
if (settings.header.alwaysDisplayCodeblockLang && settings.header.displayCodeBlockLanguage) {
|
||
document.body.classList.add("codeblock-customizer-show-langnames-always");
|
||
} else if (settings.header.displayCodeBlockLanguage) {
|
||
document.body.classList.add("codeblock-customizer-show-langnames");
|
||
}
|
||
document.body.classList.remove("codeblock-customizer-show-langicons", "codeblock-customizer-show-langicons-always");
|
||
if (settings.header.alwaysDisplayCodeblockIcon && settings.header.displayCodeBlockIcon) {
|
||
document.body.classList.add("codeblock-customizer-show-langicons-always");
|
||
} else if (settings.header.displayCodeBlockIcon) {
|
||
document.body.classList.add("codeblock-customizer-show-langicons");
|
||
}
|
||
if (settings.gutter.enableHighlight) {
|
||
document.body.classList.add("codeblock-customizer-gutter-highlight");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-gutter-highlight");
|
||
}
|
||
if (settings.gutter.highlightActiveLineNr)
|
||
document.body.classList.add("codeblock-customizer-gutter-active-line");
|
||
else
|
||
document.body.classList.remove("codeblock-customizer-gutter-active-line");
|
||
if (settings.header.collapseIconPosition === "hide") {
|
||
document.body.classList.add("codeblock-customizer-collapseIconNone");
|
||
document.body.classList.remove("codeblock-customizer-collapseIconMiddle");
|
||
document.body.classList.remove("codeblock-customizer-collapseIconRight");
|
||
} else if (settings.header.collapseIconPosition === "middle") {
|
||
document.body.classList.remove("codeblock-customizer-collapseIconNone");
|
||
document.body.classList.remove("codeblock-customizer-collapseIconRight");
|
||
document.body.classList.add("codeblock-customizer-collapseIconMiddle");
|
||
} else if (settings.header.collapseIconPosition === "right") {
|
||
document.body.classList.remove("codeblock-customizer-collapseIconNone");
|
||
document.body.classList.remove("codeblock-customizer-collapseIconMiddle");
|
||
document.body.classList.add("codeblock-customizer-collapseIconRight");
|
||
}
|
||
if (settings.codeblock.buttons.enableDeleteCodeButton)
|
||
document.body.classList.add("codeblock-customizer-show-delete-code-button");
|
||
else
|
||
document.body.classList.remove("codeblock-customizer-show-delete-code-button");
|
||
if (settings.inlineCode.enableInlineCodeStyling) {
|
||
document.body.classList.add("codeblock-customizer-style-inline-code");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-style-inline-code");
|
||
}
|
||
if (settings.codeblock.codeBlockBorderStylingPosition === "disable") {
|
||
document.body.classList.remove("codeblock-customizer-style-codeblock-border-left");
|
||
document.body.classList.remove("codeblock-customizer-style-codeblock-border-right");
|
||
} else if (settings.codeblock.codeBlockBorderStylingPosition === "left") {
|
||
document.body.classList.remove("codeblock-customizer-style-codeblock-border-right");
|
||
document.body.classList.add("codeblock-customizer-style-codeblock-border-left");
|
||
} else if (settings.codeblock.codeBlockBorderStylingPosition === "right") {
|
||
document.body.classList.remove("codeblock-customizer-style-codeblock-border-left");
|
||
document.body.classList.add("codeblock-customizer-style-codeblock-border-right");
|
||
}
|
||
if (settings.semiFold.enableSemiFold) {
|
||
document.body.classList.add("codeblock-customizer-use-semifold");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-use-semifold");
|
||
}
|
||
if (settings.semiFold.showAdditionalUncollapseButon) {
|
||
document.body.classList.add("codeblock-customizer-show-uncollapse-code-button");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-show-uncollapse-code-button");
|
||
}
|
||
if (settings.codeblock.showIndentationLines) {
|
||
document.body.classList.add("codeblock-customizer-show-indentation-lines");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-show-indentation-lines");
|
||
}
|
||
if (settings.codeblock.buttons.enableSelectCodeButton) {
|
||
document.body.classList.add("codeblock-customizer-show-select-code-button");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-show-select-code-button");
|
||
}
|
||
if (settings.codeblock.buttons.enableWrapCodeButton) {
|
||
document.body.classList.add("codeblock-customizer-show-wrap-code-button");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-show-wrap-code-button");
|
||
}
|
||
if (settings.codeblock.buttons.alwaysShowCopyCodeButton) {
|
||
document.body.classList.add("codeblock-customizer-always-show-copy-code-button");
|
||
} else {
|
||
document.body.classList.remove("codeblock-customizer-always-show-copy-code-button");
|
||
}
|
||
}
|
||
function formatStyles(colors, settings, alternateColors, forceCurrentColorUse) {
|
||
return `
|
||
body.codeblock-customizer {
|
||
--wrap-code:${settings.codeblock.unwrapcode ? "pre" : "pre-wrap"}
|
||
}
|
||
body.codeblock-customizer.theme-light {
|
||
${Object.keys(stylesDict).reduce((variables, key2) => {
|
||
const cssVariable = `--codeblock-customizer-${stylesDict[key2]}`;
|
||
let cssValue = accessSetting(key2, forceCurrentColorUse ? colors[getCurrentMode()] : colors.light);
|
||
if (cssValue.toString().startsWith("--"))
|
||
cssValue = "var(" + cssValue + ")";
|
||
if (cssValue != null) {
|
||
return variables + `${cssVariable}: ${cssValue};`;
|
||
} else {
|
||
return variables;
|
||
}
|
||
}, addAltHighlightColors(alternateColors, true))}
|
||
}
|
||
body.codeblock-customizer.theme-dark {
|
||
${Object.keys(stylesDict).reduce((variables, key2) => {
|
||
const cssVariable = `--codeblock-customizer-${stylesDict[key2]}`;
|
||
let cssValue = accessSetting(key2, forceCurrentColorUse ? colors[getCurrentMode()] : colors.dark);
|
||
if (cssValue.toString().startsWith("--"))
|
||
cssValue = "var(" + cssValue + ")";
|
||
if (cssValue != null) {
|
||
return variables + `${cssVariable}: ${cssValue};`;
|
||
} else {
|
||
return variables;
|
||
}
|
||
}, addAltHighlightColors(alternateColors, false))}
|
||
}
|
||
`;
|
||
}
|
||
function getColorOfCssVariable(cssVariable) {
|
||
const body3 = document.body;
|
||
const computedStyle = getComputedStyle(body3);
|
||
const colorValue = computedStyle.getPropertyValue(cssVariable).trim();
|
||
if (colorValue.startsWith("rgb"))
|
||
return rgbOrRgbaToHex(colorValue);
|
||
if (colorValue.startsWith("hsl"))
|
||
return hslOrHslaToHex(colorValue);
|
||
if (colorValue.startsWith("#"))
|
||
return colorValue;
|
||
else
|
||
return "";
|
||
}
|
||
function rgbOrRgbaToHex(color2) {
|
||
const matchRGBA = color2.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d*\.?\d+)\s*\)$/);
|
||
const matchRGB = color2.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);
|
||
if (matchRGBA) {
|
||
const red = Number(matchRGBA[1]);
|
||
const green = Number(matchRGBA[2]);
|
||
const blue = Number(matchRGBA[3]);
|
||
const alpha = parseFloat(matchRGBA[4]);
|
||
if (isNaN(alpha) || alpha < 0 || alpha > 1) {
|
||
throw new Error("Invalid alpha value in rgba format.");
|
||
}
|
||
const alphaHex = Math.round(alpha * 255).toString(16).padStart(2, "0");
|
||
return `#${red.toString(16).padStart(2, "0")}${green.toString(16).padStart(2, "0")}${blue.toString(16).padStart(2, "0")}${alphaHex}`;
|
||
} else if (matchRGB) {
|
||
const red = Number(matchRGB[1]);
|
||
const green = Number(matchRGB[2]);
|
||
const blue = Number(matchRGB[3]);
|
||
return `#${red.toString(16).padStart(2, "0")}${green.toString(16).padStart(2, "0")}${blue.toString(16).padStart(2, "0")}`;
|
||
} else {
|
||
return "";
|
||
}
|
||
}
|
||
function hslOrHslaToHex(hslColor) {
|
||
const matchHSLA = hslColor.match(/^hsla?\((\d+),\s*(\d+)%,\s*(\d+)%,?\s*(\d*\.?\d+)?\)$/i);
|
||
if (!matchHSLA) {
|
||
return "";
|
||
}
|
||
const h2 = Number(matchHSLA[1]);
|
||
const s2 = Number(matchHSLA[2]);
|
||
const l = Number(matchHSLA[3]);
|
||
const a = matchHSLA[4] !== void 0 ? Number(matchHSLA[4]) : 1;
|
||
const hsl = `hsl(${h2}, ${s2}%, ${l}%)`;
|
||
const hexColor = hslToHex(hsl, a);
|
||
if (a < 1) {
|
||
const alphaHex = Math.round(a * 255).toString(16).padStart(2, "0");
|
||
return `${hexColor}${alphaHex}`;
|
||
}
|
||
return hexColor;
|
||
}
|
||
function hslToHex(hslColor, alpha) {
|
||
const matchHSL = hslColor.match(/^hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)$/i);
|
||
if (!matchHSL) {
|
||
return "";
|
||
}
|
||
const h2 = Number(matchHSL[1]);
|
||
const s2 = Number(matchHSL[2]);
|
||
const l = Number(matchHSL[3]);
|
||
const hue = (h2 % 360 + 360) % 360;
|
||
const saturation = Math.max(0, Math.min(100, s2));
|
||
const lightness = Math.max(0, Math.min(100, l));
|
||
const normalizedSaturation = saturation / 100;
|
||
const normalizedLightness = lightness / 100;
|
||
const chroma = (1 - Math.abs(2 * normalizedLightness - 1)) * normalizedSaturation;
|
||
const hPrime = hue / 60;
|
||
const x = chroma * (1 - Math.abs(hPrime % 2 - 1));
|
||
let r, g, b;
|
||
if (0 <= hPrime && hPrime < 1) {
|
||
[r, g, b] = [chroma, x, 0];
|
||
} else if (1 <= hPrime && hPrime < 2) {
|
||
[r, g, b] = [x, chroma, 0];
|
||
} else if (2 <= hPrime && hPrime < 3) {
|
||
[r, g, b] = [0, chroma, x];
|
||
} else if (3 <= hPrime && hPrime < 4) {
|
||
[r, g, b] = [0, x, chroma];
|
||
} else if (4 <= hPrime && hPrime < 5) {
|
||
[r, g, b] = [x, 0, chroma];
|
||
} else {
|
||
[r, g, b] = [chroma, 0, x];
|
||
}
|
||
const m = normalizedLightness - chroma / 2;
|
||
const red = Math.round((r + m) * 255);
|
||
const green = Math.round((g + m) * 255);
|
||
const blue = Math.round((b + m) * 255);
|
||
const hexColor = `#${red.toString(16).padStart(2, "0")}${green.toString(16).padStart(2, "0")}${blue.toString(16).padStart(2, "0")}`;
|
||
if (alpha < 1) {
|
||
const alphaHex = Math.round(alpha * 255).toString(16).padStart(2, "0");
|
||
return `${hexColor}${alphaHex}`;
|
||
}
|
||
return hexColor;
|
||
}
|
||
function addAltHighlightColors(alternateColors, lightTheme) {
|
||
const altHighlightStyles = Object.entries(alternateColors).reduce((altHighlightStyles2, [colorName, hexValue]) => {
|
||
return altHighlightStyles2 + `--codeblock-customizer-highlight-${colorName.replace(/\s+/g, "-").toLowerCase()}-color: ${hexValue};`;
|
||
}, "");
|
||
return altHighlightStyles;
|
||
}
|
||
function accessSetting(key2, settings) {
|
||
const keys = key2.split(".");
|
||
let value = settings;
|
||
for (const k of keys) {
|
||
if (value && k in value) {
|
||
value = value[k];
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
return value;
|
||
}
|
||
function removeCharFromStart(input, charToRemove) {
|
||
let startIndex = 0;
|
||
while (startIndex < input.length && (input[startIndex] === charToRemove || input[startIndex] === " ")) {
|
||
startIndex++;
|
||
}
|
||
return input.slice(startIndex);
|
||
}
|
||
function isSourceMode(state) {
|
||
if (!state.field(import_obsidian.editorLivePreviewField))
|
||
return true;
|
||
return false;
|
||
}
|
||
async function addTextToClipboard(content) {
|
||
try {
|
||
await navigator.clipboard.writeText(content);
|
||
new import_obsidian.Notice("Copied to your clipboard");
|
||
} catch (error) {
|
||
console.error(error);
|
||
new import_obsidian.Notice("Could not copy to your clipboard");
|
||
}
|
||
}
|
||
function getIndentationLevel(line) {
|
||
const indentationMatch = line.match(/^( {4}|\t)*/);
|
||
if (indentationMatch) {
|
||
const indentation = indentationMatch[0];
|
||
const spacesCount = (indentation.match(/ {4}/g) || []).length;
|
||
const tabsCount = (indentation.match(/\t/g) || []).length;
|
||
const indentationLevel = spacesCount + tabsCount;
|
||
const additionalCharacters = spacesCount * 4 + tabsCount;
|
||
return {
|
||
level: indentationLevel,
|
||
characters: additionalCharacters
|
||
//margin: margin
|
||
};
|
||
}
|
||
return {
|
||
level: 0,
|
||
characters: 0,
|
||
margin: 0
|
||
};
|
||
}
|
||
function getLanguageSpecificColorClass(codeblockLanguage, languageSpecificColors, languageSpecificColor) {
|
||
let codeblockLanguageSpecificClass = "";
|
||
const language = codeblockLanguage.length > 0 ? codeblockLanguage : "nolang";
|
||
if (languageSpecificColors !== null && languageSpecificColors[language] && Object.keys(languageSpecificColors[language]).length > 0) {
|
||
codeblockLanguageSpecificClass = "codeblock-customizer-languageSpecific-" + language.toLowerCase();
|
||
}
|
||
if (languageSpecificColor && Object.keys(languageSpecificColor).length > 0) {
|
||
codeblockLanguageSpecificClass += "codeblock-customizer-languageSpecific-" + language.toLowerCase();
|
||
}
|
||
return codeblockLanguageSpecificClass;
|
||
}
|
||
function createObjectCopy(object) {
|
||
const newObject = {};
|
||
for (const [property, value] of Object.entries(object)) {
|
||
newObject[property] = value;
|
||
}
|
||
return newObject;
|
||
}
|
||
function findAllOccurrences(mainString, substring) {
|
||
const indices = [];
|
||
let currentIndex = mainString.indexOf(substring);
|
||
while (currentIndex !== -1) {
|
||
indices.push(currentIndex);
|
||
currentIndex = mainString.indexOf(substring, currentIndex + substring.length);
|
||
}
|
||
return indices;
|
||
}
|
||
function removeFirstLine(inputString) {
|
||
const lines = inputString.split("\n");
|
||
if (lines.length > 1) {
|
||
const modifiedLines = lines.slice(1);
|
||
const resultString = modifiedLines.join("\n");
|
||
return resultString;
|
||
} else {
|
||
return "";
|
||
}
|
||
}
|
||
function mergeBorderColorsToLanguageSpecificColors(app, settings) {
|
||
const borderColors = settings.SelectedTheme.colors[getCurrentMode()].codeblock.languageBorderColors;
|
||
Object.entries(borderColors).forEach(([languageName, borderColor]) => {
|
||
if (!settings.SelectedTheme.colors.light.languageSpecificColors[languageName]) {
|
||
settings.SelectedTheme.colors.light.languageSpecificColors[languageName] = {};
|
||
}
|
||
if (!settings.SelectedTheme.colors.dark.languageSpecificColors[languageName]) {
|
||
settings.SelectedTheme.colors.dark.languageSpecificColors[languageName] = {};
|
||
}
|
||
settings.SelectedTheme.colors.light.languageSpecificColors[languageName]["codeblock.borderColor"] = settings.SelectedTheme.colors.light.codeblock.languageBorderColors[languageName];
|
||
settings.SelectedTheme.colors.dark.languageSpecificColors[languageName]["codeblock.borderColor"] = settings.SelectedTheme.colors.dark.codeblock.languageBorderColors[languageName];
|
||
delete settings.SelectedTheme.colors.light.codeblock.languageBorderColors[languageName];
|
||
delete settings.SelectedTheme.colors.dark.codeblock.languageBorderColors[languageName];
|
||
});
|
||
(async () => {
|
||
await app.saveSettings();
|
||
})();
|
||
}
|
||
function getPropertyFromLanguageSpecificColors(propertyName, settings) {
|
||
const languageColors = settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors;
|
||
const result = {};
|
||
Object.entries(languageColors).forEach(([languageName, properties]) => {
|
||
if (properties[propertyName]) {
|
||
result[languageName] = properties[propertyName];
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
async function getFileCacheAndContentLines(plugin, filePath) {
|
||
if (filePath === "")
|
||
return { cache: null, fileContentLines: null };
|
||
const cache = plugin.app.metadataCache.getCache(filePath);
|
||
if (!cache)
|
||
return { cache: null, fileContentLines: null };
|
||
const file = plugin.app.vault.getAbstractFileByPath(filePath);
|
||
if (!file) {
|
||
console.error(`File not found: ${filePath}`);
|
||
return { cache, fileContentLines: null };
|
||
}
|
||
const fileContent = await plugin.app.vault.cachedRead(file).catch((error) => {
|
||
console.error(`Error reading file: ${error.message}`);
|
||
return "";
|
||
});
|
||
const fileContentLines = fileContent.split(/\n/g);
|
||
return { cache, fileContentLines };
|
||
}
|
||
function addIndentation(input) {
|
||
const addSpaces = (line) => " " + line;
|
||
return input.map(addSpaces);
|
||
}
|
||
function removeIndentation(input) {
|
||
const removeSpaces = (line) => line.startsWith(" ") ? line.slice(4) : line;
|
||
return input.map(removeSpaces);
|
||
}
|
||
async function indentCodeBlock(editor, view) {
|
||
var _a2, _b;
|
||
const cursorPos = editor.getCursor();
|
||
const { cache, fileContentLines } = await getFileCacheAndContentLines(this, (_b = (_a2 = view.file) == null ? void 0 : _a2.path) != null ? _b : "");
|
||
if (!cache || !fileContentLines)
|
||
return;
|
||
if (cache == null ? void 0 : cache.sections) {
|
||
for (const sections of cache.sections) {
|
||
if (sections.type === "code" && cursorPos.line >= sections.position.start.line && cursorPos.line <= sections.position.end.line) {
|
||
const codeBlockLines = fileContentLines.slice(sections.position.start.line, sections.position.end.line + 1);
|
||
const indentedLines = addIndentation(codeBlockLines);
|
||
const pos = { line: sections.position.start.line, ch: 0 };
|
||
const endPos = { line: sections.position.end.line, ch: sections.position.end.col };
|
||
editor.replaceRange(indentedLines.join("\n"), pos, endPos);
|
||
view.save();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
async function unIndentCodeBlock(editor, view) {
|
||
var _a2, _b;
|
||
const cursorPos = editor.getCursor();
|
||
const { cache, fileContentLines } = await getFileCacheAndContentLines(this, (_b = (_a2 = view.file) == null ? void 0 : _a2.path) != null ? _b : "");
|
||
if (!cache || !fileContentLines)
|
||
return;
|
||
if (cache == null ? void 0 : cache.sections) {
|
||
for (const sections of cache.sections) {
|
||
if (sections.type === "code" && cursorPos.line >= sections.position.start.line && cursorPos.line <= sections.position.end.line) {
|
||
const codeBlockLines = fileContentLines.slice(sections.position.start.line, sections.position.end.line + 1);
|
||
const indentedLines = removeIndentation(codeBlockLines);
|
||
const pos = { line: sections.position.start.line, ch: 0 };
|
||
const endPos = { line: sections.position.end.line, ch: sections.position.end.col };
|
||
editor.replaceRange(indentedLines.join("\n"), pos, endPos);
|
||
view.save();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// node_modules/unist-util-is/lib/index.js
|
||
var convert = (
|
||
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
||
/**
|
||
* @type {(
|
||
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
||
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
||
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
||
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
||
* ((test?: Test) => Check)
|
||
* )}
|
||
*/
|
||
/**
|
||
* @param {Test} [test]
|
||
* @returns {Check}
|
||
*/
|
||
function(test) {
|
||
if (test === null || test === void 0) {
|
||
return ok;
|
||
}
|
||
if (typeof test === "function") {
|
||
return castFactory(test);
|
||
}
|
||
if (typeof test === "object") {
|
||
return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
|
||
}
|
||
if (typeof test === "string") {
|
||
return typeFactory(test);
|
||
}
|
||
throw new Error("Expected function, string, or object as test");
|
||
}
|
||
);
|
||
function anyFactory(tests) {
|
||
const checks2 = [];
|
||
let index2 = -1;
|
||
while (++index2 < tests.length) {
|
||
checks2[index2] = convert(tests[index2]);
|
||
}
|
||
return castFactory(any);
|
||
function any(...parameters) {
|
||
let index3 = -1;
|
||
while (++index3 < checks2.length) {
|
||
if (checks2[index3].apply(this, parameters))
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
}
|
||
function propsFactory(check) {
|
||
const checkAsRecord = (
|
||
/** @type {Record<string, unknown>} */
|
||
check
|
||
);
|
||
return castFactory(all3);
|
||
function all3(node) {
|
||
const nodeAsRecord = (
|
||
/** @type {Record<string, unknown>} */
|
||
/** @type {unknown} */
|
||
node
|
||
);
|
||
let key2;
|
||
for (key2 in check) {
|
||
if (nodeAsRecord[key2] !== checkAsRecord[key2])
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
}
|
||
function typeFactory(check) {
|
||
return castFactory(type);
|
||
function type(node) {
|
||
return node && node.type === check;
|
||
}
|
||
}
|
||
function castFactory(testFunction) {
|
||
return check;
|
||
function check(value, index2, parent) {
|
||
return Boolean(
|
||
looksLikeANode(value) && testFunction.call(
|
||
this,
|
||
value,
|
||
typeof index2 === "number" ? index2 : void 0,
|
||
parent || void 0
|
||
)
|
||
);
|
||
}
|
||
}
|
||
function ok() {
|
||
return true;
|
||
}
|
||
function looksLikeANode(value) {
|
||
return value !== null && typeof value === "object" && "type" in value;
|
||
}
|
||
|
||
// node_modules/unist-util-visit-parents/lib/color.js
|
||
function color(d) {
|
||
return d;
|
||
}
|
||
|
||
// node_modules/unist-util-visit-parents/lib/index.js
|
||
var empty = [];
|
||
var CONTINUE = true;
|
||
var EXIT = false;
|
||
var SKIP = "skip";
|
||
function visitParents(tree, test, visitor, reverse) {
|
||
let check;
|
||
if (typeof test === "function" && typeof visitor !== "function") {
|
||
reverse = visitor;
|
||
visitor = test;
|
||
} else {
|
||
check = test;
|
||
}
|
||
const is2 = convert(check);
|
||
const step = reverse ? -1 : 1;
|
||
factory(tree, void 0, [])();
|
||
function factory(node, index2, parents) {
|
||
const value = (
|
||
/** @type {Record<string, unknown>} */
|
||
node && typeof node === "object" ? node : {}
|
||
);
|
||
if (typeof value.type === "string") {
|
||
const name = (
|
||
// `hast`
|
||
typeof value.tagName === "string" ? value.tagName : (
|
||
// `xast`
|
||
typeof value.name === "string" ? value.name : void 0
|
||
)
|
||
);
|
||
Object.defineProperty(visit, "name", {
|
||
value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
|
||
});
|
||
}
|
||
return visit;
|
||
function visit() {
|
||
let result = empty;
|
||
let subresult;
|
||
let offset;
|
||
let grandparents;
|
||
if (!test || is2(node, index2, parents[parents.length - 1] || void 0)) {
|
||
result = toResult(visitor(node, parents));
|
||
if (result[0] === EXIT) {
|
||
return result;
|
||
}
|
||
}
|
||
if ("children" in node && node.children) {
|
||
const nodeAsParent = (
|
||
/** @type {UnistParent} */
|
||
node
|
||
);
|
||
if (nodeAsParent.children && result[0] !== SKIP) {
|
||
offset = (reverse ? nodeAsParent.children.length : -1) + step;
|
||
grandparents = parents.concat(nodeAsParent);
|
||
while (offset > -1 && offset < nodeAsParent.children.length) {
|
||
const child = nodeAsParent.children[offset];
|
||
subresult = factory(child, offset, grandparents)();
|
||
if (subresult[0] === EXIT) {
|
||
return subresult;
|
||
}
|
||
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
|
||
}
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
}
|
||
}
|
||
function toResult(value) {
|
||
if (Array.isArray(value)) {
|
||
return value;
|
||
}
|
||
if (typeof value === "number") {
|
||
return [CONTINUE, value];
|
||
}
|
||
return value === null || value === void 0 ? empty : [value];
|
||
}
|
||
|
||
// node_modules/devlop/lib/default.js
|
||
function ok2() {
|
||
}
|
||
|
||
// node_modules/property-information/lib/util/schema.js
|
||
var Schema = class {
|
||
/**
|
||
* @constructor
|
||
* @param {Properties} property
|
||
* @param {Normal} normal
|
||
* @param {string} [space]
|
||
*/
|
||
constructor(property, normal, space) {
|
||
this.property = property;
|
||
this.normal = normal;
|
||
if (space) {
|
||
this.space = space;
|
||
}
|
||
}
|
||
};
|
||
Schema.prototype.property = {};
|
||
Schema.prototype.normal = {};
|
||
Schema.prototype.space = null;
|
||
|
||
// node_modules/property-information/lib/util/merge.js
|
||
function merge(definitions, space) {
|
||
const property = {};
|
||
const normal = {};
|
||
let index2 = -1;
|
||
while (++index2 < definitions.length) {
|
||
Object.assign(property, definitions[index2].property);
|
||
Object.assign(normal, definitions[index2].normal);
|
||
}
|
||
return new Schema(property, normal, space);
|
||
}
|
||
|
||
// node_modules/property-information/lib/normalize.js
|
||
function normalize(value) {
|
||
return value.toLowerCase();
|
||
}
|
||
|
||
// node_modules/property-information/lib/util/info.js
|
||
var Info = class {
|
||
/**
|
||
* @constructor
|
||
* @param {string} property
|
||
* @param {string} attribute
|
||
*/
|
||
constructor(property, attribute) {
|
||
this.property = property;
|
||
this.attribute = attribute;
|
||
}
|
||
};
|
||
Info.prototype.space = null;
|
||
Info.prototype.boolean = false;
|
||
Info.prototype.booleanish = false;
|
||
Info.prototype.overloadedBoolean = false;
|
||
Info.prototype.number = false;
|
||
Info.prototype.commaSeparated = false;
|
||
Info.prototype.spaceSeparated = false;
|
||
Info.prototype.commaOrSpaceSeparated = false;
|
||
Info.prototype.mustUseProperty = false;
|
||
Info.prototype.defined = false;
|
||
|
||
// node_modules/property-information/lib/util/types.js
|
||
var types_exports = {};
|
||
__export(types_exports, {
|
||
boolean: () => boolean,
|
||
booleanish: () => booleanish,
|
||
commaOrSpaceSeparated: () => commaOrSpaceSeparated,
|
||
commaSeparated: () => commaSeparated,
|
||
number: () => number,
|
||
overloadedBoolean: () => overloadedBoolean,
|
||
spaceSeparated: () => spaceSeparated
|
||
});
|
||
var powers = 0;
|
||
var boolean = increment();
|
||
var booleanish = increment();
|
||
var overloadedBoolean = increment();
|
||
var number = increment();
|
||
var spaceSeparated = increment();
|
||
var commaSeparated = increment();
|
||
var commaOrSpaceSeparated = increment();
|
||
function increment() {
|
||
return 2 ** ++powers;
|
||
}
|
||
|
||
// node_modules/property-information/lib/util/defined-info.js
|
||
var checks = Object.keys(types_exports);
|
||
var DefinedInfo = class extends Info {
|
||
/**
|
||
* @constructor
|
||
* @param {string} property
|
||
* @param {string} attribute
|
||
* @param {number|null} [mask]
|
||
* @param {string} [space]
|
||
*/
|
||
constructor(property, attribute, mask, space) {
|
||
let index2 = -1;
|
||
super(property, attribute);
|
||
mark(this, "space", space);
|
||
if (typeof mask === "number") {
|
||
while (++index2 < checks.length) {
|
||
const check = checks[index2];
|
||
mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
|
||
}
|
||
}
|
||
}
|
||
};
|
||
DefinedInfo.prototype.defined = true;
|
||
function mark(values, key2, value) {
|
||
if (value) {
|
||
values[key2] = value;
|
||
}
|
||
}
|
||
|
||
// node_modules/property-information/lib/util/create.js
|
||
var own = {}.hasOwnProperty;
|
||
function create(definition) {
|
||
const property = {};
|
||
const normal = {};
|
||
let prop;
|
||
for (prop in definition.properties) {
|
||
if (own.call(definition.properties, prop)) {
|
||
const value = definition.properties[prop];
|
||
const info = new DefinedInfo(
|
||
prop,
|
||
definition.transform(definition.attributes || {}, prop),
|
||
value,
|
||
definition.space
|
||
);
|
||
if (definition.mustUseProperty && definition.mustUseProperty.includes(prop)) {
|
||
info.mustUseProperty = true;
|
||
}
|
||
property[prop] = info;
|
||
normal[normalize(prop)] = prop;
|
||
normal[normalize(info.attribute)] = prop;
|
||
}
|
||
}
|
||
return new Schema(property, normal, definition.space);
|
||
}
|
||
|
||
// node_modules/property-information/lib/xlink.js
|
||
var xlink = create({
|
||
space: "xlink",
|
||
transform(_2, prop) {
|
||
return "xlink:" + prop.slice(5).toLowerCase();
|
||
},
|
||
properties: {
|
||
xLinkActuate: null,
|
||
xLinkArcRole: null,
|
||
xLinkHref: null,
|
||
xLinkRole: null,
|
||
xLinkShow: null,
|
||
xLinkTitle: null,
|
||
xLinkType: null
|
||
}
|
||
});
|
||
|
||
// node_modules/property-information/lib/xml.js
|
||
var xml = create({
|
||
space: "xml",
|
||
transform(_2, prop) {
|
||
return "xml:" + prop.slice(3).toLowerCase();
|
||
},
|
||
properties: { xmlLang: null, xmlBase: null, xmlSpace: null }
|
||
});
|
||
|
||
// node_modules/property-information/lib/util/case-sensitive-transform.js
|
||
function caseSensitiveTransform(attributes, attribute) {
|
||
return attribute in attributes ? attributes[attribute] : attribute;
|
||
}
|
||
|
||
// node_modules/property-information/lib/util/case-insensitive-transform.js
|
||
function caseInsensitiveTransform(attributes, property) {
|
||
return caseSensitiveTransform(attributes, property.toLowerCase());
|
||
}
|
||
|
||
// node_modules/property-information/lib/xmlns.js
|
||
var xmlns = create({
|
||
space: "xmlns",
|
||
attributes: { xmlnsxlink: "xmlns:xlink" },
|
||
transform: caseInsensitiveTransform,
|
||
properties: { xmlns: null, xmlnsXLink: null }
|
||
});
|
||
|
||
// node_modules/property-information/lib/aria.js
|
||
var aria = create({
|
||
transform(_2, prop) {
|
||
return prop === "role" ? prop : "aria-" + prop.slice(4).toLowerCase();
|
||
},
|
||
properties: {
|
||
ariaActiveDescendant: null,
|
||
ariaAtomic: booleanish,
|
||
ariaAutoComplete: null,
|
||
ariaBusy: booleanish,
|
||
ariaChecked: booleanish,
|
||
ariaColCount: number,
|
||
ariaColIndex: number,
|
||
ariaColSpan: number,
|
||
ariaControls: spaceSeparated,
|
||
ariaCurrent: null,
|
||
ariaDescribedBy: spaceSeparated,
|
||
ariaDetails: null,
|
||
ariaDisabled: booleanish,
|
||
ariaDropEffect: spaceSeparated,
|
||
ariaErrorMessage: null,
|
||
ariaExpanded: booleanish,
|
||
ariaFlowTo: spaceSeparated,
|
||
ariaGrabbed: booleanish,
|
||
ariaHasPopup: null,
|
||
ariaHidden: booleanish,
|
||
ariaInvalid: null,
|
||
ariaKeyShortcuts: null,
|
||
ariaLabel: null,
|
||
ariaLabelledBy: spaceSeparated,
|
||
ariaLevel: number,
|
||
ariaLive: null,
|
||
ariaModal: booleanish,
|
||
ariaMultiLine: booleanish,
|
||
ariaMultiSelectable: booleanish,
|
||
ariaOrientation: null,
|
||
ariaOwns: spaceSeparated,
|
||
ariaPlaceholder: null,
|
||
ariaPosInSet: number,
|
||
ariaPressed: booleanish,
|
||
ariaReadOnly: booleanish,
|
||
ariaRelevant: null,
|
||
ariaRequired: booleanish,
|
||
ariaRoleDescription: spaceSeparated,
|
||
ariaRowCount: number,
|
||
ariaRowIndex: number,
|
||
ariaRowSpan: number,
|
||
ariaSelected: booleanish,
|
||
ariaSetSize: number,
|
||
ariaSort: null,
|
||
ariaValueMax: number,
|
||
ariaValueMin: number,
|
||
ariaValueNow: number,
|
||
ariaValueText: null,
|
||
role: null
|
||
}
|
||
});
|
||
|
||
// node_modules/property-information/lib/html.js
|
||
var html = create({
|
||
space: "html",
|
||
attributes: {
|
||
acceptcharset: "accept-charset",
|
||
classname: "class",
|
||
htmlfor: "for",
|
||
httpequiv: "http-equiv"
|
||
},
|
||
transform: caseInsensitiveTransform,
|
||
mustUseProperty: ["checked", "multiple", "muted", "selected"],
|
||
properties: {
|
||
// Standard Properties.
|
||
abbr: null,
|
||
accept: commaSeparated,
|
||
acceptCharset: spaceSeparated,
|
||
accessKey: spaceSeparated,
|
||
action: null,
|
||
allow: null,
|
||
allowFullScreen: boolean,
|
||
allowPaymentRequest: boolean,
|
||
allowUserMedia: boolean,
|
||
alt: null,
|
||
as: null,
|
||
async: boolean,
|
||
autoCapitalize: null,
|
||
autoComplete: spaceSeparated,
|
||
autoFocus: boolean,
|
||
autoPlay: boolean,
|
||
blocking: spaceSeparated,
|
||
capture: null,
|
||
charSet: null,
|
||
checked: boolean,
|
||
cite: null,
|
||
className: spaceSeparated,
|
||
cols: number,
|
||
colSpan: null,
|
||
content: null,
|
||
contentEditable: booleanish,
|
||
controls: boolean,
|
||
controlsList: spaceSeparated,
|
||
coords: number | commaSeparated,
|
||
crossOrigin: null,
|
||
data: null,
|
||
dateTime: null,
|
||
decoding: null,
|
||
default: boolean,
|
||
defer: boolean,
|
||
dir: null,
|
||
dirName: null,
|
||
disabled: boolean,
|
||
download: overloadedBoolean,
|
||
draggable: booleanish,
|
||
encType: null,
|
||
enterKeyHint: null,
|
||
fetchPriority: null,
|
||
form: null,
|
||
formAction: null,
|
||
formEncType: null,
|
||
formMethod: null,
|
||
formNoValidate: boolean,
|
||
formTarget: null,
|
||
headers: spaceSeparated,
|
||
height: number,
|
||
hidden: boolean,
|
||
high: number,
|
||
href: null,
|
||
hrefLang: null,
|
||
htmlFor: spaceSeparated,
|
||
httpEquiv: spaceSeparated,
|
||
id: null,
|
||
imageSizes: null,
|
||
imageSrcSet: null,
|
||
inert: boolean,
|
||
inputMode: null,
|
||
integrity: null,
|
||
is: null,
|
||
isMap: boolean,
|
||
itemId: null,
|
||
itemProp: spaceSeparated,
|
||
itemRef: spaceSeparated,
|
||
itemScope: boolean,
|
||
itemType: spaceSeparated,
|
||
kind: null,
|
||
label: null,
|
||
lang: null,
|
||
language: null,
|
||
list: null,
|
||
loading: null,
|
||
loop: boolean,
|
||
low: number,
|
||
manifest: null,
|
||
max: null,
|
||
maxLength: number,
|
||
media: null,
|
||
method: null,
|
||
min: null,
|
||
minLength: number,
|
||
multiple: boolean,
|
||
muted: boolean,
|
||
name: null,
|
||
nonce: null,
|
||
noModule: boolean,
|
||
noValidate: boolean,
|
||
onAbort: null,
|
||
onAfterPrint: null,
|
||
onAuxClick: null,
|
||
onBeforeMatch: null,
|
||
onBeforePrint: null,
|
||
onBeforeToggle: null,
|
||
onBeforeUnload: null,
|
||
onBlur: null,
|
||
onCancel: null,
|
||
onCanPlay: null,
|
||
onCanPlayThrough: null,
|
||
onChange: null,
|
||
onClick: null,
|
||
onClose: null,
|
||
onContextLost: null,
|
||
onContextMenu: null,
|
||
onContextRestored: null,
|
||
onCopy: null,
|
||
onCueChange: null,
|
||
onCut: null,
|
||
onDblClick: null,
|
||
onDrag: null,
|
||
onDragEnd: null,
|
||
onDragEnter: null,
|
||
onDragExit: null,
|
||
onDragLeave: null,
|
||
onDragOver: null,
|
||
onDragStart: null,
|
||
onDrop: null,
|
||
onDurationChange: null,
|
||
onEmptied: null,
|
||
onEnded: null,
|
||
onError: null,
|
||
onFocus: null,
|
||
onFormData: null,
|
||
onHashChange: null,
|
||
onInput: null,
|
||
onInvalid: null,
|
||
onKeyDown: null,
|
||
onKeyPress: null,
|
||
onKeyUp: null,
|
||
onLanguageChange: null,
|
||
onLoad: null,
|
||
onLoadedData: null,
|
||
onLoadedMetadata: null,
|
||
onLoadEnd: null,
|
||
onLoadStart: null,
|
||
onMessage: null,
|
||
onMessageError: null,
|
||
onMouseDown: null,
|
||
onMouseEnter: null,
|
||
onMouseLeave: null,
|
||
onMouseMove: null,
|
||
onMouseOut: null,
|
||
onMouseOver: null,
|
||
onMouseUp: null,
|
||
onOffline: null,
|
||
onOnline: null,
|
||
onPageHide: null,
|
||
onPageShow: null,
|
||
onPaste: null,
|
||
onPause: null,
|
||
onPlay: null,
|
||
onPlaying: null,
|
||
onPopState: null,
|
||
onProgress: null,
|
||
onRateChange: null,
|
||
onRejectionHandled: null,
|
||
onReset: null,
|
||
onResize: null,
|
||
onScroll: null,
|
||
onScrollEnd: null,
|
||
onSecurityPolicyViolation: null,
|
||
onSeeked: null,
|
||
onSeeking: null,
|
||
onSelect: null,
|
||
onSlotChange: null,
|
||
onStalled: null,
|
||
onStorage: null,
|
||
onSubmit: null,
|
||
onSuspend: null,
|
||
onTimeUpdate: null,
|
||
onToggle: null,
|
||
onUnhandledRejection: null,
|
||
onUnload: null,
|
||
onVolumeChange: null,
|
||
onWaiting: null,
|
||
onWheel: null,
|
||
open: boolean,
|
||
optimum: number,
|
||
pattern: null,
|
||
ping: spaceSeparated,
|
||
placeholder: null,
|
||
playsInline: boolean,
|
||
popover: null,
|
||
popoverTarget: null,
|
||
popoverTargetAction: null,
|
||
poster: null,
|
||
preload: null,
|
||
readOnly: boolean,
|
||
referrerPolicy: null,
|
||
rel: spaceSeparated,
|
||
required: boolean,
|
||
reversed: boolean,
|
||
rows: number,
|
||
rowSpan: number,
|
||
sandbox: spaceSeparated,
|
||
scope: null,
|
||
scoped: boolean,
|
||
seamless: boolean,
|
||
selected: boolean,
|
||
shadowRootClonable: boolean,
|
||
shadowRootDelegatesFocus: boolean,
|
||
shadowRootMode: null,
|
||
shape: null,
|
||
size: number,
|
||
sizes: null,
|
||
slot: null,
|
||
span: number,
|
||
spellCheck: booleanish,
|
||
src: null,
|
||
srcDoc: null,
|
||
srcLang: null,
|
||
srcSet: null,
|
||
start: number,
|
||
step: null,
|
||
style: null,
|
||
tabIndex: number,
|
||
target: null,
|
||
title: null,
|
||
translate: null,
|
||
type: null,
|
||
typeMustMatch: boolean,
|
||
useMap: null,
|
||
value: booleanish,
|
||
width: number,
|
||
wrap: null,
|
||
writingSuggestions: null,
|
||
// Legacy.
|
||
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
|
||
align: null,
|
||
// Several. Use CSS `text-align` instead,
|
||
aLink: null,
|
||
// `<body>`. Use CSS `a:active {color}` instead
|
||
archive: spaceSeparated,
|
||
// `<object>`. List of URIs to archives
|
||
axis: null,
|
||
// `<td>` and `<th>`. Use `scope` on `<th>`
|
||
background: null,
|
||
// `<body>`. Use CSS `background-image` instead
|
||
bgColor: null,
|
||
// `<body>` and table elements. Use CSS `background-color` instead
|
||
border: number,
|
||
// `<table>`. Use CSS `border-width` instead,
|
||
borderColor: null,
|
||
// `<table>`. Use CSS `border-color` instead,
|
||
bottomMargin: number,
|
||
// `<body>`
|
||
cellPadding: null,
|
||
// `<table>`
|
||
cellSpacing: null,
|
||
// `<table>`
|
||
char: null,
|
||
// Several table elements. When `align=char`, sets the character to align on
|
||
charOff: null,
|
||
// Several table elements. When `char`, offsets the alignment
|
||
classId: null,
|
||
// `<object>`
|
||
clear: null,
|
||
// `<br>`. Use CSS `clear` instead
|
||
code: null,
|
||
// `<object>`
|
||
codeBase: null,
|
||
// `<object>`
|
||
codeType: null,
|
||
// `<object>`
|
||
color: null,
|
||
// `<font>` and `<hr>`. Use CSS instead
|
||
compact: boolean,
|
||
// Lists. Use CSS to reduce space between items instead
|
||
declare: boolean,
|
||
// `<object>`
|
||
event: null,
|
||
// `<script>`
|
||
face: null,
|
||
// `<font>`. Use CSS instead
|
||
frame: null,
|
||
// `<table>`
|
||
frameBorder: null,
|
||
// `<iframe>`. Use CSS `border` instead
|
||
hSpace: number,
|
||
// `<img>` and `<object>`
|
||
leftMargin: number,
|
||
// `<body>`
|
||
link: null,
|
||
// `<body>`. Use CSS `a:link {color: *}` instead
|
||
longDesc: null,
|
||
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
||
lowSrc: null,
|
||
// `<img>`. Use a `<picture>`
|
||
marginHeight: number,
|
||
// `<body>`
|
||
marginWidth: number,
|
||
// `<body>`
|
||
noResize: boolean,
|
||
// `<frame>`
|
||
noHref: boolean,
|
||
// `<area>`. Use no href instead of an explicit `nohref`
|
||
noShade: boolean,
|
||
// `<hr>`. Use background-color and height instead of borders
|
||
noWrap: boolean,
|
||
// `<td>` and `<th>`
|
||
object: null,
|
||
// `<applet>`
|
||
profile: null,
|
||
// `<head>`
|
||
prompt: null,
|
||
// `<isindex>`
|
||
rev: null,
|
||
// `<link>`
|
||
rightMargin: number,
|
||
// `<body>`
|
||
rules: null,
|
||
// `<table>`
|
||
scheme: null,
|
||
// `<meta>`
|
||
scrolling: booleanish,
|
||
// `<frame>`. Use overflow in the child context
|
||
standby: null,
|
||
// `<object>`
|
||
summary: null,
|
||
// `<table>`
|
||
text: null,
|
||
// `<body>`. Use CSS `color` instead
|
||
topMargin: number,
|
||
// `<body>`
|
||
valueType: null,
|
||
// `<param>`
|
||
version: null,
|
||
// `<html>`. Use a doctype.
|
||
vAlign: null,
|
||
// Several. Use CSS `vertical-align` instead
|
||
vLink: null,
|
||
// `<body>`. Use CSS `a:visited {color}` instead
|
||
vSpace: number,
|
||
// `<img>` and `<object>`
|
||
// Non-standard Properties.
|
||
allowTransparency: null,
|
||
autoCorrect: null,
|
||
autoSave: null,
|
||
disablePictureInPicture: boolean,
|
||
disableRemotePlayback: boolean,
|
||
prefix: null,
|
||
property: null,
|
||
results: number,
|
||
security: null,
|
||
unselectable: null
|
||
}
|
||
});
|
||
|
||
// node_modules/property-information/lib/svg.js
|
||
var svg = create({
|
||
space: "svg",
|
||
attributes: {
|
||
accentHeight: "accent-height",
|
||
alignmentBaseline: "alignment-baseline",
|
||
arabicForm: "arabic-form",
|
||
baselineShift: "baseline-shift",
|
||
capHeight: "cap-height",
|
||
className: "class",
|
||
clipPath: "clip-path",
|
||
clipRule: "clip-rule",
|
||
colorInterpolation: "color-interpolation",
|
||
colorInterpolationFilters: "color-interpolation-filters",
|
||
colorProfile: "color-profile",
|
||
colorRendering: "color-rendering",
|
||
crossOrigin: "crossorigin",
|
||
dataType: "datatype",
|
||
dominantBaseline: "dominant-baseline",
|
||
enableBackground: "enable-background",
|
||
fillOpacity: "fill-opacity",
|
||
fillRule: "fill-rule",
|
||
floodColor: "flood-color",
|
||
floodOpacity: "flood-opacity",
|
||
fontFamily: "font-family",
|
||
fontSize: "font-size",
|
||
fontSizeAdjust: "font-size-adjust",
|
||
fontStretch: "font-stretch",
|
||
fontStyle: "font-style",
|
||
fontVariant: "font-variant",
|
||
fontWeight: "font-weight",
|
||
glyphName: "glyph-name",
|
||
glyphOrientationHorizontal: "glyph-orientation-horizontal",
|
||
glyphOrientationVertical: "glyph-orientation-vertical",
|
||
hrefLang: "hreflang",
|
||
horizAdvX: "horiz-adv-x",
|
||
horizOriginX: "horiz-origin-x",
|
||
horizOriginY: "horiz-origin-y",
|
||
imageRendering: "image-rendering",
|
||
letterSpacing: "letter-spacing",
|
||
lightingColor: "lighting-color",
|
||
markerEnd: "marker-end",
|
||
markerMid: "marker-mid",
|
||
markerStart: "marker-start",
|
||
navDown: "nav-down",
|
||
navDownLeft: "nav-down-left",
|
||
navDownRight: "nav-down-right",
|
||
navLeft: "nav-left",
|
||
navNext: "nav-next",
|
||
navPrev: "nav-prev",
|
||
navRight: "nav-right",
|
||
navUp: "nav-up",
|
||
navUpLeft: "nav-up-left",
|
||
navUpRight: "nav-up-right",
|
||
onAbort: "onabort",
|
||
onActivate: "onactivate",
|
||
onAfterPrint: "onafterprint",
|
||
onBeforePrint: "onbeforeprint",
|
||
onBegin: "onbegin",
|
||
onCancel: "oncancel",
|
||
onCanPlay: "oncanplay",
|
||
onCanPlayThrough: "oncanplaythrough",
|
||
onChange: "onchange",
|
||
onClick: "onclick",
|
||
onClose: "onclose",
|
||
onCopy: "oncopy",
|
||
onCueChange: "oncuechange",
|
||
onCut: "oncut",
|
||
onDblClick: "ondblclick",
|
||
onDrag: "ondrag",
|
||
onDragEnd: "ondragend",
|
||
onDragEnter: "ondragenter",
|
||
onDragExit: "ondragexit",
|
||
onDragLeave: "ondragleave",
|
||
onDragOver: "ondragover",
|
||
onDragStart: "ondragstart",
|
||
onDrop: "ondrop",
|
||
onDurationChange: "ondurationchange",
|
||
onEmptied: "onemptied",
|
||
onEnd: "onend",
|
||
onEnded: "onended",
|
||
onError: "onerror",
|
||
onFocus: "onfocus",
|
||
onFocusIn: "onfocusin",
|
||
onFocusOut: "onfocusout",
|
||
onHashChange: "onhashchange",
|
||
onInput: "oninput",
|
||
onInvalid: "oninvalid",
|
||
onKeyDown: "onkeydown",
|
||
onKeyPress: "onkeypress",
|
||
onKeyUp: "onkeyup",
|
||
onLoad: "onload",
|
||
onLoadedData: "onloadeddata",
|
||
onLoadedMetadata: "onloadedmetadata",
|
||
onLoadStart: "onloadstart",
|
||
onMessage: "onmessage",
|
||
onMouseDown: "onmousedown",
|
||
onMouseEnter: "onmouseenter",
|
||
onMouseLeave: "onmouseleave",
|
||
onMouseMove: "onmousemove",
|
||
onMouseOut: "onmouseout",
|
||
onMouseOver: "onmouseover",
|
||
onMouseUp: "onmouseup",
|
||
onMouseWheel: "onmousewheel",
|
||
onOffline: "onoffline",
|
||
onOnline: "ononline",
|
||
onPageHide: "onpagehide",
|
||
onPageShow: "onpageshow",
|
||
onPaste: "onpaste",
|
||
onPause: "onpause",
|
||
onPlay: "onplay",
|
||
onPlaying: "onplaying",
|
||
onPopState: "onpopstate",
|
||
onProgress: "onprogress",
|
||
onRateChange: "onratechange",
|
||
onRepeat: "onrepeat",
|
||
onReset: "onreset",
|
||
onResize: "onresize",
|
||
onScroll: "onscroll",
|
||
onSeeked: "onseeked",
|
||
onSeeking: "onseeking",
|
||
onSelect: "onselect",
|
||
onShow: "onshow",
|
||
onStalled: "onstalled",
|
||
onStorage: "onstorage",
|
||
onSubmit: "onsubmit",
|
||
onSuspend: "onsuspend",
|
||
onTimeUpdate: "ontimeupdate",
|
||
onToggle: "ontoggle",
|
||
onUnload: "onunload",
|
||
onVolumeChange: "onvolumechange",
|
||
onWaiting: "onwaiting",
|
||
onZoom: "onzoom",
|
||
overlinePosition: "overline-position",
|
||
overlineThickness: "overline-thickness",
|
||
paintOrder: "paint-order",
|
||
panose1: "panose-1",
|
||
pointerEvents: "pointer-events",
|
||
referrerPolicy: "referrerpolicy",
|
||
renderingIntent: "rendering-intent",
|
||
shapeRendering: "shape-rendering",
|
||
stopColor: "stop-color",
|
||
stopOpacity: "stop-opacity",
|
||
strikethroughPosition: "strikethrough-position",
|
||
strikethroughThickness: "strikethrough-thickness",
|
||
strokeDashArray: "stroke-dasharray",
|
||
strokeDashOffset: "stroke-dashoffset",
|
||
strokeLineCap: "stroke-linecap",
|
||
strokeLineJoin: "stroke-linejoin",
|
||
strokeMiterLimit: "stroke-miterlimit",
|
||
strokeOpacity: "stroke-opacity",
|
||
strokeWidth: "stroke-width",
|
||
tabIndex: "tabindex",
|
||
textAnchor: "text-anchor",
|
||
textDecoration: "text-decoration",
|
||
textRendering: "text-rendering",
|
||
transformOrigin: "transform-origin",
|
||
typeOf: "typeof",
|
||
underlinePosition: "underline-position",
|
||
underlineThickness: "underline-thickness",
|
||
unicodeBidi: "unicode-bidi",
|
||
unicodeRange: "unicode-range",
|
||
unitsPerEm: "units-per-em",
|
||
vAlphabetic: "v-alphabetic",
|
||
vHanging: "v-hanging",
|
||
vIdeographic: "v-ideographic",
|
||
vMathematical: "v-mathematical",
|
||
vectorEffect: "vector-effect",
|
||
vertAdvY: "vert-adv-y",
|
||
vertOriginX: "vert-origin-x",
|
||
vertOriginY: "vert-origin-y",
|
||
wordSpacing: "word-spacing",
|
||
writingMode: "writing-mode",
|
||
xHeight: "x-height",
|
||
// These were camelcased in Tiny. Now lowercased in SVG 2
|
||
playbackOrder: "playbackorder",
|
||
timelineBegin: "timelinebegin"
|
||
},
|
||
transform: caseSensitiveTransform,
|
||
properties: {
|
||
about: commaOrSpaceSeparated,
|
||
accentHeight: number,
|
||
accumulate: null,
|
||
additive: null,
|
||
alignmentBaseline: null,
|
||
alphabetic: number,
|
||
amplitude: number,
|
||
arabicForm: null,
|
||
ascent: number,
|
||
attributeName: null,
|
||
attributeType: null,
|
||
azimuth: number,
|
||
bandwidth: null,
|
||
baselineShift: null,
|
||
baseFrequency: null,
|
||
baseProfile: null,
|
||
bbox: null,
|
||
begin: null,
|
||
bias: number,
|
||
by: null,
|
||
calcMode: null,
|
||
capHeight: number,
|
||
className: spaceSeparated,
|
||
clip: null,
|
||
clipPath: null,
|
||
clipPathUnits: null,
|
||
clipRule: null,
|
||
color: null,
|
||
colorInterpolation: null,
|
||
colorInterpolationFilters: null,
|
||
colorProfile: null,
|
||
colorRendering: null,
|
||
content: null,
|
||
contentScriptType: null,
|
||
contentStyleType: null,
|
||
crossOrigin: null,
|
||
cursor: null,
|
||
cx: null,
|
||
cy: null,
|
||
d: null,
|
||
dataType: null,
|
||
defaultAction: null,
|
||
descent: number,
|
||
diffuseConstant: number,
|
||
direction: null,
|
||
display: null,
|
||
dur: null,
|
||
divisor: number,
|
||
dominantBaseline: null,
|
||
download: boolean,
|
||
dx: null,
|
||
dy: null,
|
||
edgeMode: null,
|
||
editable: null,
|
||
elevation: number,
|
||
enableBackground: null,
|
||
end: null,
|
||
event: null,
|
||
exponent: number,
|
||
externalResourcesRequired: null,
|
||
fill: null,
|
||
fillOpacity: number,
|
||
fillRule: null,
|
||
filter: null,
|
||
filterRes: null,
|
||
filterUnits: null,
|
||
floodColor: null,
|
||
floodOpacity: null,
|
||
focusable: null,
|
||
focusHighlight: null,
|
||
fontFamily: null,
|
||
fontSize: null,
|
||
fontSizeAdjust: null,
|
||
fontStretch: null,
|
||
fontStyle: null,
|
||
fontVariant: null,
|
||
fontWeight: null,
|
||
format: null,
|
||
fr: null,
|
||
from: null,
|
||
fx: null,
|
||
fy: null,
|
||
g1: commaSeparated,
|
||
g2: commaSeparated,
|
||
glyphName: commaSeparated,
|
||
glyphOrientationHorizontal: null,
|
||
glyphOrientationVertical: null,
|
||
glyphRef: null,
|
||
gradientTransform: null,
|
||
gradientUnits: null,
|
||
handler: null,
|
||
hanging: number,
|
||
hatchContentUnits: null,
|
||
hatchUnits: null,
|
||
height: null,
|
||
href: null,
|
||
hrefLang: null,
|
||
horizAdvX: number,
|
||
horizOriginX: number,
|
||
horizOriginY: number,
|
||
id: null,
|
||
ideographic: number,
|
||
imageRendering: null,
|
||
initialVisibility: null,
|
||
in: null,
|
||
in2: null,
|
||
intercept: number,
|
||
k: number,
|
||
k1: number,
|
||
k2: number,
|
||
k3: number,
|
||
k4: number,
|
||
kernelMatrix: commaOrSpaceSeparated,
|
||
kernelUnitLength: null,
|
||
keyPoints: null,
|
||
// SEMI_COLON_SEPARATED
|
||
keySplines: null,
|
||
// SEMI_COLON_SEPARATED
|
||
keyTimes: null,
|
||
// SEMI_COLON_SEPARATED
|
||
kerning: null,
|
||
lang: null,
|
||
lengthAdjust: null,
|
||
letterSpacing: null,
|
||
lightingColor: null,
|
||
limitingConeAngle: number,
|
||
local: null,
|
||
markerEnd: null,
|
||
markerMid: null,
|
||
markerStart: null,
|
||
markerHeight: null,
|
||
markerUnits: null,
|
||
markerWidth: null,
|
||
mask: null,
|
||
maskContentUnits: null,
|
||
maskUnits: null,
|
||
mathematical: null,
|
||
max: null,
|
||
media: null,
|
||
mediaCharacterEncoding: null,
|
||
mediaContentEncodings: null,
|
||
mediaSize: number,
|
||
mediaTime: null,
|
||
method: null,
|
||
min: null,
|
||
mode: null,
|
||
name: null,
|
||
navDown: null,
|
||
navDownLeft: null,
|
||
navDownRight: null,
|
||
navLeft: null,
|
||
navNext: null,
|
||
navPrev: null,
|
||
navRight: null,
|
||
navUp: null,
|
||
navUpLeft: null,
|
||
navUpRight: null,
|
||
numOctaves: null,
|
||
observer: null,
|
||
offset: null,
|
||
onAbort: null,
|
||
onActivate: null,
|
||
onAfterPrint: null,
|
||
onBeforePrint: null,
|
||
onBegin: null,
|
||
onCancel: null,
|
||
onCanPlay: null,
|
||
onCanPlayThrough: null,
|
||
onChange: null,
|
||
onClick: null,
|
||
onClose: null,
|
||
onCopy: null,
|
||
onCueChange: null,
|
||
onCut: null,
|
||
onDblClick: null,
|
||
onDrag: null,
|
||
onDragEnd: null,
|
||
onDragEnter: null,
|
||
onDragExit: null,
|
||
onDragLeave: null,
|
||
onDragOver: null,
|
||
onDragStart: null,
|
||
onDrop: null,
|
||
onDurationChange: null,
|
||
onEmptied: null,
|
||
onEnd: null,
|
||
onEnded: null,
|
||
onError: null,
|
||
onFocus: null,
|
||
onFocusIn: null,
|
||
onFocusOut: null,
|
||
onHashChange: null,
|
||
onInput: null,
|
||
onInvalid: null,
|
||
onKeyDown: null,
|
||
onKeyPress: null,
|
||
onKeyUp: null,
|
||
onLoad: null,
|
||
onLoadedData: null,
|
||
onLoadedMetadata: null,
|
||
onLoadStart: null,
|
||
onMessage: null,
|
||
onMouseDown: null,
|
||
onMouseEnter: null,
|
||
onMouseLeave: null,
|
||
onMouseMove: null,
|
||
onMouseOut: null,
|
||
onMouseOver: null,
|
||
onMouseUp: null,
|
||
onMouseWheel: null,
|
||
onOffline: null,
|
||
onOnline: null,
|
||
onPageHide: null,
|
||
onPageShow: null,
|
||
onPaste: null,
|
||
onPause: null,
|
||
onPlay: null,
|
||
onPlaying: null,
|
||
onPopState: null,
|
||
onProgress: null,
|
||
onRateChange: null,
|
||
onRepeat: null,
|
||
onReset: null,
|
||
onResize: null,
|
||
onScroll: null,
|
||
onSeeked: null,
|
||
onSeeking: null,
|
||
onSelect: null,
|
||
onShow: null,
|
||
onStalled: null,
|
||
onStorage: null,
|
||
onSubmit: null,
|
||
onSuspend: null,
|
||
onTimeUpdate: null,
|
||
onToggle: null,
|
||
onUnload: null,
|
||
onVolumeChange: null,
|
||
onWaiting: null,
|
||
onZoom: null,
|
||
opacity: null,
|
||
operator: null,
|
||
order: null,
|
||
orient: null,
|
||
orientation: null,
|
||
origin: null,
|
||
overflow: null,
|
||
overlay: null,
|
||
overlinePosition: number,
|
||
overlineThickness: number,
|
||
paintOrder: null,
|
||
panose1: null,
|
||
path: null,
|
||
pathLength: number,
|
||
patternContentUnits: null,
|
||
patternTransform: null,
|
||
patternUnits: null,
|
||
phase: null,
|
||
ping: spaceSeparated,
|
||
pitch: null,
|
||
playbackOrder: null,
|
||
pointerEvents: null,
|
||
points: null,
|
||
pointsAtX: number,
|
||
pointsAtY: number,
|
||
pointsAtZ: number,
|
||
preserveAlpha: null,
|
||
preserveAspectRatio: null,
|
||
primitiveUnits: null,
|
||
propagate: null,
|
||
property: commaOrSpaceSeparated,
|
||
r: null,
|
||
radius: null,
|
||
referrerPolicy: null,
|
||
refX: null,
|
||
refY: null,
|
||
rel: commaOrSpaceSeparated,
|
||
rev: commaOrSpaceSeparated,
|
||
renderingIntent: null,
|
||
repeatCount: null,
|
||
repeatDur: null,
|
||
requiredExtensions: commaOrSpaceSeparated,
|
||
requiredFeatures: commaOrSpaceSeparated,
|
||
requiredFonts: commaOrSpaceSeparated,
|
||
requiredFormats: commaOrSpaceSeparated,
|
||
resource: null,
|
||
restart: null,
|
||
result: null,
|
||
rotate: null,
|
||
rx: null,
|
||
ry: null,
|
||
scale: null,
|
||
seed: null,
|
||
shapeRendering: null,
|
||
side: null,
|
||
slope: null,
|
||
snapshotTime: null,
|
||
specularConstant: number,
|
||
specularExponent: number,
|
||
spreadMethod: null,
|
||
spacing: null,
|
||
startOffset: null,
|
||
stdDeviation: null,
|
||
stemh: null,
|
||
stemv: null,
|
||
stitchTiles: null,
|
||
stopColor: null,
|
||
stopOpacity: null,
|
||
strikethroughPosition: number,
|
||
strikethroughThickness: number,
|
||
string: null,
|
||
stroke: null,
|
||
strokeDashArray: commaOrSpaceSeparated,
|
||
strokeDashOffset: null,
|
||
strokeLineCap: null,
|
||
strokeLineJoin: null,
|
||
strokeMiterLimit: number,
|
||
strokeOpacity: number,
|
||
strokeWidth: null,
|
||
style: null,
|
||
surfaceScale: number,
|
||
syncBehavior: null,
|
||
syncBehaviorDefault: null,
|
||
syncMaster: null,
|
||
syncTolerance: null,
|
||
syncToleranceDefault: null,
|
||
systemLanguage: commaOrSpaceSeparated,
|
||
tabIndex: number,
|
||
tableValues: null,
|
||
target: null,
|
||
targetX: number,
|
||
targetY: number,
|
||
textAnchor: null,
|
||
textDecoration: null,
|
||
textRendering: null,
|
||
textLength: null,
|
||
timelineBegin: null,
|
||
title: null,
|
||
transformBehavior: null,
|
||
type: null,
|
||
typeOf: commaOrSpaceSeparated,
|
||
to: null,
|
||
transform: null,
|
||
transformOrigin: null,
|
||
u1: null,
|
||
u2: null,
|
||
underlinePosition: number,
|
||
underlineThickness: number,
|
||
unicode: null,
|
||
unicodeBidi: null,
|
||
unicodeRange: null,
|
||
unitsPerEm: number,
|
||
values: null,
|
||
vAlphabetic: number,
|
||
vMathematical: number,
|
||
vectorEffect: null,
|
||
vHanging: number,
|
||
vIdeographic: number,
|
||
version: null,
|
||
vertAdvY: number,
|
||
vertOriginX: number,
|
||
vertOriginY: number,
|
||
viewBox: null,
|
||
viewTarget: null,
|
||
visibility: null,
|
||
width: null,
|
||
widths: null,
|
||
wordSpacing: null,
|
||
writingMode: null,
|
||
x: null,
|
||
x1: null,
|
||
x2: null,
|
||
xChannelSelector: null,
|
||
xHeight: number,
|
||
y: null,
|
||
y1: null,
|
||
y2: null,
|
||
yChannelSelector: null,
|
||
z: null,
|
||
zoomAndPan: null
|
||
}
|
||
});
|
||
|
||
// node_modules/property-information/lib/find.js
|
||
var valid = /^data[-\w.:]+$/i;
|
||
var dash = /-[a-z]/g;
|
||
var cap = /[A-Z]/g;
|
||
function find(schema, value) {
|
||
const normal = normalize(value);
|
||
let prop = value;
|
||
let Type = Info;
|
||
if (normal in schema.normal) {
|
||
return schema.property[schema.normal[normal]];
|
||
}
|
||
if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
|
||
if (value.charAt(4) === "-") {
|
||
const rest = value.slice(5).replace(dash, camelcase);
|
||
prop = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
|
||
} else {
|
||
const rest = value.slice(4);
|
||
if (!dash.test(rest)) {
|
||
let dashes = rest.replace(cap, kebab);
|
||
if (dashes.charAt(0) !== "-") {
|
||
dashes = "-" + dashes;
|
||
}
|
||
value = "data" + dashes;
|
||
}
|
||
}
|
||
Type = DefinedInfo;
|
||
}
|
||
return new Type(prop, value);
|
||
}
|
||
function kebab($0) {
|
||
return "-" + $0.toLowerCase();
|
||
}
|
||
function camelcase($0) {
|
||
return $0.charAt(1).toUpperCase();
|
||
}
|
||
|
||
// node_modules/property-information/index.js
|
||
var html2 = merge([xml, xlink, xmlns, aria, html], "html");
|
||
var svg2 = merge([xml, xlink, xmlns, aria, svg], "svg");
|
||
|
||
// node_modules/comma-separated-tokens/index.js
|
||
function parse(value) {
|
||
const tokens = [];
|
||
const input = String(value || "");
|
||
let index2 = input.indexOf(",");
|
||
let start = 0;
|
||
let end = false;
|
||
while (!end) {
|
||
if (index2 === -1) {
|
||
index2 = input.length;
|
||
end = true;
|
||
}
|
||
const token = input.slice(start, index2).trim();
|
||
if (token || !end) {
|
||
tokens.push(token);
|
||
}
|
||
start = index2 + 1;
|
||
index2 = input.indexOf(",", start);
|
||
}
|
||
return tokens;
|
||
}
|
||
function stringify(values, options) {
|
||
const settings = options || {};
|
||
const input = values[values.length - 1] === "" ? [...values, ""] : values;
|
||
return input.join(
|
||
(settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
|
||
).trim();
|
||
}
|
||
|
||
// node_modules/hast-util-parse-selector/lib/index.js
|
||
var search = /[#.]/g;
|
||
function parseSelector(selector, defaultTagName) {
|
||
const value = selector || "";
|
||
const props = {};
|
||
let start = 0;
|
||
let previous;
|
||
let tagName;
|
||
while (start < value.length) {
|
||
search.lastIndex = start;
|
||
const match = search.exec(value);
|
||
const subvalue = value.slice(start, match ? match.index : value.length);
|
||
if (subvalue) {
|
||
if (!previous) {
|
||
tagName = subvalue;
|
||
} else if (previous === "#") {
|
||
props.id = subvalue;
|
||
} else if (Array.isArray(props.className)) {
|
||
props.className.push(subvalue);
|
||
} else {
|
||
props.className = [subvalue];
|
||
}
|
||
start += subvalue.length;
|
||
}
|
||
if (match) {
|
||
previous = match[0];
|
||
start++;
|
||
}
|
||
}
|
||
return {
|
||
type: "element",
|
||
// @ts-expect-error: tag name is parsed.
|
||
tagName: tagName || defaultTagName || "div",
|
||
properties: props,
|
||
children: []
|
||
};
|
||
}
|
||
|
||
// node_modules/space-separated-tokens/index.js
|
||
function parse2(value) {
|
||
const input = String(value || "").trim();
|
||
return input ? input.split(/[ \t\n\r\f]+/g) : [];
|
||
}
|
||
function stringify2(values) {
|
||
return values.join(" ").trim();
|
||
}
|
||
|
||
// node_modules/hastscript/lib/create-h.js
|
||
var buttonTypes = /* @__PURE__ */ new Set(["button", "menu", "reset", "submit"]);
|
||
var own2 = {}.hasOwnProperty;
|
||
function createH(schema, defaultTagName, caseSensitive) {
|
||
const adjust = caseSensitive && createAdjustMap(caseSensitive);
|
||
function h2(selector, properties, ...children) {
|
||
let index2 = -1;
|
||
let node;
|
||
if (selector === void 0 || selector === null) {
|
||
node = { type: "root", children: [] };
|
||
const child = (
|
||
/** @type {Child} */
|
||
properties
|
||
);
|
||
children.unshift(child);
|
||
} else {
|
||
node = parseSelector(selector, defaultTagName);
|
||
node.tagName = node.tagName.toLowerCase();
|
||
if (adjust && own2.call(adjust, node.tagName)) {
|
||
node.tagName = adjust[node.tagName];
|
||
}
|
||
if (isProperties(properties, node.tagName)) {
|
||
let key2;
|
||
for (key2 in properties) {
|
||
if (own2.call(properties, key2)) {
|
||
addProperty(schema, node.properties, key2, properties[key2]);
|
||
}
|
||
}
|
||
} else {
|
||
children.unshift(properties);
|
||
}
|
||
}
|
||
while (++index2 < children.length) {
|
||
addChild(node.children, children[index2]);
|
||
}
|
||
if (node.type === "element" && node.tagName === "template") {
|
||
node.content = { type: "root", children: node.children };
|
||
node.children = [];
|
||
}
|
||
return node;
|
||
}
|
||
return h2;
|
||
}
|
||
function isProperties(value, name) {
|
||
if (value === null || value === void 0 || typeof value !== "object" || Array.isArray(value)) {
|
||
return false;
|
||
}
|
||
if (name === "input" || !value.type || typeof value.type !== "string") {
|
||
return true;
|
||
}
|
||
if ("children" in value && Array.isArray(value.children)) {
|
||
return false;
|
||
}
|
||
if (name === "button") {
|
||
return buttonTypes.has(value.type.toLowerCase());
|
||
}
|
||
return !("value" in value);
|
||
}
|
||
function addProperty(schema, properties, key2, value) {
|
||
const info = find(schema, key2);
|
||
let index2 = -1;
|
||
let result;
|
||
if (value === void 0 || value === null)
|
||
return;
|
||
if (typeof value === "number") {
|
||
if (Number.isNaN(value))
|
||
return;
|
||
result = value;
|
||
} else if (typeof value === "boolean") {
|
||
result = value;
|
||
} else if (typeof value === "string") {
|
||
if (info.spaceSeparated) {
|
||
result = parse2(value);
|
||
} else if (info.commaSeparated) {
|
||
result = parse(value);
|
||
} else if (info.commaOrSpaceSeparated) {
|
||
result = parse2(parse(value).join(" "));
|
||
} else {
|
||
result = parsePrimitive(info, info.property, value);
|
||
}
|
||
} else if (Array.isArray(value)) {
|
||
result = value.concat();
|
||
} else {
|
||
result = info.property === "style" ? style(value) : String(value);
|
||
}
|
||
if (Array.isArray(result)) {
|
||
const finalResult = [];
|
||
while (++index2 < result.length) {
|
||
const value2 = (
|
||
/** @type {number | string} */
|
||
parsePrimitive(info, info.property, result[index2])
|
||
);
|
||
finalResult[index2] = value2;
|
||
}
|
||
result = finalResult;
|
||
}
|
||
if (info.property === "className" && Array.isArray(properties.className)) {
|
||
const value2 = (
|
||
/** @type {number | string} */
|
||
result
|
||
);
|
||
result = properties.className.concat(value2);
|
||
}
|
||
properties[info.property] = result;
|
||
}
|
||
function addChild(nodes, value) {
|
||
let index2 = -1;
|
||
if (value === void 0 || value === null) {
|
||
} else if (typeof value === "string" || typeof value === "number") {
|
||
nodes.push({ type: "text", value: String(value) });
|
||
} else if (Array.isArray(value)) {
|
||
while (++index2 < value.length) {
|
||
addChild(nodes, value[index2]);
|
||
}
|
||
} else if (typeof value === "object" && "type" in value) {
|
||
if (value.type === "root") {
|
||
addChild(nodes, value.children);
|
||
} else {
|
||
nodes.push(value);
|
||
}
|
||
} else {
|
||
throw new Error("Expected node, nodes, or string, got `" + value + "`");
|
||
}
|
||
}
|
||
function parsePrimitive(info, name, value) {
|
||
if (typeof value === "string") {
|
||
if (info.number && value && !Number.isNaN(Number(value))) {
|
||
return Number(value);
|
||
}
|
||
if ((info.boolean || info.overloadedBoolean) && (value === "" || normalize(value) === normalize(name))) {
|
||
return true;
|
||
}
|
||
}
|
||
return value;
|
||
}
|
||
function style(value) {
|
||
const result = [];
|
||
let key2;
|
||
for (key2 in value) {
|
||
if (own2.call(value, key2)) {
|
||
result.push([key2, value[key2]].join(": "));
|
||
}
|
||
}
|
||
return result.join("; ");
|
||
}
|
||
function createAdjustMap(values) {
|
||
const result = {};
|
||
let index2 = -1;
|
||
while (++index2 < values.length) {
|
||
result[values[index2].toLowerCase()] = values[index2];
|
||
}
|
||
return result;
|
||
}
|
||
|
||
// node_modules/hastscript/lib/svg-case-sensitive-tag-names.js
|
||
var svgCaseSensitiveTagNames = [
|
||
"altGlyph",
|
||
"altGlyphDef",
|
||
"altGlyphItem",
|
||
"animateColor",
|
||
"animateMotion",
|
||
"animateTransform",
|
||
"clipPath",
|
||
"feBlend",
|
||
"feColorMatrix",
|
||
"feComponentTransfer",
|
||
"feComposite",
|
||
"feConvolveMatrix",
|
||
"feDiffuseLighting",
|
||
"feDisplacementMap",
|
||
"feDistantLight",
|
||
"feDropShadow",
|
||
"feFlood",
|
||
"feFuncA",
|
||
"feFuncB",
|
||
"feFuncG",
|
||
"feFuncR",
|
||
"feGaussianBlur",
|
||
"feImage",
|
||
"feMerge",
|
||
"feMergeNode",
|
||
"feMorphology",
|
||
"feOffset",
|
||
"fePointLight",
|
||
"feSpecularLighting",
|
||
"feSpotLight",
|
||
"feTile",
|
||
"feTurbulence",
|
||
"foreignObject",
|
||
"glyphRef",
|
||
"linearGradient",
|
||
"radialGradient",
|
||
"solidColor",
|
||
"textArea",
|
||
"textPath"
|
||
];
|
||
|
||
// node_modules/hastscript/lib/index.js
|
||
var h = createH(html2, "div");
|
||
var s = createH(svg2, "g", svgCaseSensitiveTagNames);
|
||
|
||
// node_modules/vfile-location/lib/index.js
|
||
function location(file) {
|
||
const value = String(file);
|
||
const indices = [];
|
||
return { toOffset, toPoint };
|
||
function toPoint(offset) {
|
||
if (typeof offset === "number" && offset > -1 && offset <= value.length) {
|
||
let index2 = 0;
|
||
while (true) {
|
||
let end = indices[index2];
|
||
if (end === void 0) {
|
||
const eol = next(value, indices[index2 - 1]);
|
||
end = eol === -1 ? value.length + 1 : eol + 1;
|
||
indices[index2] = end;
|
||
}
|
||
if (end > offset) {
|
||
return {
|
||
line: index2 + 1,
|
||
column: offset - (index2 > 0 ? indices[index2 - 1] : 0) + 1,
|
||
offset
|
||
};
|
||
}
|
||
index2++;
|
||
}
|
||
}
|
||
}
|
||
function toOffset(point3) {
|
||
if (point3 && typeof point3.line === "number" && typeof point3.column === "number" && !Number.isNaN(point3.line) && !Number.isNaN(point3.column)) {
|
||
while (indices.length < point3.line) {
|
||
const from = indices[indices.length - 1];
|
||
const eol = next(value, from);
|
||
const end = eol === -1 ? value.length + 1 : eol + 1;
|
||
if (from === end)
|
||
break;
|
||
indices.push(end);
|
||
}
|
||
const offset = (point3.line > 1 ? indices[point3.line - 2] : 0) + point3.column - 1;
|
||
if (offset < indices[point3.line - 1])
|
||
return offset;
|
||
}
|
||
}
|
||
}
|
||
function next(value, from) {
|
||
const cr = value.indexOf("\r", from);
|
||
const lf = value.indexOf("\n", from);
|
||
if (lf === -1)
|
||
return cr;
|
||
if (cr === -1 || cr + 1 === lf)
|
||
return lf;
|
||
return cr < lf ? cr : lf;
|
||
}
|
||
|
||
// node_modules/web-namespaces/index.js
|
||
var webNamespaces = {
|
||
html: "http://www.w3.org/1999/xhtml",
|
||
mathml: "http://www.w3.org/1998/Math/MathML",
|
||
svg: "http://www.w3.org/2000/svg",
|
||
xlink: "http://www.w3.org/1999/xlink",
|
||
xml: "http://www.w3.org/XML/1998/namespace",
|
||
xmlns: "http://www.w3.org/2000/xmlns/"
|
||
};
|
||
|
||
// node_modules/hast-util-from-parse5/lib/index.js
|
||
var own3 = {}.hasOwnProperty;
|
||
var proto = Object.prototype;
|
||
function fromParse5(tree, options) {
|
||
const settings = options || {};
|
||
return one(
|
||
{
|
||
file: settings.file || void 0,
|
||
location: false,
|
||
schema: settings.space === "svg" ? svg2 : html2,
|
||
verbose: settings.verbose || false
|
||
},
|
||
tree
|
||
);
|
||
}
|
||
function one(state, node) {
|
||
let result;
|
||
switch (node.nodeName) {
|
||
case "#comment": {
|
||
const reference = (
|
||
/** @type {P5Comment} */
|
||
node
|
||
);
|
||
result = { type: "comment", value: reference.data };
|
||
patch(state, reference, result);
|
||
return result;
|
||
}
|
||
case "#document":
|
||
case "#document-fragment": {
|
||
const reference = (
|
||
/** @type {P5Document | P5DocumentFragment} */
|
||
node
|
||
);
|
||
const quirksMode = "mode" in reference ? reference.mode === "quirks" || reference.mode === "limited-quirks" : false;
|
||
result = {
|
||
type: "root",
|
||
children: all(state, node.childNodes),
|
||
data: { quirksMode }
|
||
};
|
||
if (state.file && state.location) {
|
||
const doc = String(state.file);
|
||
const loc = location(doc);
|
||
const start = loc.toPoint(0);
|
||
const end = loc.toPoint(doc.length);
|
||
ok2(start, "expected `start`");
|
||
ok2(end, "expected `end`");
|
||
result.position = { start, end };
|
||
}
|
||
return result;
|
||
}
|
||
case "#documentType": {
|
||
const reference = (
|
||
/** @type {P5DocumentType} */
|
||
node
|
||
);
|
||
result = { type: "doctype" };
|
||
patch(state, reference, result);
|
||
return result;
|
||
}
|
||
case "#text": {
|
||
const reference = (
|
||
/** @type {P5Text} */
|
||
node
|
||
);
|
||
result = { type: "text", value: reference.value };
|
||
patch(state, reference, result);
|
||
return result;
|
||
}
|
||
default: {
|
||
const reference = (
|
||
/** @type {P5Element} */
|
||
node
|
||
);
|
||
result = element(state, reference);
|
||
return result;
|
||
}
|
||
}
|
||
}
|
||
function all(state, nodes) {
|
||
let index2 = -1;
|
||
const results = [];
|
||
while (++index2 < nodes.length) {
|
||
const result = (
|
||
/** @type {RootContent} */
|
||
one(state, nodes[index2])
|
||
);
|
||
results.push(result);
|
||
}
|
||
return results;
|
||
}
|
||
function element(state, node) {
|
||
const schema = state.schema;
|
||
state.schema = node.namespaceURI === webNamespaces.svg ? svg2 : html2;
|
||
let index2 = -1;
|
||
const props = {};
|
||
while (++index2 < node.attrs.length) {
|
||
const attribute = node.attrs[index2];
|
||
const name = (attribute.prefix ? attribute.prefix + ":" : "") + attribute.name;
|
||
if (!own3.call(proto, name)) {
|
||
props[name] = attribute.value;
|
||
}
|
||
}
|
||
const fn = state.schema.space === "svg" ? s : h;
|
||
const result = fn(node.tagName, props, all(state, node.childNodes));
|
||
patch(state, node, result);
|
||
if (result.tagName === "template") {
|
||
const reference = (
|
||
/** @type {P5Template} */
|
||
node
|
||
);
|
||
const pos = reference.sourceCodeLocation;
|
||
const startTag = pos && pos.startTag && position(pos.startTag);
|
||
const endTag = pos && pos.endTag && position(pos.endTag);
|
||
const content = (
|
||
/** @type {Root} */
|
||
one(state, reference.content)
|
||
);
|
||
if (startTag && endTag && state.file) {
|
||
content.position = { start: startTag.end, end: endTag.start };
|
||
}
|
||
result.content = content;
|
||
}
|
||
state.schema = schema;
|
||
return result;
|
||
}
|
||
function patch(state, from, to) {
|
||
if ("sourceCodeLocation" in from && from.sourceCodeLocation && state.file) {
|
||
const position3 = createLocation(state, to, from.sourceCodeLocation);
|
||
if (position3) {
|
||
state.location = true;
|
||
to.position = position3;
|
||
}
|
||
}
|
||
}
|
||
function createLocation(state, node, location2) {
|
||
const result = position(location2);
|
||
if (node.type === "element") {
|
||
const tail = node.children[node.children.length - 1];
|
||
if (result && !location2.endTag && tail && tail.position && tail.position.end) {
|
||
result.end = Object.assign({}, tail.position.end);
|
||
}
|
||
if (state.verbose) {
|
||
const props = {};
|
||
let key2;
|
||
if (location2.attrs) {
|
||
for (key2 in location2.attrs) {
|
||
if (own3.call(location2.attrs, key2)) {
|
||
props[find(state.schema, key2).property] = position(
|
||
location2.attrs[key2]
|
||
);
|
||
}
|
||
}
|
||
}
|
||
ok2(location2.startTag, "a start tag should exist");
|
||
const opening2 = position(location2.startTag);
|
||
const closing2 = location2.endTag ? position(location2.endTag) : void 0;
|
||
const data = { opening: opening2 };
|
||
if (closing2)
|
||
data.closing = closing2;
|
||
data.properties = props;
|
||
node.data = { position: data };
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function position(loc) {
|
||
const start = point({
|
||
line: loc.startLine,
|
||
column: loc.startCol,
|
||
offset: loc.startOffset
|
||
});
|
||
const end = point({
|
||
line: loc.endLine,
|
||
column: loc.endCol,
|
||
offset: loc.endOffset
|
||
});
|
||
return start || end ? { start, end } : void 0;
|
||
}
|
||
function point(point3) {
|
||
return point3.line && point3.column ? point3 : void 0;
|
||
}
|
||
|
||
// node_modules/parse5/dist/common/unicode.js
|
||
var UNDEFINED_CODE_POINTS = /* @__PURE__ */ new Set([
|
||
65534,
|
||
65535,
|
||
131070,
|
||
131071,
|
||
196606,
|
||
196607,
|
||
262142,
|
||
262143,
|
||
327678,
|
||
327679,
|
||
393214,
|
||
393215,
|
||
458750,
|
||
458751,
|
||
524286,
|
||
524287,
|
||
589822,
|
||
589823,
|
||
655358,
|
||
655359,
|
||
720894,
|
||
720895,
|
||
786430,
|
||
786431,
|
||
851966,
|
||
851967,
|
||
917502,
|
||
917503,
|
||
983038,
|
||
983039,
|
||
1048574,
|
||
1048575,
|
||
1114110,
|
||
1114111
|
||
]);
|
||
var REPLACEMENT_CHARACTER = "\uFFFD";
|
||
var CODE_POINTS;
|
||
(function(CODE_POINTS2) {
|
||
CODE_POINTS2[CODE_POINTS2["EOF"] = -1] = "EOF";
|
||
CODE_POINTS2[CODE_POINTS2["NULL"] = 0] = "NULL";
|
||
CODE_POINTS2[CODE_POINTS2["TABULATION"] = 9] = "TABULATION";
|
||
CODE_POINTS2[CODE_POINTS2["CARRIAGE_RETURN"] = 13] = "CARRIAGE_RETURN";
|
||
CODE_POINTS2[CODE_POINTS2["LINE_FEED"] = 10] = "LINE_FEED";
|
||
CODE_POINTS2[CODE_POINTS2["FORM_FEED"] = 12] = "FORM_FEED";
|
||
CODE_POINTS2[CODE_POINTS2["SPACE"] = 32] = "SPACE";
|
||
CODE_POINTS2[CODE_POINTS2["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK";
|
||
CODE_POINTS2[CODE_POINTS2["QUOTATION_MARK"] = 34] = "QUOTATION_MARK";
|
||
CODE_POINTS2[CODE_POINTS2["NUMBER_SIGN"] = 35] = "NUMBER_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["AMPERSAND"] = 38] = "AMPERSAND";
|
||
CODE_POINTS2[CODE_POINTS2["APOSTROPHE"] = 39] = "APOSTROPHE";
|
||
CODE_POINTS2[CODE_POINTS2["HYPHEN_MINUS"] = 45] = "HYPHEN_MINUS";
|
||
CODE_POINTS2[CODE_POINTS2["SOLIDUS"] = 47] = "SOLIDUS";
|
||
CODE_POINTS2[CODE_POINTS2["DIGIT_0"] = 48] = "DIGIT_0";
|
||
CODE_POINTS2[CODE_POINTS2["DIGIT_9"] = 57] = "DIGIT_9";
|
||
CODE_POINTS2[CODE_POINTS2["SEMICOLON"] = 59] = "SEMICOLON";
|
||
CODE_POINTS2[CODE_POINTS2["LESS_THAN_SIGN"] = 60] = "LESS_THAN_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["EQUALS_SIGN"] = 61] = "EQUALS_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["GREATER_THAN_SIGN"] = 62] = "GREATER_THAN_SIGN";
|
||
CODE_POINTS2[CODE_POINTS2["QUESTION_MARK"] = 63] = "QUESTION_MARK";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_A"] = 65] = "LATIN_CAPITAL_A";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_F"] = 70] = "LATIN_CAPITAL_F";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_X"] = 88] = "LATIN_CAPITAL_X";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_CAPITAL_Z"] = 90] = "LATIN_CAPITAL_Z";
|
||
CODE_POINTS2[CODE_POINTS2["RIGHT_SQUARE_BRACKET"] = 93] = "RIGHT_SQUARE_BRACKET";
|
||
CODE_POINTS2[CODE_POINTS2["GRAVE_ACCENT"] = 96] = "GRAVE_ACCENT";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_A"] = 97] = "LATIN_SMALL_A";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_F"] = 102] = "LATIN_SMALL_F";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_X"] = 120] = "LATIN_SMALL_X";
|
||
CODE_POINTS2[CODE_POINTS2["LATIN_SMALL_Z"] = 122] = "LATIN_SMALL_Z";
|
||
CODE_POINTS2[CODE_POINTS2["REPLACEMENT_CHARACTER"] = 65533] = "REPLACEMENT_CHARACTER";
|
||
})(CODE_POINTS = CODE_POINTS || (CODE_POINTS = {}));
|
||
var SEQUENCES = {
|
||
DASH_DASH: "--",
|
||
CDATA_START: "[CDATA[",
|
||
DOCTYPE: "doctype",
|
||
SCRIPT: "script",
|
||
PUBLIC: "public",
|
||
SYSTEM: "system"
|
||
};
|
||
function isSurrogate(cp) {
|
||
return cp >= 55296 && cp <= 57343;
|
||
}
|
||
function isSurrogatePair(cp) {
|
||
return cp >= 56320 && cp <= 57343;
|
||
}
|
||
function getSurrogatePairCodePoint(cp1, cp2) {
|
||
return (cp1 - 55296) * 1024 + 9216 + cp2;
|
||
}
|
||
function isControlCodePoint(cp) {
|
||
return cp !== 32 && cp !== 10 && cp !== 13 && cp !== 9 && cp !== 12 && cp >= 1 && cp <= 31 || cp >= 127 && cp <= 159;
|
||
}
|
||
function isUndefinedCodePoint(cp) {
|
||
return cp >= 64976 && cp <= 65007 || UNDEFINED_CODE_POINTS.has(cp);
|
||
}
|
||
|
||
// node_modules/parse5/dist/common/error-codes.js
|
||
var ERR;
|
||
(function(ERR2) {
|
||
ERR2["controlCharacterInInputStream"] = "control-character-in-input-stream";
|
||
ERR2["noncharacterInInputStream"] = "noncharacter-in-input-stream";
|
||
ERR2["surrogateInInputStream"] = "surrogate-in-input-stream";
|
||
ERR2["nonVoidHtmlElementStartTagWithTrailingSolidus"] = "non-void-html-element-start-tag-with-trailing-solidus";
|
||
ERR2["endTagWithAttributes"] = "end-tag-with-attributes";
|
||
ERR2["endTagWithTrailingSolidus"] = "end-tag-with-trailing-solidus";
|
||
ERR2["unexpectedSolidusInTag"] = "unexpected-solidus-in-tag";
|
||
ERR2["unexpectedNullCharacter"] = "unexpected-null-character";
|
||
ERR2["unexpectedQuestionMarkInsteadOfTagName"] = "unexpected-question-mark-instead-of-tag-name";
|
||
ERR2["invalidFirstCharacterOfTagName"] = "invalid-first-character-of-tag-name";
|
||
ERR2["unexpectedEqualsSignBeforeAttributeName"] = "unexpected-equals-sign-before-attribute-name";
|
||
ERR2["missingEndTagName"] = "missing-end-tag-name";
|
||
ERR2["unexpectedCharacterInAttributeName"] = "unexpected-character-in-attribute-name";
|
||
ERR2["unknownNamedCharacterReference"] = "unknown-named-character-reference";
|
||
ERR2["missingSemicolonAfterCharacterReference"] = "missing-semicolon-after-character-reference";
|
||
ERR2["unexpectedCharacterAfterDoctypeSystemIdentifier"] = "unexpected-character-after-doctype-system-identifier";
|
||
ERR2["unexpectedCharacterInUnquotedAttributeValue"] = "unexpected-character-in-unquoted-attribute-value";
|
||
ERR2["eofBeforeTagName"] = "eof-before-tag-name";
|
||
ERR2["eofInTag"] = "eof-in-tag";
|
||
ERR2["missingAttributeValue"] = "missing-attribute-value";
|
||
ERR2["missingWhitespaceBetweenAttributes"] = "missing-whitespace-between-attributes";
|
||
ERR2["missingWhitespaceAfterDoctypePublicKeyword"] = "missing-whitespace-after-doctype-public-keyword";
|
||
ERR2["missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers"] = "missing-whitespace-between-doctype-public-and-system-identifiers";
|
||
ERR2["missingWhitespaceAfterDoctypeSystemKeyword"] = "missing-whitespace-after-doctype-system-keyword";
|
||
ERR2["missingQuoteBeforeDoctypePublicIdentifier"] = "missing-quote-before-doctype-public-identifier";
|
||
ERR2["missingQuoteBeforeDoctypeSystemIdentifier"] = "missing-quote-before-doctype-system-identifier";
|
||
ERR2["missingDoctypePublicIdentifier"] = "missing-doctype-public-identifier";
|
||
ERR2["missingDoctypeSystemIdentifier"] = "missing-doctype-system-identifier";
|
||
ERR2["abruptDoctypePublicIdentifier"] = "abrupt-doctype-public-identifier";
|
||
ERR2["abruptDoctypeSystemIdentifier"] = "abrupt-doctype-system-identifier";
|
||
ERR2["cdataInHtmlContent"] = "cdata-in-html-content";
|
||
ERR2["incorrectlyOpenedComment"] = "incorrectly-opened-comment";
|
||
ERR2["eofInScriptHtmlCommentLikeText"] = "eof-in-script-html-comment-like-text";
|
||
ERR2["eofInDoctype"] = "eof-in-doctype";
|
||
ERR2["nestedComment"] = "nested-comment";
|
||
ERR2["abruptClosingOfEmptyComment"] = "abrupt-closing-of-empty-comment";
|
||
ERR2["eofInComment"] = "eof-in-comment";
|
||
ERR2["incorrectlyClosedComment"] = "incorrectly-closed-comment";
|
||
ERR2["eofInCdata"] = "eof-in-cdata";
|
||
ERR2["absenceOfDigitsInNumericCharacterReference"] = "absence-of-digits-in-numeric-character-reference";
|
||
ERR2["nullCharacterReference"] = "null-character-reference";
|
||
ERR2["surrogateCharacterReference"] = "surrogate-character-reference";
|
||
ERR2["characterReferenceOutsideUnicodeRange"] = "character-reference-outside-unicode-range";
|
||
ERR2["controlCharacterReference"] = "control-character-reference";
|
||
ERR2["noncharacterCharacterReference"] = "noncharacter-character-reference";
|
||
ERR2["missingWhitespaceBeforeDoctypeName"] = "missing-whitespace-before-doctype-name";
|
||
ERR2["missingDoctypeName"] = "missing-doctype-name";
|
||
ERR2["invalidCharacterSequenceAfterDoctypeName"] = "invalid-character-sequence-after-doctype-name";
|
||
ERR2["duplicateAttribute"] = "duplicate-attribute";
|
||
ERR2["nonConformingDoctype"] = "non-conforming-doctype";
|
||
ERR2["missingDoctype"] = "missing-doctype";
|
||
ERR2["misplacedDoctype"] = "misplaced-doctype";
|
||
ERR2["endTagWithoutMatchingOpenElement"] = "end-tag-without-matching-open-element";
|
||
ERR2["closingOfElementWithOpenChildElements"] = "closing-of-element-with-open-child-elements";
|
||
ERR2["disallowedContentInNoscriptInHead"] = "disallowed-content-in-noscript-in-head";
|
||
ERR2["openElementsLeftAfterEof"] = "open-elements-left-after-eof";
|
||
ERR2["abandonedHeadElementChild"] = "abandoned-head-element-child";
|
||
ERR2["misplacedStartTagForHeadElement"] = "misplaced-start-tag-for-head-element";
|
||
ERR2["nestedNoscriptInHead"] = "nested-noscript-in-head";
|
||
ERR2["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text";
|
||
})(ERR = ERR || (ERR = {}));
|
||
|
||
// node_modules/parse5/dist/tokenizer/preprocessor.js
|
||
var DEFAULT_BUFFER_WATERLINE = 1 << 16;
|
||
var Preprocessor = class {
|
||
constructor(handler) {
|
||
this.handler = handler;
|
||
this.html = "";
|
||
this.pos = -1;
|
||
this.lastGapPos = -2;
|
||
this.gapStack = [];
|
||
this.skipNextNewLine = false;
|
||
this.lastChunkWritten = false;
|
||
this.endOfChunkHit = false;
|
||
this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;
|
||
this.isEol = false;
|
||
this.lineStartPos = 0;
|
||
this.droppedBufferSize = 0;
|
||
this.line = 1;
|
||
this.lastErrOffset = -1;
|
||
}
|
||
/** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */
|
||
get col() {
|
||
return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);
|
||
}
|
||
get offset() {
|
||
return this.droppedBufferSize + this.pos;
|
||
}
|
||
getError(code) {
|
||
const { line, col, offset } = this;
|
||
return {
|
||
code,
|
||
startLine: line,
|
||
endLine: line,
|
||
startCol: col,
|
||
endCol: col,
|
||
startOffset: offset,
|
||
endOffset: offset
|
||
};
|
||
}
|
||
_err(code) {
|
||
if (this.handler.onParseError && this.lastErrOffset !== this.offset) {
|
||
this.lastErrOffset = this.offset;
|
||
this.handler.onParseError(this.getError(code));
|
||
}
|
||
}
|
||
_addGap() {
|
||
this.gapStack.push(this.lastGapPos);
|
||
this.lastGapPos = this.pos;
|
||
}
|
||
_processSurrogate(cp) {
|
||
if (this.pos !== this.html.length - 1) {
|
||
const nextCp = this.html.charCodeAt(this.pos + 1);
|
||
if (isSurrogatePair(nextCp)) {
|
||
this.pos++;
|
||
this._addGap();
|
||
return getSurrogatePairCodePoint(cp, nextCp);
|
||
}
|
||
} else if (!this.lastChunkWritten) {
|
||
this.endOfChunkHit = true;
|
||
return CODE_POINTS.EOF;
|
||
}
|
||
this._err(ERR.surrogateInInputStream);
|
||
return cp;
|
||
}
|
||
willDropParsedChunk() {
|
||
return this.pos > this.bufferWaterline;
|
||
}
|
||
dropParsedChunk() {
|
||
if (this.willDropParsedChunk()) {
|
||
this.html = this.html.substring(this.pos);
|
||
this.lineStartPos -= this.pos;
|
||
this.droppedBufferSize += this.pos;
|
||
this.pos = 0;
|
||
this.lastGapPos = -2;
|
||
this.gapStack.length = 0;
|
||
}
|
||
}
|
||
write(chunk, isLastChunk) {
|
||
if (this.html.length > 0) {
|
||
this.html += chunk;
|
||
} else {
|
||
this.html = chunk;
|
||
}
|
||
this.endOfChunkHit = false;
|
||
this.lastChunkWritten = isLastChunk;
|
||
}
|
||
insertHtmlAtCurrentPos(chunk) {
|
||
this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);
|
||
this.endOfChunkHit = false;
|
||
}
|
||
startsWith(pattern, caseSensitive) {
|
||
if (this.pos + pattern.length > this.html.length) {
|
||
this.endOfChunkHit = !this.lastChunkWritten;
|
||
return false;
|
||
}
|
||
if (caseSensitive) {
|
||
return this.html.startsWith(pattern, this.pos);
|
||
}
|
||
for (let i = 0; i < pattern.length; i++) {
|
||
const cp = this.html.charCodeAt(this.pos + i) | 32;
|
||
if (cp !== pattern.charCodeAt(i)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
peek(offset) {
|
||
const pos = this.pos + offset;
|
||
if (pos >= this.html.length) {
|
||
this.endOfChunkHit = !this.lastChunkWritten;
|
||
return CODE_POINTS.EOF;
|
||
}
|
||
const code = this.html.charCodeAt(pos);
|
||
return code === CODE_POINTS.CARRIAGE_RETURN ? CODE_POINTS.LINE_FEED : code;
|
||
}
|
||
advance() {
|
||
this.pos++;
|
||
if (this.isEol) {
|
||
this.isEol = false;
|
||
this.line++;
|
||
this.lineStartPos = this.pos;
|
||
}
|
||
if (this.pos >= this.html.length) {
|
||
this.endOfChunkHit = !this.lastChunkWritten;
|
||
return CODE_POINTS.EOF;
|
||
}
|
||
let cp = this.html.charCodeAt(this.pos);
|
||
if (cp === CODE_POINTS.CARRIAGE_RETURN) {
|
||
this.isEol = true;
|
||
this.skipNextNewLine = true;
|
||
return CODE_POINTS.LINE_FEED;
|
||
}
|
||
if (cp === CODE_POINTS.LINE_FEED) {
|
||
this.isEol = true;
|
||
if (this.skipNextNewLine) {
|
||
this.line--;
|
||
this.skipNextNewLine = false;
|
||
this._addGap();
|
||
return this.advance();
|
||
}
|
||
}
|
||
this.skipNextNewLine = false;
|
||
if (isSurrogate(cp)) {
|
||
cp = this._processSurrogate(cp);
|
||
}
|
||
const isCommonValidRange = this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976;
|
||
if (!isCommonValidRange) {
|
||
this._checkForProblematicCharacters(cp);
|
||
}
|
||
return cp;
|
||
}
|
||
_checkForProblematicCharacters(cp) {
|
||
if (isControlCodePoint(cp)) {
|
||
this._err(ERR.controlCharacterInInputStream);
|
||
} else if (isUndefinedCodePoint(cp)) {
|
||
this._err(ERR.noncharacterInInputStream);
|
||
}
|
||
}
|
||
retreat(count) {
|
||
this.pos -= count;
|
||
while (this.pos < this.lastGapPos) {
|
||
this.lastGapPos = this.gapStack.pop();
|
||
this.pos--;
|
||
}
|
||
this.isEol = false;
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/common/token.js
|
||
var token_exports = {};
|
||
__export(token_exports, {
|
||
TokenType: () => TokenType,
|
||
getTokenAttr: () => getTokenAttr
|
||
});
|
||
var TokenType;
|
||
(function(TokenType2) {
|
||
TokenType2[TokenType2["CHARACTER"] = 0] = "CHARACTER";
|
||
TokenType2[TokenType2["NULL_CHARACTER"] = 1] = "NULL_CHARACTER";
|
||
TokenType2[TokenType2["WHITESPACE_CHARACTER"] = 2] = "WHITESPACE_CHARACTER";
|
||
TokenType2[TokenType2["START_TAG"] = 3] = "START_TAG";
|
||
TokenType2[TokenType2["END_TAG"] = 4] = "END_TAG";
|
||
TokenType2[TokenType2["COMMENT"] = 5] = "COMMENT";
|
||
TokenType2[TokenType2["DOCTYPE"] = 6] = "DOCTYPE";
|
||
TokenType2[TokenType2["EOF"] = 7] = "EOF";
|
||
TokenType2[TokenType2["HIBERNATION"] = 8] = "HIBERNATION";
|
||
})(TokenType = TokenType || (TokenType = {}));
|
||
function getTokenAttr(token, attrName) {
|
||
for (let i = token.attrs.length - 1; i >= 0; i--) {
|
||
if (token.attrs[i].name === attrName) {
|
||
return token.attrs[i].value;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
// node_modules/entities/lib/esm/generated/decode-data-html.js
|
||
var decode_data_html_default = new Uint16Array(
|
||
// prettier-ignore
|
||
'\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map((c) => c.charCodeAt(0))
|
||
);
|
||
|
||
// node_modules/entities/lib/esm/generated/decode-data-xml.js
|
||
var decode_data_xml_default = new Uint16Array(
|
||
// prettier-ignore
|
||
"\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map((c) => c.charCodeAt(0))
|
||
);
|
||
|
||
// node_modules/entities/lib/esm/decode_codepoint.js
|
||
var _a;
|
||
var decodeMap = /* @__PURE__ */ new Map([
|
||
[0, 65533],
|
||
// C1 Unicode control character reference replacements
|
||
[128, 8364],
|
||
[130, 8218],
|
||
[131, 402],
|
||
[132, 8222],
|
||
[133, 8230],
|
||
[134, 8224],
|
||
[135, 8225],
|
||
[136, 710],
|
||
[137, 8240],
|
||
[138, 352],
|
||
[139, 8249],
|
||
[140, 338],
|
||
[142, 381],
|
||
[145, 8216],
|
||
[146, 8217],
|
||
[147, 8220],
|
||
[148, 8221],
|
||
[149, 8226],
|
||
[150, 8211],
|
||
[151, 8212],
|
||
[152, 732],
|
||
[153, 8482],
|
||
[154, 353],
|
||
[155, 8250],
|
||
[156, 339],
|
||
[158, 382],
|
||
[159, 376]
|
||
]);
|
||
var fromCodePoint = (
|
||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
|
||
(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function(codePoint) {
|
||
let output = "";
|
||
if (codePoint > 65535) {
|
||
codePoint -= 65536;
|
||
output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
|
||
codePoint = 56320 | codePoint & 1023;
|
||
}
|
||
output += String.fromCharCode(codePoint);
|
||
return output;
|
||
}
|
||
);
|
||
function replaceCodePoint(codePoint) {
|
||
var _a2;
|
||
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
|
||
return 65533;
|
||
}
|
||
return (_a2 = decodeMap.get(codePoint)) !== null && _a2 !== void 0 ? _a2 : codePoint;
|
||
}
|
||
|
||
// node_modules/entities/lib/esm/decode.js
|
||
var CharCodes;
|
||
(function(CharCodes2) {
|
||
CharCodes2[CharCodes2["NUM"] = 35] = "NUM";
|
||
CharCodes2[CharCodes2["SEMI"] = 59] = "SEMI";
|
||
CharCodes2[CharCodes2["EQUALS"] = 61] = "EQUALS";
|
||
CharCodes2[CharCodes2["ZERO"] = 48] = "ZERO";
|
||
CharCodes2[CharCodes2["NINE"] = 57] = "NINE";
|
||
CharCodes2[CharCodes2["LOWER_A"] = 97] = "LOWER_A";
|
||
CharCodes2[CharCodes2["LOWER_F"] = 102] = "LOWER_F";
|
||
CharCodes2[CharCodes2["LOWER_X"] = 120] = "LOWER_X";
|
||
CharCodes2[CharCodes2["LOWER_Z"] = 122] = "LOWER_Z";
|
||
CharCodes2[CharCodes2["UPPER_A"] = 65] = "UPPER_A";
|
||
CharCodes2[CharCodes2["UPPER_F"] = 70] = "UPPER_F";
|
||
CharCodes2[CharCodes2["UPPER_Z"] = 90] = "UPPER_Z";
|
||
})(CharCodes || (CharCodes = {}));
|
||
var TO_LOWER_BIT = 32;
|
||
var BinTrieFlags;
|
||
(function(BinTrieFlags2) {
|
||
BinTrieFlags2[BinTrieFlags2["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
|
||
BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
|
||
BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
|
||
})(BinTrieFlags || (BinTrieFlags = {}));
|
||
function isNumber(code) {
|
||
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
|
||
}
|
||
function isHexadecimalCharacter(code) {
|
||
return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
|
||
}
|
||
function isAsciiAlphaNumeric(code) {
|
||
return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code);
|
||
}
|
||
function isEntityInAttributeInvalidEnd(code) {
|
||
return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
|
||
}
|
||
var EntityDecoderState;
|
||
(function(EntityDecoderState2) {
|
||
EntityDecoderState2[EntityDecoderState2["EntityStart"] = 0] = "EntityStart";
|
||
EntityDecoderState2[EntityDecoderState2["NumericStart"] = 1] = "NumericStart";
|
||
EntityDecoderState2[EntityDecoderState2["NumericDecimal"] = 2] = "NumericDecimal";
|
||
EntityDecoderState2[EntityDecoderState2["NumericHex"] = 3] = "NumericHex";
|
||
EntityDecoderState2[EntityDecoderState2["NamedEntity"] = 4] = "NamedEntity";
|
||
})(EntityDecoderState || (EntityDecoderState = {}));
|
||
var DecodingMode;
|
||
(function(DecodingMode2) {
|
||
DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy";
|
||
DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict";
|
||
DecodingMode2[DecodingMode2["Attribute"] = 2] = "Attribute";
|
||
})(DecodingMode || (DecodingMode = {}));
|
||
var EntityDecoder = class {
|
||
constructor(decodeTree, emitCodePoint, errors2) {
|
||
this.decodeTree = decodeTree;
|
||
this.emitCodePoint = emitCodePoint;
|
||
this.errors = errors2;
|
||
this.state = EntityDecoderState.EntityStart;
|
||
this.consumed = 1;
|
||
this.result = 0;
|
||
this.treeIndex = 0;
|
||
this.excess = 1;
|
||
this.decodeMode = DecodingMode.Strict;
|
||
}
|
||
/** Resets the instance to make it reusable. */
|
||
startEntity(decodeMode) {
|
||
this.decodeMode = decodeMode;
|
||
this.state = EntityDecoderState.EntityStart;
|
||
this.result = 0;
|
||
this.treeIndex = 0;
|
||
this.excess = 1;
|
||
this.consumed = 1;
|
||
}
|
||
/**
|
||
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
||
* If the entity is incomplete, the decoder will return -1.
|
||
*
|
||
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
||
* entity is incomplete, and resume when the next string is written.
|
||
*
|
||
* @param string The string containing the entity (or a continuation of the entity).
|
||
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
||
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
||
*/
|
||
write(str, offset) {
|
||
switch (this.state) {
|
||
case EntityDecoderState.EntityStart: {
|
||
if (str.charCodeAt(offset) === CharCodes.NUM) {
|
||
this.state = EntityDecoderState.NumericStart;
|
||
this.consumed += 1;
|
||
return this.stateNumericStart(str, offset + 1);
|
||
}
|
||
this.state = EntityDecoderState.NamedEntity;
|
||
return this.stateNamedEntity(str, offset);
|
||
}
|
||
case EntityDecoderState.NumericStart: {
|
||
return this.stateNumericStart(str, offset);
|
||
}
|
||
case EntityDecoderState.NumericDecimal: {
|
||
return this.stateNumericDecimal(str, offset);
|
||
}
|
||
case EntityDecoderState.NumericHex: {
|
||
return this.stateNumericHex(str, offset);
|
||
}
|
||
case EntityDecoderState.NamedEntity: {
|
||
return this.stateNamedEntity(str, offset);
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Switches between the numeric decimal and hexadecimal states.
|
||
*
|
||
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
||
*
|
||
* @param str The string containing the entity (or a continuation of the entity).
|
||
* @param offset The current offset.
|
||
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
||
*/
|
||
stateNumericStart(str, offset) {
|
||
if (offset >= str.length) {
|
||
return -1;
|
||
}
|
||
if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
|
||
this.state = EntityDecoderState.NumericHex;
|
||
this.consumed += 1;
|
||
return this.stateNumericHex(str, offset + 1);
|
||
}
|
||
this.state = EntityDecoderState.NumericDecimal;
|
||
return this.stateNumericDecimal(str, offset);
|
||
}
|
||
addToNumericResult(str, start, end, base2) {
|
||
if (start !== end) {
|
||
const digitCount = end - start;
|
||
this.result = this.result * Math.pow(base2, digitCount) + parseInt(str.substr(start, digitCount), base2);
|
||
this.consumed += digitCount;
|
||
}
|
||
}
|
||
/**
|
||
* Parses a hexadecimal numeric entity.
|
||
*
|
||
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
||
*
|
||
* @param str The string containing the entity (or a continuation of the entity).
|
||
* @param offset The current offset.
|
||
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
||
*/
|
||
stateNumericHex(str, offset) {
|
||
const startIdx = offset;
|
||
while (offset < str.length) {
|
||
const char = str.charCodeAt(offset);
|
||
if (isNumber(char) || isHexadecimalCharacter(char)) {
|
||
offset += 1;
|
||
} else {
|
||
this.addToNumericResult(str, startIdx, offset, 16);
|
||
return this.emitNumericEntity(char, 3);
|
||
}
|
||
}
|
||
this.addToNumericResult(str, startIdx, offset, 16);
|
||
return -1;
|
||
}
|
||
/**
|
||
* Parses a decimal numeric entity.
|
||
*
|
||
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
||
*
|
||
* @param str The string containing the entity (or a continuation of the entity).
|
||
* @param offset The current offset.
|
||
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
||
*/
|
||
stateNumericDecimal(str, offset) {
|
||
const startIdx = offset;
|
||
while (offset < str.length) {
|
||
const char = str.charCodeAt(offset);
|
||
if (isNumber(char)) {
|
||
offset += 1;
|
||
} else {
|
||
this.addToNumericResult(str, startIdx, offset, 10);
|
||
return this.emitNumericEntity(char, 2);
|
||
}
|
||
}
|
||
this.addToNumericResult(str, startIdx, offset, 10);
|
||
return -1;
|
||
}
|
||
/**
|
||
* Validate and emit a numeric entity.
|
||
*
|
||
* Implements the logic from the `Hexademical character reference start
|
||
* state` and `Numeric character reference end state` in the HTML spec.
|
||
*
|
||
* @param lastCp The last code point of the entity. Used to see if the
|
||
* entity was terminated with a semicolon.
|
||
* @param expectedLength The minimum number of characters that should be
|
||
* consumed. Used to validate that at least one digit
|
||
* was consumed.
|
||
* @returns The number of characters that were consumed.
|
||
*/
|
||
emitNumericEntity(lastCp, expectedLength) {
|
||
var _a2;
|
||
if (this.consumed <= expectedLength) {
|
||
(_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.absenceOfDigitsInNumericCharacterReference(this.consumed);
|
||
return 0;
|
||
}
|
||
if (lastCp === CharCodes.SEMI) {
|
||
this.consumed += 1;
|
||
} else if (this.decodeMode === DecodingMode.Strict) {
|
||
return 0;
|
||
}
|
||
this.emitCodePoint(replaceCodePoint(this.result), this.consumed);
|
||
if (this.errors) {
|
||
if (lastCp !== CharCodes.SEMI) {
|
||
this.errors.missingSemicolonAfterCharacterReference();
|
||
}
|
||
this.errors.validateNumericCharacterReference(this.result);
|
||
}
|
||
return this.consumed;
|
||
}
|
||
/**
|
||
* Parses a named entity.
|
||
*
|
||
* Equivalent to the `Named character reference state` in the HTML spec.
|
||
*
|
||
* @param str The string containing the entity (or a continuation of the entity).
|
||
* @param offset The current offset.
|
||
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
||
*/
|
||
stateNamedEntity(str, offset) {
|
||
const { decodeTree } = this;
|
||
let current = decodeTree[this.treeIndex];
|
||
let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
|
||
for (; offset < str.length; offset++, this.excess++) {
|
||
const char = str.charCodeAt(offset);
|
||
this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
|
||
if (this.treeIndex < 0) {
|
||
return this.result === 0 || // If we are parsing an attribute
|
||
this.decodeMode === DecodingMode.Attribute && // We shouldn't have consumed any characters after the entity,
|
||
(valueLength === 0 || // And there should be no invalid characters.
|
||
isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
|
||
}
|
||
current = decodeTree[this.treeIndex];
|
||
valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
|
||
if (valueLength !== 0) {
|
||
if (char === CharCodes.SEMI) {
|
||
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
|
||
}
|
||
if (this.decodeMode !== DecodingMode.Strict) {
|
||
this.result = this.treeIndex;
|
||
this.consumed += this.excess;
|
||
this.excess = 0;
|
||
}
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
/**
|
||
* Emit a named entity that was not terminated with a semicolon.
|
||
*
|
||
* @returns The number of characters consumed.
|
||
*/
|
||
emitNotTerminatedNamedEntity() {
|
||
var _a2;
|
||
const { result, decodeTree } = this;
|
||
const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
|
||
this.emitNamedEntityData(result, valueLength, this.consumed);
|
||
(_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.missingSemicolonAfterCharacterReference();
|
||
return this.consumed;
|
||
}
|
||
/**
|
||
* Emit a named entity.
|
||
*
|
||
* @param result The index of the entity in the decode tree.
|
||
* @param valueLength The number of bytes in the entity.
|
||
* @param consumed The number of characters consumed.
|
||
*
|
||
* @returns The number of characters consumed.
|
||
*/
|
||
emitNamedEntityData(result, valueLength, consumed) {
|
||
const { decodeTree } = this;
|
||
this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
|
||
if (valueLength === 3) {
|
||
this.emitCodePoint(decodeTree[result + 2], consumed);
|
||
}
|
||
return consumed;
|
||
}
|
||
/**
|
||
* Signal to the parser that the end of the input was reached.
|
||
*
|
||
* Remaining data will be emitted and relevant errors will be produced.
|
||
*
|
||
* @returns The number of characters consumed.
|
||
*/
|
||
end() {
|
||
var _a2;
|
||
switch (this.state) {
|
||
case EntityDecoderState.NamedEntity: {
|
||
return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
||
}
|
||
case EntityDecoderState.NumericDecimal: {
|
||
return this.emitNumericEntity(0, 2);
|
||
}
|
||
case EntityDecoderState.NumericHex: {
|
||
return this.emitNumericEntity(0, 3);
|
||
}
|
||
case EntityDecoderState.NumericStart: {
|
||
(_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.absenceOfDigitsInNumericCharacterReference(this.consumed);
|
||
return 0;
|
||
}
|
||
case EntityDecoderState.EntityStart: {
|
||
return 0;
|
||
}
|
||
}
|
||
}
|
||
};
|
||
function getDecoder(decodeTree) {
|
||
let ret = "";
|
||
const decoder = new EntityDecoder(decodeTree, (str) => ret += fromCodePoint(str));
|
||
return function decodeWithTrie(str, decodeMode) {
|
||
let lastIndex = 0;
|
||
let offset = 0;
|
||
while ((offset = str.indexOf("&", offset)) >= 0) {
|
||
ret += str.slice(lastIndex, offset);
|
||
decoder.startEntity(decodeMode);
|
||
const len = decoder.write(
|
||
str,
|
||
// Skip the "&"
|
||
offset + 1
|
||
);
|
||
if (len < 0) {
|
||
lastIndex = offset + decoder.end();
|
||
break;
|
||
}
|
||
lastIndex = offset + len;
|
||
offset = len === 0 ? lastIndex + 1 : lastIndex;
|
||
}
|
||
const result = ret + str.slice(lastIndex);
|
||
ret = "";
|
||
return result;
|
||
};
|
||
}
|
||
function determineBranch(decodeTree, current, nodeIdx, char) {
|
||
const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
|
||
const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
|
||
if (branchCount === 0) {
|
||
return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
|
||
}
|
||
if (jumpOffset) {
|
||
const value = char - jumpOffset;
|
||
return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
|
||
}
|
||
let lo = nodeIdx;
|
||
let hi = lo + branchCount - 1;
|
||
while (lo <= hi) {
|
||
const mid = lo + hi >>> 1;
|
||
const midVal = decodeTree[mid];
|
||
if (midVal < char) {
|
||
lo = mid + 1;
|
||
} else if (midVal > char) {
|
||
hi = mid - 1;
|
||
} else {
|
||
return decodeTree[mid + branchCount];
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
var htmlDecoder = getDecoder(decode_data_html_default);
|
||
var xmlDecoder = getDecoder(decode_data_xml_default);
|
||
|
||
// node_modules/parse5/dist/common/html.js
|
||
var html_exports = {};
|
||
__export(html_exports, {
|
||
ATTRS: () => ATTRS,
|
||
DOCUMENT_MODE: () => DOCUMENT_MODE,
|
||
NS: () => NS,
|
||
SPECIAL_ELEMENTS: () => SPECIAL_ELEMENTS,
|
||
TAG_ID: () => TAG_ID,
|
||
TAG_NAMES: () => TAG_NAMES,
|
||
getTagID: () => getTagID,
|
||
hasUnescapedText: () => hasUnescapedText,
|
||
isNumberedHeader: () => isNumberedHeader
|
||
});
|
||
var NS;
|
||
(function(NS2) {
|
||
NS2["HTML"] = "http://www.w3.org/1999/xhtml";
|
||
NS2["MATHML"] = "http://www.w3.org/1998/Math/MathML";
|
||
NS2["SVG"] = "http://www.w3.org/2000/svg";
|
||
NS2["XLINK"] = "http://www.w3.org/1999/xlink";
|
||
NS2["XML"] = "http://www.w3.org/XML/1998/namespace";
|
||
NS2["XMLNS"] = "http://www.w3.org/2000/xmlns/";
|
||
})(NS = NS || (NS = {}));
|
||
var ATTRS;
|
||
(function(ATTRS2) {
|
||
ATTRS2["TYPE"] = "type";
|
||
ATTRS2["ACTION"] = "action";
|
||
ATTRS2["ENCODING"] = "encoding";
|
||
ATTRS2["PROMPT"] = "prompt";
|
||
ATTRS2["NAME"] = "name";
|
||
ATTRS2["COLOR"] = "color";
|
||
ATTRS2["FACE"] = "face";
|
||
ATTRS2["SIZE"] = "size";
|
||
})(ATTRS = ATTRS || (ATTRS = {}));
|
||
var DOCUMENT_MODE;
|
||
(function(DOCUMENT_MODE2) {
|
||
DOCUMENT_MODE2["NO_QUIRKS"] = "no-quirks";
|
||
DOCUMENT_MODE2["QUIRKS"] = "quirks";
|
||
DOCUMENT_MODE2["LIMITED_QUIRKS"] = "limited-quirks";
|
||
})(DOCUMENT_MODE = DOCUMENT_MODE || (DOCUMENT_MODE = {}));
|
||
var TAG_NAMES;
|
||
(function(TAG_NAMES2) {
|
||
TAG_NAMES2["A"] = "a";
|
||
TAG_NAMES2["ADDRESS"] = "address";
|
||
TAG_NAMES2["ANNOTATION_XML"] = "annotation-xml";
|
||
TAG_NAMES2["APPLET"] = "applet";
|
||
TAG_NAMES2["AREA"] = "area";
|
||
TAG_NAMES2["ARTICLE"] = "article";
|
||
TAG_NAMES2["ASIDE"] = "aside";
|
||
TAG_NAMES2["B"] = "b";
|
||
TAG_NAMES2["BASE"] = "base";
|
||
TAG_NAMES2["BASEFONT"] = "basefont";
|
||
TAG_NAMES2["BGSOUND"] = "bgsound";
|
||
TAG_NAMES2["BIG"] = "big";
|
||
TAG_NAMES2["BLOCKQUOTE"] = "blockquote";
|
||
TAG_NAMES2["BODY"] = "body";
|
||
TAG_NAMES2["BR"] = "br";
|
||
TAG_NAMES2["BUTTON"] = "button";
|
||
TAG_NAMES2["CAPTION"] = "caption";
|
||
TAG_NAMES2["CENTER"] = "center";
|
||
TAG_NAMES2["CODE"] = "code";
|
||
TAG_NAMES2["COL"] = "col";
|
||
TAG_NAMES2["COLGROUP"] = "colgroup";
|
||
TAG_NAMES2["DD"] = "dd";
|
||
TAG_NAMES2["DESC"] = "desc";
|
||
TAG_NAMES2["DETAILS"] = "details";
|
||
TAG_NAMES2["DIALOG"] = "dialog";
|
||
TAG_NAMES2["DIR"] = "dir";
|
||
TAG_NAMES2["DIV"] = "div";
|
||
TAG_NAMES2["DL"] = "dl";
|
||
TAG_NAMES2["DT"] = "dt";
|
||
TAG_NAMES2["EM"] = "em";
|
||
TAG_NAMES2["EMBED"] = "embed";
|
||
TAG_NAMES2["FIELDSET"] = "fieldset";
|
||
TAG_NAMES2["FIGCAPTION"] = "figcaption";
|
||
TAG_NAMES2["FIGURE"] = "figure";
|
||
TAG_NAMES2["FONT"] = "font";
|
||
TAG_NAMES2["FOOTER"] = "footer";
|
||
TAG_NAMES2["FOREIGN_OBJECT"] = "foreignObject";
|
||
TAG_NAMES2["FORM"] = "form";
|
||
TAG_NAMES2["FRAME"] = "frame";
|
||
TAG_NAMES2["FRAMESET"] = "frameset";
|
||
TAG_NAMES2["H1"] = "h1";
|
||
TAG_NAMES2["H2"] = "h2";
|
||
TAG_NAMES2["H3"] = "h3";
|
||
TAG_NAMES2["H4"] = "h4";
|
||
TAG_NAMES2["H5"] = "h5";
|
||
TAG_NAMES2["H6"] = "h6";
|
||
TAG_NAMES2["HEAD"] = "head";
|
||
TAG_NAMES2["HEADER"] = "header";
|
||
TAG_NAMES2["HGROUP"] = "hgroup";
|
||
TAG_NAMES2["HR"] = "hr";
|
||
TAG_NAMES2["HTML"] = "html";
|
||
TAG_NAMES2["I"] = "i";
|
||
TAG_NAMES2["IMG"] = "img";
|
||
TAG_NAMES2["IMAGE"] = "image";
|
||
TAG_NAMES2["INPUT"] = "input";
|
||
TAG_NAMES2["IFRAME"] = "iframe";
|
||
TAG_NAMES2["KEYGEN"] = "keygen";
|
||
TAG_NAMES2["LABEL"] = "label";
|
||
TAG_NAMES2["LI"] = "li";
|
||
TAG_NAMES2["LINK"] = "link";
|
||
TAG_NAMES2["LISTING"] = "listing";
|
||
TAG_NAMES2["MAIN"] = "main";
|
||
TAG_NAMES2["MALIGNMARK"] = "malignmark";
|
||
TAG_NAMES2["MARQUEE"] = "marquee";
|
||
TAG_NAMES2["MATH"] = "math";
|
||
TAG_NAMES2["MENU"] = "menu";
|
||
TAG_NAMES2["META"] = "meta";
|
||
TAG_NAMES2["MGLYPH"] = "mglyph";
|
||
TAG_NAMES2["MI"] = "mi";
|
||
TAG_NAMES2["MO"] = "mo";
|
||
TAG_NAMES2["MN"] = "mn";
|
||
TAG_NAMES2["MS"] = "ms";
|
||
TAG_NAMES2["MTEXT"] = "mtext";
|
||
TAG_NAMES2["NAV"] = "nav";
|
||
TAG_NAMES2["NOBR"] = "nobr";
|
||
TAG_NAMES2["NOFRAMES"] = "noframes";
|
||
TAG_NAMES2["NOEMBED"] = "noembed";
|
||
TAG_NAMES2["NOSCRIPT"] = "noscript";
|
||
TAG_NAMES2["OBJECT"] = "object";
|
||
TAG_NAMES2["OL"] = "ol";
|
||
TAG_NAMES2["OPTGROUP"] = "optgroup";
|
||
TAG_NAMES2["OPTION"] = "option";
|
||
TAG_NAMES2["P"] = "p";
|
||
TAG_NAMES2["PARAM"] = "param";
|
||
TAG_NAMES2["PLAINTEXT"] = "plaintext";
|
||
TAG_NAMES2["PRE"] = "pre";
|
||
TAG_NAMES2["RB"] = "rb";
|
||
TAG_NAMES2["RP"] = "rp";
|
||
TAG_NAMES2["RT"] = "rt";
|
||
TAG_NAMES2["RTC"] = "rtc";
|
||
TAG_NAMES2["RUBY"] = "ruby";
|
||
TAG_NAMES2["S"] = "s";
|
||
TAG_NAMES2["SCRIPT"] = "script";
|
||
TAG_NAMES2["SECTION"] = "section";
|
||
TAG_NAMES2["SELECT"] = "select";
|
||
TAG_NAMES2["SOURCE"] = "source";
|
||
TAG_NAMES2["SMALL"] = "small";
|
||
TAG_NAMES2["SPAN"] = "span";
|
||
TAG_NAMES2["STRIKE"] = "strike";
|
||
TAG_NAMES2["STRONG"] = "strong";
|
||
TAG_NAMES2["STYLE"] = "style";
|
||
TAG_NAMES2["SUB"] = "sub";
|
||
TAG_NAMES2["SUMMARY"] = "summary";
|
||
TAG_NAMES2["SUP"] = "sup";
|
||
TAG_NAMES2["TABLE"] = "table";
|
||
TAG_NAMES2["TBODY"] = "tbody";
|
||
TAG_NAMES2["TEMPLATE"] = "template";
|
||
TAG_NAMES2["TEXTAREA"] = "textarea";
|
||
TAG_NAMES2["TFOOT"] = "tfoot";
|
||
TAG_NAMES2["TD"] = "td";
|
||
TAG_NAMES2["TH"] = "th";
|
||
TAG_NAMES2["THEAD"] = "thead";
|
||
TAG_NAMES2["TITLE"] = "title";
|
||
TAG_NAMES2["TR"] = "tr";
|
||
TAG_NAMES2["TRACK"] = "track";
|
||
TAG_NAMES2["TT"] = "tt";
|
||
TAG_NAMES2["U"] = "u";
|
||
TAG_NAMES2["UL"] = "ul";
|
||
TAG_NAMES2["SVG"] = "svg";
|
||
TAG_NAMES2["VAR"] = "var";
|
||
TAG_NAMES2["WBR"] = "wbr";
|
||
TAG_NAMES2["XMP"] = "xmp";
|
||
})(TAG_NAMES = TAG_NAMES || (TAG_NAMES = {}));
|
||
var TAG_ID;
|
||
(function(TAG_ID2) {
|
||
TAG_ID2[TAG_ID2["UNKNOWN"] = 0] = "UNKNOWN";
|
||
TAG_ID2[TAG_ID2["A"] = 1] = "A";
|
||
TAG_ID2[TAG_ID2["ADDRESS"] = 2] = "ADDRESS";
|
||
TAG_ID2[TAG_ID2["ANNOTATION_XML"] = 3] = "ANNOTATION_XML";
|
||
TAG_ID2[TAG_ID2["APPLET"] = 4] = "APPLET";
|
||
TAG_ID2[TAG_ID2["AREA"] = 5] = "AREA";
|
||
TAG_ID2[TAG_ID2["ARTICLE"] = 6] = "ARTICLE";
|
||
TAG_ID2[TAG_ID2["ASIDE"] = 7] = "ASIDE";
|
||
TAG_ID2[TAG_ID2["B"] = 8] = "B";
|
||
TAG_ID2[TAG_ID2["BASE"] = 9] = "BASE";
|
||
TAG_ID2[TAG_ID2["BASEFONT"] = 10] = "BASEFONT";
|
||
TAG_ID2[TAG_ID2["BGSOUND"] = 11] = "BGSOUND";
|
||
TAG_ID2[TAG_ID2["BIG"] = 12] = "BIG";
|
||
TAG_ID2[TAG_ID2["BLOCKQUOTE"] = 13] = "BLOCKQUOTE";
|
||
TAG_ID2[TAG_ID2["BODY"] = 14] = "BODY";
|
||
TAG_ID2[TAG_ID2["BR"] = 15] = "BR";
|
||
TAG_ID2[TAG_ID2["BUTTON"] = 16] = "BUTTON";
|
||
TAG_ID2[TAG_ID2["CAPTION"] = 17] = "CAPTION";
|
||
TAG_ID2[TAG_ID2["CENTER"] = 18] = "CENTER";
|
||
TAG_ID2[TAG_ID2["CODE"] = 19] = "CODE";
|
||
TAG_ID2[TAG_ID2["COL"] = 20] = "COL";
|
||
TAG_ID2[TAG_ID2["COLGROUP"] = 21] = "COLGROUP";
|
||
TAG_ID2[TAG_ID2["DD"] = 22] = "DD";
|
||
TAG_ID2[TAG_ID2["DESC"] = 23] = "DESC";
|
||
TAG_ID2[TAG_ID2["DETAILS"] = 24] = "DETAILS";
|
||
TAG_ID2[TAG_ID2["DIALOG"] = 25] = "DIALOG";
|
||
TAG_ID2[TAG_ID2["DIR"] = 26] = "DIR";
|
||
TAG_ID2[TAG_ID2["DIV"] = 27] = "DIV";
|
||
TAG_ID2[TAG_ID2["DL"] = 28] = "DL";
|
||
TAG_ID2[TAG_ID2["DT"] = 29] = "DT";
|
||
TAG_ID2[TAG_ID2["EM"] = 30] = "EM";
|
||
TAG_ID2[TAG_ID2["EMBED"] = 31] = "EMBED";
|
||
TAG_ID2[TAG_ID2["FIELDSET"] = 32] = "FIELDSET";
|
||
TAG_ID2[TAG_ID2["FIGCAPTION"] = 33] = "FIGCAPTION";
|
||
TAG_ID2[TAG_ID2["FIGURE"] = 34] = "FIGURE";
|
||
TAG_ID2[TAG_ID2["FONT"] = 35] = "FONT";
|
||
TAG_ID2[TAG_ID2["FOOTER"] = 36] = "FOOTER";
|
||
TAG_ID2[TAG_ID2["FOREIGN_OBJECT"] = 37] = "FOREIGN_OBJECT";
|
||
TAG_ID2[TAG_ID2["FORM"] = 38] = "FORM";
|
||
TAG_ID2[TAG_ID2["FRAME"] = 39] = "FRAME";
|
||
TAG_ID2[TAG_ID2["FRAMESET"] = 40] = "FRAMESET";
|
||
TAG_ID2[TAG_ID2["H1"] = 41] = "H1";
|
||
TAG_ID2[TAG_ID2["H2"] = 42] = "H2";
|
||
TAG_ID2[TAG_ID2["H3"] = 43] = "H3";
|
||
TAG_ID2[TAG_ID2["H4"] = 44] = "H4";
|
||
TAG_ID2[TAG_ID2["H5"] = 45] = "H5";
|
||
TAG_ID2[TAG_ID2["H6"] = 46] = "H6";
|
||
TAG_ID2[TAG_ID2["HEAD"] = 47] = "HEAD";
|
||
TAG_ID2[TAG_ID2["HEADER"] = 48] = "HEADER";
|
||
TAG_ID2[TAG_ID2["HGROUP"] = 49] = "HGROUP";
|
||
TAG_ID2[TAG_ID2["HR"] = 50] = "HR";
|
||
TAG_ID2[TAG_ID2["HTML"] = 51] = "HTML";
|
||
TAG_ID2[TAG_ID2["I"] = 52] = "I";
|
||
TAG_ID2[TAG_ID2["IMG"] = 53] = "IMG";
|
||
TAG_ID2[TAG_ID2["IMAGE"] = 54] = "IMAGE";
|
||
TAG_ID2[TAG_ID2["INPUT"] = 55] = "INPUT";
|
||
TAG_ID2[TAG_ID2["IFRAME"] = 56] = "IFRAME";
|
||
TAG_ID2[TAG_ID2["KEYGEN"] = 57] = "KEYGEN";
|
||
TAG_ID2[TAG_ID2["LABEL"] = 58] = "LABEL";
|
||
TAG_ID2[TAG_ID2["LI"] = 59] = "LI";
|
||
TAG_ID2[TAG_ID2["LINK"] = 60] = "LINK";
|
||
TAG_ID2[TAG_ID2["LISTING"] = 61] = "LISTING";
|
||
TAG_ID2[TAG_ID2["MAIN"] = 62] = "MAIN";
|
||
TAG_ID2[TAG_ID2["MALIGNMARK"] = 63] = "MALIGNMARK";
|
||
TAG_ID2[TAG_ID2["MARQUEE"] = 64] = "MARQUEE";
|
||
TAG_ID2[TAG_ID2["MATH"] = 65] = "MATH";
|
||
TAG_ID2[TAG_ID2["MENU"] = 66] = "MENU";
|
||
TAG_ID2[TAG_ID2["META"] = 67] = "META";
|
||
TAG_ID2[TAG_ID2["MGLYPH"] = 68] = "MGLYPH";
|
||
TAG_ID2[TAG_ID2["MI"] = 69] = "MI";
|
||
TAG_ID2[TAG_ID2["MO"] = 70] = "MO";
|
||
TAG_ID2[TAG_ID2["MN"] = 71] = "MN";
|
||
TAG_ID2[TAG_ID2["MS"] = 72] = "MS";
|
||
TAG_ID2[TAG_ID2["MTEXT"] = 73] = "MTEXT";
|
||
TAG_ID2[TAG_ID2["NAV"] = 74] = "NAV";
|
||
TAG_ID2[TAG_ID2["NOBR"] = 75] = "NOBR";
|
||
TAG_ID2[TAG_ID2["NOFRAMES"] = 76] = "NOFRAMES";
|
||
TAG_ID2[TAG_ID2["NOEMBED"] = 77] = "NOEMBED";
|
||
TAG_ID2[TAG_ID2["NOSCRIPT"] = 78] = "NOSCRIPT";
|
||
TAG_ID2[TAG_ID2["OBJECT"] = 79] = "OBJECT";
|
||
TAG_ID2[TAG_ID2["OL"] = 80] = "OL";
|
||
TAG_ID2[TAG_ID2["OPTGROUP"] = 81] = "OPTGROUP";
|
||
TAG_ID2[TAG_ID2["OPTION"] = 82] = "OPTION";
|
||
TAG_ID2[TAG_ID2["P"] = 83] = "P";
|
||
TAG_ID2[TAG_ID2["PARAM"] = 84] = "PARAM";
|
||
TAG_ID2[TAG_ID2["PLAINTEXT"] = 85] = "PLAINTEXT";
|
||
TAG_ID2[TAG_ID2["PRE"] = 86] = "PRE";
|
||
TAG_ID2[TAG_ID2["RB"] = 87] = "RB";
|
||
TAG_ID2[TAG_ID2["RP"] = 88] = "RP";
|
||
TAG_ID2[TAG_ID2["RT"] = 89] = "RT";
|
||
TAG_ID2[TAG_ID2["RTC"] = 90] = "RTC";
|
||
TAG_ID2[TAG_ID2["RUBY"] = 91] = "RUBY";
|
||
TAG_ID2[TAG_ID2["S"] = 92] = "S";
|
||
TAG_ID2[TAG_ID2["SCRIPT"] = 93] = "SCRIPT";
|
||
TAG_ID2[TAG_ID2["SECTION"] = 94] = "SECTION";
|
||
TAG_ID2[TAG_ID2["SELECT"] = 95] = "SELECT";
|
||
TAG_ID2[TAG_ID2["SOURCE"] = 96] = "SOURCE";
|
||
TAG_ID2[TAG_ID2["SMALL"] = 97] = "SMALL";
|
||
TAG_ID2[TAG_ID2["SPAN"] = 98] = "SPAN";
|
||
TAG_ID2[TAG_ID2["STRIKE"] = 99] = "STRIKE";
|
||
TAG_ID2[TAG_ID2["STRONG"] = 100] = "STRONG";
|
||
TAG_ID2[TAG_ID2["STYLE"] = 101] = "STYLE";
|
||
TAG_ID2[TAG_ID2["SUB"] = 102] = "SUB";
|
||
TAG_ID2[TAG_ID2["SUMMARY"] = 103] = "SUMMARY";
|
||
TAG_ID2[TAG_ID2["SUP"] = 104] = "SUP";
|
||
TAG_ID2[TAG_ID2["TABLE"] = 105] = "TABLE";
|
||
TAG_ID2[TAG_ID2["TBODY"] = 106] = "TBODY";
|
||
TAG_ID2[TAG_ID2["TEMPLATE"] = 107] = "TEMPLATE";
|
||
TAG_ID2[TAG_ID2["TEXTAREA"] = 108] = "TEXTAREA";
|
||
TAG_ID2[TAG_ID2["TFOOT"] = 109] = "TFOOT";
|
||
TAG_ID2[TAG_ID2["TD"] = 110] = "TD";
|
||
TAG_ID2[TAG_ID2["TH"] = 111] = "TH";
|
||
TAG_ID2[TAG_ID2["THEAD"] = 112] = "THEAD";
|
||
TAG_ID2[TAG_ID2["TITLE"] = 113] = "TITLE";
|
||
TAG_ID2[TAG_ID2["TR"] = 114] = "TR";
|
||
TAG_ID2[TAG_ID2["TRACK"] = 115] = "TRACK";
|
||
TAG_ID2[TAG_ID2["TT"] = 116] = "TT";
|
||
TAG_ID2[TAG_ID2["U"] = 117] = "U";
|
||
TAG_ID2[TAG_ID2["UL"] = 118] = "UL";
|
||
TAG_ID2[TAG_ID2["SVG"] = 119] = "SVG";
|
||
TAG_ID2[TAG_ID2["VAR"] = 120] = "VAR";
|
||
TAG_ID2[TAG_ID2["WBR"] = 121] = "WBR";
|
||
TAG_ID2[TAG_ID2["XMP"] = 122] = "XMP";
|
||
})(TAG_ID = TAG_ID || (TAG_ID = {}));
|
||
var TAG_NAME_TO_ID = /* @__PURE__ */ new Map([
|
||
[TAG_NAMES.A, TAG_ID.A],
|
||
[TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],
|
||
[TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML],
|
||
[TAG_NAMES.APPLET, TAG_ID.APPLET],
|
||
[TAG_NAMES.AREA, TAG_ID.AREA],
|
||
[TAG_NAMES.ARTICLE, TAG_ID.ARTICLE],
|
||
[TAG_NAMES.ASIDE, TAG_ID.ASIDE],
|
||
[TAG_NAMES.B, TAG_ID.B],
|
||
[TAG_NAMES.BASE, TAG_ID.BASE],
|
||
[TAG_NAMES.BASEFONT, TAG_ID.BASEFONT],
|
||
[TAG_NAMES.BGSOUND, TAG_ID.BGSOUND],
|
||
[TAG_NAMES.BIG, TAG_ID.BIG],
|
||
[TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE],
|
||
[TAG_NAMES.BODY, TAG_ID.BODY],
|
||
[TAG_NAMES.BR, TAG_ID.BR],
|
||
[TAG_NAMES.BUTTON, TAG_ID.BUTTON],
|
||
[TAG_NAMES.CAPTION, TAG_ID.CAPTION],
|
||
[TAG_NAMES.CENTER, TAG_ID.CENTER],
|
||
[TAG_NAMES.CODE, TAG_ID.CODE],
|
||
[TAG_NAMES.COL, TAG_ID.COL],
|
||
[TAG_NAMES.COLGROUP, TAG_ID.COLGROUP],
|
||
[TAG_NAMES.DD, TAG_ID.DD],
|
||
[TAG_NAMES.DESC, TAG_ID.DESC],
|
||
[TAG_NAMES.DETAILS, TAG_ID.DETAILS],
|
||
[TAG_NAMES.DIALOG, TAG_ID.DIALOG],
|
||
[TAG_NAMES.DIR, TAG_ID.DIR],
|
||
[TAG_NAMES.DIV, TAG_ID.DIV],
|
||
[TAG_NAMES.DL, TAG_ID.DL],
|
||
[TAG_NAMES.DT, TAG_ID.DT],
|
||
[TAG_NAMES.EM, TAG_ID.EM],
|
||
[TAG_NAMES.EMBED, TAG_ID.EMBED],
|
||
[TAG_NAMES.FIELDSET, TAG_ID.FIELDSET],
|
||
[TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION],
|
||
[TAG_NAMES.FIGURE, TAG_ID.FIGURE],
|
||
[TAG_NAMES.FONT, TAG_ID.FONT],
|
||
[TAG_NAMES.FOOTER, TAG_ID.FOOTER],
|
||
[TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT],
|
||
[TAG_NAMES.FORM, TAG_ID.FORM],
|
||
[TAG_NAMES.FRAME, TAG_ID.FRAME],
|
||
[TAG_NAMES.FRAMESET, TAG_ID.FRAMESET],
|
||
[TAG_NAMES.H1, TAG_ID.H1],
|
||
[TAG_NAMES.H2, TAG_ID.H2],
|
||
[TAG_NAMES.H3, TAG_ID.H3],
|
||
[TAG_NAMES.H4, TAG_ID.H4],
|
||
[TAG_NAMES.H5, TAG_ID.H5],
|
||
[TAG_NAMES.H6, TAG_ID.H6],
|
||
[TAG_NAMES.HEAD, TAG_ID.HEAD],
|
||
[TAG_NAMES.HEADER, TAG_ID.HEADER],
|
||
[TAG_NAMES.HGROUP, TAG_ID.HGROUP],
|
||
[TAG_NAMES.HR, TAG_ID.HR],
|
||
[TAG_NAMES.HTML, TAG_ID.HTML],
|
||
[TAG_NAMES.I, TAG_ID.I],
|
||
[TAG_NAMES.IMG, TAG_ID.IMG],
|
||
[TAG_NAMES.IMAGE, TAG_ID.IMAGE],
|
||
[TAG_NAMES.INPUT, TAG_ID.INPUT],
|
||
[TAG_NAMES.IFRAME, TAG_ID.IFRAME],
|
||
[TAG_NAMES.KEYGEN, TAG_ID.KEYGEN],
|
||
[TAG_NAMES.LABEL, TAG_ID.LABEL],
|
||
[TAG_NAMES.LI, TAG_ID.LI],
|
||
[TAG_NAMES.LINK, TAG_ID.LINK],
|
||
[TAG_NAMES.LISTING, TAG_ID.LISTING],
|
||
[TAG_NAMES.MAIN, TAG_ID.MAIN],
|
||
[TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK],
|
||
[TAG_NAMES.MARQUEE, TAG_ID.MARQUEE],
|
||
[TAG_NAMES.MATH, TAG_ID.MATH],
|
||
[TAG_NAMES.MENU, TAG_ID.MENU],
|
||
[TAG_NAMES.META, TAG_ID.META],
|
||
[TAG_NAMES.MGLYPH, TAG_ID.MGLYPH],
|
||
[TAG_NAMES.MI, TAG_ID.MI],
|
||
[TAG_NAMES.MO, TAG_ID.MO],
|
||
[TAG_NAMES.MN, TAG_ID.MN],
|
||
[TAG_NAMES.MS, TAG_ID.MS],
|
||
[TAG_NAMES.MTEXT, TAG_ID.MTEXT],
|
||
[TAG_NAMES.NAV, TAG_ID.NAV],
|
||
[TAG_NAMES.NOBR, TAG_ID.NOBR],
|
||
[TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES],
|
||
[TAG_NAMES.NOEMBED, TAG_ID.NOEMBED],
|
||
[TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT],
|
||
[TAG_NAMES.OBJECT, TAG_ID.OBJECT],
|
||
[TAG_NAMES.OL, TAG_ID.OL],
|
||
[TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP],
|
||
[TAG_NAMES.OPTION, TAG_ID.OPTION],
|
||
[TAG_NAMES.P, TAG_ID.P],
|
||
[TAG_NAMES.PARAM, TAG_ID.PARAM],
|
||
[TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT],
|
||
[TAG_NAMES.PRE, TAG_ID.PRE],
|
||
[TAG_NAMES.RB, TAG_ID.RB],
|
||
[TAG_NAMES.RP, TAG_ID.RP],
|
||
[TAG_NAMES.RT, TAG_ID.RT],
|
||
[TAG_NAMES.RTC, TAG_ID.RTC],
|
||
[TAG_NAMES.RUBY, TAG_ID.RUBY],
|
||
[TAG_NAMES.S, TAG_ID.S],
|
||
[TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],
|
||
[TAG_NAMES.SECTION, TAG_ID.SECTION],
|
||
[TAG_NAMES.SELECT, TAG_ID.SELECT],
|
||
[TAG_NAMES.SOURCE, TAG_ID.SOURCE],
|
||
[TAG_NAMES.SMALL, TAG_ID.SMALL],
|
||
[TAG_NAMES.SPAN, TAG_ID.SPAN],
|
||
[TAG_NAMES.STRIKE, TAG_ID.STRIKE],
|
||
[TAG_NAMES.STRONG, TAG_ID.STRONG],
|
||
[TAG_NAMES.STYLE, TAG_ID.STYLE],
|
||
[TAG_NAMES.SUB, TAG_ID.SUB],
|
||
[TAG_NAMES.SUMMARY, TAG_ID.SUMMARY],
|
||
[TAG_NAMES.SUP, TAG_ID.SUP],
|
||
[TAG_NAMES.TABLE, TAG_ID.TABLE],
|
||
[TAG_NAMES.TBODY, TAG_ID.TBODY],
|
||
[TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE],
|
||
[TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA],
|
||
[TAG_NAMES.TFOOT, TAG_ID.TFOOT],
|
||
[TAG_NAMES.TD, TAG_ID.TD],
|
||
[TAG_NAMES.TH, TAG_ID.TH],
|
||
[TAG_NAMES.THEAD, TAG_ID.THEAD],
|
||
[TAG_NAMES.TITLE, TAG_ID.TITLE],
|
||
[TAG_NAMES.TR, TAG_ID.TR],
|
||
[TAG_NAMES.TRACK, TAG_ID.TRACK],
|
||
[TAG_NAMES.TT, TAG_ID.TT],
|
||
[TAG_NAMES.U, TAG_ID.U],
|
||
[TAG_NAMES.UL, TAG_ID.UL],
|
||
[TAG_NAMES.SVG, TAG_ID.SVG],
|
||
[TAG_NAMES.VAR, TAG_ID.VAR],
|
||
[TAG_NAMES.WBR, TAG_ID.WBR],
|
||
[TAG_NAMES.XMP, TAG_ID.XMP]
|
||
]);
|
||
function getTagID(tagName) {
|
||
var _a2;
|
||
return (_a2 = TAG_NAME_TO_ID.get(tagName)) !== null && _a2 !== void 0 ? _a2 : TAG_ID.UNKNOWN;
|
||
}
|
||
var $ = TAG_ID;
|
||
var SPECIAL_ELEMENTS = {
|
||
[NS.HTML]: /* @__PURE__ */ new Set([
|
||
$.ADDRESS,
|
||
$.APPLET,
|
||
$.AREA,
|
||
$.ARTICLE,
|
||
$.ASIDE,
|
||
$.BASE,
|
||
$.BASEFONT,
|
||
$.BGSOUND,
|
||
$.BLOCKQUOTE,
|
||
$.BODY,
|
||
$.BR,
|
||
$.BUTTON,
|
||
$.CAPTION,
|
||
$.CENTER,
|
||
$.COL,
|
||
$.COLGROUP,
|
||
$.DD,
|
||
$.DETAILS,
|
||
$.DIR,
|
||
$.DIV,
|
||
$.DL,
|
||
$.DT,
|
||
$.EMBED,
|
||
$.FIELDSET,
|
||
$.FIGCAPTION,
|
||
$.FIGURE,
|
||
$.FOOTER,
|
||
$.FORM,
|
||
$.FRAME,
|
||
$.FRAMESET,
|
||
$.H1,
|
||
$.H2,
|
||
$.H3,
|
||
$.H4,
|
||
$.H5,
|
||
$.H6,
|
||
$.HEAD,
|
||
$.HEADER,
|
||
$.HGROUP,
|
||
$.HR,
|
||
$.HTML,
|
||
$.IFRAME,
|
||
$.IMG,
|
||
$.INPUT,
|
||
$.LI,
|
||
$.LINK,
|
||
$.LISTING,
|
||
$.MAIN,
|
||
$.MARQUEE,
|
||
$.MENU,
|
||
$.META,
|
||
$.NAV,
|
||
$.NOEMBED,
|
||
$.NOFRAMES,
|
||
$.NOSCRIPT,
|
||
$.OBJECT,
|
||
$.OL,
|
||
$.P,
|
||
$.PARAM,
|
||
$.PLAINTEXT,
|
||
$.PRE,
|
||
$.SCRIPT,
|
||
$.SECTION,
|
||
$.SELECT,
|
||
$.SOURCE,
|
||
$.STYLE,
|
||
$.SUMMARY,
|
||
$.TABLE,
|
||
$.TBODY,
|
||
$.TD,
|
||
$.TEMPLATE,
|
||
$.TEXTAREA,
|
||
$.TFOOT,
|
||
$.TH,
|
||
$.THEAD,
|
||
$.TITLE,
|
||
$.TR,
|
||
$.TRACK,
|
||
$.UL,
|
||
$.WBR,
|
||
$.XMP
|
||
]),
|
||
[NS.MATHML]: /* @__PURE__ */ new Set([$.MI, $.MO, $.MN, $.MS, $.MTEXT, $.ANNOTATION_XML]),
|
||
[NS.SVG]: /* @__PURE__ */ new Set([$.TITLE, $.FOREIGN_OBJECT, $.DESC]),
|
||
[NS.XLINK]: /* @__PURE__ */ new Set(),
|
||
[NS.XML]: /* @__PURE__ */ new Set(),
|
||
[NS.XMLNS]: /* @__PURE__ */ new Set()
|
||
};
|
||
function isNumberedHeader(tn) {
|
||
return tn === $.H1 || tn === $.H2 || tn === $.H3 || tn === $.H4 || tn === $.H5 || tn === $.H6;
|
||
}
|
||
var UNESCAPED_TEXT = /* @__PURE__ */ new Set([
|
||
TAG_NAMES.STYLE,
|
||
TAG_NAMES.SCRIPT,
|
||
TAG_NAMES.XMP,
|
||
TAG_NAMES.IFRAME,
|
||
TAG_NAMES.NOEMBED,
|
||
TAG_NAMES.NOFRAMES,
|
||
TAG_NAMES.PLAINTEXT
|
||
]);
|
||
function hasUnescapedText(tn, scriptingEnabled) {
|
||
return UNESCAPED_TEXT.has(tn) || scriptingEnabled && tn === TAG_NAMES.NOSCRIPT;
|
||
}
|
||
|
||
// node_modules/parse5/dist/tokenizer/index.js
|
||
var C1_CONTROLS_REFERENCE_REPLACEMENTS = /* @__PURE__ */ new Map([
|
||
[128, 8364],
|
||
[130, 8218],
|
||
[131, 402],
|
||
[132, 8222],
|
||
[133, 8230],
|
||
[134, 8224],
|
||
[135, 8225],
|
||
[136, 710],
|
||
[137, 8240],
|
||
[138, 352],
|
||
[139, 8249],
|
||
[140, 338],
|
||
[142, 381],
|
||
[145, 8216],
|
||
[146, 8217],
|
||
[147, 8220],
|
||
[148, 8221],
|
||
[149, 8226],
|
||
[150, 8211],
|
||
[151, 8212],
|
||
[152, 732],
|
||
[153, 8482],
|
||
[154, 353],
|
||
[155, 8250],
|
||
[156, 339],
|
||
[158, 382],
|
||
[159, 376]
|
||
]);
|
||
var State;
|
||
(function(State2) {
|
||
State2[State2["DATA"] = 0] = "DATA";
|
||
State2[State2["RCDATA"] = 1] = "RCDATA";
|
||
State2[State2["RAWTEXT"] = 2] = "RAWTEXT";
|
||
State2[State2["SCRIPT_DATA"] = 3] = "SCRIPT_DATA";
|
||
State2[State2["PLAINTEXT"] = 4] = "PLAINTEXT";
|
||
State2[State2["TAG_OPEN"] = 5] = "TAG_OPEN";
|
||
State2[State2["END_TAG_OPEN"] = 6] = "END_TAG_OPEN";
|
||
State2[State2["TAG_NAME"] = 7] = "TAG_NAME";
|
||
State2[State2["RCDATA_LESS_THAN_SIGN"] = 8] = "RCDATA_LESS_THAN_SIGN";
|
||
State2[State2["RCDATA_END_TAG_OPEN"] = 9] = "RCDATA_END_TAG_OPEN";
|
||
State2[State2["RCDATA_END_TAG_NAME"] = 10] = "RCDATA_END_TAG_NAME";
|
||
State2[State2["RAWTEXT_LESS_THAN_SIGN"] = 11] = "RAWTEXT_LESS_THAN_SIGN";
|
||
State2[State2["RAWTEXT_END_TAG_OPEN"] = 12] = "RAWTEXT_END_TAG_OPEN";
|
||
State2[State2["RAWTEXT_END_TAG_NAME"] = 13] = "RAWTEXT_END_TAG_NAME";
|
||
State2[State2["SCRIPT_DATA_LESS_THAN_SIGN"] = 14] = "SCRIPT_DATA_LESS_THAN_SIGN";
|
||
State2[State2["SCRIPT_DATA_END_TAG_OPEN"] = 15] = "SCRIPT_DATA_END_TAG_OPEN";
|
||
State2[State2["SCRIPT_DATA_END_TAG_NAME"] = 16] = "SCRIPT_DATA_END_TAG_NAME";
|
||
State2[State2["SCRIPT_DATA_ESCAPE_START"] = 17] = "SCRIPT_DATA_ESCAPE_START";
|
||
State2[State2["SCRIPT_DATA_ESCAPE_START_DASH"] = 18] = "SCRIPT_DATA_ESCAPE_START_DASH";
|
||
State2[State2["SCRIPT_DATA_ESCAPED"] = 19] = "SCRIPT_DATA_ESCAPED";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_DASH"] = 20] = "SCRIPT_DATA_ESCAPED_DASH";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_DASH_DASH"] = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN"] = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_END_TAG_OPEN"] = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN";
|
||
State2[State2["SCRIPT_DATA_ESCAPED_END_TAG_NAME"] = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPE_START"] = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED"] = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED_DASH"] = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH"] = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN"] = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN";
|
||
State2[State2["SCRIPT_DATA_DOUBLE_ESCAPE_END"] = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END";
|
||
State2[State2["BEFORE_ATTRIBUTE_NAME"] = 31] = "BEFORE_ATTRIBUTE_NAME";
|
||
State2[State2["ATTRIBUTE_NAME"] = 32] = "ATTRIBUTE_NAME";
|
||
State2[State2["AFTER_ATTRIBUTE_NAME"] = 33] = "AFTER_ATTRIBUTE_NAME";
|
||
State2[State2["BEFORE_ATTRIBUTE_VALUE"] = 34] = "BEFORE_ATTRIBUTE_VALUE";
|
||
State2[State2["ATTRIBUTE_VALUE_DOUBLE_QUOTED"] = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED";
|
||
State2[State2["ATTRIBUTE_VALUE_SINGLE_QUOTED"] = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED";
|
||
State2[State2["ATTRIBUTE_VALUE_UNQUOTED"] = 37] = "ATTRIBUTE_VALUE_UNQUOTED";
|
||
State2[State2["AFTER_ATTRIBUTE_VALUE_QUOTED"] = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED";
|
||
State2[State2["SELF_CLOSING_START_TAG"] = 39] = "SELF_CLOSING_START_TAG";
|
||
State2[State2["BOGUS_COMMENT"] = 40] = "BOGUS_COMMENT";
|
||
State2[State2["MARKUP_DECLARATION_OPEN"] = 41] = "MARKUP_DECLARATION_OPEN";
|
||
State2[State2["COMMENT_START"] = 42] = "COMMENT_START";
|
||
State2[State2["COMMENT_START_DASH"] = 43] = "COMMENT_START_DASH";
|
||
State2[State2["COMMENT"] = 44] = "COMMENT";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN"] = 45] = "COMMENT_LESS_THAN_SIGN";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN_BANG"] = 46] = "COMMENT_LESS_THAN_SIGN_BANG";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN_BANG_DASH"] = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH";
|
||
State2[State2["COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH"] = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH";
|
||
State2[State2["COMMENT_END_DASH"] = 49] = "COMMENT_END_DASH";
|
||
State2[State2["COMMENT_END"] = 50] = "COMMENT_END";
|
||
State2[State2["COMMENT_END_BANG"] = 51] = "COMMENT_END_BANG";
|
||
State2[State2["DOCTYPE"] = 52] = "DOCTYPE";
|
||
State2[State2["BEFORE_DOCTYPE_NAME"] = 53] = "BEFORE_DOCTYPE_NAME";
|
||
State2[State2["DOCTYPE_NAME"] = 54] = "DOCTYPE_NAME";
|
||
State2[State2["AFTER_DOCTYPE_NAME"] = 55] = "AFTER_DOCTYPE_NAME";
|
||
State2[State2["AFTER_DOCTYPE_PUBLIC_KEYWORD"] = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD";
|
||
State2[State2["BEFORE_DOCTYPE_PUBLIC_IDENTIFIER"] = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER";
|
||
State2[State2["DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED"] = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED";
|
||
State2[State2["DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED"] = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED";
|
||
State2[State2["AFTER_DOCTYPE_PUBLIC_IDENTIFIER"] = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER";
|
||
State2[State2["BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS"] = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS";
|
||
State2[State2["AFTER_DOCTYPE_SYSTEM_KEYWORD"] = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD";
|
||
State2[State2["BEFORE_DOCTYPE_SYSTEM_IDENTIFIER"] = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER";
|
||
State2[State2["DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED"] = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED";
|
||
State2[State2["DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED"] = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED";
|
||
State2[State2["AFTER_DOCTYPE_SYSTEM_IDENTIFIER"] = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER";
|
||
State2[State2["BOGUS_DOCTYPE"] = 67] = "BOGUS_DOCTYPE";
|
||
State2[State2["CDATA_SECTION"] = 68] = "CDATA_SECTION";
|
||
State2[State2["CDATA_SECTION_BRACKET"] = 69] = "CDATA_SECTION_BRACKET";
|
||
State2[State2["CDATA_SECTION_END"] = 70] = "CDATA_SECTION_END";
|
||
State2[State2["CHARACTER_REFERENCE"] = 71] = "CHARACTER_REFERENCE";
|
||
State2[State2["NAMED_CHARACTER_REFERENCE"] = 72] = "NAMED_CHARACTER_REFERENCE";
|
||
State2[State2["AMBIGUOUS_AMPERSAND"] = 73] = "AMBIGUOUS_AMPERSAND";
|
||
State2[State2["NUMERIC_CHARACTER_REFERENCE"] = 74] = "NUMERIC_CHARACTER_REFERENCE";
|
||
State2[State2["HEXADEMICAL_CHARACTER_REFERENCE_START"] = 75] = "HEXADEMICAL_CHARACTER_REFERENCE_START";
|
||
State2[State2["HEXADEMICAL_CHARACTER_REFERENCE"] = 76] = "HEXADEMICAL_CHARACTER_REFERENCE";
|
||
State2[State2["DECIMAL_CHARACTER_REFERENCE"] = 77] = "DECIMAL_CHARACTER_REFERENCE";
|
||
State2[State2["NUMERIC_CHARACTER_REFERENCE_END"] = 78] = "NUMERIC_CHARACTER_REFERENCE_END";
|
||
})(State || (State = {}));
|
||
var TokenizerMode = {
|
||
DATA: State.DATA,
|
||
RCDATA: State.RCDATA,
|
||
RAWTEXT: State.RAWTEXT,
|
||
SCRIPT_DATA: State.SCRIPT_DATA,
|
||
PLAINTEXT: State.PLAINTEXT,
|
||
CDATA_SECTION: State.CDATA_SECTION
|
||
};
|
||
function isAsciiDigit(cp) {
|
||
return cp >= CODE_POINTS.DIGIT_0 && cp <= CODE_POINTS.DIGIT_9;
|
||
}
|
||
function isAsciiUpper(cp) {
|
||
return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_Z;
|
||
}
|
||
function isAsciiLower(cp) {
|
||
return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_Z;
|
||
}
|
||
function isAsciiLetter(cp) {
|
||
return isAsciiLower(cp) || isAsciiUpper(cp);
|
||
}
|
||
function isAsciiAlphaNumeric2(cp) {
|
||
return isAsciiLetter(cp) || isAsciiDigit(cp);
|
||
}
|
||
function isAsciiUpperHexDigit(cp) {
|
||
return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_F;
|
||
}
|
||
function isAsciiLowerHexDigit(cp) {
|
||
return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_F;
|
||
}
|
||
function isAsciiHexDigit(cp) {
|
||
return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);
|
||
}
|
||
function toAsciiLower(cp) {
|
||
return cp + 32;
|
||
}
|
||
function isWhitespace(cp) {
|
||
return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED;
|
||
}
|
||
function isEntityInAttributeInvalidEnd2(nextCp) {
|
||
return nextCp === CODE_POINTS.EQUALS_SIGN || isAsciiAlphaNumeric2(nextCp);
|
||
}
|
||
function isScriptDataDoubleEscapeSequenceEnd(cp) {
|
||
return isWhitespace(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN;
|
||
}
|
||
var Tokenizer = class {
|
||
constructor(options, handler) {
|
||
this.options = options;
|
||
this.handler = handler;
|
||
this.paused = false;
|
||
this.inLoop = false;
|
||
this.inForeignNode = false;
|
||
this.lastStartTagName = "";
|
||
this.active = false;
|
||
this.state = State.DATA;
|
||
this.returnState = State.DATA;
|
||
this.charRefCode = -1;
|
||
this.consumedAfterSnapshot = -1;
|
||
this.currentCharacterToken = null;
|
||
this.currentToken = null;
|
||
this.currentAttr = { name: "", value: "" };
|
||
this.preprocessor = new Preprocessor(handler);
|
||
this.currentLocation = this.getCurrentLocation(-1);
|
||
}
|
||
//Errors
|
||
_err(code) {
|
||
var _a2, _b;
|
||
(_b = (_a2 = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a2, this.preprocessor.getError(code));
|
||
}
|
||
// NOTE: `offset` may never run across line boundaries.
|
||
getCurrentLocation(offset) {
|
||
if (!this.options.sourceCodeLocationInfo) {
|
||
return null;
|
||
}
|
||
return {
|
||
startLine: this.preprocessor.line,
|
||
startCol: this.preprocessor.col - offset,
|
||
startOffset: this.preprocessor.offset - offset,
|
||
endLine: -1,
|
||
endCol: -1,
|
||
endOffset: -1
|
||
};
|
||
}
|
||
_runParsingLoop() {
|
||
if (this.inLoop)
|
||
return;
|
||
this.inLoop = true;
|
||
while (this.active && !this.paused) {
|
||
this.consumedAfterSnapshot = 0;
|
||
const cp = this._consume();
|
||
if (!this._ensureHibernation()) {
|
||
this._callState(cp);
|
||
}
|
||
}
|
||
this.inLoop = false;
|
||
}
|
||
//API
|
||
pause() {
|
||
this.paused = true;
|
||
}
|
||
resume(writeCallback) {
|
||
if (!this.paused) {
|
||
throw new Error("Parser was already resumed");
|
||
}
|
||
this.paused = false;
|
||
if (this.inLoop)
|
||
return;
|
||
this._runParsingLoop();
|
||
if (!this.paused) {
|
||
writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();
|
||
}
|
||
}
|
||
write(chunk, isLastChunk, writeCallback) {
|
||
this.active = true;
|
||
this.preprocessor.write(chunk, isLastChunk);
|
||
this._runParsingLoop();
|
||
if (!this.paused) {
|
||
writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback();
|
||
}
|
||
}
|
||
insertHtmlAtCurrentPos(chunk) {
|
||
this.active = true;
|
||
this.preprocessor.insertHtmlAtCurrentPos(chunk);
|
||
this._runParsingLoop();
|
||
}
|
||
//Hibernation
|
||
_ensureHibernation() {
|
||
if (this.preprocessor.endOfChunkHit) {
|
||
this._unconsume(this.consumedAfterSnapshot);
|
||
this.active = false;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
//Consumption
|
||
_consume() {
|
||
this.consumedAfterSnapshot++;
|
||
return this.preprocessor.advance();
|
||
}
|
||
_unconsume(count) {
|
||
this.consumedAfterSnapshot -= count;
|
||
this.preprocessor.retreat(count);
|
||
}
|
||
_reconsumeInState(state, cp) {
|
||
this.state = state;
|
||
this._callState(cp);
|
||
}
|
||
_advanceBy(count) {
|
||
this.consumedAfterSnapshot += count;
|
||
for (let i = 0; i < count; i++) {
|
||
this.preprocessor.advance();
|
||
}
|
||
}
|
||
_consumeSequenceIfMatch(pattern, caseSensitive) {
|
||
if (this.preprocessor.startsWith(pattern, caseSensitive)) {
|
||
this._advanceBy(pattern.length - 1);
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
//Token creation
|
||
_createStartTagToken() {
|
||
this.currentToken = {
|
||
type: TokenType.START_TAG,
|
||
tagName: "",
|
||
tagID: TAG_ID.UNKNOWN,
|
||
selfClosing: false,
|
||
ackSelfClosing: false,
|
||
attrs: [],
|
||
location: this.getCurrentLocation(1)
|
||
};
|
||
}
|
||
_createEndTagToken() {
|
||
this.currentToken = {
|
||
type: TokenType.END_TAG,
|
||
tagName: "",
|
||
tagID: TAG_ID.UNKNOWN,
|
||
selfClosing: false,
|
||
ackSelfClosing: false,
|
||
attrs: [],
|
||
location: this.getCurrentLocation(2)
|
||
};
|
||
}
|
||
_createCommentToken(offset) {
|
||
this.currentToken = {
|
||
type: TokenType.COMMENT,
|
||
data: "",
|
||
location: this.getCurrentLocation(offset)
|
||
};
|
||
}
|
||
_createDoctypeToken(initialName) {
|
||
this.currentToken = {
|
||
type: TokenType.DOCTYPE,
|
||
name: initialName,
|
||
forceQuirks: false,
|
||
publicId: null,
|
||
systemId: null,
|
||
location: this.currentLocation
|
||
};
|
||
}
|
||
_createCharacterToken(type, chars) {
|
||
this.currentCharacterToken = {
|
||
type,
|
||
chars,
|
||
location: this.currentLocation
|
||
};
|
||
}
|
||
//Tag attributes
|
||
_createAttr(attrNameFirstCh) {
|
||
this.currentAttr = {
|
||
name: attrNameFirstCh,
|
||
value: ""
|
||
};
|
||
this.currentLocation = this.getCurrentLocation(0);
|
||
}
|
||
_leaveAttrName() {
|
||
var _a2;
|
||
var _b;
|
||
const token = this.currentToken;
|
||
if (getTokenAttr(token, this.currentAttr.name) === null) {
|
||
token.attrs.push(this.currentAttr);
|
||
if (token.location && this.currentLocation) {
|
||
const attrLocations = (_a2 = (_b = token.location).attrs) !== null && _a2 !== void 0 ? _a2 : _b.attrs = /* @__PURE__ */ Object.create(null);
|
||
attrLocations[this.currentAttr.name] = this.currentLocation;
|
||
this._leaveAttrValue();
|
||
}
|
||
} else {
|
||
this._err(ERR.duplicateAttribute);
|
||
}
|
||
}
|
||
_leaveAttrValue() {
|
||
if (this.currentLocation) {
|
||
this.currentLocation.endLine = this.preprocessor.line;
|
||
this.currentLocation.endCol = this.preprocessor.col;
|
||
this.currentLocation.endOffset = this.preprocessor.offset;
|
||
}
|
||
}
|
||
//Token emission
|
||
prepareToken(ct) {
|
||
this._emitCurrentCharacterToken(ct.location);
|
||
this.currentToken = null;
|
||
if (ct.location) {
|
||
ct.location.endLine = this.preprocessor.line;
|
||
ct.location.endCol = this.preprocessor.col + 1;
|
||
ct.location.endOffset = this.preprocessor.offset + 1;
|
||
}
|
||
this.currentLocation = this.getCurrentLocation(-1);
|
||
}
|
||
emitCurrentTagToken() {
|
||
const ct = this.currentToken;
|
||
this.prepareToken(ct);
|
||
ct.tagID = getTagID(ct.tagName);
|
||
if (ct.type === TokenType.START_TAG) {
|
||
this.lastStartTagName = ct.tagName;
|
||
this.handler.onStartTag(ct);
|
||
} else {
|
||
if (ct.attrs.length > 0) {
|
||
this._err(ERR.endTagWithAttributes);
|
||
}
|
||
if (ct.selfClosing) {
|
||
this._err(ERR.endTagWithTrailingSolidus);
|
||
}
|
||
this.handler.onEndTag(ct);
|
||
}
|
||
this.preprocessor.dropParsedChunk();
|
||
}
|
||
emitCurrentComment(ct) {
|
||
this.prepareToken(ct);
|
||
this.handler.onComment(ct);
|
||
this.preprocessor.dropParsedChunk();
|
||
}
|
||
emitCurrentDoctype(ct) {
|
||
this.prepareToken(ct);
|
||
this.handler.onDoctype(ct);
|
||
this.preprocessor.dropParsedChunk();
|
||
}
|
||
_emitCurrentCharacterToken(nextLocation) {
|
||
if (this.currentCharacterToken) {
|
||
if (nextLocation && this.currentCharacterToken.location) {
|
||
this.currentCharacterToken.location.endLine = nextLocation.startLine;
|
||
this.currentCharacterToken.location.endCol = nextLocation.startCol;
|
||
this.currentCharacterToken.location.endOffset = nextLocation.startOffset;
|
||
}
|
||
switch (this.currentCharacterToken.type) {
|
||
case TokenType.CHARACTER: {
|
||
this.handler.onCharacter(this.currentCharacterToken);
|
||
break;
|
||
}
|
||
case TokenType.NULL_CHARACTER: {
|
||
this.handler.onNullCharacter(this.currentCharacterToken);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
this.handler.onWhitespaceCharacter(this.currentCharacterToken);
|
||
break;
|
||
}
|
||
}
|
||
this.currentCharacterToken = null;
|
||
}
|
||
}
|
||
_emitEOFToken() {
|
||
const location2 = this.getCurrentLocation(0);
|
||
if (location2) {
|
||
location2.endLine = location2.startLine;
|
||
location2.endCol = location2.startCol;
|
||
location2.endOffset = location2.startOffset;
|
||
}
|
||
this._emitCurrentCharacterToken(location2);
|
||
this.handler.onEof({ type: TokenType.EOF, location: location2 });
|
||
this.active = false;
|
||
}
|
||
//Characters emission
|
||
//OPTIMIZATION: specification uses only one type of character tokens (one token per character).
|
||
//This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.
|
||
//If we have a sequence of characters that belong to the same group, the parser can process it
|
||
//as a single solid character token.
|
||
//So, there are 3 types of character tokens in parse5:
|
||
//1)TokenType.NULL_CHARACTER - \u0000-character sequences (e.g. '\u0000\u0000\u0000')
|
||
//2)TokenType.WHITESPACE_CHARACTER - any whitespace/new-line character sequences (e.g. '\n \r\t \f')
|
||
//3)TokenType.CHARACTER - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')
|
||
_appendCharToCurrentCharacterToken(type, ch) {
|
||
if (this.currentCharacterToken) {
|
||
if (this.currentCharacterToken.type !== type) {
|
||
this.currentLocation = this.getCurrentLocation(0);
|
||
this._emitCurrentCharacterToken(this.currentLocation);
|
||
this.preprocessor.dropParsedChunk();
|
||
} else {
|
||
this.currentCharacterToken.chars += ch;
|
||
return;
|
||
}
|
||
}
|
||
this._createCharacterToken(type, ch);
|
||
}
|
||
_emitCodePoint(cp) {
|
||
const type = isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER;
|
||
this._appendCharToCurrentCharacterToken(type, String.fromCodePoint(cp));
|
||
}
|
||
//NOTE: used when we emit characters explicitly.
|
||
//This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.
|
||
_emitChars(ch) {
|
||
this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);
|
||
}
|
||
// Character reference helpers
|
||
_matchNamedCharacterReference(cp) {
|
||
let result = null;
|
||
let excess = 0;
|
||
let withoutSemicolon = false;
|
||
for (let i = 0, current = decode_data_html_default[0]; i >= 0; cp = this._consume()) {
|
||
i = determineBranch(decode_data_html_default, current, i + 1, cp);
|
||
if (i < 0)
|
||
break;
|
||
excess += 1;
|
||
current = decode_data_html_default[i];
|
||
const masked = current & BinTrieFlags.VALUE_LENGTH;
|
||
if (masked) {
|
||
const valueLength = (masked >> 14) - 1;
|
||
if (cp !== CODE_POINTS.SEMICOLON && this._isCharacterReferenceInAttribute() && isEntityInAttributeInvalidEnd2(this.preprocessor.peek(1))) {
|
||
result = [CODE_POINTS.AMPERSAND];
|
||
i += valueLength;
|
||
} else {
|
||
result = valueLength === 0 ? [decode_data_html_default[i] & ~BinTrieFlags.VALUE_LENGTH] : valueLength === 1 ? [decode_data_html_default[++i]] : [decode_data_html_default[++i], decode_data_html_default[++i]];
|
||
excess = 0;
|
||
withoutSemicolon = cp !== CODE_POINTS.SEMICOLON;
|
||
}
|
||
if (valueLength === 0) {
|
||
this._consume();
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
this._unconsume(excess);
|
||
if (withoutSemicolon && !this.preprocessor.endOfChunkHit) {
|
||
this._err(ERR.missingSemicolonAfterCharacterReference);
|
||
}
|
||
this._unconsume(1);
|
||
return result;
|
||
}
|
||
_isCharacterReferenceInAttribute() {
|
||
return this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED;
|
||
}
|
||
_flushCodePointConsumedAsCharacterReference(cp) {
|
||
if (this._isCharacterReferenceInAttribute()) {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
} else {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
// Calling states this way turns out to be much faster than any other approach.
|
||
_callState(cp) {
|
||
switch (this.state) {
|
||
case State.DATA: {
|
||
this._stateData(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA: {
|
||
this._stateRcdata(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT: {
|
||
this._stateRawtext(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA: {
|
||
this._stateScriptData(cp);
|
||
break;
|
||
}
|
||
case State.PLAINTEXT: {
|
||
this._statePlaintext(cp);
|
||
break;
|
||
}
|
||
case State.TAG_OPEN: {
|
||
this._stateTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.END_TAG_OPEN: {
|
||
this._stateEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.TAG_NAME: {
|
||
this._stateTagName(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA_LESS_THAN_SIGN: {
|
||
this._stateRcdataLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA_END_TAG_OPEN: {
|
||
this._stateRcdataEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.RCDATA_END_TAG_NAME: {
|
||
this._stateRcdataEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT_LESS_THAN_SIGN: {
|
||
this._stateRawtextLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT_END_TAG_OPEN: {
|
||
this._stateRawtextEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.RAWTEXT_END_TAG_NAME: {
|
||
this._stateRawtextEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_LESS_THAN_SIGN: {
|
||
this._stateScriptDataLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_END_TAG_OPEN: {
|
||
this._stateScriptDataEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_END_TAG_NAME: {
|
||
this._stateScriptDataEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPE_START: {
|
||
this._stateScriptDataEscapeStart(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPE_START_DASH: {
|
||
this._stateScriptDataEscapeStartDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED: {
|
||
this._stateScriptDataEscaped(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_DASH: {
|
||
this._stateScriptDataEscapedDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_DASH_DASH: {
|
||
this._stateScriptDataEscapedDashDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: {
|
||
this._stateScriptDataEscapedLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: {
|
||
this._stateScriptDataEscapedEndTagOpen(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME: {
|
||
this._stateScriptDataEscapedEndTagName(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPE_START: {
|
||
this._stateScriptDataDoubleEscapeStart(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED: {
|
||
this._stateScriptDataDoubleEscaped(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: {
|
||
this._stateScriptDataDoubleEscapedDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: {
|
||
this._stateScriptDataDoubleEscapedDashDash(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: {
|
||
this._stateScriptDataDoubleEscapedLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.SCRIPT_DATA_DOUBLE_ESCAPE_END: {
|
||
this._stateScriptDataDoubleEscapeEnd(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_ATTRIBUTE_NAME: {
|
||
this._stateBeforeAttributeName(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_NAME: {
|
||
this._stateAttributeName(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_ATTRIBUTE_NAME: {
|
||
this._stateAfterAttributeName(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_ATTRIBUTE_VALUE: {
|
||
this._stateBeforeAttributeValue(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED: {
|
||
this._stateAttributeValueDoubleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_VALUE_SINGLE_QUOTED: {
|
||
this._stateAttributeValueSingleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.ATTRIBUTE_VALUE_UNQUOTED: {
|
||
this._stateAttributeValueUnquoted(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_ATTRIBUTE_VALUE_QUOTED: {
|
||
this._stateAfterAttributeValueQuoted(cp);
|
||
break;
|
||
}
|
||
case State.SELF_CLOSING_START_TAG: {
|
||
this._stateSelfClosingStartTag(cp);
|
||
break;
|
||
}
|
||
case State.BOGUS_COMMENT: {
|
||
this._stateBogusComment(cp);
|
||
break;
|
||
}
|
||
case State.MARKUP_DECLARATION_OPEN: {
|
||
this._stateMarkupDeclarationOpen(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_START: {
|
||
this._stateCommentStart(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_START_DASH: {
|
||
this._stateCommentStartDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT: {
|
||
this._stateComment(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN: {
|
||
this._stateCommentLessThanSign(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN_BANG: {
|
||
this._stateCommentLessThanSignBang(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN_BANG_DASH: {
|
||
this._stateCommentLessThanSignBangDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: {
|
||
this._stateCommentLessThanSignBangDashDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_END_DASH: {
|
||
this._stateCommentEndDash(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_END: {
|
||
this._stateCommentEnd(cp);
|
||
break;
|
||
}
|
||
case State.COMMENT_END_BANG: {
|
||
this._stateCommentEndBang(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE: {
|
||
this._stateDoctype(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_DOCTYPE_NAME: {
|
||
this._stateBeforeDoctypeName(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_NAME: {
|
||
this._stateDoctypeName(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_NAME: {
|
||
this._stateAfterDoctypeName(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_PUBLIC_KEYWORD: {
|
||
this._stateAfterDoctypePublicKeyword(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: {
|
||
this._stateBeforeDoctypePublicIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: {
|
||
this._stateDoctypePublicIdentifierDoubleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: {
|
||
this._stateDoctypePublicIdentifierSingleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: {
|
||
this._stateAfterDoctypePublicIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: {
|
||
this._stateBetweenDoctypePublicAndSystemIdentifiers(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_SYSTEM_KEYWORD: {
|
||
this._stateAfterDoctypeSystemKeyword(cp);
|
||
break;
|
||
}
|
||
case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: {
|
||
this._stateBeforeDoctypeSystemIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: {
|
||
this._stateDoctypeSystemIdentifierDoubleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: {
|
||
this._stateDoctypeSystemIdentifierSingleQuoted(cp);
|
||
break;
|
||
}
|
||
case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: {
|
||
this._stateAfterDoctypeSystemIdentifier(cp);
|
||
break;
|
||
}
|
||
case State.BOGUS_DOCTYPE: {
|
||
this._stateBogusDoctype(cp);
|
||
break;
|
||
}
|
||
case State.CDATA_SECTION: {
|
||
this._stateCdataSection(cp);
|
||
break;
|
||
}
|
||
case State.CDATA_SECTION_BRACKET: {
|
||
this._stateCdataSectionBracket(cp);
|
||
break;
|
||
}
|
||
case State.CDATA_SECTION_END: {
|
||
this._stateCdataSectionEnd(cp);
|
||
break;
|
||
}
|
||
case State.CHARACTER_REFERENCE: {
|
||
this._stateCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.NAMED_CHARACTER_REFERENCE: {
|
||
this._stateNamedCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.AMBIGUOUS_AMPERSAND: {
|
||
this._stateAmbiguousAmpersand(cp);
|
||
break;
|
||
}
|
||
case State.NUMERIC_CHARACTER_REFERENCE: {
|
||
this._stateNumericCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.HEXADEMICAL_CHARACTER_REFERENCE_START: {
|
||
this._stateHexademicalCharacterReferenceStart(cp);
|
||
break;
|
||
}
|
||
case State.HEXADEMICAL_CHARACTER_REFERENCE: {
|
||
this._stateHexademicalCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.DECIMAL_CHARACTER_REFERENCE: {
|
||
this._stateDecimalCharacterReference(cp);
|
||
break;
|
||
}
|
||
case State.NUMERIC_CHARACTER_REFERENCE_END: {
|
||
this._stateNumericCharacterReferenceEnd(cp);
|
||
break;
|
||
}
|
||
default: {
|
||
throw new Error("Unknown state");
|
||
}
|
||
}
|
||
}
|
||
// State machine
|
||
// Data state
|
||
//------------------------------------------------------------------
|
||
_stateData(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.TAG_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.DATA;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitCodePoint(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// RCDATA state
|
||
//------------------------------------------------------------------
|
||
_stateRcdata(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.RCDATA;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.RCDATA_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// RAWTEXT state
|
||
//------------------------------------------------------------------
|
||
_stateRawtext(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.RAWTEXT_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data state
|
||
//------------------------------------------------------------------
|
||
_stateScriptData(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// PLAINTEXT state
|
||
//------------------------------------------------------------------
|
||
_statePlaintext(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Tag open state
|
||
//------------------------------------------------------------------
|
||
_stateTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this._createStartTagToken();
|
||
this.state = State.TAG_NAME;
|
||
this._stateTagName(cp);
|
||
} else
|
||
switch (cp) {
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
this.state = State.MARKUP_DECLARATION_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.END_TAG_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUESTION_MARK: {
|
||
this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);
|
||
this._createCommentToken(1);
|
||
this.state = State.BOGUS_COMMENT;
|
||
this._stateBogusComment(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofBeforeTagName);
|
||
this._emitChars("<");
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.invalidFirstCharacterOfTagName);
|
||
this._emitChars("<");
|
||
this.state = State.DATA;
|
||
this._stateData(cp);
|
||
}
|
||
}
|
||
}
|
||
// End tag open state
|
||
//------------------------------------------------------------------
|
||
_stateEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this._createEndTagToken();
|
||
this.state = State.TAG_NAME;
|
||
this._stateTagName(cp);
|
||
} else
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingEndTagName);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofBeforeTagName);
|
||
this._emitChars("</");
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.invalidFirstCharacterOfTagName);
|
||
this._createCommentToken(2);
|
||
this.state = State.BOGUS_COMMENT;
|
||
this._stateBogusComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Tag name state
|
||
//------------------------------------------------------------------
|
||
_stateTagName(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.tagName += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.tagName += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);
|
||
}
|
||
}
|
||
}
|
||
// RCDATA less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateRcdataLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.RCDATA_END_TAG_OPEN;
|
||
} else {
|
||
this._emitChars("<");
|
||
this.state = State.RCDATA;
|
||
this._stateRcdata(cp);
|
||
}
|
||
}
|
||
// RCDATA end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateRcdataEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.RCDATA_END_TAG_NAME;
|
||
this._stateRcdataEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.RCDATA;
|
||
this._stateRcdata(cp);
|
||
}
|
||
}
|
||
handleSpecialEndTag(_cp) {
|
||
if (!this.preprocessor.startsWith(this.lastStartTagName, false)) {
|
||
return !this._ensureHibernation();
|
||
}
|
||
this._createEndTagToken();
|
||
const token = this.currentToken;
|
||
token.tagName = this.lastStartTagName;
|
||
const cp = this.preprocessor.peek(this.lastStartTagName.length);
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this._advanceBy(this.lastStartTagName.length);
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
return false;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this._advanceBy(this.lastStartTagName.length);
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
return false;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._advanceBy(this.lastStartTagName.length);
|
||
this.emitCurrentTagToken();
|
||
this.state = State.DATA;
|
||
return false;
|
||
}
|
||
default: {
|
||
return !this._ensureHibernation();
|
||
}
|
||
}
|
||
}
|
||
// RCDATA end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateRcdataEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.RCDATA;
|
||
this._stateRcdata(cp);
|
||
}
|
||
}
|
||
// RAWTEXT less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateRawtextLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.RAWTEXT_END_TAG_OPEN;
|
||
} else {
|
||
this._emitChars("<");
|
||
this.state = State.RAWTEXT;
|
||
this._stateRawtext(cp);
|
||
}
|
||
}
|
||
// RAWTEXT end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateRawtextEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.RAWTEXT_END_TAG_NAME;
|
||
this._stateRawtextEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.RAWTEXT;
|
||
this._stateRawtext(cp);
|
||
}
|
||
}
|
||
// RAWTEXT end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateRawtextEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.RAWTEXT;
|
||
this._stateRawtext(cp);
|
||
}
|
||
}
|
||
// Script data less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataLessThanSign(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.SCRIPT_DATA_END_TAG_OPEN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
this.state = State.SCRIPT_DATA_ESCAPE_START;
|
||
this._emitChars("<!");
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitChars("<");
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.SCRIPT_DATA_END_TAG_NAME;
|
||
this._stateScriptDataEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data escape start state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapeStart(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.SCRIPT_DATA_ESCAPE_START_DASH;
|
||
this._emitChars("-");
|
||
} else {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data escape start dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapeStartDash(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;
|
||
this._emitChars("-");
|
||
} else {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._stateScriptData(cp);
|
||
}
|
||
}
|
||
// Script data escaped state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscaped(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data escaped dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data escaped dash dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedDashDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._emitChars(">");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data escaped less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;
|
||
} else if (isAsciiLetter(cp)) {
|
||
this._emitChars("<");
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;
|
||
this._stateScriptDataDoubleEscapeStart(cp);
|
||
} else {
|
||
this._emitChars("<");
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data escaped end tag open state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedEndTagOpen(cp) {
|
||
if (isAsciiLetter(cp)) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;
|
||
this._stateScriptDataEscapedEndTagName(cp);
|
||
} else {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data escaped end tag name state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataEscapedEndTagName(cp) {
|
||
if (this.handleSpecialEndTag(cp)) {
|
||
this._emitChars("</");
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data double escape start state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapeStart(cp) {
|
||
if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
|
||
this._emitCodePoint(cp);
|
||
for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) {
|
||
this._emitCodePoint(this._consume());
|
||
}
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
} else if (!this._ensureHibernation()) {
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
this._stateScriptDataEscaped(cp);
|
||
}
|
||
}
|
||
// Script data double escaped state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscaped(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;
|
||
this._emitChars("<");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data double escaped dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapedDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH;
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;
|
||
this._emitChars("<");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data double escaped dash dash state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapedDashDash(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this._emitChars("-");
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;
|
||
this._emitChars("<");
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.SCRIPT_DATA;
|
||
this._emitChars(">");
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitChars(REPLACEMENT_CHARACTER);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInScriptHtmlCommentLikeText);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Script data double escaped less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapedLessThanSign(cp) {
|
||
if (cp === CODE_POINTS.SOLIDUS) {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;
|
||
this._emitChars("/");
|
||
} else {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._stateScriptDataDoubleEscaped(cp);
|
||
}
|
||
}
|
||
// Script data double escape end state
|
||
//------------------------------------------------------------------
|
||
_stateScriptDataDoubleEscapeEnd(cp) {
|
||
if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {
|
||
this._emitCodePoint(cp);
|
||
for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) {
|
||
this._emitCodePoint(this._consume());
|
||
}
|
||
this.state = State.SCRIPT_DATA_ESCAPED;
|
||
} else if (!this._ensureHibernation()) {
|
||
this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;
|
||
this._stateScriptDataDoubleEscaped(cp);
|
||
}
|
||
}
|
||
// Before attribute name state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeAttributeName(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS:
|
||
case CODE_POINTS.GREATER_THAN_SIGN:
|
||
case CODE_POINTS.EOF: {
|
||
this.state = State.AFTER_ATTRIBUTE_NAME;
|
||
this._stateAfterAttributeName(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EQUALS_SIGN: {
|
||
this._err(ERR.unexpectedEqualsSignBeforeAttributeName);
|
||
this._createAttr("=");
|
||
this.state = State.ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
default: {
|
||
this._createAttr("");
|
||
this.state = State.ATTRIBUTE_NAME;
|
||
this._stateAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute name state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeName(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED:
|
||
case CODE_POINTS.SOLIDUS:
|
||
case CODE_POINTS.GREATER_THAN_SIGN:
|
||
case CODE_POINTS.EOF: {
|
||
this._leaveAttrName();
|
||
this.state = State.AFTER_ATTRIBUTE_NAME;
|
||
this._stateAfterAttributeName(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EQUALS_SIGN: {
|
||
this._leaveAttrName();
|
||
this.state = State.BEFORE_ATTRIBUTE_VALUE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK:
|
||
case CODE_POINTS.APOSTROPHE:
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
this._err(ERR.unexpectedCharacterInAttributeName);
|
||
this.currentAttr.name += String.fromCodePoint(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.name += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);
|
||
}
|
||
}
|
||
}
|
||
// After attribute name state
|
||
//------------------------------------------------------------------
|
||
_stateAfterAttributeName(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EQUALS_SIGN: {
|
||
this.state = State.BEFORE_ATTRIBUTE_VALUE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._createAttr("");
|
||
this.state = State.ATTRIBUTE_NAME;
|
||
this._stateAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before attribute value state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeAttributeValue(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingAttributeValue);
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.ATTRIBUTE_VALUE_UNQUOTED;
|
||
this._stateAttributeValueUnquoted(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute value (double-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeValueDoubleQuoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.value += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute value (single-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeValueSingleQuoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.value += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Attribute value (unquoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAttributeValueUnquoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this._leaveAttrValue();
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.AMPERSAND: {
|
||
this.returnState = State.ATTRIBUTE_VALUE_UNQUOTED;
|
||
this.state = State.CHARACTER_REFERENCE;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._leaveAttrValue();
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this.currentAttr.value += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK:
|
||
case CODE_POINTS.APOSTROPHE:
|
||
case CODE_POINTS.LESS_THAN_SIGN:
|
||
case CODE_POINTS.EQUALS_SIGN:
|
||
case CODE_POINTS.GRAVE_ACCENT: {
|
||
this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this.currentAttr.value += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// After attribute value (quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateAfterAttributeValueQuoted(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this._leaveAttrValue();
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.SOLIDUS: {
|
||
this._leaveAttrValue();
|
||
this.state = State.SELF_CLOSING_START_TAG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._leaveAttrValue();
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingWhitespaceBetweenAttributes);
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
this._stateBeforeAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Self-closing start tag state
|
||
//------------------------------------------------------------------
|
||
_stateSelfClosingStartTag(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
const token = this.currentToken;
|
||
token.selfClosing = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentTagToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInTag);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.unexpectedSolidusInTag);
|
||
this.state = State.BEFORE_ATTRIBUTE_NAME;
|
||
this._stateBeforeAttributeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Bogus comment state
|
||
//------------------------------------------------------------------
|
||
_stateBogusComment(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.data += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Markup declaration open state
|
||
//------------------------------------------------------------------
|
||
_stateMarkupDeclarationOpen(cp) {
|
||
if (this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH, true)) {
|
||
this._createCommentToken(SEQUENCES.DASH_DASH.length + 1);
|
||
this.state = State.COMMENT_START;
|
||
} else if (this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE, false)) {
|
||
this.currentLocation = this.getCurrentLocation(SEQUENCES.DOCTYPE.length + 1);
|
||
this.state = State.DOCTYPE;
|
||
} else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) {
|
||
if (this.inForeignNode) {
|
||
this.state = State.CDATA_SECTION;
|
||
} else {
|
||
this._err(ERR.cdataInHtmlContent);
|
||
this._createCommentToken(SEQUENCES.CDATA_START.length + 1);
|
||
this.currentToken.data = "[CDATA[";
|
||
this.state = State.BOGUS_COMMENT;
|
||
}
|
||
} else if (!this._ensureHibernation()) {
|
||
this._err(ERR.incorrectlyOpenedComment);
|
||
this._createCommentToken(2);
|
||
this.state = State.BOGUS_COMMENT;
|
||
this._stateBogusComment(cp);
|
||
}
|
||
}
|
||
// Comment start state
|
||
//------------------------------------------------------------------
|
||
_stateCommentStart(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_START_DASH;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptClosingOfEmptyComment);
|
||
this.state = State.DATA;
|
||
const token = this.currentToken;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment start dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentStartDash(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_END;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptClosingOfEmptyComment);
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "-";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment state
|
||
//------------------------------------------------------------------
|
||
_stateComment(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_END_DASH;
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
token.data += "<";
|
||
this.state = State.COMMENT_LESS_THAN_SIGN;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.data += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment less-than sign state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSign(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
token.data += "!";
|
||
this.state = State.COMMENT_LESS_THAN_SIGN_BANG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.LESS_THAN_SIGN: {
|
||
token.data += "<";
|
||
break;
|
||
}
|
||
default: {
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment less-than sign bang state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSignBang(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;
|
||
} else {
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
// Comment less-than sign bang dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSignBangDash(cp) {
|
||
if (cp === CODE_POINTS.HYPHEN_MINUS) {
|
||
this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;
|
||
} else {
|
||
this.state = State.COMMENT_END_DASH;
|
||
this._stateCommentEndDash(cp);
|
||
}
|
||
}
|
||
// Comment less-than sign bang dash dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentLessThanSignBangDashDash(cp) {
|
||
if (cp !== CODE_POINTS.GREATER_THAN_SIGN && cp !== CODE_POINTS.EOF) {
|
||
this._err(ERR.nestedComment);
|
||
}
|
||
this.state = State.COMMENT_END;
|
||
this._stateCommentEnd(cp);
|
||
}
|
||
// Comment end dash state
|
||
//------------------------------------------------------------------
|
||
_stateCommentEndDash(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
this.state = State.COMMENT_END;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "-";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment end state
|
||
//------------------------------------------------------------------
|
||
_stateCommentEnd(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EXCLAMATION_MARK: {
|
||
this.state = State.COMMENT_END_BANG;
|
||
break;
|
||
}
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
token.data += "-";
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "--";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// Comment end bang state
|
||
//------------------------------------------------------------------
|
||
_stateCommentEndBang(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.HYPHEN_MINUS: {
|
||
token.data += "--!";
|
||
this.state = State.COMMENT_END_DASH;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.incorrectlyClosedComment);
|
||
this.state = State.DATA;
|
||
this.emitCurrentComment(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInComment);
|
||
this.emitCurrentComment(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.data += "--!";
|
||
this.state = State.COMMENT;
|
||
this._stateComment(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE state
|
||
//------------------------------------------------------------------
|
||
_stateDoctype(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_DOCTYPE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.BEFORE_DOCTYPE_NAME;
|
||
this._stateBeforeDoctypeName(cp);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
this._createDoctypeToken(null);
|
||
const token = this.currentToken;
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingWhitespaceBeforeDoctypeName);
|
||
this.state = State.BEFORE_DOCTYPE_NAME;
|
||
this._stateBeforeDoctypeName(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before DOCTYPE name state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeDoctypeName(cp) {
|
||
if (isAsciiUpper(cp)) {
|
||
this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp)));
|
||
this.state = State.DOCTYPE_NAME;
|
||
} else
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
this._createDoctypeToken(REPLACEMENT_CHARACTER);
|
||
this.state = State.DOCTYPE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypeName);
|
||
this._createDoctypeToken(null);
|
||
const token = this.currentToken;
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
this._createDoctypeToken(null);
|
||
const token = this.currentToken;
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._createDoctypeToken(String.fromCodePoint(cp));
|
||
this.state = State.DOCTYPE_NAME;
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE name state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypeName(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.AFTER_DOCTYPE_NAME;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.name += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE name state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypeName(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
if (this._consumeSequenceIfMatch(SEQUENCES.PUBLIC, false)) {
|
||
this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD;
|
||
} else if (this._consumeSequenceIfMatch(SEQUENCES.SYSTEM, false)) {
|
||
this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD;
|
||
} else if (!this._ensureHibernation()) {
|
||
this._err(ERR.invalidCharacterSequenceAfterDoctypeName);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE public keyword state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypePublicKeyword(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before DOCTYPE public identifier state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeDoctypePublicIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
token.publicId = "";
|
||
this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE public identifier (double-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypePublicIdentifierDoubleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.publicId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.publicId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE public identifier (single-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypePublicIdentifierSingleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.publicId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypePublicIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.publicId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE public identifier state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypePublicIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Between DOCTYPE public and system identifiers state
|
||
//------------------------------------------------------------------
|
||
_stateBetweenDoctypePublicAndSystemIdentifiers(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE system keyword state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypeSystemKeyword(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Before DOCTYPE system identifier state
|
||
//------------------------------------------------------------------
|
||
_stateBeforeDoctypeSystemIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
token.systemId = "";
|
||
this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.missingDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.DATA;
|
||
this.emitCurrentDoctype(token);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE system identifier (double-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypeSystemIdentifierDoubleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.QUOTATION_MARK: {
|
||
this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.systemId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.systemId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// DOCTYPE system identifier (single-quoted) state
|
||
//------------------------------------------------------------------
|
||
_stateDoctypeSystemIdentifierSingleQuoted(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.APOSTROPHE: {
|
||
this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
token.systemId += REPLACEMENT_CHARACTER;
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this._err(ERR.abruptDoctypeSystemIdentifier);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
token.systemId += String.fromCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// After DOCTYPE system identifier state
|
||
//------------------------------------------------------------------
|
||
_stateAfterDoctypeSystemIdentifier(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.SPACE:
|
||
case CODE_POINTS.LINE_FEED:
|
||
case CODE_POINTS.TABULATION:
|
||
case CODE_POINTS.FORM_FEED: {
|
||
break;
|
||
}
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInDoctype);
|
||
token.forceQuirks = true;
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);
|
||
this.state = State.BOGUS_DOCTYPE;
|
||
this._stateBogusDoctype(cp);
|
||
}
|
||
}
|
||
}
|
||
// Bogus DOCTYPE state
|
||
//------------------------------------------------------------------
|
||
_stateBogusDoctype(cp) {
|
||
const token = this.currentToken;
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.emitCurrentDoctype(token);
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.NULL: {
|
||
this._err(ERR.unexpectedNullCharacter);
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this.emitCurrentDoctype(token);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
// CDATA section state
|
||
//------------------------------------------------------------------
|
||
_stateCdataSection(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
|
||
this.state = State.CDATA_SECTION_BRACKET;
|
||
break;
|
||
}
|
||
case CODE_POINTS.EOF: {
|
||
this._err(ERR.eofInCdata);
|
||
this._emitEOFToken();
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitCodePoint(cp);
|
||
}
|
||
}
|
||
}
|
||
// CDATA section bracket state
|
||
//------------------------------------------------------------------
|
||
_stateCdataSectionBracket(cp) {
|
||
if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) {
|
||
this.state = State.CDATA_SECTION_END;
|
||
} else {
|
||
this._emitChars("]");
|
||
this.state = State.CDATA_SECTION;
|
||
this._stateCdataSection(cp);
|
||
}
|
||
}
|
||
// CDATA section end state
|
||
//------------------------------------------------------------------
|
||
_stateCdataSectionEnd(cp) {
|
||
switch (cp) {
|
||
case CODE_POINTS.GREATER_THAN_SIGN: {
|
||
this.state = State.DATA;
|
||
break;
|
||
}
|
||
case CODE_POINTS.RIGHT_SQUARE_BRACKET: {
|
||
this._emitChars("]");
|
||
break;
|
||
}
|
||
default: {
|
||
this._emitChars("]]");
|
||
this.state = State.CDATA_SECTION;
|
||
this._stateCdataSection(cp);
|
||
}
|
||
}
|
||
}
|
||
// Character reference state
|
||
//------------------------------------------------------------------
|
||
_stateCharacterReference(cp) {
|
||
if (cp === CODE_POINTS.NUMBER_SIGN) {
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE;
|
||
} else if (isAsciiAlphaNumeric2(cp)) {
|
||
this.state = State.NAMED_CHARACTER_REFERENCE;
|
||
this._stateNamedCharacterReference(cp);
|
||
} else {
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
}
|
||
// Named character reference state
|
||
//------------------------------------------------------------------
|
||
_stateNamedCharacterReference(cp) {
|
||
const matchResult = this._matchNamedCharacterReference(cp);
|
||
if (this._ensureHibernation()) {
|
||
} else if (matchResult) {
|
||
for (let i = 0; i < matchResult.length; i++) {
|
||
this._flushCodePointConsumedAsCharacterReference(matchResult[i]);
|
||
}
|
||
this.state = this.returnState;
|
||
} else {
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this.state = State.AMBIGUOUS_AMPERSAND;
|
||
}
|
||
}
|
||
// Ambiguos ampersand state
|
||
//------------------------------------------------------------------
|
||
_stateAmbiguousAmpersand(cp) {
|
||
if (isAsciiAlphaNumeric2(cp)) {
|
||
this._flushCodePointConsumedAsCharacterReference(cp);
|
||
} else {
|
||
if (cp === CODE_POINTS.SEMICOLON) {
|
||
this._err(ERR.unknownNamedCharacterReference);
|
||
}
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
}
|
||
// Numeric character reference state
|
||
//------------------------------------------------------------------
|
||
_stateNumericCharacterReference(cp) {
|
||
this.charRefCode = 0;
|
||
if (cp === CODE_POINTS.LATIN_SMALL_X || cp === CODE_POINTS.LATIN_CAPITAL_X) {
|
||
this.state = State.HEXADEMICAL_CHARACTER_REFERENCE_START;
|
||
} else if (isAsciiDigit(cp)) {
|
||
this.state = State.DECIMAL_CHARACTER_REFERENCE;
|
||
this._stateDecimalCharacterReference(cp);
|
||
} else {
|
||
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN);
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
}
|
||
// Hexademical character reference start state
|
||
//------------------------------------------------------------------
|
||
_stateHexademicalCharacterReferenceStart(cp) {
|
||
if (isAsciiHexDigit(cp)) {
|
||
this.state = State.HEXADEMICAL_CHARACTER_REFERENCE;
|
||
this._stateHexademicalCharacterReference(cp);
|
||
} else {
|
||
this._err(ERR.absenceOfDigitsInNumericCharacterReference);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);
|
||
this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.NUMBER_SIGN);
|
||
this._unconsume(2);
|
||
this.state = this.returnState;
|
||
}
|
||
}
|
||
// Hexademical character reference state
|
||
//------------------------------------------------------------------
|
||
_stateHexademicalCharacterReference(cp) {
|
||
if (isAsciiUpperHexDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 16 + cp - 55;
|
||
} else if (isAsciiLowerHexDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 16 + cp - 87;
|
||
} else if (isAsciiDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 16 + cp - 48;
|
||
} else if (cp === CODE_POINTS.SEMICOLON) {
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
} else {
|
||
this._err(ERR.missingSemicolonAfterCharacterReference);
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
this._stateNumericCharacterReferenceEnd(cp);
|
||
}
|
||
}
|
||
// Decimal character reference state
|
||
//------------------------------------------------------------------
|
||
_stateDecimalCharacterReference(cp) {
|
||
if (isAsciiDigit(cp)) {
|
||
this.charRefCode = this.charRefCode * 10 + cp - 48;
|
||
} else if (cp === CODE_POINTS.SEMICOLON) {
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
} else {
|
||
this._err(ERR.missingSemicolonAfterCharacterReference);
|
||
this.state = State.NUMERIC_CHARACTER_REFERENCE_END;
|
||
this._stateNumericCharacterReferenceEnd(cp);
|
||
}
|
||
}
|
||
// Numeric character reference end state
|
||
//------------------------------------------------------------------
|
||
_stateNumericCharacterReferenceEnd(cp) {
|
||
if (this.charRefCode === CODE_POINTS.NULL) {
|
||
this._err(ERR.nullCharacterReference);
|
||
this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;
|
||
} else if (this.charRefCode > 1114111) {
|
||
this._err(ERR.characterReferenceOutsideUnicodeRange);
|
||
this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;
|
||
} else if (isSurrogate(this.charRefCode)) {
|
||
this._err(ERR.surrogateCharacterReference);
|
||
this.charRefCode = CODE_POINTS.REPLACEMENT_CHARACTER;
|
||
} else if (isUndefinedCodePoint(this.charRefCode)) {
|
||
this._err(ERR.noncharacterCharacterReference);
|
||
} else if (isControlCodePoint(this.charRefCode) || this.charRefCode === CODE_POINTS.CARRIAGE_RETURN) {
|
||
this._err(ERR.controlCharacterReference);
|
||
const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS.get(this.charRefCode);
|
||
if (replacement !== void 0) {
|
||
this.charRefCode = replacement;
|
||
}
|
||
}
|
||
this._flushCodePointConsumedAsCharacterReference(this.charRefCode);
|
||
this._reconsumeInState(this.returnState, cp);
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/parser/open-element-stack.js
|
||
var IMPLICIT_END_TAG_REQUIRED = /* @__PURE__ */ new Set([TAG_ID.DD, TAG_ID.DT, TAG_ID.LI, TAG_ID.OPTGROUP, TAG_ID.OPTION, TAG_ID.P, TAG_ID.RB, TAG_ID.RP, TAG_ID.RT, TAG_ID.RTC]);
|
||
var IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = /* @__PURE__ */ new Set([
|
||
...IMPLICIT_END_TAG_REQUIRED,
|
||
TAG_ID.CAPTION,
|
||
TAG_ID.COLGROUP,
|
||
TAG_ID.TBODY,
|
||
TAG_ID.TD,
|
||
TAG_ID.TFOOT,
|
||
TAG_ID.TH,
|
||
TAG_ID.THEAD,
|
||
TAG_ID.TR
|
||
]);
|
||
var SCOPING_ELEMENT_NS = /* @__PURE__ */ new Map([
|
||
[TAG_ID.APPLET, NS.HTML],
|
||
[TAG_ID.CAPTION, NS.HTML],
|
||
[TAG_ID.HTML, NS.HTML],
|
||
[TAG_ID.MARQUEE, NS.HTML],
|
||
[TAG_ID.OBJECT, NS.HTML],
|
||
[TAG_ID.TABLE, NS.HTML],
|
||
[TAG_ID.TD, NS.HTML],
|
||
[TAG_ID.TEMPLATE, NS.HTML],
|
||
[TAG_ID.TH, NS.HTML],
|
||
[TAG_ID.ANNOTATION_XML, NS.MATHML],
|
||
[TAG_ID.MI, NS.MATHML],
|
||
[TAG_ID.MN, NS.MATHML],
|
||
[TAG_ID.MO, NS.MATHML],
|
||
[TAG_ID.MS, NS.MATHML],
|
||
[TAG_ID.MTEXT, NS.MATHML],
|
||
[TAG_ID.DESC, NS.SVG],
|
||
[TAG_ID.FOREIGN_OBJECT, NS.SVG],
|
||
[TAG_ID.TITLE, NS.SVG]
|
||
]);
|
||
var NAMED_HEADERS = [TAG_ID.H1, TAG_ID.H2, TAG_ID.H3, TAG_ID.H4, TAG_ID.H5, TAG_ID.H6];
|
||
var TABLE_ROW_CONTEXT = [TAG_ID.TR, TAG_ID.TEMPLATE, TAG_ID.HTML];
|
||
var TABLE_BODY_CONTEXT = [TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TEMPLATE, TAG_ID.HTML];
|
||
var TABLE_CONTEXT = [TAG_ID.TABLE, TAG_ID.TEMPLATE, TAG_ID.HTML];
|
||
var TABLE_CELLS = [TAG_ID.TD, TAG_ID.TH];
|
||
var OpenElementStack = class {
|
||
get currentTmplContentOrNode() {
|
||
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
|
||
}
|
||
constructor(document2, treeAdapter, handler) {
|
||
this.treeAdapter = treeAdapter;
|
||
this.handler = handler;
|
||
this.items = [];
|
||
this.tagIDs = [];
|
||
this.stackTop = -1;
|
||
this.tmplCount = 0;
|
||
this.currentTagId = TAG_ID.UNKNOWN;
|
||
this.current = document2;
|
||
}
|
||
//Index of element
|
||
_indexOf(element3) {
|
||
return this.items.lastIndexOf(element3, this.stackTop);
|
||
}
|
||
//Update current element
|
||
_isInTemplate() {
|
||
return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;
|
||
}
|
||
_updateCurrentElement() {
|
||
this.current = this.items[this.stackTop];
|
||
this.currentTagId = this.tagIDs[this.stackTop];
|
||
}
|
||
//Mutations
|
||
push(element3, tagID) {
|
||
this.stackTop++;
|
||
this.items[this.stackTop] = element3;
|
||
this.current = element3;
|
||
this.tagIDs[this.stackTop] = tagID;
|
||
this.currentTagId = tagID;
|
||
if (this._isInTemplate()) {
|
||
this.tmplCount++;
|
||
}
|
||
this.handler.onItemPush(element3, tagID, true);
|
||
}
|
||
pop() {
|
||
const popped = this.current;
|
||
if (this.tmplCount > 0 && this._isInTemplate()) {
|
||
this.tmplCount--;
|
||
}
|
||
this.stackTop--;
|
||
this._updateCurrentElement();
|
||
this.handler.onItemPop(popped, true);
|
||
}
|
||
replace(oldElement, newElement) {
|
||
const idx = this._indexOf(oldElement);
|
||
this.items[idx] = newElement;
|
||
if (idx === this.stackTop) {
|
||
this.current = newElement;
|
||
}
|
||
}
|
||
insertAfter(referenceElement, newElement, newElementID) {
|
||
const insertionIdx = this._indexOf(referenceElement) + 1;
|
||
this.items.splice(insertionIdx, 0, newElement);
|
||
this.tagIDs.splice(insertionIdx, 0, newElementID);
|
||
this.stackTop++;
|
||
if (insertionIdx === this.stackTop) {
|
||
this._updateCurrentElement();
|
||
}
|
||
this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);
|
||
}
|
||
popUntilTagNamePopped(tagName) {
|
||
let targetIdx = this.stackTop + 1;
|
||
do {
|
||
targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);
|
||
} while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);
|
||
this.shortenToLength(targetIdx < 0 ? 0 : targetIdx);
|
||
}
|
||
shortenToLength(idx) {
|
||
while (this.stackTop >= idx) {
|
||
const popped = this.current;
|
||
if (this.tmplCount > 0 && this._isInTemplate()) {
|
||
this.tmplCount -= 1;
|
||
}
|
||
this.stackTop--;
|
||
this._updateCurrentElement();
|
||
this.handler.onItemPop(popped, this.stackTop < idx);
|
||
}
|
||
}
|
||
popUntilElementPopped(element3) {
|
||
const idx = this._indexOf(element3);
|
||
this.shortenToLength(idx < 0 ? 0 : idx);
|
||
}
|
||
popUntilPopped(tagNames, targetNS) {
|
||
const idx = this._indexOfTagNames(tagNames, targetNS);
|
||
this.shortenToLength(idx < 0 ? 0 : idx);
|
||
}
|
||
popUntilNumberedHeaderPopped() {
|
||
this.popUntilPopped(NAMED_HEADERS, NS.HTML);
|
||
}
|
||
popUntilTableCellPopped() {
|
||
this.popUntilPopped(TABLE_CELLS, NS.HTML);
|
||
}
|
||
popAllUpToHtmlElement() {
|
||
this.tmplCount = 0;
|
||
this.shortenToLength(1);
|
||
}
|
||
_indexOfTagNames(tagNames, namespace) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
if (tagNames.includes(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) {
|
||
return i;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
clearBackTo(tagNames, targetNS) {
|
||
const idx = this._indexOfTagNames(tagNames, targetNS);
|
||
this.shortenToLength(idx + 1);
|
||
}
|
||
clearBackToTableContext() {
|
||
this.clearBackTo(TABLE_CONTEXT, NS.HTML);
|
||
}
|
||
clearBackToTableBodyContext() {
|
||
this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);
|
||
}
|
||
clearBackToTableRowContext() {
|
||
this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);
|
||
}
|
||
remove(element3) {
|
||
const idx = this._indexOf(element3);
|
||
if (idx >= 0) {
|
||
if (idx === this.stackTop) {
|
||
this.pop();
|
||
} else {
|
||
this.items.splice(idx, 1);
|
||
this.tagIDs.splice(idx, 1);
|
||
this.stackTop--;
|
||
this._updateCurrentElement();
|
||
this.handler.onItemPop(element3, false);
|
||
}
|
||
}
|
||
}
|
||
//Search
|
||
tryPeekProperlyNestedBodyElement() {
|
||
return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null;
|
||
}
|
||
contains(element3) {
|
||
return this._indexOf(element3) > -1;
|
||
}
|
||
getCommonAncestor(element3) {
|
||
const elementIdx = this._indexOf(element3) - 1;
|
||
return elementIdx >= 0 ? this.items[elementIdx] : null;
|
||
}
|
||
isRootHtmlElementCurrent() {
|
||
return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML;
|
||
}
|
||
//Element in scope
|
||
hasInScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (tn === tagName && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if (SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasNumberedHeaderInScope() {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (isNumberedHeader(tn) && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if (SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInListItemScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (tn === tagName && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if ((tn === TAG_ID.UL || tn === TAG_ID.OL) && ns === NS.HTML || SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInButtonScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (tn === tagName && ns === NS.HTML) {
|
||
return true;
|
||
}
|
||
if (tn === TAG_ID.BUTTON && ns === NS.HTML || SCOPING_ELEMENT_NS.get(tn) === ns) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInTableScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (ns !== NS.HTML) {
|
||
continue;
|
||
}
|
||
if (tn === tagName) {
|
||
return true;
|
||
}
|
||
if (tn === TAG_ID.TABLE || tn === TAG_ID.TEMPLATE || tn === TAG_ID.HTML) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasTableBodyContextInTableScope() {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (ns !== NS.HTML) {
|
||
continue;
|
||
}
|
||
if (tn === TAG_ID.TBODY || tn === TAG_ID.THEAD || tn === TAG_ID.TFOOT) {
|
||
return true;
|
||
}
|
||
if (tn === TAG_ID.TABLE || tn === TAG_ID.HTML) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
hasInSelectScope(tagName) {
|
||
for (let i = this.stackTop; i >= 0; i--) {
|
||
const tn = this.tagIDs[i];
|
||
const ns = this.treeAdapter.getNamespaceURI(this.items[i]);
|
||
if (ns !== NS.HTML) {
|
||
continue;
|
||
}
|
||
if (tn === tagName) {
|
||
return true;
|
||
}
|
||
if (tn !== TAG_ID.OPTION && tn !== TAG_ID.OPTGROUP) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
//Implied end tags
|
||
generateImpliedEndTags() {
|
||
while (IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) {
|
||
this.pop();
|
||
}
|
||
}
|
||
generateImpliedEndTagsThoroughly() {
|
||
while (IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
|
||
this.pop();
|
||
}
|
||
}
|
||
generateImpliedEndTagsWithExclusion(exclusionId) {
|
||
while (this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) {
|
||
this.pop();
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/parser/formatting-element-list.js
|
||
var NOAH_ARK_CAPACITY = 3;
|
||
var EntryType;
|
||
(function(EntryType2) {
|
||
EntryType2[EntryType2["Marker"] = 0] = "Marker";
|
||
EntryType2[EntryType2["Element"] = 1] = "Element";
|
||
})(EntryType = EntryType || (EntryType = {}));
|
||
var MARKER = { type: EntryType.Marker };
|
||
var FormattingElementList = class {
|
||
constructor(treeAdapter) {
|
||
this.treeAdapter = treeAdapter;
|
||
this.entries = [];
|
||
this.bookmark = null;
|
||
}
|
||
//Noah Ark's condition
|
||
//OPTIMIZATION: at first we try to find possible candidates for exclusion using
|
||
//lightweight heuristics without thorough attributes check.
|
||
_getNoahArkConditionCandidates(newElement, neAttrs) {
|
||
const candidates = [];
|
||
const neAttrsLength = neAttrs.length;
|
||
const neTagName = this.treeAdapter.getTagName(newElement);
|
||
const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);
|
||
for (let i = 0; i < this.entries.length; i++) {
|
||
const entry = this.entries[i];
|
||
if (entry.type === EntryType.Marker) {
|
||
break;
|
||
}
|
||
const { element: element3 } = entry;
|
||
if (this.treeAdapter.getTagName(element3) === neTagName && this.treeAdapter.getNamespaceURI(element3) === neNamespaceURI) {
|
||
const elementAttrs = this.treeAdapter.getAttrList(element3);
|
||
if (elementAttrs.length === neAttrsLength) {
|
||
candidates.push({ idx: i, attrs: elementAttrs });
|
||
}
|
||
}
|
||
}
|
||
return candidates;
|
||
}
|
||
_ensureNoahArkCondition(newElement) {
|
||
if (this.entries.length < NOAH_ARK_CAPACITY)
|
||
return;
|
||
const neAttrs = this.treeAdapter.getAttrList(newElement);
|
||
const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);
|
||
if (candidates.length < NOAH_ARK_CAPACITY)
|
||
return;
|
||
const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));
|
||
let validCandidates = 0;
|
||
for (let i = 0; i < candidates.length; i++) {
|
||
const candidate = candidates[i];
|
||
if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {
|
||
validCandidates += 1;
|
||
if (validCandidates >= NOAH_ARK_CAPACITY) {
|
||
this.entries.splice(candidate.idx, 1);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
//Mutations
|
||
insertMarker() {
|
||
this.entries.unshift(MARKER);
|
||
}
|
||
pushElement(element3, token) {
|
||
this._ensureNoahArkCondition(element3);
|
||
this.entries.unshift({
|
||
type: EntryType.Element,
|
||
element: element3,
|
||
token
|
||
});
|
||
}
|
||
insertElementAfterBookmark(element3, token) {
|
||
const bookmarkIdx = this.entries.indexOf(this.bookmark);
|
||
this.entries.splice(bookmarkIdx, 0, {
|
||
type: EntryType.Element,
|
||
element: element3,
|
||
token
|
||
});
|
||
}
|
||
removeEntry(entry) {
|
||
const entryIndex = this.entries.indexOf(entry);
|
||
if (entryIndex >= 0) {
|
||
this.entries.splice(entryIndex, 1);
|
||
}
|
||
}
|
||
/**
|
||
* Clears the list of formatting elements up to the last marker.
|
||
*
|
||
* @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker
|
||
*/
|
||
clearToLastMarker() {
|
||
const markerIdx = this.entries.indexOf(MARKER);
|
||
if (markerIdx >= 0) {
|
||
this.entries.splice(0, markerIdx + 1);
|
||
} else {
|
||
this.entries.length = 0;
|
||
}
|
||
}
|
||
//Search
|
||
getElementEntryInScopeWithTagName(tagName) {
|
||
const entry = this.entries.find((entry2) => entry2.type === EntryType.Marker || this.treeAdapter.getTagName(entry2.element) === tagName);
|
||
return entry && entry.type === EntryType.Element ? entry : null;
|
||
}
|
||
getElementEntry(element3) {
|
||
return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element3);
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/tree-adapters/default.js
|
||
function createTextNode(value) {
|
||
return {
|
||
nodeName: "#text",
|
||
value,
|
||
parentNode: null
|
||
};
|
||
}
|
||
var defaultTreeAdapter = {
|
||
//Node construction
|
||
createDocument() {
|
||
return {
|
||
nodeName: "#document",
|
||
mode: DOCUMENT_MODE.NO_QUIRKS,
|
||
childNodes: []
|
||
};
|
||
},
|
||
createDocumentFragment() {
|
||
return {
|
||
nodeName: "#document-fragment",
|
||
childNodes: []
|
||
};
|
||
},
|
||
createElement(tagName, namespaceURI, attrs) {
|
||
return {
|
||
nodeName: tagName,
|
||
tagName,
|
||
attrs,
|
||
namespaceURI,
|
||
childNodes: [],
|
||
parentNode: null
|
||
};
|
||
},
|
||
createCommentNode(data) {
|
||
return {
|
||
nodeName: "#comment",
|
||
data,
|
||
parentNode: null
|
||
};
|
||
},
|
||
//Tree mutation
|
||
appendChild(parentNode, newNode) {
|
||
parentNode.childNodes.push(newNode);
|
||
newNode.parentNode = parentNode;
|
||
},
|
||
insertBefore(parentNode, newNode, referenceNode) {
|
||
const insertionIdx = parentNode.childNodes.indexOf(referenceNode);
|
||
parentNode.childNodes.splice(insertionIdx, 0, newNode);
|
||
newNode.parentNode = parentNode;
|
||
},
|
||
setTemplateContent(templateElement, contentElement) {
|
||
templateElement.content = contentElement;
|
||
},
|
||
getTemplateContent(templateElement) {
|
||
return templateElement.content;
|
||
},
|
||
setDocumentType(document2, name, publicId, systemId) {
|
||
const doctypeNode = document2.childNodes.find((node) => node.nodeName === "#documentType");
|
||
if (doctypeNode) {
|
||
doctypeNode.name = name;
|
||
doctypeNode.publicId = publicId;
|
||
doctypeNode.systemId = systemId;
|
||
} else {
|
||
const node = {
|
||
nodeName: "#documentType",
|
||
name,
|
||
publicId,
|
||
systemId,
|
||
parentNode: null
|
||
};
|
||
defaultTreeAdapter.appendChild(document2, node);
|
||
}
|
||
},
|
||
setDocumentMode(document2, mode) {
|
||
document2.mode = mode;
|
||
},
|
||
getDocumentMode(document2) {
|
||
return document2.mode;
|
||
},
|
||
detachNode(node) {
|
||
if (node.parentNode) {
|
||
const idx = node.parentNode.childNodes.indexOf(node);
|
||
node.parentNode.childNodes.splice(idx, 1);
|
||
node.parentNode = null;
|
||
}
|
||
},
|
||
insertText(parentNode, text2) {
|
||
if (parentNode.childNodes.length > 0) {
|
||
const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];
|
||
if (defaultTreeAdapter.isTextNode(prevNode)) {
|
||
prevNode.value += text2;
|
||
return;
|
||
}
|
||
}
|
||
defaultTreeAdapter.appendChild(parentNode, createTextNode(text2));
|
||
},
|
||
insertTextBefore(parentNode, text2, referenceNode) {
|
||
const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
|
||
if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) {
|
||
prevNode.value += text2;
|
||
} else {
|
||
defaultTreeAdapter.insertBefore(parentNode, createTextNode(text2), referenceNode);
|
||
}
|
||
},
|
||
adoptAttributes(recipient, attrs) {
|
||
const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));
|
||
for (let j = 0; j < attrs.length; j++) {
|
||
if (!recipientAttrsMap.has(attrs[j].name)) {
|
||
recipient.attrs.push(attrs[j]);
|
||
}
|
||
}
|
||
},
|
||
//Tree traversing
|
||
getFirstChild(node) {
|
||
return node.childNodes[0];
|
||
},
|
||
getChildNodes(node) {
|
||
return node.childNodes;
|
||
},
|
||
getParentNode(node) {
|
||
return node.parentNode;
|
||
},
|
||
getAttrList(element3) {
|
||
return element3.attrs;
|
||
},
|
||
//Node data
|
||
getTagName(element3) {
|
||
return element3.tagName;
|
||
},
|
||
getNamespaceURI(element3) {
|
||
return element3.namespaceURI;
|
||
},
|
||
getTextNodeContent(textNode) {
|
||
return textNode.value;
|
||
},
|
||
getCommentNodeContent(commentNode) {
|
||
return commentNode.data;
|
||
},
|
||
getDocumentTypeNodeName(doctypeNode) {
|
||
return doctypeNode.name;
|
||
},
|
||
getDocumentTypeNodePublicId(doctypeNode) {
|
||
return doctypeNode.publicId;
|
||
},
|
||
getDocumentTypeNodeSystemId(doctypeNode) {
|
||
return doctypeNode.systemId;
|
||
},
|
||
//Node types
|
||
isTextNode(node) {
|
||
return node.nodeName === "#text";
|
||
},
|
||
isCommentNode(node) {
|
||
return node.nodeName === "#comment";
|
||
},
|
||
isDocumentTypeNode(node) {
|
||
return node.nodeName === "#documentType";
|
||
},
|
||
isElementNode(node) {
|
||
return Object.prototype.hasOwnProperty.call(node, "tagName");
|
||
},
|
||
// Source code location
|
||
setNodeSourceCodeLocation(node, location2) {
|
||
node.sourceCodeLocation = location2;
|
||
},
|
||
getNodeSourceCodeLocation(node) {
|
||
return node.sourceCodeLocation;
|
||
},
|
||
updateNodeSourceCodeLocation(node, endLocation) {
|
||
node.sourceCodeLocation = { ...node.sourceCodeLocation, ...endLocation };
|
||
}
|
||
};
|
||
|
||
// node_modules/parse5/dist/common/doctype.js
|
||
var VALID_DOCTYPE_NAME = "html";
|
||
var VALID_SYSTEM_ID = "about:legacy-compat";
|
||
var QUIRKS_MODE_SYSTEM_ID = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd";
|
||
var QUIRKS_MODE_PUBLIC_ID_PREFIXES = [
|
||
"+//silmaril//dtd html pro v0r11 19970101//",
|
||
"-//as//dtd html 3.0 aswedit + extensions//",
|
||
"-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
|
||
"-//ietf//dtd html 2.0 level 1//",
|
||
"-//ietf//dtd html 2.0 level 2//",
|
||
"-//ietf//dtd html 2.0 strict level 1//",
|
||
"-//ietf//dtd html 2.0 strict level 2//",
|
||
"-//ietf//dtd html 2.0 strict//",
|
||
"-//ietf//dtd html 2.0//",
|
||
"-//ietf//dtd html 2.1e//",
|
||
"-//ietf//dtd html 3.0//",
|
||
"-//ietf//dtd html 3.2 final//",
|
||
"-//ietf//dtd html 3.2//",
|
||
"-//ietf//dtd html 3//",
|
||
"-//ietf//dtd html level 0//",
|
||
"-//ietf//dtd html level 1//",
|
||
"-//ietf//dtd html level 2//",
|
||
"-//ietf//dtd html level 3//",
|
||
"-//ietf//dtd html strict level 0//",
|
||
"-//ietf//dtd html strict level 1//",
|
||
"-//ietf//dtd html strict level 2//",
|
||
"-//ietf//dtd html strict level 3//",
|
||
"-//ietf//dtd html strict//",
|
||
"-//ietf//dtd html//",
|
||
"-//metrius//dtd metrius presentational//",
|
||
"-//microsoft//dtd internet explorer 2.0 html strict//",
|
||
"-//microsoft//dtd internet explorer 2.0 html//",
|
||
"-//microsoft//dtd internet explorer 2.0 tables//",
|
||
"-//microsoft//dtd internet explorer 3.0 html strict//",
|
||
"-//microsoft//dtd internet explorer 3.0 html//",
|
||
"-//microsoft//dtd internet explorer 3.0 tables//",
|
||
"-//netscape comm. corp.//dtd html//",
|
||
"-//netscape comm. corp.//dtd strict html//",
|
||
"-//o'reilly and associates//dtd html 2.0//",
|
||
"-//o'reilly and associates//dtd html extended 1.0//",
|
||
"-//o'reilly and associates//dtd html extended relaxed 1.0//",
|
||
"-//sq//dtd html 2.0 hotmetal + extensions//",
|
||
"-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
|
||
"-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
|
||
"-//spyglass//dtd html 2.0 extended//",
|
||
"-//sun microsystems corp.//dtd hotjava html//",
|
||
"-//sun microsystems corp.//dtd hotjava strict html//",
|
||
"-//w3c//dtd html 3 1995-03-24//",
|
||
"-//w3c//dtd html 3.2 draft//",
|
||
"-//w3c//dtd html 3.2 final//",
|
||
"-//w3c//dtd html 3.2//",
|
||
"-//w3c//dtd html 3.2s draft//",
|
||
"-//w3c//dtd html 4.0 frameset//",
|
||
"-//w3c//dtd html 4.0 transitional//",
|
||
"-//w3c//dtd html experimental 19960712//",
|
||
"-//w3c//dtd html experimental 970421//",
|
||
"-//w3c//dtd w3 html//",
|
||
"-//w3o//dtd w3 html 3.0//",
|
||
"-//webtechs//dtd mozilla html 2.0//",
|
||
"-//webtechs//dtd mozilla html//"
|
||
];
|
||
var QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [
|
||
...QUIRKS_MODE_PUBLIC_ID_PREFIXES,
|
||
"-//w3c//dtd html 4.01 frameset//",
|
||
"-//w3c//dtd html 4.01 transitional//"
|
||
];
|
||
var QUIRKS_MODE_PUBLIC_IDS = /* @__PURE__ */ new Set([
|
||
"-//w3o//dtd w3 html strict 3.0//en//",
|
||
"-/w3c/dtd html 4.0 transitional/en",
|
||
"html"
|
||
]);
|
||
var LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"];
|
||
var LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [
|
||
...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,
|
||
"-//w3c//dtd html 4.01 frameset//",
|
||
"-//w3c//dtd html 4.01 transitional//"
|
||
];
|
||
function hasPrefix(publicId, prefixes) {
|
||
return prefixes.some((prefix) => publicId.startsWith(prefix));
|
||
}
|
||
function isConforming(token) {
|
||
return token.name === VALID_DOCTYPE_NAME && token.publicId === null && (token.systemId === null || token.systemId === VALID_SYSTEM_ID);
|
||
}
|
||
function getDocumentMode(token) {
|
||
if (token.name !== VALID_DOCTYPE_NAME) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
const { systemId } = token;
|
||
if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
let { publicId } = token;
|
||
if (publicId !== null) {
|
||
publicId = publicId.toLowerCase();
|
||
if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;
|
||
if (hasPrefix(publicId, prefixes)) {
|
||
return DOCUMENT_MODE.QUIRKS;
|
||
}
|
||
prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;
|
||
if (hasPrefix(publicId, prefixes)) {
|
||
return DOCUMENT_MODE.LIMITED_QUIRKS;
|
||
}
|
||
}
|
||
return DOCUMENT_MODE.NO_QUIRKS;
|
||
}
|
||
|
||
// node_modules/parse5/dist/common/foreign-content.js
|
||
var foreign_content_exports = {};
|
||
__export(foreign_content_exports, {
|
||
SVG_TAG_NAMES_ADJUSTMENT_MAP: () => SVG_TAG_NAMES_ADJUSTMENT_MAP,
|
||
adjustTokenMathMLAttrs: () => adjustTokenMathMLAttrs,
|
||
adjustTokenSVGAttrs: () => adjustTokenSVGAttrs,
|
||
adjustTokenSVGTagName: () => adjustTokenSVGTagName,
|
||
adjustTokenXMLAttrs: () => adjustTokenXMLAttrs,
|
||
causesExit: () => causesExit,
|
||
isIntegrationPoint: () => isIntegrationPoint
|
||
});
|
||
var MIME_TYPES = {
|
||
TEXT_HTML: "text/html",
|
||
APPLICATION_XML: "application/xhtml+xml"
|
||
};
|
||
var DEFINITION_URL_ATTR = "definitionurl";
|
||
var ADJUSTED_DEFINITION_URL_ATTR = "definitionURL";
|
||
var SVG_ATTRS_ADJUSTMENT_MAP = new Map([
|
||
"attributeName",
|
||
"attributeType",
|
||
"baseFrequency",
|
||
"baseProfile",
|
||
"calcMode",
|
||
"clipPathUnits",
|
||
"diffuseConstant",
|
||
"edgeMode",
|
||
"filterUnits",
|
||
"glyphRef",
|
||
"gradientTransform",
|
||
"gradientUnits",
|
||
"kernelMatrix",
|
||
"kernelUnitLength",
|
||
"keyPoints",
|
||
"keySplines",
|
||
"keyTimes",
|
||
"lengthAdjust",
|
||
"limitingConeAngle",
|
||
"markerHeight",
|
||
"markerUnits",
|
||
"markerWidth",
|
||
"maskContentUnits",
|
||
"maskUnits",
|
||
"numOctaves",
|
||
"pathLength",
|
||
"patternContentUnits",
|
||
"patternTransform",
|
||
"patternUnits",
|
||
"pointsAtX",
|
||
"pointsAtY",
|
||
"pointsAtZ",
|
||
"preserveAlpha",
|
||
"preserveAspectRatio",
|
||
"primitiveUnits",
|
||
"refX",
|
||
"refY",
|
||
"repeatCount",
|
||
"repeatDur",
|
||
"requiredExtensions",
|
||
"requiredFeatures",
|
||
"specularConstant",
|
||
"specularExponent",
|
||
"spreadMethod",
|
||
"startOffset",
|
||
"stdDeviation",
|
||
"stitchTiles",
|
||
"surfaceScale",
|
||
"systemLanguage",
|
||
"tableValues",
|
||
"targetX",
|
||
"targetY",
|
||
"textLength",
|
||
"viewBox",
|
||
"viewTarget",
|
||
"xChannelSelector",
|
||
"yChannelSelector",
|
||
"zoomAndPan"
|
||
].map((attr) => [attr.toLowerCase(), attr]));
|
||
var XML_ATTRS_ADJUSTMENT_MAP = /* @__PURE__ */ new Map([
|
||
["xlink:actuate", { prefix: "xlink", name: "actuate", namespace: NS.XLINK }],
|
||
["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace: NS.XLINK }],
|
||
["xlink:href", { prefix: "xlink", name: "href", namespace: NS.XLINK }],
|
||
["xlink:role", { prefix: "xlink", name: "role", namespace: NS.XLINK }],
|
||
["xlink:show", { prefix: "xlink", name: "show", namespace: NS.XLINK }],
|
||
["xlink:title", { prefix: "xlink", name: "title", namespace: NS.XLINK }],
|
||
["xlink:type", { prefix: "xlink", name: "type", namespace: NS.XLINK }],
|
||
["xml:base", { prefix: "xml", name: "base", namespace: NS.XML }],
|
||
["xml:lang", { prefix: "xml", name: "lang", namespace: NS.XML }],
|
||
["xml:space", { prefix: "xml", name: "space", namespace: NS.XML }],
|
||
["xmlns", { prefix: "", name: "xmlns", namespace: NS.XMLNS }],
|
||
["xmlns:xlink", { prefix: "xmlns", name: "xlink", namespace: NS.XMLNS }]
|
||
]);
|
||
var SVG_TAG_NAMES_ADJUSTMENT_MAP = new Map([
|
||
"altGlyph",
|
||
"altGlyphDef",
|
||
"altGlyphItem",
|
||
"animateColor",
|
||
"animateMotion",
|
||
"animateTransform",
|
||
"clipPath",
|
||
"feBlend",
|
||
"feColorMatrix",
|
||
"feComponentTransfer",
|
||
"feComposite",
|
||
"feConvolveMatrix",
|
||
"feDiffuseLighting",
|
||
"feDisplacementMap",
|
||
"feDistantLight",
|
||
"feFlood",
|
||
"feFuncA",
|
||
"feFuncB",
|
||
"feFuncG",
|
||
"feFuncR",
|
||
"feGaussianBlur",
|
||
"feImage",
|
||
"feMerge",
|
||
"feMergeNode",
|
||
"feMorphology",
|
||
"feOffset",
|
||
"fePointLight",
|
||
"feSpecularLighting",
|
||
"feSpotLight",
|
||
"feTile",
|
||
"feTurbulence",
|
||
"foreignObject",
|
||
"glyphRef",
|
||
"linearGradient",
|
||
"radialGradient",
|
||
"textPath"
|
||
].map((tn) => [tn.toLowerCase(), tn]));
|
||
var EXITS_FOREIGN_CONTENT = /* @__PURE__ */ new Set([
|
||
TAG_ID.B,
|
||
TAG_ID.BIG,
|
||
TAG_ID.BLOCKQUOTE,
|
||
TAG_ID.BODY,
|
||
TAG_ID.BR,
|
||
TAG_ID.CENTER,
|
||
TAG_ID.CODE,
|
||
TAG_ID.DD,
|
||
TAG_ID.DIV,
|
||
TAG_ID.DL,
|
||
TAG_ID.DT,
|
||
TAG_ID.EM,
|
||
TAG_ID.EMBED,
|
||
TAG_ID.H1,
|
||
TAG_ID.H2,
|
||
TAG_ID.H3,
|
||
TAG_ID.H4,
|
||
TAG_ID.H5,
|
||
TAG_ID.H6,
|
||
TAG_ID.HEAD,
|
||
TAG_ID.HR,
|
||
TAG_ID.I,
|
||
TAG_ID.IMG,
|
||
TAG_ID.LI,
|
||
TAG_ID.LISTING,
|
||
TAG_ID.MENU,
|
||
TAG_ID.META,
|
||
TAG_ID.NOBR,
|
||
TAG_ID.OL,
|
||
TAG_ID.P,
|
||
TAG_ID.PRE,
|
||
TAG_ID.RUBY,
|
||
TAG_ID.S,
|
||
TAG_ID.SMALL,
|
||
TAG_ID.SPAN,
|
||
TAG_ID.STRONG,
|
||
TAG_ID.STRIKE,
|
||
TAG_ID.SUB,
|
||
TAG_ID.SUP,
|
||
TAG_ID.TABLE,
|
||
TAG_ID.TT,
|
||
TAG_ID.U,
|
||
TAG_ID.UL,
|
||
TAG_ID.VAR
|
||
]);
|
||
function causesExit(startTagToken) {
|
||
const tn = startTagToken.tagID;
|
||
const isFontWithAttrs = tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE);
|
||
return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn);
|
||
}
|
||
function adjustTokenMathMLAttrs(token) {
|
||
for (let i = 0; i < token.attrs.length; i++) {
|
||
if (token.attrs[i].name === DEFINITION_URL_ATTR) {
|
||
token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function adjustTokenSVGAttrs(token) {
|
||
for (let i = 0; i < token.attrs.length; i++) {
|
||
const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
||
if (adjustedAttrName != null) {
|
||
token.attrs[i].name = adjustedAttrName;
|
||
}
|
||
}
|
||
}
|
||
function adjustTokenXMLAttrs(token) {
|
||
for (let i = 0; i < token.attrs.length; i++) {
|
||
const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);
|
||
if (adjustedAttrEntry) {
|
||
token.attrs[i].prefix = adjustedAttrEntry.prefix;
|
||
token.attrs[i].name = adjustedAttrEntry.name;
|
||
token.attrs[i].namespace = adjustedAttrEntry.namespace;
|
||
}
|
||
}
|
||
}
|
||
function adjustTokenSVGTagName(token) {
|
||
const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);
|
||
if (adjustedTagName != null) {
|
||
token.tagName = adjustedTagName;
|
||
token.tagID = getTagID(token.tagName);
|
||
}
|
||
}
|
||
function isMathMLTextIntegrationPoint(tn, ns) {
|
||
return ns === NS.MATHML && (tn === TAG_ID.MI || tn === TAG_ID.MO || tn === TAG_ID.MN || tn === TAG_ID.MS || tn === TAG_ID.MTEXT);
|
||
}
|
||
function isHtmlIntegrationPoint(tn, ns, attrs) {
|
||
if (ns === NS.MATHML && tn === TAG_ID.ANNOTATION_XML) {
|
||
for (let i = 0; i < attrs.length; i++) {
|
||
if (attrs[i].name === ATTRS.ENCODING) {
|
||
const value = attrs[i].value.toLowerCase();
|
||
return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;
|
||
}
|
||
}
|
||
}
|
||
return ns === NS.SVG && (tn === TAG_ID.FOREIGN_OBJECT || tn === TAG_ID.DESC || tn === TAG_ID.TITLE);
|
||
}
|
||
function isIntegrationPoint(tn, ns, attrs, foreignNS) {
|
||
return (!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs) || (!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns);
|
||
}
|
||
|
||
// node_modules/parse5/dist/parser/index.js
|
||
var HIDDEN_INPUT_TYPE = "hidden";
|
||
var AA_OUTER_LOOP_ITER = 8;
|
||
var AA_INNER_LOOP_ITER = 3;
|
||
var InsertionMode;
|
||
(function(InsertionMode2) {
|
||
InsertionMode2[InsertionMode2["INITIAL"] = 0] = "INITIAL";
|
||
InsertionMode2[InsertionMode2["BEFORE_HTML"] = 1] = "BEFORE_HTML";
|
||
InsertionMode2[InsertionMode2["BEFORE_HEAD"] = 2] = "BEFORE_HEAD";
|
||
InsertionMode2[InsertionMode2["IN_HEAD"] = 3] = "IN_HEAD";
|
||
InsertionMode2[InsertionMode2["IN_HEAD_NO_SCRIPT"] = 4] = "IN_HEAD_NO_SCRIPT";
|
||
InsertionMode2[InsertionMode2["AFTER_HEAD"] = 5] = "AFTER_HEAD";
|
||
InsertionMode2[InsertionMode2["IN_BODY"] = 6] = "IN_BODY";
|
||
InsertionMode2[InsertionMode2["TEXT"] = 7] = "TEXT";
|
||
InsertionMode2[InsertionMode2["IN_TABLE"] = 8] = "IN_TABLE";
|
||
InsertionMode2[InsertionMode2["IN_TABLE_TEXT"] = 9] = "IN_TABLE_TEXT";
|
||
InsertionMode2[InsertionMode2["IN_CAPTION"] = 10] = "IN_CAPTION";
|
||
InsertionMode2[InsertionMode2["IN_COLUMN_GROUP"] = 11] = "IN_COLUMN_GROUP";
|
||
InsertionMode2[InsertionMode2["IN_TABLE_BODY"] = 12] = "IN_TABLE_BODY";
|
||
InsertionMode2[InsertionMode2["IN_ROW"] = 13] = "IN_ROW";
|
||
InsertionMode2[InsertionMode2["IN_CELL"] = 14] = "IN_CELL";
|
||
InsertionMode2[InsertionMode2["IN_SELECT"] = 15] = "IN_SELECT";
|
||
InsertionMode2[InsertionMode2["IN_SELECT_IN_TABLE"] = 16] = "IN_SELECT_IN_TABLE";
|
||
InsertionMode2[InsertionMode2["IN_TEMPLATE"] = 17] = "IN_TEMPLATE";
|
||
InsertionMode2[InsertionMode2["AFTER_BODY"] = 18] = "AFTER_BODY";
|
||
InsertionMode2[InsertionMode2["IN_FRAMESET"] = 19] = "IN_FRAMESET";
|
||
InsertionMode2[InsertionMode2["AFTER_FRAMESET"] = 20] = "AFTER_FRAMESET";
|
||
InsertionMode2[InsertionMode2["AFTER_AFTER_BODY"] = 21] = "AFTER_AFTER_BODY";
|
||
InsertionMode2[InsertionMode2["AFTER_AFTER_FRAMESET"] = 22] = "AFTER_AFTER_FRAMESET";
|
||
})(InsertionMode || (InsertionMode = {}));
|
||
var BASE_LOC = {
|
||
startLine: -1,
|
||
startCol: -1,
|
||
startOffset: -1,
|
||
endLine: -1,
|
||
endCol: -1,
|
||
endOffset: -1
|
||
};
|
||
var TABLE_STRUCTURE_TAGS = /* @__PURE__ */ new Set([TAG_ID.TABLE, TAG_ID.TBODY, TAG_ID.TFOOT, TAG_ID.THEAD, TAG_ID.TR]);
|
||
var defaultParserOptions = {
|
||
scriptingEnabled: true,
|
||
sourceCodeLocationInfo: false,
|
||
treeAdapter: defaultTreeAdapter,
|
||
onParseError: null
|
||
};
|
||
var Parser = class {
|
||
constructor(options, document2, fragmentContext = null, scriptHandler = null) {
|
||
this.fragmentContext = fragmentContext;
|
||
this.scriptHandler = scriptHandler;
|
||
this.currentToken = null;
|
||
this.stopped = false;
|
||
this.insertionMode = InsertionMode.INITIAL;
|
||
this.originalInsertionMode = InsertionMode.INITIAL;
|
||
this.headElement = null;
|
||
this.formElement = null;
|
||
this.currentNotInHTML = false;
|
||
this.tmplInsertionModeStack = [];
|
||
this.pendingCharacterTokens = [];
|
||
this.hasNonWhitespacePendingCharacterToken = false;
|
||
this.framesetOk = true;
|
||
this.skipNextNewLine = false;
|
||
this.fosterParentingEnabled = false;
|
||
this.options = {
|
||
...defaultParserOptions,
|
||
...options
|
||
};
|
||
this.treeAdapter = this.options.treeAdapter;
|
||
this.onParseError = this.options.onParseError;
|
||
if (this.onParseError) {
|
||
this.options.sourceCodeLocationInfo = true;
|
||
}
|
||
this.document = document2 !== null && document2 !== void 0 ? document2 : this.treeAdapter.createDocument();
|
||
this.tokenizer = new Tokenizer(this.options, this);
|
||
this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
|
||
this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;
|
||
this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);
|
||
this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);
|
||
}
|
||
// API
|
||
static parse(html5, options) {
|
||
const parser = new this(options);
|
||
parser.tokenizer.write(html5, true);
|
||
return parser.document;
|
||
}
|
||
static getFragmentParser(fragmentContext, options) {
|
||
const opts = {
|
||
...defaultParserOptions,
|
||
...options
|
||
};
|
||
fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : fragmentContext = opts.treeAdapter.createElement(TAG_NAMES.TEMPLATE, NS.HTML, []);
|
||
const documentMock = opts.treeAdapter.createElement("documentmock", NS.HTML, []);
|
||
const parser = new this(opts, documentMock, fragmentContext);
|
||
if (parser.fragmentContextID === TAG_ID.TEMPLATE) {
|
||
parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
|
||
}
|
||
parser._initTokenizerForFragmentParsing();
|
||
parser._insertFakeRootElement();
|
||
parser._resetInsertionMode();
|
||
parser._findFormInFragmentContext();
|
||
return parser;
|
||
}
|
||
getFragment() {
|
||
const rootElement = this.treeAdapter.getFirstChild(this.document);
|
||
const fragment = this.treeAdapter.createDocumentFragment();
|
||
this._adoptNodes(rootElement, fragment);
|
||
return fragment;
|
||
}
|
||
//Errors
|
||
_err(token, code, beforeToken) {
|
||
var _a2;
|
||
if (!this.onParseError)
|
||
return;
|
||
const loc = (_a2 = token.location) !== null && _a2 !== void 0 ? _a2 : BASE_LOC;
|
||
const err = {
|
||
code,
|
||
startLine: loc.startLine,
|
||
startCol: loc.startCol,
|
||
startOffset: loc.startOffset,
|
||
endLine: beforeToken ? loc.startLine : loc.endLine,
|
||
endCol: beforeToken ? loc.startCol : loc.endCol,
|
||
endOffset: beforeToken ? loc.startOffset : loc.endOffset
|
||
};
|
||
this.onParseError(err);
|
||
}
|
||
//Stack events
|
||
onItemPush(node, tid, isTop) {
|
||
var _a2, _b;
|
||
(_b = (_a2 = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a2, node);
|
||
if (isTop && this.openElements.stackTop > 0)
|
||
this._setContextModes(node, tid);
|
||
}
|
||
onItemPop(node, isTop) {
|
||
var _a2, _b;
|
||
if (this.options.sourceCodeLocationInfo) {
|
||
this._setEndLocation(node, this.currentToken);
|
||
}
|
||
(_b = (_a2 = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a2, node, this.openElements.current);
|
||
if (isTop) {
|
||
let current;
|
||
let currentTagId;
|
||
if (this.openElements.stackTop === 0 && this.fragmentContext) {
|
||
current = this.fragmentContext;
|
||
currentTagId = this.fragmentContextID;
|
||
} else {
|
||
({ current, currentTagId } = this.openElements);
|
||
}
|
||
this._setContextModes(current, currentTagId);
|
||
}
|
||
}
|
||
_setContextModes(current, tid) {
|
||
const isHTML = current === this.document || this.treeAdapter.getNamespaceURI(current) === NS.HTML;
|
||
this.currentNotInHTML = !isHTML;
|
||
this.tokenizer.inForeignNode = !isHTML && !this._isIntegrationPoint(tid, current);
|
||
}
|
||
_switchToTextParsing(currentToken, nextTokenizerState) {
|
||
this._insertElement(currentToken, NS.HTML);
|
||
this.tokenizer.state = nextTokenizerState;
|
||
this.originalInsertionMode = this.insertionMode;
|
||
this.insertionMode = InsertionMode.TEXT;
|
||
}
|
||
switchToPlaintextParsing() {
|
||
this.insertionMode = InsertionMode.TEXT;
|
||
this.originalInsertionMode = InsertionMode.IN_BODY;
|
||
this.tokenizer.state = TokenizerMode.PLAINTEXT;
|
||
}
|
||
//Fragment parsing
|
||
_getAdjustedCurrentElement() {
|
||
return this.openElements.stackTop === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.current;
|
||
}
|
||
_findFormInFragmentContext() {
|
||
let node = this.fragmentContext;
|
||
while (node) {
|
||
if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) {
|
||
this.formElement = node;
|
||
break;
|
||
}
|
||
node = this.treeAdapter.getParentNode(node);
|
||
}
|
||
}
|
||
_initTokenizerForFragmentParsing() {
|
||
if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) {
|
||
return;
|
||
}
|
||
switch (this.fragmentContextID) {
|
||
case TAG_ID.TITLE:
|
||
case TAG_ID.TEXTAREA: {
|
||
this.tokenizer.state = TokenizerMode.RCDATA;
|
||
break;
|
||
}
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.XMP:
|
||
case TAG_ID.IFRAME:
|
||
case TAG_ID.NOEMBED:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.NOSCRIPT: {
|
||
this.tokenizer.state = TokenizerMode.RAWTEXT;
|
||
break;
|
||
}
|
||
case TAG_ID.SCRIPT: {
|
||
this.tokenizer.state = TokenizerMode.SCRIPT_DATA;
|
||
break;
|
||
}
|
||
case TAG_ID.PLAINTEXT: {
|
||
this.tokenizer.state = TokenizerMode.PLAINTEXT;
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
//Tree mutation
|
||
_setDocumentType(token) {
|
||
const name = token.name || "";
|
||
const publicId = token.publicId || "";
|
||
const systemId = token.systemId || "";
|
||
this.treeAdapter.setDocumentType(this.document, name, publicId, systemId);
|
||
if (token.location) {
|
||
const documentChildren = this.treeAdapter.getChildNodes(this.document);
|
||
const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node));
|
||
if (docTypeNode) {
|
||
this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location);
|
||
}
|
||
}
|
||
}
|
||
_attachElementToTree(element3, location2) {
|
||
if (this.options.sourceCodeLocationInfo) {
|
||
const loc = location2 && {
|
||
...location2,
|
||
startTag: location2
|
||
};
|
||
this.treeAdapter.setNodeSourceCodeLocation(element3, loc);
|
||
}
|
||
if (this._shouldFosterParentOnInsertion()) {
|
||
this._fosterParentElement(element3);
|
||
} else {
|
||
const parent = this.openElements.currentTmplContentOrNode;
|
||
this.treeAdapter.appendChild(parent, element3);
|
||
}
|
||
}
|
||
_appendElement(token, namespaceURI) {
|
||
const element3 = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
|
||
this._attachElementToTree(element3, token.location);
|
||
}
|
||
_insertElement(token, namespaceURI) {
|
||
const element3 = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
|
||
this._attachElementToTree(element3, token.location);
|
||
this.openElements.push(element3, token.tagID);
|
||
}
|
||
_insertFakeElement(tagName, tagID) {
|
||
const element3 = this.treeAdapter.createElement(tagName, NS.HTML, []);
|
||
this._attachElementToTree(element3, null);
|
||
this.openElements.push(element3, tagID);
|
||
}
|
||
_insertTemplate(token) {
|
||
const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);
|
||
const content = this.treeAdapter.createDocumentFragment();
|
||
this.treeAdapter.setTemplateContent(tmpl, content);
|
||
this._attachElementToTree(tmpl, token.location);
|
||
this.openElements.push(tmpl, token.tagID);
|
||
if (this.options.sourceCodeLocationInfo)
|
||
this.treeAdapter.setNodeSourceCodeLocation(content, null);
|
||
}
|
||
_insertFakeRootElement() {
|
||
const element3 = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []);
|
||
if (this.options.sourceCodeLocationInfo)
|
||
this.treeAdapter.setNodeSourceCodeLocation(element3, null);
|
||
this.treeAdapter.appendChild(this.openElements.current, element3);
|
||
this.openElements.push(element3, TAG_ID.HTML);
|
||
}
|
||
_appendCommentNode(token, parent) {
|
||
const commentNode = this.treeAdapter.createCommentNode(token.data);
|
||
this.treeAdapter.appendChild(parent, commentNode);
|
||
if (this.options.sourceCodeLocationInfo) {
|
||
this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location);
|
||
}
|
||
}
|
||
_insertCharacters(token) {
|
||
let parent;
|
||
let beforeElement;
|
||
if (this._shouldFosterParentOnInsertion()) {
|
||
({ parent, beforeElement } = this._findFosterParentingLocation());
|
||
if (beforeElement) {
|
||
this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement);
|
||
} else {
|
||
this.treeAdapter.insertText(parent, token.chars);
|
||
}
|
||
} else {
|
||
parent = this.openElements.currentTmplContentOrNode;
|
||
this.treeAdapter.insertText(parent, token.chars);
|
||
}
|
||
if (!token.location)
|
||
return;
|
||
const siblings2 = this.treeAdapter.getChildNodes(parent);
|
||
const textNodeIdx = beforeElement ? siblings2.lastIndexOf(beforeElement) : siblings2.length;
|
||
const textNode = siblings2[textNodeIdx - 1];
|
||
const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);
|
||
if (tnLoc) {
|
||
const { endLine, endCol, endOffset } = token.location;
|
||
this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset });
|
||
} else if (this.options.sourceCodeLocationInfo) {
|
||
this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);
|
||
}
|
||
}
|
||
_adoptNodes(donor, recipient) {
|
||
for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) {
|
||
this.treeAdapter.detachNode(child);
|
||
this.treeAdapter.appendChild(recipient, child);
|
||
}
|
||
}
|
||
_setEndLocation(element3, closingToken) {
|
||
if (this.treeAdapter.getNodeSourceCodeLocation(element3) && closingToken.location) {
|
||
const ctLoc = closingToken.location;
|
||
const tn = this.treeAdapter.getTagName(element3);
|
||
const endLoc = (
|
||
// NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
|
||
// tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
|
||
closingToken.type === TokenType.END_TAG && tn === closingToken.tagName ? {
|
||
endTag: { ...ctLoc },
|
||
endLine: ctLoc.endLine,
|
||
endCol: ctLoc.endCol,
|
||
endOffset: ctLoc.endOffset
|
||
} : {
|
||
endLine: ctLoc.startLine,
|
||
endCol: ctLoc.startCol,
|
||
endOffset: ctLoc.startOffset
|
||
}
|
||
);
|
||
this.treeAdapter.updateNodeSourceCodeLocation(element3, endLoc);
|
||
}
|
||
}
|
||
//Token processing
|
||
shouldProcessStartTagTokenInForeignContent(token) {
|
||
if (!this.currentNotInHTML)
|
||
return false;
|
||
let current;
|
||
let currentTagId;
|
||
if (this.openElements.stackTop === 0 && this.fragmentContext) {
|
||
current = this.fragmentContext;
|
||
currentTagId = this.fragmentContextID;
|
||
} else {
|
||
({ current, currentTagId } = this.openElements);
|
||
}
|
||
if (token.tagID === TAG_ID.SVG && this.treeAdapter.getTagName(current) === TAG_NAMES.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(current) === NS.MATHML) {
|
||
return false;
|
||
}
|
||
return (
|
||
// Check that `current` is not an integration point for HTML or MathML elements.
|
||
this.tokenizer.inForeignNode || // If it _is_ an integration point, then we might have to check that it is not an HTML
|
||
// integration point.
|
||
(token.tagID === TAG_ID.MGLYPH || token.tagID === TAG_ID.MALIGNMARK) && !this._isIntegrationPoint(currentTagId, current, NS.HTML)
|
||
);
|
||
}
|
||
_processToken(token) {
|
||
switch (token.type) {
|
||
case TokenType.CHARACTER: {
|
||
this.onCharacter(token);
|
||
break;
|
||
}
|
||
case TokenType.NULL_CHARACTER: {
|
||
this.onNullCharacter(token);
|
||
break;
|
||
}
|
||
case TokenType.COMMENT: {
|
||
this.onComment(token);
|
||
break;
|
||
}
|
||
case TokenType.DOCTYPE: {
|
||
this.onDoctype(token);
|
||
break;
|
||
}
|
||
case TokenType.START_TAG: {
|
||
this._processStartTag(token);
|
||
break;
|
||
}
|
||
case TokenType.END_TAG: {
|
||
this.onEndTag(token);
|
||
break;
|
||
}
|
||
case TokenType.EOF: {
|
||
this.onEof(token);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
this.onWhitespaceCharacter(token);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
//Integration points
|
||
_isIntegrationPoint(tid, element3, foreignNS) {
|
||
const ns = this.treeAdapter.getNamespaceURI(element3);
|
||
const attrs = this.treeAdapter.getAttrList(element3);
|
||
return isIntegrationPoint(tid, ns, attrs, foreignNS);
|
||
}
|
||
//Active formatting elements reconstruction
|
||
_reconstructActiveFormattingElements() {
|
||
const listLength = this.activeFormattingElements.entries.length;
|
||
if (listLength) {
|
||
const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));
|
||
const unopenIdx = endIndex < 0 ? listLength - 1 : endIndex - 1;
|
||
for (let i = unopenIdx; i >= 0; i--) {
|
||
const entry = this.activeFormattingElements.entries[i];
|
||
this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
|
||
entry.element = this.openElements.current;
|
||
}
|
||
}
|
||
}
|
||
//Close elements
|
||
_closeTableCell() {
|
||
this.openElements.generateImpliedEndTags();
|
||
this.openElements.popUntilTableCellPopped();
|
||
this.activeFormattingElements.clearToLastMarker();
|
||
this.insertionMode = InsertionMode.IN_ROW;
|
||
}
|
||
_closePElement() {
|
||
this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P);
|
||
this.openElements.popUntilTagNamePopped(TAG_ID.P);
|
||
}
|
||
//Insertion modes
|
||
_resetInsertionMode() {
|
||
for (let i = this.openElements.stackTop; i >= 0; i--) {
|
||
switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {
|
||
case TAG_ID.TR: {
|
||
this.insertionMode = InsertionMode.IN_ROW;
|
||
return;
|
||
}
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TFOOT: {
|
||
this.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
return;
|
||
}
|
||
case TAG_ID.CAPTION: {
|
||
this.insertionMode = InsertionMode.IN_CAPTION;
|
||
return;
|
||
}
|
||
case TAG_ID.COLGROUP: {
|
||
this.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
return;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
this.insertionMode = InsertionMode.IN_TABLE;
|
||
return;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
this.insertionMode = InsertionMode.IN_BODY;
|
||
return;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
this.insertionMode = InsertionMode.IN_FRAMESET;
|
||
return;
|
||
}
|
||
case TAG_ID.SELECT: {
|
||
this._resetInsertionModeForSelect(i);
|
||
return;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
this.insertionMode = this.tmplInsertionModeStack[0];
|
||
return;
|
||
}
|
||
case TAG_ID.HTML: {
|
||
this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD;
|
||
return;
|
||
}
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
if (i > 0) {
|
||
this.insertionMode = InsertionMode.IN_CELL;
|
||
return;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
if (i > 0) {
|
||
this.insertionMode = InsertionMode.IN_HEAD;
|
||
return;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
this.insertionMode = InsertionMode.IN_BODY;
|
||
}
|
||
_resetInsertionModeForSelect(selectIdx) {
|
||
if (selectIdx > 0) {
|
||
for (let i = selectIdx - 1; i > 0; i--) {
|
||
const tn = this.openElements.tagIDs[i];
|
||
if (tn === TAG_ID.TEMPLATE) {
|
||
break;
|
||
} else if (tn === TAG_ID.TABLE) {
|
||
this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
this.insertionMode = InsertionMode.IN_SELECT;
|
||
}
|
||
//Foster parenting
|
||
_isElementCausesFosterParenting(tn) {
|
||
return TABLE_STRUCTURE_TAGS.has(tn);
|
||
}
|
||
_shouldFosterParentOnInsertion() {
|
||
return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId);
|
||
}
|
||
_findFosterParentingLocation() {
|
||
for (let i = this.openElements.stackTop; i >= 0; i--) {
|
||
const openElement = this.openElements.items[i];
|
||
switch (this.openElements.tagIDs[i]) {
|
||
case TAG_ID.TEMPLATE: {
|
||
if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) {
|
||
return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
const parent = this.treeAdapter.getParentNode(openElement);
|
||
if (parent) {
|
||
return { parent, beforeElement: openElement };
|
||
}
|
||
return { parent: this.openElements.items[i - 1], beforeElement: null };
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
return { parent: this.openElements.items[0], beforeElement: null };
|
||
}
|
||
_fosterParentElement(element3) {
|
||
const location2 = this._findFosterParentingLocation();
|
||
if (location2.beforeElement) {
|
||
this.treeAdapter.insertBefore(location2.parent, element3, location2.beforeElement);
|
||
} else {
|
||
this.treeAdapter.appendChild(location2.parent, element3);
|
||
}
|
||
}
|
||
//Special elements
|
||
_isSpecialElement(element3, id) {
|
||
const ns = this.treeAdapter.getNamespaceURI(element3);
|
||
return SPECIAL_ELEMENTS[ns].has(id);
|
||
}
|
||
onCharacter(token) {
|
||
this.skipNextNewLine = false;
|
||
if (this.tokenizer.inForeignNode) {
|
||
characterInForeignContent(this, token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
tokenBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
tokenBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
tokenInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
tokenInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
tokenAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
characterInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
this._insertCharacters(token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW: {
|
||
characterInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
characterInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
tokenInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
tokenAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
tokenAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onNullCharacter(token) {
|
||
this.skipNextNewLine = false;
|
||
if (this.tokenizer.inForeignNode) {
|
||
nullCharacterInForeignContent(this, token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
tokenBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
tokenBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
tokenInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
tokenInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
tokenAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT: {
|
||
this._insertCharacters(token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW: {
|
||
characterInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
tokenInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
tokenAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
tokenAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onComment(token) {
|
||
this.skipNextNewLine = false;
|
||
if (this.currentNotInHTML) {
|
||
appendComment(this, token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL:
|
||
case InsertionMode.BEFORE_HTML:
|
||
case InsertionMode.BEFORE_HEAD:
|
||
case InsertionMode.IN_HEAD:
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT:
|
||
case InsertionMode.AFTER_HEAD:
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_COLUMN_GROUP:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE:
|
||
case InsertionMode.IN_TEMPLATE:
|
||
case InsertionMode.IN_FRAMESET:
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
appendComment(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
appendCommentToRootHtmlElement(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
appendCommentToDocument(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onDoctype(token) {
|
||
this.skipNextNewLine = false;
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
doctypeInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD:
|
||
case InsertionMode.IN_HEAD:
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT:
|
||
case InsertionMode.AFTER_HEAD: {
|
||
this._err(token, ERR.misplacedDoctype);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onStartTag(token) {
|
||
this.skipNextNewLine = false;
|
||
this.currentToken = token;
|
||
this._processStartTag(token);
|
||
if (token.selfClosing && !token.ackSelfClosing) {
|
||
this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus);
|
||
}
|
||
}
|
||
/**
|
||
* Processes a given start tag.
|
||
*
|
||
* `onStartTag` checks if a self-closing tag was recognized. When a token
|
||
* is moved inbetween multiple insertion modes, this check for self-closing
|
||
* could lead to false positives. To avoid this, `_processStartTag` is used
|
||
* for nested calls.
|
||
*
|
||
* @param token The token to process.
|
||
*/
|
||
_processStartTag(token) {
|
||
if (this.shouldProcessStartTagTokenInForeignContent(token)) {
|
||
startTagInForeignContent(this, token);
|
||
} else {
|
||
this._startTagOutsideForeignContent(token);
|
||
}
|
||
}
|
||
_startTagOutsideForeignContent(token) {
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
startTagBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
startTagBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
startTagInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
startTagInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
startTagAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY: {
|
||
startTagInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE: {
|
||
startTagInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CAPTION: {
|
||
startTagInCaption(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
startTagInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_BODY: {
|
||
startTagInTableBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_ROW: {
|
||
startTagInRow(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CELL: {
|
||
startTagInCell(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT: {
|
||
startTagInSelect(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
startTagInSelectInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
startTagInTemplate(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
startTagAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_FRAMESET: {
|
||
startTagInFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
startTagAfterFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
startTagAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
startTagAfterAfterFrameset(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onEndTag(token) {
|
||
this.skipNextNewLine = false;
|
||
this.currentToken = token;
|
||
if (this.currentNotInHTML) {
|
||
endTagInForeignContent(this, token);
|
||
} else {
|
||
this._endTagOutsideForeignContent(token);
|
||
}
|
||
}
|
||
_endTagOutsideForeignContent(token) {
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
endTagBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
endTagBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
endTagInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
endTagInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
endTagAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY: {
|
||
endTagInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT: {
|
||
endTagInText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE: {
|
||
endTagInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CAPTION: {
|
||
endTagInCaption(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_COLUMN_GROUP: {
|
||
endTagInColumnGroup(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_BODY: {
|
||
endTagInTableBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_ROW: {
|
||
endTagInRow(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_CELL: {
|
||
endTagInCell(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT: {
|
||
endTagInSelect(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
endTagInSelectInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
endTagInTemplate(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY: {
|
||
endTagAfterBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_FRAMESET: {
|
||
endTagInFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
endTagAfterFrameset(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_AFTER_BODY: {
|
||
tokenAfterAfterBody(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onEof(token) {
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.INITIAL: {
|
||
tokenInInitialMode(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HTML: {
|
||
tokenBeforeHtml(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.BEFORE_HEAD: {
|
||
tokenBeforeHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD: {
|
||
tokenInHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT: {
|
||
tokenInHeadNoScript(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_HEAD: {
|
||
tokenAfterHead(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_COLUMN_GROUP:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE: {
|
||
eofInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.TEXT: {
|
||
eofInText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
tokenInTableText(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TEMPLATE: {
|
||
eofInTemplate(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.AFTER_BODY:
|
||
case InsertionMode.IN_FRAMESET:
|
||
case InsertionMode.AFTER_FRAMESET:
|
||
case InsertionMode.AFTER_AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
stopParsing(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
onWhitespaceCharacter(token) {
|
||
if (this.skipNextNewLine) {
|
||
this.skipNextNewLine = false;
|
||
if (token.chars.charCodeAt(0) === CODE_POINTS.LINE_FEED) {
|
||
if (token.chars.length === 1) {
|
||
return;
|
||
}
|
||
token.chars = token.chars.substr(1);
|
||
}
|
||
}
|
||
if (this.tokenizer.inForeignNode) {
|
||
this._insertCharacters(token);
|
||
return;
|
||
}
|
||
switch (this.insertionMode) {
|
||
case InsertionMode.IN_HEAD:
|
||
case InsertionMode.IN_HEAD_NO_SCRIPT:
|
||
case InsertionMode.AFTER_HEAD:
|
||
case InsertionMode.TEXT:
|
||
case InsertionMode.IN_COLUMN_GROUP:
|
||
case InsertionMode.IN_SELECT:
|
||
case InsertionMode.IN_SELECT_IN_TABLE:
|
||
case InsertionMode.IN_FRAMESET:
|
||
case InsertionMode.AFTER_FRAMESET: {
|
||
this._insertCharacters(token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_BODY:
|
||
case InsertionMode.IN_CAPTION:
|
||
case InsertionMode.IN_CELL:
|
||
case InsertionMode.IN_TEMPLATE:
|
||
case InsertionMode.AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_BODY:
|
||
case InsertionMode.AFTER_AFTER_FRAMESET: {
|
||
whitespaceCharacterInBody(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE:
|
||
case InsertionMode.IN_TABLE_BODY:
|
||
case InsertionMode.IN_ROW: {
|
||
characterInTable(this, token);
|
||
break;
|
||
}
|
||
case InsertionMode.IN_TABLE_TEXT: {
|
||
whitespaceCharacterInTableText(this, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
};
|
||
function aaObtainFormattingElementEntry(p2, token) {
|
||
let formattingElementEntry = p2.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);
|
||
if (formattingElementEntry) {
|
||
if (!p2.openElements.contains(formattingElementEntry.element)) {
|
||
p2.activeFormattingElements.removeEntry(formattingElementEntry);
|
||
formattingElementEntry = null;
|
||
} else if (!p2.openElements.hasInScope(token.tagID)) {
|
||
formattingElementEntry = null;
|
||
}
|
||
} else {
|
||
genericEndTagInBody(p2, token);
|
||
}
|
||
return formattingElementEntry;
|
||
}
|
||
function aaObtainFurthestBlock(p2, formattingElementEntry) {
|
||
let furthestBlock = null;
|
||
let idx = p2.openElements.stackTop;
|
||
for (; idx >= 0; idx--) {
|
||
const element3 = p2.openElements.items[idx];
|
||
if (element3 === formattingElementEntry.element) {
|
||
break;
|
||
}
|
||
if (p2._isSpecialElement(element3, p2.openElements.tagIDs[idx])) {
|
||
furthestBlock = element3;
|
||
}
|
||
}
|
||
if (!furthestBlock) {
|
||
p2.openElements.shortenToLength(idx < 0 ? 0 : idx);
|
||
p2.activeFormattingElements.removeEntry(formattingElementEntry);
|
||
}
|
||
return furthestBlock;
|
||
}
|
||
function aaInnerLoop(p2, furthestBlock, formattingElement) {
|
||
let lastElement = furthestBlock;
|
||
let nextElement = p2.openElements.getCommonAncestor(furthestBlock);
|
||
for (let i = 0, element3 = nextElement; element3 !== formattingElement; i++, element3 = nextElement) {
|
||
nextElement = p2.openElements.getCommonAncestor(element3);
|
||
const elementEntry = p2.activeFormattingElements.getElementEntry(element3);
|
||
const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;
|
||
const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
|
||
if (shouldRemoveFromOpenElements) {
|
||
if (counterOverflow) {
|
||
p2.activeFormattingElements.removeEntry(elementEntry);
|
||
}
|
||
p2.openElements.remove(element3);
|
||
} else {
|
||
element3 = aaRecreateElementFromEntry(p2, elementEntry);
|
||
if (lastElement === furthestBlock) {
|
||
p2.activeFormattingElements.bookmark = elementEntry;
|
||
}
|
||
p2.treeAdapter.detachNode(lastElement);
|
||
p2.treeAdapter.appendChild(element3, lastElement);
|
||
lastElement = element3;
|
||
}
|
||
}
|
||
return lastElement;
|
||
}
|
||
function aaRecreateElementFromEntry(p2, elementEntry) {
|
||
const ns = p2.treeAdapter.getNamespaceURI(elementEntry.element);
|
||
const newElement = p2.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);
|
||
p2.openElements.replace(elementEntry.element, newElement);
|
||
elementEntry.element = newElement;
|
||
return newElement;
|
||
}
|
||
function aaInsertLastNodeInCommonAncestor(p2, commonAncestor, lastElement) {
|
||
const tn = p2.treeAdapter.getTagName(commonAncestor);
|
||
const tid = getTagID(tn);
|
||
if (p2._isElementCausesFosterParenting(tid)) {
|
||
p2._fosterParentElement(lastElement);
|
||
} else {
|
||
const ns = p2.treeAdapter.getNamespaceURI(commonAncestor);
|
||
if (tid === TAG_ID.TEMPLATE && ns === NS.HTML) {
|
||
commonAncestor = p2.treeAdapter.getTemplateContent(commonAncestor);
|
||
}
|
||
p2.treeAdapter.appendChild(commonAncestor, lastElement);
|
||
}
|
||
}
|
||
function aaReplaceFormattingElement(p2, furthestBlock, formattingElementEntry) {
|
||
const ns = p2.treeAdapter.getNamespaceURI(formattingElementEntry.element);
|
||
const { token } = formattingElementEntry;
|
||
const newElement = p2.treeAdapter.createElement(token.tagName, ns, token.attrs);
|
||
p2._adoptNodes(furthestBlock, newElement);
|
||
p2.treeAdapter.appendChild(furthestBlock, newElement);
|
||
p2.activeFormattingElements.insertElementAfterBookmark(newElement, token);
|
||
p2.activeFormattingElements.removeEntry(formattingElementEntry);
|
||
p2.openElements.remove(formattingElementEntry.element);
|
||
p2.openElements.insertAfter(furthestBlock, newElement, token.tagID);
|
||
}
|
||
function callAdoptionAgency(p2, token) {
|
||
for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) {
|
||
const formattingElementEntry = aaObtainFormattingElementEntry(p2, token);
|
||
if (!formattingElementEntry) {
|
||
break;
|
||
}
|
||
const furthestBlock = aaObtainFurthestBlock(p2, formattingElementEntry);
|
||
if (!furthestBlock) {
|
||
break;
|
||
}
|
||
p2.activeFormattingElements.bookmark = formattingElementEntry;
|
||
const lastElement = aaInnerLoop(p2, furthestBlock, formattingElementEntry.element);
|
||
const commonAncestor = p2.openElements.getCommonAncestor(formattingElementEntry.element);
|
||
p2.treeAdapter.detachNode(lastElement);
|
||
if (commonAncestor)
|
||
aaInsertLastNodeInCommonAncestor(p2, commonAncestor, lastElement);
|
||
aaReplaceFormattingElement(p2, furthestBlock, formattingElementEntry);
|
||
}
|
||
}
|
||
function appendComment(p2, token) {
|
||
p2._appendCommentNode(token, p2.openElements.currentTmplContentOrNode);
|
||
}
|
||
function appendCommentToRootHtmlElement(p2, token) {
|
||
p2._appendCommentNode(token, p2.openElements.items[0]);
|
||
}
|
||
function appendCommentToDocument(p2, token) {
|
||
p2._appendCommentNode(token, p2.document);
|
||
}
|
||
function stopParsing(p2, token) {
|
||
p2.stopped = true;
|
||
if (token.location) {
|
||
const target = p2.fragmentContext ? 0 : 2;
|
||
for (let i = p2.openElements.stackTop; i >= target; i--) {
|
||
p2._setEndLocation(p2.openElements.items[i], token);
|
||
}
|
||
if (!p2.fragmentContext && p2.openElements.stackTop >= 0) {
|
||
const htmlElement = p2.openElements.items[0];
|
||
const htmlLocation = p2.treeAdapter.getNodeSourceCodeLocation(htmlElement);
|
||
if (htmlLocation && !htmlLocation.endTag) {
|
||
p2._setEndLocation(htmlElement, token);
|
||
if (p2.openElements.stackTop >= 1) {
|
||
const bodyElement = p2.openElements.items[1];
|
||
const bodyLocation = p2.treeAdapter.getNodeSourceCodeLocation(bodyElement);
|
||
if (bodyLocation && !bodyLocation.endTag) {
|
||
p2._setEndLocation(bodyElement, token);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function doctypeInInitialMode(p2, token) {
|
||
p2._setDocumentType(token);
|
||
const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : getDocumentMode(token);
|
||
if (!isConforming(token)) {
|
||
p2._err(token, ERR.nonConformingDoctype);
|
||
}
|
||
p2.treeAdapter.setDocumentMode(p2.document, mode);
|
||
p2.insertionMode = InsertionMode.BEFORE_HTML;
|
||
}
|
||
function tokenInInitialMode(p2, token) {
|
||
p2._err(token, ERR.missingDoctype, true);
|
||
p2.treeAdapter.setDocumentMode(p2.document, DOCUMENT_MODE.QUIRKS);
|
||
p2.insertionMode = InsertionMode.BEFORE_HTML;
|
||
p2._processToken(token);
|
||
}
|
||
function startTagBeforeHtml(p2, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.BEFORE_HEAD;
|
||
} else {
|
||
tokenBeforeHtml(p2, token);
|
||
}
|
||
}
|
||
function endTagBeforeHtml(p2, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.HTML || tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.BR) {
|
||
tokenBeforeHtml(p2, token);
|
||
}
|
||
}
|
||
function tokenBeforeHtml(p2, token) {
|
||
p2._insertFakeRootElement();
|
||
p2.insertionMode = InsertionMode.BEFORE_HEAD;
|
||
p2._processToken(token);
|
||
}
|
||
function startTagBeforeHead(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.headElement = p2.openElements.current;
|
||
p2.insertionMode = InsertionMode.IN_HEAD;
|
||
break;
|
||
}
|
||
default: {
|
||
tokenBeforeHead(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagBeforeHead(p2, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.HTML || tn === TAG_ID.BR) {
|
||
tokenBeforeHead(p2, token);
|
||
} else {
|
||
p2._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
function tokenBeforeHead(p2, token) {
|
||
p2._insertFakeElement(TAG_NAMES.HEAD, TAG_ID.HEAD);
|
||
p2.headElement = p2.openElements.current;
|
||
p2.insertionMode = InsertionMode.IN_HEAD;
|
||
p2._processToken(token);
|
||
}
|
||
function startTagInHead(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META: {
|
||
p2._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
break;
|
||
}
|
||
case TAG_ID.TITLE: {
|
||
p2._switchToTextParsing(token, TokenizerMode.RCDATA);
|
||
break;
|
||
}
|
||
case TAG_ID.NOSCRIPT: {
|
||
if (p2.options.scriptingEnabled) {
|
||
p2._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
} else {
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.STYLE: {
|
||
p2._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
break;
|
||
}
|
||
case TAG_ID.SCRIPT: {
|
||
p2._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
p2._insertTemplate(token);
|
||
p2.activeFormattingElements.insertMarker();
|
||
p2.framesetOk = false;
|
||
p2.insertionMode = InsertionMode.IN_TEMPLATE;
|
||
p2.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
p2._err(token, ERR.misplacedStartTagForHeadElement);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInHead(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInHead(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HEAD: {
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.AFTER_HEAD;
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.BR:
|
||
case TAG_ID.HTML: {
|
||
tokenInHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p2._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
}
|
||
function templateEndTagInHead(p2, token) {
|
||
if (p2.openElements.tmplCount > 0) {
|
||
p2.openElements.generateImpliedEndTagsThoroughly();
|
||
if (p2.openElements.currentTagId !== TAG_ID.TEMPLATE) {
|
||
p2._err(token, ERR.closingOfElementWithOpenChildElements);
|
||
}
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
|
||
p2.activeFormattingElements.clearToLastMarker();
|
||
p2.tmplInsertionModeStack.shift();
|
||
p2._resetInsertionMode();
|
||
} else {
|
||
p2._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
function tokenInHead(p2, token) {
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.AFTER_HEAD;
|
||
p2._processToken(token);
|
||
}
|
||
function startTagInHeadNoScript(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.HEAD:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.STYLE: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOSCRIPT: {
|
||
p2._err(token, ERR.nestedNoscriptInHead);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInHeadNoScript(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInHeadNoScript(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.NOSCRIPT: {
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_HEAD;
|
||
break;
|
||
}
|
||
case TAG_ID.BR: {
|
||
tokenInHeadNoScript(p2, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p2._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
}
|
||
function tokenInHeadNoScript(p2, token) {
|
||
const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead;
|
||
p2._err(token, errCode);
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_HEAD;
|
||
p2._processToken(token);
|
||
}
|
||
function startTagAfterHead(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.framesetOk = false;
|
||
p2.insertionMode = InsertionMode.IN_BODY;
|
||
break;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_FRAMESET;
|
||
break;
|
||
}
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.TEMPLATE:
|
||
case TAG_ID.TITLE: {
|
||
p2._err(token, ERR.abandonedHeadElementChild);
|
||
p2.openElements.push(p2.headElement, TAG_ID.HEAD);
|
||
startTagInHead(p2, token);
|
||
p2.openElements.remove(p2.headElement);
|
||
break;
|
||
}
|
||
case TAG_ID.HEAD: {
|
||
p2._err(token, ERR.misplacedStartTagForHeadElement);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenAfterHead(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagAfterHead(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.BR: {
|
||
tokenAfterHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p2._err(token, ERR.endTagWithoutMatchingOpenElement);
|
||
}
|
||
}
|
||
}
|
||
function tokenAfterHead(p2, token) {
|
||
p2._insertFakeElement(TAG_NAMES.BODY, TAG_ID.BODY);
|
||
p2.insertionMode = InsertionMode.IN_BODY;
|
||
modeInBody(p2, token);
|
||
}
|
||
function modeInBody(p2, token) {
|
||
switch (token.type) {
|
||
case TokenType.CHARACTER: {
|
||
characterInBody(p2, token);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
whitespaceCharacterInBody(p2, token);
|
||
break;
|
||
}
|
||
case TokenType.COMMENT: {
|
||
appendComment(p2, token);
|
||
break;
|
||
}
|
||
case TokenType.START_TAG: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TokenType.END_TAG: {
|
||
endTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TokenType.EOF: {
|
||
eofInBody(p2, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function whitespaceCharacterInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertCharacters(token);
|
||
}
|
||
function characterInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertCharacters(token);
|
||
p2.framesetOk = false;
|
||
}
|
||
function htmlStartTagInBody(p2, token) {
|
||
if (p2.openElements.tmplCount === 0) {
|
||
p2.treeAdapter.adoptAttributes(p2.openElements.items[0], token.attrs);
|
||
}
|
||
}
|
||
function bodyStartTagInBody(p2, token) {
|
||
const bodyElement = p2.openElements.tryPeekProperlyNestedBodyElement();
|
||
if (bodyElement && p2.openElements.tmplCount === 0) {
|
||
p2.framesetOk = false;
|
||
p2.treeAdapter.adoptAttributes(bodyElement, token.attrs);
|
||
}
|
||
}
|
||
function framesetStartTagInBody(p2, token) {
|
||
const bodyElement = p2.openElements.tryPeekProperlyNestedBodyElement();
|
||
if (p2.framesetOk && bodyElement) {
|
||
p2.treeAdapter.detachNode(bodyElement);
|
||
p2.openElements.popAllUpToHtmlElement();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_FRAMESET;
|
||
}
|
||
}
|
||
function addressStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
}
|
||
function numberedHeaderStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
if (isNumberedHeader(p2.openElements.currentTagId)) {
|
||
p2.openElements.pop();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
}
|
||
function preStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.skipNextNewLine = true;
|
||
p2.framesetOk = false;
|
||
}
|
||
function formStartTagInBody(p2, token) {
|
||
const inTemplate = p2.openElements.tmplCount > 0;
|
||
if (!p2.formElement || inTemplate) {
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
if (!inTemplate) {
|
||
p2.formElement = p2.openElements.current;
|
||
}
|
||
}
|
||
}
|
||
function listItemStartTagInBody(p2, token) {
|
||
p2.framesetOk = false;
|
||
const tn = token.tagID;
|
||
for (let i = p2.openElements.stackTop; i >= 0; i--) {
|
||
const elementId = p2.openElements.tagIDs[i];
|
||
if (tn === TAG_ID.LI && elementId === TAG_ID.LI || (tn === TAG_ID.DD || tn === TAG_ID.DT) && (elementId === TAG_ID.DD || elementId === TAG_ID.DT)) {
|
||
p2.openElements.generateImpliedEndTagsWithExclusion(elementId);
|
||
p2.openElements.popUntilTagNamePopped(elementId);
|
||
break;
|
||
}
|
||
if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p2._isSpecialElement(p2.openElements.items[i], elementId)) {
|
||
break;
|
||
}
|
||
}
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
}
|
||
function plaintextStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.tokenizer.state = TokenizerMode.PLAINTEXT;
|
||
}
|
||
function buttonStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInScope(TAG_ID.BUTTON)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.BUTTON);
|
||
}
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.framesetOk = false;
|
||
}
|
||
function aStartTagInBody(p2, token) {
|
||
const activeElementEntry = p2.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);
|
||
if (activeElementEntry) {
|
||
callAdoptionAgency(p2, token);
|
||
p2.openElements.remove(activeElementEntry.element);
|
||
p2.activeFormattingElements.removeEntry(activeElementEntry);
|
||
}
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.activeFormattingElements.pushElement(p2.openElements.current, token);
|
||
}
|
||
function bStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.activeFormattingElements.pushElement(p2.openElements.current, token);
|
||
}
|
||
function nobrStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
if (p2.openElements.hasInScope(TAG_ID.NOBR)) {
|
||
callAdoptionAgency(p2, token);
|
||
p2._reconstructActiveFormattingElements();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.activeFormattingElements.pushElement(p2.openElements.current, token);
|
||
}
|
||
function appletStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.activeFormattingElements.insertMarker();
|
||
p2.framesetOk = false;
|
||
}
|
||
function tableStartTagInBody(p2, token) {
|
||
if (p2.treeAdapter.getDocumentMode(p2.document) !== DOCUMENT_MODE.QUIRKS && p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.framesetOk = false;
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
}
|
||
function areaStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._appendElement(token, NS.HTML);
|
||
p2.framesetOk = false;
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function isHiddenInput(token) {
|
||
const inputType = getTokenAttr(token, ATTRS.TYPE);
|
||
return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE;
|
||
}
|
||
function inputStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._appendElement(token, NS.HTML);
|
||
if (!isHiddenInput(token)) {
|
||
p2.framesetOk = false;
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function paramStartTagInBody(p2, token) {
|
||
p2._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function hrStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._appendElement(token, NS.HTML);
|
||
p2.framesetOk = false;
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function imageStartTagInBody(p2, token) {
|
||
token.tagName = TAG_NAMES.IMG;
|
||
token.tagID = TAG_ID.IMG;
|
||
areaStartTagInBody(p2, token);
|
||
}
|
||
function textareaStartTagInBody(p2, token) {
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.skipNextNewLine = true;
|
||
p2.tokenizer.state = TokenizerMode.RCDATA;
|
||
p2.originalInsertionMode = p2.insertionMode;
|
||
p2.framesetOk = false;
|
||
p2.insertionMode = InsertionMode.TEXT;
|
||
}
|
||
function xmpStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._closePElement();
|
||
}
|
||
p2._reconstructActiveFormattingElements();
|
||
p2.framesetOk = false;
|
||
p2._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
}
|
||
function iframeStartTagInBody(p2, token) {
|
||
p2.framesetOk = false;
|
||
p2._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
}
|
||
function noembedStartTagInBody(p2, token) {
|
||
p2._switchToTextParsing(token, TokenizerMode.RAWTEXT);
|
||
}
|
||
function selectStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.framesetOk = false;
|
||
p2.insertionMode = p2.insertionMode === InsertionMode.IN_TABLE || p2.insertionMode === InsertionMode.IN_CAPTION || p2.insertionMode === InsertionMode.IN_TABLE_BODY || p2.insertionMode === InsertionMode.IN_ROW || p2.insertionMode === InsertionMode.IN_CELL ? InsertionMode.IN_SELECT_IN_TABLE : InsertionMode.IN_SELECT;
|
||
}
|
||
function optgroupStartTagInBody(p2, token) {
|
||
if (p2.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p2.openElements.pop();
|
||
}
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertElement(token, NS.HTML);
|
||
}
|
||
function rbStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInScope(TAG_ID.RUBY)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
}
|
||
function rtStartTagInBody(p2, token) {
|
||
if (p2.openElements.hasInScope(TAG_ID.RUBY)) {
|
||
p2.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC);
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
}
|
||
function mathStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
adjustTokenMathMLAttrs(token);
|
||
adjustTokenXMLAttrs(token);
|
||
if (token.selfClosing) {
|
||
p2._appendElement(token, NS.MATHML);
|
||
} else {
|
||
p2._insertElement(token, NS.MATHML);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function svgStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
adjustTokenSVGAttrs(token);
|
||
adjustTokenXMLAttrs(token);
|
||
if (token.selfClosing) {
|
||
p2._appendElement(token, NS.SVG);
|
||
} else {
|
||
p2._insertElement(token, NS.SVG);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function genericStartTagInBody(p2, token) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertElement(token, NS.HTML);
|
||
}
|
||
function startTagInBody(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.I:
|
||
case TAG_ID.S:
|
||
case TAG_ID.B:
|
||
case TAG_ID.U:
|
||
case TAG_ID.EM:
|
||
case TAG_ID.TT:
|
||
case TAG_ID.BIG:
|
||
case TAG_ID.CODE:
|
||
case TAG_ID.FONT:
|
||
case TAG_ID.SMALL:
|
||
case TAG_ID.STRIKE:
|
||
case TAG_ID.STRONG: {
|
||
bStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.A: {
|
||
aStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.H1:
|
||
case TAG_ID.H2:
|
||
case TAG_ID.H3:
|
||
case TAG_ID.H4:
|
||
case TAG_ID.H5:
|
||
case TAG_ID.H6: {
|
||
numberedHeaderStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.P:
|
||
case TAG_ID.DL:
|
||
case TAG_ID.OL:
|
||
case TAG_ID.UL:
|
||
case TAG_ID.DIV:
|
||
case TAG_ID.DIR:
|
||
case TAG_ID.NAV:
|
||
case TAG_ID.MAIN:
|
||
case TAG_ID.MENU:
|
||
case TAG_ID.ASIDE:
|
||
case TAG_ID.CENTER:
|
||
case TAG_ID.FIGURE:
|
||
case TAG_ID.FOOTER:
|
||
case TAG_ID.HEADER:
|
||
case TAG_ID.HGROUP:
|
||
case TAG_ID.DIALOG:
|
||
case TAG_ID.DETAILS:
|
||
case TAG_ID.ADDRESS:
|
||
case TAG_ID.ARTICLE:
|
||
case TAG_ID.SECTION:
|
||
case TAG_ID.SUMMARY:
|
||
case TAG_ID.FIELDSET:
|
||
case TAG_ID.BLOCKQUOTE:
|
||
case TAG_ID.FIGCAPTION: {
|
||
addressStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.LI:
|
||
case TAG_ID.DD:
|
||
case TAG_ID.DT: {
|
||
listItemStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BR:
|
||
case TAG_ID.IMG:
|
||
case TAG_ID.WBR:
|
||
case TAG_ID.AREA:
|
||
case TAG_ID.EMBED:
|
||
case TAG_ID.KEYGEN: {
|
||
areaStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HR: {
|
||
hrStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.RB:
|
||
case TAG_ID.RTC: {
|
||
rbStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.RT:
|
||
case TAG_ID.RP: {
|
||
rtStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.PRE:
|
||
case TAG_ID.LISTING: {
|
||
preStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.XMP: {
|
||
xmpStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.SVG: {
|
||
svgStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HTML: {
|
||
htmlStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.TITLE:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
bodyStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FORM: {
|
||
formStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOBR: {
|
||
nobrStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.MATH: {
|
||
mathStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
tableStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.INPUT: {
|
||
inputStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.PARAM:
|
||
case TAG_ID.TRACK:
|
||
case TAG_ID.SOURCE: {
|
||
paramStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.IMAGE: {
|
||
imageStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BUTTON: {
|
||
buttonStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.APPLET:
|
||
case TAG_ID.OBJECT:
|
||
case TAG_ID.MARQUEE: {
|
||
appletStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.IFRAME: {
|
||
iframeStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.SELECT: {
|
||
selectStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.OPTION:
|
||
case TAG_ID.OPTGROUP: {
|
||
optgroupStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOEMBED: {
|
||
noembedStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
framesetStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEXTAREA: {
|
||
textareaStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOSCRIPT: {
|
||
if (p2.options.scriptingEnabled) {
|
||
noembedStartTagInBody(p2, token);
|
||
} else {
|
||
genericStartTagInBody(p2, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.PLAINTEXT: {
|
||
plaintextStartTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TR:
|
||
case TAG_ID.HEAD:
|
||
case TAG_ID.FRAME:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COLGROUP: {
|
||
break;
|
||
}
|
||
default: {
|
||
genericStartTagInBody(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function bodyEndTagInBody(p2, token) {
|
||
if (p2.openElements.hasInScope(TAG_ID.BODY)) {
|
||
p2.insertionMode = InsertionMode.AFTER_BODY;
|
||
if (p2.options.sourceCodeLocationInfo) {
|
||
const bodyElement = p2.openElements.tryPeekProperlyNestedBodyElement();
|
||
if (bodyElement) {
|
||
p2._setEndLocation(bodyElement, token);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function htmlEndTagInBody(p2, token) {
|
||
if (p2.openElements.hasInScope(TAG_ID.BODY)) {
|
||
p2.insertionMode = InsertionMode.AFTER_BODY;
|
||
endTagAfterBody(p2, token);
|
||
}
|
||
}
|
||
function addressEndTagInBody(p2, token) {
|
||
const tn = token.tagID;
|
||
if (p2.openElements.hasInScope(tn)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
p2.openElements.popUntilTagNamePopped(tn);
|
||
}
|
||
}
|
||
function formEndTagInBody(p2) {
|
||
const inTemplate = p2.openElements.tmplCount > 0;
|
||
const { formElement } = p2;
|
||
if (!inTemplate) {
|
||
p2.formElement = null;
|
||
}
|
||
if ((formElement || inTemplate) && p2.openElements.hasInScope(TAG_ID.FORM)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
if (inTemplate) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.FORM);
|
||
} else if (formElement) {
|
||
p2.openElements.remove(formElement);
|
||
}
|
||
}
|
||
}
|
||
function pEndTagInBody(p2) {
|
||
if (!p2.openElements.hasInButtonScope(TAG_ID.P)) {
|
||
p2._insertFakeElement(TAG_NAMES.P, TAG_ID.P);
|
||
}
|
||
p2._closePElement();
|
||
}
|
||
function liEndTagInBody(p2) {
|
||
if (p2.openElements.hasInListItemScope(TAG_ID.LI)) {
|
||
p2.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI);
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.LI);
|
||
}
|
||
}
|
||
function ddEndTagInBody(p2, token) {
|
||
const tn = token.tagID;
|
||
if (p2.openElements.hasInScope(tn)) {
|
||
p2.openElements.generateImpliedEndTagsWithExclusion(tn);
|
||
p2.openElements.popUntilTagNamePopped(tn);
|
||
}
|
||
}
|
||
function numberedHeaderEndTagInBody(p2) {
|
||
if (p2.openElements.hasNumberedHeaderInScope()) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
p2.openElements.popUntilNumberedHeaderPopped();
|
||
}
|
||
}
|
||
function appletEndTagInBody(p2, token) {
|
||
const tn = token.tagID;
|
||
if (p2.openElements.hasInScope(tn)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
p2.openElements.popUntilTagNamePopped(tn);
|
||
p2.activeFormattingElements.clearToLastMarker();
|
||
}
|
||
}
|
||
function brEndTagInBody(p2) {
|
||
p2._reconstructActiveFormattingElements();
|
||
p2._insertFakeElement(TAG_NAMES.BR, TAG_ID.BR);
|
||
p2.openElements.pop();
|
||
p2.framesetOk = false;
|
||
}
|
||
function genericEndTagInBody(p2, token) {
|
||
const tn = token.tagName;
|
||
const tid = token.tagID;
|
||
for (let i = p2.openElements.stackTop; i > 0; i--) {
|
||
const element3 = p2.openElements.items[i];
|
||
const elementId = p2.openElements.tagIDs[i];
|
||
if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p2.treeAdapter.getTagName(element3) === tn)) {
|
||
p2.openElements.generateImpliedEndTagsWithExclusion(tid);
|
||
if (p2.openElements.stackTop >= i)
|
||
p2.openElements.shortenToLength(i);
|
||
break;
|
||
}
|
||
if (p2._isSpecialElement(element3, elementId)) {
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function endTagInBody(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.A:
|
||
case TAG_ID.B:
|
||
case TAG_ID.I:
|
||
case TAG_ID.S:
|
||
case TAG_ID.U:
|
||
case TAG_ID.EM:
|
||
case TAG_ID.TT:
|
||
case TAG_ID.BIG:
|
||
case TAG_ID.CODE:
|
||
case TAG_ID.FONT:
|
||
case TAG_ID.NOBR:
|
||
case TAG_ID.SMALL:
|
||
case TAG_ID.STRIKE:
|
||
case TAG_ID.STRONG: {
|
||
callAdoptionAgency(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.P: {
|
||
pEndTagInBody(p2);
|
||
break;
|
||
}
|
||
case TAG_ID.DL:
|
||
case TAG_ID.UL:
|
||
case TAG_ID.OL:
|
||
case TAG_ID.DIR:
|
||
case TAG_ID.DIV:
|
||
case TAG_ID.NAV:
|
||
case TAG_ID.PRE:
|
||
case TAG_ID.MAIN:
|
||
case TAG_ID.MENU:
|
||
case TAG_ID.ASIDE:
|
||
case TAG_ID.BUTTON:
|
||
case TAG_ID.CENTER:
|
||
case TAG_ID.FIGURE:
|
||
case TAG_ID.FOOTER:
|
||
case TAG_ID.HEADER:
|
||
case TAG_ID.HGROUP:
|
||
case TAG_ID.DIALOG:
|
||
case TAG_ID.ADDRESS:
|
||
case TAG_ID.ARTICLE:
|
||
case TAG_ID.DETAILS:
|
||
case TAG_ID.SECTION:
|
||
case TAG_ID.SUMMARY:
|
||
case TAG_ID.LISTING:
|
||
case TAG_ID.FIELDSET:
|
||
case TAG_ID.BLOCKQUOTE:
|
||
case TAG_ID.FIGCAPTION: {
|
||
addressEndTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.LI: {
|
||
liEndTagInBody(p2);
|
||
break;
|
||
}
|
||
case TAG_ID.DD:
|
||
case TAG_ID.DT: {
|
||
ddEndTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.H1:
|
||
case TAG_ID.H2:
|
||
case TAG_ID.H3:
|
||
case TAG_ID.H4:
|
||
case TAG_ID.H5:
|
||
case TAG_ID.H6: {
|
||
numberedHeaderEndTagInBody(p2);
|
||
break;
|
||
}
|
||
case TAG_ID.BR: {
|
||
brEndTagInBody(p2);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY: {
|
||
bodyEndTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.HTML: {
|
||
htmlEndTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FORM: {
|
||
formEndTagInBody(p2);
|
||
break;
|
||
}
|
||
case TAG_ID.APPLET:
|
||
case TAG_ID.OBJECT:
|
||
case TAG_ID.MARQUEE: {
|
||
appletEndTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default: {
|
||
genericEndTagInBody(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function eofInBody(p2, token) {
|
||
if (p2.tmplInsertionModeStack.length > 0) {
|
||
eofInTemplate(p2, token);
|
||
} else {
|
||
stopParsing(p2, token);
|
||
}
|
||
}
|
||
function endTagInText(p2, token) {
|
||
var _a2;
|
||
if (token.tagID === TAG_ID.SCRIPT) {
|
||
(_a2 = p2.scriptHandler) === null || _a2 === void 0 ? void 0 : _a2.call(p2, p2.openElements.current);
|
||
}
|
||
p2.openElements.pop();
|
||
p2.insertionMode = p2.originalInsertionMode;
|
||
}
|
||
function eofInText(p2, token) {
|
||
p2._err(token, ERR.eofInElementThatCanContainOnlyText);
|
||
p2.openElements.pop();
|
||
p2.insertionMode = p2.originalInsertionMode;
|
||
p2.onEof(token);
|
||
}
|
||
function characterInTable(p2, token) {
|
||
if (TABLE_STRUCTURE_TAGS.has(p2.openElements.currentTagId)) {
|
||
p2.pendingCharacterTokens.length = 0;
|
||
p2.hasNonWhitespacePendingCharacterToken = false;
|
||
p2.originalInsertionMode = p2.insertionMode;
|
||
p2.insertionMode = InsertionMode.IN_TABLE_TEXT;
|
||
switch (token.type) {
|
||
case TokenType.CHARACTER: {
|
||
characterInTableText(p2, token);
|
||
break;
|
||
}
|
||
case TokenType.WHITESPACE_CHARACTER: {
|
||
whitespaceCharacterInTableText(p2, token);
|
||
break;
|
||
}
|
||
}
|
||
} else {
|
||
tokenInTable(p2, token);
|
||
}
|
||
}
|
||
function captionStartTagInTable(p2, token) {
|
||
p2.openElements.clearBackToTableContext();
|
||
p2.activeFormattingElements.insertMarker();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_CAPTION;
|
||
}
|
||
function colgroupStartTagInTable(p2, token) {
|
||
p2.openElements.clearBackToTableContext();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
}
|
||
function colStartTagInTable(p2, token) {
|
||
p2.openElements.clearBackToTableContext();
|
||
p2._insertFakeElement(TAG_NAMES.COLGROUP, TAG_ID.COLGROUP);
|
||
p2.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
startTagInColumnGroup(p2, token);
|
||
}
|
||
function tbodyStartTagInTable(p2, token) {
|
||
p2.openElements.clearBackToTableContext();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
}
|
||
function tdStartTagInTable(p2, token) {
|
||
p2.openElements.clearBackToTableContext();
|
||
p2._insertFakeElement(TAG_NAMES.TBODY, TAG_ID.TBODY);
|
||
p2.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
startTagInTableBody(p2, token);
|
||
}
|
||
function tableStartTagInTable(p2, token) {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.TABLE)) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.TABLE);
|
||
p2._resetInsertionMode();
|
||
p2._processStartTag(token);
|
||
}
|
||
}
|
||
function inputStartTagInTable(p2, token) {
|
||
if (isHiddenInput(token)) {
|
||
p2._appendElement(token, NS.HTML);
|
||
} else {
|
||
tokenInTable(p2, token);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
function formStartTagInTable(p2, token) {
|
||
if (!p2.formElement && p2.openElements.tmplCount === 0) {
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.formElement = p2.openElements.current;
|
||
p2.openElements.pop();
|
||
}
|
||
}
|
||
function startTagInTable(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TR: {
|
||
tdStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
colStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FORM: {
|
||
formStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
tableStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
tbodyStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.INPUT: {
|
||
inputStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION: {
|
||
captionStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COLGROUP: {
|
||
colgroupStartTagInTable(p2, token);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInTable(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInTable(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TABLE: {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.TABLE)) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.TABLE);
|
||
p2._resetInsertionMode();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInTable(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function tokenInTable(p2, token) {
|
||
const savedFosterParentingState = p2.fosterParentingEnabled;
|
||
p2.fosterParentingEnabled = true;
|
||
modeInBody(p2, token);
|
||
p2.fosterParentingEnabled = savedFosterParentingState;
|
||
}
|
||
function whitespaceCharacterInTableText(p2, token) {
|
||
p2.pendingCharacterTokens.push(token);
|
||
}
|
||
function characterInTableText(p2, token) {
|
||
p2.pendingCharacterTokens.push(token);
|
||
p2.hasNonWhitespacePendingCharacterToken = true;
|
||
}
|
||
function tokenInTableText(p2, token) {
|
||
let i = 0;
|
||
if (p2.hasNonWhitespacePendingCharacterToken) {
|
||
for (; i < p2.pendingCharacterTokens.length; i++) {
|
||
tokenInTable(p2, p2.pendingCharacterTokens[i]);
|
||
}
|
||
} else {
|
||
for (; i < p2.pendingCharacterTokens.length; i++) {
|
||
p2._insertCharacters(p2.pendingCharacterTokens[i]);
|
||
}
|
||
}
|
||
p2.insertionMode = p2.originalInsertionMode;
|
||
p2._processToken(token);
|
||
}
|
||
var TABLE_VOID_ELEMENTS = /* @__PURE__ */ new Set([TAG_ID.CAPTION, TAG_ID.COL, TAG_ID.COLGROUP, TAG_ID.TBODY, TAG_ID.TD, TAG_ID.TFOOT, TAG_ID.TH, TAG_ID.THEAD, TAG_ID.TR]);
|
||
function startTagInCaption(p2, token) {
|
||
const tn = token.tagID;
|
||
if (TABLE_VOID_ELEMENTS.has(tn)) {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.CAPTION)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);
|
||
p2.activeFormattingElements.clearToLastMarker();
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
startTagInTable(p2, token);
|
||
}
|
||
} else {
|
||
startTagInBody(p2, token);
|
||
}
|
||
}
|
||
function endTagInCaption(p2, token) {
|
||
const tn = token.tagID;
|
||
switch (tn) {
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.TABLE: {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.CAPTION)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);
|
||
p2.activeFormattingElements.clearToLastMarker();
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
if (tn === TAG_ID.TABLE) {
|
||
endTagInTable(p2, token);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInBody(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInColumnGroup(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
p2._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInColumnGroup(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInColumnGroup(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.COLGROUP: {
|
||
if (p2.openElements.currentTagId === TAG_ID.COLGROUP) {
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
break;
|
||
}
|
||
default: {
|
||
tokenInColumnGroup(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function tokenInColumnGroup(p2, token) {
|
||
if (p2.openElements.currentTagId === TAG_ID.COLGROUP) {
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
p2._processToken(token);
|
||
}
|
||
}
|
||
function startTagInTableBody(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TR: {
|
||
p2.openElements.clearBackToTableBodyContext();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_ROW;
|
||
break;
|
||
}
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TD: {
|
||
p2.openElements.clearBackToTableBodyContext();
|
||
p2._insertFakeElement(TAG_NAMES.TR, TAG_ID.TR);
|
||
p2.insertionMode = InsertionMode.IN_ROW;
|
||
startTagInRow(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
if (p2.openElements.hasTableBodyContextInTableScope()) {
|
||
p2.openElements.clearBackToTableBodyContext();
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
startTagInTable(p2, token);
|
||
}
|
||
break;
|
||
}
|
||
default: {
|
||
startTagInTable(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInTableBody(p2, token) {
|
||
const tn = token.tagID;
|
||
switch (token.tagID) {
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
if (p2.openElements.hasInTableScope(tn)) {
|
||
p2.openElements.clearBackToTableBodyContext();
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
if (p2.openElements.hasTableBodyContextInTableScope()) {
|
||
p2.openElements.clearBackToTableBodyContext();
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
endTagInTable(p2, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TR: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInTable(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInRow(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TH:
|
||
case TAG_ID.TD: {
|
||
p2.openElements.clearBackToTableRowContext();
|
||
p2._insertElement(token, NS.HTML);
|
||
p2.insertionMode = InsertionMode.IN_CELL;
|
||
p2.activeFormattingElements.insertMarker();
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p2.openElements.clearBackToTableRowContext();
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
startTagInTableBody(p2, token);
|
||
}
|
||
break;
|
||
}
|
||
default: {
|
||
startTagInTable(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInRow(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.TR: {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p2.openElements.clearBackToTableRowContext();
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE: {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p2.openElements.clearBackToTableRowContext();
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
endTagInTableBody(p2, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
if (p2.openElements.hasInTableScope(token.tagID) || p2.openElements.hasInTableScope(TAG_ID.TR)) {
|
||
p2.openElements.clearBackToTableRowContext();
|
||
p2.openElements.pop();
|
||
p2.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
endTagInTableBody(p2, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML:
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInTable(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInCell(p2, token) {
|
||
const tn = token.tagID;
|
||
if (TABLE_VOID_ELEMENTS.has(tn)) {
|
||
if (p2.openElements.hasInTableScope(TAG_ID.TD) || p2.openElements.hasInTableScope(TAG_ID.TH)) {
|
||
p2._closeTableCell();
|
||
startTagInRow(p2, token);
|
||
}
|
||
} else {
|
||
startTagInBody(p2, token);
|
||
}
|
||
}
|
||
function endTagInCell(p2, token) {
|
||
const tn = token.tagID;
|
||
switch (tn) {
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
if (p2.openElements.hasInTableScope(tn)) {
|
||
p2.openElements.generateImpliedEndTags();
|
||
p2.openElements.popUntilTagNamePopped(tn);
|
||
p2.activeFormattingElements.clearToLastMarker();
|
||
p2.insertionMode = InsertionMode.IN_ROW;
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TABLE:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD:
|
||
case TAG_ID.TR: {
|
||
if (p2.openElements.hasInTableScope(tn)) {
|
||
p2._closeTableCell();
|
||
endTagInRow(p2, token);
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.BODY:
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COL:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.HTML: {
|
||
break;
|
||
}
|
||
default: {
|
||
endTagInBody(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function startTagInSelect(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.OPTION: {
|
||
if (p2.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p2.openElements.pop();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
break;
|
||
}
|
||
case TAG_ID.OPTGROUP: {
|
||
if (p2.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p2.openElements.pop();
|
||
}
|
||
if (p2.openElements.currentTagId === TAG_ID.OPTGROUP) {
|
||
p2.openElements.pop();
|
||
}
|
||
p2._insertElement(token, NS.HTML);
|
||
break;
|
||
}
|
||
case TAG_ID.INPUT:
|
||
case TAG_ID.KEYGEN:
|
||
case TAG_ID.TEXTAREA:
|
||
case TAG_ID.SELECT: {
|
||
if (p2.openElements.hasInSelectScope(TAG_ID.SELECT)) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p2._resetInsertionMode();
|
||
if (token.tagID !== TAG_ID.SELECT) {
|
||
p2._processStartTag(token);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.TEMPLATE: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function endTagInSelect(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.OPTGROUP: {
|
||
if (p2.openElements.stackTop > 0 && p2.openElements.currentTagId === TAG_ID.OPTION && p2.openElements.tagIDs[p2.openElements.stackTop - 1] === TAG_ID.OPTGROUP) {
|
||
p2.openElements.pop();
|
||
}
|
||
if (p2.openElements.currentTagId === TAG_ID.OPTGROUP) {
|
||
p2.openElements.pop();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.OPTION: {
|
||
if (p2.openElements.currentTagId === TAG_ID.OPTION) {
|
||
p2.openElements.pop();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.SELECT: {
|
||
if (p2.openElements.hasInSelectScope(TAG_ID.SELECT)) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p2._resetInsertionMode();
|
||
}
|
||
break;
|
||
}
|
||
case TAG_ID.TEMPLATE: {
|
||
templateEndTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function startTagInSelectInTable(p2, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p2._resetInsertionMode();
|
||
p2._processStartTag(token);
|
||
} else {
|
||
startTagInSelect(p2, token);
|
||
}
|
||
}
|
||
function endTagInSelectInTable(p2, token) {
|
||
const tn = token.tagID;
|
||
if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) {
|
||
if (p2.openElements.hasInTableScope(tn)) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.SELECT);
|
||
p2._resetInsertionMode();
|
||
p2.onEndTag(token);
|
||
}
|
||
} else {
|
||
endTagInSelect(p2, token);
|
||
}
|
||
}
|
||
function startTagInTemplate(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.BASE:
|
||
case TAG_ID.BASEFONT:
|
||
case TAG_ID.BGSOUND:
|
||
case TAG_ID.LINK:
|
||
case TAG_ID.META:
|
||
case TAG_ID.NOFRAMES:
|
||
case TAG_ID.SCRIPT:
|
||
case TAG_ID.STYLE:
|
||
case TAG_ID.TEMPLATE:
|
||
case TAG_ID.TITLE: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.CAPTION:
|
||
case TAG_ID.COLGROUP:
|
||
case TAG_ID.TBODY:
|
||
case TAG_ID.TFOOT:
|
||
case TAG_ID.THEAD: {
|
||
p2.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;
|
||
p2.insertionMode = InsertionMode.IN_TABLE;
|
||
startTagInTable(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.COL: {
|
||
p2.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;
|
||
p2.insertionMode = InsertionMode.IN_COLUMN_GROUP;
|
||
startTagInColumnGroup(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TR: {
|
||
p2.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;
|
||
p2.insertionMode = InsertionMode.IN_TABLE_BODY;
|
||
startTagInTableBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.TD:
|
||
case TAG_ID.TH: {
|
||
p2.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;
|
||
p2.insertionMode = InsertionMode.IN_ROW;
|
||
startTagInRow(p2, token);
|
||
break;
|
||
}
|
||
default: {
|
||
p2.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;
|
||
p2.insertionMode = InsertionMode.IN_BODY;
|
||
startTagInBody(p2, token);
|
||
}
|
||
}
|
||
}
|
||
function endTagInTemplate(p2, token) {
|
||
if (token.tagID === TAG_ID.TEMPLATE) {
|
||
templateEndTagInHead(p2, token);
|
||
}
|
||
}
|
||
function eofInTemplate(p2, token) {
|
||
if (p2.openElements.tmplCount > 0) {
|
||
p2.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);
|
||
p2.activeFormattingElements.clearToLastMarker();
|
||
p2.tmplInsertionModeStack.shift();
|
||
p2._resetInsertionMode();
|
||
p2.onEof(token);
|
||
} else {
|
||
stopParsing(p2, token);
|
||
}
|
||
}
|
||
function startTagAfterBody(p2, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
startTagInBody(p2, token);
|
||
} else {
|
||
tokenAfterBody(p2, token);
|
||
}
|
||
}
|
||
function endTagAfterBody(p2, token) {
|
||
var _a2;
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
if (!p2.fragmentContext) {
|
||
p2.insertionMode = InsertionMode.AFTER_AFTER_BODY;
|
||
}
|
||
if (p2.options.sourceCodeLocationInfo && p2.openElements.tagIDs[0] === TAG_ID.HTML) {
|
||
p2._setEndLocation(p2.openElements.items[0], token);
|
||
const bodyElement = p2.openElements.items[1];
|
||
if (bodyElement && !((_a2 = p2.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a2 === void 0 ? void 0 : _a2.endTag)) {
|
||
p2._setEndLocation(bodyElement, token);
|
||
}
|
||
}
|
||
} else {
|
||
tokenAfterBody(p2, token);
|
||
}
|
||
}
|
||
function tokenAfterBody(p2, token) {
|
||
p2.insertionMode = InsertionMode.IN_BODY;
|
||
modeInBody(p2, token);
|
||
}
|
||
function startTagInFrameset(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.FRAMESET: {
|
||
p2._insertElement(token, NS.HTML);
|
||
break;
|
||
}
|
||
case TAG_ID.FRAME: {
|
||
p2._appendElement(token, NS.HTML);
|
||
token.ackSelfClosing = true;
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function endTagInFrameset(p2, token) {
|
||
if (token.tagID === TAG_ID.FRAMESET && !p2.openElements.isRootHtmlElementCurrent()) {
|
||
p2.openElements.pop();
|
||
if (!p2.fragmentContext && p2.openElements.currentTagId !== TAG_ID.FRAMESET) {
|
||
p2.insertionMode = InsertionMode.AFTER_FRAMESET;
|
||
}
|
||
}
|
||
}
|
||
function startTagAfterFrameset(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function endTagAfterFrameset(p2, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
p2.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET;
|
||
}
|
||
}
|
||
function startTagAfterAfterBody(p2, token) {
|
||
if (token.tagID === TAG_ID.HTML) {
|
||
startTagInBody(p2, token);
|
||
} else {
|
||
tokenAfterAfterBody(p2, token);
|
||
}
|
||
}
|
||
function tokenAfterAfterBody(p2, token) {
|
||
p2.insertionMode = InsertionMode.IN_BODY;
|
||
modeInBody(p2, token);
|
||
}
|
||
function startTagAfterAfterFrameset(p2, token) {
|
||
switch (token.tagID) {
|
||
case TAG_ID.HTML: {
|
||
startTagInBody(p2, token);
|
||
break;
|
||
}
|
||
case TAG_ID.NOFRAMES: {
|
||
startTagInHead(p2, token);
|
||
break;
|
||
}
|
||
default:
|
||
}
|
||
}
|
||
function nullCharacterInForeignContent(p2, token) {
|
||
token.chars = REPLACEMENT_CHARACTER;
|
||
p2._insertCharacters(token);
|
||
}
|
||
function characterInForeignContent(p2, token) {
|
||
p2._insertCharacters(token);
|
||
p2.framesetOk = false;
|
||
}
|
||
function popUntilHtmlOrIntegrationPoint(p2) {
|
||
while (p2.treeAdapter.getNamespaceURI(p2.openElements.current) !== NS.HTML && !p2._isIntegrationPoint(p2.openElements.currentTagId, p2.openElements.current)) {
|
||
p2.openElements.pop();
|
||
}
|
||
}
|
||
function startTagInForeignContent(p2, token) {
|
||
if (causesExit(token)) {
|
||
popUntilHtmlOrIntegrationPoint(p2);
|
||
p2._startTagOutsideForeignContent(token);
|
||
} else {
|
||
const current = p2._getAdjustedCurrentElement();
|
||
const currentNs = p2.treeAdapter.getNamespaceURI(current);
|
||
if (currentNs === NS.MATHML) {
|
||
adjustTokenMathMLAttrs(token);
|
||
} else if (currentNs === NS.SVG) {
|
||
adjustTokenSVGTagName(token);
|
||
adjustTokenSVGAttrs(token);
|
||
}
|
||
adjustTokenXMLAttrs(token);
|
||
if (token.selfClosing) {
|
||
p2._appendElement(token, currentNs);
|
||
} else {
|
||
p2._insertElement(token, currentNs);
|
||
}
|
||
token.ackSelfClosing = true;
|
||
}
|
||
}
|
||
function endTagInForeignContent(p2, token) {
|
||
if (token.tagID === TAG_ID.P || token.tagID === TAG_ID.BR) {
|
||
popUntilHtmlOrIntegrationPoint(p2);
|
||
p2._endTagOutsideForeignContent(token);
|
||
return;
|
||
}
|
||
for (let i = p2.openElements.stackTop; i > 0; i--) {
|
||
const element3 = p2.openElements.items[i];
|
||
if (p2.treeAdapter.getNamespaceURI(element3) === NS.HTML) {
|
||
p2._endTagOutsideForeignContent(token);
|
||
break;
|
||
}
|
||
const tagName = p2.treeAdapter.getTagName(element3);
|
||
if (tagName.toLowerCase() === token.tagName) {
|
||
token.tagName = tagName;
|
||
p2.openElements.shortenToLength(i);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
// node_modules/entities/lib/esm/escape.js
|
||
var xmlCodeMap = /* @__PURE__ */ new Map([
|
||
[34, """],
|
||
[38, "&"],
|
||
[39, "'"],
|
||
[60, "<"],
|
||
[62, ">"]
|
||
]);
|
||
var getCodePoint = (
|
||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||
String.prototype.codePointAt != null ? (str, index2) => str.codePointAt(index2) : (
|
||
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
||
(c, index2) => (c.charCodeAt(index2) & 64512) === 55296 ? (c.charCodeAt(index2) - 55296) * 1024 + c.charCodeAt(index2 + 1) - 56320 + 65536 : c.charCodeAt(index2)
|
||
)
|
||
);
|
||
function getEscaper(regex, map) {
|
||
return function escape(data) {
|
||
let match;
|
||
let lastIdx = 0;
|
||
let result = "";
|
||
while (match = regex.exec(data)) {
|
||
if (lastIdx !== match.index) {
|
||
result += data.substring(lastIdx, match.index);
|
||
}
|
||
result += map.get(match[0].charCodeAt(0));
|
||
lastIdx = match.index + 1;
|
||
}
|
||
return result + data.substring(lastIdx);
|
||
};
|
||
}
|
||
var escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
|
||
var escapeAttribute = getEscaper(/["&\u00A0]/g, /* @__PURE__ */ new Map([
|
||
[34, """],
|
||
[38, "&"],
|
||
[160, " "]
|
||
]));
|
||
var escapeText = getEscaper(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
|
||
[38, "&"],
|
||
[60, "<"],
|
||
[62, ">"],
|
||
[160, " "]
|
||
]));
|
||
|
||
// node_modules/parse5/dist/serializer/index.js
|
||
var VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
||
TAG_NAMES.AREA,
|
||
TAG_NAMES.BASE,
|
||
TAG_NAMES.BASEFONT,
|
||
TAG_NAMES.BGSOUND,
|
||
TAG_NAMES.BR,
|
||
TAG_NAMES.COL,
|
||
TAG_NAMES.EMBED,
|
||
TAG_NAMES.FRAME,
|
||
TAG_NAMES.HR,
|
||
TAG_NAMES.IMG,
|
||
TAG_NAMES.INPUT,
|
||
TAG_NAMES.KEYGEN,
|
||
TAG_NAMES.LINK,
|
||
TAG_NAMES.META,
|
||
TAG_NAMES.PARAM,
|
||
TAG_NAMES.SOURCE,
|
||
TAG_NAMES.TRACK,
|
||
TAG_NAMES.WBR
|
||
]);
|
||
|
||
// node_modules/parse5/dist/index.js
|
||
function parse3(html5, options) {
|
||
return Parser.parse(html5, options);
|
||
}
|
||
function parseFragment(fragmentContext, html5, options) {
|
||
if (typeof fragmentContext === "string") {
|
||
options = html5;
|
||
html5 = fragmentContext;
|
||
fragmentContext = null;
|
||
}
|
||
const parser = Parser.getFragmentParser(fragmentContext, options);
|
||
parser.tokenizer.write(html5, true);
|
||
return parser.getFragment();
|
||
}
|
||
|
||
// node_modules/unist-util-stringify-position/lib/index.js
|
||
function stringifyPosition(value) {
|
||
if (!value || typeof value !== "object") {
|
||
return "";
|
||
}
|
||
if ("position" in value || "type" in value) {
|
||
return position2(value.position);
|
||
}
|
||
if ("start" in value || "end" in value) {
|
||
return position2(value);
|
||
}
|
||
if ("line" in value || "column" in value) {
|
||
return point2(value);
|
||
}
|
||
return "";
|
||
}
|
||
function point2(point3) {
|
||
return index(point3 && point3.line) + ":" + index(point3 && point3.column);
|
||
}
|
||
function position2(pos) {
|
||
return point2(pos && pos.start) + "-" + point2(pos && pos.end);
|
||
}
|
||
function index(value) {
|
||
return value && typeof value === "number" ? value : 1;
|
||
}
|
||
|
||
// node_modules/vfile-message/lib/index.js
|
||
var VFileMessage = class extends Error {
|
||
/**
|
||
* Create a message for `reason`.
|
||
*
|
||
* > 🪦 **Note**: also has obsolete signatures.
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Options | null | undefined} [options]
|
||
* @returns
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns
|
||
*
|
||
* @param {Error | VFileMessage | string} causeOrReason
|
||
* Reason for message, should use markdown.
|
||
* @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
||
* Configuration (optional).
|
||
* @param {string | null | undefined} [origin]
|
||
* Place in code where the message originates (example:
|
||
* `'my-package:my-rule'` or `'my-rule'`).
|
||
* @returns
|
||
* Instance of `VFileMessage`.
|
||
*/
|
||
// eslint-disable-next-line complexity
|
||
constructor(causeOrReason, optionsOrParentOrPlace, origin) {
|
||
super();
|
||
if (typeof optionsOrParentOrPlace === "string") {
|
||
origin = optionsOrParentOrPlace;
|
||
optionsOrParentOrPlace = void 0;
|
||
}
|
||
let reason = "";
|
||
let options = {};
|
||
let legacyCause = false;
|
||
if (optionsOrParentOrPlace) {
|
||
if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) {
|
||
options = { place: optionsOrParentOrPlace };
|
||
} else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) {
|
||
options = { place: optionsOrParentOrPlace };
|
||
} else if ("type" in optionsOrParentOrPlace) {
|
||
options = {
|
||
ancestors: [optionsOrParentOrPlace],
|
||
place: optionsOrParentOrPlace.position
|
||
};
|
||
} else {
|
||
options = { ...optionsOrParentOrPlace };
|
||
}
|
||
}
|
||
if (typeof causeOrReason === "string") {
|
||
reason = causeOrReason;
|
||
} else if (!options.cause && causeOrReason) {
|
||
legacyCause = true;
|
||
reason = causeOrReason.message;
|
||
options.cause = causeOrReason;
|
||
}
|
||
if (!options.ruleId && !options.source && typeof origin === "string") {
|
||
const index2 = origin.indexOf(":");
|
||
if (index2 === -1) {
|
||
options.ruleId = origin;
|
||
} else {
|
||
options.source = origin.slice(0, index2);
|
||
options.ruleId = origin.slice(index2 + 1);
|
||
}
|
||
}
|
||
if (!options.place && options.ancestors && options.ancestors) {
|
||
const parent = options.ancestors[options.ancestors.length - 1];
|
||
if (parent) {
|
||
options.place = parent.position;
|
||
}
|
||
}
|
||
const start = options.place && "start" in options.place ? options.place.start : options.place;
|
||
this.ancestors = options.ancestors || void 0;
|
||
this.cause = options.cause || void 0;
|
||
this.column = start ? start.column : void 0;
|
||
this.fatal = void 0;
|
||
this.file;
|
||
this.message = reason;
|
||
this.line = start ? start.line : void 0;
|
||
this.name = stringifyPosition(options.place) || "1:1";
|
||
this.place = options.place || void 0;
|
||
this.reason = this.message;
|
||
this.ruleId = options.ruleId || void 0;
|
||
this.source = options.source || void 0;
|
||
this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
|
||
this.actual;
|
||
this.expected;
|
||
this.note;
|
||
this.url;
|
||
}
|
||
};
|
||
VFileMessage.prototype.file = "";
|
||
VFileMessage.prototype.name = "";
|
||
VFileMessage.prototype.reason = "";
|
||
VFileMessage.prototype.message = "";
|
||
VFileMessage.prototype.stack = "";
|
||
VFileMessage.prototype.column = void 0;
|
||
VFileMessage.prototype.line = void 0;
|
||
VFileMessage.prototype.ancestors = void 0;
|
||
VFileMessage.prototype.cause = void 0;
|
||
VFileMessage.prototype.fatal = void 0;
|
||
VFileMessage.prototype.place = void 0;
|
||
VFileMessage.prototype.ruleId = void 0;
|
||
VFileMessage.prototype.source = void 0;
|
||
|
||
// node_modules/vfile/lib/minpath.browser.js
|
||
var minpath = { basename, dirname, extname, join, sep: "/" };
|
||
function basename(path, extname2) {
|
||
if (extname2 !== void 0 && typeof extname2 !== "string") {
|
||
throw new TypeError('"ext" argument must be a string');
|
||
}
|
||
assertPath(path);
|
||
let start = 0;
|
||
let end = -1;
|
||
let index2 = path.length;
|
||
let seenNonSlash;
|
||
if (extname2 === void 0 || extname2.length === 0 || extname2.length > path.length) {
|
||
while (index2--) {
|
||
if (path.codePointAt(index2) === 47) {
|
||
if (seenNonSlash) {
|
||
start = index2 + 1;
|
||
break;
|
||
}
|
||
} else if (end < 0) {
|
||
seenNonSlash = true;
|
||
end = index2 + 1;
|
||
}
|
||
}
|
||
return end < 0 ? "" : path.slice(start, end);
|
||
}
|
||
if (extname2 === path) {
|
||
return "";
|
||
}
|
||
let firstNonSlashEnd = -1;
|
||
let extnameIndex = extname2.length - 1;
|
||
while (index2--) {
|
||
if (path.codePointAt(index2) === 47) {
|
||
if (seenNonSlash) {
|
||
start = index2 + 1;
|
||
break;
|
||
}
|
||
} else {
|
||
if (firstNonSlashEnd < 0) {
|
||
seenNonSlash = true;
|
||
firstNonSlashEnd = index2 + 1;
|
||
}
|
||
if (extnameIndex > -1) {
|
||
if (path.codePointAt(index2) === extname2.codePointAt(extnameIndex--)) {
|
||
if (extnameIndex < 0) {
|
||
end = index2;
|
||
}
|
||
} else {
|
||
extnameIndex = -1;
|
||
end = firstNonSlashEnd;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (start === end) {
|
||
end = firstNonSlashEnd;
|
||
} else if (end < 0) {
|
||
end = path.length;
|
||
}
|
||
return path.slice(start, end);
|
||
}
|
||
function dirname(path) {
|
||
assertPath(path);
|
||
if (path.length === 0) {
|
||
return ".";
|
||
}
|
||
let end = -1;
|
||
let index2 = path.length;
|
||
let unmatchedSlash;
|
||
while (--index2) {
|
||
if (path.codePointAt(index2) === 47) {
|
||
if (unmatchedSlash) {
|
||
end = index2;
|
||
break;
|
||
}
|
||
} else if (!unmatchedSlash) {
|
||
unmatchedSlash = true;
|
||
}
|
||
}
|
||
return end < 0 ? path.codePointAt(0) === 47 ? "/" : "." : end === 1 && path.codePointAt(0) === 47 ? "//" : path.slice(0, end);
|
||
}
|
||
function extname(path) {
|
||
assertPath(path);
|
||
let index2 = path.length;
|
||
let end = -1;
|
||
let startPart = 0;
|
||
let startDot = -1;
|
||
let preDotState = 0;
|
||
let unmatchedSlash;
|
||
while (index2--) {
|
||
const code = path.codePointAt(index2);
|
||
if (code === 47) {
|
||
if (unmatchedSlash) {
|
||
startPart = index2 + 1;
|
||
break;
|
||
}
|
||
continue;
|
||
}
|
||
if (end < 0) {
|
||
unmatchedSlash = true;
|
||
end = index2 + 1;
|
||
}
|
||
if (code === 46) {
|
||
if (startDot < 0) {
|
||
startDot = index2;
|
||
} else if (preDotState !== 1) {
|
||
preDotState = 1;
|
||
}
|
||
} else if (startDot > -1) {
|
||
preDotState = -1;
|
||
}
|
||
}
|
||
if (startDot < 0 || end < 0 || // We saw a non-dot character immediately before the dot.
|
||
preDotState === 0 || // The (right-most) trimmed path component is exactly `..`.
|
||
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
||
return "";
|
||
}
|
||
return path.slice(startDot, end);
|
||
}
|
||
function join(...segments) {
|
||
let index2 = -1;
|
||
let joined;
|
||
while (++index2 < segments.length) {
|
||
assertPath(segments[index2]);
|
||
if (segments[index2]) {
|
||
joined = joined === void 0 ? segments[index2] : joined + "/" + segments[index2];
|
||
}
|
||
}
|
||
return joined === void 0 ? "." : normalize2(joined);
|
||
}
|
||
function normalize2(path) {
|
||
assertPath(path);
|
||
const absolute = path.codePointAt(0) === 47;
|
||
let value = normalizeString(path, !absolute);
|
||
if (value.length === 0 && !absolute) {
|
||
value = ".";
|
||
}
|
||
if (value.length > 0 && path.codePointAt(path.length - 1) === 47) {
|
||
value += "/";
|
||
}
|
||
return absolute ? "/" + value : value;
|
||
}
|
||
function normalizeString(path, allowAboveRoot) {
|
||
let result = "";
|
||
let lastSegmentLength = 0;
|
||
let lastSlash = -1;
|
||
let dots = 0;
|
||
let index2 = -1;
|
||
let code;
|
||
let lastSlashIndex;
|
||
while (++index2 <= path.length) {
|
||
if (index2 < path.length) {
|
||
code = path.codePointAt(index2);
|
||
} else if (code === 47) {
|
||
break;
|
||
} else {
|
||
code = 47;
|
||
}
|
||
if (code === 47) {
|
||
if (lastSlash === index2 - 1 || dots === 1) {
|
||
} else if (lastSlash !== index2 - 1 && dots === 2) {
|
||
if (result.length < 2 || lastSegmentLength !== 2 || result.codePointAt(result.length - 1) !== 46 || result.codePointAt(result.length - 2) !== 46) {
|
||
if (result.length > 2) {
|
||
lastSlashIndex = result.lastIndexOf("/");
|
||
if (lastSlashIndex !== result.length - 1) {
|
||
if (lastSlashIndex < 0) {
|
||
result = "";
|
||
lastSegmentLength = 0;
|
||
} else {
|
||
result = result.slice(0, lastSlashIndex);
|
||
lastSegmentLength = result.length - 1 - result.lastIndexOf("/");
|
||
}
|
||
lastSlash = index2;
|
||
dots = 0;
|
||
continue;
|
||
}
|
||
} else if (result.length > 0) {
|
||
result = "";
|
||
lastSegmentLength = 0;
|
||
lastSlash = index2;
|
||
dots = 0;
|
||
continue;
|
||
}
|
||
}
|
||
if (allowAboveRoot) {
|
||
result = result.length > 0 ? result + "/.." : "..";
|
||
lastSegmentLength = 2;
|
||
}
|
||
} else {
|
||
if (result.length > 0) {
|
||
result += "/" + path.slice(lastSlash + 1, index2);
|
||
} else {
|
||
result = path.slice(lastSlash + 1, index2);
|
||
}
|
||
lastSegmentLength = index2 - lastSlash - 1;
|
||
}
|
||
lastSlash = index2;
|
||
dots = 0;
|
||
} else if (code === 46 && dots > -1) {
|
||
dots++;
|
||
} else {
|
||
dots = -1;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function assertPath(path) {
|
||
if (typeof path !== "string") {
|
||
throw new TypeError(
|
||
"Path must be a string. Received " + JSON.stringify(path)
|
||
);
|
||
}
|
||
}
|
||
|
||
// node_modules/vfile/lib/minproc.browser.js
|
||
var minproc = { cwd };
|
||
function cwd() {
|
||
return "/";
|
||
}
|
||
|
||
// node_modules/vfile/lib/minurl.shared.js
|
||
function isUrl(fileUrlOrPath) {
|
||
return Boolean(
|
||
fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && // @ts-expect-error: indexing is fine.
|
||
fileUrlOrPath.auth === void 0
|
||
);
|
||
}
|
||
|
||
// node_modules/vfile/lib/minurl.browser.js
|
||
function urlToPath(path) {
|
||
if (typeof path === "string") {
|
||
path = new URL(path);
|
||
} else if (!isUrl(path)) {
|
||
const error = new TypeError(
|
||
'The "path" argument must be of type string or an instance of URL. Received `' + path + "`"
|
||
);
|
||
error.code = "ERR_INVALID_ARG_TYPE";
|
||
throw error;
|
||
}
|
||
if (path.protocol !== "file:") {
|
||
const error = new TypeError("The URL must be of scheme file");
|
||
error.code = "ERR_INVALID_URL_SCHEME";
|
||
throw error;
|
||
}
|
||
return getPathFromURLPosix(path);
|
||
}
|
||
function getPathFromURLPosix(url) {
|
||
if (url.hostname !== "") {
|
||
const error = new TypeError(
|
||
'File URL host must be "localhost" or empty on darwin'
|
||
);
|
||
error.code = "ERR_INVALID_FILE_URL_HOST";
|
||
throw error;
|
||
}
|
||
const pathname = url.pathname;
|
||
let index2 = -1;
|
||
while (++index2 < pathname.length) {
|
||
if (pathname.codePointAt(index2) === 37 && pathname.codePointAt(index2 + 1) === 50) {
|
||
const third = pathname.codePointAt(index2 + 2);
|
||
if (third === 70 || third === 102) {
|
||
const error = new TypeError(
|
||
"File URL path must not include encoded / characters"
|
||
);
|
||
error.code = "ERR_INVALID_FILE_URL_PATH";
|
||
throw error;
|
||
}
|
||
}
|
||
}
|
||
return decodeURIComponent(pathname);
|
||
}
|
||
|
||
// node_modules/vfile/lib/index.js
|
||
var order = (
|
||
/** @type {const} */
|
||
[
|
||
"history",
|
||
"path",
|
||
"basename",
|
||
"stem",
|
||
"extname",
|
||
"dirname"
|
||
]
|
||
);
|
||
var VFile = class {
|
||
/**
|
||
* Create a new virtual file.
|
||
*
|
||
* `options` is treated as:
|
||
*
|
||
* * `string` or `Uint8Array` — `{value: options}`
|
||
* * `URL` — `{path: options}`
|
||
* * `VFile` — shallow copies its data over to the new file
|
||
* * `object` — all fields are shallow copied over to the new file
|
||
*
|
||
* Path related fields are set in the following order (least specific to
|
||
* most specific): `history`, `path`, `basename`, `stem`, `extname`,
|
||
* `dirname`.
|
||
*
|
||
* You cannot set `dirname` or `extname` without setting either `history`,
|
||
* `path`, `basename`, or `stem` too.
|
||
*
|
||
* @param {Compatible | null | undefined} [value]
|
||
* File value.
|
||
* @returns
|
||
* New instance.
|
||
*/
|
||
constructor(value) {
|
||
let options;
|
||
if (!value) {
|
||
options = {};
|
||
} else if (isUrl(value)) {
|
||
options = { path: value };
|
||
} else if (typeof value === "string" || isUint8Array(value)) {
|
||
options = { value };
|
||
} else {
|
||
options = value;
|
||
}
|
||
this.cwd = "cwd" in options ? "" : minproc.cwd();
|
||
this.data = {};
|
||
this.history = [];
|
||
this.messages = [];
|
||
this.value;
|
||
this.map;
|
||
this.result;
|
||
this.stored;
|
||
let index2 = -1;
|
||
while (++index2 < order.length) {
|
||
const field2 = order[index2];
|
||
if (field2 in options && options[field2] !== void 0 && options[field2] !== null) {
|
||
this[field2] = field2 === "history" ? [...options[field2]] : options[field2];
|
||
}
|
||
}
|
||
let field;
|
||
for (field in options) {
|
||
if (!order.includes(field)) {
|
||
this[field] = options[field];
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Get the basename (including extname) (example: `'index.min.js'`).
|
||
*
|
||
* @returns {string | undefined}
|
||
* Basename.
|
||
*/
|
||
get basename() {
|
||
return typeof this.path === "string" ? minpath.basename(this.path) : void 0;
|
||
}
|
||
/**
|
||
* Set basename (including extname) (`'index.min.js'`).
|
||
*
|
||
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
||
* on windows).
|
||
* Cannot be nullified (use `file.path = file.dirname` instead).
|
||
*
|
||
* @param {string} basename
|
||
* Basename.
|
||
* @returns {undefined}
|
||
* Nothing.
|
||
*/
|
||
set basename(basename2) {
|
||
assertNonEmpty(basename2, "basename");
|
||
assertPart(basename2, "basename");
|
||
this.path = minpath.join(this.dirname || "", basename2);
|
||
}
|
||
/**
|
||
* Get the parent path (example: `'~'`).
|
||
*
|
||
* @returns {string | undefined}
|
||
* Dirname.
|
||
*/
|
||
get dirname() {
|
||
return typeof this.path === "string" ? minpath.dirname(this.path) : void 0;
|
||
}
|
||
/**
|
||
* Set the parent path (example: `'~'`).
|
||
*
|
||
* Cannot be set if there’s no `path` yet.
|
||
*
|
||
* @param {string | undefined} dirname
|
||
* Dirname.
|
||
* @returns {undefined}
|
||
* Nothing.
|
||
*/
|
||
set dirname(dirname2) {
|
||
assertPath2(this.basename, "dirname");
|
||
this.path = minpath.join(dirname2 || "", this.basename);
|
||
}
|
||
/**
|
||
* Get the extname (including dot) (example: `'.js'`).
|
||
*
|
||
* @returns {string | undefined}
|
||
* Extname.
|
||
*/
|
||
get extname() {
|
||
return typeof this.path === "string" ? minpath.extname(this.path) : void 0;
|
||
}
|
||
/**
|
||
* Set the extname (including dot) (example: `'.js'`).
|
||
*
|
||
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
||
* on windows).
|
||
* Cannot be set if there’s no `path` yet.
|
||
*
|
||
* @param {string | undefined} extname
|
||
* Extname.
|
||
* @returns {undefined}
|
||
* Nothing.
|
||
*/
|
||
set extname(extname2) {
|
||
assertPart(extname2, "extname");
|
||
assertPath2(this.dirname, "extname");
|
||
if (extname2) {
|
||
if (extname2.codePointAt(0) !== 46) {
|
||
throw new Error("`extname` must start with `.`");
|
||
}
|
||
if (extname2.includes(".", 1)) {
|
||
throw new Error("`extname` cannot contain multiple dots");
|
||
}
|
||
}
|
||
this.path = minpath.join(this.dirname, this.stem + (extname2 || ""));
|
||
}
|
||
/**
|
||
* Get the full path (example: `'~/index.min.js'`).
|
||
*
|
||
* @returns {string}
|
||
* Path.
|
||
*/
|
||
get path() {
|
||
return this.history[this.history.length - 1];
|
||
}
|
||
/**
|
||
* Set the full path (example: `'~/index.min.js'`).
|
||
*
|
||
* Cannot be nullified.
|
||
* You can set a file URL (a `URL` object with a `file:` protocol) which will
|
||
* be turned into a path with `url.fileURLToPath`.
|
||
*
|
||
* @param {URL | string} path
|
||
* Path.
|
||
* @returns {undefined}
|
||
* Nothing.
|
||
*/
|
||
set path(path) {
|
||
if (isUrl(path)) {
|
||
path = urlToPath(path);
|
||
}
|
||
assertNonEmpty(path, "path");
|
||
if (this.path !== path) {
|
||
this.history.push(path);
|
||
}
|
||
}
|
||
/**
|
||
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
||
*
|
||
* @returns {string | undefined}
|
||
* Stem.
|
||
*/
|
||
get stem() {
|
||
return typeof this.path === "string" ? minpath.basename(this.path, this.extname) : void 0;
|
||
}
|
||
/**
|
||
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
||
*
|
||
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
||
* on windows).
|
||
* Cannot be nullified (use `file.path = file.dirname` instead).
|
||
*
|
||
* @param {string} stem
|
||
* Stem.
|
||
* @returns {undefined}
|
||
* Nothing.
|
||
*/
|
||
set stem(stem) {
|
||
assertNonEmpty(stem, "stem");
|
||
assertPart(stem, "stem");
|
||
this.path = minpath.join(this.dirname || "", stem + (this.extname || ""));
|
||
}
|
||
// Normal prototypal methods.
|
||
/**
|
||
* Create a fatal message for `reason` associated with the file.
|
||
*
|
||
* The `fatal` field of the message is set to `true` (error; file not usable)
|
||
* and the `file` field is set to the current file path.
|
||
* The message is added to the `messages` field on `file`.
|
||
*
|
||
* > 🪦 **Note**: also has obsolete signatures.
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {MessageOptions | null | undefined} [options]
|
||
* @returns {never}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {never}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {never}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {never}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {never}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {never}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {never}
|
||
*
|
||
* @param {Error | VFileMessage | string} causeOrReason
|
||
* Reason for message, should use markdown.
|
||
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
||
* Configuration (optional).
|
||
* @param {string | null | undefined} [origin]
|
||
* Place in code where the message originates (example:
|
||
* `'my-package:my-rule'` or `'my-rule'`).
|
||
* @returns {never}
|
||
* Never.
|
||
* @throws {VFileMessage}
|
||
* Message.
|
||
*/
|
||
fail(causeOrReason, optionsOrParentOrPlace, origin) {
|
||
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
||
message.fatal = true;
|
||
throw message;
|
||
}
|
||
/**
|
||
* Create an info message for `reason` associated with the file.
|
||
*
|
||
* The `fatal` field of the message is set to `undefined` (info; change
|
||
* likely not needed) and the `file` field is set to the current file path.
|
||
* The message is added to the `messages` field on `file`.
|
||
*
|
||
* > 🪦 **Note**: also has obsolete signatures.
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {MessageOptions | null | undefined} [options]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @param {Error | VFileMessage | string} causeOrReason
|
||
* Reason for message, should use markdown.
|
||
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
||
* Configuration (optional).
|
||
* @param {string | null | undefined} [origin]
|
||
* Place in code where the message originates (example:
|
||
* `'my-package:my-rule'` or `'my-rule'`).
|
||
* @returns {VFileMessage}
|
||
* Message.
|
||
*/
|
||
info(causeOrReason, optionsOrParentOrPlace, origin) {
|
||
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
||
message.fatal = void 0;
|
||
return message;
|
||
}
|
||
/**
|
||
* Create a message for `reason` associated with the file.
|
||
*
|
||
* The `fatal` field of the message is set to `false` (warning; change may be
|
||
* needed) and the `file` field is set to the current file path.
|
||
* The message is added to the `messages` field on `file`.
|
||
*
|
||
* > 🪦 **Note**: also has obsolete signatures.
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {MessageOptions | null | undefined} [options]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {string} reason
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Node | NodeLike | null | undefined} parent
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {Point | Position | null | undefined} place
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @overload
|
||
* @param {Error | VFileMessage} cause
|
||
* @param {string | null | undefined} [origin]
|
||
* @returns {VFileMessage}
|
||
*
|
||
* @param {Error | VFileMessage | string} causeOrReason
|
||
* Reason for message, should use markdown.
|
||
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
||
* Configuration (optional).
|
||
* @param {string | null | undefined} [origin]
|
||
* Place in code where the message originates (example:
|
||
* `'my-package:my-rule'` or `'my-rule'`).
|
||
* @returns {VFileMessage}
|
||
* Message.
|
||
*/
|
||
message(causeOrReason, optionsOrParentOrPlace, origin) {
|
||
const message = new VFileMessage(
|
||
// @ts-expect-error: the overloads are fine.
|
||
causeOrReason,
|
||
optionsOrParentOrPlace,
|
||
origin
|
||
);
|
||
if (this.path) {
|
||
message.name = this.path + ":" + message.name;
|
||
message.file = this.path;
|
||
}
|
||
message.fatal = false;
|
||
this.messages.push(message);
|
||
return message;
|
||
}
|
||
/**
|
||
* Serialize the file.
|
||
*
|
||
* > **Note**: which encodings are supported depends on the engine.
|
||
* > For info on Node.js, see:
|
||
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
|
||
*
|
||
* @param {string | null | undefined} [encoding='utf8']
|
||
* Character encoding to understand `value` as when it’s a `Uint8Array`
|
||
* (default: `'utf-8'`).
|
||
* @returns {string}
|
||
* Serialized file.
|
||
*/
|
||
toString(encoding) {
|
||
if (this.value === void 0) {
|
||
return "";
|
||
}
|
||
if (typeof this.value === "string") {
|
||
return this.value;
|
||
}
|
||
const decoder = new TextDecoder(encoding || void 0);
|
||
return decoder.decode(this.value);
|
||
}
|
||
};
|
||
function assertPart(part, name) {
|
||
if (part && part.includes(minpath.sep)) {
|
||
throw new Error(
|
||
"`" + name + "` cannot be a path: did not expect `" + minpath.sep + "`"
|
||
);
|
||
}
|
||
}
|
||
function assertNonEmpty(part, name) {
|
||
if (!part) {
|
||
throw new Error("`" + name + "` cannot be empty");
|
||
}
|
||
}
|
||
function assertPath2(path, name) {
|
||
if (!path) {
|
||
throw new Error("Setting `" + name + "` requires `path` to be set too");
|
||
}
|
||
}
|
||
function isUint8Array(value) {
|
||
return Boolean(
|
||
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
||
);
|
||
}
|
||
|
||
// node_modules/hast-util-from-html/lib/errors.js
|
||
var errors = {
|
||
/** @type {ErrorInfo} */
|
||
abandonedHeadElementChild: {
|
||
reason: "Unexpected metadata element after head",
|
||
description: "Unexpected element after head. Expected the element before `</head>`",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
abruptClosingOfEmptyComment: {
|
||
reason: "Unexpected abruptly closed empty comment",
|
||
description: "Unexpected `>` or `->`. Expected `-->` to close comments"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
abruptDoctypePublicIdentifier: {
|
||
reason: "Unexpected abruptly closed public identifier",
|
||
description: "Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
abruptDoctypeSystemIdentifier: {
|
||
reason: "Unexpected abruptly closed system identifier",
|
||
description: "Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
absenceOfDigitsInNumericCharacterReference: {
|
||
reason: "Unexpected non-digit at start of numeric character reference",
|
||
description: "Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
cdataInHtmlContent: {
|
||
reason: "Unexpected CDATA section in HTML",
|
||
description: "Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
characterReferenceOutsideUnicodeRange: {
|
||
reason: "Unexpected too big numeric character reference",
|
||
description: "Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
closingOfElementWithOpenChildElements: {
|
||
reason: "Unexpected closing tag with open child elements",
|
||
description: "Unexpectedly closing tag. Expected other tags to be closed first",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
controlCharacterInInputStream: {
|
||
reason: "Unexpected control character",
|
||
description: "Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
controlCharacterReference: {
|
||
reason: "Unexpected control character reference",
|
||
description: "Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
disallowedContentInNoscriptInHead: {
|
||
reason: "Disallowed content inside `<noscript>` in `<head>`",
|
||
description: "Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
duplicateAttribute: {
|
||
reason: "Unexpected duplicate attribute",
|
||
description: "Unexpectedly double attribute. Expected attributes to occur only once"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
endTagWithAttributes: {
|
||
reason: "Unexpected attribute on closing tag",
|
||
description: "Unexpected attribute. Expected `>` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
endTagWithTrailingSolidus: {
|
||
reason: "Unexpected slash at end of closing tag",
|
||
description: "Unexpected `%c-1`. Expected `>` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
endTagWithoutMatchingOpenElement: {
|
||
reason: "Unexpected unopened end tag",
|
||
description: "Unexpected end tag. Expected no end tag or another end tag",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
eofBeforeTagName: {
|
||
reason: "Unexpected end of file",
|
||
description: "Unexpected end of file. Expected tag name instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
eofInCdata: {
|
||
reason: "Unexpected end of file in CDATA",
|
||
description: "Unexpected end of file. Expected `]]>` to close the CDATA"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
eofInComment: {
|
||
reason: "Unexpected end of file in comment",
|
||
description: "Unexpected end of file. Expected `-->` to close the comment"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
eofInDoctype: {
|
||
reason: "Unexpected end of file in doctype",
|
||
description: "Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
eofInElementThatCanContainOnlyText: {
|
||
reason: "Unexpected end of file in element that can only contain text",
|
||
description: "Unexpected end of file. Expected text or a closing tag",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
eofInScriptHtmlCommentLikeText: {
|
||
reason: "Unexpected end of file in comment inside script",
|
||
description: "Unexpected end of file. Expected `-->` to close the comment"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
eofInTag: {
|
||
reason: "Unexpected end of file in tag",
|
||
description: "Unexpected end of file. Expected `>` to close the tag"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
incorrectlyClosedComment: {
|
||
reason: "Incorrectly closed comment",
|
||
description: "Unexpected `%c-1`. Expected `-->` to close the comment"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
incorrectlyOpenedComment: {
|
||
reason: "Incorrectly opened comment",
|
||
description: "Unexpected `%c`. Expected `<!--` to open the comment"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
invalidCharacterSequenceAfterDoctypeName: {
|
||
reason: "Invalid sequence after doctype name",
|
||
description: "Unexpected sequence at `%c`. Expected `public` or `system`"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
invalidFirstCharacterOfTagName: {
|
||
reason: "Invalid first character in tag name",
|
||
description: "Unexpected `%c`. Expected an ASCII letter instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
misplacedDoctype: {
|
||
reason: "Misplaced doctype",
|
||
description: "Unexpected doctype. Expected doctype before head",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
misplacedStartTagForHeadElement: {
|
||
reason: "Misplaced `<head>` start tag",
|
||
description: "Unexpected start tag `<head>`. Expected `<head>` directly after doctype",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingAttributeValue: {
|
||
reason: "Missing attribute value",
|
||
description: "Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingDoctype: {
|
||
reason: "Missing doctype before other content",
|
||
description: "Expected a `<!doctype html>` before anything else",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingDoctypeName: {
|
||
reason: "Missing doctype name",
|
||
description: "Unexpected doctype end at `%c`. Expected `html` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingDoctypePublicIdentifier: {
|
||
reason: "Missing public identifier in doctype",
|
||
description: "Unexpected `%c`. Expected identifier for `public` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingDoctypeSystemIdentifier: {
|
||
reason: "Missing system identifier in doctype",
|
||
description: 'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingEndTagName: {
|
||
reason: "Missing name in end tag",
|
||
description: "Unexpected `%c`. Expected an ASCII letter instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingQuoteBeforeDoctypePublicIdentifier: {
|
||
reason: "Missing quote before public identifier in doctype",
|
||
description: "Unexpected `%c`. Expected `\"` or `'` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingQuoteBeforeDoctypeSystemIdentifier: {
|
||
reason: "Missing quote before system identifier in doctype",
|
||
description: "Unexpected `%c`. Expected `\"` or `'` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingSemicolonAfterCharacterReference: {
|
||
reason: "Missing semicolon after character reference",
|
||
description: "Unexpected `%c`. Expected `;` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingWhitespaceAfterDoctypePublicKeyword: {
|
||
reason: "Missing whitespace after public identifier in doctype",
|
||
description: "Unexpected `%c`. Expected ASCII whitespace instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingWhitespaceAfterDoctypeSystemKeyword: {
|
||
reason: "Missing whitespace after system identifier in doctype",
|
||
description: "Unexpected `%c`. Expected ASCII whitespace instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingWhitespaceBeforeDoctypeName: {
|
||
reason: "Missing whitespace before doctype name",
|
||
description: "Unexpected `%c`. Expected ASCII whitespace instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingWhitespaceBetweenAttributes: {
|
||
reason: "Missing whitespace between attributes",
|
||
description: "Unexpected `%c`. Expected ASCII whitespace instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers: {
|
||
reason: "Missing whitespace between public and system identifiers in doctype",
|
||
description: "Unexpected `%c`. Expected ASCII whitespace instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
nestedComment: {
|
||
reason: "Unexpected nested comment",
|
||
description: "Unexpected `<!--`. Expected `-->`"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
nestedNoscriptInHead: {
|
||
reason: "Unexpected nested `<noscript>` in `<head>`",
|
||
description: "Unexpected `<noscript>`. Expected a closing tag or a meta element",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
nonConformingDoctype: {
|
||
reason: "Unexpected non-conforming doctype declaration",
|
||
description: 'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
nonVoidHtmlElementStartTagWithTrailingSolidus: {
|
||
reason: "Unexpected trailing slash on start tag of non-void element",
|
||
description: "Unexpected `/`. Expected `>` instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
noncharacterCharacterReference: {
|
||
reason: "Unexpected noncharacter code point referenced by character reference",
|
||
description: "Unexpected code point. Do not use noncharacters in HTML"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
noncharacterInInputStream: {
|
||
reason: "Unexpected noncharacter character",
|
||
description: "Unexpected code point `%x`. Do not use noncharacters in HTML"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
nullCharacterReference: {
|
||
reason: "Unexpected NULL character referenced by character reference",
|
||
description: "Unexpected code point. Do not use NULL characters in HTML"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
openElementsLeftAfterEof: {
|
||
reason: "Unexpected end of file",
|
||
description: "Unexpected end of file. Expected closing tag instead",
|
||
url: false
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
surrogateCharacterReference: {
|
||
reason: "Unexpected surrogate character referenced by character reference",
|
||
description: "Unexpected code point. Do not use lone surrogate characters in HTML"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
surrogateInInputStream: {
|
||
reason: "Unexpected surrogate character",
|
||
description: "Unexpected code point `%x`. Do not use lone surrogate characters in HTML"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unexpectedCharacterAfterDoctypeSystemIdentifier: {
|
||
reason: "Invalid character after system identifier in doctype",
|
||
description: "Unexpected character at `%c`. Expected `>`"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unexpectedCharacterInAttributeName: {
|
||
reason: "Unexpected character in attribute name",
|
||
description: "Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unexpectedCharacterInUnquotedAttributeValue: {
|
||
reason: "Unexpected character in unquoted attribute value",
|
||
description: "Unexpected `%c`. Quote the attribute value to include it"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unexpectedEqualsSignBeforeAttributeName: {
|
||
reason: "Unexpected equals sign before attribute name",
|
||
description: "Unexpected `%c`. Add an attribute name before it"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unexpectedNullCharacter: {
|
||
reason: "Unexpected NULL character",
|
||
description: "Unexpected code point `%x`. Do not use NULL characters in HTML"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unexpectedQuestionMarkInsteadOfTagName: {
|
||
reason: "Unexpected question mark instead of tag name",
|
||
description: "Unexpected `%c`. Expected an ASCII letter instead"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unexpectedSolidusInTag: {
|
||
reason: "Unexpected slash in tag",
|
||
description: "Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"
|
||
},
|
||
/** @type {ErrorInfo} */
|
||
unknownNamedCharacterReference: {
|
||
reason: "Unexpected unknown named character reference",
|
||
description: "Unexpected character reference. Expected known named character references"
|
||
}
|
||
};
|
||
|
||
// node_modules/hast-util-from-html/lib/index.js
|
||
var base = "https://html.spec.whatwg.org/multipage/parsing.html#parse-error-";
|
||
var dashToCamelRe = /-[a-z]/g;
|
||
var formatCRe = /%c(?:([-+])(\d+))?/g;
|
||
var formatXRe = /%x/g;
|
||
var fatalities = { 2: true, 1: false, 0: null };
|
||
var emptyOptions = {};
|
||
function fromHtml(value, options) {
|
||
const settings = options || emptyOptions;
|
||
const onerror = settings.onerror;
|
||
const file = value instanceof VFile ? value : new VFile(value);
|
||
const fn = settings.fragment ? parseFragment : parse3;
|
||
const doc = String(file);
|
||
const p5doc = fn(doc, {
|
||
sourceCodeLocationInfo: true,
|
||
// Note `parse5` types currently do not allow `undefined`.
|
||
onParseError: settings.onerror ? internalOnerror : null,
|
||
scriptingEnabled: false
|
||
});
|
||
return (
|
||
/** @type {Root} */
|
||
fromParse5(p5doc, {
|
||
file,
|
||
space: settings.space,
|
||
verbose: settings.verbose
|
||
})
|
||
);
|
||
function internalOnerror(error) {
|
||
const code = error.code;
|
||
const name = camelcase2(code);
|
||
const setting = settings[name];
|
||
const config = setting === null || setting === void 0 ? true : setting;
|
||
const level = typeof config === "number" ? config : config ? 1 : 0;
|
||
if (level) {
|
||
const info = errors[name];
|
||
ok2(info, "expected known error from `parse5`");
|
||
const message = new VFileMessage(format(info.reason), {
|
||
place: {
|
||
start: {
|
||
line: error.startLine,
|
||
column: error.startCol,
|
||
offset: error.startOffset
|
||
},
|
||
end: {
|
||
line: error.endLine,
|
||
column: error.endCol,
|
||
offset: error.endOffset
|
||
}
|
||
},
|
||
ruleId: code,
|
||
source: "hast-util-from-html"
|
||
});
|
||
if (file.path) {
|
||
message.file = file.path;
|
||
message.name = file.path + ":" + message.name;
|
||
}
|
||
message.fatal = fatalities[level];
|
||
message.note = format(info.description);
|
||
message.url = info.url === false ? void 0 : base + code;
|
||
ok2(onerror, "`internalOnerror` is not passed if `onerror` is not set");
|
||
onerror(message);
|
||
}
|
||
function format(value2) {
|
||
return value2.replace(formatCRe, formatC).replace(formatXRe, formatX);
|
||
function formatC(_2, $1, $2) {
|
||
const offset = ($2 ? Number.parseInt($2, 10) : 0) * ($1 === "-" ? -1 : 1);
|
||
const char = doc.charAt(error.startOffset + offset);
|
||
return visualizeCharacter(char);
|
||
}
|
||
function formatX() {
|
||
return visualizeCharacterCode(doc.charCodeAt(error.startOffset));
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function camelcase2(value) {
|
||
return (
|
||
/** @type {ErrorCode} */
|
||
value.replace(dashToCamelRe, dashToCamel)
|
||
);
|
||
}
|
||
function dashToCamel($0) {
|
||
return $0.charAt(1).toUpperCase();
|
||
}
|
||
function visualizeCharacter(char) {
|
||
return char === "`" ? "` ` `" : char;
|
||
}
|
||
function visualizeCharacterCode(charCode) {
|
||
return "0x" + charCode.toString(16).toUpperCase();
|
||
}
|
||
|
||
// node_modules/html-void-elements/index.js
|
||
var htmlVoidElements = [
|
||
"area",
|
||
"base",
|
||
"basefont",
|
||
"bgsound",
|
||
"br",
|
||
"col",
|
||
"command",
|
||
"embed",
|
||
"frame",
|
||
"hr",
|
||
"image",
|
||
"img",
|
||
"input",
|
||
"keygen",
|
||
"link",
|
||
"meta",
|
||
"param",
|
||
"source",
|
||
"track",
|
||
"wbr"
|
||
];
|
||
|
||
// node_modules/zwitch/index.js
|
||
var own4 = {}.hasOwnProperty;
|
||
function zwitch(key2, options) {
|
||
const settings = options || {};
|
||
function one3(value, ...parameters) {
|
||
let fn = one3.invalid;
|
||
const handlers = one3.handlers;
|
||
if (value && own4.call(value, key2)) {
|
||
const id = String(value[key2]);
|
||
fn = own4.call(handlers, id) ? handlers[id] : one3.unknown;
|
||
}
|
||
if (fn) {
|
||
return fn.call(this, value, ...parameters);
|
||
}
|
||
}
|
||
one3.handlers = settings.handlers || {};
|
||
one3.invalid = settings.invalid;
|
||
one3.unknown = settings.unknown;
|
||
return one3;
|
||
}
|
||
|
||
// node_modules/stringify-entities/lib/core.js
|
||
var defaultSubsetRegex = /["&'<>`]/g;
|
||
var surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||
var controlCharactersRegex = (
|
||
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
|
||
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
|
||
);
|
||
var regexEscapeRegex = /[|\\{}()[\]^$+*?.]/g;
|
||
var subsetToRegexCache = /* @__PURE__ */ new WeakMap();
|
||
function core(value, options) {
|
||
value = value.replace(
|
||
options.subset ? charactersToExpressionCached(options.subset) : defaultSubsetRegex,
|
||
basic
|
||
);
|
||
if (options.subset || options.escapeOnly) {
|
||
return value;
|
||
}
|
||
return value.replace(surrogatePairsRegex, surrogate).replace(controlCharactersRegex, basic);
|
||
function surrogate(pair, index2, all3) {
|
||
return options.format(
|
||
(pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
|
||
all3.charCodeAt(index2 + 2),
|
||
options
|
||
);
|
||
}
|
||
function basic(character, index2, all3) {
|
||
return options.format(
|
||
character.charCodeAt(0),
|
||
all3.charCodeAt(index2 + 1),
|
||
options
|
||
);
|
||
}
|
||
}
|
||
function charactersToExpressionCached(subset) {
|
||
let cached = subsetToRegexCache.get(subset);
|
||
if (!cached) {
|
||
cached = charactersToExpression(subset);
|
||
subsetToRegexCache.set(subset, cached);
|
||
}
|
||
return cached;
|
||
}
|
||
function charactersToExpression(subset) {
|
||
const groups = [];
|
||
let index2 = -1;
|
||
while (++index2 < subset.length) {
|
||
groups.push(subset[index2].replace(regexEscapeRegex, "\\$&"));
|
||
}
|
||
return new RegExp("(?:" + groups.join("|") + ")", "g");
|
||
}
|
||
|
||
// node_modules/stringify-entities/lib/util/to-hexadecimal.js
|
||
var hexadecimalRegex = /[\dA-Fa-f]/;
|
||
function toHexadecimal(code, next2, omit) {
|
||
const value = "&#x" + code.toString(16).toUpperCase();
|
||
return omit && next2 && !hexadecimalRegex.test(String.fromCharCode(next2)) ? value : value + ";";
|
||
}
|
||
|
||
// node_modules/stringify-entities/lib/util/to-decimal.js
|
||
var decimalRegex = /\d/;
|
||
function toDecimal(code, next2, omit) {
|
||
const value = "&#" + String(code);
|
||
return omit && next2 && !decimalRegex.test(String.fromCharCode(next2)) ? value : value + ";";
|
||
}
|
||
|
||
// node_modules/character-entities-legacy/index.js
|
||
var characterEntitiesLegacy = [
|
||
"AElig",
|
||
"AMP",
|
||
"Aacute",
|
||
"Acirc",
|
||
"Agrave",
|
||
"Aring",
|
||
"Atilde",
|
||
"Auml",
|
||
"COPY",
|
||
"Ccedil",
|
||
"ETH",
|
||
"Eacute",
|
||
"Ecirc",
|
||
"Egrave",
|
||
"Euml",
|
||
"GT",
|
||
"Iacute",
|
||
"Icirc",
|
||
"Igrave",
|
||
"Iuml",
|
||
"LT",
|
||
"Ntilde",
|
||
"Oacute",
|
||
"Ocirc",
|
||
"Ograve",
|
||
"Oslash",
|
||
"Otilde",
|
||
"Ouml",
|
||
"QUOT",
|
||
"REG",
|
||
"THORN",
|
||
"Uacute",
|
||
"Ucirc",
|
||
"Ugrave",
|
||
"Uuml",
|
||
"Yacute",
|
||
"aacute",
|
||
"acirc",
|
||
"acute",
|
||
"aelig",
|
||
"agrave",
|
||
"amp",
|
||
"aring",
|
||
"atilde",
|
||
"auml",
|
||
"brvbar",
|
||
"ccedil",
|
||
"cedil",
|
||
"cent",
|
||
"copy",
|
||
"curren",
|
||
"deg",
|
||
"divide",
|
||
"eacute",
|
||
"ecirc",
|
||
"egrave",
|
||
"eth",
|
||
"euml",
|
||
"frac12",
|
||
"frac14",
|
||
"frac34",
|
||
"gt",
|
||
"iacute",
|
||
"icirc",
|
||
"iexcl",
|
||
"igrave",
|
||
"iquest",
|
||
"iuml",
|
||
"laquo",
|
||
"lt",
|
||
"macr",
|
||
"micro",
|
||
"middot",
|
||
"nbsp",
|
||
"not",
|
||
"ntilde",
|
||
"oacute",
|
||
"ocirc",
|
||
"ograve",
|
||
"ordf",
|
||
"ordm",
|
||
"oslash",
|
||
"otilde",
|
||
"ouml",
|
||
"para",
|
||
"plusmn",
|
||
"pound",
|
||
"quot",
|
||
"raquo",
|
||
"reg",
|
||
"sect",
|
||
"shy",
|
||
"sup1",
|
||
"sup2",
|
||
"sup3",
|
||
"szlig",
|
||
"thorn",
|
||
"times",
|
||
"uacute",
|
||
"ucirc",
|
||
"ugrave",
|
||
"uml",
|
||
"uuml",
|
||
"yacute",
|
||
"yen",
|
||
"yuml"
|
||
];
|
||
|
||
// node_modules/character-entities-html4/index.js
|
||
var characterEntitiesHtml4 = {
|
||
nbsp: "\xA0",
|
||
iexcl: "\xA1",
|
||
cent: "\xA2",
|
||
pound: "\xA3",
|
||
curren: "\xA4",
|
||
yen: "\xA5",
|
||
brvbar: "\xA6",
|
||
sect: "\xA7",
|
||
uml: "\xA8",
|
||
copy: "\xA9",
|
||
ordf: "\xAA",
|
||
laquo: "\xAB",
|
||
not: "\xAC",
|
||
shy: "\xAD",
|
||
reg: "\xAE",
|
||
macr: "\xAF",
|
||
deg: "\xB0",
|
||
plusmn: "\xB1",
|
||
sup2: "\xB2",
|
||
sup3: "\xB3",
|
||
acute: "\xB4",
|
||
micro: "\xB5",
|
||
para: "\xB6",
|
||
middot: "\xB7",
|
||
cedil: "\xB8",
|
||
sup1: "\xB9",
|
||
ordm: "\xBA",
|
||
raquo: "\xBB",
|
||
frac14: "\xBC",
|
||
frac12: "\xBD",
|
||
frac34: "\xBE",
|
||
iquest: "\xBF",
|
||
Agrave: "\xC0",
|
||
Aacute: "\xC1",
|
||
Acirc: "\xC2",
|
||
Atilde: "\xC3",
|
||
Auml: "\xC4",
|
||
Aring: "\xC5",
|
||
AElig: "\xC6",
|
||
Ccedil: "\xC7",
|
||
Egrave: "\xC8",
|
||
Eacute: "\xC9",
|
||
Ecirc: "\xCA",
|
||
Euml: "\xCB",
|
||
Igrave: "\xCC",
|
||
Iacute: "\xCD",
|
||
Icirc: "\xCE",
|
||
Iuml: "\xCF",
|
||
ETH: "\xD0",
|
||
Ntilde: "\xD1",
|
||
Ograve: "\xD2",
|
||
Oacute: "\xD3",
|
||
Ocirc: "\xD4",
|
||
Otilde: "\xD5",
|
||
Ouml: "\xD6",
|
||
times: "\xD7",
|
||
Oslash: "\xD8",
|
||
Ugrave: "\xD9",
|
||
Uacute: "\xDA",
|
||
Ucirc: "\xDB",
|
||
Uuml: "\xDC",
|
||
Yacute: "\xDD",
|
||
THORN: "\xDE",
|
||
szlig: "\xDF",
|
||
agrave: "\xE0",
|
||
aacute: "\xE1",
|
||
acirc: "\xE2",
|
||
atilde: "\xE3",
|
||
auml: "\xE4",
|
||
aring: "\xE5",
|
||
aelig: "\xE6",
|
||
ccedil: "\xE7",
|
||
egrave: "\xE8",
|
||
eacute: "\xE9",
|
||
ecirc: "\xEA",
|
||
euml: "\xEB",
|
||
igrave: "\xEC",
|
||
iacute: "\xED",
|
||
icirc: "\xEE",
|
||
iuml: "\xEF",
|
||
eth: "\xF0",
|
||
ntilde: "\xF1",
|
||
ograve: "\xF2",
|
||
oacute: "\xF3",
|
||
ocirc: "\xF4",
|
||
otilde: "\xF5",
|
||
ouml: "\xF6",
|
||
divide: "\xF7",
|
||
oslash: "\xF8",
|
||
ugrave: "\xF9",
|
||
uacute: "\xFA",
|
||
ucirc: "\xFB",
|
||
uuml: "\xFC",
|
||
yacute: "\xFD",
|
||
thorn: "\xFE",
|
||
yuml: "\xFF",
|
||
fnof: "\u0192",
|
||
Alpha: "\u0391",
|
||
Beta: "\u0392",
|
||
Gamma: "\u0393",
|
||
Delta: "\u0394",
|
||
Epsilon: "\u0395",
|
||
Zeta: "\u0396",
|
||
Eta: "\u0397",
|
||
Theta: "\u0398",
|
||
Iota: "\u0399",
|
||
Kappa: "\u039A",
|
||
Lambda: "\u039B",
|
||
Mu: "\u039C",
|
||
Nu: "\u039D",
|
||
Xi: "\u039E",
|
||
Omicron: "\u039F",
|
||
Pi: "\u03A0",
|
||
Rho: "\u03A1",
|
||
Sigma: "\u03A3",
|
||
Tau: "\u03A4",
|
||
Upsilon: "\u03A5",
|
||
Phi: "\u03A6",
|
||
Chi: "\u03A7",
|
||
Psi: "\u03A8",
|
||
Omega: "\u03A9",
|
||
alpha: "\u03B1",
|
||
beta: "\u03B2",
|
||
gamma: "\u03B3",
|
||
delta: "\u03B4",
|
||
epsilon: "\u03B5",
|
||
zeta: "\u03B6",
|
||
eta: "\u03B7",
|
||
theta: "\u03B8",
|
||
iota: "\u03B9",
|
||
kappa: "\u03BA",
|
||
lambda: "\u03BB",
|
||
mu: "\u03BC",
|
||
nu: "\u03BD",
|
||
xi: "\u03BE",
|
||
omicron: "\u03BF",
|
||
pi: "\u03C0",
|
||
rho: "\u03C1",
|
||
sigmaf: "\u03C2",
|
||
sigma: "\u03C3",
|
||
tau: "\u03C4",
|
||
upsilon: "\u03C5",
|
||
phi: "\u03C6",
|
||
chi: "\u03C7",
|
||
psi: "\u03C8",
|
||
omega: "\u03C9",
|
||
thetasym: "\u03D1",
|
||
upsih: "\u03D2",
|
||
piv: "\u03D6",
|
||
bull: "\u2022",
|
||
hellip: "\u2026",
|
||
prime: "\u2032",
|
||
Prime: "\u2033",
|
||
oline: "\u203E",
|
||
frasl: "\u2044",
|
||
weierp: "\u2118",
|
||
image: "\u2111",
|
||
real: "\u211C",
|
||
trade: "\u2122",
|
||
alefsym: "\u2135",
|
||
larr: "\u2190",
|
||
uarr: "\u2191",
|
||
rarr: "\u2192",
|
||
darr: "\u2193",
|
||
harr: "\u2194",
|
||
crarr: "\u21B5",
|
||
lArr: "\u21D0",
|
||
uArr: "\u21D1",
|
||
rArr: "\u21D2",
|
||
dArr: "\u21D3",
|
||
hArr: "\u21D4",
|
||
forall: "\u2200",
|
||
part: "\u2202",
|
||
exist: "\u2203",
|
||
empty: "\u2205",
|
||
nabla: "\u2207",
|
||
isin: "\u2208",
|
||
notin: "\u2209",
|
||
ni: "\u220B",
|
||
prod: "\u220F",
|
||
sum: "\u2211",
|
||
minus: "\u2212",
|
||
lowast: "\u2217",
|
||
radic: "\u221A",
|
||
prop: "\u221D",
|
||
infin: "\u221E",
|
||
ang: "\u2220",
|
||
and: "\u2227",
|
||
or: "\u2228",
|
||
cap: "\u2229",
|
||
cup: "\u222A",
|
||
int: "\u222B",
|
||
there4: "\u2234",
|
||
sim: "\u223C",
|
||
cong: "\u2245",
|
||
asymp: "\u2248",
|
||
ne: "\u2260",
|
||
equiv: "\u2261",
|
||
le: "\u2264",
|
||
ge: "\u2265",
|
||
sub: "\u2282",
|
||
sup: "\u2283",
|
||
nsub: "\u2284",
|
||
sube: "\u2286",
|
||
supe: "\u2287",
|
||
oplus: "\u2295",
|
||
otimes: "\u2297",
|
||
perp: "\u22A5",
|
||
sdot: "\u22C5",
|
||
lceil: "\u2308",
|
||
rceil: "\u2309",
|
||
lfloor: "\u230A",
|
||
rfloor: "\u230B",
|
||
lang: "\u2329",
|
||
rang: "\u232A",
|
||
loz: "\u25CA",
|
||
spades: "\u2660",
|
||
clubs: "\u2663",
|
||
hearts: "\u2665",
|
||
diams: "\u2666",
|
||
quot: '"',
|
||
amp: "&",
|
||
lt: "<",
|
||
gt: ">",
|
||
OElig: "\u0152",
|
||
oelig: "\u0153",
|
||
Scaron: "\u0160",
|
||
scaron: "\u0161",
|
||
Yuml: "\u0178",
|
||
circ: "\u02C6",
|
||
tilde: "\u02DC",
|
||
ensp: "\u2002",
|
||
emsp: "\u2003",
|
||
thinsp: "\u2009",
|
||
zwnj: "\u200C",
|
||
zwj: "\u200D",
|
||
lrm: "\u200E",
|
||
rlm: "\u200F",
|
||
ndash: "\u2013",
|
||
mdash: "\u2014",
|
||
lsquo: "\u2018",
|
||
rsquo: "\u2019",
|
||
sbquo: "\u201A",
|
||
ldquo: "\u201C",
|
||
rdquo: "\u201D",
|
||
bdquo: "\u201E",
|
||
dagger: "\u2020",
|
||
Dagger: "\u2021",
|
||
permil: "\u2030",
|
||
lsaquo: "\u2039",
|
||
rsaquo: "\u203A",
|
||
euro: "\u20AC"
|
||
};
|
||
|
||
// node_modules/stringify-entities/lib/constant/dangerous.js
|
||
var dangerous = [
|
||
"cent",
|
||
"copy",
|
||
"divide",
|
||
"gt",
|
||
"lt",
|
||
"not",
|
||
"para",
|
||
"times"
|
||
];
|
||
|
||
// node_modules/stringify-entities/lib/util/to-named.js
|
||
var own5 = {}.hasOwnProperty;
|
||
var characters = {};
|
||
var key;
|
||
for (key in characterEntitiesHtml4) {
|
||
if (own5.call(characterEntitiesHtml4, key)) {
|
||
characters[characterEntitiesHtml4[key]] = key;
|
||
}
|
||
}
|
||
var notAlphanumericRegex = /[^\dA-Za-z]/;
|
||
function toNamed(code, next2, omit, attribute) {
|
||
const character = String.fromCharCode(code);
|
||
if (own5.call(characters, character)) {
|
||
const name = characters[character];
|
||
const value = "&" + name;
|
||
if (omit && characterEntitiesLegacy.includes(name) && !dangerous.includes(name) && (!attribute || next2 && next2 !== 61 && notAlphanumericRegex.test(String.fromCharCode(next2)))) {
|
||
return value;
|
||
}
|
||
return value + ";";
|
||
}
|
||
return "";
|
||
}
|
||
|
||
// node_modules/stringify-entities/lib/util/format-smart.js
|
||
function formatSmart(code, next2, options) {
|
||
let numeric = toHexadecimal(code, next2, options.omitOptionalSemicolons);
|
||
let named;
|
||
if (options.useNamedReferences || options.useShortestReferences) {
|
||
named = toNamed(
|
||
code,
|
||
next2,
|
||
options.omitOptionalSemicolons,
|
||
options.attribute
|
||
);
|
||
}
|
||
if ((options.useShortestReferences || !named) && options.useShortestReferences) {
|
||
const decimal = toDecimal(code, next2, options.omitOptionalSemicolons);
|
||
if (decimal.length < numeric.length) {
|
||
numeric = decimal;
|
||
}
|
||
}
|
||
return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;
|
||
}
|
||
|
||
// node_modules/stringify-entities/lib/index.js
|
||
function stringifyEntities(value, options) {
|
||
return core(value, Object.assign({ format: formatSmart }, options));
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/handle/comment.js
|
||
var htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
|
||
var bogusCommentEntitySubset = [">"];
|
||
var commentEntitySubset = ["<", ">"];
|
||
function comment(node, _1, _2, state) {
|
||
return state.settings.bogusComments ? "<?" + stringifyEntities(
|
||
node.value,
|
||
Object.assign({}, state.settings.characterReferences, {
|
||
subset: bogusCommentEntitySubset
|
||
})
|
||
) + ">" : "<!--" + node.value.replace(htmlCommentRegex, encode) + "-->";
|
||
function encode($0) {
|
||
return stringifyEntities(
|
||
$0,
|
||
Object.assign({}, state.settings.characterReferences, {
|
||
subset: commentEntitySubset
|
||
})
|
||
);
|
||
}
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/handle/doctype.js
|
||
"";
|
||
function doctype(_1, _2, _3, state) {
|
||
return "<!" + (state.settings.upperDoctype ? "DOCTYPE" : "doctype") + (state.settings.tightDoctype ? "" : " ") + "html>";
|
||
}
|
||
|
||
// node_modules/ccount/index.js
|
||
function ccount(value, character) {
|
||
const source = String(value);
|
||
if (typeof character !== "string") {
|
||
throw new TypeError("Expected character");
|
||
}
|
||
let count = 0;
|
||
let index2 = source.indexOf(character);
|
||
while (index2 !== -1) {
|
||
count++;
|
||
index2 = source.indexOf(character, index2 + character.length);
|
||
}
|
||
return count;
|
||
}
|
||
|
||
// node_modules/hast-util-whitespace/lib/index.js
|
||
var re = /[ \t\n\f\r]/g;
|
||
function whitespace(thing) {
|
||
return typeof thing === "object" ? thing.type === "text" ? empty2(thing.value) : false : empty2(thing);
|
||
}
|
||
function empty2(value) {
|
||
return value.replace(re, "") === "";
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/omission/util/siblings.js
|
||
var siblingAfter = siblings(1);
|
||
var siblingBefore = siblings(-1);
|
||
var emptyChildren = [];
|
||
function siblings(increment2) {
|
||
return sibling;
|
||
function sibling(parent, index2, includeWhitespace) {
|
||
const siblings2 = parent ? parent.children : emptyChildren;
|
||
let offset = (index2 || 0) + increment2;
|
||
let next2 = siblings2[offset];
|
||
if (!includeWhitespace) {
|
||
while (next2 && whitespace(next2)) {
|
||
offset += increment2;
|
||
next2 = siblings2[offset];
|
||
}
|
||
}
|
||
return next2;
|
||
}
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/omission/omission.js
|
||
var own6 = {}.hasOwnProperty;
|
||
function omission(handlers) {
|
||
return omit;
|
||
function omit(node, index2, parent) {
|
||
return own6.call(handlers, node.tagName) && handlers[node.tagName](node, index2, parent);
|
||
}
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/omission/closing.js
|
||
var closing = omission({
|
||
body,
|
||
caption: headOrColgroupOrCaption,
|
||
colgroup: headOrColgroupOrCaption,
|
||
dd,
|
||
dt,
|
||
head: headOrColgroupOrCaption,
|
||
html: html3,
|
||
li,
|
||
optgroup,
|
||
option,
|
||
p,
|
||
rp: rubyElement,
|
||
rt: rubyElement,
|
||
tbody,
|
||
td: cells,
|
||
tfoot,
|
||
th: cells,
|
||
thead,
|
||
tr
|
||
});
|
||
function headOrColgroupOrCaption(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2, true);
|
||
return !next2 || next2.type !== "comment" && !(next2.type === "text" && whitespace(next2.value.charAt(0)));
|
||
}
|
||
function html3(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type !== "comment";
|
||
}
|
||
function body(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type !== "comment";
|
||
}
|
||
function p(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return next2 ? next2.type === "element" && (next2.tagName === "address" || next2.tagName === "article" || next2.tagName === "aside" || next2.tagName === "blockquote" || next2.tagName === "details" || next2.tagName === "div" || next2.tagName === "dl" || next2.tagName === "fieldset" || next2.tagName === "figcaption" || next2.tagName === "figure" || next2.tagName === "footer" || next2.tagName === "form" || next2.tagName === "h1" || next2.tagName === "h2" || next2.tagName === "h3" || next2.tagName === "h4" || next2.tagName === "h5" || next2.tagName === "h6" || next2.tagName === "header" || next2.tagName === "hgroup" || next2.tagName === "hr" || next2.tagName === "main" || next2.tagName === "menu" || next2.tagName === "nav" || next2.tagName === "ol" || next2.tagName === "p" || next2.tagName === "pre" || next2.tagName === "section" || next2.tagName === "table" || next2.tagName === "ul") : !parent || // Confusing parent.
|
||
!(parent.type === "element" && (parent.tagName === "a" || parent.tagName === "audio" || parent.tagName === "del" || parent.tagName === "ins" || parent.tagName === "map" || parent.tagName === "noscript" || parent.tagName === "video"));
|
||
}
|
||
function li(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && next2.tagName === "li";
|
||
}
|
||
function dt(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return Boolean(
|
||
next2 && next2.type === "element" && (next2.tagName === "dt" || next2.tagName === "dd")
|
||
);
|
||
}
|
||
function dd(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && (next2.tagName === "dt" || next2.tagName === "dd");
|
||
}
|
||
function rubyElement(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && (next2.tagName === "rp" || next2.tagName === "rt");
|
||
}
|
||
function optgroup(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && next2.tagName === "optgroup";
|
||
}
|
||
function option(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && (next2.tagName === "option" || next2.tagName === "optgroup");
|
||
}
|
||
function thead(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return Boolean(
|
||
next2 && next2.type === "element" && (next2.tagName === "tbody" || next2.tagName === "tfoot")
|
||
);
|
||
}
|
||
function tbody(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && (next2.tagName === "tbody" || next2.tagName === "tfoot");
|
||
}
|
||
function tfoot(_2, index2, parent) {
|
||
return !siblingAfter(parent, index2);
|
||
}
|
||
function tr(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && next2.tagName === "tr";
|
||
}
|
||
function cells(_2, index2, parent) {
|
||
const next2 = siblingAfter(parent, index2);
|
||
return !next2 || next2.type === "element" && (next2.tagName === "td" || next2.tagName === "th");
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/omission/opening.js
|
||
var opening = omission({
|
||
body: body2,
|
||
colgroup,
|
||
head,
|
||
html: html4,
|
||
tbody: tbody2
|
||
});
|
||
function html4(node) {
|
||
const head2 = siblingAfter(node, -1);
|
||
return !head2 || head2.type !== "comment";
|
||
}
|
||
function head(node) {
|
||
const children = node.children;
|
||
const seen = [];
|
||
let index2 = -1;
|
||
while (++index2 < children.length) {
|
||
const child = children[index2];
|
||
if (child.type === "element" && (child.tagName === "title" || child.tagName === "base")) {
|
||
if (seen.includes(child.tagName))
|
||
return false;
|
||
seen.push(child.tagName);
|
||
}
|
||
}
|
||
return children.length > 0;
|
||
}
|
||
function body2(node) {
|
||
const head2 = siblingAfter(node, -1, true);
|
||
return !head2 || head2.type !== "comment" && !(head2.type === "text" && whitespace(head2.value.charAt(0))) && !(head2.type === "element" && (head2.tagName === "meta" || head2.tagName === "link" || head2.tagName === "script" || head2.tagName === "style" || head2.tagName === "template"));
|
||
}
|
||
function colgroup(node, index2, parent) {
|
||
const previous = siblingBefore(parent, index2);
|
||
const head2 = siblingAfter(node, -1, true);
|
||
if (parent && previous && previous.type === "element" && previous.tagName === "colgroup" && closing(previous, parent.children.indexOf(previous), parent)) {
|
||
return false;
|
||
}
|
||
return Boolean(head2 && head2.type === "element" && head2.tagName === "col");
|
||
}
|
||
function tbody2(node, index2, parent) {
|
||
const previous = siblingBefore(parent, index2);
|
||
const head2 = siblingAfter(node, -1);
|
||
if (parent && previous && previous.type === "element" && (previous.tagName === "thead" || previous.tagName === "tbody") && closing(previous, parent.children.indexOf(previous), parent)) {
|
||
return false;
|
||
}
|
||
return Boolean(head2 && head2.type === "element" && head2.tagName === "tr");
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/handle/element.js
|
||
var constants = {
|
||
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
||
name: [
|
||
[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")],
|
||
[`\0
|
||
\f\r "&'/<=>`.split(""), "\0 \n\f\r \"&'/<=>`".split("")]
|
||
],
|
||
// See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.
|
||
unquoted: [
|
||
[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")],
|
||
["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]
|
||
],
|
||
// See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.
|
||
single: [
|
||
["&'".split(""), "\"&'`".split("")],
|
||
["\0&'".split(""), "\0\"&'`".split("")]
|
||
],
|
||
// See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.
|
||
double: [
|
||
['"&'.split(""), "\"&'`".split("")],
|
||
['\0"&'.split(""), "\0\"&'`".split("")]
|
||
]
|
||
};
|
||
function element2(node, index2, parent, state) {
|
||
const schema = state.schema;
|
||
const omit = schema.space === "svg" ? false : state.settings.omitOptionalTags;
|
||
let selfClosing = schema.space === "svg" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());
|
||
const parts = [];
|
||
let last;
|
||
if (schema.space === "html" && node.tagName === "svg") {
|
||
state.schema = svg2;
|
||
}
|
||
const attributes = serializeAttributes(state, node.properties);
|
||
const content = state.all(
|
||
schema.space === "html" && node.tagName === "template" ? node.content : node
|
||
);
|
||
state.schema = schema;
|
||
if (content)
|
||
selfClosing = false;
|
||
if (attributes || !omit || !opening(node, index2, parent)) {
|
||
parts.push("<", node.tagName, attributes ? " " + attributes : "");
|
||
if (selfClosing && (schema.space === "svg" || state.settings.closeSelfClosing)) {
|
||
last = attributes.charAt(attributes.length - 1);
|
||
if (!state.settings.tightSelfClosing || last === "/" || last && last !== '"' && last !== "'") {
|
||
parts.push(" ");
|
||
}
|
||
parts.push("/");
|
||
}
|
||
parts.push(">");
|
||
}
|
||
parts.push(content);
|
||
if (!selfClosing && (!omit || !closing(node, index2, parent))) {
|
||
parts.push("</" + node.tagName + ">");
|
||
}
|
||
return parts.join("");
|
||
}
|
||
function serializeAttributes(state, properties) {
|
||
const values = [];
|
||
let index2 = -1;
|
||
let key2;
|
||
if (properties) {
|
||
for (key2 in properties) {
|
||
if (properties[key2] !== null && properties[key2] !== void 0) {
|
||
const value = serializeAttribute(state, key2, properties[key2]);
|
||
if (value)
|
||
values.push(value);
|
||
}
|
||
}
|
||
}
|
||
while (++index2 < values.length) {
|
||
const last = state.settings.tightAttributes ? values[index2].charAt(values[index2].length - 1) : void 0;
|
||
if (index2 !== values.length - 1 && last !== '"' && last !== "'") {
|
||
values[index2] += " ";
|
||
}
|
||
}
|
||
return values.join("");
|
||
}
|
||
function serializeAttribute(state, key2, value) {
|
||
const info = find(state.schema, key2);
|
||
const x = state.settings.allowParseErrors && state.schema.space === "html" ? 0 : 1;
|
||
const y = state.settings.allowDangerousCharacters ? 0 : 1;
|
||
let quote = state.quote;
|
||
let result;
|
||
if (info.overloadedBoolean && (value === info.attribute || value === "")) {
|
||
value = true;
|
||
} else if (info.boolean || info.overloadedBoolean && typeof value !== "string") {
|
||
value = Boolean(value);
|
||
}
|
||
if (value === null || value === void 0 || value === false || typeof value === "number" && Number.isNaN(value)) {
|
||
return "";
|
||
}
|
||
const name = stringifyEntities(
|
||
info.attribute,
|
||
Object.assign({}, state.settings.characterReferences, {
|
||
// Always encode without parse errors in non-HTML.
|
||
subset: constants.name[x][y]
|
||
})
|
||
);
|
||
if (value === true)
|
||
return name;
|
||
value = Array.isArray(value) ? (info.commaSeparated ? stringify : stringify2)(value, {
|
||
padLeft: !state.settings.tightCommaSeparatedLists
|
||
}) : String(value);
|
||
if (state.settings.collapseEmptyAttributes && !value)
|
||
return name;
|
||
if (state.settings.preferUnquoted) {
|
||
result = stringifyEntities(
|
||
value,
|
||
Object.assign({}, state.settings.characterReferences, {
|
||
attribute: true,
|
||
subset: constants.unquoted[x][y]
|
||
})
|
||
);
|
||
}
|
||
if (result !== value) {
|
||
if (state.settings.quoteSmart && ccount(value, quote) > ccount(value, state.alternative)) {
|
||
quote = state.alternative;
|
||
}
|
||
result = quote + stringifyEntities(
|
||
value,
|
||
Object.assign({}, state.settings.characterReferences, {
|
||
// Always encode without parse errors in non-HTML.
|
||
subset: (quote === "'" ? constants.single : constants.double)[x][y],
|
||
attribute: true
|
||
})
|
||
) + quote;
|
||
}
|
||
return name + (result ? "=" + result : result);
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/handle/text.js
|
||
var textEntitySubset = ["<", "&"];
|
||
function text(node, _2, parent, state) {
|
||
return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(
|
||
node.value,
|
||
Object.assign({}, state.settings.characterReferences, {
|
||
subset: textEntitySubset
|
||
})
|
||
);
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/handle/raw.js
|
||
function raw(node, index2, parent, state) {
|
||
return state.settings.allowDangerousHtml ? node.value : text(node, index2, parent, state);
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/handle/root.js
|
||
"";
|
||
function root(node, _1, _2, state) {
|
||
return state.all(node);
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/handle/index.js
|
||
var handle = zwitch("type", {
|
||
invalid,
|
||
unknown,
|
||
handlers: { comment, doctype, element: element2, raw, root, text }
|
||
});
|
||
function invalid(node) {
|
||
throw new Error("Expected node, not `" + node + "`");
|
||
}
|
||
function unknown(node_) {
|
||
const node = (
|
||
/** @type {Nodes} */
|
||
node_
|
||
);
|
||
throw new Error("Cannot compile unknown node `" + node.type + "`");
|
||
}
|
||
|
||
// node_modules/hast-util-to-html/lib/index.js
|
||
var emptyOptions2 = {};
|
||
var emptyCharacterReferences = {};
|
||
var emptyChildren2 = [];
|
||
function toHtml(tree, options) {
|
||
const options_ = options || emptyOptions2;
|
||
const quote = options_.quote || '"';
|
||
const alternative = quote === '"' ? "'" : '"';
|
||
if (quote !== '"' && quote !== "'") {
|
||
throw new Error("Invalid quote `" + quote + "`, expected `'` or `\"`");
|
||
}
|
||
const state = {
|
||
one: one2,
|
||
all: all2,
|
||
settings: {
|
||
omitOptionalTags: options_.omitOptionalTags || false,
|
||
allowParseErrors: options_.allowParseErrors || false,
|
||
allowDangerousCharacters: options_.allowDangerousCharacters || false,
|
||
quoteSmart: options_.quoteSmart || false,
|
||
preferUnquoted: options_.preferUnquoted || false,
|
||
tightAttributes: options_.tightAttributes || false,
|
||
upperDoctype: options_.upperDoctype || false,
|
||
tightDoctype: options_.tightDoctype || false,
|
||
bogusComments: options_.bogusComments || false,
|
||
tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,
|
||
tightSelfClosing: options_.tightSelfClosing || false,
|
||
collapseEmptyAttributes: options_.collapseEmptyAttributes || false,
|
||
allowDangerousHtml: options_.allowDangerousHtml || false,
|
||
voids: options_.voids || htmlVoidElements,
|
||
characterReferences: options_.characterReferences || emptyCharacterReferences,
|
||
closeSelfClosing: options_.closeSelfClosing || false,
|
||
closeEmptyElements: options_.closeEmptyElements || false
|
||
},
|
||
schema: options_.space === "svg" ? svg2 : html2,
|
||
quote,
|
||
alternative
|
||
};
|
||
return state.one(
|
||
Array.isArray(tree) ? { type: "root", children: tree } : tree,
|
||
void 0,
|
||
void 0
|
||
);
|
||
}
|
||
function one2(node, index2, parent) {
|
||
return handle(node, index2, parent, this);
|
||
}
|
||
function all2(parent) {
|
||
const results = [];
|
||
const children = parent && parent.children || emptyChildren2;
|
||
let index2 = -1;
|
||
while (++index2 < children.length) {
|
||
results[index2] = this.one(children[index2], index2, parent);
|
||
}
|
||
return results.join("");
|
||
}
|
||
|
||
// src/ReadingView.ts
|
||
async function ReadingView(codeBlockElement, context, plugin) {
|
||
var _a2, _b;
|
||
const codeElm = codeBlockElement.querySelector("pre > code");
|
||
if (!codeElm)
|
||
return;
|
||
const preElements = await getPreElements(codeBlockElement);
|
||
if (!preElements)
|
||
return;
|
||
const codeBlockSectionInfo = context.getSectionInfo(codeElm);
|
||
if (!codeBlockSectionInfo) {
|
||
let id = null;
|
||
if ((_a2 = codeBlockElement.parentElement) == null ? void 0 : _a2.classList.contains("internal-embed")) {
|
||
const src = (_b = codeBlockElement.parentElement) == null ? void 0 : _b.getAttribute("src");
|
||
if (src) {
|
||
const indexOfCaret = src.indexOf("^");
|
||
if (indexOfCaret !== -1) {
|
||
id = src.substring(indexOfCaret + 1);
|
||
}
|
||
}
|
||
}
|
||
handlePDFExport(preElements, context, plugin, id);
|
||
}
|
||
const sectionInfo = context.getSectionInfo(preElements[0]);
|
||
if (!sectionInfo)
|
||
return;
|
||
const codeblockLines = Array.from({ length: sectionInfo.lineEnd - sectionInfo.lineStart + 1 }, (_2, number2) => number2 + sectionInfo.lineStart).map((lineNumber) => sectionInfo.text.split("\n")[lineNumber]);
|
||
const codeLines = Array.from(codeblockLines);
|
||
if (codeLines.length >= 2) {
|
||
codeLines.shift();
|
||
codeLines.pop();
|
||
}
|
||
const indentationLevels = trackIndentation(codeLines);
|
||
const codeBlockFirstLines = getCodeBlocksFirstLines(codeblockLines);
|
||
await processCodeBlockFirstLines(preElements, codeBlockFirstLines, indentationLevels, codeblockLines, context.sourcePath, plugin);
|
||
}
|
||
async function addCustomSyntaxHighlight(codeblockLines, language) {
|
||
if (codeblockLines.length > 1) {
|
||
codeblockLines = codeblockLines.slice(1);
|
||
} else {
|
||
codeblockLines = [];
|
||
}
|
||
if (codeblockLines.length === 0)
|
||
return "";
|
||
const prism = await (0, import_obsidian2.loadPrism)();
|
||
const langDefinition = prism.languages[language];
|
||
const html5 = await prism.highlight(codeblockLines.join("\n"), langDefinition, language);
|
||
return html5 || "";
|
||
}
|
||
async function getPreElements(element3) {
|
||
const preElements = Array.from(element3.querySelectorAll("pre:not(.frontmatter)"));
|
||
return preElements;
|
||
}
|
||
function trackIndentation(lines) {
|
||
const result = [];
|
||
const spaceIndentRegex = /^( {0,4}|\t)*/;
|
||
for (let i = 0; i < lines.length; i++) {
|
||
const line = lines[i];
|
||
const match = line.match(spaceIndentRegex);
|
||
let currentIndentLevel = 0;
|
||
if (match) {
|
||
const indentation = match[0];
|
||
currentIndentLevel = calculateIndentLevel(indentation);
|
||
}
|
||
const nextLine = lines[i + 1];
|
||
let nextIndentLevel = 0;
|
||
if (nextLine) {
|
||
const nextMatch = nextLine.match(spaceIndentRegex);
|
||
if (nextMatch) {
|
||
const nextIndentation = nextMatch[0];
|
||
nextIndentLevel = calculateIndentLevel(nextIndentation);
|
||
}
|
||
}
|
||
const info = {
|
||
indentationLevels: currentIndentLevel,
|
||
insertCollapse: nextIndentLevel > currentIndentLevel
|
||
};
|
||
result.push(info);
|
||
}
|
||
return result;
|
||
}
|
||
function calculateIndentLevel(indentation) {
|
||
let indentLevel = 0;
|
||
let spaceCount = 0;
|
||
for (const char of indentation) {
|
||
if (char === " ") {
|
||
indentLevel += 1;
|
||
spaceCount = 0;
|
||
} else if (char === " ") {
|
||
spaceCount += 1;
|
||
if (spaceCount === 4) {
|
||
indentLevel += 1;
|
||
spaceCount = 0;
|
||
}
|
||
}
|
||
}
|
||
if (spaceCount > 0) {
|
||
indentLevel += 1;
|
||
}
|
||
return indentLevel;
|
||
}
|
||
async function calloutPostProcessor(codeBlockElement, context, plugin) {
|
||
var _a2, _b, _c, _d;
|
||
const callouts = codeBlockElement.querySelector(".callout");
|
||
if (!callouts)
|
||
return;
|
||
const calloutPreElements = Array.from(callouts.querySelectorAll("pre:not(.frontmatter)"));
|
||
if (!calloutPreElements)
|
||
return;
|
||
const markdownView = plugin.app.workspace.getActiveViewOfType(import_obsidian2.MarkdownView);
|
||
const viewMode = markdownView == null ? void 0 : markdownView.getMode();
|
||
if (viewMode === "source") {
|
||
const foundCmView = await waitForCmView(context);
|
||
if (!foundCmView)
|
||
return;
|
||
const calloutText = ((_d = (_c = (_b = (_a2 = context == null ? void 0 : context.containerEl) == null ? void 0 : _a2.cmView) == null ? void 0 : _b.widget) == null ? void 0 : _c.text) == null ? void 0 : _d.split("\n")) || null;
|
||
let codeBlockFirstLines = [];
|
||
codeBlockFirstLines = getCallouts(calloutText);
|
||
await processCodeBlockFirstLines(calloutPreElements, codeBlockFirstLines, null, [], context.sourcePath, plugin);
|
||
}
|
||
}
|
||
async function waitForCmView(context, maxRetries = 25, delay = 2) {
|
||
var _a2, _b;
|
||
if ((_a2 = context == null ? void 0 : context.containerEl) == null ? void 0 : _a2.cmView)
|
||
return true;
|
||
let retries = 0;
|
||
while (!((_b = context == null ? void 0 : context.containerEl) == null ? void 0 : _b.cmView)) {
|
||
if (retries >= maxRetries) {
|
||
return false;
|
||
}
|
||
retries++;
|
||
await sleep(delay);
|
||
}
|
||
return true;
|
||
}
|
||
async function checkCustomSyntaxHighlight(parameters, codeblockLines, preCodeElm, plugin) {
|
||
var _a2;
|
||
const customLangConfig = getLanguageConfig(parameters.language, plugin);
|
||
const customFormat = (_a2 = customLangConfig == null ? void 0 : customLangConfig.format) != null ? _a2 : void 0;
|
||
if (customFormat) {
|
||
const highlightedLines = await addCustomSyntaxHighlight(codeblockLines, customFormat);
|
||
if (highlightedLines.length > 0) {
|
||
preCodeElm.innerHTML = highlightedLines;
|
||
}
|
||
}
|
||
}
|
||
async function processCodeBlockFirstLines(preElements, codeBlockFirstLines, indentationLevels, codeblockLines, sourcepath, plugin) {
|
||
if (preElements.length !== codeBlockFirstLines.length)
|
||
return;
|
||
for (const [key2, preElement] of preElements.entries()) {
|
||
const codeBlockFirstLine = codeBlockFirstLines[key2];
|
||
const preCodeElm = preElement.querySelector("pre > code");
|
||
if (!preCodeElm)
|
||
return;
|
||
if (Array.from(preCodeElm.classList).some((className) => /^language-\S+/.test(className)))
|
||
while (!preCodeElm.classList.contains("is-loaded"))
|
||
await sleep(2);
|
||
const parameters = getAllParameters(codeBlockFirstLine, plugin.settings);
|
||
if (parameters.exclude)
|
||
continue;
|
||
await checkCustomSyntaxHighlight(parameters, codeblockLines, preCodeElm, plugin);
|
||
const codeblockLanguageSpecificClass = getLanguageSpecificColorClass(parameters.language, plugin.settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors);
|
||
await addClasses(preElement, parameters, plugin, preCodeElm, indentationLevels, codeblockLanguageSpecificClass, sourcepath);
|
||
}
|
||
}
|
||
async function addClasses(preElement, parameters, plugin, preCodeElm, indentationLevels, codeblockLanguageSpecificClass, sourcePath) {
|
||
preElement.classList.add(`codeblock-customizer-pre`);
|
||
const buttons = createButtons(parameters);
|
||
preElement.appendChild(buttons);
|
||
preElement.classList.add(`codeblock-customizer-language-` + (parameters.language.length > 0 ? parameters.language.toLowerCase() : "nolang"));
|
||
if (codeblockLanguageSpecificClass)
|
||
preElement.classList.add(codeblockLanguageSpecificClass);
|
||
if (preElement.parentElement)
|
||
preElement.parentElement.classList.add(`codeblock-customizer-pre-parent`);
|
||
const header = HeaderWidget(preElement, parameters, plugin.settings, sourcePath, plugin);
|
||
preElement.insertBefore(header, preElement.childNodes[0]);
|
||
const lines = Array.from(preCodeElm.innerHTML.split("\n")) || 0;
|
||
if (parameters.fold) {
|
||
toggleFoldClasses(preElement, lines.length - 1, parameters.fold, plugin.settings.SelectedTheme.settings.semiFold.enableSemiFold, plugin.settings.SelectedTheme.settings.semiFold.visibleLines);
|
||
}
|
||
const borderColor = getBorderColorByLanguage(parameters.language, getPropertyFromLanguageSpecificColors("codeblock.borderColor", plugin.settings));
|
||
if (borderColor.length > 0)
|
||
preElement.classList.add(`hasLangBorderColor`);
|
||
highlightLines(preCodeElm, parameters, plugin.settings.SelectedTheme.settings, indentationLevels, sourcePath, plugin);
|
||
}
|
||
function createCopyButton(displayLanguage) {
|
||
const container = document.createElement("button");
|
||
container.classList.add(`codeblock-customizer-copy-code-button`);
|
||
container.setAttribute("aria-label", "Copy code");
|
||
if (displayLanguage) {
|
||
if (displayLanguage)
|
||
container.setText(displayLanguage);
|
||
else
|
||
(0, import_obsidian2.setIcon)(container, "copy");
|
||
} else
|
||
(0, import_obsidian2.setIcon)(container, "copy");
|
||
return container;
|
||
}
|
||
function createButtons(parameters) {
|
||
const container = createDiv({ cls: `codeblock-customizer-button-container` });
|
||
const copyButton = createCopyButton(parameters.displayLanguage);
|
||
copyButton.addEventListener("click", copyCode);
|
||
container.appendChild(copyButton);
|
||
const wrapCodeButton = createWrapCodeButton();
|
||
wrapCodeButton.addEventListener("click", wrapCode);
|
||
container.appendChild(wrapCodeButton);
|
||
return container;
|
||
}
|
||
function createWrapCodeButton() {
|
||
const container = document.createElement("button");
|
||
container.classList.add(`codeblock-customizer-wrap-code`);
|
||
container.setAttribute("aria-label", "Wrap/Unwrap code");
|
||
(0, import_obsidian2.setIcon)(container, "wrap-text");
|
||
return container;
|
||
}
|
||
function copyCode(event) {
|
||
var _a2;
|
||
const button = event.currentTarget;
|
||
const preElement = (_a2 = button.parentNode) == null ? void 0 : _a2.parentNode;
|
||
if (!preElement)
|
||
return;
|
||
const lines = preElement.querySelectorAll("code");
|
||
const codeTextArray = [];
|
||
lines.forEach((line, index2) => {
|
||
const codeElements = line.querySelectorAll(".codeblock-customizer-line-text");
|
||
codeElements.forEach((codeElement, codeIndex) => {
|
||
const textContent = codeElement.textContent || "";
|
||
codeTextArray.push(textContent);
|
||
if (codeIndex !== codeElements.length - 1)
|
||
codeTextArray.push("\n");
|
||
});
|
||
});
|
||
const concatenatedCodeText = codeTextArray.join("");
|
||
addTextToClipboard(concatenatedCodeText);
|
||
}
|
||
function wrapCode(event) {
|
||
var _a2;
|
||
const button = event.currentTarget;
|
||
const preElement = (_a2 = button.parentNode) == null ? void 0 : _a2.parentNode;
|
||
if (!preElement)
|
||
return;
|
||
const codeElement = preElement.querySelector("code");
|
||
if (!codeElement)
|
||
return;
|
||
let wrapState = "";
|
||
const currentWhiteSpace = window.getComputedStyle(codeElement).whiteSpace;
|
||
if (currentWhiteSpace === "pre") {
|
||
wrapState = "pre-wrap";
|
||
new import_obsidian2.Notice("Code wrapped");
|
||
} else {
|
||
wrapState = "pre";
|
||
new import_obsidian2.Notice("Code unwrapped");
|
||
}
|
||
codeElement.style.setProperty("white-space", wrapState, "important");
|
||
}
|
||
async function handlePDFExport(preElements, context, plugin, id) {
|
||
const { cache, fileContentLines } = await getFileCacheAndContentLines(plugin, context.sourcePath);
|
||
if (!cache || !fileContentLines)
|
||
return;
|
||
let codeBlockFirstLines = [];
|
||
if ((cache == null ? void 0 : cache.sections) && !id) {
|
||
codeBlockFirstLines = getCodeBlocksFirstLines(fileContentLines);
|
||
} else if ((cache == null ? void 0 : cache.blocks) && id) {
|
||
codeBlockFirstLines = getCodeBlocksFirstLines(fileContentLines.slice(cache.blocks[id].position.start.line, cache.blocks[id].position.end.line));
|
||
} else {
|
||
console.error(`Metadata cache not found for file: ${context.sourcePath}`);
|
||
return;
|
||
}
|
||
if (preElements.length !== codeBlockFirstLines.length)
|
||
return;
|
||
try {
|
||
if (plugin.settings.SelectedTheme.settings.printing.enablePrintToPDFStyling)
|
||
await PDFExport(preElements, plugin, codeBlockFirstLines, context.sourcePath);
|
||
} catch (error) {
|
||
console.error(`Error exporting to PDF: ${error.message}`);
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
function HeaderWidget(preElements, parameters, settings, sourcePath, plugin) {
|
||
const parent = preElements.parentNode;
|
||
const codeblockLanguageSpecificClass = getLanguageSpecificColorClass(parameters.language, settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors);
|
||
const container = createContainer(parameters.specificHeader, parameters.language, false, codeblockLanguageSpecificClass);
|
||
if (parameters.displayLanguage) {
|
||
const Icon = getLanguageIcon(parameters.displayLanguage);
|
||
if (Icon) {
|
||
container.appendChild(createCodeblockIcon(parameters.displayLanguage));
|
||
}
|
||
container.appendChild(createCodeblockLang(parameters.language));
|
||
}
|
||
container.appendChild(createFileName(parameters.headerDisplayText, settings.SelectedTheme.settings.codeblock.enableLinks, sourcePath, plugin));
|
||
const collapseEl = createCodeblockCollapse(parameters.fold);
|
||
if (plugin.settings.SelectedTheme.settings.header.disableFoldUnlessSpecified && !plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !parameters.fold || plugin.settings.SelectedTheme.settings.header.disableFoldUnlessSpecified && plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !parameters.unfold) {
|
||
container.classList.add(`noCollapseIcon`);
|
||
} else {
|
||
container.appendChild(collapseEl);
|
||
}
|
||
if (parent)
|
||
parent.insertBefore(container, preElements);
|
||
const semiFold = settings.SelectedTheme.settings.semiFold.enableSemiFold;
|
||
const visibleLines = settings.SelectedTheme.settings.semiFold.visibleLines;
|
||
container.addEventListener("click", function() {
|
||
if (plugin.settings.SelectedTheme.settings.header.disableFoldUnlessSpecified && !plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !parameters.fold || plugin.settings.SelectedTheme.settings.header.disableFoldUnlessSpecified && plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !parameters.unfold) {
|
||
return;
|
||
}
|
||
if (semiFold) {
|
||
const codeElements = preElements.getElementsByTagName("CODE");
|
||
const lines = convertHTMLCollectionToArray(codeElements);
|
||
if (lines.length >= visibleLines + fadeOutLineCount) {
|
||
toggleFold(preElements, collapseEl, `codeblock-customizer-codeblock-semi-collapsed`);
|
||
} else
|
||
toggleFold(preElements, collapseEl, `codeblock-customizer-codeblock-collapsed`);
|
||
} else {
|
||
toggleFold(preElements, collapseEl, `codeblock-customizer-codeblock-collapsed`);
|
||
}
|
||
});
|
||
if (parameters.fold) {
|
||
if (semiFold) {
|
||
const preCodeElm = preElements.querySelector("pre > code");
|
||
let codeblockLineCount = 0;
|
||
if (preCodeElm) {
|
||
let codeblockLines = preCodeElm.innerHTML.split("\n");
|
||
if (codeblockLines.length == 1)
|
||
codeblockLines = ["", ""];
|
||
codeblockLineCount = codeblockLines.length - 1;
|
||
}
|
||
if (codeblockLineCount >= visibleLines + fadeOutLineCount) {
|
||
preElements.classList.add(`codeblock-customizer-codeblock-semi-collapsed`);
|
||
} else
|
||
preElements.classList.add(`codeblock-customizer-codeblock-collapsed`);
|
||
} else
|
||
preElements.classList.add(`codeblock-customizer-codeblock-collapsed`);
|
||
preElements.classList.add(`codeblock-customizer-codeblock-default-collapse`);
|
||
}
|
||
return container;
|
||
}
|
||
function createLineNumberElement(lineNumber, showNumbers) {
|
||
const lineNumberWrapper = createDiv();
|
||
if (showNumbers === "specific")
|
||
lineNumberWrapper.classList.add(`codeblock-customizer-line-number-specific`);
|
||
else if (showNumbers === "hide")
|
||
lineNumberWrapper.classList.add(`codeblock-customizer-line-number-hide`);
|
||
else
|
||
lineNumberWrapper.classList.add(`codeblock-customizer-line-number`);
|
||
const lineNumberElement = createSpan({ cls: `codeblock-customizer-line-number-element` });
|
||
lineNumberElement.setText(lineNumber.toString());
|
||
lineNumberWrapper.appendChild(lineNumberElement);
|
||
return lineNumberWrapper;
|
||
}
|
||
function createLineTextElement(line) {
|
||
const lineText = line !== "" ? line : "<br>";
|
||
const sanitizedText = (0, import_obsidian2.sanitizeHTMLToDom)(lineText);
|
||
const lineContentWrapper = createDiv({ cls: `codeblock-customizer-line-text`, text: sanitizedText });
|
||
return lineContentWrapper;
|
||
}
|
||
function addIndentLine(inputString, insertCollapse = false) {
|
||
const indentRegex = /^(?:\t+|( {4})*)/;
|
||
const match = inputString.match(indentRegex);
|
||
const indent = match ? match[0] : "";
|
||
const isTabIndentation = /\t/.test(indent);
|
||
const numIndentCharacters = isTabIndentation ? (indent.match(/\t/g) || []).length : (indent.match(/ {4}/g) || []).length;
|
||
const indentSpan = createSpan({ cls: "codeblock-customizer-indentation-guide", text: isTabIndentation ? " " : " " });
|
||
const spans = Array(numIndentCharacters).fill(indentSpan.outerHTML).join("");
|
||
const lastIndentPosition = isTabIndentation ? numIndentCharacters : numIndentCharacters * 4;
|
||
const indicator = createSpan({ cls: "codeblock-customizer-collapse-indicator" });
|
||
const iconSpan = createSpan({ cls: "codeblock-customizer-collapse-icon" });
|
||
indicator.appendChild(iconSpan);
|
||
let modifiedString = "";
|
||
if (insertCollapse) {
|
||
modifiedString = inputString.slice(0, lastIndentPosition) + indicator.outerHTML + inputString.slice(lastIndentPosition);
|
||
}
|
||
const stringWithSpans = inputString.replace(indentRegex, spans);
|
||
return insertCollapse ? modifiedString.replace(indentRegex, spans) : stringWithSpans;
|
||
}
|
||
function extractLinesFromHTML(preCodeElm) {
|
||
const tree = fromHtml(preCodeElm.innerHTML.replace(/\n/g, "<br>"), { fragment: true });
|
||
let htmlContent = preCodeElm.innerHTML;
|
||
visitParents(tree, ["text", "element"], (node, parents) => {
|
||
if (node.type === "element" && node.tagName === "br") {
|
||
htmlContent = replaceNewlineWithBr(htmlContent, parents);
|
||
}
|
||
});
|
||
const splitTree = fromHtml(htmlContent);
|
||
htmlContent = toHtml(splitTree);
|
||
let lines = htmlContent.split("<br>");
|
||
if (lines.length === 1)
|
||
lines = ["", ""];
|
||
preCodeElm.innerHTML = "";
|
||
return lines;
|
||
}
|
||
function replaceNewlineWithBr(htmlContent, parents) {
|
||
const brReplacement = parents.length >= 2 ? replaceWithNestedBr(parents) : "<br>";
|
||
return htmlContent.replace(/\n/, brReplacement);
|
||
}
|
||
function replaceWithNestedBr(parents) {
|
||
const nestedBr = parents.slice(1).reduce((ret, el) => {
|
||
const clonedElement = structuredClone(el);
|
||
clonedElement.children = [];
|
||
const tags = toHtml(clonedElement).split(/(?<=>)(?=<\/)/);
|
||
return tags.splice(-1) + ret + tags.join("");
|
||
}, "<br>");
|
||
return nestedBr;
|
||
}
|
||
function isLineHighlighted(lineNumber, caseInsensitiveLineText, parameters) {
|
||
const result = {
|
||
isHighlighted: false,
|
||
color: ""
|
||
};
|
||
const isHighlightedByLineNumber = parameters.defaultLinesToHighlight.lineNumbers.includes(lineNumber + parameters.lineNumberOffset);
|
||
let isHighlightedByWord = false;
|
||
const words = parameters.defaultLinesToHighlight.words;
|
||
if (words.length > 0 && words.some((word) => caseInsensitiveLineText.includes(word))) {
|
||
isHighlightedByWord = true;
|
||
}
|
||
let isHighlightedByLineSpecificWord = false;
|
||
const lineSpecificWords = parameters.defaultLinesToHighlight.lineSpecificWords;
|
||
if (lineSpecificWords.length > 0) {
|
||
lineSpecificWords.forEach((lsWord) => {
|
||
if (lsWord.lineNumber === lineNumber && lsWord.words.some((word) => caseInsensitiveLineText.includes(word))) {
|
||
isHighlightedByLineSpecificWord = true;
|
||
}
|
||
});
|
||
}
|
||
const altHLMatch = parameters.alternativeLinesToHighlight.lines.filter((hl) => hl.lineNumbers.includes(lineNumber + parameters.lineNumberOffset));
|
||
let isAlternativeHighlightedByWord = false;
|
||
let isAlternativeHighlightedByWordColor = "";
|
||
const altwords = parameters.alternativeLinesToHighlight.words;
|
||
if (altwords.length > 0 && altwords.some((altwordObj) => altwordObj.words.some((word) => caseInsensitiveLineText.includes(word.toLowerCase())))) {
|
||
altwords.forEach((altwordObj) => {
|
||
if (altwordObj.words.some((word) => caseInsensitiveLineText.includes(word.toLowerCase()))) {
|
||
isAlternativeHighlightedByWord = true;
|
||
isAlternativeHighlightedByWordColor = altwordObj.colorName;
|
||
}
|
||
});
|
||
}
|
||
let isAlternativeHighlightedByLineSpecificWord = false;
|
||
let isAlternativeHighlightedByLineSpecificWordColor = "";
|
||
const altLineSpecificWords = parameters.alternativeLinesToHighlight.lineSpecificWords;
|
||
if (altLineSpecificWords.length > 0) {
|
||
altLineSpecificWords.forEach((lsWord) => {
|
||
if (lsWord.lineNumber === lineNumber && lsWord.words.some((word) => caseInsensitiveLineText.includes(word))) {
|
||
isAlternativeHighlightedByLineSpecificWord = true;
|
||
isAlternativeHighlightedByLineSpecificWordColor = lsWord.colorName;
|
||
}
|
||
});
|
||
}
|
||
if (isHighlightedByLineNumber || isHighlightedByWord || isHighlightedByLineSpecificWord) {
|
||
result.isHighlighted = true;
|
||
} else if (altHLMatch.length > 0) {
|
||
result.isHighlighted = true;
|
||
result.color = altHLMatch[0].colorName;
|
||
} else if (isAlternativeHighlightedByWord) {
|
||
result.isHighlighted = true;
|
||
result.color = isAlternativeHighlightedByWordColor;
|
||
} else if (isAlternativeHighlightedByLineSpecificWord) {
|
||
result.isHighlighted = true;
|
||
result.color = isAlternativeHighlightedByLineSpecificWordColor;
|
||
}
|
||
return result;
|
||
}
|
||
async function highlightLines(preCodeElm, parameters, settings, indentationLevels, sourcePath, plugin) {
|
||
if (!preCodeElm)
|
||
return;
|
||
const codeblockLines = extractLinesFromHTML(preCodeElm);
|
||
const codeblockLen = codeblockLines.length - 1;
|
||
let useSemiFold = false;
|
||
if (codeblockLen >= settings.semiFold.visibleLines + fadeOutLineCount) {
|
||
useSemiFold = true;
|
||
}
|
||
let fadeOutLineIndex = 0;
|
||
codeblockLines.forEach((line, index2) => {
|
||
if (index2 === codeblockLines.length - 1)
|
||
return;
|
||
const lineNumber = index2 + 1;
|
||
const caseInsensitiveLineText = line.toLowerCase();
|
||
const lineWrapper = createDiv();
|
||
const result = isLineHighlighted(lineNumber, caseInsensitiveLineText, parameters);
|
||
if (result.isHighlighted) {
|
||
if (result.color) {
|
||
lineWrapper.classList.add(`codeblock-customizer-line-highlighted-${result.color.replace(/\s+/g, "-").toLowerCase()}`);
|
||
} else {
|
||
lineWrapper.classList.add(`codeblock-customizer-line-highlighted`);
|
||
}
|
||
} else {
|
||
lineWrapper.classList.add(`codeblock-customizer-line`);
|
||
}
|
||
if (useSemiFold && lineNumber > settings.semiFold.visibleLines && fadeOutLineIndex < fadeOutLineCount) {
|
||
lineWrapper.classList.add(`codeblock-customizer-fade-out-line${fadeOutLineIndex}`);
|
||
fadeOutLineIndex++;
|
||
if (fadeOutLineIndex === fadeOutLineCount - 1) {
|
||
const uncollapseCodeButton = createUncollapseCodeButton();
|
||
uncollapseCodeButton.addEventListener("click", handleUncollapseClick);
|
||
lineWrapper.appendChild(uncollapseCodeButton);
|
||
}
|
||
}
|
||
if (useSemiFold && lineNumber > settings.semiFold.visibleLines + fadeOutLineCount) {
|
||
lineWrapper.classList.add(`codeblock-customizer-fade-out-line-hide`);
|
||
}
|
||
preCodeElm.appendChild(lineWrapper);
|
||
const lineNumberEl = createLineNumberElement(lineNumber + parameters.lineNumberOffset, parameters.showNumbers);
|
||
lineWrapper.appendChild(lineNumberEl);
|
||
const indentedLine = addIndentLine(line, indentationLevels && indentationLevels[lineNumber - 1] ? indentationLevels[lineNumber - 1].insertCollapse : false);
|
||
const lineTextEl = createLineTextElement(settings.codeblock.enableLinks ? parseInput(indentedLine, sourcePath, plugin) : indentedLine);
|
||
textHighlight(parameters, lineNumber, lineTextEl);
|
||
if (indentationLevels && indentationLevels[lineNumber - 1]) {
|
||
const collapseIcon = lineTextEl.querySelector(".codeblock-customizer-collapse-icon");
|
||
if (collapseIcon) {
|
||
(0, import_obsidian2.setIcon)(collapseIcon, "chevron-down");
|
||
collapseIcon.addEventListener("click", handleClick);
|
||
}
|
||
}
|
||
lineWrapper.appendChild(lineTextEl);
|
||
lineWrapper.setAttribute("indentLevel", indentationLevels && indentationLevels[lineNumber - 1] ? indentationLevels[lineNumber - 1].indentationLevels.toString() : "-1");
|
||
});
|
||
}
|
||
function textHighlight(parameters, lineNumber, lineTextEl) {
|
||
var _a2;
|
||
const caseInsensitiveLineText = ((_a2 = lineTextEl.textContent) != null ? _a2 : "").toLowerCase();
|
||
const wordHighlight = (words2, name = "") => {
|
||
const caseInsensitiveWords = words2.map((word) => word.toLowerCase());
|
||
for (const word of caseInsensitiveWords) {
|
||
highlightWords(lineTextEl, word, name);
|
||
}
|
||
};
|
||
const highlightBetween = (from, to, name = "") => {
|
||
const caseInsensitiveFrom = from.toLowerCase();
|
||
const caseInsensitiveTo = to.toLowerCase();
|
||
const walkAndHighlight = (node, searchTextFrom, searchTextTo) => {
|
||
var _a3, _b;
|
||
const walker = document.createTreeWalker(node, NodeFilter.SHOW_TEXT, null);
|
||
let firstNonWhitespaceNode = null;
|
||
let firstNonWhitespaceOffset = 0;
|
||
let lastNode = null;
|
||
let lastNodeOffset = 0;
|
||
const nodesToHighlight = [];
|
||
let searchTextToFound = false;
|
||
while (walker.nextNode()) {
|
||
const currentNode = walker.currentNode;
|
||
const textContent = ((_a3 = currentNode.textContent) == null ? void 0 : _a3.toLowerCase()) || "";
|
||
if (!firstNonWhitespaceNode && textContent.trim().length > 0) {
|
||
if (searchTextFrom) {
|
||
if (textContent.includes(searchTextFrom)) {
|
||
firstNonWhitespaceNode = currentNode;
|
||
firstNonWhitespaceOffset = textContent.indexOf(searchTextFrom);
|
||
}
|
||
} else {
|
||
firstNonWhitespaceNode = currentNode;
|
||
firstNonWhitespaceOffset = textContent.search(/\S/);
|
||
}
|
||
}
|
||
if (firstNonWhitespaceNode) {
|
||
nodesToHighlight.push(currentNode);
|
||
if (searchTextTo && textContent.includes(searchTextTo)) {
|
||
const tempOffset = textContent.indexOf(searchTextTo) + searchTextTo.length;
|
||
if (tempOffset > firstNonWhitespaceOffset) {
|
||
lastNode = currentNode;
|
||
lastNodeOffset = tempOffset;
|
||
searchTextToFound = true;
|
||
break;
|
||
} else {
|
||
let position3 = tempOffset;
|
||
while ((position3 = textContent.indexOf(searchTextTo, position3 + 1)) !== -1) {
|
||
if (position3 > firstNonWhitespaceOffset) {
|
||
lastNode = currentNode;
|
||
lastNodeOffset = position3 + searchTextTo.length;
|
||
searchTextToFound = true;
|
||
break;
|
||
}
|
||
}
|
||
if (searchTextToFound)
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (nodesToHighlight.length > 0 && firstNonWhitespaceNode && (searchTextFrom || searchTextToFound || !searchTextFrom && !searchTextTo)) {
|
||
const startNode = firstNonWhitespaceNode;
|
||
const endNode = lastNode || nodesToHighlight[nodesToHighlight.length - 1];
|
||
const startOffset = firstNonWhitespaceOffset;
|
||
const endOffset = lastNodeOffset || ((_b = endNode.textContent) == null ? void 0 : _b.length) || 0;
|
||
const rangeToHighlight = {
|
||
nodesToHighlight,
|
||
startNode,
|
||
startOffset,
|
||
endNode,
|
||
endOffset
|
||
};
|
||
highlightNodesRange(rangeToHighlight, name);
|
||
}
|
||
};
|
||
const highlightEntireText = (node) => {
|
||
walkAndHighlight(node, null, null);
|
||
};
|
||
const highlightFromStart = (node, searchTextFrom) => {
|
||
walkAndHighlight(node, searchTextFrom, null);
|
||
};
|
||
const highlightUntilEnd = (node, searchTextTo) => {
|
||
walkAndHighlight(node, null, searchTextTo);
|
||
};
|
||
if (!caseInsensitiveFrom && !caseInsensitiveTo) {
|
||
highlightEntireText(lineTextEl);
|
||
} else if (caseInsensitiveFrom && !caseInsensitiveTo) {
|
||
highlightFromStart(lineTextEl, caseInsensitiveFrom.toLowerCase());
|
||
} else if (!caseInsensitiveFrom && caseInsensitiveTo) {
|
||
highlightUntilEnd(lineTextEl, caseInsensitiveTo.toLowerCase());
|
||
} else if (caseInsensitiveFrom && caseInsensitiveTo) {
|
||
highlightFromTo(lineTextEl, from, to, name);
|
||
}
|
||
};
|
||
const highlightNodesRange = (range, name) => {
|
||
var _a3, _b, _c, _d, _e;
|
||
const { nodesToHighlight, startNode, startOffset, endNode, endOffset } = range;
|
||
let currentStartOffset = startOffset;
|
||
for (const currentNode of nodesToHighlight) {
|
||
if (currentNode.nodeType === Node.TEXT_NODE) {
|
||
const span = createSpan();
|
||
span.className = name ? `codeblock-customizer-highlighted-text-${name}` : "codeblock-customizer-highlighted-text";
|
||
let textToHighlight = "";
|
||
if (currentNode === startNode && currentNode === endNode) {
|
||
textToHighlight = ((_a3 = currentNode.textContent) == null ? void 0 : _a3.substring(currentStartOffset, endOffset)) || "";
|
||
} else if (currentNode === startNode) {
|
||
textToHighlight = ((_b = currentNode.textContent) == null ? void 0 : _b.substring(currentStartOffset)) || "";
|
||
} else if (currentNode === endNode) {
|
||
textToHighlight = ((_c = currentNode.textContent) == null ? void 0 : _c.substring(0, endOffset)) || "";
|
||
} else {
|
||
textToHighlight = currentNode.textContent || "";
|
||
}
|
||
span.appendChild(document.createTextNode(textToHighlight));
|
||
const beforeText = document.createTextNode(((_d = currentNode.textContent) == null ? void 0 : _d.substring(0, currentStartOffset)) || "");
|
||
const afterText = currentNode === endNode ? document.createTextNode(((_e = currentNode.textContent) == null ? void 0 : _e.substring(endOffset)) || "") : document.createTextNode("");
|
||
const parentNode = currentNode.parentNode;
|
||
if (parentNode) {
|
||
parentNode.replaceChild(afterText, currentNode);
|
||
parentNode.insertBefore(span, afterText);
|
||
parentNode.insertBefore(beforeText, span);
|
||
}
|
||
currentStartOffset = 0;
|
||
}
|
||
}
|
||
};
|
||
const words = parameters.defaultTextToHighlight.words;
|
||
if (words.length > 0) {
|
||
wordHighlight(words);
|
||
}
|
||
const lineSpecificWords = parameters.defaultTextToHighlight.lineSpecificWords;
|
||
const lineSpecificWord = lineSpecificWords.find((item) => item.lineNumber === lineNumber);
|
||
if (lineSpecificWord) {
|
||
wordHighlight(lineSpecificWord.words);
|
||
}
|
||
const textBetween = parameters.defaultTextToHighlight.textBetween;
|
||
for (const { from, to } of textBetween) {
|
||
if (caseInsensitiveLineText.includes(from.toLowerCase()) && caseInsensitiveLineText.includes(to.toLowerCase())) {
|
||
highlightBetween(from, to);
|
||
}
|
||
}
|
||
const lineSpecificTextBetween = parameters.defaultTextToHighlight.lineSpecificTextBetween;
|
||
const specificTextBetween = lineSpecificTextBetween.find((item) => item.lineNumber === lineNumber);
|
||
if (specificTextBetween) {
|
||
if (caseInsensitiveLineText.includes(specificTextBetween.from.toLowerCase()) && caseInsensitiveLineText.includes(specificTextBetween.to.toLowerCase())) {
|
||
highlightBetween(specificTextBetween.from, specificTextBetween.to);
|
||
}
|
||
}
|
||
if (parameters.defaultTextToHighlight.allWordsInLine.includes(lineNumber)) {
|
||
highlightBetween("", "");
|
||
}
|
||
const altWords = parameters.alternativeTextToHighlight.words;
|
||
for (const entry of altWords) {
|
||
const { colorName, words: words2 } = entry;
|
||
if (words2.length > 0) {
|
||
wordHighlight(words2, colorName);
|
||
}
|
||
}
|
||
const altLineSpecificWords = parameters.alternativeTextToHighlight.lineSpecificWords;
|
||
const altLineSpecificWord = altLineSpecificWords.find((item) => item.lineNumber === lineNumber);
|
||
if (altLineSpecificWord) {
|
||
const { colorName, words: words2 } = altLineSpecificWord;
|
||
wordHighlight(words2, colorName);
|
||
}
|
||
const altTextBetween = parameters.alternativeTextToHighlight.textBetween;
|
||
altTextBetween.forEach(({ from, to, colorName }) => {
|
||
highlightBetween(from, to, colorName);
|
||
});
|
||
const altLineSpecificTextBetween = parameters.alternativeTextToHighlight.lineSpecificTextBetween;
|
||
const altSpecificTextBetween = altLineSpecificTextBetween.find((item) => item.lineNumber === lineNumber);
|
||
if (altSpecificTextBetween) {
|
||
altLineSpecificTextBetween.forEach(({ lineNumber: altLineNumber, from, to, colorName }) => {
|
||
if (lineNumber === altLineNumber) {
|
||
highlightBetween(from, to, colorName);
|
||
}
|
||
});
|
||
}
|
||
const altAllWordsInLine = parameters.alternativeTextToHighlight.allWordsInLine;
|
||
const altAllWordsInLineMatch = altAllWordsInLine.find((item) => item.allWordsInLine.includes(lineNumber));
|
||
if (altAllWordsInLineMatch) {
|
||
highlightBetween("", "", altAllWordsInLineMatch.colorName);
|
||
}
|
||
}
|
||
function highlightFromTo(node, from, to, alternativeName) {
|
||
const className = alternativeName ? `codeblock-customizer-highlighted-text-${alternativeName}` : `codeblock-customizer-highlighted-text`;
|
||
const createSpan2 = (text2) => {
|
||
const span = document.createElement("span");
|
||
span.className = className;
|
||
span.appendChild(document.createTextNode(text2));
|
||
return span;
|
||
};
|
||
const collectTextNodes = (node2, textNodes2) => {
|
||
if (node2.nodeType === Node.TEXT_NODE) {
|
||
textNodes2.push(node2);
|
||
} else {
|
||
node2.childNodes.forEach((child) => collectTextNodes(child, textNodes2));
|
||
}
|
||
};
|
||
const highlightRanges = (textNodes2, ranges2) => {
|
||
let currentIndex = 0;
|
||
let currentRangeIndex = 0;
|
||
let currentRange = ranges2[currentRangeIndex];
|
||
textNodes2.forEach((textNode) => {
|
||
if (!currentRange)
|
||
return;
|
||
const textContent = textNode.textContent || "";
|
||
const fragment = document.createDocumentFragment();
|
||
let lastIndex = 0;
|
||
while (currentRange && lastIndex < textContent.length) {
|
||
const rangeStart = currentRange.start - currentIndex;
|
||
const rangeEnd = currentRange.end - currentIndex;
|
||
if (rangeStart >= 0 && rangeStart < textContent.length) {
|
||
if (rangeStart > lastIndex) {
|
||
fragment.appendChild(document.createTextNode(textContent.substring(lastIndex, rangeStart)));
|
||
}
|
||
if (rangeEnd <= textContent.length) {
|
||
fragment.appendChild(createSpan2(textContent.substring(rangeStart, rangeEnd)));
|
||
lastIndex = rangeEnd;
|
||
currentRangeIndex++;
|
||
currentRange = ranges2[currentRangeIndex];
|
||
} else {
|
||
fragment.appendChild(createSpan2(textContent.substring(rangeStart)));
|
||
lastIndex = textContent.length;
|
||
currentRange.start += textContent.length - rangeStart;
|
||
}
|
||
} else {
|
||
break;
|
||
}
|
||
}
|
||
if (lastIndex < textContent.length) {
|
||
fragment.appendChild(document.createTextNode(textContent.substring(lastIndex)));
|
||
}
|
||
const parentNode = textNode.parentNode;
|
||
if (parentNode) {
|
||
parentNode.replaceChild(fragment, textNode);
|
||
}
|
||
currentIndex += textContent.length;
|
||
});
|
||
};
|
||
const findRanges = (text2, from2, to2) => {
|
||
const ranges2 = [];
|
||
let startIndex = text2.toLowerCase().indexOf(from2.toLowerCase());
|
||
while (startIndex !== -1) {
|
||
const endIndex = text2.toLowerCase().indexOf(to2.toLowerCase(), startIndex + from2.length);
|
||
if (endIndex === -1)
|
||
break;
|
||
ranges2.push({ start: startIndex, end: endIndex + to2.length });
|
||
startIndex = text2.toLowerCase().indexOf(from2.toLowerCase(), endIndex + to2.length);
|
||
}
|
||
return ranges2;
|
||
};
|
||
const textNodes = [];
|
||
collectTextNodes(node, textNodes);
|
||
const concatenatedText = textNodes.map((node2) => node2.textContent).join("");
|
||
const ranges = findRanges(concatenatedText, from, to);
|
||
highlightRanges(textNodes, ranges);
|
||
}
|
||
function highlightWords(node, word, alternativeName) {
|
||
if (!word)
|
||
return;
|
||
const lowerCaseWord = word.toLowerCase();
|
||
const className = alternativeName ? `codeblock-customizer-highlighted-text-${alternativeName}` : `codeblock-customizer-highlighted-text`;
|
||
const createSpan2 = (text2) => {
|
||
const span = document.createElement("span");
|
||
span.className = className;
|
||
span.appendChild(document.createTextNode(text2));
|
||
return span;
|
||
};
|
||
const processTextNode = (textNode) => {
|
||
const textContent = textNode.textContent || "";
|
||
const occurrences = findAllOccurrences(textContent.toLowerCase(), lowerCaseWord);
|
||
if (occurrences.length === 0)
|
||
return;
|
||
const parentNode = textNode.parentNode;
|
||
if (!parentNode)
|
||
return;
|
||
const fragment = document.createDocumentFragment();
|
||
let lastIndex = 0;
|
||
occurrences.forEach((index2) => {
|
||
const beforeText = textContent.substring(lastIndex, index2);
|
||
const matchText = textContent.substring(index2, index2 + word.length);
|
||
if (beforeText) {
|
||
fragment.appendChild(document.createTextNode(beforeText));
|
||
}
|
||
fragment.appendChild(createSpan2(matchText));
|
||
lastIndex = index2 + word.length;
|
||
});
|
||
const remainingText = textContent.substring(lastIndex);
|
||
if (remainingText) {
|
||
fragment.appendChild(document.createTextNode(remainingText));
|
||
}
|
||
parentNode.replaceChild(fragment, textNode);
|
||
};
|
||
const walkTree = (node2) => {
|
||
const textNodes = [];
|
||
const collectTextNodes = (node3) => {
|
||
if (node3.nodeType === Node.TEXT_NODE) {
|
||
textNodes.push(node3);
|
||
} else if (node3.nodeType === Node.ELEMENT_NODE) {
|
||
Array.from(node3.childNodes).forEach(collectTextNodes);
|
||
}
|
||
};
|
||
collectTextNodes(node2);
|
||
textNodes.forEach(processTextNode);
|
||
};
|
||
walkTree(node);
|
||
}
|
||
function parseInput(input, sourcePath, plugin) {
|
||
if (input === "")
|
||
return input;
|
||
const placeholder = "\u200B";
|
||
const inputWithPlaceholders = input.replace(/(^\s{1,3})/gm, (match) => placeholder.repeat(match.length));
|
||
const parser = new DOMParser();
|
||
const doc = parser.parseFromString(inputWithPlaceholders, "text/html");
|
||
const elementsWithClass = Array.from(doc.getElementsByClassName("comment"));
|
||
const regex = /(?:\[\[([^[\]]+?)(?:\|([^\]]+?))?]]|\[([^\]]+)\]\(([^)]+)\)|(https?:\/\/[^\s]+))/g;
|
||
elementsWithClass.forEach((element3) => {
|
||
const textContent = element3.textContent || "";
|
||
let lastIndex = 0;
|
||
let match;
|
||
const fragment = document.createDocumentFragment();
|
||
while ((match = regex.exec(textContent)) !== null) {
|
||
const textBeforeMatch = textContent.slice(lastIndex, match.index);
|
||
fragment.appendChild(document.createTextNode(textBeforeMatch));
|
||
const span = createSpan({ cls: "codeblock-customizer-link" });
|
||
import_obsidian2.MarkdownRenderer.render(plugin.app, match[0], span, sourcePath, plugin);
|
||
fragment.appendChild(span);
|
||
lastIndex = match.index + match[0].length;
|
||
}
|
||
const textAfterLastMatch = textContent.slice(lastIndex);
|
||
fragment.appendChild(document.createTextNode(textAfterLastMatch));
|
||
element3.textContent = "";
|
||
element3.appendChild(fragment);
|
||
});
|
||
const output = new XMLSerializer().serializeToString(doc);
|
||
return output.replace(new RegExp(placeholder, "g"), " ");
|
||
}
|
||
function handleClick(event) {
|
||
const collapseIcon = event.currentTarget;
|
||
if (!collapseIcon)
|
||
return;
|
||
const codeElement = getCodeElementFromCollapseIcon(collapseIcon);
|
||
if (!codeElement)
|
||
return;
|
||
const collapseIconParent = getParentWithClassStartingWith(collapseIcon, "codeblock-customizer-line");
|
||
if (!collapseIconParent)
|
||
return;
|
||
collapseIconParent.classList.toggle("codeblock-customizer-lines-below-collapsed");
|
||
const clickedIndentLevel = parseInt(collapseIconParent.getAttribute("indentlevel") || "");
|
||
const codeLines = Array.from(codeElement.querySelectorAll('[class^="codeblock-customizer-line"]'));
|
||
let lessEqualIndent = false;
|
||
let startPosReached = false;
|
||
let startPosLineId = -1;
|
||
const lines = [];
|
||
let lineCount = 0;
|
||
for (const line of codeLines) {
|
||
if (line.getAttribute("indentlevel") === null)
|
||
continue;
|
||
if (collapseIconParent === line) {
|
||
startPosReached = true;
|
||
startPosLineId = lineCount;
|
||
}
|
||
const lineIndentLevel = parseInt(line.getAttribute("indentlevel") || "");
|
||
if (lineIndentLevel > clickedIndentLevel && startPosReached) {
|
||
lines.push({ element: line, lineCount });
|
||
lessEqualIndent = true;
|
||
} else if (lessEqualIndent && lineIndentLevel <= clickedIndentLevel) {
|
||
break;
|
||
}
|
||
lineCount++;
|
||
}
|
||
if (collapseIconParent.classList.contains("codeblock-customizer-lines-below-collapsed")) {
|
||
(0, import_obsidian2.setIcon)(collapseIcon, "chevron-right");
|
||
for (const line of lines) {
|
||
const lineTextEl = collapseIconParent.querySelector(".codeblock-customizer-line-text");
|
||
if (lineTextEl) {
|
||
const foldPlaceholder = createSpan({ text: "\u2026", cls: "codeblock-customizer-foldPlaceholder" });
|
||
const existingFoldPlaceholder = lineTextEl.querySelector(".codeblock-customizer-foldPlaceholder");
|
||
if (!existingFoldPlaceholder) {
|
||
lineTextEl.appendChild(foldPlaceholder);
|
||
}
|
||
}
|
||
line.element.classList.add("codeblock-customizer-line-hidden");
|
||
if (line.element.getAttribute("collapsedBy") === null)
|
||
line.element.setAttribute("collapsedBy", startPosLineId.toString());
|
||
}
|
||
} else {
|
||
(0, import_obsidian2.setIcon)(collapseIcon, "chevron-down");
|
||
for (const line of lines) {
|
||
if (parseInt(line.element.getAttribute("collapsedBy") || "") === startPosLineId) {
|
||
line.element.classList.remove("codeblock-customizer-line-hidden");
|
||
line.element.removeAttribute("collapsedBy");
|
||
const lineTextEl = collapseIconParent.querySelector(".codeblock-customizer-line-text");
|
||
if (lineTextEl) {
|
||
const existingFoldPlaceholder = lineTextEl.querySelector(".codeblock-customizer-foldPlaceholder");
|
||
if (existingFoldPlaceholder) {
|
||
existingFoldPlaceholder.remove();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function getCodeElementFromCollapseIcon(collapseIcon) {
|
||
let parentElement = collapseIcon.parentElement;
|
||
while (parentElement) {
|
||
if (parentElement.classList.contains("codeblock-customizer-pre")) {
|
||
const codeElements = parentElement.querySelector("code");
|
||
if (codeElements)
|
||
return codeElements;
|
||
}
|
||
parentElement = parentElement.parentElement;
|
||
}
|
||
return null;
|
||
}
|
||
function getParentWithClassStartingWith(element3, classNamePrefix) {
|
||
let parent = element3.parentElement;
|
||
while (parent) {
|
||
const classList = parent.classList;
|
||
if (classList && Array.from(classList).some((className) => className.startsWith(classNamePrefix))) {
|
||
const indentLevel = parent.getAttribute("indentlevel");
|
||
if (indentLevel !== null) {
|
||
return parent;
|
||
}
|
||
}
|
||
parent = parent.parentElement;
|
||
}
|
||
return null;
|
||
}
|
||
function handleUncollapseClick(event) {
|
||
var _a2, _b, _c, _d, _e, _f;
|
||
const button = event.target;
|
||
const codeElement = (_a2 = button.parentElement) == null ? void 0 : _a2.parentElement;
|
||
const header = (_c = (_b = button.parentElement) == null ? void 0 : _b.parentElement) == null ? void 0 : _c.previousSibling;
|
||
const pre = (_f = (_e = (_d = button.parentElement) == null ? void 0 : _d.parentElement) == null ? void 0 : _e.previousSibling) == null ? void 0 : _f.parentElement;
|
||
if (!codeElement)
|
||
return;
|
||
if (header) {
|
||
const collapseIcon = header.querySelector(".codeblock-customizer-header-collapse");
|
||
if (collapseIcon && pre) {
|
||
toggleFold(pre, collapseIcon, `codeblock-customizer-codeblock-semi-collapsed`);
|
||
}
|
||
}
|
||
}
|
||
function toggleFold(pre, collapseIcon, toggleClass) {
|
||
if (pre == null ? void 0 : pre.classList.contains(toggleClass)) {
|
||
(0, import_obsidian2.setIcon)(collapseIcon, "chevrons-up-down");
|
||
} else {
|
||
(0, import_obsidian2.setIcon)(collapseIcon, "chevrons-down-up");
|
||
}
|
||
pre == null ? void 0 : pre.classList.toggle(toggleClass);
|
||
}
|
||
function convertHTMLCollectionToArray(elements) {
|
||
const result = [];
|
||
for (let i = 0; i < elements.length; i++) {
|
||
result.push(...Array.from(elements[i].children));
|
||
}
|
||
return result;
|
||
}
|
||
async function PDFExport(codeBlockElement, plugin, codeBlockFirstLines, sourcePath) {
|
||
for (const [key2, codeblockPreElement] of Array.from(codeBlockElement).entries()) {
|
||
const codeblockParameters = codeBlockFirstLines[key2];
|
||
const parameters = getAllParameters(codeblockParameters, plugin.settings);
|
||
const codeblockCodeElement = codeblockPreElement.querySelector("pre > code");
|
||
if (!codeblockCodeElement)
|
||
return;
|
||
if (Array.from(codeblockCodeElement.classList).some((className) => /^language-\S+/.test(className)))
|
||
while (!codeblockCodeElement.classList.contains("is-loaded"))
|
||
await sleep(2);
|
||
if (codeblockCodeElement.querySelector("code [class*='codeblock-customizer-line']"))
|
||
continue;
|
||
if (parameters.exclude)
|
||
continue;
|
||
if (plugin.settings.SelectedTheme.settings.printing.uncollapseDuringPrint)
|
||
parameters.fold = false;
|
||
const codeblockLanguageSpecificClass = getLanguageSpecificColorClass(parameters.language, plugin.settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors);
|
||
await addClasses(codeblockPreElement, parameters, plugin, codeblockCodeElement, null, codeblockLanguageSpecificClass, sourcePath);
|
||
}
|
||
}
|
||
function foldAllReadingView(fold, settings) {
|
||
const preParents = document.querySelectorAll(".codeblock-customizer-pre-parent");
|
||
preParents.forEach((preParent) => {
|
||
const preElement = preParent.querySelector(".codeblock-customizer-pre");
|
||
let lines = [];
|
||
if (preElement) {
|
||
const codeElements = preElement == null ? void 0 : preElement.getElementsByTagName("CODE");
|
||
lines = convertHTMLCollectionToArray(codeElements);
|
||
}
|
||
toggleFoldClasses(preElement, lines.length, fold, settings.SelectedTheme.settings.semiFold.enableSemiFold, settings.SelectedTheme.settings.semiFold.visibleLines);
|
||
});
|
||
}
|
||
function toggleFoldClasses(preElement, linesLength, fold, enableSemiFold, visibleLines) {
|
||
if (fold) {
|
||
if (enableSemiFold) {
|
||
if (linesLength >= visibleLines + fadeOutLineCount) {
|
||
preElement == null ? void 0 : preElement.classList.add("codeblock-customizer-codeblock-semi-collapsed");
|
||
} else
|
||
preElement == null ? void 0 : preElement.classList.add("codeblock-customizer-codeblock-collapsed");
|
||
} else
|
||
preElement == null ? void 0 : preElement.classList.add("codeblock-customizer-codeblock-collapsed");
|
||
} else {
|
||
if (enableSemiFold) {
|
||
if (linesLength >= visibleLines + fadeOutLineCount) {
|
||
preElement == null ? void 0 : preElement.classList.remove("codeblock-customizer-codeblock-semi-collapsed");
|
||
} else
|
||
preElement == null ? void 0 : preElement.classList.remove("codeblock-customizer-codeblock-collapsed");
|
||
} else
|
||
preElement == null ? void 0 : preElement.classList.remove("codeblock-customizer-codeblock-collapsed");
|
||
}
|
||
}
|
||
function getCodeBlocksFirstLines(array) {
|
||
const codeBlocks = [];
|
||
let inCodeBlock = false;
|
||
let openingBackticks = 0;
|
||
for (let i = 0; i < array.length; i++) {
|
||
let line = array[i].trim();
|
||
line = removeCharFromStart(line.trim(), ">");
|
||
const backtickMatch = line.match(/^`+(?!.*`)/);
|
||
if (backtickMatch) {
|
||
if (!inCodeBlock) {
|
||
inCodeBlock = true;
|
||
openingBackticks = backtickMatch[0].length;
|
||
codeBlocks.push(line);
|
||
} else {
|
||
if (backtickMatch[0].length === openingBackticks) {
|
||
inCodeBlock = false;
|
||
openingBackticks = 0;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (codeBlocks.length > 0) {
|
||
return codeBlocks;
|
||
}
|
||
return [];
|
||
}
|
||
function getCallouts(array) {
|
||
if (!array)
|
||
return [];
|
||
const arrowBlocks = [];
|
||
for (let i = 0; i < array.length; i++) {
|
||
const line = array[i].trim();
|
||
if (line.startsWith(">")) {
|
||
arrowBlocks.push(line);
|
||
}
|
||
}
|
||
const arrowBlocksResult = getCodeBlocksFirstLines(arrowBlocks);
|
||
if (arrowBlocksResult.length > 0)
|
||
return arrowBlocksResult;
|
||
else
|
||
return [];
|
||
}
|
||
|
||
// src/SettingsTab.ts
|
||
var import_obsidian3 = require("obsidian");
|
||
var import_pickr = __toESM(require_pickr_min());
|
||
var _SettingsTab = class extends import_obsidian3.PluginSettingTab {
|
||
constructor(app, plugin) {
|
||
super(app, plugin);
|
||
// createDropdown
|
||
this.createDonateButton = (link) => {
|
||
const a = createEl("a");
|
||
a.setAttribute("href", link);
|
||
a.addClass("buymeacoffee-ThePirateKing-img");
|
||
a.innerHTML = `<img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=ThePirateKing&button_colour=e3e7ef&font_colour=262626&font_family=Inter&outline_colour=262626&coffee_colour=ff0000" height="42px">`;
|
||
return a;
|
||
};
|
||
// createDonateButton
|
||
this.createReadMeLink = (container) => {
|
||
const divElement = container.createEl("div", { cls: "codeblock-customizer-readMe" });
|
||
const spanElement = createSpan();
|
||
spanElement.style.whiteSpace = "pre";
|
||
const textNode = document.createTextNode("For more information, please read the ");
|
||
spanElement.appendChild(textNode);
|
||
divElement.appendChild(spanElement);
|
||
const linkElement = container.createEl("a");
|
||
linkElement.href = "https://github.com/mugiwara85/CodeblockCustomizer";
|
||
const linkTextNode = document.createTextNode("README");
|
||
linkElement.appendChild(linkTextNode);
|
||
divElement.appendChild(linkElement);
|
||
container.appendChild(divElement);
|
||
};
|
||
this.plugin = plugin;
|
||
this.pickerInstances = [];
|
||
this.headerLangToggles = [];
|
||
this.headerLangIconToggles = [];
|
||
this.linkUpdateToggle = [];
|
||
}
|
||
display() {
|
||
const { containerEl } = this;
|
||
containerEl.empty();
|
||
containerEl.createEl("h3", { text: "Codeblock Customizer Settings" });
|
||
let dropdown;
|
||
let restoreButton;
|
||
new import_obsidian3.Setting(containerEl).setName("Theme").setDesc("Select which theme to use").addDropdown((dropdownObj) => {
|
||
this.refreshDropdown(dropdownObj, this.plugin.settings);
|
||
dropdownObj.onChange((value) => {
|
||
this.plugin.settings.ThemeName = value;
|
||
this.plugin.settings.SelectedTheme = structuredClone(this.plugin.settings.Themes[this.plugin.settings.ThemeName]);
|
||
this.display();
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
});
|
||
dropdown = dropdownObj;
|
||
}).addExtraButton((button) => {
|
||
button.setTooltip("Update theme");
|
||
button.setIcon("save");
|
||
button.onClick(() => {
|
||
this.plugin.settings.Themes[this.plugin.settings.ThemeName] = structuredClone(this.plugin.settings.SelectedTheme);
|
||
new import_obsidian3.Notice(`Theme "${this.plugin.settings.ThemeName}" updated successfully!`);
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
});
|
||
}).addExtraButton((button) => {
|
||
button.setTooltip("Restore default theme to its original state");
|
||
button.setIcon("reset");
|
||
button.onClick(() => {
|
||
this.restoreThemes(this.plugin.settings.ThemeName, false);
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
new import_obsidian3.Notice(`Theme "${this.plugin.settings.ThemeName}" restored to its original state!`);
|
||
});
|
||
button.setDisabled(!(this.plugin.settings.ThemeName in DEFAULT_THEMES));
|
||
restoreButton = button;
|
||
}).addExtraButton((button) => {
|
||
button.setTooltip("Delete theme");
|
||
button.setIcon("trash");
|
||
button.onClick(() => {
|
||
if (this.plugin.settings.ThemeName.trim().length === 0) {
|
||
new import_obsidian3.Notice("Select a theme first to delete");
|
||
} else if (this.plugin.settings.ThemeName in DEFAULT_SETTINGS.Themes) {
|
||
new import_obsidian3.Notice("You cannot delete the default themes");
|
||
} else {
|
||
delete this.plugin.settings.Themes[this.plugin.settings.ThemeName];
|
||
new import_obsidian3.Notice(`Theme "${this.plugin.settings.ThemeName}" deleted successfully!`);
|
||
this.plugin.settings.ThemeName = "Obsidian";
|
||
this.plugin.settings.SelectedTheme = structuredClone(this.plugin.settings.Themes[this.plugin.settings.ThemeName]);
|
||
this.refreshDropdown(dropdown, this.plugin.settings);
|
||
this.display();
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
}
|
||
});
|
||
});
|
||
let text2;
|
||
this.plugin.settings.newThemeName = "";
|
||
new import_obsidian3.Setting(containerEl).setName("Create your theme").setDesc("Create your theme with the current colors and settings").addText((input) => {
|
||
text2 = input;
|
||
text2.setPlaceholder("Name for your theme").setValue(this.plugin.settings.newThemeName).onChange(async (value) => {
|
||
this.plugin.settings.newThemeName = value;
|
||
});
|
||
}).addExtraButton((button) => {
|
||
button.setTooltip("Save theme");
|
||
button.setIcon("plus");
|
||
button.onClick(() => {
|
||
if (this.plugin.settings.newThemeName.trim().length === 0)
|
||
new import_obsidian3.Notice("Set a name for your theme!");
|
||
else if (this.plugin.settings.newThemeName in DEFAULT_SETTINGS.Themes) {
|
||
new import_obsidian3.Notice("You can't overwrite default themes");
|
||
} else {
|
||
if (this.plugin.settings.newThemeName in this.plugin.settings.Themes) {
|
||
this.plugin.settings.Themes[this.plugin.settings.newThemeName] = structuredClone(this.plugin.settings.SelectedTheme);
|
||
new import_obsidian3.Notice(`Theme "${this.plugin.settings.newThemeName}" updated successfully!`);
|
||
} else {
|
||
this.plugin.settings.Themes[this.plugin.settings.newThemeName] = structuredClone(this.plugin.settings.SelectedTheme);
|
||
new import_obsidian3.Notice(`Theme "${this.plugin.settings.newThemeName}" saved successfully!`);
|
||
}
|
||
this.plugin.settings.ThemeName = this.plugin.settings.newThemeName;
|
||
this.refreshDropdown(dropdown, this.plugin.settings);
|
||
restoreButton.setDisabled(true);
|
||
this.plugin.settings.newThemeName = "";
|
||
text2.setValue("");
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
}
|
||
});
|
||
});
|
||
new import_obsidian3.Setting(containerEl).setName("Select settings page").setDesc("Select which settings group you want to modify.").addDropdown(
|
||
(dropdown2) => dropdown2.addOptions({ "basic": "Basic", "codeblock": "Codeblock", "languageSpecific": "Language specific colors", "alternateHighlight": "Alternative highlight colors", "header": "Header", "headerLanguage": "Header language", "gutter": "Gutter", "inlineCode": "Inline code", "printToPDF": "Print to PDF" }).setValue(this.plugin.settings.settingsType).onChange((value) => {
|
||
this.plugin.settings.settingsType = value;
|
||
basicDiv.toggleClass("codeblock-customizer-basic-settingsDiv-hide", this.plugin.settings.settingsType !== "basic");
|
||
codeblockDiv.toggleClass("codeblock-customizer-codeblock-settingsDiv-hide", this.plugin.settings.settingsType !== "codeblock");
|
||
languageSpecificDiv.toggleClass("codeblock-customizer-languageSpecific-settingsDiv-hide", this.plugin.settings.settingsType !== "languageSpecific");
|
||
alternateHighlightDiv.toggleClass("codeblock-customizer-alternative-highlight-settingsDiv-hide", this.plugin.settings.settingsType !== "alternateHighlight");
|
||
headerDiv.toggleClass("codeblock-customizer-header-settingsDiv-hide", this.plugin.settings.settingsType !== "header");
|
||
headerLanguageDiv.toggleClass("codeblock-customizer-header-language-settingsDiv-hide", this.plugin.settings.settingsType !== "headerLanguage");
|
||
gutterDiv.toggleClass("codeblock-customizer-gutter-settingsDiv-hide", this.plugin.settings.settingsType !== "gutter");
|
||
inlineDiv.toggleClass("codeblock-customizer-inlineCode-settingsDiv-hide", this.plugin.settings.settingsType !== "inlineCode");
|
||
printToPDFDiv.toggleClass("codeblock-customizer-printToPDF-settingsDiv-hide", this.plugin.settings.settingsType !== "printToPDF");
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
})
|
||
);
|
||
this.createReadMeLink(containerEl);
|
||
containerEl.createEl("hr");
|
||
const basicDiv = containerEl.createEl("div", { cls: "codeblock-customizer-basic-settingsDiv-hide" });
|
||
basicDiv.toggleClass("codeblock-customizer-basic-settingsDiv-hide", this.plugin.settings.settingsType !== "basic");
|
||
basicDiv.createEl("h3", { text: "Basic settings" });
|
||
new import_obsidian3.Setting(basicDiv).setName("Enable plugin in source mode").setDesc("By default the plugin is disabled in source mode. You can enable it in source mode as well using this toggle.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.common.enableInSourceMode).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.common.enableInSourceMode = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(basicDiv).setName("Enable editor active line highlight").setDesc("If enabled, you can set the color for the active line (including codeblocks).").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.enableEditorActiveLineHighlight).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.enableEditorActiveLineHighlight = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.enableEditorActiveLineHighlight) {
|
||
this.createPickrSetting(
|
||
basicDiv,
|
||
"Editor active line color",
|
||
'To set this color, enable the option "Enable editor active line highlighting" first.',
|
||
"editorActiveLineColor"
|
||
);
|
||
}
|
||
new import_obsidian3.Setting(basicDiv).setName("Exclude languages").setDesc("Define languages, separated by a comma, to which the plugin should not apply. You can use a wildcard (*) either at the beginning, or at the end. For example: ad-* will exclude codeblocks where the language starts with ad- e.g.: ad-info, ad-error etc.").addText(
|
||
(text3) => text3.setPlaceholder("e.g. dataview, python etc.").setValue(this.plugin.settings.ExcludeLangs).onChange(async (value) => {
|
||
this.plugin.settings.ExcludeLangs = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(basicDiv).setName("Restore default themes").setDesc("Restore all settings of all the default themes to their original state.").addButton(async (button) => {
|
||
button.setButtonText("Restore");
|
||
button.onClick(async () => {
|
||
this.restoreThemes(this.plugin.settings.ThemeName, true);
|
||
await this.plugin.saveSettings();
|
||
new import_obsidian3.Notice("Default themes restored to their original state!");
|
||
});
|
||
});
|
||
const codeblockDiv = containerEl.createEl("div", { cls: "codeblock-customizer-codeblock-settingsDiv-hide" });
|
||
codeblockDiv.toggleClass("codeblock-customizer-codeblock-settingsDiv-hide", this.plugin.settings.settingsType !== "codeblock");
|
||
codeblockDiv.createEl("h3", { text: "Codeblock settings" });
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Enable line numbers").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.enableLineNumbers).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.enableLineNumbers = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Enable codeblock active line highlight").setDesc("If enabled, you can set the color for the active line inside codeblocks only.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.enableActiveLineHighlight).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.enableActiveLineHighlight = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.codeblock.enableActiveLineHighlight) {
|
||
this.createPickrSetting(
|
||
codeblockDiv,
|
||
"Codeblock active line color",
|
||
'To set this color, enable the option "Enable codeblock active line highlight" first.',
|
||
"codeblock.activeLineColor"
|
||
);
|
||
}
|
||
this.createPickrSetting(codeblockDiv, "Background color", "", "codeblock.backgroundColor");
|
||
this.createPickrSetting(codeblockDiv, 'Highlight color (used by the "hl" parameter)', "", "codeblock.highlightColor");
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Show indentation lines in reading view").setDesc("If enabled, indentation lines will be shown in reading view.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.showIndentationLines).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.showIndentationLines = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Enable links usage").setDesc("If enabled, you can use links in the header, and code blocks as well. In code blocks, you must comment them to work! Examples: [[Document1]], [[Document1|DisplayText]], [[Document1#Paragraph|DisplayText]], [[Document1#^<BlockId>|DisplayText]], [DisplayText](Link), http://example.com etc.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.enableLinks).onChange(async (value) => {
|
||
this.linkUpdateToggle.forEach((item) => {
|
||
item.setDisabled(!value);
|
||
});
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.enableLinks = value;
|
||
await this.plugin.saveSettings();
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.codeblock.enableLinks) {
|
||
const enableLinkUpdate = new import_obsidian3.Setting(codeblockDiv).setName("Enable automatically updating links on file rename").setDesc("To enable this setting, enable links usage option first! If enabled, code block links will be automatically updated, when a file is renamed. Please read the README for more information!").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.enableLinkUpdate).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.enableLinkUpdate = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
this.linkUpdateToggle.push(enableLinkUpdate);
|
||
}
|
||
if (!this.plugin.settings.SelectedTheme.settings.codeblock.enableLinks) {
|
||
this.linkUpdateToggle.forEach((item) => {
|
||
item.setDisabled(true);
|
||
});
|
||
}
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Enable bracket highlight for matching brackets").setDesc("If you click next to a bracket, and if the corresponding opening/closing bracket has been found both of them will be highlighted.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.enableBracketHighlight).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.enableBracketHighlight = value;
|
||
if (value) {
|
||
this.plugin.extensions.push(this.plugin.editorExtensions.customBracketMatching);
|
||
} else {
|
||
this.plugin.extensions.remove(this.plugin.editorExtensions.customBracketMatching);
|
||
}
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.codeblock.enableBracketHighlight) {
|
||
this.createPickrSetting(codeblockDiv, "Bracket highlight color for matching brackets", "", "codeblock.bracketHighlightColorMatch");
|
||
this.createPickrSetting(codeblockDiv, "Background color for matching brackets", "", "codeblock.bracketHighlightBackgroundColorMatch");
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Enable bracket highlight for non matching brackets").setDesc(`If you click next to a bracket, and it doesn't have a corresponding pair, or the pair does not match the opening/closing bracket (e.g: print("hello"] ), they will be highlighted.`).addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.highlightNonMatchingBrackets).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.highlightNonMatchingBrackets = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.codeblock.highlightNonMatchingBrackets) {
|
||
this.createPickrSetting(codeblockDiv, "Bracket highlight color for non matching brackets", "", "codeblock.bracketHighlightColorNoMatch");
|
||
this.createPickrSetting(codeblockDiv, "Background color for non matching brackets", "", "codeblock.bracketHighlightBackgroundColorNoMatch");
|
||
}
|
||
}
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Inverse fold behavior").setDesc('If enabled, all code blocks are folded by default when opening a document. To disable this behavior for a specific code block, use the "unfold" parameter.').addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Enable selection matching").setDesc("If enabled, all occurrences of the selected text will be highlighted for easy identification.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.enableSelectionMatching).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.enableSelectionMatching = value;
|
||
if (value) {
|
||
this.plugin.extensions.push(this.plugin.editorExtensions.selectionMatching);
|
||
} else {
|
||
this.plugin.extensions.remove(this.plugin.editorExtensions.selectionMatching);
|
||
}
|
||
await this.plugin.saveSettings();
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.codeblock.enableSelectionMatching) {
|
||
this.createPickrSetting(codeblockDiv, "Selection match highlight color", "", "codeblock.selectionMatchHighlightColor");
|
||
}
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Unwrap code").setDesc("If enabled, the code will be unwrapped in reading view.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.unwrapcode).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.unwrapcode = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
codeblockDiv.createEl("h4", { text: "Extra buttons" });
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Show 'Delete Code' button (only editing view)").setDesc("If enabled, an additional button will be displayed on every codeblock. If clicked, the content of that codeblock is deleted. Be careful!").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.buttons.enableDeleteCodeButton).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.buttons.enableDeleteCodeButton = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Show 'Select Code' button (only editing view)").setDesc("If enabled, an additional button will be displayed on every codeblock. If clicked, the content of that codeblock is selected (including the first and last lines of the code blocks which begin with three backticks).").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.buttons.enableSelectCodeButton).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.buttons.enableSelectCodeButton = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Show 'Wrap Code' button (only reading view)").setDesc("If enabled, an additional button will be displayed on every codeblock. If clicked, the content of that codeblock is wrapped/unwrapped.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.buttons.enableWrapCodeButton).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.buttons.enableWrapCodeButton = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Always show buttons (only editing view)").setDesc("If enabled, all enabled buttons will always be displayed, even when you click inside the code block. Otherwise, they will only be shown when the cursor is outside the code block.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.buttons.alwaysShowButtons).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.buttons.alwaysShowButtons = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Always show 'Copy Code' button for collapsed code blocks").setDesc("If enabled, in editing mode the 'Copy Code' button will always be visible on collapsed code blocks in the header. In reading mode the 'Copy Code' button will always be visible on collapsed and uncollapsed code blocks as well. Otherwise, it will only appear when hovering over the header (in editing mode) or the code block (in reading mode).").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.codeblock.buttons.alwaysShowCopyCodeButton).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.buttons.alwaysShowCopyCodeButton = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
codeblockDiv.createEl("h4", { text: "Text highlight settings" });
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Line separator").setDesc('Override the default line separator (|) globally for text highlighting. You can also specify it for specific code blocks using the "lsep" parameter. The separator can only be one character long!').addText(
|
||
(text3) => text3.setPlaceholder(DEFAULT_LINE_SEPARATOR).setValue(this.plugin.settings.SelectedTheme.settings.textHighlight.lineSeparator).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.textHighlight.lineSeparator = value.charAt(0);
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Text separator").setDesc('Override the default text separator (:) globally for text highlighting. You can also specify it for specific code blocks using the "tsep" parameter. The separator can only be one character long!').addText(
|
||
(text3) => text3.setPlaceholder(DEFAULT_TEXT_SEPARATOR).setValue(this.plugin.settings.SelectedTheme.settings.textHighlight.textSeparator).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.textHighlight.textSeparator = value.charAt(0);
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
codeblockDiv.createEl("h4", { text: "Semi-fold settings" });
|
||
let enableSemiFoldToggle;
|
||
let semiFoldLinesDropDown;
|
||
let semiFoldShowButton;
|
||
const updateDependentSettings = () => {
|
||
const value = enableSemiFoldToggle.getValue();
|
||
semiFoldLinesDropDown.setDisabled(!value);
|
||
semiFoldShowButton.setDisabled(!value);
|
||
};
|
||
new import_obsidian3.Setting(codeblockDiv).setName("Enable semi-fold").setDesc("If enabled folding will use semi-fold method. This means, that the first X lines will be visible only. Select the number of visisble lines. You can also enable an additional uncollapse button. Please refer to the README for more information.").addToggle(
|
||
(toggle) => enableSemiFoldToggle = toggle.setValue(this.plugin.settings.SelectedTheme.settings.semiFold.enableSemiFold).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.semiFold.enableSemiFold = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
updateDependentSettings();
|
||
})
|
||
).addDropdown((dropdown2) => {
|
||
semiFoldLinesDropDown = dropdown2;
|
||
dropdown2.selectEl.empty();
|
||
dropdown2.addOptions(Object.fromEntries([...Array(50)].map((_2, index2) => [`${index2 + 1}`, `${index2 + 1}`])));
|
||
dropdown2.setValue(this.plugin.settings.SelectedTheme.settings.semiFold.visibleLines.toString());
|
||
dropdown2.onChange(async (value) => {
|
||
const number2 = parseInt(value);
|
||
this.plugin.settings.SelectedTheme.settings.semiFold.visibleLines = number2;
|
||
await this.plugin.saveSettings();
|
||
});
|
||
}).addToggle(
|
||
(toggle) => semiFoldShowButton = toggle.setValue(this.plugin.settings.SelectedTheme.settings.semiFold.showAdditionalUncollapseButon).setTooltip("Show additional uncollapse button").onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.semiFold.showAdditionalUncollapseButon = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
updateDependentSettings();
|
||
const languageSpecificDiv = containerEl.createEl("div", { cls: "codeblock-customizer-languageSpecific-settingsDiv-hide" });
|
||
languageSpecificDiv.toggleClass("codeblock-customizer-languageSpecific-settingsDiv-hide", this.plugin.settings.settingsType !== "languageSpecific");
|
||
languageSpecificDiv.createEl("h3", { text: "Codeblock language specific colors", cls: "codeblock-customizer-lang-specific-color" });
|
||
let languageSpecificColorDisplayText;
|
||
new import_obsidian3.Setting(languageSpecificDiv).setName("Add languages to set colors").setDesc('Add a language, to set the colors for this specific language. If you want to set colors for code blocks without a language, add "nolang" as a language.').addText((value) => {
|
||
languageSpecificColorDisplayText = value;
|
||
languageSpecificColorDisplayText.setPlaceholder("e.g. cpp, csharp");
|
||
languageSpecificColorDisplayText.onChange(async (languageSpecific) => {
|
||
this.plugin.settings.languageSpecificLanguageName = languageSpecific;
|
||
});
|
||
}).addButton(async (button) => {
|
||
button.setButtonText("Add");
|
||
button.onClick(async () => {
|
||
const colorNameRegex = /^[^\d][\w\d]*$/;
|
||
if (this.plugin.settings.languageSpecificLanguageName.trim() === "") {
|
||
new import_obsidian3.Notice("Please enter a language name.");
|
||
} else if (!colorNameRegex.test(this.plugin.settings.languageSpecificLanguageName)) {
|
||
new import_obsidian3.Notice(`"${this.plugin.settings.languageSpecificLanguageName}" is not a valid language name.`);
|
||
} else {
|
||
if (this.plugin.settings.languageSpecificLanguageName.toLowerCase() in this.plugin.settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors) {
|
||
new import_obsidian3.Notice(`A language with the name "${this.plugin.settings.languageSpecificLanguageName}" already exists.`);
|
||
} else {
|
||
this.plugin.settings.SelectedTheme.colors.light.languageSpecificColors[this.plugin.settings.languageSpecificLanguageName] = {};
|
||
this.plugin.settings.SelectedTheme.colors.dark.languageSpecificColors[this.plugin.settings.languageSpecificLanguageName] = {};
|
||
new import_obsidian3.Notice(`Added language "${this.plugin.settings.languageSpecificLanguageName}".`);
|
||
languageSpecificColorDisplayText.setValue("");
|
||
this.plugin.settings.languageSpecificLanguageName = "";
|
||
await this.plugin.saveSettings();
|
||
this.updateLanguageSpecificColorContainer(languageSpecificContainer);
|
||
}
|
||
}
|
||
});
|
||
});
|
||
new import_obsidian3.Setting(languageSpecificDiv).setName("Code block border styling position").setDesc("Select on which side the border should be displayed.").addDropdown(
|
||
(dropdown2) => dropdown2.addOptions({ "disable": "Disable", "left": "Left", "right": "Right" }).setValue(this.plugin.settings.SelectedTheme.settings.codeblock.codeBlockBorderStylingPosition).onChange((value) => {
|
||
this.plugin.settings.SelectedTheme.settings.codeblock.codeBlockBorderStylingPosition = value;
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
const languageSpecificContainer = languageSpecificDiv.createEl("div", { cls: "codeblock-customizer-languageSpecificColorContainer" });
|
||
this.updateLanguageSpecificColorContainer(languageSpecificContainer);
|
||
const alternateHighlightDiv = containerEl.createEl("div", { cls: "codeblock-customizer-alternative-highlight-settingsDiv-hide" });
|
||
alternateHighlightDiv.toggleClass("codeblock-customizer-alternative-highlight-settingsDiv-hide", this.plugin.settings.settingsType !== "alternateHighlight");
|
||
alternateHighlightDiv.createEl("h3", { text: "Alternative highlight colors", cls: "codeblock-customizer-alternative-highlight-color" });
|
||
let alternateColorDisplayText;
|
||
new import_obsidian3.Setting(alternateHighlightDiv).setName("Add alternative highlight color").setDesc("Define a name, by which you will reference the color. You can set the color itself after adding it to the list.").addText((value) => {
|
||
alternateColorDisplayText = value;
|
||
alternateColorDisplayText = value;
|
||
alternateColorDisplayText.setPlaceholder("e.g. error, warn");
|
||
alternateColorDisplayText.onChange(async (alternateHLColorName) => {
|
||
this.plugin.settings.alternateHighlightColorName = alternateHLColorName;
|
||
});
|
||
}).addButton(async (button) => {
|
||
button.setButtonText("Add");
|
||
button.onClick(async () => {
|
||
const colorNameRegex = /^[^\d][\w\d]*$/;
|
||
if (this.plugin.settings.alternateHighlightColorName.trim() === "") {
|
||
new import_obsidian3.Notice("Please enter a color name.");
|
||
} else if (!colorNameRegex.test(this.plugin.settings.alternateHighlightColorName)) {
|
||
new import_obsidian3.Notice(`"${this.plugin.settings.alternateHighlightColorName}" is not a valid color name.`);
|
||
} else if (this.plugin.settings.alternateHighlightColorName.trim().toLowerCase() === "hl") {
|
||
new import_obsidian3.Notice("You cannot override the default hl parameter.");
|
||
} else if (this.plugin.settings.alternateHighlightColorName.trim().toLowerCase() === "fold") {
|
||
new import_obsidian3.Notice("You cannot override the fold parameter.");
|
||
} else {
|
||
if (this.plugin.settings.alternateHighlightColorName.toLowerCase() in this.plugin.settings.SelectedTheme.colors[getCurrentMode()].codeblock.alternateHighlightColors) {
|
||
new import_obsidian3.Notice(`A color with the name "${this.plugin.settings.alternateHighlightColorName}" already exists.`);
|
||
} else {
|
||
const newColor = this.getRandomColor();
|
||
this.plugin.settings.SelectedTheme.colors.light.codeblock.alternateHighlightColors[this.plugin.settings.alternateHighlightColorName] = newColor;
|
||
this.plugin.settings.SelectedTheme.colors.dark.codeblock.alternateHighlightColors[this.plugin.settings.alternateHighlightColorName] = newColor;
|
||
await this.plugin.saveSettings();
|
||
new import_obsidian3.Notice(`Added color "${this.plugin.settings.alternateHighlightColorName}".`);
|
||
alternateColorDisplayText.setValue("");
|
||
this.plugin.settings.alternateHighlightColorName = "";
|
||
this.updateColorContainer(colorContainer);
|
||
}
|
||
}
|
||
});
|
||
});
|
||
const colorContainer = alternateHighlightDiv.createEl("div", { cls: "codeblock-customizer-alternateHLcolorContainer" });
|
||
this.updateColorContainer(colorContainer);
|
||
const headerDiv = containerEl.createEl("div", { cls: "codeblock-customizer-header-settingsDiv-hide" });
|
||
headerDiv.toggleClass("codeblock-customizer-header-settingsDiv-hide", this.plugin.settings.settingsType !== "header");
|
||
headerDiv.createEl("h3", { text: "Header settings" });
|
||
this.createPickrSetting(headerDiv, "Header color", "", "header.backgroundColor");
|
||
this.createPickrSetting(headerDiv, "Header text color", "", "header.textColor");
|
||
new import_obsidian3.Setting(headerDiv).setName("Header bold text").setDesc("If enabled, the header text will be set to bold.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.boldText).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.boldText = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(headerDiv).setName("Header italic text").setDesc("If enabled, the header text will be set to italic.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.italicText).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.italicText = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
this.createPickrSetting(headerDiv, "Header line color", "", "header.lineColor");
|
||
new import_obsidian3.Setting(headerDiv).setName("Disable folding for code blocks without fold or unfold specified").setDesc('If enabled, code blocks without "fold" or "unfold" specified will not collapse when clicking the header.').addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.disableFoldUnlessSpecified).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.disableFoldUnlessSpecified = value;
|
||
await this.plugin.saveSettings();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(headerDiv).setName("Collapse icon position").setDesc("If enabled a collapse icon will be displayed in the header. Select the position of the collapse icon.").addDropdown(
|
||
(dropdown2) => dropdown2.addOptions({ "hide": "Hide", "middle": "Middle", "right": "Right" }).setValue(this.plugin.settings.SelectedTheme.settings.header.collapseIconPosition).onChange((value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.collapseIconPosition = value;
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(headerDiv).setName("Collapsed code text").setDesc('Overwrite the default "Collapsed Code" text in the header, when the file parameter is not defined.').addText(
|
||
(text3) => text3.setPlaceholder(DEFAULT_COLLAPSE_TEXT).setValue(this.plugin.settings.SelectedTheme.settings.header.collapsedCodeText).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.collapsedCodeText = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
const headerLanguageDiv = containerEl.createEl("div", { cls: "codeblock-customizer-header-language-settingsDiv-hide" });
|
||
headerLanguageDiv.toggleClass("codeblock-customizer-header-language-settingsDiv-hide", this.plugin.settings.settingsType !== "headerLanguage");
|
||
headerLanguageDiv.createEl("h3", { text: "Header language settings" });
|
||
new import_obsidian3.Setting(headerLanguageDiv).setName("Display codeblock language (if language is defined)").setDesc("If enabled, the codeblock language will be displayed in the header. If disabled, all below settings are disabled as well!").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockLanguage).onChange(async (value) => {
|
||
this.headerLangToggles.forEach((item) => {
|
||
item.setDisabled(!value);
|
||
});
|
||
this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockLanguage = value;
|
||
await this.plugin.saveSettings();
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockLanguage) {
|
||
this.createPickrSetting(headerLanguageDiv, "Codeblock language text color", 'To set this color, enable the option "Display codeblock language" first.', "header.codeBlockLangTextColor");
|
||
this.createPickrSetting(headerLanguageDiv, "Codeblock language background color", 'To set this color, enable the option "Display codeblock language" first.', "header.codeBlockLangBackgroundColor");
|
||
const boldToggle = new import_obsidian3.Setting(headerLanguageDiv).setName("Bold text").setDesc("If enabled, the codeblock language text will be set to bold.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.codeblockLangBoldText).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.codeblockLangBoldText = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
this.headerLangToggles.push(boldToggle);
|
||
const italicToggle = new import_obsidian3.Setting(headerLanguageDiv).setName("Italic text").setDesc("If enabled, the codeblock language text will be set to italic.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.codeblockLangItalicText).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.codeblockLangItalicText = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
this.headerLangToggles.push(italicToggle);
|
||
const alwaysDisplayToggle = new import_obsidian3.Setting(headerLanguageDiv).setName("Always display codeblock language").setDesc("If enabled, the codeblock language will always be displayed (if a language is defined), even if the file parameter is not specified.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.alwaysDisplayCodeblockLang).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.alwaysDisplayCodeblockLang = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
this.headerLangToggles.push(alwaysDisplayToggle);
|
||
if (!this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockLanguage) {
|
||
this.headerLangToggles.forEach((item) => {
|
||
item.setDisabled(true);
|
||
});
|
||
}
|
||
}
|
||
headerLanguageDiv.createEl("h5", { text: "Header language icon settings" });
|
||
new import_obsidian3.Setting(headerLanguageDiv).setName("Display codeblock language icon (if available)").setDesc("If enabled, the codeblock language icon will be displayed in the header. If disabled, all below settings are disabled as well!").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockIcon).onChange(async (value) => {
|
||
this.headerLangIconToggles.forEach((item) => {
|
||
item.setDisabled(!value);
|
||
});
|
||
this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockIcon = value;
|
||
await this.plugin.saveSettings();
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockIcon) {
|
||
const alwaysDisplayIconToggle = new import_obsidian3.Setting(headerLanguageDiv).setName("Always display codeblock language icon (if available)").setDesc("If enabled, the codeblock language icon will always be displayed (if a language is defined and it has an icon), even if the file parameter is not specified.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.header.alwaysDisplayCodeblockIcon).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.header.alwaysDisplayCodeblockIcon = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
this.headerLangIconToggles.push(alwaysDisplayIconToggle);
|
||
if (!this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockIcon) {
|
||
this.headerLangIconToggles.forEach((item) => {
|
||
item.setDisabled(true);
|
||
});
|
||
}
|
||
}
|
||
const gutterDiv = containerEl.createEl("div", { cls: "codeblock-customizer-gutter-settingsDiv-hide" });
|
||
gutterDiv.toggleClass("codeblock-customizer-gutter-settingsDiv-hide", this.plugin.settings.settingsType !== "gutter");
|
||
gutterDiv.createEl("h3", { text: "Gutter settings" });
|
||
new import_obsidian3.Setting(gutterDiv).setName("Highlight gutter").setDesc("If enabled, highlighted lines will also highlight the gutter (line number), not just the line.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.gutter.enableHighlight).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.gutter.enableHighlight = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
this.createPickrSetting(gutterDiv, "Gutter text color", "", "gutter.textColor");
|
||
this.createPickrSetting(gutterDiv, "Gutter background color", "", "gutter.backgroundColor");
|
||
new import_obsidian3.Setting(gutterDiv).setName("Highlight active line number").setDesc("If enabled, the active line number will be highlighted with a separate color.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.gutter.highlightActiveLineNr).onChange((value) => {
|
||
this.plugin.settings.SelectedTheme.settings.gutter.highlightActiveLineNr = value;
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.gutter.highlightActiveLineNr) {
|
||
this.createPickrSetting(gutterDiv, "Active line number color", 'To set this color enable the option "Hihglight active line number" first.', "gutter.activeLineNrColor");
|
||
}
|
||
const inlineDiv = containerEl.createEl("div", { cls: "codeblock-customizer-inlineCode-settingsDiv-hide" });
|
||
inlineDiv.toggleClass("codeblock-customizer-inlineCode-settingsDiv-hide", this.plugin.settings.settingsType !== "inlineCode");
|
||
inlineDiv.createEl("h3", { text: "Inline code settings" });
|
||
new import_obsidian3.Setting(inlineDiv).setName("Enable inline code styling").setDesc("If enabled, the background color, and the text color of inline code can be styled.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.inlineCode.enableInlineCodeStyling).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.inlineCode.enableInlineCodeStyling = value;
|
||
await this.plugin.saveSettings();
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.inlineCode.enableInlineCodeStyling) {
|
||
this.createPickrSetting(inlineDiv, "Inline code background color", 'To set this color enable the option "Enable inline code styling" first.', "inlineCode.backgroundColor");
|
||
this.createPickrSetting(inlineDiv, "Inline code text color", 'To set this color enable the option "Enable inline code styling" first.', "inlineCode.textColor");
|
||
}
|
||
const printToPDFDiv = containerEl.createEl("div", { cls: "codeblock-customizer-printToPDF-settingsDiv-hide" });
|
||
printToPDFDiv.toggleClass("codeblock-customizer-printToPDF-settingsDiv-hide", this.plugin.settings.settingsType !== "printToPDF");
|
||
printToPDFDiv.createEl("h3", { text: "Print to PDF settings " });
|
||
new import_obsidian3.Setting(printToPDFDiv).setName("Enable print to PDF").setDesc("If enabled, the styling is applied to documents when printed to PDF. By default PDF printing uses light theme colors.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.printing.enablePrintToPDFStyling).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.printing.enablePrintToPDFStyling = value;
|
||
await this.plugin.saveSettings();
|
||
this.display();
|
||
})
|
||
);
|
||
if (this.plugin.settings.SelectedTheme.settings.printing.enablePrintToPDFStyling) {
|
||
new import_obsidian3.Setting(printToPDFDiv).setName("Force current color mode use").setDesc("If enabled, PDF printing will use the dark theme colors when a dark theme is selected, and light theme colors when a light theme is selected.").addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.printing.forceCurrentColorUse).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.printing.forceCurrentColorUse = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
new import_obsidian3.Setting(printToPDFDiv).setName("Expand all code blocks during printing").setDesc('If enabled, all collapsed code blocks specified by the "fold" parameter will be expanded when printing. This results in the printed document containing expanded code blocks where "fold" was used.').addToggle(
|
||
(toggle) => toggle.setValue(this.plugin.settings.SelectedTheme.settings.printing.uncollapseDuringPrint).onChange(async (value) => {
|
||
this.plugin.settings.SelectedTheme.settings.printing.uncollapseDuringPrint = value;
|
||
await this.plugin.saveSettings();
|
||
})
|
||
);
|
||
}
|
||
const cDonationDiv = containerEl.createEl("div", { cls: "codeblock-customizer-Donation" });
|
||
const credit = createEl("p");
|
||
const donateText = createEl("p");
|
||
donateText.appendText("If you like this plugin, and would like to help support continued development, use the button below!");
|
||
credit.setAttribute("style", "color: var(--text-muted)");
|
||
cDonationDiv.appendChild(donateText);
|
||
cDonationDiv.appendChild(credit);
|
||
cDonationDiv.appendChild(
|
||
this.createDonateButton("https://www.buymeacoffee.com/ThePirateKing")
|
||
);
|
||
}
|
||
// display
|
||
restoreThemes(themeName, cloneAll) {
|
||
if (cloneAll) {
|
||
Object.entries(DEFAULT_THEMES).forEach(([name, theme]) => {
|
||
this.plugin.settings.Themes[name] = structuredClone(theme);
|
||
});
|
||
} else {
|
||
Object.entries(DEFAULT_THEMES).forEach(([name, theme]) => {
|
||
if (name === themeName)
|
||
this.plugin.settings.Themes[name] = structuredClone(theme);
|
||
});
|
||
}
|
||
if (themeName in DEFAULT_THEMES)
|
||
this.plugin.settings.SelectedTheme = structuredClone(this.plugin.settings.Themes[themeName]);
|
||
this.display();
|
||
}
|
||
// restoreThemes
|
||
refreshDropdown(dropdown, settings) {
|
||
dropdown.selectEl.empty();
|
||
Object.keys(settings.Themes).forEach((name) => {
|
||
dropdown.addOption(name, name);
|
||
});
|
||
dropdown.setValue(settings.ThemeName);
|
||
}
|
||
// refreshDropdown
|
||
getRandomColor() {
|
||
const letters = "0123456789ABCDEF";
|
||
let color2 = "#";
|
||
for (let i = 0; i < 6; i++) {
|
||
color2 += letters[Math.floor(Math.random() * 16)];
|
||
}
|
||
return color2;
|
||
}
|
||
// getRandomColor
|
||
applyTheme() {
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
this.plugin.saveSettings();
|
||
}
|
||
// applyTheme
|
||
createPickrSetting(containerEl, name, description, pickrClass) {
|
||
let pickr;
|
||
let desc = "";
|
||
if (description != "")
|
||
desc = description;
|
||
const mySetting = new import_obsidian3.Setting(containerEl).setName(name).setDesc(desc).then((setting) => {
|
||
pickr = import_pickr.default.create({
|
||
el: setting.controlEl.createDiv({ cls: "picker" }),
|
||
container: containerEl.parentNode,
|
||
appClass: pickrClass,
|
||
theme: "nano",
|
||
position: "left-middle",
|
||
lockOpacity: false,
|
||
// If true, the user won't be able to adjust any opacity.
|
||
default: this.getColorFromPickrClass(this.plugin.settings.SelectedTheme, getCurrentMode(), pickrClass, true).toString(),
|
||
// Default color
|
||
swatches: [],
|
||
// Optional color swatches
|
||
components: {
|
||
preview: true,
|
||
hue: true,
|
||
opacity: true,
|
||
interaction: {
|
||
hex: true,
|
||
rgba: true,
|
||
hsla: false,
|
||
input: true,
|
||
cancel: true,
|
||
save: true
|
||
}
|
||
}
|
||
}).on("show", (color2, instance) => {
|
||
if (!this.plugin.settings.SelectedTheme.settings.codeblock.enableActiveLineHighlight && pickrClass === "codeblock.activeLineColor" || !this.plugin.settings.SelectedTheme.settings.enableEditorActiveLineHighlight && pickrClass === "editorActiveLineColor" || !this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockLanguage && pickrClass === "header.codeBlockLangTextColor" || !this.plugin.settings.SelectedTheme.settings.header.displayCodeBlockLanguage && pickrClass === "header.codeBlockLangBackgroundColor" || !this.plugin.settings.SelectedTheme.settings.gutter.highlightActiveLineNr && pickrClass === "gutter.activeLineNrColor" || !this.plugin.settings.SelectedTheme.settings.inlineCode.enableInlineCodeStyling && pickrClass === "inlineCode.backgroundColor" || !this.plugin.settings.SelectedTheme.settings.inlineCode.enableInlineCodeStyling && pickrClass === "inlineCode.textColor") {
|
||
pickr == null ? void 0 : pickr.hide();
|
||
}
|
||
const { result } = (pickr == null ? void 0 : pickr.getRoot()).interaction;
|
||
requestAnimationFrame(
|
||
() => requestAnimationFrame(() => result.select())
|
||
);
|
||
}).on("save", (color2, instance) => {
|
||
if (!color2)
|
||
return;
|
||
instance.hide();
|
||
const savedColor = color2.toHEXA().toString();
|
||
instance.addSwatch(savedColor);
|
||
this.setAndSavePickrSetting(pickrClass, savedColor);
|
||
if (pickrClass === "editorActiveLineColor" || pickrClass === "codeblock.activeLineColor") {
|
||
updateSettingStyles(this.plugin.settings, this.app);
|
||
}
|
||
}).on("cancel", (instance) => {
|
||
instance.hide();
|
||
});
|
||
}).addExtraButton((btn) => {
|
||
btn.setIcon("reset").onClick(() => {
|
||
if (pickr) {
|
||
const defaultColor = this.getColorFromPickrClass(this.plugin.settings.Themes[this.plugin.settings.ThemeName], getCurrentMode(), pickrClass, true);
|
||
pickr.setColor(defaultColor.toString());
|
||
}
|
||
}).setTooltip("restore default color");
|
||
});
|
||
this.pickerInstances.push(pickr);
|
||
return mySetting;
|
||
}
|
||
// createPickrSetting
|
||
getColorFromPickrClass(selectedTheme, currentMode, pickrClass, resolveCSSVar) {
|
||
const properties = pickrClass.split(".");
|
||
let colorValue = selectedTheme.colors[currentMode];
|
||
for (const prop of properties) {
|
||
colorValue = colorValue[prop];
|
||
if (resolveCSSVar && colorValue.toString().startsWith("--")) {
|
||
colorValue = getColorOfCssVariable(colorValue.toString());
|
||
}
|
||
if (!colorValue) {
|
||
break;
|
||
}
|
||
}
|
||
return colorValue || "";
|
||
}
|
||
// getColorFromPickrClass
|
||
createAlternatePickr(containerEl, colorContainer, name, Color, type, colorKey = "", languageName = "") {
|
||
let alternatePickr;
|
||
const desc = type === "normal" ? 'To higlight lines with this color use the "' + name + '" parameter. e.g: ' + name + ":2,4-6" : "";
|
||
const mySetting = new import_obsidian3.Setting(containerEl).setName(name).setDesc(desc).then((setting) => {
|
||
alternatePickr = import_pickr.default.create({
|
||
el: setting.controlEl.createDiv({ cls: "picker" }),
|
||
container: containerEl.parentNode,
|
||
theme: "nano",
|
||
position: "left-middle",
|
||
lockOpacity: false,
|
||
// If true, the user won't be able to adjust any opacity.
|
||
default: Color,
|
||
// Default color
|
||
swatches: [],
|
||
// Optional color swatches
|
||
components: {
|
||
preview: true,
|
||
hue: true,
|
||
opacity: true,
|
||
interaction: {
|
||
hex: true,
|
||
rgba: true,
|
||
hsla: false,
|
||
input: true,
|
||
cancel: true,
|
||
save: true
|
||
}
|
||
},
|
||
i18n: {
|
||
"btn:toggle": "select color for light theme"
|
||
}
|
||
}).on("show", (color2, instance) => {
|
||
const { result } = alternatePickr.getRoot().interaction;
|
||
requestAnimationFrame(
|
||
() => requestAnimationFrame(() => result.select())
|
||
);
|
||
}).on("save", (color2, instance) => {
|
||
if (!color2)
|
||
return;
|
||
instance.hide();
|
||
const savedColor = color2.toHEXA().toString();
|
||
instance.addSwatch(savedColor);
|
||
if (type === "normal") {
|
||
this.plugin.settings.SelectedTheme.colors[getCurrentMode()].codeblock.alternateHighlightColors[name] = savedColor;
|
||
} else if (type === "langSpecific") {
|
||
this.plugin.settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors[languageName][colorKey] = savedColor;
|
||
}
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
}).on("cancel", (instance) => {
|
||
instance.hide();
|
||
});
|
||
}).addExtraButton((deleteButton) => {
|
||
deleteButton.setIcon("trash").setTooltip("Delete color").onClick(async () => {
|
||
if (type === "normal") {
|
||
delete this.plugin.settings.SelectedTheme.colors.light.codeblock.alternateHighlightColors[name];
|
||
delete this.plugin.settings.SelectedTheme.colors.dark.codeblock.alternateHighlightColors[name];
|
||
this.updateColorContainer(colorContainer);
|
||
} else if (type === "langSpecific") {
|
||
delete this.plugin.settings.SelectedTheme.colors.light.languageSpecificColors[languageName][colorKey];
|
||
delete this.plugin.settings.SelectedTheme.colors.dark.languageSpecificColors[languageName][colorKey];
|
||
this.updateLanguageSpecificColorContainer(colorContainer, languageName);
|
||
}
|
||
await this.plugin.saveSettings();
|
||
new import_obsidian3.Notice(`Removed color "${name}".`);
|
||
});
|
||
});
|
||
return mySetting;
|
||
}
|
||
// createAlternatePickr
|
||
setAndSavePickrSetting(className, savedColor) {
|
||
const currentMode = getCurrentMode();
|
||
if (className === "codeblock.activeLineColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.activeLineColor = savedColor;
|
||
} else if (className === "editorActiveLineColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].editorActiveLineColor = savedColor;
|
||
} else if (className === "codeblock.backgroundColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.backgroundColor = savedColor;
|
||
} else if (className === "codeblock.highlightColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.highlightColor = savedColor;
|
||
} else if (className === "codeblock.bracketHighlightColorMatch") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.bracketHighlightColorMatch = savedColor;
|
||
} else if (className === "codeblock.bracketHighlightColorNoMatch") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.bracketHighlightColorNoMatch = savedColor;
|
||
} else if (className === "codeblock.bracketHighlightBackgroundColorMatch") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.bracketHighlightBackgroundColorMatch = savedColor;
|
||
} else if (className === "codeblock.bracketHighlightBackgroundColorNoMatch") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.bracketHighlightBackgroundColorNoMatch = savedColor;
|
||
} else if (className === "codeblock.selectionMatchHighlightColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].codeblock.selectionMatchHighlightColor = savedColor;
|
||
} else if (className === "header.backgroundColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].header.backgroundColor = savedColor;
|
||
} else if (className === "header.textColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].header.textColor = savedColor;
|
||
} else if (className === "header.lineColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].header.lineColor = savedColor;
|
||
} else if (className === "gutter.textColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].gutter.textColor = savedColor;
|
||
} else if (className === "gutter.backgroundColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].gutter.backgroundColor = savedColor;
|
||
} else if (className === "header.codeBlockLangTextColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].header.codeBlockLangTextColor = savedColor;
|
||
} else if (className === "header.codeBlockLangBackgroundColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].header.codeBlockLangBackgroundColor = savedColor;
|
||
} else if (className === "gutter.activeLineNrColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].gutter.activeLineNrColor = savedColor;
|
||
} else if (className === "inlineCode.backgroundColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].inlineCode.backgroundColor = savedColor;
|
||
} else if (className === "inlineCode.textColor") {
|
||
this.plugin.settings.SelectedTheme.colors[currentMode].inlineCode.textColor = savedColor;
|
||
}
|
||
this.plugin.saveSettings();
|
||
}
|
||
// setAndSavePickrSetting
|
||
updateColorContainer(colorContainer) {
|
||
colorContainer.empty();
|
||
Object.entries(this.plugin.settings.SelectedTheme.colors[getCurrentMode()].codeblock.alternateHighlightColors).forEach(([colorName, hexValue]) => {
|
||
this.createAlternatePickr(colorContainer, colorContainer, colorName, hexValue, "normal");
|
||
});
|
||
}
|
||
// updateColorContainer
|
||
updateLanguageSpecificColorContainer(colorContainer, language = "") {
|
||
colorContainer.empty();
|
||
const languageColors = this.plugin.settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors;
|
||
const filteredLanguages = language ? { [language]: languageColors[language] } : languageColors;
|
||
Object.entries(filteredLanguages).forEach(([languageName, colorObject]) => {
|
||
const languageSettingsDiv = colorContainer.createEl("div", { cls: `codeblock-customizer-languageSpecific-${languageName}-settings` });
|
||
languageSettingsDiv.createEl("h4", { text: `${languageName} specific color settings` });
|
||
this.createDropdown(languageSettingsDiv, languageName);
|
||
Object.entries(colorObject).forEach(([colorProp, color2]) => {
|
||
const propDisplayText = _SettingsTab.COLOR_OPTIONS[colorProp];
|
||
this.createAlternatePickr(languageSettingsDiv, languageSettingsDiv, propDisplayText, color2, "langSpecific", colorProp, languageName);
|
||
});
|
||
});
|
||
}
|
||
// updateLanguageSpecificColorContainer
|
||
createDropdown(languageSettingsDiv, languageName) {
|
||
const dropdownOptions = Object.entries(_SettingsTab.COLOR_OPTIONS).reduce((options, [key2, value]) => {
|
||
options[key2] = value;
|
||
return options;
|
||
}, {});
|
||
new import_obsidian3.Setting(languageSettingsDiv).setName("Select color to set").setDesc(`Select which color you would like to set for ${this.plugin.settings.languageSpecificLanguageName} specifically.`).addDropdown(
|
||
(dropdown) => dropdown.addOptions(dropdownOptions).setValue(this.plugin.settings.langSpecificSettingsType).onChange((value) => {
|
||
this.plugin.settings.langSpecificSettingsType = value;
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
})
|
||
).addExtraButton(async (button) => {
|
||
button.setIcon("plus");
|
||
button.setTooltip(`Add the selected property to customize it for code block language ${languageName} specifically`);
|
||
button.onClick(async () => {
|
||
const propDisplayText = _SettingsTab.COLOR_OPTIONS[this.plugin.settings.langSpecificSettingsType];
|
||
if (propDisplayText) {
|
||
if (this.plugin.settings.langSpecificSettingsType in this.plugin.settings.SelectedTheme.colors.light.languageSpecificColors[languageName]) {
|
||
new import_obsidian3.Notice(`${propDisplayText} is already defined for code block language "${languageName}"`);
|
||
} else {
|
||
if (this.plugin.settings.langSpecificSettingsType === "codeblock.borderColor") {
|
||
const newColor = this.getRandomColor();
|
||
this.plugin.settings.SelectedTheme.colors.light.languageSpecificColors[languageName]["codeblock.borderColor"] = newColor;
|
||
this.plugin.settings.SelectedTheme.colors.dark.languageSpecificColors[languageName]["codeblock.borderColor"] = newColor;
|
||
this.createAlternatePickr(languageSettingsDiv, languageSettingsDiv, propDisplayText, newColor, "langSpecific", this.plugin.settings.langSpecificSettingsType, languageName);
|
||
} else {
|
||
const defaultDarkColor = this.getColorFromPickrClass(this.plugin.settings.SelectedTheme, "dark", this.plugin.settings.langSpecificSettingsType, true);
|
||
const defaultLightColor = this.getColorFromPickrClass(this.plugin.settings.SelectedTheme, "light", this.plugin.settings.langSpecificSettingsType, true);
|
||
this.createAlternatePickr(languageSettingsDiv, languageSettingsDiv, propDisplayText, getCurrentMode() === "dark" ? defaultDarkColor : defaultLightColor, "langSpecific", this.plugin.settings.langSpecificSettingsType, languageName);
|
||
this.plugin.settings.SelectedTheme.colors.light.languageSpecificColors[languageName][this.plugin.settings.langSpecificSettingsType] = defaultLightColor;
|
||
this.plugin.settings.SelectedTheme.colors.dark.languageSpecificColors[languageName][this.plugin.settings.langSpecificSettingsType] = defaultDarkColor;
|
||
}
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
}
|
||
} else {
|
||
console.error("Selected color not found.");
|
||
}
|
||
});
|
||
}).addExtraButton(async (button) => {
|
||
button.setIcon("trash");
|
||
button.setTooltip(`Delete all language specific colors for code block language ${languageName}`);
|
||
button.onClick(async () => {
|
||
delete this.plugin.settings.SelectedTheme.colors.light.languageSpecificColors[languageName];
|
||
delete this.plugin.settings.SelectedTheme.colors.dark.languageSpecificColors[languageName];
|
||
this.display();
|
||
(async () => {
|
||
await this.plugin.saveSettings();
|
||
})();
|
||
});
|
||
});
|
||
}
|
||
// createReadMeLink
|
||
};
|
||
var SettingsTab = _SettingsTab;
|
||
SettingsTab.COLOR_OPTIONS = {
|
||
"codeblock.activeLineColor": "Code block active line color",
|
||
"codeblock.backgroundColor": "Code block background color",
|
||
"codeblock.borderColor": "Code block border color",
|
||
"codeblock.textColor": "Code block text color",
|
||
"codeblock.bracketHighlightColorMatch": "Matching bracket color",
|
||
"codeblock.bracketHighlightColorNoMatch": "Non-matching bracket color",
|
||
"codeblock.bracketHighlightBackgroundColorMatch": "Matching bracket background color",
|
||
"codeblock.bracketHighlightBackgroundColorNoMatch": "Non-matching bracket background color",
|
||
"codeblock.selectionMatchHighlightColor": "Selection match highlight color",
|
||
"header.backgroundColor": "Header background color",
|
||
"header.textColor": "Header text color",
|
||
"header.lineColor": "Header line color",
|
||
"header.codeBlockLangTextColor": "Header language text color",
|
||
"header.codeBlockLangBackgroundColor": "Header language background color",
|
||
"gutter.textColor": "Gutter text color",
|
||
"gutter.backgroundColor": "Gutter background color",
|
||
"gutter.activeLineNrColor": "Gutter active line number color"
|
||
};
|
||
|
||
// src/EditorExtensions.ts
|
||
var import_state = require("@codemirror/state");
|
||
var import_view = require("@codemirror/view");
|
||
var import_language = require("@codemirror/language");
|
||
var import_search = require("@codemirror/search");
|
||
var import_obsidian4 = require("obsidian");
|
||
function extensions(plugin, settings) {
|
||
const decorations = import_state.StateField.define({
|
||
create(state) {
|
||
document.body.classList.remove("codeblock-customizer-header-collapse-command");
|
||
settings.foldAllCommand = false;
|
||
return import_view.Decoration.none;
|
||
},
|
||
update(value, transaction) {
|
||
return buildDecorations(transaction.state);
|
||
},
|
||
provide(field) {
|
||
return import_view.EditorView.decorations.from(field);
|
||
}
|
||
});
|
||
const codeBlockPositions = import_state.StateField.define({
|
||
create(state) {
|
||
return [];
|
||
},
|
||
update(value, transaction) {
|
||
return findCodeBlockPositions(transaction.state);
|
||
}
|
||
});
|
||
const Collapse = import_state.StateEffect.define();
|
||
const UnCollapse = import_state.StateEffect.define();
|
||
const semiCollapse = import_state.StateEffect.define();
|
||
const semiUnCollapse = import_state.StateEffect.define();
|
||
const semiFade = import_state.StateEffect.define();
|
||
const semiUnFade = import_state.StateEffect.define();
|
||
const collapseField = import_state.StateField.define({
|
||
create(state) {
|
||
if (!settings.SelectedTheme.settings.common.enableInSourceMode && isSourceMode(state))
|
||
return import_view.Decoration.none;
|
||
return defaultFold(state);
|
||
},
|
||
update(value, tr2) {
|
||
if (!settings.SelectedTheme.settings.common.enableInSourceMode && isSourceMode(tr2.state))
|
||
return import_view.Decoration.none;
|
||
value = value.map(tr2.changes);
|
||
for (const effect of tr2.effects) {
|
||
if (effect.is(Collapse) || effect.is(semiCollapse) || effect.is(semiFade))
|
||
value = value.update({ add: [effect.value], sort: true });
|
||
else if (effect.is(UnCollapse) || effect.is(semiUnCollapse) || effect.is(semiUnFade)) {
|
||
const { filterFrom, filterTo } = effect.value;
|
||
value = value.update({ filter: (from, to) => to <= filterFrom || from >= filterTo, filterFrom, filterTo });
|
||
}
|
||
}
|
||
return value;
|
||
},
|
||
provide: (f) => import_view.EditorView.decorations.from(f)
|
||
});
|
||
const viewportChangedListener = import_view.EditorView.updateListener.of((update) => {
|
||
if (update.viewportChanged) {
|
||
update.view.dispatch({
|
||
effects: import_state.StateEffect.appendConfig.of([codeBlockPositions])
|
||
// Rebuild decorations when the viewport changes
|
||
//effects: StateEffect.reconfigure.of([codeBlockPositions, decorations])
|
||
});
|
||
}
|
||
});
|
||
const customBracketMatching = (0, import_language.bracketMatching)({
|
||
renderMatch: (match, state) => {
|
||
const decorations2 = [];
|
||
if (!match.matched) {
|
||
if (settings.SelectedTheme.settings.codeblock.highlightNonMatchingBrackets) {
|
||
decorations2.push(import_view.Decoration.mark({ class: "codeblock-customizer-bracket-highlight-nomatch" }).range(match.start.from, match.start.to));
|
||
if (match.end) {
|
||
decorations2.push(import_view.Decoration.mark({ class: "codeblock-customizer-bracket-highlight-nomatch" }).range(match.end.from, match.end.to));
|
||
}
|
||
}
|
||
return decorations2;
|
||
}
|
||
if (match.end) {
|
||
decorations2.push(import_view.Decoration.mark({ class: "codeblock-customizer-bracket-highlight-match" }).range(match.start.from, match.start.to));
|
||
decorations2.push(import_view.Decoration.mark({ class: "codeblock-customizer-bracket-highlight-match" }).range(match.end.from, match.end.to));
|
||
}
|
||
return decorations2;
|
||
}
|
||
});
|
||
const matchHighlightOptions = { maxMatches: 750, wholeWords: false };
|
||
const selectionMatching = (0, import_search.highlightSelectionMatches)(matchHighlightOptions);
|
||
class TextAboveCodeblockWidget extends import_view.WidgetType {
|
||
constructor(parameters, pos, buttonConfigs, sourcePath, plugin2) {
|
||
super();
|
||
this.parameters = parameters;
|
||
this.pos = pos;
|
||
this.buttonConfigs = buttonConfigs;
|
||
this.enableLinks = plugin2.settings.SelectedTheme.settings.codeblock.enableLinks;
|
||
this.languageSpecificColors = createObjectCopy(plugin2.settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors[this.parameters.language.length > 0 ? this.parameters.language : "nolang"] || {});
|
||
this.sourcePath = sourcePath;
|
||
this.disableFoldUnlessSpecified = plugin2.settings.SelectedTheme.settings.header.disableFoldUnlessSpecified;
|
||
this.plugin = plugin2;
|
||
}
|
||
eq(other) {
|
||
return other.parameters.headerDisplayText === this.parameters.headerDisplayText && other.parameters.language === this.parameters.language && other.parameters.specificHeader === this.parameters.specificHeader && other.parameters.fold === this.parameters.fold && other.parameters.hasLangBorderColor === this.parameters.hasLangBorderColor && other.enableLinks === this.enableLinks && //other.marginLeft === this.marginLeft &&
|
||
other.parameters.indentLevel === this.parameters.indentLevel && other.pos.codeBlockStartPos === this.pos.codeBlockStartPos && other.pos.codeBlockEndPos === this.pos.codeBlockEndPos && other.sourcePath === this.sourcePath && other.plugin === this.plugin && areObjectsEqual(other.languageSpecificColors, this.languageSpecificColors) && compareButtonConfigs(this.buttonConfigs, other.buttonConfigs) && other.disableFoldUnlessSpecified === this.disableFoldUnlessSpecified;
|
||
}
|
||
toDOM(view) {
|
||
const codeblockLanguageSpecificClass = getLanguageSpecificColorClass(this.parameters.language, null, this.languageSpecificColors);
|
||
const container = createContainer(this.parameters.specificHeader, this.parameters.language, this.parameters.hasLangBorderColor, codeblockLanguageSpecificClass);
|
||
if (this.parameters.displayLanguage) {
|
||
const Icon = getLanguageIcon(this.parameters.displayLanguage);
|
||
if (Icon) {
|
||
container.appendChild(createCodeblockIcon(this.parameters.displayLanguage));
|
||
}
|
||
container.appendChild(createCodeblockLang(this.parameters.language));
|
||
}
|
||
container.appendChild(createFileName(this.parameters.headerDisplayText, this.enableLinks, this.sourcePath, this.plugin));
|
||
const buttonContainer = createButtonContainer(this.buttonConfigs, view, `codeblock-customizer-header-button-container`);
|
||
container.appendChild(buttonContainer);
|
||
if (this.disableFoldUnlessSpecified && !this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !this.parameters.fold || this.disableFoldUnlessSpecified && this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !this.parameters.unfold) {
|
||
container.classList.add(`noCollapseIcon`);
|
||
} else {
|
||
const collapse = createCodeblockCollapse(this.parameters.fold);
|
||
container.appendChild(collapse);
|
||
}
|
||
if (this.parameters.indentLevel > 0) {
|
||
container.setAttribute("style", `--level:${this.parameters.indentLevel}; `);
|
||
container.classList.add(`indented-line`);
|
||
}
|
||
container.onclick = (event) => {
|
||
if (this.disableFoldUnlessSpecified && !this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !this.parameters.fold || this.disableFoldUnlessSpecified && this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !this.parameters.unfold) {
|
||
return;
|
||
}
|
||
handleClick2(view, container, this.pos);
|
||
};
|
||
return container;
|
||
}
|
||
updateDOM(dom, view) {
|
||
view.requestMeasure();
|
||
return false;
|
||
}
|
||
}
|
||
class uncollapseCodeWidget extends import_view.WidgetType {
|
||
constructor(visibleLines) {
|
||
super();
|
||
this.visibleLines = visibleLines;
|
||
}
|
||
eq(other) {
|
||
return this.visibleLines === other.visibleLines;
|
||
}
|
||
toDOM(view) {
|
||
const container = createUncollapseCodeButton();
|
||
container.onclick = (event) => {
|
||
var _a2;
|
||
event.preventDefault();
|
||
const buttonElement = (_a2 = event.currentTarget) == null ? void 0 : _a2.parentElement;
|
||
const { codeBlockStartPos, codeBlockEndPos } = getCodeblockByHTMLTarget(view, buttonElement);
|
||
if (!codeBlockStartPos || !codeBlockEndPos)
|
||
return;
|
||
const ranges = getRanges(view.state, codeBlockStartPos.from, codeBlockEndPos.to, this.visibleLines);
|
||
const firstCodeBlockLine = view.state.doc.lineAt(codeBlockStartPos.from);
|
||
const firstLineElement = view.domAtPos(firstCodeBlockLine.from);
|
||
const headerElement = firstLineElement.node.previousElementSibling;
|
||
if (headerElement) {
|
||
removeFadeOutEffect(headerElement, view, ranges);
|
||
view.requestMeasure();
|
||
}
|
||
};
|
||
return container;
|
||
}
|
||
}
|
||
class LineNumberWidget extends import_view.WidgetType {
|
||
constructor(lineNumber, parameters, spanClass) {
|
||
super();
|
||
this.lineNumber = lineNumber;
|
||
this.parameters = parameters;
|
||
this.spanClass = spanClass;
|
||
}
|
||
eq(other) {
|
||
return this.lineNumber === other.lineNumber && this.parameters.showNumbers === other.parameters.showNumbers && this.parameters.isSpecificNumber === other.parameters.isSpecificNumber && this.spanClass === other.spanClass;
|
||
}
|
||
toDOM(view) {
|
||
const container = createSpan();
|
||
if (this.spanClass !== "")
|
||
container.classList.add(this.spanClass);
|
||
if (this.parameters.showNumbers === "specific") {
|
||
container.classList.add("codeblock-customizer-line-number-specific");
|
||
if (this.parameters.isSpecificNumber)
|
||
container.classList.add("codeblock-customizer-line-number-specific-number");
|
||
} else if (this.parameters.showNumbers === "hide") {
|
||
container.classList.add("codeblock-customizer-line-number-hide");
|
||
} else {
|
||
container.classList.add("codeblock-customizer-line-number");
|
||
}
|
||
const lineNumber = createSpan({ cls: `codeblock-customizer-line-number-element`, text: `${this.lineNumber}` });
|
||
container.appendChild(lineNumber);
|
||
return container;
|
||
}
|
||
updateDOM(dom, view) {
|
||
view.requestMeasure();
|
||
return false;
|
||
}
|
||
}
|
||
class buttonWidget extends import_view.WidgetType {
|
||
constructor(buttonsConfig) {
|
||
super();
|
||
this.buttonsConfig = buttonsConfig;
|
||
}
|
||
eq(other) {
|
||
return compareButtonConfigs(this.buttonsConfig, other.buttonsConfig);
|
||
}
|
||
toDOM(view) {
|
||
return createButtonContainer(this.buttonsConfig, view);
|
||
}
|
||
}
|
||
class createLink extends import_view.WidgetType {
|
||
constructor(link, sourcePath, plugin2) {
|
||
super();
|
||
this.link = link;
|
||
this.sourcePath = sourcePath;
|
||
this.plugin = plugin2;
|
||
}
|
||
eq(other) {
|
||
return this.link === other.link && this.sourcePath === other.sourcePath && this.plugin === other.plugin;
|
||
}
|
||
toDOM(view) {
|
||
const span = createSpan({ cls: "codeblock-customizer-link" });
|
||
import_obsidian4.MarkdownRenderer.render(this.plugin.app, this.link, span, this.sourcePath, this.plugin);
|
||
return span;
|
||
}
|
||
}
|
||
function findCodeBlockPositions(state) {
|
||
const positions = [];
|
||
let codeBlockStartPos = -1;
|
||
let codeBlockEndPos = -1;
|
||
let parameters = getDefaultParameters();
|
||
(0, import_language.syntaxTree)(state).iterate({
|
||
enter: (node) => {
|
||
if (node.type.name.includes("HyperMD-codeblock-begin")) {
|
||
const startLine = state.doc.lineAt(node.from);
|
||
codeBlockStartPos = node.from;
|
||
parameters = getAllParameters(startLine.text, settings);
|
||
}
|
||
if (node.type.name.includes("HyperMD-codeblock-end")) {
|
||
codeBlockEndPos = node.to;
|
||
}
|
||
if (codeBlockStartPos !== -1 && codeBlockEndPos !== -1) {
|
||
positions.push({ codeBlockStartPos, codeBlockEndPos, parameters });
|
||
codeBlockStartPos = -1;
|
||
codeBlockEndPos = -1;
|
||
}
|
||
}
|
||
});
|
||
if (codeBlockStartPos !== -1 && codeBlockEndPos === -1) {
|
||
const end = findCodeBlockEnd(codeBlockStartPos, state, parameters.backtickCount);
|
||
if (end)
|
||
positions.push({ codeBlockStartPos, codeBlockEndPos: end, parameters });
|
||
}
|
||
return positions;
|
||
}
|
||
function findCodeBlockEnd(collapseStart, state, backtickCount) {
|
||
const start = state.doc.lineAt(collapseStart).number;
|
||
let end = null;
|
||
for (let i = start + 1; i <= state.doc.lines; i++) {
|
||
const line = state.doc.line(i);
|
||
const match = line.text.match(/^`+/);
|
||
const count = match ? match[0].length : 0;
|
||
if (count === backtickCount) {
|
||
end = line;
|
||
break;
|
||
}
|
||
}
|
||
return end == null ? void 0 : end.to;
|
||
}
|
||
function buildDecorations(state) {
|
||
var _a2, _b, _c, _d;
|
||
if (!settings.SelectedTheme.settings.common.enableInSourceMode && isSourceMode(state))
|
||
return import_view.Decoration.none;
|
||
const sourcePath = (_c = (_b = (_a2 = state.field(import_obsidian4.editorInfoField)) == null ? void 0 : _a2.file) == null ? void 0 : _b.path) != null ? _c : "";
|
||
const positions = (_d = state.field(codeBlockPositions, false)) != null ? _d : [];
|
||
const defaultCharWidth = state.field(import_obsidian4.editorEditorField).defaultCharacterWidth;
|
||
const decorations2 = [];
|
||
for (const pos of positions) {
|
||
const { codeBlockStartPos, codeBlockEndPos, parameters } = pos;
|
||
const firstCodeBlockLine = state.doc.lineAt(codeBlockStartPos).number;
|
||
const lastCodeBlockLine = state.doc.lineAt(codeBlockEndPos).number;
|
||
if (parameters.exclude)
|
||
continue;
|
||
const buttonConfigs = createButtonConfigs(codeBlockStartPos, codeBlockEndPos, state, parameters);
|
||
decorations2.push(import_view.Decoration.widget({ widget: new TextAboveCodeblockWidget(parameters, pos, buttonConfigs, sourcePath, plugin), block: true }).range(codeBlockStartPos));
|
||
if (settings.SelectedTheme.settings.codeblock.enableLinks)
|
||
checkForLinks(state, codeBlockStartPos, codeBlockEndPos, decorations2, sourcePath);
|
||
let lineNumber = 0;
|
||
const lineCount = lastCodeBlockLine - firstCodeBlockLine - 1 + parameters.lineNumberOffset;
|
||
const gutterWidth = lineCount.toString().length * defaultCharWidth + 12;
|
||
const gutterStyle = parameters.isSpecificNumber ? lineCount.toString().length > 2 ? `--gutter-width:${gutterWidth}px` : `` : ``;
|
||
for (let line = firstCodeBlockLine; line <= lastCodeBlockLine; line++) {
|
||
const startLine = line === firstCodeBlockLine;
|
||
const endLine = line === lastCodeBlockLine;
|
||
const currentLine = state.doc.line(line);
|
||
const lineStartPos = currentLine.from;
|
||
const lineClass = getLineClass(parameters, lineNumber, startLine, endLine, currentLine, decorations2);
|
||
decorations2.push(import_view.Decoration.line({ attributes: { class: lineClass, style: gutterStyle } }).range(lineStartPos));
|
||
let spanClass = "";
|
||
if (startLine) {
|
||
spanClass = `codeblock-customizer-line-number-first`;
|
||
decorations2.push(import_view.Decoration.widget({ widget: new buttonWidget(buttonConfigs), side: -1 }).range(lineStartPos));
|
||
}
|
||
if (endLine) {
|
||
spanClass = `codeblock-customizer-line-number-last`;
|
||
}
|
||
if (settings.SelectedTheme.settings.codeblock.enableLineNumbers || parameters.isSpecificNumber || parameters.showNumbers === "specific") {
|
||
decorations2.push(import_view.Decoration.widget({ widget: new LineNumberWidget(startLine || endLine ? " " : (lineNumber + parameters.lineNumberOffset).toString(), parameters, spanClass) }).range(lineStartPos));
|
||
}
|
||
if (parameters.indentLevel > 0) {
|
||
if (currentLine.text.length > parameters.indentCharacter) {
|
||
decorations2.push(import_view.Decoration.replace({}).range(lineStartPos, lineStartPos + parameters.indentCharacter));
|
||
}
|
||
decorations2.push(import_view.Decoration.line({ attributes: { "style": `--level:${parameters.indentLevel}`, class: `indented-line` } }).range(lineStartPos));
|
||
}
|
||
lineNumber++;
|
||
}
|
||
}
|
||
return import_state.RangeSet.of(decorations2, true);
|
||
}
|
||
function createButtonConfigs(codeBlockStartPos, codeBlockEndPos, state, parameters) {
|
||
const cursorPos = state.selection.main.head;
|
||
const isCursorInCodeBlock = cursorPos >= codeBlockStartPos && cursorPos <= codeBlockEndPos;
|
||
let showButton = false;
|
||
if (!settings.SelectedTheme.settings.codeblock.buttons.alwaysShowButtons && !isCursorInCodeBlock)
|
||
showButton = true;
|
||
else if (settings.SelectedTheme.settings.codeblock.buttons.alwaysShowButtons)
|
||
showButton = true;
|
||
return [
|
||
{
|
||
class: `codeblock-customizer-copy-code`,
|
||
displayText: "Copy code",
|
||
action: (view) => {
|
||
const collapseStart = codeBlockStartPos + parameters.backtickCount;
|
||
const collapseEnd = codeBlockEndPos - parameters.backtickCount;
|
||
const lines = view.state.sliceDoc(collapseStart, collapseEnd).toString();
|
||
addTextToClipboard(removeFirstLine(lines));
|
||
},
|
||
icon: "copy",
|
||
text: parameters.displayLanguage,
|
||
enabled: showButton
|
||
},
|
||
{
|
||
class: `codeblock-customizer-select-code`,
|
||
displayText: "Select code",
|
||
action: (view) => {
|
||
const collapseStart = codeBlockStartPos;
|
||
const collapseEnd = codeBlockEndPos;
|
||
const transaction = view.state.update({ selection: import_state.EditorSelection.range(collapseStart, collapseEnd) });
|
||
view.dispatch(transaction);
|
||
},
|
||
icon: "text",
|
||
enabled: settings.SelectedTheme.settings.codeblock.buttons.enableSelectCodeButton && showButton
|
||
},
|
||
{
|
||
class: `codeblock-customizer-delete-code`,
|
||
displayText: "Delete code block content",
|
||
action: (view) => {
|
||
const collapseStart = codeBlockStartPos + state.doc.lineAt(codeBlockStartPos).length;
|
||
const collapseEnd = codeBlockEndPos - parameters.backtickCount - 1;
|
||
const transaction = view.state.update({ changes: { from: collapseStart, to: collapseEnd, insert: "" } });
|
||
view.dispatch(transaction);
|
||
},
|
||
icon: "trash-2",
|
||
enabled: settings.SelectedTheme.settings.codeblock.buttons.enableDeleteCodeButton && showButton
|
||
}
|
||
];
|
||
}
|
||
function compareButtonConfigs(configs1, configs2) {
|
||
if (configs1.length !== configs2.length)
|
||
return false;
|
||
return configs1.every((config, i) => {
|
||
const otherConfig = configs2[i];
|
||
return config.class === otherConfig.class && config.displayText === otherConfig.displayText && config.icon === otherConfig.icon && config.text === otherConfig.text && config.enabled === otherConfig.enabled;
|
||
});
|
||
}
|
||
function createButtonContainer(buttonsConfig, view, buttonContainerClass) {
|
||
const container = createDiv({ cls: buttonContainerClass || `codeblock-customizer-button-container` });
|
||
buttonsConfig.forEach((config) => {
|
||
if (!config.enabled)
|
||
return;
|
||
const button = createSpan({ cls: config.class });
|
||
button.setAttribute("aria-label", config.displayText);
|
||
button.onclick = () => config.action(view);
|
||
if (config.text) {
|
||
button.textContent = config.text;
|
||
} else {
|
||
(0, import_obsidian4.setIcon)(button, config.icon);
|
||
}
|
||
container.appendChild(button);
|
||
});
|
||
if (buttonContainerClass) {
|
||
container.onclick = (event) => {
|
||
event.stopPropagation();
|
||
};
|
||
}
|
||
return container;
|
||
}
|
||
function getLineClass(parameters, lineNumber, startLine, endLine, line, decorations2) {
|
||
let codeblockLanguageClass = "";
|
||
let codeblockLanguageSpecificClass = "";
|
||
let borderColor = "";
|
||
const languageSpecificColors = settings.SelectedTheme.colors[getCurrentMode()].languageSpecificColors;
|
||
const languageBorderColors = getPropertyFromLanguageSpecificColors("codeblock.borderColor", settings);
|
||
const language = parameters.language.length > 0 ? parameters.language : "nolang";
|
||
codeblockLanguageClass = "codeblock-customizer-language-" + language.toLowerCase();
|
||
codeblockLanguageSpecificClass = getLanguageSpecificColorClass(language, languageSpecificColors);
|
||
borderColor = getBorderColorByLanguage(parameters.language, languageBorderColors);
|
||
let lineClass = `codeblock-customizer-line`;
|
||
lineClass = highlightLinesOrWords(lineNumber + parameters.lineNumberOffset, startLine, endLine, parameters, line, decorations2, lineClass);
|
||
lineClass = lineClass + " " + codeblockLanguageClass + " " + codeblockLanguageSpecificClass;
|
||
if (borderColor.length > 0)
|
||
lineClass = lineClass + " hasLangBorderColor";
|
||
return lineClass;
|
||
}
|
||
function checkForLinks(state, collapseFrom, collapseTo, decorations2, sourcePath) {
|
||
const cursorPos = state.selection.main.head;
|
||
const regex = /(?:\[\[([^[\]]+?)(?:\|([^\]]+?))?]]|\[([^\]]+)\]\(([^)]+)\)|(https?:\/\/[^\s]+))/g;
|
||
(0, import_language.syntaxTree)(state).iterate({
|
||
from: collapseFrom,
|
||
to: collapseTo,
|
||
enter(node) {
|
||
if (!node.type.name.includes("HyperMD-codeblock-begin") && !node.type.name.includes("comment_hmd-codeblock"))
|
||
return;
|
||
const comment2 = state.sliceDoc(node.from, node.to);
|
||
const matches = [...comment2.matchAll(regex)];
|
||
for (const match of matches) {
|
||
const fullMatch = match[0];
|
||
const startPosition = match.index !== void 0 ? match.index : -1;
|
||
if (startPosition === -1)
|
||
continue;
|
||
const isCursorInside = cursorPos >= node.from + startPosition && cursorPos <= node.from + startPosition + fullMatch.length;
|
||
if (match[1] !== void 0 && match[1] !== "") {
|
||
handleWikiLink(isCursorInside, node, startPosition, fullMatch, decorations2, sourcePath);
|
||
} else if (match[3] !== void 0 && match[3] !== "") {
|
||
handleMarkdownLink(isCursorInside, node, startPosition, fullMatch, decorations2, sourcePath);
|
||
} else if (match[5] !== void 0 && match[5] !== "") {
|
||
handleHTTPLink(isCursorInside, node, startPosition, fullMatch, decorations2, sourcePath);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
function highlightLinesOrWords(lineNumber, startLine, endLine, parameters, line, decorations2, lineClass) {
|
||
var _a2;
|
||
const caseInsensitiveLineText = ((_a2 = line.text) != null ? _a2 : "").toLowerCase();
|
||
const textSeparator = parameters.textSeparator || settings.SelectedTheme.settings.textHighlight.textSeparator || DEFAULT_TEXT_SEPARATOR;
|
||
const addHighlightClass = (name = "") => {
|
||
const className = `codeblock-customizer-line-highlighted${name ? `-${name.replace(/\s+/g, "-").toLowerCase()}` : ""}`;
|
||
return className;
|
||
};
|
||
const highlighText = (words2, name = "") => {
|
||
const caseInsensitiveWords = words2.map((word) => word.toLowerCase());
|
||
for (const word of caseInsensitiveWords) {
|
||
setClass(line, decorations2, caseInsensitiveLineText, word, textSeparator, name.replace(/\s+/g, "-").toLowerCase());
|
||
}
|
||
};
|
||
if (startLine || endLine)
|
||
return lineClass;
|
||
if (parameters.defaultLinesToHighlight.lineNumbers.includes(lineNumber)) {
|
||
lineClass = addHighlightClass();
|
||
}
|
||
let words = parameters.defaultLinesToHighlight.words;
|
||
if (words.length > 0 && words.some((word) => caseInsensitiveLineText.includes(word))) {
|
||
lineClass = addHighlightClass();
|
||
}
|
||
let lineSpecificWords = parameters.defaultLinesToHighlight.lineSpecificWords;
|
||
if (lineSpecificWords.length > 0) {
|
||
lineSpecificWords.forEach((lsWord) => {
|
||
if (lsWord.lineNumber === lineNumber && lsWord.words.some((word) => caseInsensitiveLineText.includes(word))) {
|
||
lineClass = addHighlightClass();
|
||
}
|
||
});
|
||
}
|
||
words = parameters.defaultTextToHighlight.words;
|
||
if (words.length > 0) {
|
||
highlighText(words);
|
||
}
|
||
lineSpecificWords = parameters.defaultTextToHighlight.lineSpecificWords;
|
||
const lineSpecificWord = lineSpecificWords.find((item) => item.lineNumber === lineNumber);
|
||
if (lineSpecificWord) {
|
||
highlighText(lineSpecificWord.words);
|
||
}
|
||
const textBetween = parameters.defaultTextToHighlight.textBetween;
|
||
for (const { from, to } of textBetween) {
|
||
if (caseInsensitiveLineText.includes(from.toLowerCase()) && caseInsensitiveLineText.includes(to.toLowerCase())) {
|
||
const highlightText = `${from}${textSeparator}${to}`;
|
||
highlighText([highlightText]);
|
||
}
|
||
}
|
||
const lineSpecificTextBetween = parameters.defaultTextToHighlight.lineSpecificTextBetween;
|
||
const specificTextBetween = lineSpecificTextBetween.find((item) => item.lineNumber === lineNumber);
|
||
if (specificTextBetween) {
|
||
if (caseInsensitiveLineText.includes(specificTextBetween.from.toLowerCase()) && caseInsensitiveLineText.includes(specificTextBetween.to.toLowerCase())) {
|
||
const highlightText = `${specificTextBetween.from}${textSeparator}${specificTextBetween.to}`;
|
||
highlighText([highlightText]);
|
||
}
|
||
}
|
||
if (parameters.defaultTextToHighlight.allWordsInLine.includes(lineNumber)) {
|
||
setClass(line, decorations2, caseInsensitiveLineText, "", textSeparator, "");
|
||
}
|
||
const alternativeLinesToHighlight = parameters.alternativeLinesToHighlight.lines;
|
||
const altHLMatch = alternativeLinesToHighlight.find((hl) => hl.lineNumbers.includes(lineNumber));
|
||
if (altHLMatch) {
|
||
lineClass = addHighlightClass(altHLMatch.colorName);
|
||
}
|
||
const altwords = parameters.alternativeLinesToHighlight.words;
|
||
if (altwords.length > 0 && altwords.some((altwordObj) => altwordObj.words.some((word) => caseInsensitiveLineText.includes(word.toLowerCase())))) {
|
||
altwords.forEach((altwordObj) => {
|
||
if (altwordObj.words.some((word) => caseInsensitiveLineText.includes(word.toLowerCase()))) {
|
||
lineClass = addHighlightClass(altwordObj.colorName);
|
||
}
|
||
});
|
||
}
|
||
let altLineSpecificWords = parameters.alternativeLinesToHighlight.lineSpecificWords;
|
||
if (altLineSpecificWords.length > 0) {
|
||
altLineSpecificWords.forEach((lsWord) => {
|
||
if (lsWord.lineNumber === lineNumber && lsWord.words.some((word) => caseInsensitiveLineText.includes(word))) {
|
||
lineClass = addHighlightClass(lsWord.colorName);
|
||
}
|
||
});
|
||
}
|
||
const altWords = parameters.alternativeTextToHighlight.words;
|
||
if (!startLine && !endLine) {
|
||
for (const entry of altWords) {
|
||
const { colorName, words: words2 } = entry;
|
||
if (words2.length > 0) {
|
||
highlighText(words2, colorName);
|
||
}
|
||
}
|
||
}
|
||
altLineSpecificWords = parameters.alternativeTextToHighlight.lineSpecificWords;
|
||
const altLineSpecificWord = altLineSpecificWords.find((item) => item.lineNumber === lineNumber);
|
||
if (altLineSpecificWord) {
|
||
const { colorName, words: words2 } = altLineSpecificWord;
|
||
highlighText(words2, colorName);
|
||
}
|
||
const altTextBetween = parameters.alternativeTextToHighlight.textBetween;
|
||
for (const { from, to, colorName } of altTextBetween) {
|
||
if (caseInsensitiveLineText.includes(from.toLowerCase()) && caseInsensitiveLineText.includes(to.toLowerCase())) {
|
||
const highlightText = `${from}${textSeparator}${to}`;
|
||
highlighText([highlightText], colorName);
|
||
}
|
||
}
|
||
const altLineSpecificTextBetween = parameters.alternativeTextToHighlight.lineSpecificTextBetween;
|
||
const altSpecificTextBetween = altLineSpecificTextBetween.find((item) => item.lineNumber === lineNumber);
|
||
if (altSpecificTextBetween) {
|
||
if (caseInsensitiveLineText.includes(altSpecificTextBetween.from.toLowerCase()) && caseInsensitiveLineText.includes(altSpecificTextBetween.to.toLowerCase())) {
|
||
const highlightText = `${altSpecificTextBetween.from}${textSeparator}${altSpecificTextBetween.to}`;
|
||
highlighText([highlightText], altSpecificTextBetween.colorName);
|
||
}
|
||
}
|
||
const altAllWordsInLine = parameters.alternativeTextToHighlight.allWordsInLine;
|
||
const altAllWordsInLineMatch = altAllWordsInLine.find((item) => item.allWordsInLine.includes(lineNumber));
|
||
if (altAllWordsInLineMatch) {
|
||
setClass(line, decorations2, caseInsensitiveLineText, "", textSeparator, altAllWordsInLineMatch.colorName);
|
||
}
|
||
return lineClass;
|
||
}
|
||
function setClass(line, decorations2, caseInsensitiveLineText, word, textSeparator, customClass = "") {
|
||
var _a2;
|
||
if (word.includes(textSeparator)) {
|
||
const [start, end] = word.split(textSeparator).map((w) => w.trim().toLowerCase());
|
||
const lineTextLength = caseInsensitiveLineText.length;
|
||
const startLength = start.length;
|
||
const endLength = end.length;
|
||
const classToUse = customClass ? `codeblock-customizer-highlighted-text-${customClass}` : "codeblock-customizer-highlighted-text";
|
||
const firstNonWhiteSpaceIndex = ((_a2 = caseInsensitiveLineText.match(/\S/)) == null ? void 0 : _a2.index) || 0;
|
||
let startIndex = start ? caseInsensitiveLineText.indexOf(start) : 0;
|
||
while (startIndex !== -1) {
|
||
const endIndex = end ? caseInsensitiveLineText.indexOf(end, startIndex + startLength) : lineTextLength - 1;
|
||
if ((startIndex !== -1 || start === "") && (endIndex !== -1 || end === "")) {
|
||
const from = line.from + (start ? startIndex : firstNonWhiteSpaceIndex);
|
||
const to = line.from + (end ? endIndex + endLength : lineTextLength);
|
||
if (to > from)
|
||
decorations2.push(import_view.Decoration.mark({ class: classToUse }).range(from, to));
|
||
}
|
||
startIndex = start ? caseInsensitiveLineText.indexOf(start, startIndex + 1) : -1;
|
||
}
|
||
} else if (word === "") {
|
||
const classToUse = customClass ? `codeblock-customizer-highlighted-text-${customClass}` : "codeblock-customizer-highlighted-text";
|
||
const match = line.text.match(/\S/);
|
||
const pos = match ? match.index : -1;
|
||
if (pos !== void 0 && pos !== -1 && line.to > line.from + pos)
|
||
decorations2.push(import_view.Decoration.mark({ class: classToUse }).range(line.from + pos, line.to));
|
||
} else {
|
||
const occurrences = findAllOccurrences(caseInsensitiveLineText, word);
|
||
occurrences.forEach((index2) => {
|
||
const classToUse = customClass ? `codeblock-customizer-highlighted-text-${customClass}` : "codeblock-customizer-highlighted-text";
|
||
decorations2.push(import_view.Decoration.mark({ class: classToUse }).range(line.from + index2, line.from + index2 + word.length));
|
||
});
|
||
}
|
||
}
|
||
function handleWikiLink(isCursorInside, node, startPosition, fullMatch, decorations2, sourcePath) {
|
||
const linkClass = "cm-formatting-link";
|
||
const startClass = `${linkClass} cm-formatting-link-start`;
|
||
const endClass = `${linkClass} cm-formatting-link-end`;
|
||
const startPosSquareBrackets = fullMatch.indexOf("[[");
|
||
const endPosSquareBrackets = fullMatch.lastIndexOf("]]");
|
||
if (!isCursorInside) {
|
||
decorations2.push(import_view.Decoration.replace({ widget: new createLink(fullMatch, sourcePath, plugin) }).range(node.from + startPosition, node.from + startPosition + fullMatch.length));
|
||
} else {
|
||
decorations2.push(import_view.Decoration.mark({ class: startClass }).range(node.from + startPosition + startPosSquareBrackets, node.from + startPosition + startPosSquareBrackets + 2));
|
||
decorations2.push(import_view.Decoration.mark({ class: endClass }).range(node.from + startPosition + endPosSquareBrackets, node.from + startPosition + endPosSquareBrackets + 2));
|
||
if (fullMatch.length > 0)
|
||
decorations2.push(import_view.Decoration.mark({ class: "cm-hmd-internal-link" }).range(node.from + startPosition + startPosSquareBrackets + 2, node.from + startPosition + fullMatch.length - 2));
|
||
}
|
||
}
|
||
function handleMarkdownLink(isCursorInside, node, startPosition, fullMatch, decorations2, sourcePath) {
|
||
const linkClass = "cm-formatting-link";
|
||
const startPosSquareBrackets = fullMatch.indexOf("[");
|
||
const endPosSquareBrackets = fullMatch.lastIndexOf("]");
|
||
const startPosParentheses = fullMatch.indexOf("(");
|
||
const endPosParentheses = fullMatch.lastIndexOf(")");
|
||
if (!isCursorInside) {
|
||
decorations2.push(import_view.Decoration.replace({ widget: new createLink(fullMatch, sourcePath, plugin) }).range(node.from + startPosition, node.from + startPosition + fullMatch.length));
|
||
} else {
|
||
decorations2.push(import_view.Decoration.mark({ class: `cm-formatting ${linkClass} cm-link` }).range(node.from + startPosition + startPosSquareBrackets, node.from + startPosition + startPosSquareBrackets + 1));
|
||
decorations2.push(import_view.Decoration.mark({ class: `cm-link` }).range(node.from + startPosition + startPosSquareBrackets + 1, node.from + startPosition + endPosSquareBrackets));
|
||
decorations2.push(import_view.Decoration.mark({ class: `cm-formatting ${linkClass} cm-link` }).range(node.from + startPosition + endPosSquareBrackets, node.from + startPosition + endPosSquareBrackets + 1));
|
||
decorations2.push(import_view.Decoration.mark({ class: `cm-formatting ${linkClass}-string cm-string cm-url` }).range(node.from + startPosition + startPosParentheses, node.from + startPosition + startPosParentheses + 1));
|
||
decorations2.push(import_view.Decoration.mark({ class: `cm-string cm-url` }).range(node.from + startPosition + startPosParentheses, node.from + startPosition + endPosParentheses));
|
||
decorations2.push(import_view.Decoration.mark({ class: `cm-formatting ${linkClass}-string cm-string cm-url` }).range(node.from + startPosition + endPosParentheses, node.from + startPosition + endPosParentheses + 1));
|
||
}
|
||
}
|
||
function handleHTTPLink(isCursorInside, node, startPosition, fullMatch, decorations2, sourcePath) {
|
||
if (isCursorInside) {
|
||
decorations2.push(import_view.Decoration.replace({ widget: new createLink(fullMatch, sourcePath, plugin) }).range(node.from + startPosition, node.from + startPosition + fullMatch.length));
|
||
} else {
|
||
decorations2.push(import_view.Decoration.mark({ class: `cm-url` }).range(node.from + startPosition, node.from + startPosition + fullMatch.length));
|
||
}
|
||
}
|
||
function defaultFold(state) {
|
||
const builder = new import_state.RangeSetBuilder();
|
||
const addFoldDecoration = (from, to) => {
|
||
const decoration = import_view.Decoration.replace({ effect: Collapse.of(import_view.Decoration.replace({ block: true }).range(from, to)), block: true, side: -1 });
|
||
builder.add(from, to, decoration);
|
||
};
|
||
const processSemiFold = (start, end) => {
|
||
const lineCount = state.doc.lineAt(end.to).number - state.doc.lineAt(start.from).number + 1;
|
||
if (lineCount >= settings.SelectedTheme.settings.semiFold.visibleLines + fadeOutLineCount + 2) {
|
||
const ranges = getRanges(state, start.from, end.to, settings.SelectedTheme.settings.semiFold.visibleLines);
|
||
const decos = addFadeOutEffect(null, state, ranges, settings.SelectedTheme.settings.semiFold.visibleLines, null);
|
||
for (const { from, to, decoration } of decos || []) {
|
||
builder.add(from, to, decoration);
|
||
}
|
||
} else {
|
||
addFoldDecoration(start.from, end.to);
|
||
}
|
||
};
|
||
processCodeBlocks(state.doc, (start, end, lineText, fold, unfold) => {
|
||
if (fold || settings.SelectedTheme.settings.codeblock.inverseFold && !unfold) {
|
||
if (settings.SelectedTheme.settings.semiFold.enableSemiFold) {
|
||
processSemiFold(start, end);
|
||
} else {
|
||
addFoldDecoration(start.from, end.to);
|
||
}
|
||
}
|
||
});
|
||
return builder.finish();
|
||
}
|
||
function addFadeOutEffect(element3, state, ranges, visibleLines, view = null) {
|
||
const decorations2 = [];
|
||
const fadeOutLines = [];
|
||
const transactions = [];
|
||
const semiFoldClass = import_view.Decoration.line({ attributes: { class: `semi-folded` } });
|
||
if (view === null) {
|
||
decorations2.push({ from: ranges.firstLine.from, to: ranges.firstLine.from, decoration: semiFoldClass });
|
||
} else {
|
||
transactions.push(semiFade.of(semiFoldClass.range(ranges.firstLine.from, ranges.firstLine.from)));
|
||
}
|
||
for (let i = 0; i < fadeOutLineCount; i++) {
|
||
fadeOutLines.push(state.doc.line(state.doc.lineAt(ranges.fadeOutStart.from).number + i));
|
||
}
|
||
fadeOutLines.forEach((line, i) => {
|
||
const fadeOutDecoration = import_view.Decoration.line({ attributes: { class: `codeblock-customizer-fade-out-line${i}` } });
|
||
if (view === null) {
|
||
decorations2.push({ from: line.from, to: line.from, decoration: fadeOutDecoration });
|
||
} else {
|
||
transactions.push(semiFade.of(fadeOutDecoration.range(line.from, line.from)));
|
||
}
|
||
if (i === fadeOutLineCount - 1) {
|
||
const uncollapseWidget = import_view.Decoration.widget({ widget: new uncollapseCodeWidget(visibleLines) });
|
||
if (view === null) {
|
||
decorations2.push({ from: line.from, to: line.from, decoration: uncollapseWidget });
|
||
} else {
|
||
transactions.push(semiFade.of(uncollapseWidget.range(line.from, line.from)));
|
||
}
|
||
}
|
||
});
|
||
const collapseIcon = element3 == null ? void 0 : element3.querySelector(".codeblock-customizer-header-collapse");
|
||
if (collapseIcon)
|
||
(0, import_obsidian4.setIcon)(collapseIcon, "chevrons-down-up");
|
||
const collapseDecoration = import_view.Decoration.replace({ block: true });
|
||
if (view === null) {
|
||
decorations2.push({ from: ranges.replaceStart.from, to: ranges.replaceEnd.to, decoration: collapseDecoration });
|
||
return decorations2;
|
||
} else {
|
||
transactions.push(semiCollapse.of(collapseDecoration.range(ranges.replaceStart.from, ranges.replaceEnd.to)));
|
||
view.dispatch({ effects: transactions });
|
||
view.requestMeasure();
|
||
}
|
||
}
|
||
function handleClick2(view, target, pos) {
|
||
if (settings.SelectedTheme.settings.semiFold.enableSemiFold) {
|
||
const lineCount = view.state.doc.lineAt(pos.codeBlockEndPos).number - view.state.doc.lineAt(pos.codeBlockStartPos).number + 1;
|
||
if (lineCount >= settings.SelectedTheme.settings.semiFold.visibleLines + fadeOutLineCount + 2) {
|
||
const ranges = getRanges(view.state, pos.codeBlockStartPos, pos.codeBlockEndPos, settings.SelectedTheme.settings.semiFold.visibleLines);
|
||
const isFolded = isHeaderFolded(target, view, settings.SelectedTheme.settings.semiFold.visibleLines);
|
||
if (isFolded) {
|
||
removeFadeOutEffect(target, view, ranges);
|
||
} else {
|
||
addFadeOutEffect(target, view.state, ranges, settings.SelectedTheme.settings.semiFold.visibleLines, view);
|
||
}
|
||
} else {
|
||
toggleCollapseCodeBlock(target, view, pos);
|
||
}
|
||
} else {
|
||
toggleCollapseCodeBlock(target, view, pos);
|
||
}
|
||
}
|
||
function isHeaderFolded(element3, view, visibleLines = -1) {
|
||
const Pos = view.posAtDOM(element3);
|
||
let domPos = Pos;
|
||
if (visibleLines !== -1) {
|
||
const lineNumber = view.state.doc.lineAt(Pos).number;
|
||
const targetLine = lineNumber + visibleLines + fadeOutLineCount;
|
||
if (view.state.doc.lines >= targetLine)
|
||
domPos = view.state.doc.line(targetLine).from;
|
||
}
|
||
return hasHeaderEffect(view, domPos, domPos);
|
||
}
|
||
function hasHeaderEffect(view, startPos, endPos) {
|
||
const effect = view.state.field(collapseField, false);
|
||
let hasEffect = false;
|
||
effect == null ? void 0 : effect.between(startPos, endPos, () => {
|
||
hasEffect = true;
|
||
});
|
||
return hasEffect;
|
||
}
|
||
function removeFadeOutEffect(headerElement, view, ranges) {
|
||
view.dispatch({ effects: semiUnCollapse.of({ filter: (from, to) => to <= ranges.replaceStart.from || from >= ranges.replaceEnd.to, filterFrom: ranges.replaceStart.from, filterTo: ranges.replaceEnd.to }) });
|
||
view.dispatch({ effects: semiUnFade.of({ filter: (from, to) => to <= ranges.fadeOutStart.from - 1 || from >= ranges.replaceEnd.to, filterFrom: ranges.fadeOutStart.from - 1, filterTo: ranges.replaceEnd.to }) });
|
||
view.dispatch({ effects: semiUnFade.of({ filter: (from, to) => to <= ranges.firstLine.from - 1 || from >= ranges.replaceEnd.to, filterFrom: ranges.firstLine.from - 1, filterTo: ranges.replaceEnd.to }) });
|
||
view.requestMeasure();
|
||
const collapseIcon = headerElement.querySelector(".codeblock-customizer-header-collapse");
|
||
if (collapseIcon)
|
||
(0, import_obsidian4.setIcon)(collapseIcon, "chevrons-up-down");
|
||
}
|
||
function toggleCollapseCodeBlock(target, view, pos) {
|
||
const collapseIcon = target.querySelector(".codeblock-customizer-header-collapse");
|
||
const isFolded = isHeaderFolded(target, view);
|
||
if (isFolded) {
|
||
view.dispatch({ effects: UnCollapse.of({ filter: (from, to) => to <= pos.codeBlockStartPos || from >= pos.codeBlockEndPos, filterFrom: pos.codeBlockStartPos, filterTo: pos.codeBlockEndPos }) });
|
||
if (collapseIcon)
|
||
(0, import_obsidian4.setIcon)(collapseIcon, "chevrons-up-down");
|
||
} else {
|
||
view.dispatch({ effects: Collapse.of(import_view.Decoration.replace({ block: true }).range(pos.codeBlockStartPos, pos.codeBlockEndPos)) });
|
||
if (collapseIcon)
|
||
(0, import_obsidian4.setIcon)(collapseIcon, "chevrons-down-up");
|
||
}
|
||
view.requestMeasure();
|
||
}
|
||
function areObjectsEqual(obj1, obj2) {
|
||
if (obj1 === null && obj2 === null) {
|
||
return true;
|
||
}
|
||
if (obj1 === null || obj1 === void 0 || (obj2 === null || obj2 === void 0)) {
|
||
return false;
|
||
}
|
||
const keys1 = Object.keys(obj1);
|
||
const keys2 = Object.keys(obj2);
|
||
if (keys1.length !== keys2.length) {
|
||
return false;
|
||
}
|
||
for (const key2 of keys1) {
|
||
if (obj1[key2] !== obj2[key2]) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function getCodeblockByHTMLTarget(view, target) {
|
||
let codeBlockStartPos = null;
|
||
let codeBlockEndPos = null;
|
||
if (!target) {
|
||
return { codeBlockStartPos, codeBlockEndPos };
|
||
}
|
||
const pos = view.posAtDOM(target);
|
||
const line = view.state.doc.lineAt(pos);
|
||
let startBacktickCount = 0;
|
||
for (let i = line.number; i >= 1; i--) {
|
||
const prevLine = view.state.doc.line(i);
|
||
const backtickCount = getBacktickCount(prevLine.text);
|
||
if (backtickCount > 0) {
|
||
codeBlockStartPos = prevLine;
|
||
startBacktickCount = backtickCount;
|
||
break;
|
||
}
|
||
}
|
||
if (codeBlockStartPos) {
|
||
for (let i = line.number + 1; i <= view.state.doc.lines; i++) {
|
||
const nextLine = view.state.doc.line(i);
|
||
const backtickCount = getBacktickCount(nextLine.text);
|
||
if (backtickCount === startBacktickCount) {
|
||
codeBlockEndPos = nextLine;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
return { codeBlockStartPos, codeBlockEndPos };
|
||
}
|
||
function getRanges(state, codeBlockStartPos, codeBlockEndPos, visibleLines) {
|
||
const firstLine = state.doc.lineAt(codeBlockStartPos);
|
||
const fadeOutStart = state.doc.line(state.doc.lineAt(codeBlockStartPos).number + visibleLines + 1);
|
||
const fadeOutEnd = state.doc.line(state.doc.lineAt(fadeOutStart.from).number + fadeOutLineCount - 1);
|
||
const replaceStart = state.doc.line(state.doc.lineAt(fadeOutEnd.from).number + 1);
|
||
const replaceEnd = state.doc.line(state.doc.lineAt(codeBlockEndPos).number);
|
||
return { replaceStart, replaceEnd, fadeOutStart, fadeOutEnd, firstLine };
|
||
}
|
||
function processCodeBlocks(doc, callback) {
|
||
let CollapseStart = null;
|
||
let CollapseEnd = null;
|
||
let blockFound = false;
|
||
let bExclude = false;
|
||
let isDefaultFold = false;
|
||
let isDefaultUnFold = false;
|
||
let inCodeBlock = false;
|
||
let openingBackticks = 0;
|
||
for (let i = 1; i <= doc.lines; i++) {
|
||
const lineText = doc.line(i).text.toString().trim();
|
||
const line = doc.line(i);
|
||
bExclude = isExcluded(lineText, settings.ExcludeLangs);
|
||
const backtickMatch = lineText.match(/^`+(?!.*`)/);
|
||
if (backtickMatch) {
|
||
if (!inCodeBlock) {
|
||
inCodeBlock = true;
|
||
openingBackticks = backtickMatch[0].length;
|
||
if (bExclude)
|
||
continue;
|
||
if (CollapseStart === null) {
|
||
isDefaultFold = isFoldDefined(lineText);
|
||
isDefaultUnFold = isUnFoldDefined(lineText);
|
||
CollapseStart = line;
|
||
}
|
||
} else {
|
||
if (backtickMatch[0].length === openingBackticks) {
|
||
inCodeBlock = false;
|
||
openingBackticks = 0;
|
||
blockFound = true;
|
||
CollapseEnd = line;
|
||
} else {
|
||
}
|
||
}
|
||
} else if (inCodeBlock) {
|
||
} else {
|
||
}
|
||
if (blockFound) {
|
||
if (CollapseStart != null && CollapseEnd != null) {
|
||
callback(CollapseStart, CollapseEnd, lineText, isDefaultFold, isDefaultUnFold);
|
||
CollapseStart = null;
|
||
CollapseEnd = null;
|
||
isDefaultFold = false;
|
||
isDefaultUnFold = false;
|
||
}
|
||
blockFound = false;
|
||
}
|
||
}
|
||
}
|
||
function foldAll(view, settings2, fold, defaultState) {
|
||
const { enableSemiFold, visibleLines } = settings2.SelectedTheme.settings.semiFold;
|
||
const changes = [];
|
||
processCodeBlocks(view.state.doc, (start, end, lineText, isDefaultFold, isDefaultUnFold) => {
|
||
if (this.disableFoldUnlessSpecified && !this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !this.parameters.fold || this.disableFoldUnlessSpecified && this.plugin.settings.SelectedTheme.settings.codeblock.inverseFold && !this.parameters.unfold) {
|
||
return;
|
||
}
|
||
const lineCount = view.state.doc.lineAt(end.to).number - view.state.doc.lineAt(start.from).number + 1;
|
||
if (fold || settings2.SelectedTheme.settings.codeblock.inverseFold && !isDefaultUnFold) {
|
||
if (enableSemiFold && lineCount >= visibleLines + fadeOutLineCount + 2) {
|
||
const ranges = getRanges(view.state, start.from, end.to, settings2.SelectedTheme.settings.semiFold.visibleLines);
|
||
const Pos = view.domAtPos(start.from);
|
||
let headerElement = null;
|
||
if (Pos) {
|
||
headerElement = Pos.node.previousElementSibling;
|
||
}
|
||
addFadeOutEffect(headerElement, view.state, ranges, settings2.SelectedTheme.settings.semiFold.visibleLines, view);
|
||
} else {
|
||
changes.push(Collapse.of(import_view.Decoration.replace({ block: true }).range(start.from, end.to)));
|
||
}
|
||
} else {
|
||
if (!isDefaultFold || !defaultState) {
|
||
if (enableSemiFold)
|
||
clearFadeEffect(view, start.from, end.to);
|
||
changes.push(UnCollapse.of({ filter: (from, to) => to <= start.from || from >= end.to, filterFrom: start.from, filterTo: end.to }));
|
||
}
|
||
}
|
||
});
|
||
if (changes.length > 0) {
|
||
view.dispatch({ effects: changes });
|
||
view.requestMeasure();
|
||
}
|
||
}
|
||
function clearFadeEffect(view, CollapseStart, CollapseEnd) {
|
||
const hasFadeEffect = hasHeaderEffect(view, CollapseStart, CollapseEnd);
|
||
if (hasFadeEffect) {
|
||
view.dispatch({ effects: semiUnFade.of({ filter: (from, to) => to <= CollapseStart || from >= CollapseEnd, filterFrom: CollapseStart, filterTo: CollapseEnd }) });
|
||
view.requestMeasure();
|
||
}
|
||
}
|
||
const extensions2 = [
|
||
codeBlockPositions,
|
||
decorations,
|
||
collapseField
|
||
/*, viewportChangedListener*/
|
||
];
|
||
const result = {
|
||
extensions: extensions2,
|
||
foldAll,
|
||
customBracketMatching,
|
||
selectionMatching
|
||
};
|
||
return result;
|
||
}
|
||
|
||
// src/main.ts
|
||
var CodeBlockCustomizerPlugin = class extends import_obsidian5.Plugin {
|
||
async onload() {
|
||
document.body.classList.add("codeblock-customizer");
|
||
await this.loadSettings();
|
||
updateSettingStyles(this.settings, this.app);
|
||
this.extensions = [];
|
||
this.customLanguageConfig = null;
|
||
this.addCommand({
|
||
id: "codeblock-customizer-foldall-editor",
|
||
name: "Fold all code blocks",
|
||
callback: () => {
|
||
const markdownView = this.app.workspace.getActiveViewOfType(import_obsidian5.MarkdownView);
|
||
if (markdownView) {
|
||
const mode = markdownView.currentMode.type;
|
||
document.body.classList.add("codeblock-customizer-header-collapse-command");
|
||
this.settings.foldAllCommand = true;
|
||
if (mode === "source") {
|
||
this.editorExtensions.foldAll(markdownView.editor.cm, this.settings, true, false);
|
||
foldAllReadingView(true, this.settings);
|
||
} else if (mode === "preview") {
|
||
foldAllReadingView(true, this.settings);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
this.addCommand({
|
||
id: "codeblock-customizer-unfoldall-editor",
|
||
name: "Unfold all code blocks",
|
||
callback: () => {
|
||
const markdownView = this.app.workspace.getActiveViewOfType(import_obsidian5.MarkdownView);
|
||
if (markdownView) {
|
||
const mode = markdownView.currentMode.type;
|
||
document.body.classList.add("codeblock-customizer-header-collapse-command");
|
||
this.settings.foldAllCommand = true;
|
||
if (mode === "source") {
|
||
this.editorExtensions.foldAll(markdownView.editor.cm, this.settings, false, false);
|
||
foldAllReadingView(false, this.settings);
|
||
} else if (mode === "preview") {
|
||
foldAllReadingView(false, this.settings);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
this.addCommand({
|
||
id: "codeblock-customizer-restore-fold-editor",
|
||
name: "Restore folding state of all code blocks to default",
|
||
callback: () => {
|
||
const markdownView = this.app.workspace.getActiveViewOfType(import_obsidian5.MarkdownView);
|
||
if (markdownView) {
|
||
const mode = markdownView.currentMode.type;
|
||
document.body.classList.remove("codeblock-customizer-header-collapse-command");
|
||
this.settings.foldAllCommand = false;
|
||
if (mode === "source") {
|
||
this.editorExtensions.foldAll(markdownView.editor.cm, this.settings, true, false);
|
||
this.editorExtensions.foldAll(markdownView.editor.cm, this.settings, false, true);
|
||
foldAllReadingView(false, this.settings);
|
||
this.restoreDefaultFold();
|
||
} else if (mode === "preview") {
|
||
foldAllReadingView(false, this.settings);
|
||
this.restoreDefaultFold();
|
||
}
|
||
}
|
||
}
|
||
});
|
||
this.addCommand({
|
||
id: "codeblock-customizer-indent-codeblock",
|
||
name: "Indent code block by one level",
|
||
editorCallback: async (editor, view) => {
|
||
indentCodeBlock(editor, view);
|
||
}
|
||
});
|
||
this.addCommand({
|
||
id: "codeblock-customizer-unindent-codeblock",
|
||
name: "Unindent code block by one level",
|
||
editorCallback: async (editor, view) => {
|
||
unIndentCodeBlock(editor, view);
|
||
}
|
||
});
|
||
await loadIcons(this);
|
||
loadSyntaxHighlightForCustomLanguages(this);
|
||
mergeBorderColorsToLanguageSpecificColors(this, this.settings);
|
||
this.editorExtensions = extensions(this, this.settings);
|
||
this.registerEditorExtension(this.editorExtensions.extensions);
|
||
if (this.settings.SelectedTheme.settings.codeblock.enableBracketHighlight) {
|
||
this.extensions.push(this.editorExtensions.customBracketMatching);
|
||
}
|
||
if (this.settings.SelectedTheme.settings.codeblock.enableSelectionMatching) {
|
||
this.extensions.push(this.editorExtensions.selectionMatching);
|
||
}
|
||
this.registerEditorExtension(this.extensions);
|
||
const settingsTab = new SettingsTab(this.app, this);
|
||
this.addSettingTab(settingsTab);
|
||
if (this.settings.ThemeName == "") {
|
||
this.updateTheme(settingsTab);
|
||
} else {
|
||
updateSettingStyles(this.settings, this.app);
|
||
}
|
||
this.registerEvent(this.app.workspace.on("css-change", this.handleCssChange.bind(this, settingsTab), this));
|
||
this.registerEvent(this.app.vault.on("rename", (file, oldPath) => {
|
||
if (this.settings.SelectedTheme.settings.codeblock.enableLinks && this.settings.SelectedTheme.settings.codeblock.enableLinkUpdate) {
|
||
this.handleFileRename(file, oldPath);
|
||
}
|
||
}, this));
|
||
this.registerMarkdownPostProcessor(async (el, ctx) => {
|
||
await ReadingView(el, ctx, this);
|
||
});
|
||
this.registerMarkdownPostProcessor(async (el, ctx) => {
|
||
await calloutPostProcessor(el, ctx, this);
|
||
});
|
||
this.app.workspace.onLayoutReady(() => {
|
||
this.renderReadingViewOnStart();
|
||
});
|
||
console.log("loading CodeBlock Customizer plugin");
|
||
}
|
||
// onload
|
||
handleCssChange(settingsTab) {
|
||
this.updateTheme(settingsTab);
|
||
}
|
||
// handleCssChange
|
||
updateTheme(settingsTab) {
|
||
settingsTab.applyTheme();
|
||
this.saveSettings();
|
||
}
|
||
// updateTheme
|
||
onunload() {
|
||
console.log("unloading CodeBlock Customizer plugin");
|
||
for (const url of Object.values(BLOBS)) {
|
||
URL.revokeObjectURL(url);
|
||
}
|
||
loadSyntaxHighlightForCustomLanguages(this, true);
|
||
}
|
||
// onunload
|
||
async handleFileRename(file, oldPath) {
|
||
const markdownFiles = this.app.vault.getMarkdownFiles();
|
||
let linkUpdateCount = 0;
|
||
let fileCount = 0;
|
||
for (const mdFile of markdownFiles) {
|
||
let linkUpdate = 0;
|
||
const { cache, fileContentLines } = await getFileCacheAndContentLines(this, mdFile.path);
|
||
if (!cache || !fileContentLines)
|
||
continue;
|
||
if (cache == null ? void 0 : cache.sections) {
|
||
const codeBlocks = [];
|
||
for (const sections of cache.sections) {
|
||
if (sections.type === "code") {
|
||
const codeBlockLines = fileContentLines.slice(sections.position.start.line, sections.position.end.line + 1);
|
||
const codeBlockText = codeBlockLines.join("\n");
|
||
codeBlocks.push({ codeBlockText, from: sections.position.start.line, to: sections.position.end.line });
|
||
}
|
||
}
|
||
for (const codeBlock of codeBlocks) {
|
||
const ret = this.findAllCodeBlockLinks(mdFile, codeBlock, oldPath, file);
|
||
linkUpdateCount += ret;
|
||
if (ret > 0) {
|
||
linkUpdate++;
|
||
}
|
||
}
|
||
}
|
||
if (linkUpdate > 0) {
|
||
fileCount++;
|
||
}
|
||
}
|
||
if (linkUpdateCount > 0) {
|
||
new import_obsidian5.Notice(`Updated ${linkUpdateCount} code block links in ${fileCount} files.`);
|
||
}
|
||
}
|
||
// handleFileRename
|
||
findAllCodeBlockLinks(currentFile, currentCodeBlock, oldPath, newPath) {
|
||
const linkRegex = /\[\[(.*?)\]\]/g;
|
||
const matches = currentCodeBlock.codeBlockText.matchAll(linkRegex);
|
||
let modifiedCodeBlockText = currentCodeBlock.codeBlockText;
|
||
let linkUpdateCount = 0;
|
||
if (!matches) {
|
||
return 0;
|
||
}
|
||
for (const match of matches) {
|
||
const { updatedCodeBlockText: updatedText, updated } = this.updateCodeBlockContent(match, currentFile, oldPath, newPath, modifiedCodeBlockText);
|
||
modifiedCodeBlockText = updatedText;
|
||
if (updated) {
|
||
linkUpdateCount++;
|
||
}
|
||
}
|
||
if (modifiedCodeBlockText !== currentCodeBlock.codeBlockText) {
|
||
this.updateLinksInFiles(this.app.vault, currentFile, currentCodeBlock.from, currentCodeBlock.to, modifiedCodeBlockText.split("\n"));
|
||
}
|
||
return linkUpdateCount;
|
||
}
|
||
// findAllCodeBlockLinks
|
||
updateCodeBlockContent(match, currentFile, oldPath, newPath, updatedCodeBlockText) {
|
||
const linkText = match[1];
|
||
const displayNameRef = this.getDisplayNameAndReference(linkText);
|
||
const linkTextWithoutDisplayName = linkText.split("|")[0].split("#")[0];
|
||
const oldPathWithoutExtension = oldPath.replace(/\.[^.]*$/, "");
|
||
const oldPathWithoutDir = oldPath.split("/").slice(-1)[0];
|
||
const oldPathWithoutExtensionAndDir = oldPathWithoutDir.replace(/\.[^.]*$/, "");
|
||
const linkPath = this.app.metadataCache.getFirstLinkpathDest((0, import_obsidian5.getLinkpath)(linkTextWithoutDisplayName), currentFile.path);
|
||
const newExtension = "." + newPath.extension;
|
||
const displayNameAndRef = displayNameRef.reference + displayNameRef.displayName;
|
||
let updated = false;
|
||
if (linkTextWithoutDisplayName.contains("/") && linkTextWithoutDisplayName.contains(newExtension) && linkTextWithoutDisplayName.toLowerCase() === oldPath.toLowerCase()) {
|
||
if (!linkPath) {
|
||
updatedCodeBlockText = updatedCodeBlockText.replace(match[0], "[[" + newPath.path + displayNameAndRef + "]]");
|
||
updated = true;
|
||
}
|
||
} else if (!linkTextWithoutDisplayName.contains("/") && linkTextWithoutDisplayName.contains(newExtension) && linkTextWithoutDisplayName.toLowerCase() === oldPathWithoutDir.toLowerCase()) {
|
||
if (!linkPath) {
|
||
updatedCodeBlockText = updatedCodeBlockText.replace(match[0], "[[" + newPath.path + displayNameAndRef + "]]");
|
||
updated = true;
|
||
}
|
||
} else if (linkTextWithoutDisplayName.contains("/") && !linkTextWithoutDisplayName.contains(newExtension) && oldPathWithoutExtension.length > 0 && linkTextWithoutDisplayName.toLowerCase() === oldPathWithoutExtension.toLowerCase()) {
|
||
if (!linkPath) {
|
||
updatedCodeBlockText = updatedCodeBlockText.replace(match[0], "[[" + newPath.path.replace(/\.[^.]*$/, "") + displayNameAndRef + "]]");
|
||
updated = true;
|
||
}
|
||
} else if (!linkTextWithoutDisplayName.contains("/") && !linkTextWithoutDisplayName.contains(newExtension) && oldPathWithoutExtensionAndDir.length > 0 && linkTextWithoutDisplayName.toLowerCase() === oldPathWithoutExtensionAndDir.toLowerCase()) {
|
||
if (!linkPath) {
|
||
updatedCodeBlockText = updatedCodeBlockText.replace(match[0], "[[" + newPath.path.replace(/\.[^.]*$/, "") + displayNameAndRef + "]]");
|
||
updated = true;
|
||
}
|
||
}
|
||
return { updatedCodeBlockText, updated };
|
||
}
|
||
// updateCodeBlockContent
|
||
async updateLinksInFiles(vault, file, startLine, endLine, newContent) {
|
||
try {
|
||
await vault.process(file, (currentContent) => {
|
||
const lines = currentContent.split("\n");
|
||
for (let i = startLine; i <= endLine; i++) {
|
||
const index2 = i - startLine;
|
||
lines[i] = newContent[index2];
|
||
}
|
||
const modifiedContent = lines.join("\n");
|
||
return modifiedContent;
|
||
});
|
||
} catch (error) {
|
||
console.error("Error modifying file:", error);
|
||
throw error;
|
||
}
|
||
}
|
||
// updateLinksInFiles
|
||
getDisplayNameAndReference(input) {
|
||
const displayNameMarker = "|";
|
||
const referenceMarker = "#";
|
||
const displayNameIndex = input.lastIndexOf(displayNameMarker);
|
||
const referenceIndex = input.indexOf(referenceMarker);
|
||
const result = {
|
||
displayName: "",
|
||
reference: ""
|
||
};
|
||
if (displayNameIndex !== -1) {
|
||
result.displayName = input.substring(displayNameIndex);
|
||
}
|
||
if (referenceIndex !== -1) {
|
||
result.reference = input.substring(referenceIndex, displayNameIndex !== -1 ? displayNameIndex : void 0);
|
||
}
|
||
return result;
|
||
}
|
||
// getDisplayNameAndReference
|
||
async loadSettings() {
|
||
const loadedData = await this.loadData();
|
||
this.settings = _.merge({}, DEFAULT_SETTINGS, loadedData);
|
||
const defaultThemeNames = Object.keys(DEFAULT_SETTINGS.Themes);
|
||
const currentThemeNames = Object.keys(this.settings.Themes);
|
||
const userThemeNames = _.difference(currentThemeNames, defaultThemeNames);
|
||
const inUseThemeBaseName = this.settings.Themes[this.settings.ThemeName].baseTheme;
|
||
if (inUseThemeBaseName === void 0) {
|
||
delete this.settings.SelectedTheme.baseTheme;
|
||
}
|
||
userThemeNames.forEach((themeName) => {
|
||
const userTheme = this.settings.Themes[themeName];
|
||
const baseThemeName = userTheme.baseTheme;
|
||
if (baseThemeName) {
|
||
const baseTheme = this.settings.Themes[baseThemeName];
|
||
if (baseTheme) {
|
||
userTheme.colors = _.merge({}, baseTheme.colors, userTheme.colors);
|
||
userTheme.settings = _.merge({}, baseTheme.settings, userTheme.settings);
|
||
}
|
||
} else {
|
||
const defaultObsidianSettings = this.settings.Themes["Obsidian"];
|
||
userTheme.colors = _.merge({}, defaultObsidianSettings.colors, userTheme.colors);
|
||
userTheme.settings = _.merge({}, defaultObsidianSettings.settings, userTheme.settings);
|
||
}
|
||
});
|
||
this.saveSettings();
|
||
}
|
||
// loadSettings
|
||
async saveSettings() {
|
||
await this.saveData(this.settings);
|
||
this.app.workspace.updateOptions();
|
||
updateSettingStyles(this.settings, this.app);
|
||
}
|
||
// saveSettings
|
||
restoreDefaultFold() {
|
||
const preElements = document.querySelectorAll(".codeblock-customizer-pre.codeblock-customizer-codeblock-default-collapse");
|
||
preElements.forEach((preElement) => {
|
||
let lines = [];
|
||
const codeElements = preElement == null ? void 0 : preElement.getElementsByTagName("CODE");
|
||
lines = convertHTMLCollectionToArray(codeElements);
|
||
toggleFoldClasses(preElement, lines.length, true, this.settings.SelectedTheme.settings.semiFold.enableSemiFold, this.settings.SelectedTheme.settings.semiFold.visibleLines);
|
||
});
|
||
}
|
||
// restoreDefaultFold
|
||
async renderReadingViewOnStart() {
|
||
this.app.workspace.iterateRootLeaves((currentLeaf) => {
|
||
if (currentLeaf.view instanceof import_obsidian5.MarkdownView) {
|
||
const leafMode = currentLeaf.view.getMode();
|
||
if (leafMode === "preview") {
|
||
currentLeaf.view.previewMode.rerender(true);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
// renderReadingView
|
||
};
|
||
/*! Bundled license information:
|
||
|
||
lodash/lodash.js:
|
||
(**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*)
|
||
|
||
@simonwep/pickr/dist/pickr.min.js:
|
||
(*! Pickr 1.9.1 MIT | https://github.com/Simonwep/pickr *)
|
||
*/
|
||
|
||
|
||
/* nosourcemap */ |