From d0580850377c9d377136e17e6aafd7d1610d8582 Mon Sep 17 00:00:00 2001 From: Jonas Dujava Date: Sat, 20 Apr 2024 14:11:15 +0200 Subject: [PATCH] After `npm run build` Signed-off-by: Jonas Dujava --- bibtex-tidy.js | 157 +- bin/bibtex-tidy | 4 +- docs/bundle.css | 2 +- docs/bundle.js | 23692 ++++++++++++++++++++++------------------------ 4 files changed, 11638 insertions(+), 12217 deletions(-) diff --git a/bibtex-tidy.js b/bibtex-tidy.js index c53e246..b84ff18 100644 --- a/bibtex-tidy.js +++ b/bibtex-tidy.js @@ -85,7 +85,7 @@ function _object_spread(target) { ownKeys = ownKeys.concat( Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }), + }) ); } ownKeys.forEach(function (key) { @@ -148,7 +148,9 @@ var RootNode = this.type = "root"; } }), - __name(_class, "RootNode"), + (() => { + __name(_class, "RootNode"); + })(), _class); var TextNode = ((_class1 = class _class { @@ -159,7 +161,9 @@ var TextNode = parent.children.push(this); } }), - __name(_class1, "TextNode"), + (() => { + __name(_class1, "TextNode"); + })(), _class1); var BlockNode = ((_class2 = class _class { @@ -170,7 +174,9 @@ var BlockNode = parent.children.push(this); } }), - __name(_class2, "BlockNode"), + (() => { + __name(_class2, "BlockNode"); + })(), _class2); var CommentNode = ((_class3 = class _class { @@ -183,7 +189,9 @@ var CommentNode = parent.block = this; } }), - __name(_class3, "CommentNode"), + (() => { + __name(_class3, "CommentNode"); + })(), _class3); var PreambleNode = ((_class4 = class _class { @@ -196,7 +204,9 @@ var PreambleNode = parent.block = this; } }), - __name(_class4, "PreambleNode"), + (() => { + __name(_class4, "PreambleNode"); + })(), _class4); var StringNode = ((_class5 = class _class { @@ -209,7 +219,9 @@ var StringNode = parent.block = this; } }), - __name(_class5, "StringNode"), + (() => { + __name(_class5, "StringNode"); + })(), _class5); var EntryNode = ((_class6 = class _class { @@ -221,7 +233,9 @@ var EntryNode = this.fields = []; } }), - __name(_class6, "EntryNode"), + (() => { + __name(_class6, "EntryNode"); + })(), _class6); var FieldNode = ((_class7 = class _class { @@ -233,7 +247,9 @@ var FieldNode = this.value = new ConcatNode(this); } }), - __name(_class7, "FieldNode"), + (() => { + __name(_class7, "FieldNode"); + })(), _class7); var ConcatNode = ((_class8 = class _class { @@ -244,7 +260,9 @@ var ConcatNode = this.concat = []; } }), - __name(_class8, "ConcatNode"), + (() => { + __name(_class8, "ConcatNode"); + })(), _class8); var LiteralNode = ((_class9 = class _class { @@ -255,7 +273,9 @@ var LiteralNode = parent.concat.push(this); } }), - __name(_class9, "LiteralNode"), + (() => { + __name(_class9, "LiteralNode"); + })(), _class9); var BracedNode = ((_class10 = class _class { @@ -267,7 +287,9 @@ var BracedNode = parent.concat.push(this); } }), - __name(_class10, "BracedNode"), + (() => { + __name(_class10, "BracedNode"); + })(), _class10); var QuotedNode = ((_class11 = class _class { @@ -279,7 +301,9 @@ var QuotedNode = parent.concat.push(this); } }), - __name(_class11, "QuotedNode"), + (() => { + __name(_class11, "QuotedNode"); + })(), _class11); function generateAST(input) { var rootNode = new RootNode(); @@ -311,8 +335,9 @@ function generateAST(input) { } case "block": { if (char === "@") { + var _prevNode; var prevNode = node.parent.children[node.parent.children.length - 2]; - if ((prevNode === null || prevNode === void 0 ? void 0 : prevNode.type) === "text") { + if (((_prevNode = prevNode) === null || _prevNode === void 0 ? void 0 : _prevNode.type) === "text") { prevNode.text += "@" + node.command; } else { node.parent.children.pop(); @@ -518,7 +543,9 @@ var BibTeXSyntaxError = this.char = (_input_pos = input[pos]) !== null && _input_pos !== void 0 ? _input_pos : ""; } }), - __name(_class12, "BibTeXSyntaxError"), + (() => { + __name(_class12, "BibTeXSyntaxError"); + })(), _class12); // src/parseAuthors.ts function parseAuthors(authors, sanitize) { @@ -562,7 +589,9 @@ var BlockNode2 = } } }), - __name(__BlockNode, "BlockNode"), + (() => { + __name(__BlockNode, "BlockNode"); + })(), __BlockNode); var TextNode2 = ((_class13 = class _class { @@ -574,7 +603,9 @@ var TextNode2 = parent.children.push(this); } }), - __name(_class13, "TextNode"), + (() => { + __name(_class13, "TextNode"); + })(), _class13); var CommandNode = ((_class14 = class _class { @@ -588,7 +619,9 @@ var CommandNode = parent.children.push(this); } }), - __name(_class14, "CommandNode"), + (() => { + __name(_class14, "CommandNode"); + })(), _class14); function parseLaTeX(input) { var rootNode = new BlockNode2("root"); @@ -3035,7 +3068,7 @@ var specialCharacters = /* @__PURE__ */ new Map([ // src/utils.ts function escapeSpecialCharacters(str) { var mathExpressions = []; - str = str.replace(/\$[^$]+\$/, (match) => { + str = str.replace(/\$[^\$]+\$/g, (match) => { mathExpressions.push(match); return "MATH.EXP.".concat(mathExpressions.length - 1); }); @@ -3056,10 +3089,8 @@ function escapeSpecialCharacters(str) { var _specialCharacters_get; newstr += (_specialCharacters_get = specialCharacters.get(c)) !== null && _specialCharacters_get !== void 0 ? _specialCharacters_get : str[i]; } - return newstr.replace(/MATH\.EXP\.(\d+)/, (_, i) => { - var _mathExpressions_Number; - return (_mathExpressions_Number = mathExpressions[Number(i)]) !== null && _mathExpressions_Number !== void 0 ? _mathExpressions_Number : ""; - }); + var _mathExpressions_Number; + return newstr.replace(/MATH\.EXP\.(\d+)/g, (_, i) => ((_mathExpressions_Number = mathExpressions[Number(i)]) !== null && _mathExpressions_Number !== void 0 ? _mathExpressions_Number : "")); } __name(escapeSpecialCharacters, "escapeSpecialCharacters"); function titleCase(str) { @@ -3424,7 +3455,8 @@ function formatNode(child, options, indent, omitFields, replacementKeys) { case "comment": return formatComment(child.block.raw, options); case "entry": - return formatEntry(child.command, child.block, options, indent, omitFields, replacementKeys === null || replacementKeys === void 0 ? void 0 : replacementKeys.get(child.block)) + (options.blankLines ? "\n" : ""); + var _replacementKeys_get, _this; + return formatEntry(child.command, child.block, options, indent, omitFields, (_this = replacementKeys) === null || _this === void 0 ? void 0 : (_replacementKeys_get = _this.get) === null || _replacementKeys_get === void 0 ? void 0 : _replacementKeys_get.call(_this, child.block)) + (options.blankLines ? "\n" : ""); } } __name(formatNode, "formatNode"); @@ -3592,15 +3624,18 @@ var SPECIAL_MARKERS = { auth: { description: "Last name of first authors", callback: (v) => { - var _authors_; + var _authors__lastName_replace, _this, _authors_; var _v_get; var authors = parseAuthors((_v_get = v.get("author")) !== null && _v_get !== void 0 ? _v_get : "", true); var author = (_authors_ = authors[0]) === null || _authors_ === void 0 ? void 0 - : _authors_.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", + : (_authors__lastName_replace = (_this = _authors_.lastName).replace) === null || _authors__lastName_replace === void 0 + ? void 0 + : _authors__lastName_replace.call( + _this, + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" ); return author ? [author] : []; }, @@ -3615,9 +3650,9 @@ var SPECIAL_MARKERS = { .slice(0, 2) .map((author) => author.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", - ), + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" + ) ), ...(authors.length > 2 ? ["Et", "Al"] : []), ]; @@ -3630,9 +3665,9 @@ var SPECIAL_MARKERS = { var authors = parseAuthors((_v_get = v.get("author")) !== null && _v_get !== void 0 ? _v_get : "", true); return authors.map((author) => author.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", - ), + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" + ) ); }, }, @@ -3647,9 +3682,9 @@ var SPECIAL_MARKERS = { .slice(0, n) .map((author) => author.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", - ), + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" + ) ), ...(authors.length > n ? ["Et", "Al"] : []), ]; @@ -3674,8 +3709,8 @@ var SPECIAL_MARKERS = { year: { description: "Year", callback: (v) => { - var _v_get; - var year = (_v_get = v.get("year")) === null || _v_get === void 0 ? void 0 : _v_get.replace(/[^0-9]/g, ""); + var _v_get_replace, _this; + var year = (_this = v.get("year")) === null || _this === void 0 ? void 0 : (_v_get_replace = _this.replace) === null || _v_get_replace === void 0 ? void 0 : _v_get_replace.call(_this, /[^0-9]/g, ""); return year ? [year] : []; }, }, @@ -3709,7 +3744,12 @@ var MODIFIERS = { callback: capitalize, }, }; -var MissingRequiredData = ((_class15 = class _class extends Error {}), __name(_class15, "MissingRequiredData"), _class15); +var MissingRequiredData = + ((_class15 = class _class extends Error {}), + (() => { + __name(_class15, "MissingRequiredData"); + })(), + _class15); function generateKeys(ast, valueLookup, template) { var template2 = template; if (!template.includes("[duplicateLetter]") && !template.includes("[duplicateNumber]")) { @@ -3870,7 +3910,7 @@ __name(nonFunctionWords, "nonFunctionWords"); function words(value) { return value .split( - /(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/, + /(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/ ) .filter((word) => word.length > 0); } @@ -4432,7 +4472,7 @@ function normalizeOptions(options) { return [key, def.defaultValue]; } return [key, value]; - }), + }) ); } __name(normalizeOptions, "normalizeOptions"); @@ -4471,9 +4511,9 @@ function sortEntries(ast, fieldMaps, sort) { val = item.command; break; case "month": { - var _item_block2, _fieldMaps_get; + var _item_block2, _fieldMaps_get_get, _this; if (((_item_block2 = item.block) === null || _item_block2 === void 0 ? void 0 : _item_block2.type) !== "entry") continue; - var v = (_fieldMaps_get = fieldMaps.get(item.block)) === null || _fieldMaps_get === void 0 ? void 0 : _fieldMaps_get.get(key); + var v = (_this = fieldMaps.get(item.block)) === null || _this === void 0 ? void 0 : (_fieldMaps_get_get = _this.get) === null || _fieldMaps_get_get === void 0 ? void 0 : _fieldMaps_get_get.call(_this, key); var i = v ? MONTH_MACROS.indexOf(v) : -1; val = i > -1 ? i : ""; break; @@ -4482,10 +4522,10 @@ function sortEntries(ast, fieldMaps, sort) { val = isBibLaTeXSpecialEntry(item) ? 0 : 1; break; default: - var _item_block3, _fieldMaps_get1; + var _item_block3, _fieldMaps_get_get1, _this1; if (((_item_block3 = item.block) === null || _item_block3 === void 0 ? void 0 : _item_block3.type) !== "entry") continue; - var _fieldMaps_get_get; - val = (_fieldMaps_get_get = (_fieldMaps_get1 = fieldMaps.get(item.block)) === null || _fieldMaps_get1 === void 0 ? void 0 : _fieldMaps_get1.get(key)) !== null && _fieldMaps_get_get !== void 0 ? _fieldMaps_get_get : ""; + var _fieldMaps_get_get2; + val = (_fieldMaps_get_get2 = (_this1 = fieldMaps.get(item.block)) === null || _this1 === void 0 ? void 0 : (_fieldMaps_get_get1 = _this1.get) === null || _fieldMaps_get_get1 === void 0 ? void 0 : _fieldMaps_get_get1.call(_this1, key)) !== null && _fieldMaps_get_get2 !== void 0 ? _fieldMaps_get_get2 : ""; } sortIndex.set(key, typeof val === "string" ? val.toLowerCase() : val); } @@ -4533,11 +4573,11 @@ function sortEntries(ast, fieldMaps, sort) { var desc = prefixedKey.startsWith("-"); var key = desc ? prefixedKey.slice(1) : prefixedKey; ast.children.sort((a, b) => { - var _sortIndexes_get, _sortIndexes_get1; - var _sortIndexes_get_get; - var ia = (_sortIndexes_get_get = (_sortIndexes_get = sortIndexes.get(a)) === null || _sortIndexes_get === void 0 ? void 0 : _sortIndexes_get.get(key)) !== null && _sortIndexes_get_get !== void 0 ? _sortIndexes_get_get : "￰"; - var _sortIndexes_get_get1; - var ib = (_sortIndexes_get_get1 = (_sortIndexes_get1 = sortIndexes.get(b)) === null || _sortIndexes_get1 === void 0 ? void 0 : _sortIndexes_get1.get(key)) !== null && _sortIndexes_get_get1 !== void 0 ? _sortIndexes_get_get1 : "￰"; + var _sortIndexes_get_get, _this, _sortIndexes_get_get1, _this1; + var _sortIndexes_get_get2; + var ia = (_sortIndexes_get_get2 = (_this = sortIndexes.get(a)) === null || _this === void 0 ? void 0 : (_sortIndexes_get_get = _this.get) === null || _sortIndexes_get_get === void 0 ? void 0 : _sortIndexes_get_get.call(_this, key)) !== null && _sortIndexes_get_get2 !== void 0 ? _sortIndexes_get_get2 : "￰"; + var _sortIndexes_get_get3; + var ib = (_sortIndexes_get_get3 = (_this1 = sortIndexes.get(b)) === null || _this1 === void 0 ? void 0 : (_sortIndexes_get_get1 = _this1.get) === null || _sortIndexes_get_get1 === void 0 ? void 0 : _sortIndexes_get_get1.call(_this1, key)) !== null && _sortIndexes_get_get3 !== void 0 ? _sortIndexes_get_get3 : "￰"; if (typeof ia === "number") ia = String(ia).padStart(50, "0"); if (typeof ib === "number") ib = String(ib).padStart(50, "0"); return (desc ? ib : ia).localeCompare(desc ? ia : ib); @@ -4637,17 +4677,8 @@ function getEntries(ast) { } __name(getEntries, "getEntries"); function generateValueLookup(ast, options) { - return new Map( - getEntries(ast).map((entry) => [ - entry, - new Map( - entry.fields.map((field) => { - var _formatValue; - return [field.name.toLocaleLowerCase(), (_formatValue = formatValue(field, options)) !== null && _formatValue !== void 0 ? _formatValue : ""]; - }), - ), - ]), - ); + var _formatValue; + return new Map(getEntries(ast).map((entry) => [entry, new Map(entry.fields.map((field) => [field.name.toLocaleLowerCase(), (_formatValue = formatValue(field, options)) !== null && _formatValue !== void 0 ? _formatValue : ""]))])); } __name(generateValueLookup, "generateValueLookup"); var src_default = { diff --git a/bin/bibtex-tidy b/bin/bibtex-tidy index cc33c49..0d75800 100755 --- a/bin/bibtex-tidy +++ b/bin/bibtex-tidy @@ -3053,7 +3053,7 @@ var specialCharacters = /* @__PURE__ */ new Map([ function escapeSpecialCharacters(str) { var _a; const mathExpressions = []; - str = str.replace(/\$[^$]+\$/, (match) => { + str = str.replace(/\$[^\$]+\$/g, (match) => { mathExpressions.push(match); return `MATH.EXP.${mathExpressions.length - 1}`; }); @@ -3074,7 +3074,7 @@ function escapeSpecialCharacters(str) { newstr += (_a = specialCharacters.get(c)) != null ? _a : str[i]; } return newstr.replace( - /MATH\.EXP\.(\d+)/, + /MATH\.EXP\.(\d+)/g, (_, i) => { var _a2; return (_a2 = mathExpressions[Number(i)]) != null ? _a2 : ""; diff --git a/docs/bundle.css b/docs/bundle.css index f754bfa..fec1cfb 100644 --- a/docs/bundle.css +++ b/docs/bundle.css @@ -1 +1 @@ -#copy.svelte-1ha11jr.svelte-1ha11jr{position:absolute;top:12px;right:12px;font-weight:700;font-size:15px;z-index:100;display:flex;align-items:center;justify-content:flex-start;padding:8px 8px 8px 12px;transition:width .5s ease;width:40px}#copy.svelte-1ha11jr.svelte-1ha11jr:after{content:"Copy";overflow:hidden;white-space:nowrap;text-indent:6px}#copy.svelte-1ha11jr.svelte-1ha11jr:hover{width:90px}#copy.copied.svelte-1ha11jr.svelte-1ha11jr{width:110px}#copy.copied.svelte-1ha11jr.svelte-1ha11jr:after{content:"Copied!"}#copy.svelte-1ha11jr svg.svelte-1ha11jr{fill:currentColor;width:20px;flex-shrink:0}#editor.svelte-x4zh2g{flex-grow:1;position:relative;overflow:hidden}.cm-editor{color:var(--dark-gray);height:100%}.cm-editor .cm-scroller{font:var(--mono-normal);font-size:14px;line-height:1.3em;padding:12px 0}.cm-editor .cm-gutters{background:var(--main-bg);border-right:14px solid var(--main-bg);color:var(--light6);padding-left:12px}.cm-editor .cm-activeLineGutter{background:var(--main-bg);color:var(--light1)}.cm-editor .cm-gutters .cm-gutter{min-width:32px}.cm-editor .cm-selectionBackground{background:#283655!important}.cm-editor .cm-cursor{border-left:2px solid #ffffec}.cm-editor .cm-lintRange-error{background:none;border-bottom:2px solid var(--red)}details[open].svelte-ee92zc.svelte-ee92zc{padding-bottom:20px}details.svelte-ee92zc:not([open]) summary.svelte-ee92zc{padding-bottom:20px}summary.svelte-ee92zc.svelte-ee92zc{font:var(--sans-h2);margin:0 -20px;cursor:pointer;user-select:none;padding:20px 20px 12px;border-top:1px solid var(--border-color);display:flex;gap:8px;align-items:center}summary.svelte-ee92zc.svelte-ee92zc::-webkit-details-marker{display:none}summary.svelte-ee92zc.svelte-ee92zc::marker{content:none}summary.svelte-ee92zc.svelte-ee92zc:after{content:"\25ba";font-size:8px;color:#fff9}details[open].svelte-ee92zc summary.svelte-ee92zc:after{content:none}details[open].svelte-ee92zc summary.svelte-ee92zc:hover:after{content:"\25bc"}input.svelte-doypik{appearance:none;-webkit-appearance:none;background:transparent;margin:0;border:2px solid var(--light6);border-radius:3px;width:17px;height:17px;position:relative}input.svelte-doypik:checked{border-color:var(--light-blue);background:var(--light-blue)}input.svelte-doypik:checked:before,input.svelte-doypik:checked:after{content:"";position:absolute;background:var(--main-bg);width:2px}input.svelte-doypik:checked:before{height:11px;left:7px;top:1px;transform:rotate(45deg)}input.svelte-doypik:checked:after{height:5px;left:2px;top:5px;transform:rotate(-45deg)}label.svelte-a2tm3u{padding:8px 12px;margin:12px 0;border-radius:3px;display:flex;align-items:center;gap:16px;cursor:pointer}label.svelte-a2tm3u:hover{background:var(--hover-bg);box-shadow:0 0 0 1px var(--border-color)}label.svelte-a2tm3u:first-of-type{margin-top:4px}label.svelte-a2tm3u:last-child{margin-bottom:0}.suboptions.svelte-1gkj6ol{margin:0 0 28px 45px}.suboptions.svelte-1gkj6ol:last-child{margin-bottom:0}.suboptions.svelte-1gkj6ol textarea{resize:vertical;width:100%;height:100px}.suboptions.svelte-1gkj6ol input[type=number]{display:inline-block;width:62px}textarea.omit.svelte-1t0249j{height:50px}#cli.svelte-1xnx1c1.svelte-1xnx1c1{display:block;padding:8px;word-wrap:break-word}#cli.svelte-1xnx1c1 .opt-name.svelte-1xnx1c1{color:var(--green)}#cli.svelte-1xnx1c1 .opt-val.svelte-1xnx1c1{color:var(--orange)}input.svelte-qhlda7{appearance:none;-webkit-appearance:none;background:transparent;margin:0;border:2px solid var(--light6);border-radius:8.5px;width:17px;height:17px;position:relative;flex:0 0 17px}input.svelte-qhlda7:checked{border-color:var(--light-blue);background:transparent}input.svelte-qhlda7:checked:after{content:"";position:absolute;background:var(--light-blue);width:7px;height:7px;left:3px;top:3px;border-radius:10px}.container.svelte-176xcb{display:flex;gap:20px;margin-left:8px;align-items:center}svg.svelte-176xcb{flex:0 0 24px}circle.svelte-176xcb,line.svelte-176xcb{stroke:var(--red)}strong.svelte-yy7yvg{font:var(--sans-h2)}.container.svelte-yy7yvg{display:flex;gap:20px;margin-left:8px;align-items:center}svg.svelte-yy7yvg{flex:0 0 24px}circle.svelte-yy7yvg,line.svelte-yy7yvg{stroke:var(--green)}div.svelte-1pqmac{background:var(--dark2);border:1px solid var(--border-color);padding:12px;margin-bottom:20px;border-radius:8px}#sidebar.svelte-kvjsp8.svelte-kvjsp8{flex:0 0 400px;border-left:1px solid var(--border-color);display:flex;flex-direction:column;scrollbar-gutter:stable}#sidebar.svelte-kvjsp8 form.svelte-kvjsp8{flex:1 1 auto;padding:20px;overflow:auto}#sidebar.svelte-kvjsp8 h1.svelte-kvjsp8{font:var(--sans-h1);color:var(--header-fg);margin:0 0 16px;padding:0}.intro.svelte-kvjsp8.svelte-kvjsp8{margin-bottom:20px}#sidebar.svelte-kvjsp8 .run.svelte-kvjsp8{flex:0 0 auto;padding:20px;border-top:1px solid var(--border-color)}#sidebar.svelte-kvjsp8 #tidy.svelte-kvjsp8{background:var(--light-blue);border:0;color:var(--main-bg);font:var(--sans-h1);font-size:15px;height:36px;width:100%;border-radius:3px;position:relative}#sidebar.svelte-kvjsp8 #tidy[disabled].svelte-kvjsp8{background:var(--dark-gray);color:transparent;position:relative}#sidebar.svelte-kvjsp8 #tidy[disabled].svelte-kvjsp8:after{animation:svelte-kvjsp8-pulse .9s infinite linear;animation-delay:-.45s;background:#fff;border-radius:50%;content:"";height:20px;left:160px;position:absolute;top:8px;width:20px}#sidebar.svelte-kvjsp8 code{font-size:.9em;border:1px solid rgba(255,255,255,.2);background:#0000001a;color:var(--light-gray);padding:1px 4px;border-radius:3px}@keyframes svelte-kvjsp8-pulse{0%{transform:translate(-80px) scale(0)}35%{transform:translate(-40px) scale(.85)}50%{transform:translate(0) scale(1)}65%{transform:translate(40px) scale(.85)}to{transform:translate(80px) scale(0)}}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:300;src:local("IBM Plex Sans Light"),local("IBMPlexSans-Light"),url("./IBMPlexSans-Light-SATUMA4V.woff2") format("woff2")}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:500;src:local("IBM Plex Sans Regular"),local("IBMPlexSans-Regular"),url("./IBMPlexSans-Medium-ILA6RNXQ.woff2") format("woff2")}@font-face{font-family:Inconsolata;font-style:normal;font-weight:400;src:local("Inconsolata Regular"),local("Inconsolata-Regular"),url("./Inconsolata-Regular-CEGDCP7X.woff2") format("woff2")}:root{--dark1:#1c222aff;--dark2:#222931ff;--dark3:#283038ff;--dark4:#2d363fff;--dark5:#333d46ff;--dark6:#39444dff;--dark7:#3f4b54ff;--dark8:#44515bff;--dark9:#4a5862ff;--dark10:#505f69ff;--light1:#eaeaeaff;--light2:#d9d7d7ff;--light3:#c8c4c5ff;--light4:#b8b2b2ff;--light5:#a79fa0ff;--light6:#968c8dff;--red:#de3040;--green:#05c46b;--orange:#f9b653;--pink:#f36eb7;--light-blue:#71cafd;--main-bg:var(--dark1);--border-color:var(--dark6);--hover-bg:var(--dark3);--main-fg:var(--light2);--header-fg:var(--light1);--textfield-bg:var(--dark3);--light-gray:var(--light3);--dark-gray:var(--light6);--mono-normal:400 14px "Inconsolata", monospace;--sans-normal:300 14px "IBM Plex Sans", sans-serif;--sans-h1:500 16px "IBM Plex Sans", sans-serif;--sans-h2:500 14px "IBM Plex Sans", sans-serif}*{box-sizing:border-box}html{height:100%}body{background:var(--main-bg);color:var(--main-fg);font:var(--sans-normal);line-height:1.5em;margin:0;display:flex;height:100%}button{cursor:pointer}input[type=number],textarea{background:var(--textfield-bg);color:var(--header-fg);border:1px solid var(--border-color);padding:8px;font:var(--sans-normal);border-radius:3px;font-size:15px;min-height:24px}input[type=number]{-moz-appearance:textfield;margin-left:8px}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}textarea{margin-top:4px;line-height:1.4em}a{color:inherit}p:first-child{margin-top:0}p:last-child{margin-bottom:0}.btn{background:var(--main-bg);border:1px solid var(--border-color);border-radius:3px;color:var(--header-fg);font:var(--sans-normal);display:inline-block;margin-right:6px;padding:5px 12px;text-decoration:none} +#copy.svelte-1ha11jr.svelte-1ha11jr{position:absolute;top:12px;right:12px;font-weight:700;font-size:15px;z-index:100;display:flex;align-items:center;justify-content:flex-start;padding:8px 8px 8px 12px;transition:width .5s ease;width:40px}#copy.svelte-1ha11jr.svelte-1ha11jr:after{content:"Copy";overflow:hidden;white-space:nowrap;text-indent:6px}#copy.svelte-1ha11jr.svelte-1ha11jr:hover{width:90px}#copy.copied.svelte-1ha11jr.svelte-1ha11jr{width:110px}#copy.copied.svelte-1ha11jr.svelte-1ha11jr:after{content:"Copied!"}#copy.svelte-1ha11jr svg.svelte-1ha11jr{fill:currentColor;width:20px;flex-shrink:0}#editor.svelte-x4zh2g{flex-grow:1;position:relative;overflow:hidden}.cm-editor{color:var(--dark-gray);height:100%}.cm-editor .cm-scroller{font:var(--mono-normal);font-size:14px;line-height:1.3em;padding:12px 0}.cm-editor .cm-gutters{background:var(--main-bg);border-right:14px solid var(--main-bg);color:var(--light6);padding-left:12px}.cm-editor .cm-activeLineGutter{background:var(--main-bg);color:var(--light1)}.cm-editor .cm-gutters .cm-gutter{min-width:32px}.cm-editor .cm-selectionBackground{background:#283655!important}.cm-editor .cm-cursor{border-left:2px solid #ffffec}.cm-editor .cm-lintRange-error{background:none;border-bottom:2px solid var(--red)}details[open].svelte-ee92zc.svelte-ee92zc{padding-bottom:20px}details.svelte-ee92zc:not([open]) summary.svelte-ee92zc{padding-bottom:20px}summary.svelte-ee92zc.svelte-ee92zc{font:var(--sans-h2);margin:0 -20px;cursor:pointer;user-select:none;padding:20px 20px 12px;border-top:1px solid var(--border-color);display:flex;gap:8px;align-items:center}summary.svelte-ee92zc.svelte-ee92zc::-webkit-details-marker{display:none}summary.svelte-ee92zc.svelte-ee92zc::marker{content:none}summary.svelte-ee92zc.svelte-ee92zc:after{content:"\25ba";font-size:8px;color:#fff9}details[open].svelte-ee92zc summary.svelte-ee92zc:after{content:none}details[open].svelte-ee92zc summary.svelte-ee92zc:hover:after{content:"\25bc"}input.svelte-doypik{appearance:none;-webkit-appearance:none;background:transparent;margin:0;border:2px solid var(--light6);border-radius:3px;width:17px;height:17px;position:relative}input.svelte-doypik:checked{border-color:var(--light-blue);background:var(--light-blue)}input.svelte-doypik:checked:before,input.svelte-doypik:checked:after{content:"";position:absolute;background:var(--main-bg);width:2px}input.svelte-doypik:checked:before{height:11px;left:7px;top:1px;transform:rotate(45deg)}input.svelte-doypik:checked:after{height:5px;left:2px;top:5px;transform:rotate(-45deg)}label.svelte-a2tm3u{padding:8px 12px;margin:12px 0;border-radius:3px;display:flex;align-items:center;gap:16px;cursor:pointer}label.svelte-a2tm3u:hover{background:var(--hover-bg);box-shadow:0 0 0 1px var(--border-color)}label.svelte-a2tm3u:first-of-type{margin-top:4px}label.svelte-a2tm3u:last-child{margin-bottom:0}.suboptions.svelte-1gkj6ol{margin:0 0 28px 45px}.suboptions.svelte-1gkj6ol:last-child{margin-bottom:0}.suboptions.svelte-1gkj6ol textarea{resize:vertical;width:100%;height:100px}.suboptions.svelte-1gkj6ol input[type=number]{display:inline-block;width:62px}textarea.omit.svelte-1t0249j{height:50px}#cli.svelte-1xnx1c1.svelte-1xnx1c1{display:block;padding:8px;word-wrap:break-word}#cli.svelte-1xnx1c1 .opt-name.svelte-1xnx1c1{color:var(--green)}#cli.svelte-1xnx1c1 .opt-val.svelte-1xnx1c1{color:var(--orange)}input.svelte-qhlda7{appearance:none;-webkit-appearance:none;background:transparent;margin:0;border:2px solid var(--light6);border-radius:8.5px;width:17px;height:17px;position:relative;flex:0 0 17px}input.svelte-qhlda7:checked{border-color:var(--light-blue);background:transparent}input.svelte-qhlda7:checked:after{content:"";position:absolute;background:var(--light-blue);width:7px;height:7px;left:3px;top:3px;border-radius:10px}.container.svelte-176xcb{display:flex;gap:20px;margin-left:8px;align-items:center}svg.svelte-176xcb{flex:0 0 24px}circle.svelte-176xcb,line.svelte-176xcb{stroke:var(--red)}strong.svelte-yy7yvg{font:var(--sans-h2)}.container.svelte-yy7yvg{display:flex;gap:20px;margin-left:8px;align-items:center}svg.svelte-yy7yvg{flex:0 0 24px}circle.svelte-yy7yvg,line.svelte-yy7yvg{stroke:var(--green)}div.svelte-1pqmac{background:var(--dark2);border:1px solid var(--border-color);padding:12px;margin-bottom:20px;border-radius:8px}#sidebar.svelte-kvjsp8.svelte-kvjsp8{flex:0 0 400px;border-left:1px solid var(--border-color);display:flex;flex-direction:column;scrollbar-gutter:stable}#sidebar.svelte-kvjsp8 form.svelte-kvjsp8{flex:1 1 auto;padding:20px;overflow:auto}#sidebar.svelte-kvjsp8 h1.svelte-kvjsp8{font:var(--sans-h1);color:var(--header-fg);margin:0 0 16px;padding:0}.intro.svelte-kvjsp8.svelte-kvjsp8{margin-bottom:20px}#sidebar.svelte-kvjsp8 .run.svelte-kvjsp8{flex:0 0 auto;padding:20px;border-top:1px solid var(--border-color)}#sidebar.svelte-kvjsp8 #tidy.svelte-kvjsp8{background:var(--light-blue);border:0;color:var(--main-bg);font:var(--sans-h1);font-size:15px;height:36px;width:100%;border-radius:3px;position:relative}#sidebar.svelte-kvjsp8 #tidy[disabled].svelte-kvjsp8{background:var(--dark-gray);color:transparent;position:relative}#sidebar.svelte-kvjsp8 #tidy[disabled].svelte-kvjsp8:after{animation:svelte-kvjsp8-pulse .9s infinite linear;animation-delay:-.45s;background:#fff;border-radius:50%;content:"";height:20px;left:160px;position:absolute;top:8px;width:20px}#sidebar.svelte-kvjsp8 code{font-size:.9em;border:1px solid rgba(255,255,255,.2);background:rgba(0,0,0,.1);color:var(--light-gray);padding:1px 4px;border-radius:3px}@keyframes svelte-kvjsp8-pulse{0%{transform:translate(-80px) scale(0)}35%{transform:translate(-40px) scale(.85)}50%{transform:translate(0) scale(1)}65%{transform:translate(40px) scale(.85)}to{transform:translate(80px) scale(0)}}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:300;src:local("IBM Plex Sans Light"),local("IBMPlexSans-Light"),url(./IBMPlexSans-Light-SATUMA4V.woff2) format("woff2")}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:500;src:local("IBM Plex Sans Regular"),local("IBMPlexSans-Regular"),url(./IBMPlexSans-Medium-ILA6RNXQ.woff2) format("woff2")}@font-face{font-family:Inconsolata;font-style:normal;font-weight:400;src:local("Inconsolata Regular"),local("Inconsolata-Regular"),url(./Inconsolata-Regular-CEGDCP7X.woff2) format("woff2")}:root{--dark1:#1c222aff;--dark2:#222931ff;--dark3:#283038ff;--dark4:#2d363fff;--dark5:#333d46ff;--dark6:#39444dff;--dark7:#3f4b54ff;--dark8:#44515bff;--dark9:#4a5862ff;--dark10:#505f69ff;--light1:#eaeaeaff;--light2:#d9d7d7ff;--light3:#c8c4c5ff;--light4:#b8b2b2ff;--light5:#a79fa0ff;--light6:#968c8dff;--red:#de3040;--green:#05c46b;--orange:#f9b653;--pink:#f36eb7;--light-blue:#71cafd;--main-bg:var(--dark1);--border-color:var(--dark6);--hover-bg:var(--dark3);--main-fg:var(--light2);--header-fg:var(--light1);--textfield-bg:var(--dark3);--light-gray:var(--light3);--dark-gray:var(--light6);--mono-normal:400 14px "Inconsolata", monospace;--sans-normal:300 14px "IBM Plex Sans", sans-serif;--sans-h1:500 16px "IBM Plex Sans", sans-serif;--sans-h2:500 14px "IBM Plex Sans", sans-serif}*{box-sizing:border-box}html{height:100%}body{background:var(--main-bg);color:var(--main-fg);font:var(--sans-normal);line-height:1.5em;margin:0;display:flex;height:100%}button{cursor:pointer}input[type=number],textarea{background:var(--textfield-bg);color:var(--header-fg);border:1px solid var(--border-color);padding:8px;font:var(--sans-normal);border-radius:3px;font-size:15px;min-height:24px}input[type=number]{-moz-appearance:textfield;margin-left:8px}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}textarea{margin-top:4px;line-height:1.4em}a{color:inherit}p:first-child{margin-top:0}p:last-child{margin-bottom:0}.btn{background:var(--main-bg);border:1px solid var(--border-color);border-radius:3px;color:var(--header-fg);font:var(--sans-normal);display:inline-block;margin-right:6px;padding:5px 12px;text-decoration:none} diff --git a/docs/bundle.js b/docs/bundle.js index 555b9ca..a4bc9d7 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -90,7 +90,7 @@ function _object_spread(target) { ownKeys = ownKeys.concat( Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }), + }) ); } ownKeys.forEach(function (key) { @@ -222,8 +222,7 @@ function _ts_generator(thisArg, body) { } } (() => { - var _r, - _class, + var _class, _class1, _class2, _class3, @@ -238,68 +237,68 @@ function _ts_generator(thisArg, body) { _class12, _class13, _class14, - _r1, + _i, _class15, _class16, _class17, - _r2, - _r3, - _r4, + _i1, + _i2, + _i3, _class18, _class19, _class20, _class21, - _r5, - _r6, + _i4, + _i5, _class22, - _r7, - _r8, - _r9, + _i6, + _i7, + _i8, _class23, - _r10, + _i9, _class24, - _r11, + _i10, _class25, - _r12, + _i11, _class26, _class27, _class28, - _r13, - _r14, - _r15, + _i12, + _i13, + _i14, _class29, - _r16, - _r17, - _r18, - _r19, + _i15, + _i16, + _i17, + _i18, _class30, - _r20, + _i19, _class31, _class32, _class33, _class34, - _r21, - _r22, + _i20, + _i21, _class35, - _r23, - _r24, - _r25, - _r26, - _r27, - _r28, + _i22, + _i23, + _i24, _class36, + _i25, _class37, - _r29, - _r30, - _r31, - _r32, _class38, + _i26, + _i27, + _i28, + _i29, + _i30, + _i31, _class39, - _r33, - _r34, + _i32, + _i33, _class40, - _r35, - _r36, + _i34, + _i35, _class41, _class42, _class43, @@ -307,31 +306,31 @@ function _ts_generator(thisArg, body) { _class45, _class46, _class47, - _r37, - _r38, _class48, - _r39, - _r40, _class49, - _r41, _class50, _class51, + _i36, + _i37, _class52, + _i38, + _i39, _class53, + _i40, _class54, _class55, _class56, _class57, _class58, _class59, - _r42, - _r43, - _r44, _class60, _class61, - _r45, + _i41, + _i42, + _i43, _class62, _class63, + _i44, _class64, _class65, _class66, @@ -340,45 +339,45 @@ function _ts_generator(thisArg, body) { _class69, _class70, _class71, - _r46, - _r47, - _r48, - _r49, - _r50, _class72, - _r51, + _i45, + _i46, + _i47, + _i48, + _i49, + _i50, _class73, - _r52, + _i51, _class74, + _i52, _class75, - _r53, _class76, + _i53, + _i54, _class77, - _r54, - _r55, _class78, _class79, + _i55, _class80, - _r56, + _i56, + _i57, _class81, - _r57, - _r58, _class82, + _i58, _class83, - _r59, + _i59, + _i60, _class84, - _r60, - _r61, + _i61, _class85, - _r62, _class86, + _i62, _class87, - _r63, + _i63, _class88, - _r64, _class89, + _i64, _class90, - _r65, _class91, _class92, _class93, @@ -386,8 +385,8 @@ function _ts_generator(thisArg, body) { _class95, _class96, _class97, + _i65, _class98, - _r66, _class99, _class100, _class101, @@ -405,1527 +404,1350 @@ function _ts_generator(thisArg, body) { _class113, _class114, _class115, - _class116, - _class117; - var k1 = Object.create; - var Ho = Object.defineProperty; - var S1 = Object.getOwnPropertyDescriptor; - var w1 = Object.getOwnPropertyNames; - var Q1 = Object.getPrototypeOf, - _1 = Object.prototype.hasOwnProperty; - var h = (r, e) => Ho(r, "name", { value: e, configurable: !0 }); - var x = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports); - var U1 = (r, e, t, i) => { - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - if ((e && typeof e == "object") || typeof e == "function") - try { - var _loop = function () { - var n = _step.value; - !_1.call(r, n) && n !== t && Ho(r, n, { get: () => e[n], enumerable: !(i = S1(e, n)) || i.enumerable }); - }; - for (var _iterator = w1(e)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop(); - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - return r; - }; - var Nn = (r, e, t) => ((t = r != null ? k1(Q1(r)) : {}), U1(e || !r || !r.__esModule ? Ho(t, "default", { value: r, enumerable: !0 }) : t, r)); - var tt = x((jo, hc) => { - "use strict"; - var Qr = h(function (r) { - return r && r.Math === Math && r; + _class116; + var lb = Object.defineProperty; + var a = (i, e) => lb(i, "name", { value: e, configurable: !0 }); + var k = (i, e) => () => (e || i((e = { exports: {} }).exports, e), e.exports); + var it = k((rc, nc) => { + var vn = a(function (i) { + return i && i.Math == Math && i; }, "check"); - hc.exports = - Qr(typeof globalThis == "object" && globalThis) || - Qr(typeof window == "object" && window) || - Qr(typeof self == "object" && self) || - Qr(typeof global == "object" && global) || - Qr(typeof jo == "object" && jo) || + nc.exports = + vn(typeof globalThis == "object" && globalThis) || + vn(typeof window == "object" && window) || + vn(typeof self == "object" && self) || + vn(typeof global == "object" && global) || (function () { return this; })() || + rc || Function("return this")(); }); - var Je = x((fw, cc) => { - "use strict"; - cc.exports = function (r) { + var Ge = k(($3, sc) => { + sc.exports = function (i) { try { - return !!r(); + return !!i(); } catch (e) { return !0; } }; }); - var Ge = x((dw, fc) => { - "use strict"; - var L1 = Je(); - fc.exports = !L1(function () { + var rt = k((P3, oc) => { + var ab = Ge(); + oc.exports = !ab(function () { return ( Object.defineProperty({}, 1, { get: function get() { return 7; }, - })[1] !== 7 + })[1] != 7 ); }); }); - var Mn = x((pw, dc) => { - "use strict"; - var O1 = Je(); - dc.exports = !O1(function () { - var r = function () {}.bind(); - return typeof r != "function" || r.hasOwnProperty("prototype"); + var kn = k((L3, uc) => { + var hb = Ge(); + uc.exports = !hb(function () { + var i = function () {}.bind(); + return typeof i != "function" || i.hasOwnProperty("prototype"); }); }); - var Vt = x((mw, pc) => { - "use strict"; - var T1 = Mn(), - Pn = Function.prototype.call; - pc.exports = T1 - ? Pn.bind(Pn) + var Pt = k((q3, lc) => { + var cb = kn(), + wn = Function.prototype.call; + lc.exports = cb + ? wn.bind(wn) : function () { - return Pn.apply(Pn, arguments); + return wn.apply(wn, arguments); }; }); - var Fc = x((Dc) => { + var fc = k((cc) => { "use strict"; - var mc = {}.propertyIsEnumerable, - gc = Object.getOwnPropertyDescriptor, - R1 = gc && !mc.call({ 1: 2 }, 1); - Dc.f = R1 - ? h(function (e) { - var t = gc(this, e); + var ac = {}.propertyIsEnumerable, + hc = Object.getOwnPropertyDescriptor, + fb = hc && !ac.call({ 1: 2 }, 1); + cc.f = fb + ? a(function (e) { + var t = hc(this, e); return !!t && t.enumerable; }, "propertyIsEnumerable") - : mc; + : ac; }); - var qi = x((Fw, bc) => { - "use strict"; - bc.exports = function (r, e) { - return { enumerable: !(r & 1), configurable: !(r & 2), writable: !(r & 4), value: e }; + var Pi = k((V3, dc) => { + dc.exports = function (i, e) { + return { enumerable: !(i & 1), configurable: !(i & 2), writable: !(i & 4), value: e }; }; }); - var Ne = x((bw, Cc) => { - "use strict"; - var yc = Mn(), - Ec = Function.prototype, - Yo = Ec.call, - N1 = yc && Ec.bind.bind(Yo, Yo); - Cc.exports = yc - ? N1 - : function (r) { + var ze = k((z3, gc) => { + var pc = kn(), + mc = Function.prototype, + Io = mc.call, + db = pc && mc.bind.bind(Io, Io); + gc.exports = pc + ? db + : function (i) { return function () { - return Yo.apply(r, arguments); + return Io.apply(i, arguments); }; }; }); - var _r67 = x((yw, vc) => { - "use strict"; - var Bc = Ne(), - M1 = Bc({}.toString), - P1 = Bc("".slice); - vc.exports = function (r) { - return P1(M1(r), 8, -1); + var wr = k((H3, bc) => { + var Dc = ze(), + pb = Dc({}.toString), + mb = Dc("".slice); + bc.exports = function (i) { + return mb(pb(i), 8, -1); }; }); - var Ac = x((Ew, xc) => { - "use strict"; - var I1 = Ne(), - $1 = Je(), - q1 = _r67(), - Jo = Object, - V1 = I1("".split); - xc.exports = $1(function () { - return !Jo("z").propertyIsEnumerable(0); + var yc = k((W3, Fc) => { + var gb = ze(), + Db = Ge(), + bb = wr(), + No = Object, + Fb = gb("".split); + Fc.exports = Db(function () { + return !No("z").propertyIsEnumerable(0); }) - ? function (r) { - return q1(r) === "String" ? V1(r, "") : Jo(r); + ? function (i) { + return bb(i) == "String" ? Fb(i, "") : No(i); } - : Jo; + : No; }); - var In = x((Cw, kc) => { - "use strict"; - kc.exports = function (r) { - return r == null; + var xn = k((j3, Cc) => { + Cc.exports = function (i) { + return i == null; }; }); - var Ur = x((Bw, Sc) => { - "use strict"; - var W1 = In(), - z1 = TypeError; - Sc.exports = function (r) { - if (W1(r)) throw new z1("Can't call method on " + r); - return r; + var Sn = k((U3, Ac) => { + var yb = xn(), + Cb = TypeError; + Ac.exports = function (i) { + if (yb(i)) throw Cb("Can't call method on " + i); + return i; }; }); - var Vi = x((vw, wc) => { - "use strict"; - var H1 = Ac(), - j1 = Ur(); - wc.exports = function (r) { - return H1(j1(r)); + var Li = k((G3, Ec) => { + var Ab = yc(), + Eb = Sn(); + Ec.exports = function (i) { + return Ab(Eb(i)); }; }); - var Te = x((xw, Qc) => { - "use strict"; - var Go = typeof document == "object" && document.all; - Qc.exports = - typeof Go > "u" && Go !== void 0 - ? function (r) { - return typeof r == "function" || r === Go; - } - : function (r) { - return typeof r == "function"; - }; + var zo = k((Y3, vc) => { + var Vo = typeof document == "object" && document.all, + vb = typeof Vo > "u" && Vo !== void 0; + vc.exports = { all: Vo, IS_HTMLDDA: vb }; }); - var bt = x((Aw, _c) => { - "use strict"; - var Y1 = Te(); - _c.exports = function (r) { - return typeof r == "object" ? r !== null : Y1(r); - }; + var $e = k((K3, wc) => { + var kc = zo(), + kb = kc.all; + wc.exports = kc.IS_HTMLDDA + ? function (i) { + return typeof i == "function" || i === kb; + } + : function (i) { + return typeof i == "function"; + }; }); - var Lr = x((kw, Uc) => { - "use strict"; - var Xo = tt(), - J1 = Te(), - G1 = h(function (r) { - return J1(r) ? r : void 0; + var Lt = k((X3, Bc) => { + var xc = $e(), + Sc = zo(), + wb = Sc.all; + Bc.exports = Sc.IS_HTMLDDA + ? function (i) { + return typeof i == "object" ? i !== null : xc(i) || i === wb; + } + : function (i) { + return typeof i == "object" ? i !== null : xc(i); + }; + }); + var xr = k((Q3, _c) => { + var Ho = it(), + xb = $e(), + Sb = a(function (i) { + return xb(i) ? i : void 0; }, "aFunction"); - Uc.exports = function (r, e) { - return arguments.length < 2 ? G1(Xo[r]) : Xo[r] && Xo[r][e]; + _c.exports = function (i, e) { + return arguments.length < 2 ? Sb(Ho[i]) : Ho[i] && Ho[i][e]; }; }); - var $n = x((ww, Lc) => { - "use strict"; - var X1 = Ne(); - Lc.exports = X1({}.isPrototypeOf); + var Bn = k((Z3, Oc) => { + var Bb = ze(); + Oc.exports = Bb({}.isPrototypeOf); }); - var Tc = x((Qw, Oc) => { - "use strict"; - Oc.exports = (typeof navigator < "u" && String(navigator.userAgent)) || ""; + var Rc = k((ex, Tc) => { + Tc.exports = (typeof navigator < "u" && String(navigator.userAgent)) || ""; }); - var qc = x((_w, $c) => { - "use strict"; - var Ic = tt(), - Ko = Tc(), - Rc = Ic.process, - Nc = Ic.Deno, - Mc = (Rc && Rc.versions) || (Nc && Nc.version), - Pc = Mc && Mc.v8, - yt, - qn; - Pc && ((yt = Pc.split(".")), (qn = yt[0] > 0 && yt[0] < 4 ? 1 : +(yt[0] + yt[1]))); - !qn && Ko && ((yt = Ko.match(/Edge\/(\d+)/)), (!yt || yt[1] >= 74) && ((yt = Ko.match(/Chrome\/(\d+)/)), yt && (qn = +yt[1]))); - $c.exports = qn; + var Nc = k((tx, Ic) => { + var qc = it(), + Wo = Rc(), + Mc = qc.process, + $c = qc.Deno, + Pc = (Mc && Mc.versions) || ($c && $c.version), + Lc = Pc && Pc.v8, + mt, + _n; + Lc && ((mt = Lc.split(".")), (_n = mt[0] > 0 && mt[0] < 4 ? 1 : +(mt[0] + mt[1]))); + !_n && Wo && ((mt = Wo.match(/Edge\/(\d+)/)), (!mt || mt[1] >= 74) && ((mt = Wo.match(/Chrome\/(\d+)/)), mt && (_n = +mt[1]))); + Ic.exports = _n; }); - var Zo = x((Uw, Wc) => { - "use strict"; - var Vc = qc(), - K1 = Je(), - Z1 = tt(), - eb = Z1.String; - Wc.exports = + var jo = k((ix, zc) => { + var Vc = Nc(), + _b = Ge(), + Ob = it(), + Tb = Ob.String; + zc.exports = !!Object.getOwnPropertySymbols && - !K1(function () { - var r = Symbol("symbol detection"); - return !eb(r) || !(Object(r) instanceof Symbol) || (!Symbol.sham && Vc && Vc < 41); + !_b(function () { + var i = Symbol(); + return !Tb(i) || !(Object(i) instanceof Symbol) || (!Symbol.sham && Vc && Vc < 41); }); }); - var el = x((Lw, zc) => { - "use strict"; - var tb = Zo(); - zc.exports = tb && !Symbol.sham && typeof Symbol.iterator == "symbol"; + var Uo = k((rx, Hc) => { + var Rb = jo(); + Hc.exports = Rb && !Symbol.sham && typeof Symbol.iterator == "symbol"; }); - var tl = x((Ow, Hc) => { - "use strict"; - var ib = Lr(), - rb = Te(), - nb = $n(), - sb = el(), - ob = Object; - Hc.exports = sb - ? function (r) { - return typeof r == "symbol"; - } - : function (r) { - var e = ib("Symbol"); - return rb(e) && nb(e.prototype, ob(r)); + var Go = k((nx, Wc) => { + var Mb = xr(), + $b = $e(), + Pb = Bn(), + Lb = Uo(), + qb = Object; + Wc.exports = Lb + ? function (i) { + return typeof i == "symbol"; + } + : function (i) { + var e = Mb("Symbol"); + return $b(e) && Pb(e.prototype, qb(i)); }; }); - var Vn = x((Tw, jc) => { - "use strict"; - var lb = String; - jc.exports = function (r) { + var On = k((sx, jc) => { + var Ib = String; + jc.exports = function (i) { try { - return lb(r); + return Ib(i); } catch (e) { return "Object"; } }; }); - var Wi = x((Rw, Yc) => { - "use strict"; - var ub = Te(), - ab = Vn(), - hb = TypeError; - Yc.exports = function (r) { - if (ub(r)) return r; - throw new hb(ab(r) + " is not a function"); + var qi = k((ox, Uc) => { + var Nb = $e(), + Vb = On(), + zb = TypeError; + Uc.exports = function (i) { + if (Nb(i)) return i; + throw zb(Vb(i) + " is not a function"); }; }); - var Wn = x((Nw, Jc) => { - "use strict"; - var cb = Wi(), - fb = In(); - Jc.exports = function (r, e) { - var t = r[e]; - return fb(t) ? void 0 : cb(t); + var Tn = k((ux, Gc) => { + var Hb = qi(), + Wb = xn(); + Gc.exports = function (i, e) { + var t = i[e]; + return Wb(t) ? void 0 : Hb(t); }; }); - var Xc = x((Mw, Gc) => { - "use strict"; - var il = Vt(), - rl = Te(), - nl = bt(), - db = TypeError; - Gc.exports = function (r, e) { - var t, i; - if ((e === "string" && rl((t = r.toString)) && !nl((i = il(t, r)))) || (rl((t = r.valueOf)) && !nl((i = il(t, r)))) || (e !== "string" && rl((t = r.toString)) && !nl((i = il(t, r))))) return i; - throw new db("Can't convert object to primitive value"); + var Kc = k((lx, Yc) => { + var Yo = Pt(), + Ko = $e(), + Xo = Lt(), + jb = TypeError; + Yc.exports = function (i, e) { + var t, r; + if ((e === "string" && Ko((t = i.toString)) && !Xo((r = Yo(t, i)))) || (Ko((t = i.valueOf)) && !Xo((r = Yo(t, i)))) || (e !== "string" && Ko((t = i.toString)) && !Xo((r = Yo(t, i))))) return r; + throw jb("Can't convert object to primitive value"); }; }); - var zi = x((Pw, Kc) => { - "use strict"; - Kc.exports = !1; + var Ii = k((ax, Xc) => { + Xc.exports = !1; }); - var zn = x((Iw, ef) => { - "use strict"; - var Zc = tt(), - pb = Object.defineProperty; - ef.exports = function (r, e) { + var Rn = k((hx, Jc) => { + var Qc = it(), + Ub = Object.defineProperty; + Jc.exports = function (i, e) { try { - pb(Zc, r, { value: e, configurable: !0, writable: !0 }); + Ub(Qc, i, { value: e, configurable: !0, writable: !0 }); } catch (e1) { - Zc[r] = e; + Qc[i] = e; } return e; }; }); - var Hn = x(($w, nf) => { - "use strict"; - var mb = zi(), - gb = tt(), - Db = zn(), - tf = "__core-js_shared__", - rf = (nf.exports = gb[tf] || Db(tf, {})); - (rf.versions || (rf.versions = [])).push({ version: "3.37.0", mode: mb ? "pure" : "global", copyright: "\xa9 2014-2024 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE", source: "https://github.com/zloirock/core-js" }); + var Mn = k((cx, ef) => { + var Gb = it(), + Yb = Rn(), + Zc = "__core-js_shared__", + Kb = Gb[Zc] || Yb(Zc, {}); + ef.exports = Kb; }); - var sl = x((qw, of) => { - "use strict"; - var sf = Hn(); - of.exports = function (r, e) { - return sf[r] || (sf[r] = e || {}); - }; + var Qo = k((fx, rf) => { + var Xb = Ii(), + tf = Mn(); + (rf.exports = function (i, e) { + return tf[i] || (tf[i] = e !== void 0 ? e : {}); + })("versions", []).push({ version: "3.31.0", mode: Xb ? "pure" : "global", copyright: "\xa9 2014-2023 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE", source: "https://github.com/zloirock/core-js" }); }); - var jn = x((Vw, lf) => { - "use strict"; - var Fb = Ur(), - bb = Object; - lf.exports = function (r) { - return bb(Fb(r)); + var $n = k((dx, nf) => { + var Qb = Sn(), + Jb = Object; + nf.exports = function (i) { + return Jb(Qb(i)); }; }); - var Et = x((Ww, uf) => { - "use strict"; - var yb = Ne(), - Eb = jn(), - Cb = yb({}.hasOwnProperty); - uf.exports = + var gt = k((px, sf) => { + var Zb = ze(), + eF = $n(), + tF = Zb({}.hasOwnProperty); + sf.exports = Object.hasOwn || - h(function (e, t) { - return Cb(Eb(e), t); + a(function (e, t) { + return tF(eF(e), t); }, "hasOwn"); }); - var ol = x((Hw, af) => { - "use strict"; - var Bb = Ne(), - vb = 0, - xb = Math.random(), - Ab = Bb((1).toString); - af.exports = function (r) { - return "Symbol(" + (r === void 0 ? "" : r) + ")_" + Ab(++vb + xb, 36); + var Jo = k((gx, of) => { + var iF = ze(), + rF = 0, + nF = Math.random(), + sF = iF((1).toString); + of.exports = function (i) { + return "Symbol(" + (i === void 0 ? "" : i) + ")_" + sF(++rF + nF, 36); }; }); - var it = x((jw, cf) => { - "use strict"; - var kb = tt(), - Sb = sl(), - hf = Et(), - wb = ol(), - Qb = Zo(), - _b = el(), - Hi = kb.Symbol, - ll = Sb("wks"), - Ub = _b ? Hi.for || Hi : (Hi && Hi.withoutSetter) || wb; - cf.exports = function (r) { - return hf(ll, r) || (ll[r] = Qb && hf(Hi, r) ? Hi[r] : Ub("Symbol." + r)), ll[r]; + var Qe = k((Dx, lf) => { + var oF = it(), + uF = Qo(), + uf = gt(), + lF = Jo(), + aF = jo(), + hF = Uo(), + Ni = oF.Symbol, + Zo = uF("wks"), + cF = hF ? Ni.for || Ni : (Ni && Ni.withoutSetter) || lF; + lf.exports = function (i) { + return uf(Zo, i) || (Zo[i] = aF && uf(Ni, i) ? Ni[i] : cF("Symbol." + i)), Zo[i]; }; }); - var mf = x((Yw, pf) => { - "use strict"; - var Lb = Vt(), - ff = bt(), - df = tl(), - Ob = Wn(), - Tb = Xc(), - Rb = it(), - Nb = TypeError, - Mb = Rb("toPrimitive"); - pf.exports = function (r, e) { - if (!ff(r) || df(r)) return r; - var t = Ob(r, Mb), - i; + var ff = k((bx, cf) => { + var fF = Pt(), + af = Lt(), + hf = Go(), + dF = Tn(), + pF = Kc(), + mF = Qe(), + gF = TypeError, + DF = mF("toPrimitive"); + cf.exports = function (i, e) { + if (!af(i) || hf(i)) return i; + var t = dF(i, DF), + r; if (t) { - if ((e === void 0 && (e = "default"), (i = Lb(t, r, e)), !ff(i) || df(i))) return i; - throw new Nb("Can't convert object to primitive value"); + if ((e === void 0 && (e = "default"), (r = fF(t, i, e)), !af(r) || hf(r))) return r; + throw gF("Can't convert object to primitive value"); } - return e === void 0 && (e = "number"), Tb(r, e); + return e === void 0 && (e = "number"), pF(i, e); }; }); - var ul = x((Jw, gf) => { - "use strict"; - var Pb = mf(), - Ib = tl(); - gf.exports = function (r) { - var e = Pb(r, "string"); - return Ib(e) ? e : e + ""; + var Pn = k((Fx, df) => { + var bF = ff(), + FF = Go(); + df.exports = function (i) { + var e = bF(i, "string"); + return FF(e) ? e : e + ""; }; }); - var hl = x((Gw, Ff) => { - "use strict"; - var $b = tt(), - Df = bt(), - al = $b.document, - qb = Df(al) && Df(al.createElement); - Ff.exports = function (r) { - return qb ? al.createElement(r) : {}; + var tu = k((yx, mf) => { + var yF = it(), + pf = Lt(), + eu = yF.document, + CF = pf(eu) && pf(eu.createElement); + mf.exports = function (i) { + return CF ? eu.createElement(i) : {}; }; }); - var cl = x((Xw, bf) => { - "use strict"; - var Vb = Ge(), - Wb = Je(), - zb = hl(); - bf.exports = - !Vb && - !Wb(function () { + var iu = k((Cx, gf) => { + var AF = rt(), + EF = Ge(), + vF = tu(); + gf.exports = + !AF && + !EF(function () { return ( - Object.defineProperty(zb("div"), "a", { + Object.defineProperty(vF("div"), "a", { get: function get() { return 7; }, - }).a !== 7 + }).a != 7 ); }); }); - var fl = x((Ef) => { - "use strict"; - var Hb = Ge(), - jb = Vt(), - Yb = Fc(), - Jb = qi(), - Gb = Vi(), - Xb = ul(), - Kb = Et(), - Zb = cl(), - yf = Object.getOwnPropertyDescriptor; - Ef.f = Hb - ? yf - : h(function (e, t) { - if (((e = Gb(e)), (t = Xb(t)), Zb)) + var ru = k((bf) => { + var kF = rt(), + wF = Pt(), + xF = fc(), + SF = Pi(), + BF = Li(), + _F = Pn(), + OF = gt(), + TF = iu(), + Df = Object.getOwnPropertyDescriptor; + bf.f = kF + ? Df + : a(function (e, t) { + if (((e = BF(e)), (t = _F(t)), TF)) try { - return yf(e, t); + return Df(e, t); } catch (e) {} - if (Kb(e, t)) return Jb(!jb(Yb.f, e, t), e[t]); + if (OF(e, t)) return SF(!wF(xF.f, e, t), e[t]); }, "getOwnPropertyDescriptor"); }); - var dl = x((e4, Cf) => { - "use strict"; - var e2 = Ge(), - t2 = Je(); - Cf.exports = - e2 && - t2(function () { - return Object.defineProperty(function () {}, "prototype", { value: 42, writable: !1 }).prototype !== 42; + var nu = k((vx, Ff) => { + var RF = rt(), + MF = Ge(); + Ff.exports = + RF && + MF(function () { + return Object.defineProperty(function () {}, "prototype", { value: 42, writable: !1 }).prototype != 42; }); }); - var Wt = x((t4, Bf) => { - "use strict"; - var i2 = bt(), - r2 = String, - n2 = TypeError; - Bf.exports = function (r) { - if (i2(r)) return r; - throw new n2(r2(r) + " is not an object"); + var vt = k((kx, yf) => { + var $F = Lt(), + PF = String, + LF = TypeError; + yf.exports = function (i) { + if ($F(i)) return i; + throw LF(PF(i) + " is not an object"); }; }); - var St = x((xf) => { - "use strict"; - var s2 = Ge(), - o2 = cl(), - l2 = dl(), - Yn = Wt(), - vf = ul(), - u2 = TypeError, - pl = Object.defineProperty, - a2 = Object.getOwnPropertyDescriptor, - ml = "enumerable", - gl = "configurable", - Dl = "writable"; - xf.f = s2 - ? l2 - ? h(function (e, t, i) { - if ((Yn(e), (t = vf(t)), Yn(i), typeof e == "function" && t === "prototype" && "value" in i && Dl in i && !i[Dl])) { - var n = a2(e, t); - n && n[Dl] && ((e[t] = i.value), (i = { configurable: gl in i ? i[gl] : n[gl], enumerable: ml in i ? i[ml] : n[ml], writable: !1 })); - } - return pl(e, t, i); + var kt = k((Af) => { + var qF = rt(), + IF = iu(), + NF = nu(), + Ln = vt(), + Cf = Pn(), + VF = TypeError, + su = Object.defineProperty, + zF = Object.getOwnPropertyDescriptor, + ou = "enumerable", + uu = "configurable", + lu = "writable"; + Af.f = qF + ? NF + ? a(function (e, t, r) { + if ((Ln(e), (t = Cf(t)), Ln(r), typeof e == "function" && t === "prototype" && "value" in r && lu in r && !r[lu])) { + var n = zF(e, t); + n && n[lu] && ((e[t] = r.value), (r = { configurable: uu in r ? r[uu] : n[uu], enumerable: ou in r ? r[ou] : n[ou], writable: !1 })); + } + return su(e, t, r); }, "defineProperty") - : pl - : h(function (e, t, i) { - if ((Yn(e), (t = vf(t)), Yn(i), o2)) + : su + : a(function (e, t, r) { + if ((Ln(e), (t = Cf(t)), Ln(r), IF)) try { - return pl(e, t, i); + return su(e, t, r); } catch (e) {} - if ("get" in i || "set" in i) throw new u2("Accessors not supported"); - return "value" in i && (e[t] = i.value), e; + if ("get" in r || "set" in r) throw VF("Accessors not supported"); + return "value" in r && (e[t] = r.value), e; }, "defineProperty"); }); - var Jn = x((n4, Af) => { - "use strict"; - var h2 = Ge(), - c2 = St(), - f2 = qi(); - Af.exports = h2 - ? function (r, e, t) { - return c2.f(r, e, f2(1, t)); - } - : function (r, e, t) { - return (r[e] = t), r; + var qn = k((Sx, Ef) => { + var HF = rt(), + WF = kt(), + jF = Pi(); + Ef.exports = HF + ? function (i, e, t) { + return WF.f(i, e, jF(1, t)); + } + : function (i, e, t) { + return (i[e] = t), i; }; }); - var Gn = x((s4, Sf) => { - "use strict"; - var Fl = Ge(), - d2 = Et(), - kf = Function.prototype, - p2 = Fl && Object.getOwnPropertyDescriptor, - bl = d2(kf, "name"), - m2 = bl && h(function () {}, "something").name === "something", - g2 = bl && (!Fl || (Fl && p2(kf, "name").configurable)); - Sf.exports = { EXISTS: bl, PROPER: m2, CONFIGURABLE: g2 }; + var In = k((Bx, kf) => { + var au = rt(), + UF = gt(), + vf = Function.prototype, + GF = au && Object.getOwnPropertyDescriptor, + hu = UF(vf, "name"), + YF = hu && a(function () {}, "something").name === "something", + KF = hu && (!au || (au && GF(vf, "name").configurable)); + kf.exports = { EXISTS: hu, PROPER: YF, CONFIGURABLE: KF }; }); - var El = x((l4, wf) => { - "use strict"; - var D2 = Ne(), - F2 = Te(), - yl = Hn(), - b2 = D2(Function.toString); - F2(yl.inspectSource) || - (yl.inspectSource = function (r) { - return b2(r); + var fu = k((Ox, wf) => { + var XF = ze(), + QF = $e(), + cu = Mn(), + JF = XF(Function.toString); + QF(cu.inspectSource) || + (cu.inspectSource = function (i) { + return JF(i); }); - wf.exports = yl.inspectSource; + wf.exports = cu.inspectSource; }); - var Uf = x((u4, _f) => { - "use strict"; - var y2 = tt(), - E2 = Te(), - Qf = y2.WeakMap; - _f.exports = E2(Qf) && /native code/.test(String(Qf)); + var Bf = k((Tx, Sf) => { + var ZF = it(), + e2 = $e(), + xf = ZF.WeakMap; + Sf.exports = e2(xf) && /native code/.test(String(xf)); }); - var Xn = x((a4, Of) => { - "use strict"; - var C2 = sl(), - B2 = ol(), - Lf = C2("keys"); - Of.exports = function (r) { - return Lf[r] || (Lf[r] = B2(r)); + var Nn = k((Rx, Of) => { + var t2 = Qo(), + i2 = Jo(), + _f = t2("keys"); + Of.exports = function (i) { + return _f[i] || (_f[i] = i2(i)); }; }); - var Kn = x((h4, Tf) => { - "use strict"; + var Vn = k((Mx, Tf) => { Tf.exports = {}; }); - var ts = x((c4, Mf) => { - "use strict"; - var v2 = Uf(), - Nf = tt(), - x2 = bt(), - A2 = Jn(), - Cl = Et(), - Bl = Hn(), - k2 = Xn(), - S2 = Kn(), + var Wn = k(($x, $f) => { + var r2 = Bf(), + Mf = it(), + n2 = Lt(), + s2 = qn(), + du = gt(), + pu = Mn(), + o2 = Nn(), + u2 = Vn(), Rf = "Object already initialized", - vl = Nf.TypeError, - w2 = Nf.WeakMap, - Zn, - Or, - es, - Q2 = h(function (r) { - return es(r) ? Or(r) : Zn(r, {}); + mu = Mf.TypeError, + l2 = Mf.WeakMap, + zn, + Sr, + Hn, + a2 = a(function (i) { + return Hn(i) ? Sr(i) : zn(i, {}); }, "enforce"), - _2 = h(function (r) { + h2 = a(function (i) { return function (e) { var t; - if (!x2(e) || (t = Or(e)).type !== r) throw new vl("Incompatible receiver, " + r + " required"); + if (!n2(e) || (t = Sr(e)).type !== i) throw mu("Incompatible receiver, " + i + " required"); return t; }; }, "getterFor"); - v2 || Bl.state - ? ((Ct = Bl.state || (Bl.state = new w2())), - (Ct.get = Ct.get), - (Ct.has = Ct.has), - (Ct.set = Ct.set), - (Zn = h(function (r, e) { - if (Ct.has(r)) throw new vl(Rf); - return (e.facade = r), Ct.set(r, e), e; + r2 || pu.state + ? ((Dt = pu.state || (pu.state = new l2())), + (Dt.get = Dt.get), + (Dt.has = Dt.has), + (Dt.set = Dt.set), + (zn = a(function (i, e) { + if (Dt.has(i)) throw mu(Rf); + return (e.facade = i), Dt.set(i, e), e; }, "set")), - (Or = h(function (r) { - return Ct.get(r) || {}; + (Sr = a(function (i) { + return Dt.get(i) || {}; }, "get")), - (es = h(function (r) { - return Ct.has(r); + (Hn = a(function (i) { + return Dt.has(i); }, "has"))) - : ((Di = k2("state")), - (S2[Di] = !0), - (Zn = h(function (r, e) { - if (Cl(r, Di)) throw new vl(Rf); - return (e.facade = r), A2(r, Di, e), e; + : ((hi = o2("state")), + (u2[hi] = !0), + (zn = a(function (i, e) { + if (du(i, hi)) throw mu(Rf); + return (e.facade = i), s2(i, hi, e), e; }, "set")), - (Or = h(function (r) { - return Cl(r, Di) ? r[Di] : {}; + (Sr = a(function (i) { + return du(i, hi) ? i[hi] : {}; }, "get")), - (es = h(function (r) { - return Cl(r, Di); + (Hn = a(function (i) { + return du(i, hi); }, "has"))); - var Ct, Di; - Mf.exports = { set: Zn, get: Or, has: es, enforce: Q2, getterFor: _2 }; + var Dt, hi; + $f.exports = { set: zn, get: Sr, has: Hn, enforce: a2, getterFor: h2 }; }); - var kl = x((d4, $f) => { - "use strict"; - var Al = Ne(), - U2 = Je(), - L2 = Te(), - is = Et(), - xl = Ge(), - O2 = Gn().CONFIGURABLE, - T2 = El(), - If = ts(), - R2 = If.enforce, - N2 = If.get, + var bu = k((Lx, qf) => { + var Du = ze(), + c2 = Ge(), + f2 = $e(), + jn = gt(), + gu = rt(), + d2 = In().CONFIGURABLE, + p2 = fu(), + Lf = Wn(), + m2 = Lf.enforce, + g2 = Lf.get, Pf = String, - rs = Object.defineProperty, - M2 = Al("".slice), - P2 = Al("".replace), - I2 = Al([].join), - $2 = - xl && - !U2(function () { - return rs(function () {}, "length", { value: 8 }).length !== 8; + Un = Object.defineProperty, + D2 = Du("".slice), + b2 = Du("".replace), + F2 = Du([].join), + y2 = + gu && + !c2(function () { + return Un(function () {}, "length", { value: 8 }).length !== 8; }), - q2 = String(String).split("String"), - V2 = ($f.exports = function V2(r, e, t) { - M2(Pf(e), 0, 7) === "Symbol(" && (e = "[" + P2(Pf(e), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), t && t.getter && (e = "get " + e), t && t.setter && (e = "set " + e), (!is(r, "name") || (O2 && r.name !== e)) && (xl ? rs(r, "name", { value: e, configurable: !0 }) : (r.name = e)), $2 && t && is(t, "arity") && r.length !== t.arity && rs(r, "length", { value: t.arity }); + C2 = String(String).split("String"), + A2 = (qf.exports = function A2(i, e, t) { + D2(Pf(e), 0, 7) === "Symbol(" && (e = "[" + b2(Pf(e), /^Symbol\(([^)]*)\)/, "$1") + "]"), t && t.getter && (e = "get " + e), t && t.setter && (e = "set " + e), (!jn(i, "name") || (d2 && i.name !== e)) && (gu ? Un(i, "name", { value: e, configurable: !0 }) : (i.name = e)), y2 && t && jn(t, "arity") && i.length !== t.arity && Un(i, "length", { value: t.arity }); try { - t && is(t, "constructor") && t.constructor ? xl && rs(r, "prototype", { writable: !1 }) : r.prototype && (r.prototype = void 0); + t && jn(t, "constructor") && t.constructor ? gu && Un(i, "prototype", { writable: !1 }) : i.prototype && (i.prototype = void 0); } catch (e) {} - var i = R2(r); - return is(i, "source") || (i.source = I2(q2, typeof e == "string" ? e : "")), r; + var r = m2(i); + return jn(r, "source") || (r.source = F2(C2, typeof e == "string" ? e : "")), i; }); - Function.prototype.toString = V2( - h(function () { - return (L2(this) && N2(this).source) || T2(this); + Function.prototype.toString = A2( + a(function () { + return (f2(this) && g2(this).source) || p2(this); }, "toString"), - "toString", + "toString" ); }); - var ji = x((m4, qf) => { - "use strict"; - var W2 = Te(), - z2 = St(), - H2 = kl(), - j2 = zn(); - qf.exports = function (r, e, t, i) { - i || (i = {}); - var n = i.enumerable, - s = i.name !== void 0 ? i.name : e; - if ((W2(t) && H2(t, s, i), i.global)) n ? (r[e] = t) : j2(e, t); + var Vi = k((Ix, If) => { + var E2 = $e(), + v2 = kt(), + k2 = bu(), + w2 = Rn(); + If.exports = function (i, e, t, r) { + r || (r = {}); + var n = r.enumerable, + s = r.name !== void 0 ? r.name : e; + if ((E2(t) && k2(t, s, r), r.global)) n ? (i[e] = t) : w2(e, t); else { try { - i.unsafe ? r[e] && (n = !0) : delete r[e]; + r.unsafe ? i[e] && (n = !0) : delete i[e]; } catch (e) {} - n ? (r[e] = t) : z2.f(r, e, { value: t, enumerable: !1, configurable: !i.nonConfigurable, writable: !i.nonWritable }); + n ? (i[e] = t) : v2.f(i, e, { value: t, enumerable: !1, configurable: !r.nonConfigurable, writable: !r.nonWritable }); } - return r; + return i; }; }); - var Wf = x((g4, Vf) => { - "use strict"; - var Y2 = Math.ceil, - J2 = Math.floor; - Vf.exports = + var Vf = k((Nx, Nf) => { + var x2 = Math.ceil, + S2 = Math.floor; + Nf.exports = Math.trunc || - h(function (e) { + a(function (e) { var t = +e; - return (t > 0 ? J2 : Y2)(t); + return (t > 0 ? S2 : x2)(t); }, "trunc"); }); - var Sl = x((F4, zf) => { - "use strict"; - var G2 = Wf(); - zf.exports = function (r) { - var e = +r; - return e !== e || e === 0 ? 0 : G2(e); + var Fu = k((zx, zf) => { + var B2 = Vf(); + zf.exports = function (i) { + var e = +i; + return e !== e || e === 0 ? 0 : B2(e); }; }); - var jf = x((b4, Hf) => { - "use strict"; - var X2 = Sl(), - K2 = Math.max, - Z2 = Math.min; - Hf.exports = function (r, e) { - var t = X2(r); - return t < 0 ? K2(t + e, 0) : Z2(t, e); + var yu = k((Hx, Hf) => { + var _2 = Fu(), + O2 = Math.max, + T2 = Math.min; + Hf.exports = function (i, e) { + var t = _2(i); + return t < 0 ? O2(t + e, 0) : T2(t, e); }; }); - var Jf = x((y4, Yf) => { - "use strict"; - var ey = Sl(), - ty = Math.min; - Yf.exports = function (r) { - var e = ey(r); - return e > 0 ? ty(e, 9007199254740991) : 0; + var jf = k((Wx, Wf) => { + var R2 = Fu(), + M2 = Math.min; + Wf.exports = function (i) { + return i > 0 ? M2(R2(i), 9007199254740991) : 0; }; }); - var Tr = x((E4, Gf) => { - "use strict"; - var iy = Jf(); - Gf.exports = function (r) { - return iy(r.length); + var zi = k((jx, Uf) => { + var $2 = jf(); + Uf.exports = function (i) { + return $2(i.length); }; }); - var Zf = x((C4, Kf) => { - "use strict"; - var ry = Vi(), - ny = jf(), - sy = Tr(), - Xf = h(function (r) { - return function (e, t, i) { - var n = ry(e), - s = sy(n); - if (s === 0) return !r && -1; - var o = ny(i, s), - l; - if (r && t !== t) { - for (; s > o; ) if (((l = n[o++]), l !== l)) return !0; - } else for (; s > o; o++) if ((r || o in n) && n[o] === t) return r || o || 0; - return !r && -1; + var Kf = k((Ux, Yf) => { + var P2 = Li(), + L2 = yu(), + q2 = zi(), + Gf = a(function (i) { + return function (e, t, r) { + var n = P2(e), + s = q2(n), + o = L2(r, s), + u; + if (i && t != t) { + for (; s > o; ) if (((u = n[o++]), u != u)) return !0; + } else for (; s > o; o++) if ((i || o in n) && n[o] === t) return i || o || 0; + return !i && -1; }; }, "createMethod"); - Kf.exports = { includes: Xf(!0), indexOf: Xf(!1) }; + Yf.exports = { includes: Gf(!0), indexOf: Gf(!1) }; }); - var Ql = x((v4, td) => { - "use strict"; - var oy = Ne(), - wl = Et(), - ly = Vi(), - uy = Zf().indexOf, - ay = Kn(), - ed = oy([].push); - td.exports = function (r, e) { - var t = ly(r), - i = 0, + var Au = k((Yx, Qf) => { + var I2 = ze(), + Cu = gt(), + N2 = Li(), + V2 = Kf().indexOf, + z2 = Vn(), + Xf = I2([].push); + Qf.exports = function (i, e) { + var t = N2(i), + r = 0, n = [], s; - for (s in t) !wl(ay, s) && wl(t, s) && ed(n, s); - for (; e.length > i; ) wl(t, (s = e[i++])) && (~uy(n, s) || ed(n, s)); + for (s in t) !Cu(z2, s) && Cu(t, s) && Xf(n, s); + for (; e.length > r; ) Cu(t, (s = e[r++])) && (~V2(n, s) || Xf(n, s)); return n; }; }); - var ns = x((x4, id) => { - "use strict"; - id.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"]; + var Gn = k((Kx, Jf) => { + Jf.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"]; }); - var nd = x((rd) => { - "use strict"; - var hy = Ql(), - cy = ns(), - fy = cy.concat("length", "prototype"); - rd.f = + var ed = k((Zf) => { + var H2 = Au(), + W2 = Gn(), + j2 = W2.concat("length", "prototype"); + Zf.f = Object.getOwnPropertyNames || - h(function (e) { - return hy(e, fy); + a(function (e) { + return H2(e, j2); }, "getOwnPropertyNames"); }); - var od = x((sd) => { - "use strict"; - sd.f = Object.getOwnPropertySymbols; + var id = k((td) => { + td.f = Object.getOwnPropertySymbols; }); - var ud = x((w4, ld) => { - "use strict"; - var dy = Lr(), - py = Ne(), - my = nd(), - gy = od(), - Dy = Wt(), - Fy = py([].concat); - ld.exports = - dy("Reflect", "ownKeys") || - h(function (e) { - var t = my.f(Dy(e)), - i = gy.f; - return i ? Fy(t, i(e)) : t; + var nd = k((Zx, rd) => { + var U2 = xr(), + G2 = ze(), + Y2 = ed(), + K2 = id(), + X2 = vt(), + Q2 = G2([].concat); + rd.exports = + U2("Reflect", "ownKeys") || + a(function (e) { + var t = Y2.f(X2(e)), + r = K2.f; + return r ? Q2(t, r(e)) : t; }, "ownKeys"); }); - var cd = x((_4, hd) => { - "use strict"; - var ad = Et(), - by = ud(), - yy = fl(), - Ey = St(); - hd.exports = function (r, e, t) { - for (var i = by(e), n = Ey.f, s = yy.f, o = 0; o < i.length; o++) { - var l = i[o]; - !ad(r, l) && !(t && ad(t, l)) && n(r, l, s(e, l)); + var ud = k((tS, od) => { + var sd = gt(), + J2 = nd(), + Z2 = ru(), + ey = kt(); + od.exports = function (i, e, t) { + for (var r = J2(e), n = ey.f, s = Z2.f, o = 0; o < r.length; o++) { + var u = r[o]; + !sd(i, u) && !(t && sd(t, u)) && n(i, u, s(e, u)); } }; }); - var dd = x((U4, fd) => { - "use strict"; - var Cy = Je(), - By = Te(), - vy = /#|\.prototype\./, - Rr = h(function (r, e) { - var t = Ay[xy(r)]; - return t === Sy ? !0 : t === ky ? !1 : By(e) ? Cy(e) : !!e; + var ad = k((iS, ld) => { + var ty = Ge(), + iy = $e(), + ry = /#|\.prototype\./, + Br = a(function (i, e) { + var t = sy[ny(i)]; + return t == uy ? !0 : t == oy ? !1 : iy(e) ? ty(e) : !!e; }, "isForced"), - xy = (Rr.normalize = function xy(r) { - return String(r).replace(vy, ".").toLowerCase(); + ny = (Br.normalize = function ny(i) { + return String(i).replace(ry, ".").toLowerCase(); }), - Ay = (Rr.data = {}), - ky = (Rr.NATIVE = "N"), - Sy = (Rr.POLYFILL = "P"); - fd.exports = Rr; + sy = (Br.data = {}), + oy = (Br.NATIVE = "N"), + uy = (Br.POLYFILL = "P"); + ld.exports = Br; }); - var Fi = x((O4, pd) => { - "use strict"; - var ss = tt(), - wy = fl().f, - Qy = Jn(), - _y = ji(), - Uy = zn(), - Ly = cd(), - Oy = dd(); - pd.exports = function (r, e) { - var t = r.target, - i = r.global, - n = r.stat, + var ci = k((nS, hd) => { + var Eu = it(), + ly = ru().f, + ay = qn(), + hy = Vi(), + cy = Rn(), + fy = ud(), + dy = ad(); + hd.exports = function (i, e) { + var t = i.target, + r = i.global, + n = i.stat, s, o, - l, u, - a, + l, + h, c; - if ((i ? (o = ss) : n ? (o = ss[t] || Uy(t, {})) : (o = ss[t] && ss[t].prototype), o)) - for (l in e) { - if (((a = e[l]), r.dontCallGetSet ? ((c = wy(o, l)), (u = c && c.value)) : (u = o[l]), (s = Oy(i ? l : t + (n ? "." : "#") + l, r.forced)), !s && u !== void 0)) { - if (typeof a == typeof u) continue; - Ly(a, u); + if ((r ? (o = Eu) : n ? (o = Eu[t] || cy(t, {})) : (o = (Eu[t] || {}).prototype), o)) + for (u in e) { + if (((h = e[u]), i.dontCallGetSet ? ((c = ly(o, u)), (l = c && c.value)) : (l = o[u]), (s = dy(r ? u : t + (n ? "." : "#") + u, i.forced)), !s && l !== void 0)) { + if (typeof h == typeof l) continue; + fy(h, l); } - (r.sham || (u && u.sham)) && Qy(a, "sham", !0), _y(o, l, a, r); + (i.sham || (l && l.sham)) && ay(h, "sham", !0), hy(o, u, h, i); } }; }); - var _l = x((T4, md) => { - "use strict"; - var Ty = _r67(); - md.exports = + var vu = k((sS, cd) => { + var py = wr(); + cd.exports = Array.isArray || - h(function (e) { - return Ty(e) === "Array"; + a(function (e) { + return py(e) == "Array"; }, "isArray"); }); - var Dd = x((N4, gd) => { - "use strict"; - var Ry = TypeError, - Ny = 9007199254740991; - gd.exports = function (r) { - if (r > Ny) throw Ry("Maximum allowed index exceeded"); - return r; + var dd = k((uS, fd) => { + var my = TypeError, + gy = 9007199254740991; + fd.exports = function (i) { + if (i > gy) throw my("Maximum allowed index exceeded"); + return i; }; }); - var bd = x((M4, Fd) => { - "use strict"; - var My = _r67(), - Py = Ne(); - Fd.exports = function (r) { - if (My(r) === "Function") return Py(r); + var md = k((lS, pd) => { + var Dy = wr(), + by = ze(); + pd.exports = function (i) { + if (Dy(i) === "Function") return by(i); }; }); - var os = x((P4, Ed) => { - "use strict"; - var yd = bd(), - Iy = Wi(), - $y = Mn(), - qy = yd(yd.bind); - Ed.exports = function (r, e) { + var Yn = k((aS, Dd) => { + var gd = md(), + Fy = qi(), + yy = kn(), + Cy = gd(gd.bind); + Dd.exports = function (i, e) { return ( - Iy(r), + Fy(i), e === void 0 - ? r - : $y - ? qy(r, e) - : function () { - return r.apply(e, arguments); - } + ? i + : yy + ? Cy(i, e) + : function () { + return i.apply(e, arguments); + } ); }; }); - var vd = x((I4, Bd) => { + var yd = k((hS, Fd) => { "use strict"; - var Vy = _l(), - Wy = Tr(), - zy = Dd(), - Hy = os(), - Cd = h(function (r, e, t, i, n, s, o, l) { - for (var u = n, a = 0, c = o ? Hy(o, l) : !1, f, d; a < i; ) a in t && ((f = c ? c(t[a], a, e) : t[a]), s > 0 && Vy(f) ? ((d = Wy(f)), (u = Cd(r, e, f, d, u, s - 1) - 1)) : (zy(u + 1), (r[u] = f)), u++), a++; - return u; + var Ay = vu(), + Ey = zi(), + vy = dd(), + ky = Yn(), + bd = a(function (i, e, t, r, n, s, o, u) { + for (var l = n, h = 0, c = o ? ky(o, u) : !1, f, d; h < r; ) h in t && ((f = c ? c(t[h], h, e) : t[h]), s > 0 && Ay(f) ? ((d = Ey(f)), (l = bd(i, e, f, d, l, s - 1) - 1)) : (vy(l + 1), (i[l] = f)), l++), h++; + return l; }, "flattenIntoArray"); - Bd.exports = Cd; + Fd.exports = bd; }); - var kd = x((q4, Ad) => { - "use strict"; - var jy = it(), - Yy = jy("toStringTag"), - xd = {}; - xd[Yy] = "z"; - Ad.exports = String(xd) === "[object z]"; + var Ed = k((fS, Ad) => { + var wy = Qe(), + xy = wy("toStringTag"), + Cd = {}; + Cd[xy] = "z"; + Ad.exports = String(Cd) === "[object z]"; }); - var Nr = x((V4, Sd) => { - "use strict"; - var Jy = kd(), - Gy = Te(), - ls = _r67(), - Xy = it(), - Ky = Xy("toStringTag"), - Zy = Object, - eE = - ls( + var _r = k((dS, vd) => { + var Sy = Ed(), + By = $e(), + Kn = wr(), + _y = Qe(), + Oy = _y("toStringTag"), + Ty = Object, + Ry = + Kn( (function () { return arguments; - })(), - ) === "Arguments", - tE = h(function (r, e) { + })() + ) == "Arguments", + My = a(function (i, e) { try { - return r[e]; + return i[e]; } catch (e) {} }, "tryGet"); - Sd.exports = Jy - ? ls - : function (r) { - var e, t, i; - return r === void 0 ? "Undefined" : r === null ? "Null" : typeof (t = tE((e = Zy(r)), Ky)) == "string" ? t : eE ? ls(e) : (i = ls(e)) === "Object" && Gy(e.callee) ? "Arguments" : i; + vd.exports = Sy + ? Kn + : function (i) { + var e, t, r; + return i === void 0 ? "Undefined" : i === null ? "Null" : typeof (t = My((e = Ty(i)), Oy)) == "string" ? t : Ry ? Kn(e) : (r = Kn(e)) == "Object" && By(e.callee) ? "Arguments" : r; }; }); - var Od = x((z4, Ld) => { - "use strict"; - var iE = Ne(), - rE = Je(), - wd = Te(), - nE = Nr(), - sE = Lr(), - oE = El(), - Qd = h(function () {}, "noop"), - _d = sE("Reflect", "construct"), - Ul = /^\s*(?:class|function)\b/, - lE = iE(Ul.exec), - uE = !Ul.test(Qd), - Mr = h(function (e) { - if (!wd(e)) return !1; + var _d = k((mS, Bd) => { + var $y = ze(), + Py = Ge(), + kd = $e(), + Ly = _r(), + qy = xr(), + Iy = fu(), + wd = a(function () {}, "noop"), + Ny = [], + xd = qy("Reflect", "construct"), + ku = /^\s*(?:class|function)\b/, + Vy = $y(ku.exec), + zy = !ku.exec(wd), + Or = a(function (e) { + if (!kd(e)) return !1; try { - return _d(Qd, [], e), !0; + return xd(wd, Ny, e), !0; } catch (e) { return !1; } }, "isConstructor"), - Ud = h(function (e) { - if (!wd(e)) return !1; - switch (nE(e)) { + Sd = a(function (e) { + if (!kd(e)) return !1; + switch (Ly(e)) { case "AsyncFunction": case "GeneratorFunction": case "AsyncGeneratorFunction": return !1; } try { - return uE || !!lE(Ul, oE(e)); + return zy || !!Vy(ku, Iy(e)); } catch (e) { return !0; } }, "isConstructor"); - Ud.sham = !0; - Ld.exports = - !_d || - rE(function () { - var r; + Sd.sham = !0; + Bd.exports = + !xd || + Py(function () { + var i; return ( - Mr(Mr.call) || - !Mr(Object) || - !Mr(function () { - r = !0; + Or(Or.call) || + !Or(Object) || + !Or(function () { + i = !0; }) || - r + i ); }) - ? Ud - : Mr; + ? Sd + : Or; }); - var Md = x((j4, Nd) => { - "use strict"; - var Td = _l(), - aE = Od(), - hE = bt(), - cE = it(), - fE = cE("species"), - Rd = Array; - Nd.exports = function (r) { + var Md = k((DS, Rd) => { + var Od = vu(), + Hy = _d(), + Wy = Lt(), + jy = Qe(), + Uy = jy("species"), + Td = Array; + Rd.exports = function (i) { var e; - return Td(r) && ((e = r.constructor), aE(e) && (e === Rd || Td(e.prototype)) ? (e = void 0) : hE(e) && ((e = e[fE]), e === null && (e = void 0))), e === void 0 ? Rd : e; + return Od(i) && ((e = i.constructor), Hy(e) && (e === Td || Od(e.prototype)) ? (e = void 0) : Wy(e) && ((e = e[Uy]), e === null && (e = void 0))), e === void 0 ? Td : e; }; }); - var Id = x((Y4, Pd) => { - "use strict"; - var dE = Md(); - Pd.exports = function (r, e) { - return new (dE(r))(e === 0 ? 0 : e); + var Pd = k((bS, $d) => { + var Gy = Md(); + $d.exports = function (i, e) { + return new (Gy(i))(e === 0 ? 0 : e); }; }); - var $d = x(() => { - "use strict"; - var pE = Fi(), - mE = vd(), - gE = Wi(), - DE = jn(), - FE = Tr(), - bE = Id(); - pE( - { target: "Array", proto: !0 }, - { - flatMap: h(function (e) { - var t = DE(this), - i = FE(t), - n; - return gE(e), (n = bE(t, 0)), (n.length = mE(n, t, t, i, 0, 1, e, arguments.length > 1 ? arguments[1] : void 0)), n; - }, "flatMap"), - }, - ); - }); - var Yi = x((K4, qd) => { - "use strict"; - qd.exports = {}; + var Hi = k((yS, Ld) => { + Ld.exports = {}; }); - var Wd = x((Z4, Vd) => { - "use strict"; - var yE = it(), - EE = Yi(), - CE = yE("iterator"), - BE = Array.prototype; - Vd.exports = function (r) { - return r !== void 0 && (EE.Array === r || BE[CE] === r); + var Id = k((CS, qd) => { + var eC = Qe(), + tC = Hi(), + iC = eC("iterator"), + rC = Array.prototype; + qd.exports = function (i) { + return i !== void 0 && (tC.Array === i || rC[iC] === i); }; }); - var us = x((e3, Hd) => { - "use strict"; - var vE = Nr(), - zd = Wn(), - xE = In(), - AE = Yi(), - kE = it(), - SE = kE("iterator"); - Hd.exports = function (r) { - if (!xE(r)) return zd(r, SE) || zd(r, "@@iterator") || AE[vE(r)]; + var Xn = k((AS, Vd) => { + var nC = _r(), + Nd = Tn(), + sC = xn(), + oC = Hi(), + uC = Qe(), + lC = uC("iterator"); + Vd.exports = function (i) { + if (!sC(i)) return Nd(i, lC) || Nd(i, "@@iterator") || oC[nC(i)]; }; }); - var Ll = x((t3, jd) => { - "use strict"; - var wE = Vt(), - QE = Wi(), - _E = Wt(), - UE = Vn(), - LE = us(), - OE = TypeError; - jd.exports = function (r, e) { - var t = arguments.length < 2 ? LE(r) : e; - if (QE(t)) return _E(wE(t, r)); - throw new OE(UE(r) + " is not iterable"); + var wu = k((ES, zd) => { + var aC = Pt(), + hC = qi(), + cC = vt(), + fC = On(), + dC = Xn(), + pC = TypeError; + zd.exports = function (i, e) { + var t = arguments.length < 2 ? dC(i) : e; + if (hC(t)) return cC(aC(t, i)); + throw pC(fC(i) + " is not iterable"); }; }); - var Gd = x((i3, Jd) => { - "use strict"; - var TE = Vt(), - Yd = Wt(), - RE = Wn(); - Jd.exports = function (r, e, t) { - var i, n; - Yd(r); + var jd = k((vS, Wd) => { + var mC = Pt(), + Hd = vt(), + gC = Tn(); + Wd.exports = function (i, e, t) { + var r, n; + Hd(i); try { - if (((i = RE(r, "return")), !i)) { + if (((r = gC(i, "return")), !r)) { if (e === "throw") throw t; return t; } - i = TE(i, r); + r = mC(r, i); } catch (s) { - (n = !0), (i = s); + (n = !0), (r = s); } if (e === "throw") throw t; - if (n) throw i; - return Yd(i), t; + if (n) throw r; + return Hd(r), t; }; }); - var tp = x((r3, ep) => { - "use strict"; - var NE = os(), - ME = Vt(), - PE = Wt(), - IE = Vn(), - $E = Wd(), - qE = Tr(), - Xd = $n(), - VE = Ll(), - WE = us(), - Kd = Gd(), - zE = TypeError, - as = h(function (r, e) { - (this.stopped = r), (this.result = e); + var Xd = k((kS, Kd) => { + var DC = Yn(), + bC = Pt(), + FC = vt(), + yC = On(), + CC = Id(), + AC = zi(), + Ud = Bn(), + EC = wu(), + vC = Xn(), + Gd = jd(), + kC = TypeError, + Qn = a(function (i, e) { + (this.stopped = i), (this.result = e); }, "Result"), - Zd = as.prototype; - ep.exports = function (r, e, t) { - var i = t && t.that, + Yd = Qn.prototype; + Kd.exports = function (i, e, t) { + var r = t && t.that, n = !!(t && t.AS_ENTRIES), s = !!(t && t.IS_RECORD), o = !!(t && t.IS_ITERATOR), - l = !!(t && t.INTERRUPTED), - u = NE(e, i), - a, + u = !!(t && t.INTERRUPTED), + l = DC(e, r), + h, c, f, d, p, m, - F, - g = h(function (b) { - return a && Kd(a, "normal", b), new as(!0, b); + b, + g = a(function (F) { + return h && Gd(h, "normal", F), new Qn(!0, F); }, "stop"), - D = h(function (b) { - return n ? (PE(b), l ? u(b[0], b[1], g) : u(b[0], b[1])) : l ? u(b, g) : u(b); + D = a(function (F) { + return n ? (FC(F), u ? l(F[0], F[1], g) : l(F[0], F[1])) : u ? l(F, g) : l(F); }, "callFn"); - if (s) a = r.iterator; - else if (o) a = r; + if (s) h = i.iterator; + else if (o) h = i; else { - if (((c = WE(r)), !c)) throw new zE(IE(r) + " is not iterable"); - if ($E(c)) { - for (f = 0, d = qE(r); d > f; f++) if (((p = D(r[f])), p && Xd(Zd, p))) return p; - return new as(!1); + if (((c = vC(i)), !c)) throw kC(yC(i) + " is not iterable"); + if (CC(c)) { + for (f = 0, d = AC(i); d > f; f++) if (((p = D(i[f])), p && Ud(Yd, p))) return p; + return new Qn(!1); } - a = VE(r, c); + h = EC(i, c); } - for (m = s ? r.next : a.next; !(F = ME(m, a)).done; ) { + for (m = s ? i.next : h.next; !(b = bC(m, h)).done; ) { try { - p = D(F.value); - } catch (b) { - Kd(a, "throw", b); + p = D(b.value); + } catch (F) { + Gd(h, "throw", F); } - if (typeof p == "object" && p && Xd(Zd, p)) return p; + if (typeof p == "object" && p && Ud(Yd, p)) return p; } - return new as(!1); + return new Qn(!1); }; }); - var rp = x((s3, ip) => { + var xu = k((xS, Qd) => { "use strict"; - var HE = Ge(), - jE = St(), - YE = qi(); - ip.exports = function (r, e, t) { - HE ? jE.f(r, e, YE(0, t)) : (r[e] = t); + var wC = Pn(), + xC = kt(), + SC = Pi(); + Qd.exports = function (i, e, t) { + var r = wC(e); + r in i ? xC.f(i, r, SC(0, t)) : (i[r] = t); }; }); - var np = x(() => { - "use strict"; - var JE = Fi(), - GE = tp(), - XE = rp(); - JE( - { target: "Object", stat: !0 }, - { - fromEntries: h(function (e) { - var t = {}; - return ( - GE( - e, - function (i, n) { - XE(t, i, n); - }, - { AS_ENTRIES: !0 }, - ), - t - ); - }, "fromEntries"), - }, - ); - }); - var Ol = x((a3, sp) => { - "use strict"; - var KE = Nr(), - ZE = String; - sp.exports = function (r) { - if (KE(r) === "Symbol") throw new TypeError("Cannot convert a Symbol value to a string"); - return ZE(r); + var Su = k((BS, Jd) => { + var TC = _r(), + RC = String; + Jd.exports = function (i) { + if (TC(i) === "Symbol") throw TypeError("Cannot convert a Symbol value to a string"); + return RC(i); }; }); - var Tl = x((h3, op) => { - "use strict"; - op.exports = " \n\v\f\r \xa0               \u2028\u2029\uFEFF"; + var Bu = k((_S, Zd) => { + Zd.exports = " \n\v\f\r \xa0               \u2028\u2029\uFEFF"; }); - var ap = x((c3, up) => { - "use strict"; - var eC = Ne(), - tC = Ur(), - iC = Ol(), - Nl = Tl(), - lp = eC("".replace), - rC = RegExp("^[" + Nl + "]+"), - nC = RegExp("(^|[^" + Nl + "])[" + Nl + "]+$"), - Rl = h(function (r) { + var ip = k((OS, tp) => { + var MC = ze(), + $C = Sn(), + PC = Su(), + Ou = Bu(), + ep = MC("".replace), + LC = RegExp("^[" + Ou + "]+"), + qC = RegExp("(^|[^" + Ou + "])[" + Ou + "]+$"), + _u = a(function (i) { return function (e) { - var t = iC(tC(e)); - return r & 1 && (t = lp(t, rC, "")), r & 2 && (t = lp(t, nC, "$1")), t; + var t = PC($C(e)); + return i & 1 && (t = ep(t, LC, "")), i & 2 && (t = ep(t, qC, "$1")), t; }; }, "createMethod"); - up.exports = { start: Rl(1), end: Rl(2), trim: Rl(3) }; + tp.exports = { start: _u(1), end: _u(2), trim: _u(3) }; }); - var dp = x((d3, fp) => { - "use strict"; - var sC = Gn().PROPER, - oC = Je(), - hp = Tl(), - cp = "​\x85᠎"; - fp.exports = function (r) { - return oC(function () { - return !!hp[r]() || cp[r]() !== cp || (sC && hp[r].name !== r); + var op = k((RS, sp) => { + var IC = In().PROPER, + NC = Ge(), + rp = Bu(), + np = "​\x85᠎"; + sp.exports = function (i) { + return NC(function () { + return !!rp[i]() || np[i]() !== np || (IC && rp[i].name !== i); }); }; }); - var Ml = x((p3, pp) => { + var Tu = k((MS, up) => { "use strict"; - var lC = ap().end, - uC = dp(); - pp.exports = uC("trimEnd") - ? h(function () { - return lC(this); + var VC = ip().end, + zC = op(); + up.exports = zC("trimEnd") + ? a(function () { + return VC(this); }, "trimEnd") : "".trimEnd; }); - var gp = x(() => { - "use strict"; - var aC = Fi(), - mp = Ml(); - aC({ target: "String", proto: !0, name: "trimEnd", forced: "".trimRight !== mp }, { trimRight: mp }); - }); - var Fp = x(() => { - "use strict"; - gp(); - var hC = Fi(), - Dp = Ml(); - hC({ target: "String", proto: !0, name: "trimEnd", forced: "".trimEnd !== Dp }, { trimEnd: Dp }); + var ap = k(() => { + var HC = ci(), + lp = Tu(); + HC({ target: "String", proto: !0, name: "trimEnd", forced: "".trimRight !== lp }, { trimRight: lp }); }); - var yp = x((y3, bp) => { - "use strict"; - var cC = Ql(), - fC = ns(); - bp.exports = + var fp = k((qS, cp) => { + var jC = Au(), + UC = Gn(); + cp.exports = Object.keys || - h(function (e) { - return cC(e, fC); + a(function (e) { + return jC(e, UC); }, "keys"); }); - var Cp = x((Ep) => { - "use strict"; - var dC = Ge(), - pC = dl(), - mC = St(), - gC = Wt(), - DC = Vi(), - FC = yp(); - Ep.f = - dC && !pC + var pp = k((dp) => { + var GC = rt(), + YC = nu(), + KC = kt(), + XC = vt(), + QC = Li(), + JC = fp(); + dp.f = + GC && !YC ? Object.defineProperties - : h(function (e, t) { - gC(e); - for (var i = DC(t), n = FC(t), s = n.length, o = 0, l; s > o; ) mC.f(e, (l = n[o++]), i[l]); + : a(function (e, t) { + XC(e); + for (var r = QC(t), n = JC(t), s = n.length, o = 0, u; s > o; ) KC.f(e, (u = n[o++]), r[u]); return e; }, "defineProperties"); }); - var vp = x((v3, Bp) => { - "use strict"; - var bC = Lr(); - Bp.exports = bC("document", "documentElement"); + var gp = k((zS, mp) => { + var ZC = xr(); + mp.exports = ZC("document", "documentElement"); }); - var Pr = x((x3, _p) => { - "use strict"; - var yC = Wt(), - EC = Cp(), - xp = ns(), - CC = Kn(), - BC = vp(), - vC = hl(), - xC = Xn(), - Ap = ">", - kp = "<", - Il = "prototype", - $l = "script", - wp = xC("IE_PROTO"), - Pl = h(function () {}, "EmptyConstructor"), - Qp = h(function (r) { - return kp + $l + Ap + r + kp + "/" + $l + Ap; + var Tr = k((HS, Ep) => { + var eA = vt(), + tA = pp(), + Dp = Gn(), + iA = Vn(), + rA = gp(), + nA = tu(), + sA = Nn(), + bp = ">", + Fp = "<", + Mu = "prototype", + $u = "script", + Cp = sA("IE_PROTO"), + Ru = a(function () {}, "EmptyConstructor"), + Ap = a(function (i) { + return Fp + $u + bp + i + Fp + "/" + $u + bp; }, "scriptTag"), - Sp = h(function (r) { - r.write(Qp("")), r.close(); - var e = r.parentWindow.Object; - return (r = null), e; + yp = a(function (i) { + i.write(Ap("")), i.close(); + var e = i.parentWindow.Object; + return (i = null), e; }, "NullProtoObjectViaActiveX"), - AC = h(function () { - var r = vC("iframe"), - e = "java" + $l + ":", + oA = a(function () { + var i = nA("iframe"), + e = "java" + $u + ":", t; - return (r.style.display = "none"), BC.appendChild(r), (r.src = String(e)), (t = r.contentWindow.document), t.open(), t.write(Qp("document.F=Object")), t.close(), t.F; + return (i.style.display = "none"), rA.appendChild(i), (i.src = String(e)), (t = i.contentWindow.document), t.open(), t.write(Ap("document.F=Object")), t.close(), t.F; }, "NullProtoObjectViaIFrame"), - hs, - cs = h(function () { + Jn, + Zn = a(function () { try { - hs = new ActiveXObject("htmlfile"); + Jn = new ActiveXObject("htmlfile"); } catch (e) {} - cs = typeof document < "u" ? (document.domain && hs ? Sp(hs) : AC()) : Sp(hs); - for (var r = xp.length; r--; ) delete cs[Il][xp[r]]; - return cs(); + Zn = typeof document < "u" ? (document.domain && Jn ? yp(Jn) : oA()) : yp(Jn); + for (var i = Dp.length; i--; ) delete Zn[Mu][Dp[i]]; + return Zn(); }, "NullProtoObject"); - CC[wp] = !0; - _p.exports = + iA[Cp] = !0; + Ep.exports = Object.create || - h(function (e, t) { - var i; - return e !== null ? ((Pl[Il] = yC(e)), (i = new Pl()), (Pl[Il] = null), (i[wp] = e)) : (i = cs()), t === void 0 ? i : EC.f(i, t); + a(function (e, t) { + var r; + return e !== null ? ((Ru[Mu] = eA(e)), (r = new Ru()), (Ru[Mu] = null), (r[Cp] = e)) : (r = Zn()), t === void 0 ? r : tA.f(r, t); }, "create"); }); - var Lp = x((k3, Up) => { - "use strict"; - var kC = it(), - SC = Pr(), - wC = St().f, - ql = kC("unscopables"), - Vl = Array.prototype; - Vl[ql] === void 0 && wC(Vl, ql, { configurable: !0, value: SC(null) }); - Up.exports = function (r) { - Vl[ql][r] = !0; + var kp = k((jS, vp) => { + var uA = Qe(), + lA = Tr(), + aA = kt().f, + Pu = uA("unscopables"), + Lu = Array.prototype; + Lu[Pu] == null && aA(Lu, Pu, { configurable: !0, value: lA(null) }); + vp.exports = function (i) { + Lu[Pu][i] = !0; }; }); - var Tp = x((S3, Op) => { - "use strict"; - var QC = Je(); - Op.exports = !QC(function () { - function r() {} - return h(r, "F"), (r.prototype.constructor = null), Object.getPrototypeOf(new r()) !== r.prototype; + var xp = k((US, wp) => { + var hA = Ge(); + wp.exports = !hA(function () { + function i() {} + return a(i, "F"), (i.prototype.constructor = null), Object.getPrototypeOf(new i()) !== i.prototype; }); }); - var zl = x((Q3, Np) => { - "use strict"; - var _C = Et(), - UC = Te(), - LC = jn(), - OC = Xn(), - TC = Tp(), - Rp = OC("IE_PROTO"), - Wl = Object, - RC = Wl.prototype; - Np.exports = TC - ? Wl.getPrototypeOf - : function (r) { - var e = LC(r); - if (_C(e, Rp)) return e[Rp]; + var Iu = k((YS, Bp) => { + var cA = gt(), + fA = $e(), + dA = $n(), + pA = Nn(), + mA = xp(), + Sp = pA("IE_PROTO"), + qu = Object, + gA = qu.prototype; + Bp.exports = mA + ? qu.getPrototypeOf + : function (i) { + var e = dA(i); + if (cA(e, Sp)) return e[Sp]; var t = e.constructor; - return UC(t) && e instanceof t ? t.prototype : e instanceof Wl ? RC : null; + return fA(t) && e instanceof t ? t.prototype : e instanceof qu ? gA : null; }; }); - var Jl = x((_3, Ip) => { + var Hu = k((KS, Tp) => { "use strict"; - var NC = Je(), - MC = Te(), - PC = bt(), - IC = Pr(), - Mp = zl(), - $C = ji(), - qC = it(), - VC = zi(), - Yl = qC("iterator"), - Pp = !1, - zt, - Hl, - jl; - [].keys && ((jl = [].keys()), "next" in jl ? ((Hl = Mp(Mp(jl))), Hl !== Object.prototype && (zt = Hl)) : (Pp = !0)); - var WC = - !PC(zt) || - NC(function () { - var r = {}; - return zt[Yl].call(r) !== r; + var DA = Ge(), + bA = $e(), + FA = Lt(), + yA = Tr(), + _p = Iu(), + CA = Vi(), + AA = Qe(), + EA = Ii(), + zu = AA("iterator"), + Op = !1, + qt, + Nu, + Vu; + [].keys && ((Vu = [].keys()), "next" in Vu ? ((Nu = _p(_p(Vu))), Nu !== Object.prototype && (qt = Nu)) : (Op = !0)); + var vA = + !FA(qt) || + DA(function () { + var i = {}; + return qt[zu].call(i) !== i; }); - WC ? (zt = {}) : VC && (zt = IC(zt)); - MC(zt[Yl]) || - $C(zt, Yl, function () { + vA ? (qt = {}) : EA && (qt = yA(qt)); + bA(qt[zu]) || + CA(qt, zu, function () { return this; }); - Ip.exports = { IteratorPrototype: zt, BUGGY_SAFARI_ITERATORS: Pp }; + Tp.exports = { IteratorPrototype: qt, BUGGY_SAFARI_ITERATORS: Op }; }); - var fs = x((U3, qp) => { - "use strict"; - var zC = St().f, - HC = Et(), - jC = it(), - $p = jC("toStringTag"); - qp.exports = function (r, e, t) { - r && !t && (r = r.prototype), r && !HC(r, $p) && zC(r, $p, { configurable: !0, value: e }); + var es = k((XS, Mp) => { + var kA = kt().f, + wA = gt(), + xA = Qe(), + Rp = xA("toStringTag"); + Mp.exports = function (i, e, t) { + i && !t && (i = i.prototype), i && !wA(i, Rp) && kA(i, Rp, { configurable: !0, value: e }); }; }); - var Gl = x((L3, Vp) => { + var Wu = k((QS, $p) => { "use strict"; - var YC = Jl().IteratorPrototype, - JC = Pr(), - GC = qi(), - XC = fs(), - KC = Yi(), - ZC = h(function () { + var SA = Hu().IteratorPrototype, + BA = Tr(), + _A = Pi(), + OA = es(), + TA = Hi(), + RA = a(function () { return this; }, "returnThis"); - Vp.exports = function (r, e, t, i) { + $p.exports = function (i, e, t, r) { var n = e + " Iterator"; - return (r.prototype = JC(YC, { next: GC(+!i, t) })), XC(r, n, !1, !0), (KC[n] = ZC), r; + return (i.prototype = BA(SA, { next: _A(+!r, t) })), OA(i, n, !1, !0), (TA[n] = RA), i; }; }); - var zp = x((T3, Wp) => { - "use strict"; - var eB = Ne(), - tB = Wi(); - Wp.exports = function (r, e, t) { + var Lp = k((ZS, Pp) => { + var MA = ze(), + $A = qi(); + Pp.exports = function (i, e, t) { try { - return eB(tB(Object.getOwnPropertyDescriptor(r, e)[t])); + return MA($A(Object.getOwnPropertyDescriptor(i, e)[t])); } catch (e) {} }; }); - var jp = x((R3, Hp) => { - "use strict"; - var iB = bt(); - Hp.exports = function (r) { - return iB(r) || r === null; - }; - }); - var Jp = x((N3, Yp) => { - "use strict"; - var rB = jp(), - nB = String, - sB = TypeError; - Yp.exports = function (r) { - if (rB(r)) return r; - throw new sB("Can't set " + nB(r) + " as a prototype"); + var Ip = k((e7, qp) => { + var PA = $e(), + LA = String, + qA = TypeError; + qp.exports = function (i) { + if (typeof i == "object" || PA(i)) return i; + throw qA("Can't set " + LA(i) + " as a prototype"); }; }); - var Xp = x((M3, Gp) => { - "use strict"; - var oB = zp(), - lB = bt(), - uB = Ur(), - aB = Jp(); - Gp.exports = + var Vp = k((t7, Np) => { + var IA = Lp(), + NA = vt(), + VA = Ip(); + Np.exports = Object.setPrototypeOf || ("__proto__" in {} ? (function () { - var r = !1, + var i = !1, e = {}, t; try { - (t = oB(Object.prototype, "__proto__", "set")), t(e, []), (r = e instanceof Array); + (t = IA(Object.prototype, "__proto__", "set")), t(e, []), (i = e instanceof Array); } catch (e) {} - return h(function (n, s) { - return uB(n), aB(s), lB(n) && (r ? t(n, s) : (n.__proto__ = s)), n; + return a(function (n, s) { + return NA(n), VA(s), i ? t(n, s) : (n.__proto__ = s), n; }, "setPrototypeOf"); })() : void 0); }); - var um = x((I3, lm) => { + var Jp = k((r7, Qp) => { "use strict"; - var hB = Fi(), - cB = Vt(), - ds = zi(), - sm = Gn(), - fB = Te(), - dB = Gl(), - Kp = zl(), - Zp = Xp(), - pB = fs(), - mB = Jn(), - Xl = ji(), - gB = it(), - em = Yi(), - om = Jl(), - DB = sm.PROPER, - FB = sm.CONFIGURABLE, - tm = om.IteratorPrototype, - ps = om.BUGGY_SAFARI_ITERATORS, - Ir = gB("iterator"), - im = "keys", - $r = "values", - rm = "entries", - nm = h(function () { + var zA = ci(), + HA = Pt(), + ts = Ii(), + Kp = In(), + WA = $e(), + jA = Wu(), + zp = Iu(), + Hp = Vp(), + UA = es(), + GA = qn(), + ju = Vi(), + YA = Qe(), + Wp = Hi(), + Xp = Hu(), + KA = Kp.PROPER, + XA = Kp.CONFIGURABLE, + jp = Xp.IteratorPrototype, + is = Xp.BUGGY_SAFARI_ITERATORS, + Rr = YA("iterator"), + Up = "keys", + Mr = "values", + Gp = "entries", + Yp = a(function () { return this; }, "returnThis"); - lm.exports = function (r, e, t, i, n, s, o) { - dB(t, e, i); - var l = h(function (D) { + Qp.exports = function (i, e, t, r, n, s, o) { + jA(t, e, r); + var u = a(function (D) { if (D === n && d) return d; - if (!ps && D && D in c) return c[D]; + if (!is && D in c) return c[D]; switch (D) { - case im: - return h(function () { + case Up: + return a(function () { return new t(this, D); }, "keys"); - case $r: - return h(function () { + case Mr: + return a(function () { return new t(this, D); }, "values"); - case rm: - return h(function () { + case Gp: + return a(function () { return new t(this, D); }, "entries"); } @@ -1933,321 +1755,304 @@ function _ts_generator(thisArg, body) { return new t(this); }; }, "getIterationMethod"), - u = e + " Iterator", - a = !1, - c = r.prototype, - f = c[Ir] || c["@@iterator"] || (n && c[n]), - d = (!ps && f) || l(n), - p = (e === "Array" && c.entries) || f, + l = e + " Iterator", + h = !1, + c = i.prototype, + f = c[Rr] || c["@@iterator"] || (n && c[n]), + d = (!is && f) || u(n), + p = (e == "Array" && c.entries) || f, m, - F, + b, g; if ( - (p && ((m = Kp(p.call(new r()))), m !== Object.prototype && m.next && (!ds && Kp(m) !== tm && (Zp ? Zp(m, tm) : fB(m[Ir]) || Xl(m, Ir, nm)), pB(m, u, !0, !0), ds && (em[u] = nm))), - DB && - n === $r && + (p && ((m = zp(p.call(new i()))), m !== Object.prototype && m.next && (!ts && zp(m) !== jp && (Hp ? Hp(m, jp) : WA(m[Rr]) || ju(m, Rr, Yp)), UA(m, l, !0, !0), ts && (Wp[l] = Yp))), + KA && + n == Mr && f && - f.name !== $r && - (!ds && FB - ? mB(c, "name", $r) - : ((a = !0), - (d = h(function () { - return cB(f, this); + f.name !== Mr && + (!ts && XA + ? GA(c, "name", Mr) + : ((h = !0), + (d = a(function () { + return HA(f, this); }, "values")))), n) ) - if (((F = { values: l($r), keys: s ? d : l(im), entries: l(rm) }), o)) for (g in F) (ps || a || !(g in c)) && Xl(c, g, F[g]); - else hB({ target: e, proto: !0, forced: ps || a }, F); - return (!ds || o) && c[Ir] !== d && Xl(c, Ir, d, { name: n }), (em[e] = d), F; + if (((b = { values: u(Mr), keys: s ? d : u(Up), entries: u(Gp) }), o)) for (g in b) (is || h || !(g in c)) && ju(c, g, b[g]); + else zA({ target: e, proto: !0, forced: is || h }, b); + return (!ts || o) && c[Rr] !== d && ju(c, Rr, d, { name: n }), (Wp[e] = d), b; }; }); - var Kl = x((q3, am) => { - "use strict"; - am.exports = function (r, e) { - return { value: r, done: e }; + var em = k((s7, Zp) => { + Zp.exports = function (i, e) { + return { value: i, done: e }; }; }); - var mm = x((V3, pm) => { + var om = k((o7, sm) => { "use strict"; - var bB = Vi(), - Zl = Lp(), - hm = Yi(), - fm = ts(), - yB = St().f, - EB = um(), - ms = Kl(), - CB = zi(), - BB = Ge(), - dm = "Array Iterator", - vB = fm.set, - xB = fm.getterFor(dm); - pm.exports = EB( + var QA = Li(), + Uu = kp(), + tm = Hi(), + rm = Wn(), + JA = kt().f, + ZA = Jp(), + rs = em(), + eE = Ii(), + tE = rt(), + nm = "Array Iterator", + iE = rm.set, + rE = rm.getterFor(nm); + sm.exports = ZA( Array, "Array", - function (r, e) { - vB(this, { type: dm, target: bB(r), index: 0, kind: e }); + function (i, e) { + iE(this, { type: nm, target: QA(i), index: 0, kind: e }); }, function () { - var r = xB(this), - e = r.target, - t = r.index++; - if (!e || t >= e.length) return (r.target = void 0), ms(void 0, !0); - switch (r.kind) { - case "keys": - return ms(t, !1); - case "values": - return ms(e[t], !1); - } - return ms([t, e[t]], !1); + var i = rE(this), + e = i.target, + t = i.kind, + r = i.index++; + return !e || r >= e.length ? ((i.target = void 0), rs(void 0, !0)) : t == "keys" ? rs(r, !1) : t == "values" ? rs(e[r], !1) : rs([r, e[r]], !1); }, - "values", + "values" ); - var cm = (hm.Arguments = hm.Array); - Zl("keys"); - Zl("values"); - Zl("entries"); - if (!CB && BB && cm.name !== "values") + var im = (tm.Arguments = tm.Array); + Uu("keys"); + Uu("values"); + Uu("entries"); + if (!eE && tE && im.name !== "values") try { - yB(cm, "name", { value: "values" }); + JA(im, "name", { value: "values" }); } catch (e) {} }); - var Fm = x((W3, Dm) => { - "use strict"; - var gm = tt(), - AB = Ge(), - kB = Object.getOwnPropertyDescriptor; - Dm.exports = function (r) { - if (!AB) return gm[r]; - var e = kB(gm, r); - return e && e.value; - }; - }); - var Em = x((z3, ym) => { - "use strict"; - var SB = Je(), - wB = it(), - QB = Ge(), - bm = zi(), - _B = wB("iterator"); - ym.exports = !SB(function () { - var r = new URL("b?a=1&b=2&c=3", "http://a"), - e = r.searchParams, - t = new URLSearchParams("a=1&a=2&b=3"), - i = ""; + var am = k((u7, lm) => { + var nE = Ge(), + sE = Qe(), + oE = rt(), + um = Ii(), + uE = sE("iterator"); + lm.exports = !nE(function () { + var i = new URL("b?a=1&b=2&c=3", "http://a"), + e = i.searchParams, + t = new URLSearchParams("a=1&a=2"), + r = ""; return ( - (r.pathname = "c%20d"), + (i.pathname = "c%20d"), e.forEach(function (n, s) { - e.delete("b"), (i += s + n); + e.delete("b"), (r += s + n); }), t.delete("a", 2), - t.delete("b", void 0), - (bm && (!r.toJSON || !t.has("a", 1) || t.has("a", 2) || !t.has("a", void 0) || t.has("b"))) || - (!e.size && (bm || !QB)) || + (um && (!i.toJSON || !t.has("a", 1) || t.has("a", 2))) || + (!e.size && (um || !oE)) || !e.sort || - r.href !== "http://a/c%20d?a=1&c=3" || + i.href !== "http://a/c%20d?a=1&c=3" || e.get("c") !== "3" || String(new URLSearchParams("?a=1")) !== "a=1" || - !e[_B] || + !e[uE] || new URL("https://a@b").username !== "a" || new URLSearchParams(new URLSearchParams("a=b")).get("a") !== "b" || new URL("http://тест").host !== "xn--e1aybc" || new URL("http://a#б").hash !== "#%D0%B1" || - i !== "a1c3" || + r !== "a1c3" || new URL("http://x", void 0).host !== "x" ); }); }); - var vm = x((H3, Bm) => { - "use strict"; - var Cm = kl(), - UB = St(); - Bm.exports = function (r, e, t) { - return t.get && Cm(t.get, e, { getter: !0 }), t.set && Cm(t.set, e, { setter: !0 }), UB.f(r, e, t); + var fm = k((l7, cm) => { + var hm = bu(), + lE = kt(); + cm.exports = function (i, e, t) { + return t.get && hm(t.get, e, { getter: !0 }), t.set && hm(t.set, e, { setter: !0 }), lE.f(i, e, t); }; }); - var Am = x((j3, xm) => { - "use strict"; - var LB = ji(); - xm.exports = function (r, e, t) { - for (var i in e) LB(r, i, e[i], t); - return r; + var pm = k((a7, dm) => { + var aE = Vi(); + dm.exports = function (i, e, t) { + for (var r in e) aE(i, r, e[r], t); + return i; }; }); - var Sm = x((Y3, km) => { - "use strict"; - var OB = $n(), - TB = TypeError; - km.exports = function (r, e) { - if (OB(e, r)) return r; - throw new TB("Incorrect invocation"); + var gm = k((h7, mm) => { + var hE = Bn(), + cE = TypeError; + mm.exports = function (i, e) { + if (hE(e, i)) return i; + throw cE("Incorrect invocation"); }; }); - var Qm = x((J3, wm) => { - "use strict"; - var RB = TypeError; - wm.exports = function (r, e) { - if (r < e) throw new RB("Not enough arguments"); - return r; + var bm = k((c7, Dm) => { + var fE = TypeError; + Dm.exports = function (i, e) { + if (i < e) throw fE("Not enough arguments"); + return i; }; }); - var Um = x((G3, _m) => { - "use strict"; - var NB = Ne(); - _m.exports = NB([].slice); + var Cm = k((f7, ym) => { + var Fm = yu(), + dE = zi(), + pE = xu(), + mE = Array, + gE = Math.max; + ym.exports = function (i, e, t) { + for (var r = dE(i), n = Fm(e, r), s = Fm(t === void 0 ? r : t, r), o = mE(gE(s - n, 0)), u = 0; n < s; n++, u++) pE(o, u, i[n]); + return (o.length = u), o; + }; }); - var Tm = x((X3, Om) => { - "use strict"; - var Lm = Um(), - MB = Math.floor, - eu = h(function (r, e) { - var t = r.length; - if (t < 8) - for (var i = 1, n, s; i < t; ) { - for (s = i, n = r[i]; s && e(r[s - 1], n) > 0; ) r[s] = r[--s]; - s !== i++ && (r[s] = n); - } - else for (var o = MB(t / 2), l = eu(Lm(r, 0, o), e), u = eu(Lm(r, o), e), a = l.length, c = u.length, f = 0, d = 0; f < a || d < c; ) r[f + d] = f < a && d < c ? (e(l[f], u[d]) <= 0 ? l[f++] : u[d++]) : f < a ? l[f++] : u[d++]; - return r; - }, "sort"); - Om.exports = eu; + var vm = k((d7, Em) => { + var Am = Cm(), + DE = Math.floor, + Gu = a(function (i, e) { + var t = i.length, + r = DE(t / 2); + return t < 8 ? bE(i, e) : FE(i, Gu(Am(i, 0, r), e), Gu(Am(i, r), e), e); + }, "mergeSort"), + bE = a(function (i, e) { + for (var t = i.length, r = 1, n, s; r < t; ) { + for (s = r, n = i[r]; s && e(i[s - 1], n) > 0; ) i[s] = i[--s]; + s !== r++ && (i[s] = n); + } + return i; + }, "insertionSort"), + FE = a(function (i, e, t, r) { + for (var n = e.length, s = t.length, o = 0, u = 0; o < n || u < s; ) i[o + u] = o < n && u < s ? (r(e[o], t[u]) <= 0 ? e[o++] : t[u++]) : o < n ? e[o++] : t[u++]; + return i; + }, "merge"); + Em.exports = Gu; }); - var r0 = x((Z3, i0) => { + var jm = k((m7, Wm) => { "use strict"; - mm(); - var su = Fi(), - ys = tt(), - lu = Fm(), - gs = Vt(), - wt = Ne(), - qr = Ge(), - Ym = Em(), - Jm = ji(), - PB = vm(), - IB = Am(), - $B = fs(), - qB = Gl(), - uu = ts(), - Gm = Sm(), - tu = Te(), - VB = Et(), - WB = os(), - zB = Nr(), - HB = Wt(), - Xm = bt(), - $e = Ol(), - jB = Pr(), - Rm = qi(), - Nm = Ll(), - YB = us(), - Ds = Kl(), - Ji = Qm(), - JB = it(), - GB = Tm(), - XB = JB("iterator"), - Xi = "URLSearchParams", - Km = Xi + "Iterator", - Zm = uu.set, - ut = uu.getterFor(Xi), - KB = uu.getterFor(Km), - Mm = lu("fetch"), - bs = lu("Request"), - Vr = lu("Headers"), - iu = bs && bs.prototype, - Pm = Vr && Vr.prototype, - ZB = ys.RegExp, - ev = ys.TypeError, - e0 = ys.decodeURIComponent, - tv = ys.encodeURIComponent, - iv = wt("".charAt), - Im = wt([].join), - bi = wt([].push), - ou = wt("".replace), - rv = wt([].shift), - $m = wt([].splice), - qm = wt("".split), - nv = wt("".slice), - sv = /\+/g, - Vm = Array(4), - ov = h(function (r) { - return Vm[r - 1] || (Vm[r - 1] = ZB("((?:%[\\da-f]{2}){" + r + "})", "gi")); + om(); + var Ju = ci(), + Ui = it(), + ns = Pt(), + wt = ze(), + ji = rt(), + Pm = am(), + Lm = Vi(), + yE = fm(), + CE = pm(), + AE = es(), + EE = Wu(), + tl = Wn(), + qm = gm(), + Yu = $e(), + vE = gt(), + kE = Yn(), + wE = _r(), + xE = vt(), + Im = Lt(), + He = Su(), + SE = Tr(), + km = Pi(), + Zu = wu(), + BE = Xn(), + Wi = bm(), + _E = Qe(), + OE = vm(), + TE = _E("iterator"), + Pr = "URLSearchParams", + Nm = Pr + "Iterator", + Vm = tl.set, + nt = tl.getterFor(Pr), + RE = tl.getterFor(Nm), + ME = Object.getOwnPropertyDescriptor, + il = a(function (i) { + if (!ji) return Ui[i]; + var e = ME(Ui, i); + return e && e.value; + }, "safeGetBuiltIn"), + wm = il("fetch"), + os = il("Request"), + $r = il("Headers"), + Ku = os && os.prototype, + xm = $r && $r.prototype, + $E = Ui.RegExp, + PE = Ui.TypeError, + zm = Ui.decodeURIComponent, + LE = Ui.encodeURIComponent, + qE = wt("".charAt), + Sm = wt([].join), + fi = wt([].push), + el = wt("".replace), + IE = wt([].shift), + Bm = wt([].splice), + _m = wt("".split), + NE = wt("".slice), + VE = /\+/g, + Om = Array(4), + zE = a(function (i) { + return Om[i - 1] || (Om[i - 1] = $E("((?:%[\\da-f]{2}){" + i + "})", "gi")); }, "percentSequence"), - lv = h(function (r) { + HE = a(function (i) { try { - return e0(r); + return zm(i); } catch (e) { - return r; + return i; } }, "percentDecode"), - Wm = h(function (r) { - var e = ou(r, sv, " "), + Tm = a(function (i) { + var e = el(i, VE, " "), t = 4; try { - return e0(e); + return zm(e); } catch (e1) { - for (; t; ) e = ou(e, ov(t--), lv); + for (; t; ) e = el(e, zE(t--), HE); return e; } }, "deserialize"), - uv = /[!'()~]|%20/g, - av = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+" }, - hv = h(function (r) { - return av[r]; + WE = /[!'()~]|%20/g, + jE = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+" }, + UE = a(function (i) { + return jE[i]; }, "replacer"), - zm = h(function (r) { - return ou(tv(r), uv, hv); + Rm = a(function (i) { + return el(LE(i), WE, UE); }, "serialize"), - ru = qB( - h(function (e, t) { - Zm(this, { type: Km, target: ut(e).entries, index: 0, kind: t }); + Xu = EE( + a(function (e, t) { + Vm(this, { type: Nm, iterator: Zu(nt(e).entries), kind: t }); }, "Iterator"), - Xi, - h(function () { - var e = KB(this), - t = e.target, - i = e.index++; - if (!t || i >= t.length) return (e.target = void 0), Ds(void 0, !0); - var n = t[i]; - switch (e.kind) { - case "keys": - return Ds(n.key, !1); - case "values": - return Ds(n.value, !1); - } - return Ds([n.key, n.value], !1); + "Iterator", + a(function () { + var e = RE(this), + t = e.kind, + r = e.iterator.next(), + n = r.value; + return r.done || (r.value = t === "keys" ? n.key : t === "values" ? n.value : [n.key, n.value]), r; }, "next"), - !0, + !0 ), - t0 = h(function (r) { - (this.entries = []), (this.url = null), r !== void 0 && (Xm(r) ? this.parseObject(r) : this.parseQuery(typeof r == "string" ? (iv(r, 0) === "?" ? nv(r, 1) : r) : $e(r))); + Hm = a(function (i) { + (this.entries = []), (this.url = null), i !== void 0 && (Im(i) ? this.parseObject(i) : this.parseQuery(typeof i == "string" ? (qE(i, 0) === "?" ? NE(i, 1) : i) : He(i))); }, "URLSearchParamsState"); - t0.prototype = { - type: Xi, - bindURL: function bindURL(r) { - (this.url = r), this.update(); + Hm.prototype = { + type: Pr, + bindURL: function bindURL(i) { + (this.url = i), this.update(); }, - parseObject: function parseObject(r) { - var e = this.entries, - t = YB(r), - i, + parseObject: function parseObject(i) { + var e = BE(i), + t, + r, n, s, o, - l, u, - a; - if (t) - for (i = Nm(r, t), n = i.next; !(s = gs(n, i)).done; ) { - if (((o = Nm(HB(s.value))), (l = o.next), (u = gs(l, o)).done || (a = gs(l, o)).done || !gs(l, o).done)) throw new ev("Expected sequence with length 2"); - bi(e, { key: $e(u.value), value: $e(a.value) }); + l; + if (e) + for (t = Zu(i, e), r = t.next; !(n = ns(r, t)).done; ) { + if (((s = Zu(xE(n.value))), (o = s.next), (u = ns(o, s)).done || (l = ns(o, s)).done || !ns(o, s).done)) throw PE("Expected sequence with length 2"); + fi(this.entries, { key: He(u.value), value: He(l.value) }); } - else for (var c in r) VB(r, c) && bi(e, { key: c, value: $e(r[c]) }); + else for (var h in i) vE(i, h) && fi(this.entries, { key: h, value: He(i[h]) }); }, - parseQuery: function parseQuery(r) { - if (r) for (var e = this.entries, t = qm(r, "&"), i = 0, n, s; i < t.length; ) (n = t[i++]), n.length && ((s = qm(n, "=")), bi(e, { key: Wm(rv(s)), value: Wm(Im(s, "=")) })); + parseQuery: function parseQuery(i) { + if (i) for (var e = _m(i, "&"), t = 0, r, n; t < e.length; ) (r = e[t++]), r.length && ((n = _m(r, "=")), fi(this.entries, { key: Tm(IE(n)), value: Tm(Sm(n, "=")) })); }, serialize: function serialize() { - for (var r = this.entries, e = [], t = 0, i; t < r.length; ) (i = r[t++]), bi(e, zm(i.key) + "=" + zm(i.value)); - return Im(e, "&"); + for (var i = this.entries, e = [], t = 0, r; t < i.length; ) (r = i[t++]), fi(e, Rm(r.key) + "=" + Rm(r.value)); + return Sm(e, "&"); }, update: function update() { (this.entries.length = 0), this.parseQuery(this.url.query); @@ -2256,387 +2061,358 @@ function _ts_generator(thisArg, body) { this.url && this.url.update(); }, }; - var Es = h(function () { - Gm(this, Gi); + var us = a(function () { + qm(this, Gi); var e = arguments.length > 0 ? arguments[0] : void 0, - t = Zm(this, new t0(e)); - qr || (this.size = t.entries.length); + t = Vm(this, new Hm(e)); + ji || (this.size = t.entries.length); }, "URLSearchParams"), - Gi = Es.prototype; - IB( + Gi = us.prototype; + CE( Gi, { - append: h(function (e, t) { - var i = ut(this); - Ji(arguments.length, 2), bi(i.entries, { key: $e(e), value: $e(t) }), qr || this.length++, i.updateURL(); + append: a(function (e, t) { + var r = nt(this); + Wi(arguments.length, 2), fi(r.entries, { key: He(e), value: He(t) }), ji || this.length++, r.updateURL(); }, "append"), - delete: function _delete(r) { - for (var e = ut(this), t = Ji(arguments.length, 1), i = e.entries, n = $e(r), s = t < 2 ? void 0 : arguments[1], o = s === void 0 ? s : $e(s), l = 0; l < i.length; ) { - var u = i[l]; - if (u.key === n && (o === void 0 || u.value === o)) { - if (($m(i, l, 1), o !== void 0)) break; - } else l++; - } - qr || (this.size = i.length), e.updateURL(); + delete: function _delete(i) { + for (var e = nt(this), t = Wi(arguments.length, 1), r = e.entries, n = He(i), s = t < 2 ? void 0 : arguments[1], o = s === void 0 ? s : He(s), u = 0; u < r.length; ) { + var l = r[u]; + if (l.key === n && (o === void 0 || l.value === o)) { + if ((Bm(r, u, 1), o !== void 0)) break; + } else u++; + } + ji || (this.size = r.length), e.updateURL(); }, - get: h(function (e) { - var t = ut(this).entries; - Ji(arguments.length, 1); - for (var i = $e(e), n = 0; n < t.length; n++) if (t[n].key === i) return t[n].value; + get: a(function (e) { + var t = nt(this).entries; + Wi(arguments.length, 1); + for (var r = He(e), n = 0; n < t.length; n++) if (t[n].key === r) return t[n].value; return null; }, "get"), - getAll: h(function (e) { - var t = ut(this).entries; - Ji(arguments.length, 1); - for (var i = $e(e), n = [], s = 0; s < t.length; s++) t[s].key === i && bi(n, t[s].value); + getAll: a(function (e) { + var t = nt(this).entries; + Wi(arguments.length, 1); + for (var r = He(e), n = [], s = 0; s < t.length; s++) t[s].key === r && fi(n, t[s].value); return n; }, "getAll"), - has: h(function (e) { - for (var t = ut(this).entries, i = Ji(arguments.length, 1), n = $e(e), s = i < 2 ? void 0 : arguments[1], o = s === void 0 ? s : $e(s), l = 0; l < t.length; ) { - var u = t[l++]; - if (u.key === n && (o === void 0 || u.value === o)) return !0; + has: a(function (e) { + for (var t = nt(this).entries, r = Wi(arguments.length, 1), n = He(e), s = r < 2 ? void 0 : arguments[1], o = s === void 0 ? s : He(s), u = 0; u < t.length; ) { + var l = t[u++]; + if (l.key === n && (o === void 0 || l.value === o)) return !0; } return !1; }, "has"), - set: h(function (e, t) { - var i = ut(this); - Ji(arguments.length, 1); - for (var n = i.entries, s = !1, o = $e(e), l = $e(t), u = 0, a; u < n.length; u++) (a = n[u]), a.key === o && (s ? $m(n, u--, 1) : ((s = !0), (a.value = l))); - s || bi(n, { key: o, value: l }), qr || (this.size = n.length), i.updateURL(); + set: a(function (e, t) { + var r = nt(this); + Wi(arguments.length, 1); + for (var n = r.entries, s = !1, o = He(e), u = He(t), l = 0, h; l < n.length; l++) (h = n[l]), h.key === o && (s ? Bm(n, l--, 1) : ((s = !0), (h.value = u))); + s || fi(n, { key: o, value: u }), ji || (this.size = n.length), r.updateURL(); }, "set"), - sort: h(function () { - var e = ut(this); - GB(e.entries, function (t, i) { - return t.key > i.key ? 1 : -1; + sort: a(function () { + var e = nt(this); + OE(e.entries, function (t, r) { + return t.key > r.key ? 1 : -1; }), e.updateURL(); }, "sort"), - forEach: h(function (e) { - for (var t = ut(this).entries, i = WB(e, arguments.length > 1 ? arguments[1] : void 0), n = 0, s; n < t.length; ) (s = t[n++]), i(s.value, s.key, this); + forEach: a(function (e) { + for (var t = nt(this).entries, r = kE(e, arguments.length > 1 ? arguments[1] : void 0), n = 0, s; n < t.length; ) (s = t[n++]), r(s.value, s.key, this); }, "forEach"), - keys: h(function () { - return new ru(this, "keys"); + keys: a(function () { + return new Xu(this, "keys"); }, "keys"), - values: h(function () { - return new ru(this, "values"); + values: a(function () { + return new Xu(this, "values"); }, "values"), - entries: h(function () { - return new ru(this, "entries"); + entries: a(function () { + return new Xu(this, "entries"); }, "entries"), }, - { enumerable: !0 }, + { enumerable: !0 } ); - Jm(Gi, XB, Gi.entries, { name: "entries" }); - Jm( + Lm(Gi, TE, Gi.entries, { name: "entries" }); + Lm( Gi, "toString", - h(function () { - return ut(this).serialize(); + a(function () { + return nt(this).serialize(); }, "toString"), - { enumerable: !0 }, + { enumerable: !0 } ); - qr && - PB(Gi, "size", { - get: h(function () { - return ut(this).entries.length; + ji && + yE(Gi, "size", { + get: a(function () { + return nt(this).entries.length; }, "size"), configurable: !0, enumerable: !0, }); - $B(Es, Xi); - su({ global: !0, constructor: !0, forced: !Ym }, { URLSearchParams: Es }); - !Ym && - tu(Vr) && - ((Hm = wt(Pm.has)), - (jm = wt(Pm.set)), - (nu = h(function (r) { - if (Xm(r)) { - var e = r.body, + AE(us, Pr); + Ju({ global: !0, constructor: !0, forced: !Pm }, { URLSearchParams: us }); + !Pm && + Yu($r) && + ((Mm = wt(xm.has)), + ($m = wt(xm.set)), + (Qu = a(function (i) { + if (Im(i)) { + var e = i.body, t; - if (zB(e) === Xi) return (t = r.headers ? new Vr(r.headers) : new Vr()), Hm(t, "content-type") || jm(t, "content-type", "application/x-www-form-urlencoded;charset=UTF-8"), jB(r, { body: Rm(0, $e(e)), headers: Rm(0, t) }); + if (wE(e) === Pr) return (t = i.headers ? new $r(i.headers) : new $r()), Mm(t, "content-type") || $m(t, "content-type", "application/x-www-form-urlencoded;charset=UTF-8"), SE(i, { body: km(0, He(e)), headers: km(0, t) }); } - return r; + return i; }, "wrapRequestOptions")), - tu(Mm) && - su( + Yu(wm) && + Ju( { global: !0, enumerable: !0, dontCallGetSet: !0, forced: !0 }, { - fetch: h(function (e) { - return Mm(e, arguments.length > 1 ? nu(arguments[1]) : {}); + fetch: a(function (e) { + return wm(e, arguments.length > 1 ? Qu(arguments[1]) : {}); }, "fetch"), - }, + } ), - tu(bs) && - ((Fs = h(function (e) { - return Gm(this, iu), new bs(e, arguments.length > 1 ? nu(arguments[1]) : {}); + Yu(os) && + ((ss = a(function (e) { + return qm(this, Ku), new os(e, arguments.length > 1 ? Qu(arguments[1]) : {}); }, "Request")), - (iu.constructor = Fs), - (Fs.prototype = iu), - su({ global: !0, constructor: !0, dontCallGetSet: !0, forced: !0 }, { Request: Fs }))); - var Hm, jm, nu, Fs; - i0.exports = { URLSearchParams: Es, getState: ut }; - }); - var n0 = x(() => { - "use strict"; - r0(); + (Ku.constructor = ss), + (ss.prototype = Ku), + Ju({ global: !0, constructor: !0, dontCallGetSet: !0, forced: !0 }, { Request: ss }))); + var Mm, $m, Qu, ss; + Wm.exports = { URLSearchParams: us, getState: nt }; }); - var F9 = Nn($d()), - b9 = Nn(np()), - y9 = Nn(Fp()), - E9 = Nn(n0()); - function Se() {} - h(Se, "noop"); - function cv(r, e) { - for (var t in e) r[t] = e[t]; - return r; + var Yy = ci(), + Ky = yd(), + Xy = qi(), + Qy = $n(), + Jy = zi(), + Zy = Pd(); + Yy( + { target: "Array", proto: !0 }, + { + flatMap: a(function (e) { + var t = Qy(this), + r = Jy(t), + n; + return Xy(e), (n = Zy(t, 0)), (n.length = Ky(n, t, t, r, 0, 1, e, arguments.length > 1 ? arguments[1] : void 0)), n; + }, "flatMap"), + } + ); + var BC = ci(), + _C = Xd(), + OC = xu(); + BC( + { target: "Object", stat: !0 }, + { + fromEntries: a(function (e) { + var t = {}; + return ( + _C( + e, + function (r, n) { + OC(t, r, n); + }, + { AS_ENTRIES: !0 } + ), + t + ); + }, "fromEntries"), + } + ); + ap(); + var WC = ci(), + hp = Tu(); + WC({ target: "String", proto: !0, name: "trimEnd", forced: "".trimEnd !== hp }, { trimEnd: hp }); + jm(); + function ke() {} + a(ke, "noop"); + function GE(i, e) { + for (var t in e) i[t] = e[t]; + return i; } - h(cv, "assign"); - function pu(r) { - return r(); + a(GE, "assign"); + function ul(i) { + return i(); } - h(pu, "run"); - function s0() { + a(ul, "run"); + function Um() { return Object.create(null); } - h(s0, "blank_object"); - function Qt(r) { - r.forEach(pu); + a(Um, "blank_object"); + function xt(i) { + i.forEach(ul); } - h(Qt, "run_all"); - function Bs(r) { - return typeof r == "function"; + a(xt, "run_all"); + function cs(i) { + return typeof i == "function"; } - h(Bs, "is_function"); - function oe(r, e) { - return r != r ? e == e : r !== e || (r && typeof r == "object") || typeof r == "function"; + a(cs, "is_function"); + function se(i, e) { + return i != i ? e == e : i !== e || (i && typeof i == "object") || typeof i == "function"; } - h(oe, "safe_not_equal"); - function o0(r) { - return Object.keys(r).length === 0; + a(se, "safe_not_equal"); + function Gm(i) { + return Object.keys(i).length === 0; } - h(o0, "is_empty"); - function ti(r, e, t, i) { - if (r) { - var n = l0(r, e, t, i); - return r[0](n); + a(Gm, "is_empty"); + function Yt(i, e, t, r) { + if (i) { + var n = Ym(i, e, t, r); + return i[0](n); } } - h(ti, "create_slot"); - function l0(r, e, t, i) { - return r[1] && i ? cv(t.ctx.slice(), r[1](i(e))) : t.ctx; + a(Yt, "create_slot"); + function Ym(i, e, t, r) { + return i[1] && r ? GE(t.ctx.slice(), i[1](r(e))) : t.ctx; } - h(l0, "get_slot_context"); - function ii(r, e, t, i) { - if (r[2] && i) { - var n = r[2](i(t)); + a(Ym, "get_slot_context"); + function Kt(i, e, t, r) { + if (i[2] && r) { + var n = i[2](r(t)); if (e.dirty === void 0) return n; if (typeof n == "object") { var s = [], o = Math.max(e.dirty.length, n.length); - for (var l = 0; l < o; l += 1) s[l] = e.dirty[l] | n[l]; + for (var u = 0; u < o; u += 1) s[u] = e.dirty[u] | n[u]; return s; } return e.dirty | n; } return e.dirty; } - h(ii, "get_slot_changes"); - function ri(r, e, t, i, n, s) { + a(Kt, "get_slot_changes"); + function Xt(i, e, t, r, n, s) { if (n) { - var o = l0(e, t, i, s); - r.p(o, n); + var o = Ym(e, t, r, s); + i.p(o, n); } } - h(ri, "update_slot_base"); - function ni(r) { - if (r.ctx.length > 32) { + a(Xt, "update_slot_base"); + function Qt(i) { + if (i.ctx.length > 32) { var e = [], - t = r.ctx.length / 32; - for (var i = 0; i < t; i++) e[i] = -1; + t = i.ctx.length / 32; + for (var r = 0; r < t; r++) e[r] = -1; return e; } return -1; } - h(ni, "get_all_dirty_from_scope"); - function u0(r) { + a(Qt, "get_all_dirty_from_scope"); + function Km(i) { var e = {}; - for (var t in r) e[t] = !0; + for (var t in i) e[t] = !0; return e; } - h(u0, "compute_slots"); - var a0 = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : global, - hu = - ((_r = class r { - observe(e, t) { - return ( - this._listeners.set(e, t), - this._getObserver().observe(e, this.options), - () => { - this._listeners.delete(e), this._observer.unobserve(e); - } - ); - } - _getObserver() { - var e; - return (e = this._observer) !== null && e !== void 0 - ? e - : (this._observer = new ResizeObserver((t) => { - var i; - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var n = _step.value; - r.entries.set(n.target, n), (i = this._listeners.get(n.target)) === null || i === void 0 || i(n); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - })); - } - constructor(e) { - (this.options = e), (this._listeners = "WeakMap" in a0 ? new WeakMap() : void 0); - } - }), - h(_r, "ResizeObserverSingleton"), - _r); - hu.entries = "WeakMap" in a0 ? new WeakMap() : void 0; - var h0 = !1; - function fv() { - h0 = !0; - } - h(fv, "start_hydrating"); - function dv() { - h0 = !1; - } - h(dv, "end_hydrating"); - function q(r, e) { - r.appendChild(e); - } - h(q, "append"); - function E(r, e, t) { - r.insertBefore(e, t || null); - } - h(E, "insert"); - function y(r) { - r.parentNode && r.parentNode.removeChild(r); - } - h(y, "detach"); - function Hr(r, e) { - for (var t = 0; t < r.length; t += 1) r[t] && r[t].d(e); - } - h(Hr, "destroy_each"); - function O(r) { - return document.createElement(r); - } - h(O, "element"); - function _t(r) { - return document.createElementNS("http://www.w3.org/2000/svg", r); - } - h(_t, "svg_element"); - function Y(r) { - return document.createTextNode(r); - } - h(Y, "text"); - function $() { - return Y(" "); - } - h($, "space"); - function Ht() { - return Y(""); - } - h(Ht, "empty"); - function ye(r, e, t, i) { - return r.addEventListener(e, t, i), () => r.removeEventListener(e, t, i); - } - h(ye, "listen"); - function v(r, e, t) { - t == null ? r.removeAttribute(e) : r.getAttribute(e) !== t && r.setAttribute(e, t); - } - h(v, "attr"); - function c0(r) { - var e; - return { - p() { - for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) { - t[_key] = arguments[_key]; - } - (e = t), e.forEach((i) => r.push(i)); - }, - r() { - e.forEach((t) => r.splice(r.indexOf(t), 1)); - }, - }; + a(Km, "compute_slots"); + var Xm = !1; + function YE() { + Xm = !0; + } + a(YE, "start_hydrating"); + function KE() { + Xm = !1; + } + a(KE, "end_hydrating"); + function V(i, e) { + i.appendChild(e); + } + a(V, "append"); + function C(i, e, t) { + i.insertBefore(e, t || null); + } + a(C, "insert"); + function y(i) { + i.parentNode && i.parentNode.removeChild(i); + } + a(y, "detach"); + function Nr(i, e) { + for (var t = 0; t < i.length; t += 1) i[t] && i[t].d(e); + } + a(Nr, "destroy_each"); + function R(i) { + return document.createElement(i); } - h(c0, "init_binding_group"); - function Bt(r) { - return r === "" ? null : +r; + a(R, "element"); + function St(i) { + return document.createElementNS("http://www.w3.org/2000/svg", i); } - h(Bt, "to_number"); - function pv(r) { - return Array.from(r.childNodes); + a(St, "svg_element"); + function j(i) { + return document.createTextNode(i); } - h(pv, "children"); - function qe(r, e) { - (e = "" + e), r.data !== e && (r.data = e); + a(j, "text"); + function q() { + return j(" "); } - h(qe, "set_data"); - function Ee(r, e) { - r.value = e !== null && e !== void 0 ? e : ""; + a(q, "space"); + function It() { + return j(""); } - h(Ee, "set_input_value"); - function tr(r, e, t) { - r.classList[t ? "add" : "remove"](e); + a(It, "empty"); + function be(i, e, t, r) { + return i.addEventListener(e, t, r), () => i.removeEventListener(e, t, r); } - h(tr, "toggle_class"); - function mv(r, e) { + a(be, "listen"); + function A(i, e, t) { + t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t); + } + a(A, "attr"); + function bt(i) { + return i === "" ? null : +i; + } + a(bt, "to_number"); + function XE(i) { + return Array.from(i.childNodes); + } + a(XE, "children"); + function We(i, e) { + (e = "" + e), i.wholeText !== e && (i.data = e); + } + a(We, "set_data"); + function Fe(i, e) { + i.value = e !== null && e !== void 0 ? e : ""; + } + a(Fe, "set_input_value"); + function Yi(i, e, t) { + i.classList[t ? "add" : "remove"](e); + } + a(Yi, "toggle_class"); + function QE(i, e) { var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, tmp = _ref.bubbles, t = tmp === void 0 ? !1 : tmp, tmp1 = _ref.cancelable, - i = tmp1 === void 0 ? !1 : tmp1; + r = tmp1 === void 0 ? !1 : tmp1; var n = document.createEvent("CustomEvent"); - return n.initCustomEvent(r, t, i, e), n; + return n.initCustomEvent(i, t, r, e), n; } - h(mv, "custom_event"); - var zr; - function Wr(r) { - zr = r; + a(QE, "custom_event"); + var Ir; + function qr(i) { + Ir = i; } - h(Wr, "set_current_component"); - function f0() { - if (!zr) throw new Error("Function called outside component initialization"); - return zr; + a(qr, "set_current_component"); + function Qm() { + if (!Ir) throw new Error("Function called outside component initialization"); + return Ir; } - h(f0, "get_current_component"); - function mu(r) { - f0().$$.on_mount.push(r); + a(Qm, "get_current_component"); + function ll(i) { + Qm().$$.on_mount.push(i); } - h(mu, "onMount"); - function Ei() { - var r = f0(); + a(ll, "onMount"); + function pi() { + var i = Qm(); return function (e, t) { var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, tmp = _ref.cancelable, - i = tmp === void 0 ? !1 : tmp; - var n = r.$$.callbacks[e]; + r = tmp === void 0 ? !1 : tmp; + var n = i.$$.callbacks[e]; if (n) { - var s = mv(e, t, { cancelable: i }); + var s = QE(e, t, { cancelable: r }); return ( n.slice().forEach((o) => { - o.call(r, s); + o.call(i, s); }), !s.defaultPrevented ); @@ -2644,217 +2420,209 @@ function _ts_generator(thisArg, body) { return !0; }; } - h(Ei, "createEventDispatcher"); - var Zi = []; - var J = [], - er = [], - cu = [], - gv = Promise.resolve(), - fu = !1; - function Dv() { - fu || ((fu = !0), gv.then(d0)); - } - h(Dv, "schedule_update"); - function du(r) { - er.push(r); - } - h(du, "add_render_callback"); - function X(r) { - cu.push(r); - } - h(X, "add_flush_callback"); - var au = new Set(), - Ki = 0; - function d0() { - if (Ki !== 0) return; - var r = zr; + a(pi, "createEventDispatcher"); + var Lr = []; + var Y = [], + as = [], + nl = [], + JE = Promise.resolve(), + sl = !1; + function ZE() { + sl || ((sl = !0), JE.then(Jm)); + } + a(ZE, "schedule_update"); + function ol(i) { + as.push(i); + } + a(ol, "add_render_callback"); + function K(i) { + nl.push(i); + } + a(K, "add_flush_callback"); + var rl = new Set(), + ls = 0; + function Jm() { + var i = Ir; do { - try { - for (; Ki < Zi.length; ) { - var _$e = Zi[Ki]; - Ki++, Wr(_$e), Fv(_$e.$$); - } - } catch (e) { - throw ((Zi.length = 0), (Ki = 0), e); - } - for (Wr(null), Zi.length = 0, Ki = 0; J.length; ) J.pop()(); - for (var _$e1 = 0; _$e1 < er.length; _$e1 += 1) { - var t = er[_$e1]; - au.has(t) || (au.add(t), t()); - } - er.length = 0; - } while (Zi.length); - for (; cu.length; ) cu.pop()(); - (fu = !1), au.clear(), Wr(r); - } - h(d0, "flush"); - function Fv(r) { - if (r.fragment !== null) { - r.update(), Qt(r.before_update); - var e = r.dirty; - (r.dirty = [-1]), r.fragment && r.fragment.p(r.ctx, e), r.after_update.forEach(du); - } - } - h(Fv, "update"); - function bv(r) { - var e = [], - t = []; - er.forEach((i) => (r.indexOf(i) === -1 ? e.push(i) : t.push(i))), t.forEach((i) => i()), (er = e); - } - h(bv, "flush_render_callbacks"); - var Cs = new Set(), - yi; - function jt() { - yi = { r: 0, c: [], p: yi }; - } - h(jt, "group_outros"); - function Yt() { - yi.r || Qt(yi.c), (yi = yi.p); - } - h(Yt, "check_outros"); - function S(r, e) { - r && r.i && (Cs.delete(r), r.i(e)); - } - h(S, "transition_in"); - function w(r, e, t, i) { - if (r && r.o) { - if (Cs.has(r)) return; - Cs.add(r), - yi.c.push(() => { - Cs.delete(r), i && (t && r.d(1), i()); + for (; ls < Lr.length; ) { + var e = Lr[ls]; + ls++, qr(e), ev(e.$$); + } + for (qr(null), Lr.length = 0, ls = 0; Y.length; ) Y.pop()(); + for (var e1 = 0; e1 < as.length; e1 += 1) { + var t = as[e1]; + rl.has(t) || (rl.add(t), t()); + } + as.length = 0; + } while (Lr.length); + for (; nl.length; ) nl.pop()(); + (sl = !1), rl.clear(), qr(i); + } + a(Jm, "flush"); + function ev(i) { + if (i.fragment !== null) { + i.update(), xt(i.before_update); + var e = i.dirty; + (i.dirty = [-1]), i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(ol); + } + } + a(ev, "update"); + var hs = new Set(), + di; + function Nt() { + di = { r: 0, c: [], p: di }; + } + a(Nt, "group_outros"); + function Vt() { + di.r || xt(di.c), (di = di.p); + } + a(Vt, "check_outros"); + function S(i, e) { + i && i.i && (hs.delete(i), i.i(e)); + } + a(S, "transition_in"); + function B(i, e, t, r) { + if (i && i.o) { + if (hs.has(i)) return; + hs.add(i), + di.c.push(() => { + hs.delete(i), r && (t && i.d(1), r()); }), - r.o(e); - } else i && i(); - } - h(w, "transition_out"); - var yv = ["allowfullscreen", "allowpaymentrequest", "async", "autofocus", "autoplay", "checked", "controls", "default", "defer", "disabled", "formnovalidate", "hidden", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "selected"], - r7 = new Set([...yv]); - function K(r, e, t) { - var i = r.$$.props[e]; - i !== void 0 && ((r.$$.bound[i] = t), t(r.$$.ctx[i])); - } - h(K, "bind"); - function M(r) { - r && r.c(); - } - h(M, "create_component"); - function N(r, e, t, i) { - var _r_$$ = r.$$, - n = _r_$$.fragment, - s = _r_$$.after_update; + i.o(e); + } else r && r(); + } + a(B, "transition_out"); + var D7 = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : global; + function X(i, e, t) { + var r = i.$$.props[e]; + r !== void 0 && ((i.$$.bound[r] = t), t(i.$$.ctx[r])); + } + a(X, "bind"); + function P(i) { + i && i.c(); + } + a(P, "create_component"); + function $(i, e, t, r) { + var _i_$$ = i.$$, + n = _i_$$.fragment, + s = _i_$$.after_update; n && n.m(e, t), - i || - du(() => { - var o = r.$$.on_mount.map(pu).filter(Bs); - r.$$.on_destroy ? r.$$.on_destroy.push(...o) : Qt(o), (r.$$.on_mount = []); + r || + ol(() => { + var o = i.$$.on_mount.map(ul).filter(cs); + i.$$.on_destroy ? i.$$.on_destroy.push(...o) : xt(o), (i.$$.on_mount = []); }), - s.forEach(du); - } - h(N, "mount_component"); - function R(r, e) { - var t = r.$$; - t.fragment !== null && (bv(t.after_update), Qt(t.on_destroy), t.fragment && t.fragment.d(e), (t.on_destroy = t.fragment = null), (t.ctx = [])); - } - h(R, "destroy_component"); - function Ev(r, e) { - r.$$.dirty[0] === -1 && (Zi.push(r), Dv(), r.$$.dirty.fill(0)), (r.$$.dirty[(e / 31) | 0] |= 1 << e % 31); - } - h(Ev, "make_dirty"); - function le(r, e, t, i, n, s, o) { - var l = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [-1]; - var u = zr; - Wr(r); - var a = (r.$$ = { fragment: null, ctx: [], props: s, update: Se, not_equal: n, bound: s0(), on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(e.context || (u ? u.$$.context : [])), callbacks: s0(), dirty: l, skip_bound: !1, root: e.target || u.$$.root }); - o && o(a.root); + s.forEach(ol); + } + a($, "mount_component"); + function M(i, e) { + var t = i.$$; + t.fragment !== null && (xt(t.on_destroy), t.fragment && t.fragment.d(e), (t.on_destroy = t.fragment = null), (t.ctx = [])); + } + a(M, "destroy_component"); + function tv(i, e) { + i.$$.dirty[0] === -1 && (Lr.push(i), ZE(), i.$$.dirty.fill(0)), (i.$$.dirty[(e / 31) | 0] |= 1 << e % 31); + } + a(tv, "make_dirty"); + function oe(i, e, t, r, n, s, o) { + var u = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [-1]; + var l = Ir; + qr(i); + var h = (i.$$ = { fragment: null, ctx: [], props: s, update: ke, not_equal: n, bound: Um(), on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(e.context || (l ? l.$$.context : [])), callbacks: Um(), dirty: u, skip_bound: !1, root: e.target || l.$$.root }); + o && o(h.root); var c = !1; if ( - ((a.ctx = t - ? t(r, e.props || {}, function (f, d) { + ((h.ctx = t + ? t(i, e.props || {}, function (f, d) { for (var _len = arguments.length, p = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { p[_key - 2] = arguments[_key]; } var m = p.length ? p[0] : d; - return a.ctx && n(a.ctx[f], (a.ctx[f] = m)) && (!a.skip_bound && a.bound[f] && a.bound[f](m), c && Ev(r, f)), d; + return h.ctx && n(h.ctx[f], (h.ctx[f] = m)) && (!h.skip_bound && h.bound[f] && h.bound[f](m), c && tv(i, f)), d; }) : []), - a.update(), + h.update(), (c = !0), - Qt(a.before_update), - (a.fragment = i ? i(a.ctx) : !1), + xt(h.before_update), + (h.fragment = r ? r(h.ctx) : !1), e.target) ) { if (e.hydrate) { - fv(); - var f = pv(e.target); - a.fragment && a.fragment.l(f), f.forEach(y); - } else a.fragment && a.fragment.c(); - e.intro && S(r.$$.fragment), N(r, e.target, e.anchor, e.customElement), dv(), d0(); + YE(); + var f = XE(e.target); + h.fragment && h.fragment.l(f), f.forEach(y); + } else h.fragment && h.fragment.c(); + e.intro && S(i.$$.fragment), $(i, e.target, e.anchor, e.customElement), KE(), Jm(); } - Wr(u); + qr(l); } - h(le, "init"); - var Cv; + a(oe, "init"); + var iv; typeof HTMLElement == "function" && - (Cv = + (iv = ((_class = class _class extends HTMLElement { connectedCallback() { var _this_$$ = this.$$, - r = _this_$$.on_mount; - this.$$.on_disconnect = r.map(pu).filter(Bs); + i = _this_$$.on_mount; + this.$$.on_disconnect = i.map(ul).filter(cs); for (var e in this.$$.slotted) this.appendChild(this.$$.slotted[e]); } - attributeChangedCallback(r, e, t) { - this[r] = t; + attributeChangedCallback(i, e, t) { + this[i] = t; } disconnectedCallback() { - Qt(this.$$.on_disconnect); + xt(this.$$.on_disconnect); } $destroy() { - R(this, 1), (this.$destroy = Se); + M(this, 1), (this.$destroy = ke); } - $on(r, e) { - if (!Bs(e)) return Se; - var t = this.$$.callbacks[r] || (this.$$.callbacks[r] = []); + $on(i, e) { + if (!cs(e)) return ke; + var t = this.$$.callbacks[i] || (this.$$.callbacks[i] = []); return ( t.push(e), () => { - var i = t.indexOf(e); - i !== -1 && t.splice(i, 1); + var r = t.indexOf(e); + r !== -1 && t.splice(r, 1); } ); } - $set(r) { - this.$$set && !o0(r) && ((this.$$.skip_bound = !0), this.$$set(r), (this.$$.skip_bound = !1)); + $set(i) { + this.$$set && !Gm(i) && ((this.$$.skip_bound = !0), this.$$set(i), (this.$$.skip_bound = !1)); } constructor() { super(), this.attachShadow({ mode: "open" }); } }), - h(_class, "SvelteElement"), + (() => { + a(_class, "SvelteElement"); + })(), _class)); - var se = + var ie = ((_class1 = class _class { $destroy() { - R(this, 1), (this.$destroy = Se); + M(this, 1), (this.$destroy = ke); } $on(e, t) { - if (!Bs(t)) return Se; - var i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); + if (!cs(t)) return ke; + var r = this.$$.callbacks[e] || (this.$$.callbacks[e] = []); return ( - i.push(t), + r.push(t), () => { - var n = i.indexOf(t); - n !== -1 && i.splice(n, 1); + var n = r.indexOf(t); + n !== -1 && r.splice(n, 1); } ); } $set(e) { - this.$$set && !o0(e) && ((this.$$.skip_bound = !0), this.$$set(e), (this.$$.skip_bound = !1)); + this.$$set && !Gm(e) && ((this.$$.skip_bound = !0), this.$$set(e), (this.$$.skip_bound = !1)); } }), - h(_class1, "SvelteComponent"), + (() => { + a(_class1, "SvelteComponent"); + })(), _class1); - var gu = + var al = ((_class2 = class _class { constructor(ref) { var e = ref === void 0 ? [] : ref; @@ -2862,9 +2630,11 @@ function _ts_generator(thisArg, body) { this.type = "root"; } }), - h(_class2, "RootNode"), + (() => { + a(_class2, "RootNode"); + })(), _class2), - ir = + Ki = ((_class3 = class _class { constructor(e, t) { this.parent = e; @@ -2873,9 +2643,11 @@ function _ts_generator(thisArg, body) { e.children.push(this); } }), - h(_class3, "TextNode"), + (() => { + a(_class3, "TextNode"); + })(), _class3), - xs = + ds = ((_class4 = class _class { constructor(e) { this.parent = e; @@ -2884,48 +2656,56 @@ function _ts_generator(thisArg, body) { e.children.push(this); } }), - h(_class4, "BlockNode"), + (() => { + a(_class4, "BlockNode"); + })(), _class4), - Du = + hl = ((_class5 = class _class { - constructor(e, t, i, n) { + constructor(e, t, r, n) { this.parent = e; this.raw = t; - this.braces = i; + this.braces = r; this.parens = n; this.type = "comment"; e.block = this; } }), - h(_class5, "CommentNode"), + (() => { + a(_class5, "CommentNode"); + })(), _class5), - Fu = + cl = ((_class6 = class _class { - constructor(e, t, i, n) { + constructor(e, t, r, n) { this.parent = e; this.raw = t; - this.braces = i; + this.braces = r; this.parens = n; this.type = "preamble"; e.block = this; } }), - h(_class6, "PreambleNode"), + (() => { + a(_class6, "PreambleNode"); + })(), _class6), - bu = + fl = ((_class7 = class _class { - constructor(e, t, i, n) { + constructor(e, t, r, n) { this.parent = e; this.raw = t; - this.braces = i; + this.braces = r; this.parens = n; this.type = "string"; e.block = this; } }), - h(_class7, "StringNode"), + (() => { + a(_class7, "StringNode"); + })(), _class7), - yu = + dl = ((_class8 = class _class { constructor(e, t) { this.parent = e; @@ -2934,21 +2714,25 @@ function _ts_generator(thisArg, body) { (e.block = this), (this.fields = []); } }), - h(_class8, "EntryNode"), + (() => { + a(_class8, "EntryNode"); + })(), _class8), - Ci = + mi = ((_class9 = class _class { constructor(e, ref) { var t = ref === void 0 ? "" : ref; this.parent = e; this.name = t; this.type = "field"; - this.value = new Eu(this); + this.value = new pl(this); } }), - h(_class9, "FieldNode"), + (() => { + a(_class9, "FieldNode"); + })(), _class9), - Eu = + pl = ((_class10 = class _class { constructor(e) { this.parent = e; @@ -2957,9 +2741,11 @@ function _ts_generator(thisArg, body) { this.concat = []; } }), - h(_class10, "ConcatNode"), + (() => { + a(_class10, "ConcatNode"); + })(), _class10), - Cu = + ml = ((_class11 = class _class { constructor(e, t) { this.parent = e; @@ -2968,9 +2754,11 @@ function _ts_generator(thisArg, body) { e.concat.push(this); } }), - h(_class11, "LiteralNode"), + (() => { + a(_class11, "LiteralNode"); + })(), _class11), - Bu = + gl = ((_class12 = class _class { constructor(e) { this.parent = e; @@ -2980,9 +2768,11 @@ function _ts_generator(thisArg, body) { e.concat.push(this); } }), - h(_class12, "BracedNode"), + (() => { + a(_class12, "BracedNode"); + })(), _class12), - vu = + Dl = ((_class13 = class _class { constructor(e) { this.parent = e; @@ -2992,56 +2782,59 @@ function _ts_generator(thisArg, body) { e.concat.push(this); } }), - h(_class13, "QuotedNode"), + (() => { + a(_class13, "QuotedNode"); + })(), _class13); - function m0(r) { - var e = new gu(), + function e0(i) { + var e = new al(), t = e, - i = 1, + r = 1, n = 0; - for (var s = 0; s < r.length; s++) { - var _r_s, _r_; - var o = (_r_s = r[s]) !== null && _r_s !== void 0 ? _r_s : "", - l = (_r_ = r[s - 1]) !== null && _r_ !== void 0 ? _r_ : ""; - switch ((o === "\n" && (i++, (n = 0)), n++, t.type)) { + for (var s = 0; s < i.length; s++) { + var _i_s, _i_; + var o = (_i_s = i[s]) !== null && _i_s !== void 0 ? _i_s : "", + u = (_i_ = i[s - 1]) !== null && _i_ !== void 0 ? _i_ : ""; + switch ((o === "\n" && (r++, (n = 0)), n++, t.type)) { case "root": { - t = o === "@" ? new xs(t) : new ir(t, o); + t = o === "@" ? new ds(t) : new Ki(t, o); break; } case "text": { - o === "@" && /[\s\r\n}]/.test(l) ? (t = new xs(t.parent)) : (t.text += o); + o === "@" && /[\s\r\n}]/.test(u) ? (t = new ds(t.parent)) : (t.text += o); break; } case "block": { if (o === "@") { - var u = t.parent.children[t.parent.children.length - 2]; - (u === null || u === void 0 ? void 0 : u.type) === "text" ? (u.text += "@" + t.command) : (t.parent.children.pop(), new ir(t.parent, "@" + t.command), t.parent.children.push(t)), (t.command = ""); + var _l; + var l = t.parent.children[t.parent.children.length - 2]; + ((_l = l) === null || _l === void 0 ? void 0 : _l.type) === "text" ? (l.text += "@" + t.command) : (t.parent.children.pop(), new Ki(t.parent, "@" + t.command), t.parent.children.push(t)), (t.command = ""); } else if (o === "{" || o === "(") { - var u1 = t.command.trim(); - if (u1 === "" || /\s/.test(u1)) t.parent.children.pop(), (t = new ir(t.parent, "@" + t.command + o)); + var l1 = t.command.trim(); + if (l1 === "" || /\s/.test(l1)) t.parent.children.pop(), (t = new Ki(t.parent, "@" + t.command + o)); else { - t.command = u1; - var a = t.command.toLowerCase(), + t.command = l1; + var h = t.command.toLowerCase(), _ref = _sliced_to_array(o === "{" ? [1, 0] : [0, 1], 2), c = _ref[0], f = _ref[1], - d = "@" + a + o; - switch (a) { + d = "@" + h + o; + switch (h) { case "string": - t = new bu(t, d, c, f); + t = new fl(t, d, c, f); break; case "preamble": - t = new Fu(t, d, c, f); + t = new cl(t, d, c, f); break; case "comment": - t = new Du(t, d, c, f); + t = new hl(t, d, c, f); break; default: - t = new yu(t, o); + t = new dl(t, o); break; } } - } else o.match(/[=#,})[\]]/) ? (t.parent.children.pop(), (t = new ir(t.parent, "@" + t.command + o))) : (t.command += o); + } else o.match(/[=#,})[\]]/) ? (t.parent.children.pop(), (t = new Ki(t.parent, "@" + t.command + o))) : (t.command += o); break; } case "comment": @@ -3050,41 +2843,41 @@ function _ts_generator(thisArg, body) { o === "{" ? t.braces++ : o === "}" ? t.braces-- : o === "(" ? t.parens++ : o === ")" && t.parens--, (t.raw += o), t.braces === 0 && t.parens === 0 && (t = t.parent.parent); break; case "entry": { - if (vs(o)) t.key && (t.keyEnded = !0); - else if (o === ",") t = new Ci(t); + if (fs(o)) t.key && (t.keyEnded = !0); + else if (o === ",") t = new mi(t); else if ((t.wrapType === "{" && o === "}") || (t.wrapType === "(" && o === ")")) t = t.parent.parent; - else if (o === "=" && t.key && p0(t.key)) { - var u2 = new Ci(t, t.key); - t.fields.push(u2), (t.key = void 0), (t = u2.value); + else if (o === "=" && t.key && Zm(t.key)) { + var l2 = new mi(t, t.key); + t.fields.push(l2), (t.key = void 0), (t = l2.value); } else { - if (t.keyEnded) throw new at(r, t, s, i, n, "The entry key cannot contain whitespace"); + if (t.keyEnded) throw new st(i, t, s, r, n, "The entry key cannot contain whitespace"); var _t_key; - if (Bv(o)) t.key = ((_t_key = t.key) !== null && _t_key !== void 0 ? _t_key : "") + o; - else throw new at(r, t, s, i, n, "The entry key cannot contain the character (".concat(o, ")")); + if (rv(o)) t.key = ((_t_key = t.key) !== null && _t_key !== void 0 ? _t_key : "") + o; + else throw new st(i, t, s, r, n, "The entry key cannot contain the character (".concat(o, ")")); } break; } case "field": { if (o === "}" || o === ")") (t.name = t.name.trim()), (t = t.parent.parent.parent); else if (o === "=") (t.name = t.name.trim()), (t = t.value); - else if (o === ",") (t.name = t.name.trim()), (t = new Ci(t.parent)); - else if (p0(o)) t.name ? (t.name += o) : vs(o) || (t.parent.fields.push(t), (t.name = o)); - else throw new at(r, t, s, i, n); + else if (o === ",") (t.name = t.name.trim()), (t = new mi(t.parent)); + else if (Zm(o)) t.name ? (t.name += o) : fs(o) || (t.parent.fields.push(t), (t.name = o)); + else throw new st(i, t, s, r, n); break; } case "concat": { - if (vs(o)) break; + if (fs(o)) break; if (t.canConsumeValue) { - if (/[#=,}()[\]]/.test(o)) throw new at(r, t, s, i, n); - (t.canConsumeValue = !1), o === "{" ? (t = new Bu(t)) : o === '"' ? (t = new vu(t)) : (t = new Cu(t, o)); - } else if (o === ",") t = new Ci(t.parent.parent); + if (/[#=,}()[\]]/.test(o)) throw new st(i, t, s, r, n); + (t.canConsumeValue = !1), o === "{" ? (t = new gl(t)) : o === '"' ? (t = new Dl(t)) : (t = new ml(t, o)); + } else if (o === ",") t = new mi(t.parent.parent); else if (o === "}" || o === ")") t = t.parent.parent.parent.parent; else if (o === "#") t.canConsumeValue = !0; - else throw new at(r, t, s, i, n); + else throw new st(i, t, s, r, n); break; } case "literal": - vs(o) ? (t = t.parent) : o === "," ? (t = new Ci(t.parent.parent.parent)) : o === "}" ? (t = t.parent.parent.parent.parent.parent) : o === "#" ? ((t = t.parent), (t.canConsumeValue = !0)) : (t.value += o); + fs(o) ? (t = t.parent) : o === "," ? (t = new mi(t.parent.parent.parent)) : o === "}" ? (t = t.parent.parent.parent.parent.parent) : o === "#" ? ((t = t.parent), (t.canConsumeValue = !0)) : (t.value += o); break; case "braced": if (o === "}" && t.depth === 0) { @@ -3098,70 +2891,74 @@ function _ts_generator(thisArg, body) { t = t.parent; break; } else if (o === "{") t.depth++; - else if (o === "}" && (t.depth--, t.depth < 0)) throw new at(r, t, s, i, n); + else if (o === "}" && (t.depth--, t.depth < 0)) throw new st(i, t, s, r, n); t.value += o; break; } } return e; } - h(m0, "generateAST"); - function vs(r) { - return /^[ \t\n\r]*$/.test(r); + a(e0, "generateAST"); + function fs(i) { + return /^[ \t\n\r]*$/.test(i); } - h(vs, "isWhitespace"); - function Bv(r) { - return !/[#%{}~$,]/.test(r); + a(fs, "isWhitespace"); + function rv(i) { + return !/[#%{}~$,]/.test(i); } - h(Bv, "isValidKeyCharacter"); - function p0(r) { - return !/[=,{}()[\]]/.test(r); + a(rv, "isValidKeyCharacter"); + function Zm(i) { + return !/[=,{}()[\]]/.test(i); } - h(p0, "isValidFieldName"); - var at = + a(Zm, "isValidFieldName"); + var st = ((_class14 = class _class extends Error { - constructor(t, i, n, s, o, l) { - super("Line ".concat(s, ":").concat(o, ": Syntax Error in ").concat(i.type, " (").concat(l, ")\n") + t.slice(Math.max(0, n - 20), n) + ">>" + t[n] + "<<" + t.slice(n + 1, n + 20)); - this.node = i; + constructor(t, r, n, s, o, u) { + super("Line ".concat(s, ":").concat(o, ": Syntax Error in ").concat(r.type, " (").concat(u, ")\n") + t.slice(Math.max(0, n - 20), n) + ">>" + t[n] + "<<" + t.slice(n + 1, n + 20)); + this.node = r; this.line = s; this.column = o; - this.hint = l; + this.hint = u; var _t_n; (this.name = "Syntax Error"), (this.char = (_t_n = t[n]) !== null && _t_n !== void 0 ? _t_n : ""); } }), - h(_class14, "BibTeXSyntaxError"), + (() => { + a(_class14, "BibTeXSyntaxError"); + })(), _class14); - function Bi(r, e) { - return r + function gi(i, e) { + return i .replace(/\s+/g, " ") .split(/ and /i) .map((t) => { - var i = t.trim(); - e && (i = i.replace(/["{}]/g, "")); - var n = i.indexOf(","); - if (n > -1) return { firstNames: i.slice(n + 1).trim(), lastName: i.slice(0, n).trim() }; + var r = t.trim(); + e && (r = r.replace(/["{}]/g, "")); + var n = r.indexOf(","); + if (n > -1) return { firstNames: r.slice(n + 1).trim(), lastName: r.slice(0, n).trim() }; { - var s = i.lastIndexOf(" "); - return { firstNames: i.slice(0, s).trim(), lastName: i.slice(s).trim() }; + var s = r.lastIndexOf(" "); + return { firstNames: r.slice(0, s).trim(), lastName: r.slice(s).trim() }; } }); } - h(Bi, "parseAuthors"); - var rr = - ((_r1 = class r { + a(gi, "parseAuthors"); + var Xi = + ((_i = class i { constructor(e, t, ref) { - var i = ref === void 0 ? [] : ref; + var r = ref === void 0 ? [] : ref; this.kind = e; this.parent = t; - this.children = i; + this.children = r; this.type = "block"; - t instanceof r ? t.children.push(this) : t instanceof As && t.args.push(this); + t instanceof i ? t.children.push(this) : t instanceof ps && t.args.push(this); } }), - h(_r1, "BlockNode"), - _r1), - xu = + (() => { + a(_i, "BlockNode"); + })(), + _i), + bl = ((_class15 = class _class { constructor(e, ref) { var t = ref === void 0 ? "" : ref; @@ -3171,62 +2968,66 @@ function _ts_generator(thisArg, body) { e.children.push(this); } }), - h(_class15, "TextNode"), + (() => { + a(_class15, "TextNode"); + })(), _class15), - As = + ps = ((_class16 = class _class { constructor(e, ref, ref1) { var t = ref === void 0 ? "" : ref, - i = ref1 === void 0 ? [] : ref1; + r = ref1 === void 0 ? [] : ref1; this.parent = e; this.command = t; - this.args = i; + this.args = r; this.type = "command"; e.children.push(this); } }), - h(_class16, "CommandNode"), + (() => { + a(_class16, "CommandNode"); + })(), _class16); - function ks(r) { - var e = new rr("root"), + function ms(i) { + var e = new Xi("root"), t = e; - for (var i = 0; i < r.length; i++) { - var n = r[i]; + for (var r = 0; r < i.length; r++) { + var n = i[r]; if (!n) break; switch (t.type) { case "block": { - n === "\\" ? (t = new As(t)) : n === "{" ? (t = new rr("curly", t)) : ((n === "}" && t.kind === "curly") || (n === "]" && t.kind === "square")) && t.parent ? (t = t.parent) : (t = new xu(t, n)); + n === "\\" ? (t = new ps(t)) : n === "{" ? (t = new Xi("curly", t)) : ((n === "}" && t.kind === "curly") || (n === "]" && t.kind === "square")) && t.parent ? (t = t.parent) : (t = new bl(t, n)); break; } case "text": { - n === "\\" || n === "{" || (n === "}" && t.parent.kind === "curly") || (n === "]" && t.parent.kind === "square") ? ((t = t.parent), i--) : (t.text += n); + n === "\\" || n === "{" || (n === "}" && t.parent.kind === "curly") || (n === "]" && t.parent.kind === "square") ? ((t = t.parent), r--) : (t.text += n); break; } case "command": - n === "{" ? (t = new rr("curly", t)) : n === "[" ? (t = new rr("square", t)) : (n === "}" && t.parent.kind === "curly") || (n === "]" && t.parent.kind === "square") || /\s/.test(n) || t.args.length > 0 ? ((t = t.parent), i--) : (t.command += n); + n === "{" ? (t = new Xi("curly", t)) : n === "[" ? (t = new Xi("square", t)) : (n === "}" && t.parent.kind === "curly") || (n === "]" && t.parent.kind === "square") || /\s/.test(n) || t.args.length > 0 ? ((t = t.parent), r--) : (t.command += n); } } return e; } - h(ks, "parseLaTeX"); - function Ss(r) { - return Au(r); + a(ms, "parseLaTeX"); + function gs(i) { + return Fl(i); } - h(Ss, "stringifyLaTeX"); - function Au(r) { - var e = r.children + a(gs, "stringifyLaTeX"); + function Fl(i) { + var e = i.children .map((t) => { switch (t.type) { case "block": - return Au(t); + return Fl(t); case "command": - return vv(t); + return nv(t); case "text": return t.text; } }) .join(""); - switch (r.kind) { + switch (i.kind) { case "root": return e; case "curly": @@ -3235,22 +3036,22 @@ function _ts_generator(thisArg, body) { return "[" + e + "]"; } } - h(Au, "stringifyBlock"); - function vv(r) { - return "\\" + r.command + r.args.map(Au).join(""); + a(Fl, "stringifyBlock"); + function nv(i) { + return "\\" + i.command + i.args.map(Fl).join(""); } - h(vv, "stringifyCommand"); - function jr(r) { - var e = _object_spread_props(_object_spread({}, r), { children: [] }); + a(nv, "stringifyCommand"); + function Vr(i) { + var e = _object_spread_props(_object_spread({}, i), { children: [] }); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; if (t.type === "block" && t.kind === "curly") { - var i = jr(t); - e.children.push(...i.children); + var r = Vr(t); + e.children.push(...r.children); } else e.children.push(t); } } catch (err) { @@ -3269,8 +3070,8 @@ function _ts_generator(thisArg, body) { } return e; } - h(jr, "flattenLaTeX"); - var g0 = new Map([ + a(Vr, "flattenLaTeX"); + var t0 = new Map([ ["0023", "\\#"], ["0024", "\\$"], ["0025", "\\%"], @@ -5598,52 +5399,50 @@ function _ts_generator(thisArg, body) { ["d7fe", "\\mathtt{8}"], ["d7ff", "\\mathtt{9}"], ]); - function D0(r) { + function i0(i) { var e = []; - r = r.replace(/\$[^$]+\$/, (n) => (e.push(n), "MATH.EXP.".concat(e.length - 1))); + i = i.replace(/\$[^\$]+\$/g, (n) => (e.push(n), "MATH.EXP.".concat(e.length - 1))); var t = "", - i = !1; - for (var n = 0; n < r.length; n++) { - if (i) { - (i = !1), (t += r[n]); + r = !1; + for (var n = 0; n < i.length; n++) { + if (r) { + (r = !1), (t += i[n]); continue; } - if (r[n] === "\\") { - (i = !0), (t += r[n]); + if (i[n] === "\\") { + (r = !0), (t += i[n]); continue; } - var s = r.charCodeAt(n).toString(16).padStart(4, "0"); - var _g0_get; - t += (_g0_get = g0.get(s)) !== null && _g0_get !== void 0 ? _g0_get : r[n]; + var s = i.charCodeAt(n).toString(16).padStart(4, "0"); + var _t0_get; + t += (_t0_get = t0.get(s)) !== null && _t0_get !== void 0 ? _t0_get : i[n]; } - return t.replace(/MATH\.EXP\.(\d+)/, (n, s) => { - var _e_Number; - return (_e_Number = e[Number(s)]) !== null && _e_Number !== void 0 ? _e_Number : ""; - }); + var _e_Number; + return t.replace(/MATH\.EXP\.(\d+)/g, (n, s) => ((_e_Number = e[Number(s)]) !== null && _e_Number !== void 0 ? _e_Number : "")); } - h(D0, "escapeSpecialCharacters"); - function F0(r) { - return r.replace(/(\w)(\S*)/g, (e, t, i) => { - var n = t + i; - return xv(n) ? n : t.toLocaleUpperCase() + i.toLocaleLowerCase(); + a(i0, "escapeSpecialCharacters"); + function r0(i) { + return i.replace(/(\w)(\S*)/g, (e, t, r) => { + var n = t + r; + return sv(n) ? n : t.toLocaleUpperCase() + r.toLocaleLowerCase(); }); } - h(F0, "titleCase"); - function xv(r) { - return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(r); + a(r0, "titleCase"); + function sv(i) { + return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(i); } - h(xv, "isRomanNumeral"); - function nr(r) { - return r.replace(/[^0-9A-Za-z]/g, "").toLocaleLowerCase(); + a(sv, "isRomanNumeral"); + function Qi(i) { + return i.replace(/[^0-9A-Za-z]/g, "").toLocaleLowerCase(); } - h(nr, "alphaNum"); - function b0(r) { - return r.replace(/\r\n?/g, "\n"); + a(Qi, "alphaNum"); + function n0(i) { + return i.replace(/\r\n?/g, "\n"); } - h(b0, "convertCRLF"); - function y0(r, e) { - var t = r.split(" "), - i = [], + a(n0, "convertCRLF"); + function s0(i, e) { + var t = i.split(" "), + r = [], n = ""; var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -5653,7 +5452,7 @@ function _ts_generator(thisArg, body) { var _step_value = _sliced_to_array(_step.value, 2), s = _step_value[0], o = _step_value[1]; - n.length + o.length + 1 > e && s > 0 && (i.push(n.trim()), (n = "")), (n += o + " "); + n.length + o.length + 1 > e && s > 0 && (r.push(n.trim()), (n = "")), (n += o + " "); } } catch (err) { _didIteratorError = true; @@ -5669,44 +5468,44 @@ function _ts_generator(thisArg, body) { } } } - return [...i, n.trim()]; + return [...r, n.trim()]; } - h(y0, "wrapText"); - function E0(r) { - return r + a(s0, "wrapText"); + function o0(i) { + return i .replace(/\s*\n\s*\n\s*/g, "<>") .replace(/\s*\n\s*/g, " ") .replace(/<>/g, "\n\n"); } - h(E0, "unwrapText"); - function ku(r, e) { - return e && (r = Ss(jr(ks(r)))), "{".concat(r, "}"); + a(o0, "unwrapText"); + function yl(i, e) { + return e && (i = gs(Vr(ms(i)))), "{".concat(i, "}"); } - h(ku, "addEnclosingBraces"); - function C0(r) { - return r.replace(/^\{([^{}]*)\}$/g, "$1"); + a(yl, "addEnclosingBraces"); + function u0(i) { + return i.replace(/^\{([^{}]*)\}$/g, "$1"); } - h(C0, "removeEnclosingBraces"); - function B0(r) { - return r.replace(/\\?_/g, "\\%5F"); + a(u0, "removeEnclosingBraces"); + function l0(i) { + return i.replace(/\\?_/g, "\\%5F"); } - h(B0, "escapeURL"); - function v0(r, e) { - var t = r.split(" and "); - return t.length > e ? [...t.slice(0, e), "others"].join(" and ") : r; + a(l0, "escapeURL"); + function a0(i, e) { + var t = i.split(" and "); + return t.length > e ? [...t.slice(0, e), "others"].join(" and ") : i; } - h(v0, "limitAuthors"); - function x0(r) { - for (var e = 0; e < 4; e++) r = r.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); - return r; + a(a0, "limitAuthors"); + function h0(i) { + for (var e = 0; e < 4; e++) i = i.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); + return i; } - h(x0, "formatPageRange"); - function Yr(r) { - var _r_block; - return r.type !== "text" && ((_r_block = r.block) === null || _r_block === void 0 ? void 0 : _r_block.type) === "entry"; + a(h0, "formatPageRange"); + function zr(i) { + var _i_block; + return i.type !== "text" && ((_i_block = i.block) === null || _i_block === void 0 ? void 0 : _i_block.type) === "entry"; } - h(Yr, "isEntryNode"); - function A0(r, e, t, i) { + a(zr, "isEntryNode"); + function c0(i, e, t, r) { var n = new Map(); var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -5715,7 +5514,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var f = _step.value; - n.set(f, !!i); + n.set(f, !!r); } } catch (err) { _didIteratorError = true; @@ -5734,15 +5533,15 @@ function _ts_generator(thisArg, body) { n.has("key") || n.set("key", !1); var s = new Set(), o = [], - l = new Map(), u = new Map(), - a = new Map(), + l = new Map(), + h = new Map(), c = new Map(); var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator1 = vi(r)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator1 = Di(i)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { var f1 = _step1.value; var d = e.get(f1); var _iteratorNormalCompletion2 = true, @@ -5754,42 +5553,42 @@ function _ts_generator(thisArg, body) { var _step_value = _sliced_to_array(_step2.value, 2), p = _step_value[0], m = _step_value[1]; - var F = void 0, + var b = void 0, g = void 0; switch (p) { case "key": { if (!f1.key) continue; var D = f1.key.toLocaleLowerCase(); - (F = l.get(D)), F ? (g = "The citation key ".concat(f1.key, " has already been used.")) : l.set(D, f1); + (b = u.get(D)), b ? (g = "The citation key ".concat(f1.key, " has already been used.")) : u.set(D, f1); break; } case "doi": { var _d_get; - var D1 = nr((_d_get = d.get("doi")) !== null && _d_get !== void 0 ? _d_get : ""); + var D1 = Qi((_d_get = d.get("doi")) !== null && _d_get !== void 0 ? _d_get : ""); if (!D1) continue; - (F = u.get(D1)), F ? (g = "Entry ".concat(f1.key, " has an identical DOI to entry ").concat(F.key, ".")) : u.set(D1, f1); + (b = l.get(D1)), b ? (g = "Entry ".concat(f1.key, " has an identical DOI to entry ").concat(b.key, ".")) : l.set(D1, f1); break; } case "citation": { - var _Bi_; + var _gi_; var D2 = d.get("title"), - b = d.get("author"), - B = d.get("number"); - if (!D2 || !b) continue; - var _Bi__lastName; - var k = [nr((_Bi__lastName = (_Bi_ = Bi(b)[0]) === null || _Bi_ === void 0 ? void 0 : _Bi_.lastName) !== null && _Bi__lastName !== void 0 ? _Bi__lastName : b), nr(D2), nr(B !== null && B !== void 0 ? B : "0")].join(":"); - (F = a.get(k)), F ? (g = "Entry ".concat(f1.key, " has similar content to entry ").concat(F.key, ".")) : a.set(k, f1); + F = d.get("author"), + w = d.get("number"); + if (!D2 || !F) continue; + var _gi__lastName; + var x = [Qi((_gi__lastName = (_gi_ = gi(F)[0]) === null || _gi_ === void 0 ? void 0 : _gi_.lastName) !== null && _gi__lastName !== void 0 ? _gi__lastName : F), Qi(D2), Qi(w !== null && w !== void 0 ? w : "0")].join(":"); + (b = h.get(x)), b ? (g = "Entry ".concat(f1.key, " has similar content to entry ").concat(b.key, ".")) : h.set(x, f1); break; } case "abstract": { var _d_get1; - var b1 = nr((_d_get1 = d.get("abstract")) !== null && _d_get1 !== void 0 ? _d_get1 : "").slice(0, 100); - if (!b1) continue; - (F = c.get(b1)), F ? (g = "Entry ".concat(f1.key, " has a similar abstract to entry ").concat(F.key, ".")) : c.set(b1, f1); + var F1 = Qi((_d_get1 = d.get("abstract")) !== null && _d_get1 !== void 0 ? _d_get1 : "").slice(0, 100); + if (!F1) continue; + (b = c.get(F1)), b ? (g = "Entry ".concat(f1.key, " has a similar abstract to entry ").concat(b.key, ".")) : c.set(F1, f1); break; } } - F && m && (s.add(f1), Av(i, F, f1)), g && o.push({ code: "DUPLICATE_ENTRY", rule: p, message: "Duplicate ".concat(m ? "removed" : "detected", ". ").concat(g) }); + b && m && (s.add(f1), ov(r, b, f1)), g && o.push({ code: "DUPLICATE_ENTRY", rule: p, message: "Duplicate ".concat(m ? "removed" : "detected", ". ").concat(g) }); } } catch (err) { _didIteratorError2 = true; @@ -5822,10 +5621,10 @@ function _ts_generator(thisArg, body) { } return { entries: s, warnings: o }; } - h(A0, "checkForDuplicates"); - function Av(r, e, t) { - if (r) - switch (r) { + a(c0, "checkForDuplicates"); + function ov(i, e, t) { + if (i) + switch (i) { case "last": (e.key = t.key), (e.fields = t.fields); break; @@ -5836,9 +5635,9 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { var _loop = function () { - var i = _step.value; - var n = e.fields.find((s) => s.name.toLocaleLowerCase() === i.name.toLocaleLowerCase()); - n ? r === "overwrite" && (n.value = i.value) : e.fields.push(i); + var r = _step.value; + var n = e.fields.find((s) => s.name.toLocaleLowerCase() === r.name.toLocaleLowerCase()); + n ? i === "overwrite" && (n.value = r.value) : e.fields.push(r); }; for (var _iterator = t.fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop(); } catch (err) { @@ -5860,10 +5659,10 @@ function _ts_generator(thisArg, body) { return; } } - h(Av, "mergeEntries"); - var Su = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], - k0 = new Set(Su), - S0 = { + a(ov, "mergeEntries"); + var Cl = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], + f0 = new Set(Cl), + d0 = { 1: "jan", 2: "feb", 3: "mar", @@ -5900,41 +5699,42 @@ function _ts_generator(thisArg, body) { november: "nov", december: "dec", }; - function Q0(r, e, t) { - var i = e.omit, + function m0(i, e, t) { + var r = e.omit, n = e.tab, s = e.space, o = n ? " " : " ".repeat(s), - l = new Set(i), - u = r.children - .map((a) => kv(a, e, o, l, t)) + u = new Set(r), + l = i.children + .map((h) => uv(h, e, o, u, t)) .join("") .trimEnd(); - return u.endsWith("\n") || (u += "\n"), u; + return l.endsWith("\n") || (l += "\n"), l; } - h(Q0, "formatBibtex"); - function kv(r, e, t, i, n) { - if (r.type === "text") return w0(r.text, e); - if (!r.block) throw new Error("FATAL!"); - switch (r.block.type) { + a(m0, "formatBibtex"); + function uv(i, e, t, r, n) { + if (i.type === "text") return p0(i.text, e); + if (!i.block) throw new Error("FATAL!"); + switch (i.block.type) { case "preamble": case "string": - return "".concat(r.block.raw, "\n") + (e.blankLines ? "\n" : ""); + return "".concat(i.block.raw, "\n") + (e.blankLines ? "\n" : ""); case "comment": - return w0(r.block.raw, e); + return p0(i.block.raw, e); case "entry": - return Sv(r.command, r.block, e, t, i, n === null || n === void 0 ? void 0 : n.get(r.block)) + (e.blankLines ? "\n" : ""); + var _n_get, _this; + return lv(i.command, i.block, e, t, r, (_this = n) === null || _this === void 0 ? void 0 : (_n_get = _this.get) === null || _n_get === void 0 ? void 0 : _n_get.call(_this, i.block)) + (e.blankLines ? "\n" : ""); } } - h(kv, "formatNode"); - function Sv(r, e, t, i, n, s) { + a(uv, "formatNode"); + function lv(i, e, t, r, n, s) { var o = t.align, - l = t.trailingCommas, - u = t.removeDuplicateFields, - a = t.removeEmptyFields, + u = t.trailingCommas, + l = t.removeDuplicateFields, + h = t.removeEmptyFields, c = t.lowercase, f = "", - d = c ? r.toLocaleLowerCase() : r; + d = c ? i.toLocaleLowerCase() : i; f += "@".concat(d, "{"); var p = s !== null && s !== void 0 ? s : e.key; p && (f += "".concat(p, ",")); @@ -5945,23 +5745,23 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = e.fields.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _step_value = _sliced_to_array(_step.value, 2), - F = _step_value[0], + b = _step_value[0], g = _step_value[1]; var D = g.name.toLocaleLowerCase(), - b = c ? D : g.name; - if (g.name !== "" && !n.has(D) && !(u && m.has(D))) { + F = c ? D : g.name; + if (g.name !== "" && !n.has(D) && !(l && m.has(D))) { if ((m.add(D), g.value.concat.length === 0)) { - if (a) continue; - f += "\n".concat(i).concat(b); + if (h) continue; + f += "\n".concat(r).concat(F); } else { - var B = wu(g, t); - if (a && (B === "{}" || B === '""')) continue; + var w = Al(g, t); + if (h && (w === "{}" || w === '""')) continue; f += "\n" - .concat(i) - .concat(b.trim().padEnd(o - 1), " = ") - .concat(B); + .concat(r) + .concat(F.trim().padEnd(o - 1), " = ") + .concat(w); } - (F < e.fields.length - 1 || l) && (f += ","); + (b < e.fields.length - 1 || u) && (f += ","); } } } catch (err) { @@ -5980,96 +5780,100 @@ function _ts_generator(thisArg, body) { } return (f += "\n}\n"), f; } - h(Sv, "formatEntry"); - function w0(r, param) { + a(lv, "formatEntry"); + function p0(i, param) { var e = param.stripComments, t = param.tidyComments; if (e) return ""; if (t) { - var i = r.trim(); - return i === "" ? "" : i + "\n"; - } else return r.replace(/^[ \t]*\n|[ \t]*$/g, ""); + var r = i.trim(); + return r === "" ? "" : r + "\n"; + } else return i.replace(/^[ \t]*\n|[ \t]*$/g, ""); } - h(w0, "formatComment"); - function wu(r, e) { + a(p0, "formatComment"); + function Al(i, e) { var t = e.curly, - i = e.numeric, + r = e.numeric, n = e.align, s = e.stripEnclosingBraces, o = e.dropAllCaps, - l = e.escape, - u = e.encodeUrls, - a = e.wrap, + u = e.escape, + l = e.encodeUrls, + h = e.wrap, c = e.maxAuthors, f = e.tab, d = e.space, p = e.enclosingBraces, m = e.removeBraces, - F = e.months, - g = r.name.toLocaleLowerCase(), + b = e.months, + g = i.name.toLocaleLowerCase(), D = f ? " " : " ".repeat(d), - b = new Set((p !== null && p !== void 0 ? p : []).map((k) => k.toLocaleLowerCase())), - B = new Set((m !== null && m !== void 0 ? m : []).map((k) => k.toLocaleLowerCase())); - return r.value.concat + F = new Set((p !== null && p !== void 0 ? p : []).map((x) => x.toLocaleLowerCase())), + w = new Set((m !== null && m !== void 0 ? m : []).map((x) => x.toLocaleLowerCase())); + return i.value.concat .map((param) => { - var k = param.type, - C = param.value; - var L = C.match(/^[1-9][0-9]*$/); - if ((L && t && (k = "braced"), F && g === "month")) { - var z = S0[C.toLowerCase()]; + var x = param.type, + E = param.value; + var _ = E.match(/^[1-9][0-9]*$/); + if ((_ && t && (x = "braced"), b && g === "month")) { + var z = d0[E.toLowerCase()]; if (z) return z; } - if (k === "literal" || (i && L)) return C; - var Q = C.slice(0, 3).toLowerCase(), - V = g === "month" && k0.has(Q); - if (!t && i && V) return Q; - if (((C = E0(C)), s && (C = C0(C)), o && !C.match(/[a-z]/) && (C = F0(C)), g === "url" && u && (C = B0(C)), l && (C = D0(C)), g === "pages" && (C = x0(C)), g === "author" && c && (C = v0(C, c)), B.has(g) && (C = Ss(jr(ks(C)))), b.has(g) && (k === "braced" || t) && (C = ku(C, !0)), k === "braced" && r.value.concat.length === 1 && (C = C.trim()), k === "braced" || t)) { - var z1 = "".concat(D).concat(n, "{").concat(C, "}").length, - G = C.includes("\n\n"); - if ((a && z1 > a) || G) { - var T = C.split("\n\n"), - j = D.repeat(2); - if (a) { - var te = a; - T = T.map((P) => y0(P, te - j.length).join("\n" + j)); - } - C = "\n" + j + T.join("\n\n".concat(j)) + "\n" + D; - } - return ku(C); - } else return '"'.concat(C, '"'); + if (x === "literal" || (r && _)) return E; + var I = E.slice(0, 3).toLowerCase(), + J = g === "month" && f0.has(I); + if (!t && r && J) return I; + if (((E = o0(E)), s && (E = u0(E)), o && !E.match(/[a-z]/) && (E = r0(E)), g === "url" && l && (E = l0(E)), u && (E = i0(E)), g === "pages" && (E = h0(E)), g === "author" && c && (E = a0(E, c)), w.has(g) && (E = gs(Vr(ms(E)))), F.has(g) && (x === "braced" || t) && (E = yl(E, !0)), x === "braced" && i.value.concat.length === 1 && (E = E.trim()), x === "braced" || t)) { + var z1 = "".concat(D).concat(n, "{").concat(E, "}").length, + U = E.includes("\n\n"); + if ((h && z1 > h) || U) { + var N = E.split("\n\n"), + ne = D.repeat(2); + if (h) { + var le = h; + N = N.map((H) => s0(H, le - ne.length).join("\n" + ne)); + } + E = "\n" + ne + N.join("\n\n".concat(ne)) + "\n" + D; + } + return yl(E); + } else return '"'.concat(E, '"'); }) .join(" # "); } - h(wu, "formatValue"); - var wv = { + a(Al, "formatValue"); + var _i_get; + var av = { auth: { description: "Last name of first authors", - callback: (r) => { - var _Bi_; - var _r_get; + callback: (i) => { + var _gi__lastName_replace, _this, _gi_; + var _i_get; var t = - (_Bi_ = Bi((_r_get = r.get("author")) !== null && _r_get !== void 0 ? _r_get : "", !0)[0]) === null || _Bi_ === void 0 + (_gi_ = gi((_i_get = i.get("author")) !== null && _i_get !== void 0 ? _i_get : "", !0)[0]) === null || _gi_ === void 0 ? void 0 - : _Bi_.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", + : (_gi__lastName_replace = (_this = _gi_.lastName).replace) === null || _gi__lastName_replace === void 0 + ? void 0 + : _gi__lastName_replace.call( + _this, + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" ); return t ? [t] : []; }, }, authEtAl: { description: "If 1 or 2 authors, both authors, otherwise first author and EtAl", - callback: (r) => { - var _r_get; - var e = Bi((_r_get = r.get("author")) !== null && _r_get !== void 0 ? _r_get : "", !0); + callback: (i) => { + var _i_get; + var e = gi((_i_get = i.get("author")) !== null && _i_get !== void 0 ? _i_get : "", !0); return [ ...e .slice(0, 2) .map((t) => t.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", - ), + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" + ) ), ...(e.length > 2 ? ["Et", "Al"] : []), ]; @@ -6077,81 +5881,84 @@ function _ts_generator(thisArg, body) { }, authors: { description: "Last name all authors", - callback: (r) => { - var _r_get; - return Bi((_r_get = r.get("author")) !== null && _r_get !== void 0 ? _r_get : "", !0).map((t) => + callback: (i) => + gi((_i_get = i.get("author")) !== null && _i_get !== void 0 ? _i_get : "", !0).map((t) => t.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", - ), - ); - }, + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" + ) + ), }, authorsN: { description: "Last name N authors, with EtAl if more", - callback: function (r) { + callback: function (i) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - var _r_get; - var t = Bi((_r_get = r.get("author")) !== null && _r_get !== void 0 ? _r_get : "", !0); + var _i_get; + var t = gi((_i_get = i.get("author")) !== null && _i_get !== void 0 ? _i_get : "", !0); return [ ...t .slice(0, e) - .map((i) => - i.lastName.replace( - /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/g, - "_", - ), + .map((r) => + r.lastName.replace( + /(?:[\0-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g, + "_" + ) ), ...(t.length > e ? ["Et", "Al"] : []), ]; }, }, - veryshorttitle: { description: "First non-function word of the title", callback: (r) => _0(ws(r)).slice(0, 1) }, - shorttitle: { description: "First three non-function words of the title", callback: (r) => _0(ws(r)).slice(0, 3) }, - title: { description: "Full title, capitalized", callback: (r) => L0(_s(ws(r))) }, - fulltitle: { description: "Full title, verbatim", callback: (r) => _s(ws(r)) }, + veryshorttitle: { description: "First non-function word of the title", callback: (i) => g0(Ds(i)).slice(0, 1) }, + shorttitle: { description: "First three non-function words of the title", callback: (i) => g0(Ds(i)).slice(0, 3) }, + title: { description: "Full title, capitalized", callback: (i) => b0(Fs(Ds(i))) }, + fulltitle: { description: "Full title, verbatim", callback: (i) => Fs(Ds(i)) }, year: { description: "Year", - callback: (r) => { - var _r_get; - var e = (_r_get = r.get("year")) === null || _r_get === void 0 ? void 0 : _r_get.replace(/[^0-9]/g, ""); + callback: (i) => { + var _i_get_replace, _this; + var e = (_this = i.get("year")) === null || _this === void 0 ? void 0 : (_i_get_replace = _this.replace) === null || _i_get_replace === void 0 ? void 0 : _i_get_replace.call(_this, /[^0-9]/g, ""); return e ? [e] : []; }, }, duplicateLetter: { description: "If the multiple entries end up with the same key, then insert a letter a-z. By default this will be inserted at the end.", callback: () => ["[duplicateLetter]"] }, duplicateNumber: { description: "If the multiple entries end up with the same key, then insert a number.", callback: () => ["[duplicateNumber]"] }, }, - Qv = { + hv = { required: { description: "If data is missing, revert to existing key", - callback: (r) => { - if (r.length === 0) throw new Qs(); - return r; + callback: (i) => { + if (i.length === 0) throw new bs(); + return i; }, }, - lower: { description: "Convert to lowercase", callback: (r) => r.map((e) => e.toLocaleLowerCase()) }, - upper: { description: "Convert to uppercase", callback: (r) => r.map((e) => e.toLocaleUpperCase()) }, - capitalize: { description: "Capitalize first letter of each word", callback: L0 }, + lower: { description: "Convert to lowercase", callback: (i) => i.map((e) => e.toLocaleLowerCase()) }, + upper: { description: "Convert to uppercase", callback: (i) => i.map((e) => e.toLocaleUpperCase()) }, + capitalize: { description: "Capitalize first letter of each word", callback: b0 }, }, - Qs = ((_class17 = class _class extends Error {}), h(_class17, "MissingRequiredData"), _class17); - function U0(r, e, t) { - var i = t; - !t.includes("[duplicateLetter]") && !t.includes("[duplicateNumber]") && (i = t + "[duplicateLetter]"); + bs = + ((_class17 = class _class extends Error {}), + (() => { + a(_class17, "MissingRequiredData"); + })(), + _class17); + function D0(i, e, t) { + var r = t; + !t.includes("[duplicateLetter]") && !t.includes("[duplicateNumber]") && (r = t + "[duplicateLetter]"); var n = new Map(); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var o = _step.value; - if (Yr(o)) { - var l = e.get(o.block); - if (!l) continue; - var u = _v(l, i); + if (zr(o)) { + var u = e.get(o.block); if (!u) continue; + var l = cv(u, r); + if (!l) continue; var _n_get; - var a = (_n_get = n.get(u)) !== null && _n_get !== void 0 ? _n_get : []; - n.set(u, [...a, o.block]); + var h = (_n_get = n.get(l)) !== null && _n_get !== void 0 ? _n_get : []; + n.set(l, [...h, o.block]); } } } catch (err) { @@ -6179,15 +5986,15 @@ function _ts_generator(thisArg, body) { for (var _iterator1 = n[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion2 = true) { var _step_value = _sliced_to_array(_step1.value, 2), o1 = _step_value[0], - l1 = _step_value[1]; + u1 = _step_value[1]; try { - for (var _iterator2 = l1.entries()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion1 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator2 = u1.entries()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion1 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion1 = true) { var _step_value1 = _sliced_to_array(_step2.value, 2), - u1 = _step_value1[0], - a1 = _step_value1[1]; - var c = l1.length > 1 ? String.fromCharCode(97 + u1) : "", - f = l1.length > 1 ? String(u1 + 1) : ""; - a1.key = o1.replace(/\[duplicateLetter\]/g, c).replace(/\[duplicateNumber\]/g, f); + l1 = _step_value1[0], + h1 = _step_value1[1]; + var c = u1.length > 1 ? String.fromCharCode(97 + l1) : "", + f = u1.length > 1 ? String(l1 + 1) : ""; + h1.key = o1.replace(/\[duplicateLetter\]/g, c).replace(/\[duplicateNumber\]/g, f); } } catch (err) { _didIteratorError1 = true; @@ -6220,31 +6027,31 @@ function _ts_generator(thisArg, body) { } return s; } - h(U0, "generateKeys"); - function _v(r, e) { + a(D0, "generateKeys"); + function cv(i, e) { try { - var _$t = e.replace(/\[[^:\]]+(?::[^:\]]+)*\]/g, (i) => { - var _i_slice_split = _to_array(i.slice(1, -1).split(":")), - n = _i_slice_split[0], - s = _i_slice_split.slice(1); + var _$t = e.replace(/\[[^:\]]+(?::[^:\]]+)*\]/g, (r) => { + var _r_slice_split = _to_array(r.slice(1, -1).split(":")), + n = _r_slice_split[0], + s = _r_slice_split.slice(1); if (!n) throw new Error("Token parse error"); var o, - l = n.replace(/[0-9]+/g, (c) => ((o = Number(c)), "N")), - u = wv[l], - a; - if (u) a = u.callback(r, o); - else if (l === l.toLocaleUpperCase()) { - var c = r.get(l.toLocaleLowerCase()); - a = c ? _s(c) : []; - } else throw new Error("Invalid citation key token ".concat(l)); + u = n.replace(/[0-9]+/g, (c) => ((o = Number(c)), "N")), + l = av[u], + h; + if (l) h = l.callback(i, o); + else if (u === u.toLocaleUpperCase()) { + var c = i.get(u.toLocaleLowerCase()); + h = c ? Fs(c) : []; + } else throw new Error("Invalid citation key token ".concat(u)); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = s[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var c1 = _step.value; - var f = Qv[c1]; - if (f) a = f.callback(a); + var f = hv[c1]; + if (f) h = f.callback(h); else throw new Error("Invalid modifier ".concat(c1)); } } catch (err) { @@ -6261,16 +6068,16 @@ function _ts_generator(thisArg, body) { } } } - return a.join(""); + return h.join(""); }); return _$t === "" ? void 0 : _$t; } catch (t) { - if (t instanceof Qs) return; + if (t instanceof bs) return; throw t; } } - h(_v, "generateKey"); - var Uv = new Set([ + a(cv, "generateKey"); + var fv = new Set([ "a", "about", "above", @@ -6323,47 +6130,47 @@ function _ts_generator(thisArg, body) { "without", "yet", ]); - function _0(r) { - return _s(r).filter((e) => !Uv.has(e.toLocaleLowerCase())); + function g0(i) { + return Fs(i).filter((e) => !fv.has(e.toLocaleLowerCase())); } - h(_0, "nonFunctionWords"); - function _s(r) { - return r + a(g0, "nonFunctionWords"); + function Fs(i) { + return i .split( - /(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF])+/, + /(?:[\0-\/:-@\[-`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CB-\uA7CF\uA7D2\uA7D4\uA7DA-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87B-\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/ ) .filter((e) => e.length > 0); } - h(_s, "words"); - function L0(r) { - return r.map((e) => e.slice(0, 1).toLocaleUpperCase() + e.slice(1).toLocaleLowerCase()); - } - h(L0, "capitalize"); - function ws(r) { - var _r_get, _ref; - return (_ref = (_r_get = r.get("title")) !== null && _r_get !== void 0 ? _r_get : r.get("booktitle")) !== null && _ref !== void 0 ? _ref : ""; - } - h(ws, "title"); - var O0 = ["doi", "citation", "abstract"]; - var Us = ["title", "shorttitle", "author", "year", "month", "day", "journal", "booktitle", "location", "on", "publisher", "address", "series", "volume", "number", "pages", "doi", "isbn", "issn", "url", "urldate", "copyright", "category", "note", "metadata"], - Qu = ["key"], - T0 = "[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]", - Jr = [ + a(Fs, "words"); + function b0(i) { + return i.map((e) => e.slice(0, 1).toLocaleUpperCase() + e.slice(1).toLocaleLowerCase()); + } + a(b0, "capitalize"); + function Ds(i) { + var _i_get, _ref; + return (_ref = (_i_get = i.get("title")) !== null && _i_get !== void 0 ? _i_get : i.get("booktitle")) !== null && _ref !== void 0 ? _ref : ""; + } + a(Ds, "title"); + var F0 = ["doi", "citation", "abstract"]; + var ys = ["title", "shorttitle", "author", "year", "month", "day", "journal", "booktitle", "location", "on", "publisher", "address", "series", "volume", "number", "pages", "doi", "isbn", "issn", "url", "urldate", "copyright", "category", "note", "metadata"], + El = ["key"], + y0 = "[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]", + Hr = [ { key: "help", cli: { "--help": !0, "-h": !0 }, title: "Help", description: ["Show help"], type: "boolean" }, { key: "v2", cli: { "--v2": !0 }, title: "Enable planned v2 CLI changes", description: ["Input files will no longer be modified by default. Instead, you will need to specify `--modify`/`-m` option to overwrite the file, or `--output`/`-o` to output to a different file."], type: "string", defaultValue: void 0 }, - { key: "outputPath", cli: { "--output": (r) => r[0], "-o": (r) => r[0] }, title: "Output path", description: ["Write output to specified path. When omitted (and -m/--modify is not used), the result will be printed to stdout."], type: "string", defaultValue: void 0 }, + { key: "outputPath", cli: { "--output": (i) => i[0], "-o": (i) => i[0] }, title: "Output path", description: ["Write output to specified path. When omitted (and -m/--modify is not used), the result will be printed to stdout."], type: "string", defaultValue: void 0 }, { key: "modify", cli: { "--modify": !0, "-m": !0, "--no-modify": !1 }, title: "Modify input files", description: ["Overwrite the original input files with the tidied result. This is enabled by default but will be disabled by default in v2. For v1, use --no-modify to output to stdout instead of overwriting the input files."], type: "boolean", defaultValue: !0 }, - { key: "omit", cli: { "--omit": (r) => (r.length === 0 && (console.error("Expected a omit list"), process.exit(1)), r) }, toCLI: (r) => (Array.isArray(r) && r.length > 0 ? "--omit=".concat(r.join(",")) : void 0), title: "Remove fields", description: ["Remove specified fields from bibliography entries."], examples: ["--omit=id,name"], type: "string[]", defaultValue: [] }, - { key: "curly", cli: { "--curly": !0, "--no-curly": !1 }, toCLI: (r) => (r ? "--curly" : void 0), title: "Enclose values in braces", description: ['Enclose all property values in braces. Quoted values will be converted to braces. For example, "Journal of Tea" will become {Journal of Tea}.'], type: "boolean", defaultValue: !1 }, - { key: "numeric", cli: { "--numeric": !0, "--no-numeric": !1 }, toCLI: (r) => (r ? "--numeric" : void 0), title: "Use numeric values where possible", description: ["Strip quotes and braces from numeric/month values. For example, {1998} will become 1998."], type: "boolean", defaultValue: !1 }, - { key: "months", cli: { "--months": !0 }, toCLI: (r) => (r ? "--months" : void 0), title: "Abbreviate months", description: ["Convert all months to three letter abbreviations (jan, feb, etc)."], type: "boolean", defaultValue: !1 }, + { key: "omit", cli: { "--omit": (i) => (i.length === 0 && (console.error("Expected a omit list"), process.exit(1)), i) }, toCLI: (i) => (Array.isArray(i) && i.length > 0 ? "--omit=".concat(i.join(",")) : void 0), title: "Remove fields", description: ["Remove specified fields from bibliography entries."], examples: ["--omit=id,name"], type: "string[]", defaultValue: [] }, + { key: "curly", cli: { "--curly": !0, "--no-curly": !1 }, toCLI: (i) => (i ? "--curly" : void 0), title: "Enclose values in braces", description: ['Enclose all property values in braces. Quoted values will be converted to braces. For example, "Journal of Tea" will become {Journal of Tea}.'], type: "boolean", defaultValue: !1 }, + { key: "numeric", cli: { "--numeric": !0, "--no-numeric": !1 }, toCLI: (i) => (i ? "--numeric" : void 0), title: "Use numeric values where possible", description: ["Strip quotes and braces from numeric/month values. For example, {1998} will become 1998."], type: "boolean", defaultValue: !1 }, + { key: "months", cli: { "--months": !0 }, toCLI: (i) => (i ? "--months" : void 0), title: "Abbreviate months", description: ["Convert all months to three letter abbreviations (jan, feb, etc)."], type: "boolean", defaultValue: !1 }, { key: "space", - cli: { "--space": (r) => (r.length > 0 ? Number(r[0]) : !0) }, - toCLI: (r, e) => { + cli: { "--space": (i) => (i.length > 0 ? Number(i[0]) : !0) }, + toCLI: (i, e) => { if (!e.tab) { - if (typeof r == "number" && r !== 2) return "--space=".concat(r); - if (r && r !== 2) return "--space"; + if (typeof i == "number" && i !== 2) return "--space=".concat(i); + if (i && i !== 2) return "--space"; } }, title: "Indent with spaces", @@ -6373,13 +6180,13 @@ function _ts_generator(thisArg, body) { convertBoolean: { true: 2, false: void 0 }, defaultValue: 2, }, - { key: "tab", cli: { "--tab": !0, "--no-tab": !1 }, toCLI: (r) => (r ? "--tab" : void 0), title: "Indent with tabs", description: ["Indent all fields with a tab."], type: "boolean", defaultValue: !1 }, + { key: "tab", cli: { "--tab": !0, "--no-tab": !1 }, toCLI: (i) => (i ? "--tab" : void 0), title: "Indent with tabs", description: ["Indent all fields with a tab."], type: "boolean", defaultValue: !1 }, { key: "align", - cli: { "--align": (r) => Number(r[0]), "--no-align": !1 }, - toCLI: (r) => { - if (r === !1 || r === 1 || r === 0) return "--no-align"; - if (typeof r == "number" && r !== 14) return "--align=".concat(r); + cli: { "--align": (i) => Number(i[0]), "--no-align": !1 }, + toCLI: (i) => { + if (i === !1 || i === 1 || i === 0) return "--no-align"; + if (typeof i == "number" && i !== 14) return "--align=".concat(i); }, title: "Align values", description: ["Insert whitespace between fields and values so that values are visually aligned."], @@ -6388,13 +6195,13 @@ function _ts_generator(thisArg, body) { convertBoolean: { true: 14, false: 1 }, defaultValue: 14, }, - { key: "blankLines", cli: { "--blank-lines": !0, "--no-blank-lines": !1 }, toCLI: (r) => (r ? "--blank-lines" : void 0), title: "Insert blank lines", description: ["Insert an empty line between each entry."], type: "boolean" }, + { key: "blankLines", cli: { "--blank-lines": !0, "--no-blank-lines": !1 }, toCLI: (i) => (i ? "--blank-lines" : void 0), title: "Insert blank lines", description: ["Insert an empty line between each entry."], type: "boolean" }, { key: "sort", - cli: { "--sort": (r) => (r.length > 0 ? r : !0), "--no-sort": !1 }, - toCLI: (r) => { - if (Array.isArray(r) && r.length > 0) return "--sort=".concat(r.join(",")); - if (r === !0) return "--sort"; + cli: { "--sort": (i) => (i.length > 0 ? i : !0), "--no-sort": !1 }, + toCLI: (i) => { + if (Array.isArray(i) && i.length > 0) return "--sort=".concat(i.join(",")); + if (i === !0) return "--sort"; }, title: "Sort bibliography entries", description: [ @@ -6404,18 +6211,18 @@ function _ts_generator(thisArg, body) { ], examples: ["--sort (sort by citation key)", "--sort=-year,name (sort year descending then name ascending)", "--sort=name,year"], type: "boolean | string[]", - convertBoolean: { true: Qu, false: void 0 }, + convertBoolean: { true: El, false: void 0 }, }, { key: "duplicates", cli: { - "--duplicates": (r) => { - if (r.length === 0) return !0; + "--duplicates": (i) => { + if (i.length === 0) return !0; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var e = _step.value; e !== "doi" && e !== "key" && e !== "abstract" && e !== "citation" && (console.error('Invalid key for merge option: "'.concat(e, '"')), process.exit(1)); } @@ -6433,26 +6240,26 @@ function _ts_generator(thisArg, body) { } } } - return r; + return i; }, }, - toCLI: (r) => { - if (Array.isArray(r) && r.length > 0) return "--duplicates=".concat(r.join(",")); - if (r === !0) return "--duplicates"; + toCLI: (i) => { + if (Array.isArray(i) && i.length > 0) return "--duplicates=".concat(i.join(",")); + if (i === !0) return "--duplicates"; }, title: "Check for duplicates", description: ["Warn if duplicates are found, which are entries where DOI, abstract, or author and title are the same."], examples: ["--duplicates doi (same DOIs)", "--duplicates key (same IDs)", "--duplicates abstract (similar abstracts)", "--duplicates citation (similar author and titles)", "--duplicates doi, key (identical DOI or keys)", "--duplicates (same DOI, key, abstract, or citation)"], type: "boolean | ('doi' | 'key' | 'abstract' | 'citation')[]", - convertBoolean: { true: O0, false: void 0 }, - defaultValue: (r) => (r.merge ? O0 : void 0), + convertBoolean: { true: F0, false: void 0 }, + defaultValue: (i) => (i.merge ? F0 : void 0), }, { key: "merge", - cli: { "--merge": (r) => (r.length === 0 ? !0 : (r[0] !== "first" && r[0] !== "last" && r[0] !== "combine" && r[0] !== "overwrite" && (console.error('Invalid merge strategy: "'.concat(r[0], '"')), process.exit(1)), r[0])), "--no-merge": !1 }, - toCLI: (r) => { - if (typeof r == "string") return "--merge=".concat(r); - if (r) return "--merge"; + cli: { "--merge": (i) => (i.length === 0 ? !0 : (i[0] !== "first" && i[0] !== "last" && i[0] !== "combine" && i[0] !== "overwrite" && (console.error('Invalid merge strategy: "'.concat(i[0], '"')), process.exit(1)), i[0])), "--no-merge": !1 }, + toCLI: (i) => { + if (typeof i == "string") return "--merge=".concat(i); + if (i) return "--merge"; }, title: "Merge duplicate entries", description: [ @@ -6465,51 +6272,51 @@ function _ts_generator(thisArg, body) { type: "boolean | 'first' | 'last' | 'combine' | 'overwrite'", convertBoolean: { true: "combine", false: void 0 }, }, - { key: "stripEnclosingBraces", cli: { "--strip-enclosing-braces": !0 }, toCLI: (r) => (r ? "--strip-enclosing-braces" : void 0), title: "Strip double-braced values", description: ["Where an entire value is enclosed in double braces, remove the extra braces. For example, {{Journal of Tea}} will become {Journal of Tea}."], type: "boolean", defaultValue: !1 }, - { key: "dropAllCaps", cli: { "--drop-all-caps": !0 }, toCLI: (r) => (r ? "--drop-all-caps" : void 0), title: "Drop all caps", description: ["Where values are all caps, make them title case. For example, {JOURNAL OF TEA} will become {Journal of Tea}. Roman numerals will be left unchanged."], type: "boolean", defaultValue: !1 }, - { key: "escape", cli: { "--escape": !0, "--no-escape": !1 }, toCLI: (r) => (r === !1 ? "--no-escape" : void 0), title: "Escape special characters", description: ["Escape special characters, such as umlaut. This ensures correct typesetting with latex. Enabled by default."], type: "boolean", defaultValue: !0 }, + { key: "stripEnclosingBraces", cli: { "--strip-enclosing-braces": !0 }, toCLI: (i) => (i ? "--strip-enclosing-braces" : void 0), title: "Strip double-braced values", description: ["Where an entire value is enclosed in double braces, remove the extra braces. For example, {{Journal of Tea}} will become {Journal of Tea}."], type: "boolean", defaultValue: !1 }, + { key: "dropAllCaps", cli: { "--drop-all-caps": !0 }, toCLI: (i) => (i ? "--drop-all-caps" : void 0), title: "Drop all caps", description: ["Where values are all caps, make them title case. For example, {JOURNAL OF TEA} will become {Journal of Tea}. Roman numerals will be left unchanged."], type: "boolean", defaultValue: !1 }, + { key: "escape", cli: { "--escape": !0, "--no-escape": !1 }, toCLI: (i) => (i === !1 ? "--no-escape" : void 0), title: "Escape special characters", description: ["Escape special characters, such as umlaut. This ensures correct typesetting with latex. Enabled by default."], type: "boolean", defaultValue: !0 }, { key: "sortFields", - cli: { "--sort-fields": (r) => (r.length > 0 ? r : !0) }, - toCLI: (r) => { - if (Array.isArray(r) && r.length > 0) return JSON.stringify(r) === JSON.stringify(Us) ? "--sort-fields" : "--sort-fields=".concat(r.join(",")); - if (r === !0) return "--sort-fields"; + cli: { "--sort-fields": (i) => (i.length > 0 ? i : !0) }, + toCLI: (i) => { + if (Array.isArray(i) && i.length > 0) return JSON.stringify(i) === JSON.stringify(ys) ? "--sort-fields" : "--sort-fields=".concat(i.join(",")); + if (i === !0) return "--sort-fields"; }, title: "Sort fields", description: ["Sort the fields within entries.", "If no fields are specified fields will be sorted by: title, shorttitle, author, year, month, day, journal, booktitle, location, on, publisher, address, series, volume, number, pages, doi, isbn, issn, url, urldate, copyright, category, note, metadata"], examples: ["--sort-fields=name,author"], type: "boolean | string[]", - convertBoolean: { true: Us, false: void 0 }, + convertBoolean: { true: ys, false: void 0 }, defaultValue: void 0, }, - { key: "sortProperties", cli: { "--sort-properties": (r) => (r.length > 0 ? r : !0) }, title: "Sort properties", description: ["Alias of sort fields (legacy)"], type: "boolean | string[]", deprecated: !0 }, - { key: "stripComments", cli: { "--strip-comments": !0, "--no-strip-comments": !1 }, toCLI: (r) => (r ? "--strip-comments" : void 0), title: "Remove comments", description: ["Remove all comments from the bibtex source."], type: "boolean", defaultValue: !1 }, - { key: "trailingCommas", cli: { "--trailing-commas": !0, "--no-trailing-commas": !0 }, toCLI: (r) => (r ? "--trailing-commas" : void 0), title: "Trailing commas", description: ["End the last key value pair in each entry with a comma."], type: "boolean", defaultValue: !1 }, - { key: "encodeUrls", cli: { "--encode-urls": !0, "--no-encode-urls": !0 }, toCLI: (r) => (r ? "--encode-urls" : void 0), title: "Encode URLs", description: ["Replace invalid URL characters with percent encoded values."], type: "boolean", defaultValue: !1 }, - { key: "tidyComments", cli: { "--tidy-comments": !0, "--no-tidy-comments": !1 }, toCLI: (r) => (r === !1 ? "--no-tidy-comments" : void 0), title: "Tidy comments", description: ["Remove whitespace surrounding comments."], type: "boolean", defaultValue: !0 }, - { key: "removeEmptyFields", cli: { "--remove-empty-fields": !0, "--no-remove-empty-fields": !1 }, toCLI: (r) => (r ? "--remove-empty-fields" : void 0), title: "Remove empty fields", description: ["Remove any fields that have empty values."], type: "boolean", defaultValue: !1 }, - { key: "removeDuplicateFields", cli: { "--remove-dupe-fields": !0, "--no-remove-dupe-fields": !1 }, toCLI: (r) => (r === !1 ? "--no-remove-dupe-fields" : void 0), title: "Remove duplicate fields", description: ["Only allow one of each field in each entry. Enabled by default."], type: "boolean", defaultValue: !0 }, + { key: "sortProperties", cli: { "--sort-properties": (i) => (i.length > 0 ? i : !0) }, title: "Sort properties", description: ["Alias of sort fields (legacy)"], type: "boolean | string[]", deprecated: !0 }, + { key: "stripComments", cli: { "--strip-comments": !0, "--no-strip-comments": !1 }, toCLI: (i) => (i ? "--strip-comments" : void 0), title: "Remove comments", description: ["Remove all comments from the bibtex source."], type: "boolean", defaultValue: !1 }, + { key: "trailingCommas", cli: { "--trailing-commas": !0, "--no-trailing-commas": !0 }, toCLI: (i) => (i ? "--trailing-commas" : void 0), title: "Trailing commas", description: ["End the last key value pair in each entry with a comma."], type: "boolean", defaultValue: !1 }, + { key: "encodeUrls", cli: { "--encode-urls": !0, "--no-encode-urls": !0 }, toCLI: (i) => (i ? "--encode-urls" : void 0), title: "Encode URLs", description: ["Replace invalid URL characters with percent encoded values."], type: "boolean", defaultValue: !1 }, + { key: "tidyComments", cli: { "--tidy-comments": !0, "--no-tidy-comments": !1 }, toCLI: (i) => (i === !1 ? "--no-tidy-comments" : void 0), title: "Tidy comments", description: ["Remove whitespace surrounding comments."], type: "boolean", defaultValue: !0 }, + { key: "removeEmptyFields", cli: { "--remove-empty-fields": !0, "--no-remove-empty-fields": !1 }, toCLI: (i) => (i ? "--remove-empty-fields" : void 0), title: "Remove empty fields", description: ["Remove any fields that have empty values."], type: "boolean", defaultValue: !1 }, + { key: "removeDuplicateFields", cli: { "--remove-dupe-fields": !0, "--no-remove-dupe-fields": !1 }, toCLI: (i) => (i === !1 ? "--no-remove-dupe-fields" : void 0), title: "Remove duplicate fields", description: ["Only allow one of each field in each entry. Enabled by default."], type: "boolean", defaultValue: !0 }, { key: "generateKeys", - cli: { "--generate-keys": (r) => (r.length > 0 ? r : !0) }, - toCLI: (r) => { - if (r === !0 || r === T0) return "--generate-keys"; - if (typeof r == "string") return '--generate-keys="'.concat(r.replace(/"/g, '\\"'), '"'); + cli: { "--generate-keys": (i) => (i.length > 0 ? i : !0) }, + toCLI: (i) => { + if (i === !0 || i === y0) return "--generate-keys"; + if (typeof i == "string") return '--generate-keys="'.concat(i.replace(/"/g, '\\"'), '"'); }, title: "Generate citation keys [Experimental]", description: ["For all entries replace the key with a new key of the form . A JabRef citation pattern can be provided. This is an experimental option that may change without warning."], type: "boolean | string", - convertBoolean: { true: T0, false: void 0 }, + convertBoolean: { true: y0, false: void 0 }, defaultValue: void 0, }, - { key: "maxAuthors", cli: { "--max-authors": (r) => Number(r[0]) }, toCLI: (r) => (r ? "--max-authors=".concat(r) : void 0), title: "Maximum authors", description: ['Truncate authors if above a given number into "and others".'], type: "number" }, - { key: "lowercase", cli: { "--no-lowercase": !1 }, toCLI: (r) => (r === !1 ? "--no-lowercase" : void 0), title: "Lowercase fields", description: ["Lowercase field names and entry type. Enabled by default."], type: "boolean", defaultValue: !0 }, + { key: "maxAuthors", cli: { "--max-authors": (i) => Number(i[0]) }, toCLI: (i) => (i ? "--max-authors=".concat(i) : void 0), title: "Maximum authors", description: ['Truncate authors if above a given number into "and others".'], type: "number" }, + { key: "lowercase", cli: { "--no-lowercase": !1 }, toCLI: (i) => (i === !1 ? "--no-lowercase" : void 0), title: "Lowercase fields", description: ["Lowercase field names and entry type. Enabled by default."], type: "boolean", defaultValue: !0 }, { key: "enclosingBraces", - cli: { "--enclosing-braces": (r) => (r.length > 0 ? r : !0) }, - toCLI: (r) => { - if (Array.isArray(r) && r.length > 0) return "--enclosing-braces=".concat(r.join(",")); - if (r === !0) return "--enclosing-braces"; + cli: { "--enclosing-braces": (i) => (i.length > 0 ? i : !0) }, + toCLI: (i) => { + if (Array.isArray(i) && i.length > 0) return "--enclosing-braces=".concat(i.join(",")); + if (i === !0) return "--enclosing-braces"; }, title: "Enclose values in double braces", description: ["Enclose the given fields in double braces, such that case is preserved during BibTeX compilation."], @@ -6519,10 +6326,10 @@ function _ts_generator(thisArg, body) { }, { key: "removeBraces", - cli: { "--remove-braces": (r) => (r.length > 0 ? r : !0) }, - toCLI: (r) => { - if (Array.isArray(r) && r.length > 0) return "--remove-braces=".concat(r.join(",")); - if (r === !0) return "--remove-braces"; + cli: { "--remove-braces": (i) => (i.length > 0 ? i : !0) }, + toCLI: (i) => { + if (Array.isArray(i) && i.length > 0) return "--remove-braces=".concat(i.join(",")); + if (i === !0) return "--remove-braces"; }, title: "Remove braces", description: ["Remove any curly braces within the value, unless they are part of a command."], @@ -6530,30 +6337,30 @@ function _ts_generator(thisArg, body) { type: "boolean | string[]", convertBoolean: { true: ["title"], false: void 0 }, }, - { key: "wrap", cli: { "--wrap": (r) => (r.length > 0 ? Number(r[0]) : !0), "--no-wrap": !1 }, toCLI: (r) => (r ? "--wrap=".concat(r) : void 0), title: "Wrap values", description: ["Wrap long values at the given column"], examples: ["--wrap (80 by default)", "--wrap=82"], type: "boolean | number", convertBoolean: { true: 80, false: void 0 } }, + { key: "wrap", cli: { "--wrap": (i) => (i.length > 0 ? Number(i[0]) : !0), "--no-wrap": !1 }, toCLI: (i) => (i ? "--wrap=".concat(i) : void 0), title: "Wrap values", description: ["Wrap long values at the given column"], examples: ["--wrap (80 by default)", "--wrap=82"], type: "boolean | number", convertBoolean: { true: 80, false: void 0 } }, { key: "version", cli: { "--version": !0, "-v": !0 }, title: "Version", description: ["Show bibtex-tidy version."], type: "boolean" }, { key: "quiet", cli: { "--quiet": !0 }, title: "Quiet", description: ["Suppress logs on stdout."], type: "boolean" }, { key: "backup", cli: { "--backup": !0, "--no-backup": !1 }, title: "Backup", description: ["Make a backup <filename>.original. Enabled by default (unless --modify is explicitly provided or outputting to a different file/stdio). Deprecated but provided for backward compatibility."], type: "boolean", defaultValue: !0, deprecated: !0 }, ], - R0 = Object.fromEntries(Jr.map((r) => [r.key, r])); - function Gr(r) { + C0 = Object.fromEntries(Hr.map((i) => [i.key, i])); + function Wr(i) { return Object.fromEntries( - Jr.map((e) => { + Hr.map((e) => { var t = e.key, - i = r[t]; - return e.convertBoolean && typeof i == "boolean" ? [t, i ? e.convertBoolean.true : e.convertBoolean.false] : typeof i > "u" && e.defaultValue !== void 0 ? (typeof e.defaultValue == "function" ? [t, e.defaultValue(r)] : [t, e.defaultValue]) : [t, i]; - }), + r = i[t]; + return e.convertBoolean && typeof r == "boolean" ? [t, r ? e.convertBoolean.true : e.convertBoolean.false] : typeof r > "u" && e.defaultValue !== void 0 ? (typeof e.defaultValue == "function" ? [t, e.defaultValue(i)] : [t, e.defaultValue]) : [t, r]; + }) ); } - h(Gr, "normalizeOptions"); - function N0(r, e, t) { - var i = new Map(), + a(Wr, "normalizeOptions"); + function A0(i, e, t) { + var r = new Map(), n = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; var _s_block; if (s.type === "text" || (((_s_block = s.block) === null || _s_block === void 0 ? void 0 : _s_block.type) !== "entry" && !t.includes("special"))) { @@ -6566,37 +6373,37 @@ function _ts_generator(thisArg, body) { _iteratorError1 = undefined; try { for (var _iterator1 = t[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var l = _step1.value; - l.startsWith("-") && (l = l.slice(1)); - var u = void 0; - switch (l) { + var u = _step1.value; + u.startsWith("-") && (u = u.slice(1)); + var l = void 0; + switch (u) { case "key": var _s_block1; if (((_s_block1 = s.block) === null || _s_block1 === void 0 ? void 0 : _s_block1.type) !== "entry") continue; var _s_block_key; - u = (_s_block_key = s.block.key) !== null && _s_block_key !== void 0 ? _s_block_key : ""; + l = (_s_block_key = s.block.key) !== null && _s_block_key !== void 0 ? _s_block_key : ""; break; case "type": - u = s.command; + l = s.command; break; case "month": { - var _s_block2, _e_get; + var _s_block2, _e_get_get, _this; if (((_s_block2 = s.block) === null || _s_block2 === void 0 ? void 0 : _s_block2.type) !== "entry") continue; - var a = (_e_get = e.get(s.block)) === null || _e_get === void 0 ? void 0 : _e_get.get(l), - c = a ? Su.indexOf(a) : -1; - u = c > -1 ? c : ""; + var h = (_this = e.get(s.block)) === null || _this === void 0 ? void 0 : (_e_get_get = _this.get) === null || _e_get_get === void 0 ? void 0 : _e_get_get.call(_this, u), + c = h ? Cl.indexOf(h) : -1; + l = c > -1 ? c : ""; break; } case "special": - u = Ov(s) ? 0 : 1; + l = pv(s) ? 0 : 1; break; default: - var _s_block3, _e_get1; + var _s_block3, _e_get_get1, _this1; if (((_s_block3 = s.block) === null || _s_block3 === void 0 ? void 0 : _s_block3.type) !== "entry") continue; - var _e_get_get; - u = (_e_get_get = (_e_get1 = e.get(s.block)) === null || _e_get1 === void 0 ? void 0 : _e_get1.get(l)) !== null && _e_get_get !== void 0 ? _e_get_get : ""; + var _e_get_get2; + l = (_e_get_get2 = (_this1 = e.get(s.block)) === null || _this1 === void 0 ? void 0 : (_e_get_get1 = _this1.get) === null || _e_get_get1 === void 0 ? void 0 : _e_get_get1.call(_this1, u)) !== null && _e_get_get2 !== void 0 ? _e_get_get2 : ""; } - o.set(l, typeof u == "string" ? u.toLowerCase() : u); + o.set(u, typeof l == "string" ? l.toLowerCase() : l); } } catch (err) { _didIteratorError1 = true; @@ -6612,10 +6419,10 @@ function _ts_generator(thisArg, body) { } } } - for (i.set(s, o); n.length > 0; ) { - var l1 = n.pop(); - if (!l1) break; - i.set(l1, o); + for (r.set(s, o); n.length > 0; ) { + var u1 = n.pop(); + if (!u1) break; + r.set(u1, o); } } } catch (err) { @@ -6639,12 +6446,12 @@ function _ts_generator(thisArg, body) { var _loop = function () { var s = _step2.value; var o = s.startsWith("-"), - l = o ? s.slice(1) : s; - r.children.sort((u, a) => { - var _i_get, _i_get1; - var _i_get_get, _i_get_get1; - var c = (_i_get_get = (_i_get = i.get(u)) === null || _i_get === void 0 ? void 0 : _i_get.get(l)) !== null && _i_get_get !== void 0 ? _i_get_get : "￰", - f = (_i_get_get1 = (_i_get1 = i.get(a)) === null || _i_get1 === void 0 ? void 0 : _i_get1.get(l)) !== null && _i_get_get1 !== void 0 ? _i_get_get1 : "￰"; + u = o ? s.slice(1) : s; + i.children.sort((l, h) => { + var _r_get_get, _this, _r_get_get1, _this1; + var _r_get_get2, _r_get_get3; + var c = (_r_get_get2 = (_this = r.get(l)) === null || _this === void 0 ? void 0 : (_r_get_get = _this.get) === null || _r_get_get === void 0 ? void 0 : _r_get_get.call(_this, u)) !== null && _r_get_get2 !== void 0 ? _r_get_get2 : "￰", + f = (_r_get_get3 = (_this1 = r.get(h)) === null || _this1 === void 0 ? void 0 : (_r_get_get1 = _this1.get) === null || _r_get_get1 === void 0 ? void 0 : _r_get_get1.call(_this1, u)) !== null && _r_get_get3 !== void 0 ? _r_get_get3 : "￰"; return typeof c == "number" && (c = String(c).padStart(50, "0")), typeof f == "number" && (f = String(f).padStart(50, "0")), (o ? f : c).localeCompare(o ? c : f); }); }; @@ -6664,21 +6471,21 @@ function _ts_generator(thisArg, body) { } } } - h(N0, "sortEntries"); - var Lv = new Set(["string", "preamble", "set", "xdata"]); - function Ov(r) { - return Lv.has(r.command.toLowerCase()); + a(A0, "sortEntries"); + var dv = new Set(["string", "preamble", "set", "xdata"]); + function pv(i) { + return dv.has(i.command.toLowerCase()); } - h(Ov, "isBibLaTeXSpecialEntry"); - function M0(r, e) { + a(pv, "isBibLaTeXSpecialEntry"); + function E0(i, e) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = vi(r)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = Di(i)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; - t.fields.sort((i, n) => { - var s = e.indexOf(i.name.toLocaleLowerCase()), + t.fields.sort((r, n) => { + var s = e.indexOf(r.name.toLocaleLowerCase()), o = e.indexOf(n.name.toLocaleLowerCase()); return s === -1 && o === -1 ? 0 : s === -1 ? 1 : o === -1 ? -1 : o < s ? 1 : o > s ? -1 : 0; }); @@ -6698,42 +6505,33 @@ function _ts_generator(thisArg, body) { } } } - h(M0, "sortEntryFields"); - function P0(r) { + a(E0, "sortEntryFields"); + function v0(i) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var t = Gr(e); - r = b0(r); - var i = m0(r), - n = vi(i) - .filter((a) => !a.key) - .map((a) => ({ code: "MISSING_KEY", message: "".concat(a.parent.command, " entry does not have a citation key.") })), - s = Tv(i, t), - o = A0(i, s, t.duplicates, t.merge); - n.push(...o.warnings), (i.children = i.children.filter((a) => !Yr(a) || !o.entries.has(a.block))), t.sort && N0(i, s, t.sort), t.sortFields && M0(i, t.sortFields); - var l = t.generateKeys ? U0(i, s, t.generateKeys) : void 0; - return { bibtex: Q0(i, t, l), warnings: n, count: vi(i).length }; - } - h(P0, "tidy"); - function vi(r) { - return r.children.filter(Yr).map((e) => e.block); - } - h(vi, "getEntries"); - function Tv(r, e) { - return new Map( - vi(r).map((t) => [ - t, - new Map( - t.fields.map((i) => { - var _wu; - return [i.name.toLocaleLowerCase(), (_wu = wu(i, e)) !== null && _wu !== void 0 ? _wu : ""]; - }), - ), - ]), - ); - } - h(Tv, "generateValueLookup"); - var fe = - ((_r2 = class r { + var t = Wr(e); + i = n0(i); + var r = e0(i), + n = Di(r) + .filter((h) => !h.key) + .map((h) => ({ code: "MISSING_KEY", message: "".concat(h.parent.command, " entry does not have a citation key.") })), + s = mv(r, t), + o = c0(r, s, t.duplicates, t.merge); + n.push(...o.warnings), (r.children = r.children.filter((h) => !zr(h) || !o.entries.has(h.block))), t.sort && A0(r, s, t.sort), t.sortFields && E0(r, t.sortFields); + var u = t.generateKeys ? D0(r, s, t.generateKeys) : void 0; + return { bibtex: m0(r, t, u), warnings: n, count: Di(r).length }; + } + a(v0, "tidy"); + function Di(i) { + return i.children.filter(zr).map((e) => e.block); + } + a(Di, "getEntries"); + function mv(i, e) { + var _Al; + return new Map(Di(i).map((t) => [t, new Map(t.fields.map((r) => [r.name.toLocaleLowerCase(), (_Al = Al(r, e)) !== null && _Al !== void 0 ? _Al : ""]))])); + } + a(mv, "generateValueLookup"); + var de = + ((_i1 = class i { lineAt(e) { if (e < 0 || e > this.length) throw new RangeError("Invalid position ".concat(e, " in document of length ").concat(this.length)); return this.lineInner(e, !1, 1, 0); @@ -6742,51 +6540,47 @@ function _ts_generator(thisArg, body) { if (e < 1 || e > this.lines) throw new RangeError("Invalid line number ".concat(e, " in ").concat(this.lines, "-line document")); return this.lineInner(e, !0, 1, 0); } - replace(e, t, i) { - var ref; - (ref = _sliced_to_array(hr(this, e, t), 2)), (e = ref[0]), (t = ref[1]), ref; + replace(e, t, r) { var n = []; - return this.decompose(0, e, n, 2), i.length && i.decompose(0, i.length, n, 3), this.decompose(t, this.length, n, 1), or.from(n, this.length - (t - e) + i.length); + return this.decompose(0, e, n, 2), r.length && r.decompose(0, r.length, n, 3), this.decompose(t, this.length, n, 1), Zi.from(n, this.length - (t - e) + r.length); } append(e) { return this.replace(this.length, this.length, e); } slice(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length; - var ref; - (ref = _sliced_to_array(hr(this, e, t), 2)), (e = ref[0]), (t = ref[1]), ref; - var i = []; - return this.decompose(e, t, i, 0), or.from(i, t - e); + var r = []; + return this.decompose(e, t, r, 0), Zi.from(r, t - e); } eq(e) { if (e == this) return !0; if (e.length != this.length || e.lines != this.lines) return !1; var t = this.scanIdentical(e, 1), - i = this.length - this.scanIdentical(e, -1), - n = new ki(this), - s = new ki(e); - for (var o = t, l = t; ; ) { + r = this.length - this.scanIdentical(e, -1), + n = new yi(this), + s = new yi(e); + for (var o = t, u = t; ; ) { if ((n.next(o), s.next(o), (o = 0), n.lineBreak != s.lineBreak || n.done != s.done || n.value != s.value)) return !1; - if (((l += n.value.length), n.done || l >= i)) return !0; + if (((u += n.value.length), n.done || u >= r)) return !0; } } iter() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1; - return new ki(this, e); + return new yi(this, e); } iterRange(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length; - return new Rs(this, e, t); + return new vs(this, e, t); } iterLines(e, t) { - var i; - if (e == null) i = this.iter(); + var r; + if (e == null) r = this.iter(); else { t == null && (t = this.lines + 1); var n = this.line(e).from; - i = this.iterRange(n, Math.max(n, t == this.lines + 1 ? this.length : t <= 1 ? 0 : this.line(t - 1).to)); + r = this.iterRange(n, Math.max(n, t == this.lines + 1 ? this.length : t <= 1 ? 0 : this.line(t - 1).to)); } - return new Ns(i); + return new ks(r); } toString() { return this.sliceString(0); @@ -6797,58 +6591,56 @@ function _ts_generator(thisArg, body) { } static of(e) { if (e.length == 0) throw new RangeError("A document must have at least one line"); - return e.length == 1 && !e[0] ? r.empty : e.length <= 32 ? new rt(e) : or.from(rt.split(e, [])); + return e.length == 1 && !e[0] ? i.empty : e.length <= 32 ? new Je(e) : Zi.from(Je.split(e, [])); } constructor() {} }), - h(_r2, "Text"), - _r2), - rt = - ((_r3 = class r extends fe { + (() => { + a(_i1, "Text"); + })(), + _i1), + Je = + ((_i2 = class i extends de { get lines() { return this.text.length; } get children() { return null; } - lineInner(e, t, i, n) { + lineInner(e, t, r, n) { for (var s = 0; ; s++) { var o = this.text[s], - l = n + o.length; - if ((t ? i : l) >= e) return new Uu(n, l, i, o); - (n = l + 1), i++; + u = n + o.length; + if ((t ? r : u) >= e) return new kl(n, u, r, o); + (n = u + 1), r++; } } - decompose(e, t, i, n) { - var s = e <= 0 && t >= this.length ? this : new r(I0(this.text, e, t), Math.min(t, this.length) - Math.max(0, e)); + decompose(e, t, r, n) { + var s = e <= 0 && t >= this.length ? this : new i(k0(this.text, e, t), Math.min(t, this.length) - Math.max(0, e)); if (n & 1) { - var o = i.pop(), - l = Ts(s.text, o.text.slice(), 0, s.length); - if (l.length <= 32) i.push(new r(l, o.length + s.length)); + var o = r.pop(), + u = Es(s.text, o.text.slice(), 0, s.length); + if (u.length <= 32) r.push(new i(u, o.length + s.length)); else { - var u = l.length >> 1; - i.push(new r(l.slice(0, u)), new r(l.slice(u))); + var l = u.length >> 1; + r.push(new i(u.slice(0, l)), new i(u.slice(l))); } - } else i.push(s); + } else r.push(s); } - replace(e, t, i) { - if (!(i instanceof r)) return super.replace(e, t, i); - var ref; - (ref = _sliced_to_array(hr(this, e, t), 2)), (e = ref[0]), (t = ref[1]), ref; - var n = Ts(this.text, Ts(i.text, I0(this.text, 0, e)), t), - s = this.length + i.length - (t - e); - return n.length <= 32 ? new r(n, s) : or.from(r.split(n, []), s); + replace(e, t, r) { + if (!(r instanceof i)) return super.replace(e, t, r); + var n = Es(this.text, Es(r.text, k0(this.text, 0, e)), t), + s = this.length + r.length - (t - e); + return n.length <= 32 ? new i(n, s) : Zi.from(i.split(n, []), s); } sliceString(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n"; - var ref; - (ref = _sliced_to_array(hr(this, e, t), 2)), (e = ref[0]), (t = ref[1]), ref; + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n"; var n = ""; for (var s = 0, o = 0; s <= t && o < this.text.length; o++) { - var l = this.text[o], - u = s + l.length; - s > e && o && (n += i), e < u && t > s && (n += l.slice(Math.max(0, e - s), t - s)), (s = u + 1); + var u = this.text[o], + l = s + u.length; + s > e && o && (n += r), e < l && t > s && (n += u.slice(Math.max(0, e - s), t - s)), (s = l + 1); } return n; } @@ -6880,7 +6672,7 @@ function _ts_generator(thisArg, body) { return 0; } static split(e, t) { - var i = [], + var r = [], n = -1; var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -6888,7 +6680,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; - i.push(s), (n += s.length + 1), i.length == 32 && (t.push(new r(i, n)), (i = []), (n = -1)); + r.push(s), (n += s.length + 1), r.length == 32 && (t.push(new i(r, n)), (r = []), (n = -1)); } } catch (err) { _didIteratorError = true; @@ -6904,66 +6696,65 @@ function _ts_generator(thisArg, body) { } } } - return n > -1 && t.push(new r(i, n)), t; + return n > -1 && t.push(new i(r, n)), t; } constructor(e, ref) { - var t = ref === void 0 ? Rv(e) : ref; + var t = ref === void 0 ? gv(e) : ref; super(), (this.text = e), (this.length = t); } }), - h(_r3, "TextLeaf"), - _r3), - or = - ((_r4 = class r extends fe { - lineInner(e, t, i, n) { + (() => { + a(_i2, "TextLeaf"); + })(), + _i2), + Zi = + ((_i3 = class i extends de { + lineInner(e, t, r, n) { for (var s = 0; ; s++) { var o = this.children[s], - l = n + o.length, - u = i + o.lines - 1; - if ((t ? u : l) >= e) return o.lineInner(e, t, i, n); - (n = l + 1), (i = u + 1); + u = n + o.length, + l = r + o.lines - 1; + if ((t ? l : u) >= e) return o.lineInner(e, t, r, n); + (n = u + 1), (r = l + 1); } } - decompose(e, t, i, n) { + decompose(e, t, r, n) { for (var s = 0, o = 0; o <= t && s < this.children.length; s++) { - var l = this.children[s], - u = o + l.length; - if (e <= u && t >= o) { - var a = n & ((o <= e ? 1 : 0) | (u >= t ? 2 : 0)); - o >= e && u <= t && !a ? i.push(l) : l.decompose(e - o, t - o, i, a); + var u = this.children[s], + l = o + u.length; + if (e <= l && t >= o) { + var h = n & ((o <= e ? 1 : 0) | (l >= t ? 2 : 0)); + o >= e && l <= t && !h ? r.push(u) : u.decompose(e - o, t - o, r, h); } - o = u + 1; + o = l + 1; } } - replace(e, t, i) { - var ref; - if (((ref = _sliced_to_array(hr(this, e, t), 2)), (e = ref[0]), (t = ref[1]), ref, i.lines < this.lines)) + replace(e, t, r) { + if (r.lines < this.lines) for (var n = 0, s = 0; n < this.children.length; n++) { var o = this.children[n], - l = s + o.length; - if (e >= s && t <= l) { - var u = o.replace(e - s, t - s, i), - a = this.lines - o.lines + u.lines; - if (u.lines < a >> 4 && u.lines > a >> 6) { + u = s + o.length; + if (e >= s && t <= u) { + var l = o.replace(e - s, t - s, r), + h = this.lines - o.lines + l.lines; + if (l.lines < h >> (5 - 1) && l.lines > h >> (5 + 1)) { var c = this.children.slice(); - return (c[n] = u), new r(c, this.length - (t - e) + i.length); + return (c[n] = l), new i(c, this.length - (t - e) + r.length); } - return super.replace(s, l, u); + return super.replace(s, u, l); } - s = l + 1; + s = u + 1; } - return super.replace(e, t, i); + return super.replace(e, t, r); } sliceString(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n"; - var ref; - (ref = _sliced_to_array(hr(this, e, t), 2)), (e = ref[0]), (t = ref[1]), ref; + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n"; var n = ""; for (var s = 0, o = 0; s < this.children.length && o <= t; s++) { - var l = this.children[s], - u = o + l.length; - o > e && s && (n += i), e < u && t > o && (n += l.sliceString(e - o, t - o, i)), (o = u + 1); + var u = this.children[s], + l = o + u.length; + o > e && s && (n += r), e < l && t > o && (n += u.sliceString(e - o, t - o, r)), (o = l + 1); } return n; } @@ -6992,31 +6783,31 @@ function _ts_generator(thisArg, body) { } } scanIdentical(e, t) { - if (!(e instanceof r)) return 0; - var i = 0, + if (!(e instanceof i)) return 0; + var r = 0, _ref = _sliced_to_array(t > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1], 4), n = _ref[0], s = _ref[1], o = _ref[2], - l = _ref[3]; + u = _ref[3]; for (; ; n += t, s += t) { - if (n == o || s == l) return i; - var u = this.children[n], - a = e.children[s]; - if (u != a) return i + u.scanIdentical(a, t); - i += u.length + 1; + if (n == o || s == u) return r; + var l = this.children[n], + h = e.children[s]; + if (l != h) return r + l.scanIdentical(h, t); + r += l.length + 1; } } static from(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.reduce((i, n) => i + n.length + 1, -1); - var i = 0; + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.reduce((r, n) => r + n.length + 1, -1); + var r = 0; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var p = _step.value; - i += p.lines; + r += p.lines; } } catch (err) { _didIteratorError = true; @@ -7032,7 +6823,7 @@ function _ts_generator(thisArg, body) { } } } - if (i < 32) { + if (r < 32) { var p1 = []; var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, @@ -7056,25 +6847,25 @@ function _ts_generator(thisArg, body) { } } } - return new rt(p1, t); + return new Je(p1, t); } - var n = Math.max(32, i >> 5), + var n = Math.max(32, r >> 5), s = n << 1, o = n >> 1, - l = [], - u = 0, - a = -1, + u = [], + l = 0, + h = -1, c = []; function f(p) { var m; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if (p.lines > s && p instanceof r) + if (p.lines > s && p instanceof i) try { for (var _iterator = p.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var F = _step.value; - f(F); + var b = _step.value; + f(b); } } catch (err) { _didIteratorError = true; @@ -7090,13 +6881,13 @@ function _ts_generator(thisArg, body) { } } } - else p.lines > o && (u > o || !u) ? (d(), l.push(p)) : p instanceof rt && u && (m = c[c.length - 1]) instanceof rt && p.lines + m.lines <= 32 ? ((u += p.lines), (a += p.length + 1), (c[c.length - 1] = new rt(m.text.concat(p.text), m.length + 1 + p.length))) : (u + p.lines > n && d(), (u += p.lines), (a += p.length + 1), c.push(p)); + else p.lines > o && (l > o || !l) ? (d(), u.push(p)) : p instanceof Je && l && (m = c[c.length - 1]) instanceof Je && p.lines + m.lines <= 32 ? ((l += p.lines), (h += p.length + 1), (c[c.length - 1] = new Je(m.text.concat(p.text), m.length + 1 + p.length))) : (l + p.lines > n && d(), (l += p.lines), (h += p.length + 1), c.push(p)); } - h(f, "add"); + a(f, "add"); function d() { - u != 0 && (l.push(c.length == 1 ? c[0] : r.from(c, a)), (a = -1), (u = c.length = 0)); + l != 0 && (u.push(c.length == 1 ? c[0] : i.from(c, h)), (h = -1), (l = c.length = 0)); } - h(d, "flush"); + a(d, "flush"); var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined; @@ -7119,7 +6910,7 @@ function _ts_generator(thisArg, body) { } } } - return d(), l.length == 1 ? l[0] : new r(l, t); + return d(), u.length == 1 ? u[0] : new i(u, t); } constructor(e, t) { super(), (this.children = e), (this.length = t), (this.lines = 0); @@ -7128,8 +6919,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - this.lines += i.lines; + var r = _step.value; + this.lines += r.lines; } } catch (err) { _didIteratorError = true; @@ -7147,16 +6938,18 @@ function _ts_generator(thisArg, body) { } } }), - h(_r4, "TextNode"), - _r4); - fe.empty = new rt([""], 0); - function Rv(r) { + (() => { + a(_i3, "TextNode"); + })(), + _i3); + de.empty = new Je([""], 0); + function gv(i) { var e = -1; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; e += t.length + 1; } @@ -7176,44 +6969,44 @@ function _ts_generator(thisArg, body) { } return e; } - h(Rv, "textLength"); - function Ts(r, e) { + a(gv, "textLength"); + function Es(i, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, - i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1e9; - for (var n = 0, s = 0, o = !0; s < r.length && n <= i; s++) { - var l = r[s], - u = n + l.length; - u >= t && (u > i && (l = l.slice(0, i - n)), n < t && (l = l.slice(t - n)), o ? ((e[e.length - 1] += l), (o = !1)) : e.push(l)), (n = u + 1); + r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1e9; + for (var n = 0, s = 0, o = !0; s < i.length && n <= r; s++) { + var u = i[s], + l = n + u.length; + l >= t && (l > r && (u = u.slice(0, r - n)), n < t && (u = u.slice(t - n)), o ? ((e[e.length - 1] += u), (o = !1)) : e.push(u)), (n = l + 1); } return e; } - h(Ts, "appendText"); - function I0(r, e, t) { - return Ts(r, [""], e, t); + a(Es, "appendText"); + function k0(i, e, t) { + return Es(i, [""], e, t); } - h(I0, "sliceText"); - var ki = + a(k0, "sliceText"); + var yi = ((_class18 = class _class { nextInner(e, t) { for (this.done = this.lineBreak = !1; ; ) { - var i = this.nodes.length - 1, - n = this.nodes[i], - s = this.offsets[i], + var r = this.nodes.length - 1, + n = this.nodes[r], + s = this.offsets[r], o = s >> 1, - l = n instanceof rt ? n.text.length : n.children.length; - if (o == (t > 0 ? l : 0)) { - if (i == 0) return (this.done = !0), (this.value = ""), this; - t > 0 && this.offsets[i - 1]++, this.nodes.pop(), this.offsets.pop(); + u = n instanceof Je ? n.text.length : n.children.length; + if (o == (t > 0 ? u : 0)) { + if (r == 0) return (this.done = !0), (this.value = ""), this; + t > 0 && this.offsets[r - 1]++, this.nodes.pop(), this.offsets.pop(); } else if ((s & 1) == (t > 0 ? 0 : 1)) { - if (((this.offsets[i] += t), e == 0)) return (this.lineBreak = !0), (this.value = "\n"), this; + if (((this.offsets[r] += t), e == 0)) return (this.lineBreak = !0), (this.value = "\n"), this; e--; - } else if (n instanceof rt) { - var u = n.text[o + (t < 0 ? -1 : 0)]; - if (((this.offsets[i] += t), u.length > Math.max(0, e))) return (this.value = e == 0 ? u : t > 0 ? u.slice(e) : u.slice(0, u.length - e)), this; - e -= u.length; + } else if (n instanceof Je) { + var l = n.text[o + (t < 0 ? -1 : 0)]; + if (((this.offsets[r] += t), l.length > Math.max(0, e))) return (this.value = e == 0 ? l : t > 0 ? l.slice(e) : l.slice(0, l.length - e)), this; + e -= l.length; } else { - var u1 = n.children[o + (t < 0 ? -1 : 0)]; - e > u1.length ? ((e -= u1.length), (this.offsets[i] += t)) : (t < 0 && this.offsets[i]--, this.nodes.push(u1), this.offsets.push(t > 0 ? 1 : (u1 instanceof rt ? u1.text.length : u1.children.length) << 1)); + var l1 = n.children[o + (t < 0 ? -1 : 0)]; + e > l1.length ? ((e -= l1.length), (this.offsets[r] += t)) : (t < 0 && this.offsets[r]--, this.nodes.push(l1), this.offsets.push(t > 0 ? 1 : (l1 instanceof Je ? l1.text.length : l1.children.length) << 1)); } } } @@ -7223,21 +7016,23 @@ function _ts_generator(thisArg, body) { } constructor(e, ref) { var t = ref === void 0 ? 1 : ref; - (this.dir = t), (this.done = !1), (this.lineBreak = !1), (this.value = ""), (this.nodes = [e]), (this.offsets = [t > 0 ? 1 : (e instanceof rt ? e.text.length : e.children.length) << 1]); + (this.dir = t), (this.done = !1), (this.lineBreak = !1), (this.value = ""), (this.nodes = [e]), (this.offsets = [t > 0 ? 1 : (e instanceof Je ? e.text.length : e.children.length) << 1]); } }), - h(_class18, "RawTextCursor"), + (() => { + a(_class18, "RawTextCursor"); + })(), _class18), - Rs = + vs = ((_class19 = class _class { nextInner(e, t) { if (t < 0 ? this.pos <= this.from : this.pos >= this.to) return (this.value = ""), (this.done = !0), this; e += Math.max(0, t < 0 ? this.pos - this.to : this.from - this.pos); - var i = t < 0 ? this.pos - this.from : this.to - this.pos; - e > i && (e = i), (i -= e); + var r = t < 0 ? this.pos - this.from : this.to - this.pos; + e > r && (e = r), (r -= e); var _this_cursor_next = this.cursor.next(e), n = _this_cursor_next.value; - return (this.pos += (n.length + e) * t), (this.value = n.length <= i ? n : t < 0 ? n.slice(n.length - i) : n.slice(0, i)), (this.done = !this.value), this; + return (this.pos += (n.length + e) * t), (this.value = n.length <= r ? n : t < 0 ? n.slice(n.length - r) : n.slice(0, r)), (this.done = !this.value), this; } next() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; @@ -7246,21 +7041,23 @@ function _ts_generator(thisArg, body) { get lineBreak() { return this.cursor.lineBreak && this.value != ""; } - constructor(e, t, i) { - (this.value = ""), (this.done = !1), (this.cursor = new ki(e, t > i ? -1 : 1)), (this.pos = t > i ? e.length : 0), (this.from = Math.min(t, i)), (this.to = Math.max(t, i)); + constructor(e, t, r) { + (this.value = ""), (this.done = !1), (this.cursor = new yi(e, t > r ? -1 : 1)), (this.pos = t > r ? e.length : 0), (this.from = Math.min(t, r)), (this.to = Math.max(t, r)); } }), - h(_class19, "PartialTextCursor"), + (() => { + a(_class19, "PartialTextCursor"); + })(), _class19), - Ns = + ks = ((_class20 = class _class { next() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; var _this_inner_next = this.inner.next(e), t = _this_inner_next.done, - i = _this_inner_next.lineBreak, + r = _this_inner_next.lineBreak, n = _this_inner_next.value; - return t && this.afterBreak ? ((this.value = ""), (this.afterBreak = !1)) : t ? ((this.done = !0), (this.value = "")) : i ? (this.afterBreak ? (this.value = "") : ((this.afterBreak = !0), this.next())) : ((this.value = n), (this.afterBreak = !1)), this; + return t ? ((this.done = !0), (this.value = "")) : r ? (this.afterBreak ? (this.value = "") : ((this.afterBreak = !0), this.next())) : ((this.value = n), (this.afterBreak = !1)), this; } get lineBreak() { return !1; @@ -7269,106 +7066,106 @@ function _ts_generator(thisArg, body) { (this.inner = e), (this.afterBreak = !0), (this.value = ""), (this.done = !1); } }), - h(_class20, "LineCursor"), + (() => { + a(_class20, "LineCursor"); + })(), _class20); typeof Symbol < "u" && - ((fe.prototype[Symbol.iterator] = function () { + ((de.prototype[Symbol.iterator] = function () { return this.iter(); }), - (ki.prototype[Symbol.iterator] = - Rs.prototype[Symbol.iterator] = - Ns.prototype[Symbol.iterator] = + (yi.prototype[Symbol.iterator] = + vs.prototype[Symbol.iterator] = + ks.prototype[Symbol.iterator] = function () { return this; })); - var Uu = - ((_class21 = class _class { - get length() { - return this.to - this.from; - } - constructor(e, t, i, n) { - (this.from = e), (this.to = t), (this.number = i), (this.text = n); - } - }), - h(_class21, "Line"), - _class21); - function hr(r, e, t) { - return (e = Math.max(0, Math.min(r.length, e))), [e, Math.max(e, Math.min(r.length, t))]; - } - h(hr, "clip"); - var lr = - "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o" - .split(",") - .map((r) => (r ? parseInt(r, 36) : 1)); - for (var r = 1; r < lr.length; r++) lr[r] += lr[r - 1]; - function Nv(r) { - for (var e = 1; e < lr.length; e += 2) if (lr[e] > r) return lr[e - 1] <= r; + var kl = + ((_class21 = class _class { + get length() { + return this.to - this.from; + } + constructor(e, t, r, n) { + (this.from = e), (this.to = t), (this.number = r), (this.text = n); + } + }), + (() => { + a(_class21, "Line"); + })(), + _class21), + er = + "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o" + .split(",") + .map((i) => (i ? parseInt(i, 36) : 1)); + for (var i = 1; i < er.length; i++) er[i] += er[i - 1]; + function Dv(i) { + for (var e = 1; e < er.length; e += 2) if (er[e] > i) return er[e - 1] <= i; return !1; } - h(Nv, "isExtendingChar"); - function $0(r) { - return r >= 127462 && r <= 127487; + a(Dv, "isExtendingChar"); + function w0(i) { + return i >= 127462 && i <= 127487; } - h($0, "isRegionalIndicator"); - var q0 = 8205; - function ht(r, e) { + a(w0, "isRegionalIndicator"); + var x0 = 8205; + function yt(i, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, - i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0; - return (t ? Y0 : Mv)(r, e, i); - } - h(ht, "findClusterBreak"); - function Y0(r, e, t) { - if (e == r.length) return e; - e && J0(r.charCodeAt(e)) && G0(r.charCodeAt(e - 1)) && e--; - var i = Kr(r, e); - for (e += Ms(i); e < r.length; ) { - var n = Kr(r, e); - if (i == q0 || n == q0 || (t && Nv(n))) (e += Ms(n)), (i = n); - else if ($0(n)) { + r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0; + return (t ? R0 : bv)(i, e, r); + } + a(yt, "findClusterBreak"); + function R0(i, e, t) { + if (e == i.length) return e; + e && M0(i.charCodeAt(e)) && $0(i.charCodeAt(e - 1)) && e--; + var r = Ur(i, e); + for (e += ws(r); e < i.length; ) { + var n = Ur(i, e); + if (r == x0 || n == x0 || (t && Dv(n))) (e += ws(n)), (r = n); + else if (w0(n)) { var s = 0, o = e - 2; - for (; o >= 0 && $0(Kr(r, o)); ) s++, (o -= 2); + for (; o >= 0 && w0(Ur(i, o)); ) s++, (o -= 2); if (s % 2 == 0) break; e += 2; } else break; } return e; } - h(Y0, "nextClusterBreak"); - function Mv(r, e, t) { + a(R0, "nextClusterBreak"); + function bv(i, e, t) { for (; e > 0; ) { - var i = Y0(r, e - 2, t); - if (i < e) return i; + var r = R0(i, e - 2, t); + if (r < e) return r; e--; } return 0; } - h(Mv, "prevClusterBreak"); - function J0(r) { - return r >= 56320 && r < 57344; - } - h(J0, "surrogateLow"); - function G0(r) { - return r >= 55296 && r < 56320; - } - h(G0, "surrogateHigh"); - function Kr(r, e) { - var t = r.charCodeAt(e); - if (!G0(t) || e + 1 == r.length) return t; - var i = r.charCodeAt(e + 1); - return J0(i) ? ((t - 55296) << 10) + (i - 56320) + 65536 : t; - } - h(Kr, "codePointAt"); - function Ms(r) { - return r < 65536 ? 1 : 2; - } - h(Ms, "codePointSize"); - var Lu = /\r\n?|\n/, - Ve = (function (r) { - return (r[(r.Simple = 0)] = "Simple"), (r[(r.TrackDel = 1)] = "TrackDel"), (r[(r.TrackBefore = 2)] = "TrackBefore"), (r[(r.TrackAfter = 3)] = "TrackAfter"), r; - })(Ve || (Ve = {})), - Jt = - ((_r5 = class r { + a(bv, "prevClusterBreak"); + function M0(i) { + return i >= 56320 && i < 57344; + } + a(M0, "surrogateLow"); + function $0(i) { + return i >= 55296 && i < 56320; + } + a($0, "surrogateHigh"); + function Ur(i, e) { + var t = i.charCodeAt(e); + if (!$0(t) || e + 1 == i.length) return t; + var r = i.charCodeAt(e + 1); + return M0(r) ? ((t - 55296) << 10) + (r - 56320) + 65536 : t; + } + a(Ur, "codePointAt"); + function ws(i) { + return i < 65536 ? 1 : 2; + } + a(ws, "codePointSize"); + var wl = /\r\n?|\n/, + je = (function (i) { + return (i[(i.Simple = 0)] = "Simple"), (i[(i.TrackDel = 1)] = "TrackDel"), (i[(i.TrackBefore = 2)] = "TrackBefore"), (i[(i.TrackAfter = 3)] = "TrackAfter"), i; + })(je || (je = {})), + zt = + ((_i4 = class i { get length() { var e = 0; for (var t = 0; t < this.sections.length; t += 2) e += this.sections[t]; @@ -7377,8 +7174,8 @@ function _ts_generator(thisArg, body) { get newLength() { var e = 0; for (var t = 0; t < this.sections.length; t += 2) { - var i = this.sections[t + 1]; - e += i < 0 ? this.sections[t] : i; + var r = this.sections[t + 1]; + e += r < 0 ? this.sections[t] : r; } return e; } @@ -7386,71 +7183,71 @@ function _ts_generator(thisArg, body) { return this.sections.length == 0 || (this.sections.length == 2 && this.sections[1] < 0); } iterGaps(e) { - for (var t = 0, i = 0, n = 0; t < this.sections.length; ) { + for (var t = 0, r = 0, n = 0; t < this.sections.length; ) { var s = this.sections[t++], o = this.sections[t++]; - o < 0 ? (e(i, n, s), (n += s)) : (n += o), (i += s); + o < 0 ? (e(r, n, s), (n += s)) : (n += o), (r += s); } } iterChangedRanges(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - Ou(this, e, t); + xl(this, e, t); } get invertedDesc() { var e = []; for (var t = 0; t < this.sections.length; ) { - var i = this.sections[t++], + var r = this.sections[t++], n = this.sections[t++]; - n < 0 ? e.push(i, n) : e.push(n, i); + n < 0 ? e.push(r, n) : e.push(n, r); } - return new r(e); + return new i(e); } composeDesc(e) { - return this.empty ? e : e.empty ? this : X0(this, e); + return this.empty ? e : e.empty ? this : P0(this, e); } mapDesc(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - return e.empty ? this : Tu(this, e, t); + return e.empty ? this : Sl(this, e, t); } mapPos(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ve.Simple; + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : je.Simple; var n = 0, s = 0; for (var o = 0; o < this.sections.length; ) { - var l = this.sections[o++], - u = this.sections[o++], - a = n + l; - if (u < 0) { - if (a > e) return s + (e - n); - s += l; - } else { - if (i != Ve.Simple && a >= e && ((i == Ve.TrackDel && n < e && a > e) || (i == Ve.TrackBefore && n < e) || (i == Ve.TrackAfter && a > e))) return null; - if (a > e || (a == e && t < 0 && !l)) return e == n || t < 0 ? s : s + u; + var u = this.sections[o++], + l = this.sections[o++], + h = n + u; + if (l < 0) { + if (h > e) return s + (e - n); s += u; + } else { + if (r != je.Simple && h >= e && ((r == je.TrackDel && n < e && h > e) || (r == je.TrackBefore && n < e) || (r == je.TrackAfter && h > e))) return null; + if (h > e || (h == e && t < 0 && !u)) return e == n || t < 0 ? s : s + l; + s += l; } - n = a; + n = h; } if (e > n) throw new RangeError("Position ".concat(e, " is out of range for changeset of length ").concat(n)); return s; } touchesRange(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; - for (var i = 0, n = 0; i < this.sections.length && n <= t; ) { - var s = this.sections[i++], - o = this.sections[i++], - l = n + s; - if (o >= 0 && n <= t && l >= e) return n < e && l > t ? "cover" : !0; - n = l; + for (var r = 0, n = 0; r < this.sections.length && n <= t; ) { + var s = this.sections[r++], + o = this.sections[r++], + u = n + s; + if (o >= 0 && n <= t && u >= e) return n < e && u > t ? "cover" : !0; + n = u; } return !1; } toString() { var e = ""; for (var t = 0; t < this.sections.length; ) { - var i = this.sections[t++], + var r = this.sections[t++], n = this.sections[t++]; - e += (e ? " " : "") + i + (n >= 0 ? ":" + n : ""); + e += (e ? " " : "") + r + (n >= 0 ? ":" + n : ""); } return e; } @@ -7459,103 +7256,105 @@ function _ts_generator(thisArg, body) { } static fromJSON(e) { if (!Array.isArray(e) || e.length % 2 || e.some((t) => typeof t != "number")) throw new RangeError("Invalid JSON representation of ChangeDesc"); - return new r(e); + return new i(e); } static create(e) { - return new r(e); + return new i(e); } constructor(e) { this.sections = e; } }), - h(_r5, "ChangeDesc"), - _r5), - We = - ((_r6 = class r extends Jt { + (() => { + a(_i4, "ChangeDesc"); + })(), + _i4), + Ue = + ((_i5 = class i extends zt { apply(e) { if (this.length != e.length) throw new RangeError("Applying change set to a document with the wrong length"); - return Ou(this, (t, i, n, s, o) => (e = e.replace(n, n + (i - t), o)), !1), e; + return xl(this, (t, r, n, s, o) => (e = e.replace(n, n + (r - t), o)), !1), e; } mapDesc(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - return Tu(this, e, t, !0); + return Sl(this, e, t, !0); } invert(e) { var t = this.sections.slice(), - i = []; + r = []; for (var n = 0, s = 0; n < t.length; n += 2) { var o = t[n], - l = t[n + 1]; - if (l >= 0) { - (t[n] = l), (t[n + 1] = o); - var u = n >> 1; - for (; i.length < u; ) i.push(fe.empty); - i.push(o ? e.slice(s, s + o) : fe.empty); + u = t[n + 1]; + if (u >= 0) { + (t[n] = u), (t[n + 1] = o); + var l = n >> 1; + for (; r.length < l; ) r.push(de.empty); + r.push(o ? e.slice(s, s + o) : de.empty); } s += o; } - return new r(t, i); + return new i(t, r); } compose(e) { - return this.empty ? e : e.empty ? this : X0(this, e, !0); + return this.empty ? e : e.empty ? this : P0(this, e, !0); } map(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - return e.empty ? this : Tu(this, e, t, !0); + return e.empty ? this : Sl(this, e, t, !0); } iterChanges(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - Ou(this, e, t); + xl(this, e, t); } get desc() { - return Jt.create(this.sections); + return zt.create(this.sections); } filter(e) { var t = [], - i = [], + r = [], n = [], - s = new Si(this); - e: for (var o = 0, l = 0; ; ) { - var u = o == e.length ? 1e9 : e[o++]; - for (; l < u || (l == u && s.len == 0); ) { + s = new Ci(this); + e: for (var o = 0, u = 0; ; ) { + var l = o == e.length ? 1e9 : e[o++]; + for (; u < l || (u == l && s.len == 0); ) { if (s.done) break e; - var c = Math.min(s.len, u - l); - Me(n, c, -1); + var c = Math.min(s.len, l - u); + qe(n, c, -1); var f = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0; - Me(t, c, f), f > 0 && si(i, t, s.text), s.forward(c), (l += c); + qe(t, c, f), f > 0 && Jt(r, t, s.text), s.forward(c), (u += c); } - var a = e[o++]; - for (; l < a; ) { + var h = e[o++]; + for (; u < h; ) { if (s.done) break e; - var c1 = Math.min(s.len, a - l); - Me(t, c1, -1), Me(n, c1, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(c1), (l += c1); + var c1 = Math.min(s.len, h - u); + qe(t, c1, -1), qe(n, c1, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(c1), (u += c1); } } - return { changes: new r(t, i), filtered: Jt.create(n) }; + return { changes: new i(t, r), filtered: zt.create(n) }; } toJSON() { var e = []; for (var t = 0; t < this.sections.length; t += 2) { - var i = this.sections[t], + var r = this.sections[t], n = this.sections[t + 1]; - n < 0 ? e.push(i) : n == 0 ? e.push([i]) : e.push([i].concat(this.inserted[t >> 1].toJSON())); + n < 0 ? e.push(r) : n == 0 ? e.push([r]) : e.push([r].concat(this.inserted[t >> 1].toJSON())); } return e; } - static of(e, t, i) { + static of(e, t, r) { var n = [], s = [], o = 0, - l = null; - function u() { + u = null; + function l() { var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1; if (!c && !n.length) return; - o < t && Me(n, t - o, -1); - var f = new r(n, s); - (l = l ? l.compose(f.map(l)) : f), (n = []), (s = []), (o = 0); + o < t && qe(n, t - o, -1); + var f = new i(n, s); + (u = u ? u.compose(f.map(u)) : f), (n = []), (s = []), (o = 0); } - h(u, "flush"); - function a(c) { + a(l, "flush"); + function h(c) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -7563,7 +7362,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = c[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var f = _step.value; - a(f); + h(f); } } catch (err) { _didIteratorError = true; @@ -7579,145 +7378,147 @@ function _ts_generator(thisArg, body) { } } } - else if (c instanceof r) { + else if (c instanceof i) { if (c.length != t) throw new RangeError("Mismatched change set length (got ".concat(c.length, ", expected ").concat(t, ")")); - u(), (l = l ? l.compose(c.map(l)) : c); + l(), (u = u ? u.compose(c.map(u)) : c); } else { var f1 = c.from, tmp = c.to, d = tmp === void 0 ? f1 : tmp, p = c.insert; if (f1 > d || f1 < 0 || d > t) throw new RangeError("Invalid change range ".concat(f1, " to ").concat(d, " (in doc of length ").concat(t, ")")); - var m = p ? (typeof p == "string" ? fe.of(p.split(i || Lu)) : p) : fe.empty, - F = m.length; - if (f1 == d && F == 0) return; - f1 < o && u(), f1 > o && Me(n, f1 - o, -1), Me(n, d - f1, F), si(s, n, m), (o = d); + var m = p ? (typeof p == "string" ? de.of(p.split(r || wl)) : p) : de.empty, + b = m.length; + if (f1 == d && b == 0) return; + f1 < o && l(), f1 > o && qe(n, f1 - o, -1), qe(n, d - f1, b), Jt(s, n, m), (o = d); } } - return h(a, "process"), a(e), u(!l), l; + return a(h, "process"), h(e), l(!u), u; } static empty(e) { - return new r(e ? [e, -1] : [], []); + return new i(e ? [e, -1] : [], []); } static fromJSON(e) { if (!Array.isArray(e)) throw new RangeError("Invalid JSON representation of ChangeSet"); var t = [], - i = []; + r = []; for (var n = 0; n < e.length; n++) { var s = e[n]; if (typeof s == "number") t.push(s, -1); else { - if (!Array.isArray(s) || typeof s[0] != "number" || s.some((o, l) => l && typeof o != "string")) throw new RangeError("Invalid JSON representation of ChangeSet"); + if (!Array.isArray(s) || typeof s[0] != "number" || s.some((o, u) => u && typeof o != "string")) throw new RangeError("Invalid JSON representation of ChangeSet"); if (s.length == 1) t.push(s[0], 0); else { - for (; i.length < n; ) i.push(fe.empty); - (i[n] = fe.of(s.slice(1))), t.push(s[0], i[n].length); + for (; r.length < n; ) r.push(de.empty); + (r[n] = de.of(s.slice(1))), t.push(s[0], r[n].length); } } } - return new r(t, i); + return new i(t, r); } static createSet(e, t) { - return new r(e, t); + return new i(e, t); } constructor(e, t) { super(e), (this.inserted = t); } }), - h(_r6, "ChangeSet"), - _r6); - function Me(r, e, t) { - var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1; + (() => { + a(_i5, "ChangeSet"); + })(), + _i5); + function qe(i, e, t) { + var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1; if (e == 0 && t <= 0) return; - var n = r.length - 2; - n >= 0 && t <= 0 && t == r[n + 1] ? (r[n] += e) : e == 0 && r[n] == 0 ? (r[n + 1] += t) : i ? ((r[n] += e), (r[n + 1] += t)) : r.push(e, t); + var n = i.length - 2; + n >= 0 && t <= 0 && t == i[n + 1] ? (i[n] += e) : e == 0 && i[n] == 0 ? (i[n + 1] += t) : r ? ((i[n] += e), (i[n + 1] += t)) : i.push(e, t); } - h(Me, "addSection"); - function si(r, e, t) { + a(qe, "addSection"); + function Jt(i, e, t) { if (t.length == 0) return; - var i = (e.length - 2) >> 1; - if (i < r.length) r[r.length - 1] = r[r.length - 1].append(t); + var r = (e.length - 2) >> 1; + if (r < i.length) i[i.length - 1] = i[i.length - 1].append(t); else { - for (; r.length < i; ) r.push(fe.empty); - r.push(t); + for (; i.length < r; ) i.push(de.empty); + i.push(t); } } - h(si, "addInsert"); - function Ou(r, e, t) { - var i = r.inserted; - for (var n = 0, s = 0, o = 0; o < r.sections.length; ) { - var l = r.sections[o++], - u = r.sections[o++]; - if (u < 0) (n += l), (s += l); + a(Jt, "addInsert"); + function xl(i, e, t) { + var r = i.inserted; + for (var n = 0, s = 0, o = 0; o < i.sections.length; ) { + var u = i.sections[o++], + l = i.sections[o++]; + if (l < 0) (n += u), (s += u); else { - var a = n, + var h = n, c = s, - f = fe.empty; - for (; (a += l), (c += u), u && i && (f = f.append(i[(o - 2) >> 1])), !(t || o == r.sections.length || r.sections[o + 1] < 0); ) (l = r.sections[o++]), (u = r.sections[o++]); - e(n, a, s, c, f), (n = a), (s = c); + f = de.empty; + for (; (h += u), (c += l), l && r && (f = f.append(r[(o - 2) >> 1])), !(t || o == i.sections.length || i.sections[o + 1] < 0); ) (u = i.sections[o++]), (l = i.sections[o++]); + e(n, h, s, c, f), (n = h), (s = c); } } } - h(Ou, "iterChanges"); - function Tu(r, e, t) { - var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1; + a(xl, "iterChanges"); + function Sl(i, e, t) { + var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1; var n = [], - s = i ? [] : null, - o = new Si(r), - l = new Si(e); - for (var u = -1; ; ) - if (o.ins == -1 && l.ins == -1) { - var a = Math.min(o.len, l.len); - Me(n, a, -1), o.forward(a), l.forward(a); - } else if (l.ins >= 0 && (o.ins < 0 || u == o.i || (o.off == 0 && (l.len < o.len || (l.len == o.len && !t))))) { - var a1 = l.len; - for (Me(n, l.ins, -1); a1; ) { - var c = Math.min(o.len, a1); - o.ins >= 0 && u < o.i && o.len <= c && (Me(n, 0, o.ins), s && si(s, n, o.text), (u = o.i)), o.forward(c), (a1 -= c); - } - l.next(); + s = r ? [] : null, + o = new Ci(i), + u = new Ci(e); + for (var l = -1; ; ) + if (o.ins == -1 && u.ins == -1) { + var h = Math.min(o.len, u.len); + qe(n, h, -1), o.forward(h), u.forward(h); + } else if (u.ins >= 0 && (o.ins < 0 || l == o.i || (o.off == 0 && (u.len < o.len || (u.len == o.len && !t))))) { + var h1 = u.len; + for (qe(n, u.ins, -1); h1; ) { + var c = Math.min(o.len, h1); + o.ins >= 0 && l < o.i && o.len <= c && (qe(n, 0, o.ins), s && Jt(s, n, o.text), (l = o.i)), o.forward(c), (h1 -= c); + } + u.next(); } else if (o.ins >= 0) { - var a2 = 0, + var h2 = 0, c1 = o.len; for (; c1; ) - if (l.ins == -1) { - var f = Math.min(c1, l.len); - (a2 += f), (c1 -= f), l.forward(f); - } else if (l.ins == 0 && l.len < c1) (c1 -= l.len), l.next(); + if (u.ins == -1) { + var f = Math.min(c1, u.len); + (h2 += f), (c1 -= f), u.forward(f); + } else if (u.ins == 0 && u.len < c1) (c1 -= u.len), u.next(); else break; - Me(n, a2, u < o.i ? o.ins : 0), s && u < o.i && si(s, n, o.text), (u = o.i), o.forward(o.len - c1); + qe(n, h2, l < o.i ? o.ins : 0), s && l < o.i && Jt(s, n, o.text), (l = o.i), o.forward(o.len - c1); } else { - if (o.done && l.done) return s ? We.createSet(n, s) : Jt.create(n); + if (o.done && u.done) return s ? Ue.createSet(n, s) : zt.create(n); throw new Error("Mismatched change set lengths"); } } - h(Tu, "mapSet"); - function X0(r, e) { + a(Sl, "mapSet"); + function P0(i, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - var i = [], + var r = [], n = t ? [] : null, - s = new Si(r), - o = new Si(e); - for (var l = !1; ; ) { - if (s.done && o.done) return n ? We.createSet(i, n) : Jt.create(i); - if (s.ins == 0) Me(i, s.len, 0, l), s.next(); - else if (o.len == 0 && !o.done) Me(i, 0, o.ins, l), n && si(n, i, o.text), o.next(); + s = new Ci(i), + o = new Ci(e); + for (var u = !1; ; ) { + if (s.done && o.done) return n ? Ue.createSet(r, n) : zt.create(r); + if (s.ins == 0) qe(r, s.len, 0, u), s.next(); + else if (o.len == 0 && !o.done) qe(r, 0, o.ins, u), n && Jt(n, r, o.text), o.next(); else { if (s.done || o.done) throw new Error("Mismatched change set lengths"); { - var u = Math.min(s.len2, o.len), - a = i.length; + var l = Math.min(s.len2, o.len), + h = r.length; if (s.ins == -1) { var c = o.ins == -1 ? -1 : o.off ? 0 : o.ins; - Me(i, u, c, l), n && c && si(n, i, o.text); - } else o.ins == -1 ? (Me(i, s.off ? 0 : s.len, u, l), n && si(n, i, s.textBit(u))) : (Me(i, s.off ? 0 : s.len, o.off ? 0 : o.ins, l), n && !o.off && si(n, i, o.text)); - (l = (s.ins > u || (o.ins >= 0 && o.len > u)) && (l || i.length > a)), s.forward2(u), o.forward(u); + qe(r, l, c, u), n && c && Jt(n, r, o.text); + } else o.ins == -1 ? (qe(r, s.off ? 0 : s.len, l, u), n && Jt(n, r, s.textBit(l))) : (qe(r, s.off ? 0 : s.len, o.off ? 0 : o.ins, u), n && !o.off && Jt(n, r, o.text)); + (u = (s.ins > l || (o.ins >= 0 && o.len > l)) && (u || r.length > h)), s.forward2(l), o.forward(l); } } } } - h(X0, "composeSets"); - var Si = + a(P0, "composeSets"); + var Ci = ((_class22 = class _class { next() { var _this_set = this.set, @@ -7734,13 +7535,13 @@ function _ts_generator(thisArg, body) { var _this_set = this.set, e = _this_set.inserted, t = (this.i - 2) >> 1; - return t >= e.length ? fe.empty : e[t]; + return t >= e.length ? de.empty : e[t]; } textBit(e) { var _this_set = this.set, t = _this_set.inserted, - i = (this.i - 2) >> 1; - return i >= t.length && !e ? fe.empty : t[i].slice(this.off, e == null ? void 0 : this.off + e); + r = (this.i - 2) >> 1; + return r >= t.length && !e ? de.empty : t[r].slice(this.off, e == null ? void 0 : this.off + e); } forward(e) { e == this.len ? this.next() : ((this.len -= e), (this.off += e)); @@ -7752,154 +7553,158 @@ function _ts_generator(thisArg, body) { (this.set = e), (this.i = 0), this.next(); } }), - h(_class22, "SectionIter"), + (() => { + a(_class22, "SectionIter"); + })(), _class22), - sr = - ((_r7 = class r { + Ji = + ((_i6 = class i { get anchor() { - return this.flags & 32 ? this.to : this.from; + return this.flags & 16 ? this.to : this.from; } get head() { - return this.flags & 32 ? this.from : this.to; + return this.flags & 16 ? this.from : this.to; } get empty() { return this.from == this.to; } get assoc() { - return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0; + return this.flags & 4 ? -1 : this.flags & 8 ? 1 : 0; } get bidiLevel() { - var e = this.flags & 7; - return e == 7 ? null : e; + var e = this.flags & 3; + return e == 3 ? null : e; } get goalColumn() { - var e = this.flags >> 6; - return e == 16777215 ? void 0 : e; + var e = this.flags >> 5; + return e == 33554431 ? void 0 : e; } map(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1; - var i, n; - return this.empty ? (i = n = e.mapPos(this.from, t)) : ((i = e.mapPos(this.from, 1)), (n = e.mapPos(this.to, -1))), i == this.from && n == this.to ? this : new r(i, n, this.flags); + var r, n; + return this.empty ? (r = n = e.mapPos(this.from, t)) : ((r = e.mapPos(this.from, 1)), (n = e.mapPos(this.to, -1))), r == this.from && n == this.to ? this : new i(r, n, this.flags); } extend(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; - if (e <= this.anchor && t >= this.anchor) return Z.range(e, t); - var i = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t; - return Z.range(this.anchor, i); + if (e <= this.anchor && t >= this.anchor) return Q.range(e, t); + var r = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t; + return Q.range(this.anchor, r); } eq(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - return this.anchor == e.anchor && this.head == e.head && (!t || !this.empty || this.assoc == e.assoc); + return this.anchor == e.anchor && this.head == e.head; } toJSON() { return { anchor: this.anchor, head: this.head }; } static fromJSON(e) { if (!e || typeof e.anchor != "number" || typeof e.head != "number") throw new RangeError("Invalid JSON representation for SelectionRange"); - return Z.range(e.anchor, e.head); + return Q.range(e.anchor, e.head); } - static create(e, t, i) { - return new r(e, t, i); + static create(e, t, r) { + return new i(e, t, r); } - constructor(e, t, i) { - (this.from = e), (this.to = t), (this.flags = i); + constructor(e, t, r) { + (this.from = e), (this.to = t), (this.flags = r); } }), - h(_r7, "SelectionRange"), - _r7), - Z = - ((_r8 = class r { + (() => { + a(_i6, "SelectionRange"); + })(), + _i6), + Q = + ((_i7 = class i { map(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1; return e.empty ? this - : r.create( - this.ranges.map((i) => i.map(e, t)), - this.mainIndex, + : i.create( + this.ranges.map((r) => r.map(e, t)), + this.mainIndex ); } eq(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex) return !1; - for (var i = 0; i < this.ranges.length; i++) if (!this.ranges[i].eq(e.ranges[i], t)) return !1; + for (var t = 0; t < this.ranges.length; t++) if (!this.ranges[t].eq(e.ranges[t])) return !1; return !0; } get main() { return this.ranges[this.mainIndex]; } asSingle() { - return this.ranges.length == 1 ? this : new r([this.main], 0); + return this.ranges.length == 1 ? this : new i([this.main], 0); } addRange(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; - return r.create([e].concat(this.ranges), t ? 0 : this.mainIndex + 1); + return i.create([e].concat(this.ranges), t ? 0 : this.mainIndex + 1); } replaceRange(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.mainIndex; - var i = this.ranges.slice(); - return (i[t] = e), r.create(i, this.mainIndex); + var r = this.ranges.slice(); + return (r[t] = e), i.create(r, this.mainIndex); } toJSON() { return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex }; } static fromJSON(e) { if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length) throw new RangeError("Invalid JSON representation for EditorSelection"); - return new r( - e.ranges.map((t) => sr.fromJSON(t)), - e.main, + return new i( + e.ranges.map((t) => Ji.fromJSON(t)), + e.main ); } static single(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; - return new r([r.range(e, t)], 0); + return new i([i.range(e, t)], 0); } static create(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (e.length == 0) throw new RangeError("A selection needs at least one range"); - for (var i = 0, n = 0; n < e.length; n++) { + for (var r = 0, n = 0; n < e.length; n++) { var s = e[n]; - if (s.empty ? s.from <= i : s.from < i) return r.normalized(e.slice(), t); - i = s.to; + if (s.empty ? s.from <= r : s.from < r) return i.normalized(e.slice(), t); + r = s.to; } - return new r(e, t); + return new i(e, t); } static cursor(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, - i = arguments.length > 2 ? arguments[2] : void 0, + r = arguments.length > 2 ? arguments[2] : void 0, n = arguments.length > 3 ? arguments[3] : void 0; - return sr.create(e, e, (t == 0 ? 0 : t < 0 ? 8 : 16) | (i == null ? 7 : Math.min(6, i)) | ((n !== null && n !== void 0 ? n : 16777215) << 6)); + return Ji.create(e, e, (t == 0 ? 0 : t < 0 ? 4 : 8) | (r == null ? 3 : Math.min(2, r)) | ((n !== null && n !== void 0 ? n : 33554431) << 5)); } - static range(e, t, i, n) { - var s = ((i !== null && i !== void 0 ? i : 16777215) << 6) | (n == null ? 7 : Math.min(6, n)); - return t < e ? sr.create(t, e, 48 | s) : sr.create(e, t, (t > e ? 8 : 0) | s); + static range(e, t, r, n) { + var s = ((r !== null && r !== void 0 ? r : 33554431) << 5) | (n == null ? 3 : Math.min(2, n)); + return t < e ? Ji.create(t, e, 24 | s) : Ji.create(e, t, (t > e ? 4 : 0) | s); } static normalized(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - var i = e[t]; - e.sort((n, s) => n.from - s.from), (t = e.indexOf(i)); + var r = e[t]; + e.sort((n, s) => n.from - s.from), (t = e.indexOf(r)); for (var n = 1; n < e.length; n++) { var s = e[n], o = e[n - 1]; if (s.empty ? s.from <= o.to : s.from < o.to) { - var l = o.from, - u = Math.max(s.to, o.to); - n <= t && t--, e.splice(--n, 2, s.anchor > s.head ? r.range(u, l) : r.range(l, u)); + var u = o.from, + l = Math.max(s.to, o.to); + n <= t && t--, e.splice(--n, 2, s.anchor > s.head ? i.range(l, u) : i.range(u, l)); } } - return new r(e, t); + return new i(e, t); } constructor(e, t) { (this.ranges = e), (this.mainIndex = t); } }), - h(_r8, "EditorSelection"), - _r8); - function K0(r, e) { + (() => { + a(_i7, "EditorSelection"); + })(), + _i7); + function L0(i, e) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; if (t.to > e) throw new RangeError("Selection points outside of document"); } @@ -7918,52 +7723,51 @@ function _ts_generator(thisArg, body) { } } } - h(K0, "checkSelection"); - var zu = 0, - H = - ((_r9 = class r { - get reader() { - return this; - } + a(L0, "checkSelection"); + var Ll = 0, + G = + ((_i8 = class i { static define() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - return new r(e.combine || ((t) => t), e.compareInput || ((t, i) => t === i), e.compare || (e.combine ? (t, i) => t === i : Hu), !!e.static, e.enables); + return new i(e.combine || ((t) => t), e.compareInput || ((t, r) => t === r), e.compare || (e.combine ? (t, r) => t === r : ql), !!e.static, e.enables); } of(e) { - return new ur([], this, 0, e); + return new tr([], this, 0, e); } compute(e, t) { if (this.isStatic) throw new Error("Can't compute a static facet"); - return new ur(e, this, 1, t); + return new tr(e, this, 1, t); } computeN(e, t) { if (this.isStatic) throw new Error("Can't compute a static facet"); - return new ur(e, this, 2, t); + return new tr(e, this, 2, t); } from(e, t) { - return t || (t = h((i) => i, "get")), this.compute([e], (i) => t(i.field(e))); + return t || (t = a((r) => r, "get")), this.compute([e], (r) => t(r.field(e))); } - constructor(e, t, i, n, s) { - (this.combine = e), (this.compareInput = t), (this.compare = i), (this.isStatic = n), (this.id = zu++), (this.default = e([])), (this.extensions = typeof s == "function" ? s(this) : s); + constructor(e, t, r, n, s) { + (this.combine = e), (this.compareInput = t), (this.compare = r), (this.isStatic = n), (this.id = Ll++), (this.default = e([])), (this.extensions = typeof s == "function" ? s(this) : s); } }), - h(_r9, "Facet"), - _r9); - function Hu(r, e) { - return r == e || (r.length == e.length && r.every((t, i) => t === e[i])); - } - h(Hu, "sameArray"); - var ur = + (() => { + a(_i8, "Facet"); + })(), + _i8); + function ql(i, e) { + return i == e || (i.length == e.length && i.every((t, r) => t === e[r])); + } + a(ql, "sameArray"); + var tr = ((_class23 = class _class { dynamicSlot(e) { var t; - var i = this.value, + var r = this.value, n = this.facet.compareInput, s = this.id, o = e[s] >> 1, - l = this.type == 2, - u = !1, - a = !1, + u = this.type == 2, + l = !1, + h = !1, c = []; var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -7971,7 +7775,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = this.dependencies[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var f = _step.value; - f == "doc" ? (u = !0) : f == "selection" ? (a = !0) : ((t = e[f.id]) !== null && t !== void 0 ? t : 1) & 1 || c.push(e[f.id]); + f == "doc" ? (l = !0) : f == "selection" ? (h = !0) : ((t = e[f.id]) !== null && t !== void 0 ? t : 1) & 1 || c.push(e[f.id]); } } catch (err) { _didIteratorError = true; @@ -7989,12 +7793,12 @@ function _ts_generator(thisArg, body) { } return { create(f) { - return (f.values[o] = i(f)), 1; + return (f.values[o] = r(f)), 1; }, update(f, d) { - if ((u && d.docChanged) || (a && (d.docChanged || d.selection)) || Ru(f, c)) { - var p = i(f); - if (l ? !V0(p, f.values[o], n) : !n(p, f.values[o])) return (f.values[o] = p), 1; + if ((l && d.docChanged) || (h && (d.docChanged || d.selection)) || Bl(f, c)) { + var p = r(f); + if (u ? !S0(p, f.values[o], n) : !n(p, f.values[o])) return (f.values[o] = p), 1; } return 0; }, @@ -8002,34 +7806,36 @@ function _ts_generator(thisArg, body) { var p, m = d.config.address[s]; if (m != null) { - var F = $s(d, m); - if (this.dependencies.every((g) => (g instanceof H ? d.facet(g) === f.facet(g) : g instanceof Pe ? d.field(g, !1) == f.field(g, !1) : !0)) || (l ? V0((p = i(f)), F, n) : n((p = i(f)), F))) return (f.values[o] = F), 0; - } else p = i(f); + var b = Bs(d, m); + if (this.dependencies.every((g) => (g instanceof G ? d.facet(g) === f.facet(g) : g instanceof Ie ? d.field(g, !1) == f.field(g, !1) : !0)) || (u ? S0((p = r(f)), b, n) : n((p = r(f)), b))) return (f.values[o] = b), 0; + } else p = r(f); return (f.values[o] = p), 1; }, }; } - constructor(e, t, i, n) { - (this.dependencies = e), (this.facet = t), (this.type = i), (this.value = n), (this.id = zu++); + constructor(e, t, r, n) { + (this.dependencies = e), (this.facet = t), (this.type = r), (this.value = n), (this.id = Ll++); } }), - h(_class23, "FacetProvider"), + (() => { + a(_class23, "FacetProvider"); + })(), _class23); - function V0(r, e, t) { - if (r.length != e.length) return !1; - for (var i = 0; i < r.length; i++) if (!t(r[i], e[i])) return !1; + function S0(i, e, t) { + if (i.length != e.length) return !1; + for (var r = 0; r < i.length; r++) if (!t(i[r], e[r])) return !1; return !0; } - h(V0, "compareArray"); - function Ru(r, e) { + a(S0, "compareArray"); + function Bl(i, e) { var t = !1; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - Zr(r, i) & 1 && (t = !0); + var r = _step.value; + Gr(i, r) & 1 && (t = !0); } } catch (err) { _didIteratorError = true; @@ -8047,16 +7853,16 @@ function _ts_generator(thisArg, body) { } return t; } - h(Ru, "ensureAll"); - function Pv(r, e, t) { - var i = t.map((u) => r[u.id]), - n = t.map((u) => u.type), - s = i.filter((u) => !(u & 1)), - o = r[e.id] >> 1; - function l(u) { - var a = []; - for (var c = 0; c < i.length; c++) { - var f = $s(u, i[c]); + a(Bl, "ensureAll"); + function Fv(i, e, t) { + var r = t.map((l) => i[l.id]), + n = t.map((l) => l.type), + s = r.filter((l) => !(l & 1)), + o = i[e.id] >> 1; + function u(l) { + var h = []; + for (var c = 0; c < r.length; c++) { + var f = Bs(l, r[c]); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -8064,7 +7870,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = f[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var d = _step.value; - a.push(d); + h.push(d); } } catch (err) { _didIteratorError = true; @@ -8080,21 +7886,21 @@ function _ts_generator(thisArg, body) { } } } - else a.push(f); + else h.push(f); } - return e.combine(a); + return e.combine(h); } return ( - h(l, "get"), + a(u, "get"), { - create(u) { + create(l) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var a = _step.value; - Zr(u, a); + for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var h = _step.value; + Gr(l, h); } } catch (err) { _didIteratorError = true; @@ -8110,112 +7916,121 @@ function _ts_generator(thisArg, body) { } } } - return (u.values[o] = l(u)), 1; + return (l.values[o] = u(l)), 1; }, - update(u, a) { - if (!Ru(u, s)) return 0; - var c = l(u); - return e.compare(c, u.values[o]) ? 0 : ((u.values[o] = c), 1); + update(l, h) { + if (!Bl(l, s)) return 0; + var c = u(l); + return e.compare(c, l.values[o]) ? 0 : ((l.values[o] = c), 1); }, - reconfigure(u, a) { - var c = Ru(u, i), - f = a.config.facets[e.id], - d = a.facet(e); - if (f && !c && Hu(t, f)) return (u.values[o] = d), 0; - var p = l(u); - return e.compare(p, d) ? ((u.values[o] = d), 0) : ((u.values[o] = p), 1); + reconfigure(l, h) { + var c = Bl(l, r), + f = h.config.facets[e.id], + d = h.facet(e); + if (f && !c && ql(t, f)) return (l.values[o] = d), 0; + var p = u(l); + return e.compare(p, d) ? ((l.values[o] = d), 0) : ((l.values[o] = p), 1); }, } ); } - h(Pv, "dynamicFacetSlot"); - var W0 = H.define({ static: !0 }), - Pe = - ((_r10 = class r { + a(Fv, "dynamicFacetSlot"); + var B0 = G.define({ static: !0 }), + Ie = + ((_i9 = class i { static define(e) { - var t = new r(zu++, e.create, e.update, e.compare || ((i, n) => i === n), e); + var t = new i(Ll++, e.create, e.update, e.compare || ((r, n) => r === n), e); return e.provide && (t.provides = e.provide(t)), t; } create(e) { - var t = e.facet(W0).find((i) => i.field == this); - return ((t === null || t === void 0 ? void 0 : t.create) || this.createF)(e); + var _t; + var t = e.facet(B0).find((r) => r.field == this); + return (((_t = t) === null || _t === void 0 ? void 0 : _t.create) || this.createF)(e); } slot(e) { var t = e[this.id] >> 1; return { - create: (i) => ((i.values[t] = this.create(i)), 1), - update: (i, n) => { - var s = i.values[t], + create: (r) => ((r.values[t] = this.create(r)), 1), + update: (r, n) => { + var s = r.values[t], o = this.updateF(s, n); - return this.compareF(s, o) ? 0 : ((i.values[t] = o), 1); + return this.compareF(s, o) ? 0 : ((r.values[t] = o), 1); }, - reconfigure: (i, n) => (n.config.address[this.id] != null ? ((i.values[t] = n.field(this)), 0) : ((i.values[t] = this.create(i)), 1)), + reconfigure: (r, n) => (n.config.address[this.id] != null ? ((r.values[t] = n.field(this)), 0) : ((r.values[t] = this.create(r)), 1)), }; } init(e) { - return [this, W0.of({ field: this, create: e })]; + return [this, B0.of({ field: this, create: e })]; } get extension() { return this; } - constructor(e, t, i, n, s) { - (this.id = e), (this.createF = t), (this.updateF = i), (this.compareF = n), (this.spec = s), (this.provides = void 0); + constructor(e, t, r, n, s) { + (this.id = e), (this.createF = t), (this.updateF = r), (this.compareF = n), (this.spec = s), (this.provides = void 0); } }), - h(_r10, "StateField"), - _r10), - xi = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 }; - function Xr(r) { - return (e) => new Ps(e, r); - } - h(Xr, "prec"); - var fr = { highest: Xr(xi.highest), high: Xr(xi.high), default: Xr(xi.default), low: Xr(xi.low), lowest: Xr(xi.lowest) }, - Ps = + (() => { + a(_i9, "StateField"); + })(), + _i9), + bi = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 }; + function jr(i) { + return (e) => new xs(e, i); + } + a(jr, "prec"); + var nr = { highest: jr(bi.highest), high: jr(bi.high), default: jr(bi.default), low: jr(bi.low), lowest: jr(bi.lowest) }, + xs = ((_class24 = class _class { constructor(e, t) { (this.inner = e), (this.prec = t); } }), - h(_class24, "PrecExtension"), + (() => { + a(_class24, "PrecExtension"); + })(), _class24), - cr = - ((_r11 = class r { + rr = + ((_i10 = class i { of(e) { - return new en(this, e); + return new Yr(this, e); } reconfigure(e) { - return r.reconfigure.of({ compartment: this, extension: e }); + return i.reconfigure.of({ compartment: this, extension: e }); } get(e) { return e.config.compartments.get(this); } }), - h(_r11, "Compartment"), - _r11), - en = + (() => { + a(_i10, "Compartment"); + })(), + _i10), + Yr = ((_class25 = class _class { constructor(e, t) { (this.compartment = e), (this.inner = t); } }), - h(_class25, "CompartmentInstance"), + (() => { + a(_class25, "CompartmentInstance"); + })(), _class25), - Is = - ((_r12 = class r { + Ss = + ((_i11 = class i { staticFacet(e) { var t = this.address[e.id]; return t == null ? e.default : this.staticValues[t >> 1]; } - static resolve(e, t, i) { + static resolve(e, t, r) { var _loop = function (d1) { var p = s[d1], m = p[0].facet, - F = (c && c[d1]) || []; + b = (c && c[d1]) || []; if (p.every((g) => g.type == 0)) - if (((l[m.id] = (u.length << 1) | 1), Hu(F, p))) u.push(i.facet(m)); + if (((u[m.id] = (l.length << 1) | 1), ql(b, p))) l.push(r.facet(m)); else { var g = m.combine(p.map((D) => D.value)); - u.push(i && m.compare(g, i.facet(m)) ? i.facet(m) : g); + l.push(r && m.compare(g, r.facet(m)) ? r.facet(m) : g); } else { var _iteratorNormalCompletion = true, @@ -8224,7 +8039,7 @@ function _ts_generator(thisArg, body) { try { var _loop = function () { var g = _step.value; - g.type == 0 ? ((l[g.id] = (u.length << 1) | 1), u.push(g.value)) : ((l[g.id] = a.length << 1), a.push((D) => g.dynamicSlot(D))); + g.type == 0 ? ((u[g.id] = (l.length << 1) | 1), l.push(g.value)) : ((u[g.id] = h.length << 1), h.push((D) => g.dynamicSlot(D))); }; for (var _iterator = p[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop(); } catch (err) { @@ -8241,9 +8056,10 @@ function _ts_generator(thisArg, body) { } } } - (l[m.id] = a.length << 1), a.push((g) => Pv(g, m, p)); + (u[m.id] = h.length << 1), h.push((g) => Fv(g, m, p)); } }; + var _r; var n = [], s = Object.create(null), o = new Map(); @@ -8251,9 +8067,9 @@ function _ts_generator(thisArg, body) { _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = Iv(e, t, o)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = yv(e, t, o)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var d = _step.value; - d instanceof Pe ? n.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d); + d instanceof Ie ? n.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d); } } catch (err) { _didIteratorError = true; @@ -8269,16 +8085,16 @@ function _ts_generator(thisArg, body) { } } } - var l = Object.create(null), - u = [], - a = []; + var u = Object.create(null), + l = [], + h = []; var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; try { var _loop1 = function () { var d = _step1.value; - (l[d.id] = a.length << 1), a.push((p) => d.slot(p)); + (u[d.id] = h.length << 1), h.push((p) => d.slot(p)); }; for (var _iterator1 = n[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) _loop1(); } catch (err) { @@ -8295,35 +8111,37 @@ function _ts_generator(thisArg, body) { } } } - var c = i === null || i === void 0 ? void 0 : i.config.facets; + var c = (_r = r) === null || _r === void 0 ? void 0 : _r.config.facets; for (var d1 in s) _loop(d1); - var f = a.map((d) => d(l)); - return new r(e, o, f, l, u, s); + var f = h.map((d) => d(u)); + return new i(e, o, f, u, l, s); } - constructor(e, t, i, n, s, o) { - for (this.base = e, this.compartments = t, this.dynamicSlots = i, this.address = n, this.staticValues = s, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < i.length; ) this.statusTemplate.push(0); + constructor(e, t, r, n, s, o) { + for (this.base = e, this.compartments = t, this.dynamicSlots = r, this.address = n, this.staticValues = s, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < r.length; ) this.statusTemplate.push(0); } }), - h(_r12, "Configuration"), - _r12); - function Iv(r, e, t) { - var i = [[], [], [], [], []], + (() => { + a(_i11, "Configuration"); + })(), + _i11); + function yv(i, e, t) { + var r = [[], [], [], [], []], n = new Map(); - function s(o, l) { - var u = n.get(o); - if (u != null) { - if (u <= l) return; - var a = i[u].indexOf(o); - a > -1 && i[u].splice(a, 1), o instanceof en && t.delete(o.compartment); + function s(o, u) { + var l = n.get(o); + if (l != null) { + if (l <= u) return; + var h = r[l].indexOf(o); + h > -1 && r[l].splice(h, 1), o instanceof Yr && t.delete(o.compartment); } var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if ((n.set(o, l), Array.isArray(o))) + if ((n.set(o, u), Array.isArray(o))) try { for (var _iterator = o[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var a1 = _step.value; - s(a1, l); + var h1 = _step.value; + s(h1, u); } } catch (err) { _didIteratorError = true; @@ -8339,90 +8157,96 @@ function _ts_generator(thisArg, body) { } } } - else if (o instanceof en) { + else if (o instanceof Yr) { if (t.has(o.compartment)) throw new RangeError("Duplicate use of compartment in extensions"); - var a2 = e.get(o.compartment) || o.inner; - t.set(o.compartment, a2), s(a2, l); - } else if (o instanceof Ps) s(o.inner, o.prec); - else if (o instanceof Pe) i[l].push(o), o.provides && s(o.provides, l); - else if (o instanceof ur) i[l].push(o), o.facet.extensions && s(o.facet.extensions, xi.default); + var h2 = e.get(o.compartment) || o.inner; + t.set(o.compartment, h2), s(h2, u); + } else if (o instanceof xs) s(o.inner, o.prec); + else if (o instanceof Ie) r[u].push(o), o.provides && s(o.provides, u); + else if (o instanceof tr) r[u].push(o), o.facet.extensions && s(o.facet.extensions, bi.default); else { - var a3 = o.extension; - if (!a3) throw new Error("Unrecognized extension value in extension set (".concat(o, "). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.")); - s(a3, l); + var h3 = o.extension; + if (!h3) throw new Error("Unrecognized extension value in extension set (".concat(o, "). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.")); + s(h3, u); } } - return h(s, "inner"), s(r, xi.default), i.reduce((o, l) => o.concat(l)); + return a(s, "inner"), s(i, bi.default), r.reduce((o, u) => o.concat(u)); } - h(Iv, "flatten"); - function Zr(r, e) { + a(yv, "flatten"); + function Gr(i, e) { if (e & 1) return 2; var t = e >> 1, - i = r.status[t]; - if (i == 4) throw new Error("Cyclic dependency between fields and/or facets"); - if (i & 2) return i; - r.status[t] = 4; - var n = r.computeSlot(r, r.config.dynamicSlots[t]); - return (r.status[t] = 2 | n); - } - h(Zr, "ensureAddr"); - function $s(r, e) { - return e & 1 ? r.config.staticValues[e >> 1] : r.values[e >> 1]; - } - h($s, "getAddr"); - var Z0 = H.define(), - Nu = H.define({ combine: (r) => r.some((e) => e), static: !0 }), - eg = H.define({ combine: (r) => (r.length ? r[0] : void 0), static: !0 }), - tg = H.define(), - ig = H.define(), - rg = H.define(), - ng = H.define({ combine: (r) => (r.length ? r[0] : !1) }), - ct = + r = i.status[t]; + if (r == 4) throw new Error("Cyclic dependency between fields and/or facets"); + if (r & 2) return r; + i.status[t] = 4; + var n = i.computeSlot(i, i.config.dynamicSlots[t]); + return (i.status[t] = 2 | n); + } + a(Gr, "ensureAddr"); + function Bs(i, e) { + return e & 1 ? i.config.staticValues[e >> 1] : i.values[e >> 1]; + } + a(Bs, "getAddr"); + var q0 = G.define(), + I0 = G.define({ combine: (i) => i.some((e) => e), static: !0 }), + N0 = G.define({ combine: (i) => (i.length ? i[0] : void 0), static: !0 }), + V0 = G.define(), + z0 = G.define(), + H0 = G.define(), + W0 = G.define({ combine: (i) => (i.length ? i[0] : !1) }), + ot = ((_class26 = class _class { static define() { - return new Mu(); + return new _l(); } constructor(e, t) { (this.type = e), (this.value = t); } }), - h(_class26, "Annotation"), + (() => { + a(_class26, "Annotation"); + })(), _class26), - Mu = + _l = ((_class27 = class _class { of(e) { - return new ct(this, e); + return new ot(this, e); } }), - h(_class27, "AnnotationType"), + (() => { + a(_class27, "AnnotationType"); + })(), _class27), - Pu = + Ol = ((_class28 = class _class { of(e) { - return new de(this, e); + return new pe(this, e); } constructor(e) { this.map = e; } }), - h(_class28, "StateEffectType"), + (() => { + a(_class28, "StateEffectType"); + })(), _class28), - de = - ((_r13 = class r { + pe = + ((_i12 = class i { map(e) { var t = this.type.map(this.value, e); - return t === void 0 ? void 0 : t == this.value ? this : new r(this.type, t); + return t === void 0 ? void 0 : t == this.value ? this : new i(this.type, t); } is(e) { return this.type == e; } static define() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - return new Pu(e.map || ((t) => t)); + return new Ol(e.map || ((t) => t)); } static mapEffects(e, t) { if (!e.length) return e; - var i = []; + var r = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -8430,7 +8254,7 @@ function _ts_generator(thisArg, body) { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; var s = n.map(t); - s && i.push(s); + s && r.push(s); } } catch (err) { _didIteratorError = true; @@ -8446,20 +8270,22 @@ function _ts_generator(thisArg, body) { } } } - return i; + return r; } constructor(e, t) { (this.type = e), (this.value = t); } }), - h(_r13, "StateEffect"), - _r13); - de.reconfigure = de.define(); - de.appendConfig = de.define(); - var Le = - ((_r14 = class r { - static create(e, t, i, n, s, o) { - return new r(e, t, i, n, s, o); + (() => { + a(_i12, "StateEffect"); + })(), + _i12); + pe.reconfigure = pe.define(); + pe.appendConfig = pe.define(); + var Pe = + ((_i13 = class i { + static create(e, t, r, n, s, o) { + return new i(e, t, r, n, s, o); } get newDoc() { return this._doc || (this._doc = this.changes.apply(this.startState.doc)); @@ -8501,73 +8327,75 @@ function _ts_generator(thisArg, body) { return this.startState.config != this.state.config; } isUserEvent(e) { - var t = this.annotation(r.userEvent); + var t = this.annotation(i.userEvent); return !!(t && (t == e || (t.length > e.length && t.slice(0, e.length) == e && t[e.length] == "."))); } - constructor(e, t, i, n, s, o) { - (this.startState = e), (this.changes = t), (this.selection = i), (this.effects = n), (this.annotations = s), (this.scrollIntoView = o), (this._doc = null), (this._state = null), i && K0(i, t.newLength), s.some((l) => l.type == r.time) || (this.annotations = s.concat(r.time.of(Date.now()))); + constructor(e, t, r, n, s, o) { + (this.startState = e), (this.changes = t), (this.selection = r), (this.effects = n), (this.annotations = s), (this.scrollIntoView = o), (this._doc = null), (this._state = null), r && L0(r, t.newLength), s.some((u) => u.type == i.time) || (this.annotations = s.concat(i.time.of(Date.now()))); } }), - h(_r14, "Transaction"), - _r14); - Le.time = ct.define(); - Le.userEvent = ct.define(); - Le.addToHistory = ct.define(); - Le.remote = ct.define(); - function $v(r, e) { + (() => { + a(_i13, "Transaction"); + })(), + _i13); + Pe.time = ot.define(); + Pe.userEvent = ot.define(); + Pe.addToHistory = ot.define(); + Pe.remote = ot.define(); + function Cv(i, e) { var t = []; - for (var i = 0, n = 0; ; ) { + for (var r = 0, n = 0; ; ) { var s = void 0, o = void 0; - if (i < r.length && (n == e.length || e[n] >= r[i])) (s = r[i++]), (o = r[i++]); + if (r < i.length && (n == e.length || e[n] >= i[r])) (s = i[r++]), (o = i[r++]); else if (n < e.length) (s = e[n++]), (o = e[n++]); else return t; !t.length || t[t.length - 1] < s ? t.push(s, o) : t[t.length - 1] < o && (t[t.length - 1] = o); } } - h($v, "joinRanges"); - function sg(r, e, t) { - var i; + a(Cv, "joinRanges"); + function j0(i, e, t) { + var r; var n, s, o; return ( - t ? ((n = e.changes), (s = We.empty(e.changes.length)), (o = r.changes.compose(e.changes))) : ((n = e.changes.map(r.changes)), (s = r.changes.mapDesc(e.changes, !0)), (o = r.changes.compose(n))), - { changes: o, selection: e.selection ? e.selection.map(s) : (i = r.selection) === null || i === void 0 ? void 0 : i.map(n), effects: de.mapEffects(r.effects, n).concat(de.mapEffects(e.effects, s)), annotations: r.annotations.length ? r.annotations.concat(e.annotations) : e.annotations, scrollIntoView: r.scrollIntoView || e.scrollIntoView } + t ? ((n = e.changes), (s = Ue.empty(e.changes.length)), (o = i.changes.compose(e.changes))) : ((n = e.changes.map(i.changes)), (s = i.changes.mapDesc(e.changes, !0)), (o = i.changes.compose(n))), + { changes: o, selection: e.selection ? e.selection.map(s) : (r = i.selection) === null || r === void 0 ? void 0 : r.map(n), effects: pe.mapEffects(i.effects, n).concat(pe.mapEffects(e.effects, s)), annotations: i.annotations.length ? i.annotations.concat(e.annotations) : e.annotations, scrollIntoView: i.scrollIntoView || e.scrollIntoView } ); } - h(sg, "mergeTransaction"); - function Iu(r, e, t) { - var i = e.selection, - n = ar(e.annotations); - return e.userEvent && (n = n.concat(Le.userEvent.of(e.userEvent))), { changes: e.changes instanceof We ? e.changes : We.of(e.changes || [], t, r.facet(eg)), selection: i && (i instanceof Z ? i : Z.single(i.anchor, i.head)), effects: ar(e.effects), annotations: n, scrollIntoView: !!e.scrollIntoView }; + a(j0, "mergeTransaction"); + function Tl(i, e, t) { + var r = e.selection, + n = ir(e.annotations); + return e.userEvent && (n = n.concat(Pe.userEvent.of(e.userEvent))), { changes: e.changes instanceof Ue ? e.changes : Ue.of(e.changes || [], t, i.facet(N0)), selection: r && (r instanceof Q ? r : Q.single(r.anchor, r.head)), effects: ir(e.effects), annotations: n, scrollIntoView: !!e.scrollIntoView }; } - h(Iu, "resolveTransactionInner"); - function og(r, e, t) { - var i = Iu(r, e.length ? e[0] : {}, r.doc.length); + a(Tl, "resolveTransactionInner"); + function U0(i, e, t) { + var r = Tl(i, e.length ? e[0] : {}, i.doc.length); e.length && e[0].filter === !1 && (t = !1); for (var s = 1; s < e.length; s++) { e[s].filter === !1 && (t = !1); var o = !!e[s].sequential; - i = sg(i, Iu(r, e[s], o ? i.changes.newLength : r.doc.length), o); + r = j0(r, Tl(i, e[s], o ? r.changes.newLength : i.doc.length), o); } - var n = Le.create(r, i.changes, i.selection, i.effects, i.annotations, i.scrollIntoView); - return Vv(t ? qv(n) : n); + var n = Pe.create(i, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView); + return Ev(t ? Av(n) : n); } - h(og, "resolveTransaction"); - function qv(r) { - var e = r.startState, + a(U0, "resolveTransaction"); + function Av(i) { + var e = i.startState, t = !0; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = e.facet(tg)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = e.facet(V0)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - var s = n(r); + var s = n(i); if (s === !1) { t = !1; break; } - Array.isArray(s) && (t = t === !0 ? s : $v(t, s)); + Array.isArray(s) && (t = t === !0 ? s : Cv(t, s)); } } catch (err) { _didIteratorError = true; @@ -8585,91 +8413,91 @@ function _ts_generator(thisArg, body) { } if (t !== !0) { var n1, s1; - if (t === !1) (s1 = r.changes.invertedDesc), (n1 = We.empty(e.doc.length)); + if (t === !1) (s1 = i.changes.invertedDesc), (n1 = Ue.empty(e.doc.length)); else { - var o = r.changes.filter(t); + var o = i.changes.filter(t); (n1 = o.changes), (s1 = o.filtered.mapDesc(o.changes).invertedDesc); } - r = Le.create(e, n1, r.selection && r.selection.map(s1), de.mapEffects(r.effects, s1), r.annotations, r.scrollIntoView); + i = Pe.create(e, n1, i.selection && i.selection.map(s1), pe.mapEffects(i.effects, s1), i.annotations, i.scrollIntoView); } - var i = e.facet(ig); - for (var n2 = i.length - 1; n2 >= 0; n2--) { - var s2 = i[n2](r); - s2 instanceof Le ? (r = s2) : Array.isArray(s2) && s2.length == 1 && s2[0] instanceof Le ? (r = s2[0]) : (r = og(e, ar(s2), !1)); + var r = e.facet(z0); + for (var n2 = r.length - 1; n2 >= 0; n2--) { + var s2 = r[n2](i); + s2 instanceof Pe ? (i = s2) : Array.isArray(s2) && s2.length == 1 && s2[0] instanceof Pe ? (i = s2[0]) : (i = U0(e, ir(s2), !1)); } - return r; + return i; } - h(qv, "filterTransaction"); - function Vv(r) { - var e = r.startState, - t = e.facet(rg), - i = r; + a(Av, "filterTransaction"); + function Ev(i) { + var e = i.startState, + t = e.facet(H0), + r = i; for (var n = t.length - 1; n >= 0; n--) { - var s = t[n](r); - s && Object.keys(s).length && (i = sg(i, Iu(e, s, r.changes.newLength), !0)); - } - return i == r ? r : Le.create(e, r.changes, r.selection, i.effects, i.annotations, i.scrollIntoView); - } - h(Vv, "extendTransaction"); - var Wv = []; - function ar(r) { - return r == null ? Wv : Array.isArray(r) ? r : [r]; - } - h(ar, "asArray"); - var vt = (function (r) { - return (r[(r.Word = 0)] = "Word"), (r[(r.Space = 1)] = "Space"), (r[(r.Other = 2)] = "Other"), r; - })(vt || (vt = {})), - zv = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/, - $u; + var s = t[n](i); + s && Object.keys(s).length && (r = j0(r, Tl(e, s, i.changes.newLength), !0)); + } + return r == i ? i : Pe.create(e, i.changes, i.selection, r.effects, r.annotations, r.scrollIntoView); + } + a(Ev, "extendTransaction"); + var vv = []; + function ir(i) { + return i == null ? vv : Array.isArray(i) ? i : [i]; + } + a(ir, "asArray"); + var Ft = (function (i) { + return (i[(i.Word = 0)] = "Word"), (i[(i.Space = 1)] = "Space"), (i[(i.Other = 2)] = "Other"), i; + })(Ft || (Ft = {})), + kv = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/, + Rl; try { - $u = new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); + Rl = new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); } catch (e) {} - function Hv(r) { - if ($u) return $u.test(r); - for (var e = 0; e < r.length; e++) { - var t = r[e]; - if (/\w/.test(t) || (t > "\x80" && (t.toUpperCase() != t.toLowerCase() || zv.test(t)))) return !0; + function wv(i) { + if (Rl) return Rl.test(i); + for (var e = 0; e < i.length; e++) { + var t = i[e]; + if (/\w/.test(t) || (t > "\x80" && (t.toUpperCase() != t.toLowerCase() || kv.test(t)))) return !0; } return !1; } - h(Hv, "hasWordChar"); - function jv(r) { + a(wv, "hasWordChar"); + function xv(i) { return (e) => { - if (!/\S/.test(e)) return vt.Space; - if (Hv(e)) return vt.Word; - for (var t = 0; t < r.length; t++) if (e.indexOf(r[t]) > -1) return vt.Word; - return vt.Other; + if (!/\S/.test(e)) return Ft.Space; + if (wv(e)) return Ft.Word; + for (var t = 0; t < i.length; t++) if (e.indexOf(i[t]) > -1) return Ft.Word; + return Ft.Other; }; } - h(jv, "makeCategorizer"); + a(xv, "makeCategorizer"); var Ae = - ((_r15 = class r { + ((_i14 = class i { field(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; - var i = this.config.address[e.id]; - if (i == null) { + var r = this.config.address[e.id]; + if (r == null) { if (t) throw new RangeError("Field is not present in this state"); return; } - return Zr(this, i), $s(this, i); + return Gr(this, r), Bs(this, r); } update() { for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) { e[_key] = arguments[_key]; } - return og(this, e, !0); + return U0(this, e, !0); } applyTransaction(e) { var t = this.config, - i = t.base, + r = t.base, n = t.compartments; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = e.effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - l.is(cr.reconfigure) ? (t && ((n = new Map()), t.compartments.forEach((u, a) => n.set(a, u)), (t = null)), n.set(l.value.compartment, l.value.extension)) : l.is(de.reconfigure) ? ((t = null), (i = l.value)) : l.is(de.appendConfig) && ((t = null), (i = ar(i).concat(l.value))); + var o = _step.value; + o.is(rr.reconfigure) ? (t && ((n = new Map()), t.compartments.forEach((u, l) => n.set(l, u)), (t = null)), n.set(o.value.compartment, o.value.extension)) : o.is(pe.reconfigure) ? ((t = null), (r = o.value)) : o.is(pe.appendConfig) && ((t = null), (r = ir(r).concat(o.value))); } } catch (err) { _didIteratorError = true; @@ -8688,43 +8516,42 @@ function _ts_generator(thisArg, body) { var s; t ? (s = e.startState.values.slice()) - : ((t = Is.resolve(i, n, this)), - (s = new r( + : ((t = Ss.resolve(r, n, this)), + (s = new i( t, this.doc, this.selection, t.dynamicSlots.map(() => null), - (u, a) => a.reconfigure(u, this), - null, - ).values)); - var o = e.startState.facet(Nu) ? e.newSelection : e.newSelection.asSingle(); - new r(t, e.newDoc, o, s, (l, u) => u.update(l, e), e); + (u, l) => l.reconfigure(u, this), + null + ).values)), + new i(t, e.newDoc, e.newSelection, s, (o, u) => u.update(o, e), e); } replaceSelection(e) { - return typeof e == "string" && (e = this.toText(e)), this.changeByRange((t) => ({ changes: { from: t.from, to: t.to, insert: e }, range: Z.cursor(t.from + e.length) })); + return typeof e == "string" && (e = this.toText(e)), this.changeByRange((t) => ({ changes: { from: t.from, to: t.to, insert: e }, range: Q.cursor(t.from + e.length) })); } changeByRange(e) { var t = this.selection, - i = e(t.ranges[0]), - n = this.changes(i.changes), - s = [i.range], - o = ar(i.effects); - for (var l = 1; l < t.ranges.length; l++) { - var u = e(t.ranges[l]), - a = this.changes(u.changes), - c = a.map(n); - for (var d = 0; d < l; d++) s[d] = s[d].map(c); - var f = n.mapDesc(a, !0); - s.push(u.range.map(f)), (n = n.compose(c)), (o = de.mapEffects(o, c).concat(de.mapEffects(ar(u.effects), f))); - } - return { changes: n, selection: Z.create(s, t.mainIndex), effects: o }; + r = e(t.ranges[0]), + n = this.changes(r.changes), + s = [r.range], + o = ir(r.effects); + for (var u = 1; u < t.ranges.length; u++) { + var l = e(t.ranges[u]), + h = this.changes(l.changes), + c = h.map(n); + for (var d = 0; d < u; d++) s[d] = s[d].map(c); + var f = n.mapDesc(h, !0); + s.push(l.range.map(f)), (n = n.compose(c)), (o = pe.mapEffects(o, c).concat(pe.mapEffects(ir(l.effects), f))); + } + return { changes: n, selection: Q.create(s, t.mainIndex), effects: o }; } changes() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; - return e instanceof We ? e : We.of(e, this.doc.length, this.facet(r.lineSeparator)); + return e instanceof Ue ? e : Ue.of(e, this.doc.length, this.facet(i.lineSeparator)); } toText(e) { - return fe.of(e.split(this.facet(r.lineSeparator) || Lu)); + return de.of(e.split(this.facet(i.lineSeparator) || wl)); } sliceDoc() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, @@ -8733,60 +8560,60 @@ function _ts_generator(thisArg, body) { } facet(e) { var t = this.config.address[e.id]; - return t == null ? e.default : (Zr(this, t), $s(this, t)); + return t == null ? e.default : (Gr(this, t), Bs(this, t)); } toJSON(e) { var t = { doc: this.sliceDoc(), selection: this.selection.toJSON() }; if (e) - for (var i in e) { - var n = e[i]; - n instanceof Pe && this.config.address[n.id] != null && (t[i] = n.spec.toJSON(this.field(e[i]), this)); + for (var r in e) { + var n = e[r]; + n instanceof Ie && this.config.address[n.id] != null && (t[r] = n.spec.toJSON(this.field(e[r]), this)); } return t; } static fromJSON(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, - i = arguments.length > 2 ? arguments[2] : void 0; + r = arguments.length > 2 ? arguments[2] : void 0; if (!e || typeof e.doc != "string") throw new RangeError("Invalid JSON representation for EditorState"); var n = []; - if (i) { + if (r) { var _loop = function (s) { if (Object.prototype.hasOwnProperty.call(e, s)) { - var o = i[s], - l = e[s]; - n.push(o.init((u) => o.spec.fromJSON(l, u))); + var o = r[s], + u = e[s]; + n.push(o.init((l) => o.spec.fromJSON(u, l))); } }; - for (var s in i) _loop(s); + for (var s in r) _loop(s); } - return r.create({ doc: e.doc, selection: Z.fromJSON(e.selection), extensions: t.extensions ? n.concat([t.extensions]) : n }); + return i.create({ doc: e.doc, selection: Q.fromJSON(e.selection), extensions: t.extensions ? n.concat([t.extensions]) : n }); } static create() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - var t = Is.resolve(e.extensions || [], new Map()), - i = e.doc instanceof fe ? e.doc : fe.of((e.doc || "").split(t.staticFacet(r.lineSeparator) || Lu)), - n = e.selection ? (e.selection instanceof Z ? e.selection : Z.single(e.selection.anchor, e.selection.head)) : Z.single(0); + var t = Ss.resolve(e.extensions || [], new Map()), + r = e.doc instanceof de ? e.doc : de.of((e.doc || "").split(t.staticFacet(i.lineSeparator) || wl)), + n = e.selection ? (e.selection instanceof Q ? e.selection : Q.single(e.selection.anchor, e.selection.head)) : Q.single(0); return ( - K0(n, i.length), - t.staticFacet(Nu) || (n = n.asSingle()), - new r( + L0(n, r.length), + t.staticFacet(I0) || (n = n.asSingle()), + new i( t, - i, + r, n, t.dynamicSlots.map(() => null), (s, o) => o.create(s), - null, + null ) ); } get tabSize() { - return this.facet(r.tabSize); + return this.facet(i.tabSize); } get lineBreak() { - return this.facet(r.lineSeparator) || "\n"; + return this.facet(i.lineSeparator) || "\n"; } get readOnly() { - return this.facet(ng); + return this.facet(W0); } phrase(e) { for (var _len = arguments.length, t = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { @@ -8796,10 +8623,10 @@ function _ts_generator(thisArg, body) { _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = this.facet(r.phrases)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - if (Object.prototype.hasOwnProperty.call(i, e)) { - e = i[e]; + for (var _iterator = this.facet(i.phrases)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + if (Object.prototype.hasOwnProperty.call(r, e)) { + e = r[e]; break; } } @@ -8819,16 +8646,16 @@ function _ts_generator(thisArg, body) { } return ( t.length && - (e = e.replace(/\$(\$|\d*)/g, (i, n) => { + (e = e.replace(/\$(\$|\d*)/g, (r, n) => { if (n == "$") return "$"; var s = +(n || 1); - return !s || s > t.length ? i : t[s - 1]; + return !s || s > t.length ? r : t[s - 1]; })), e ); } languageDataAt(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; var n = []; var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -8837,10 +8664,10 @@ function _ts_generator(thisArg, body) { _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator = this.facet(Z0)[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator = this.facet(q0)[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { var s = _step.value; try { - for (var _iterator1 = s(this, t, i)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator1 = s(this, t, r)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { var o = _step1.value; Object.prototype.hasOwnProperty.call(o, e) && n.push(o[e]); } @@ -8876,55 +8703,57 @@ function _ts_generator(thisArg, body) { return n; } charCategorizer(e) { - return jv(this.languageDataAt("wordChars", e).join("")); + return xv(this.languageDataAt("wordChars", e).join("")); } wordAt(e) { var _this_doc_lineAt = this.doc.lineAt(e), t = _this_doc_lineAt.text, - i = _this_doc_lineAt.from, + r = _this_doc_lineAt.from, n = _this_doc_lineAt.length, s = this.charCategorizer(e), - o = e - i, - l = e - i; + o = e - r, + u = e - r; for (; o > 0; ) { - var u = ht(t, o, !1); - if (s(t.slice(u, o)) != vt.Word) break; - o = u; + var l = yt(t, o, !1); + if (s(t.slice(l, o)) != Ft.Word) break; + o = l; } - for (; l < n; ) { - var u1 = ht(t, l); - if (s(t.slice(l, u1)) != vt.Word) break; - l = u1; + for (; u < n; ) { + var l1 = yt(t, u); + if (s(t.slice(u, l1)) != Ft.Word) break; + u = l1; } - return o == l ? null : Z.range(o + i, l + i); + return o == u ? null : Q.range(o + r, u + r); } - constructor(e, t, i, n, s, o) { - (this.config = e), (this.doc = t), (this.selection = i), (this.values = n), (this.status = e.statusTemplate.slice()), (this.computeSlot = s), o && (o._state = this); - for (var l = 0; l < this.config.dynamicSlots.length; l++) Zr(this, l << 1); + constructor(e, t, r, n, s, o) { + (this.config = e), (this.doc = t), (this.selection = r), (this.values = n), (this.status = e.statusTemplate.slice()), (this.computeSlot = s), o && (o._state = this); + for (var u = 0; u < this.config.dynamicSlots.length; u++) Gr(this, u << 1); this.computeSlot = null; } }), - h(_r15, "EditorState"), - _r15); - Ae.allowMultipleSelections = Nu; - Ae.tabSize = H.define({ combine: (r) => (r.length ? r[0] : 4) }); - Ae.lineSeparator = eg; - Ae.readOnly = ng; - Ae.phrases = H.define({ - compare(r, e) { - var t = Object.keys(r), - i = Object.keys(e); - return t.length == i.length && t.every((n) => r[n] == e[n]); + (() => { + a(_i14, "EditorState"); + })(), + _i14); + Ae.allowMultipleSelections = I0; + Ae.tabSize = G.define({ combine: (i) => (i.length ? i[0] : 4) }); + Ae.lineSeparator = N0; + Ae.readOnly = W0; + Ae.phrases = G.define({ + compare(i, e) { + var t = Object.keys(i), + r = Object.keys(e); + return t.length == r.length && t.every((n) => i[n] == e[n]); }, }); - Ae.languageData = Z0; - Ae.changeFilter = tg; - Ae.transactionFilter = ig; - Ae.transactionExtender = rg; - cr.reconfigure = de.define(); - function Xt(r, e) { + Ae.languageData = q0; + Ae.changeFilter = V0; + Ae.transactionFilter = z0; + Ae.transactionExtender = H0; + rr.reconfigure = pe.define(); + function Wt(i, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var i = {}; + var r = {}; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined, @@ -8932,16 +8761,16 @@ function _ts_generator(thisArg, body) { _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { var n = _step.value; try { for (var _iterator1 = Object.keys(n)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { var s = _step1.value; var o = n[s], - l = i[s]; - if (l === void 0) i[s] = o; - else if (!(l === o || o === void 0)) - if (Object.hasOwnProperty.call(t, s)) i[s] = t[s](l, o); + u = r[s]; + if (u === void 0) r[s] = o; + else if (!(u === o || o === void 0)) + if (Object.hasOwnProperty.call(t, s)) r[s] = t[s](u, o); else throw new Error("Config merge conflict for field " + s); } } catch (err) { @@ -8973,89 +8802,95 @@ function _ts_generator(thisArg, body) { } } } - for (var n1 in e) i[n1] === void 0 && (i[n1] = e[n1]); - return i; + for (var n1 in e) r[n1] === void 0 && (r[n1] = e[n1]); + return r; } - h(Xt, "combineConfig"); - var Gt = + a(Wt, "combineConfig"); + var Ht = ((_class29 = class _class { eq(e) { return this == e; } range(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; - return tn.create(e, t, this); + return Kr.create(e, t, this); } }), - h(_class29, "RangeValue"), + (() => { + a(_class29, "RangeValue"); + })(), _class29); - Gt.prototype.startSide = Gt.prototype.endSide = 0; - Gt.prototype.point = !1; - Gt.prototype.mapMode = Ve.TrackDel; - var tn = - ((_r16 = class r { - static create(e, t, i) { - return new r(e, t, i); + Ht.prototype.startSide = Ht.prototype.endSide = 0; + Ht.prototype.point = !1; + Ht.prototype.mapMode = je.TrackDel; + var Kr = + ((_i15 = class i { + static create(e, t, r) { + return new i(e, t, r); } - constructor(e, t, i) { - (this.from = e), (this.to = t), (this.value = i); + constructor(e, t, r) { + (this.from = e), (this.to = t), (this.value = r); } }), - h(_r16, "Range"), - _r16); - function qu(r, e) { - return r.from - e.from || r.value.startSide - e.value.startSide; - } - h(qu, "cmpRange"); - var Vu = - ((_r17 = class r { + (() => { + a(_i15, "Range"); + })(), + _i15); + function Ml(i, e) { + return i.from - e.from || i.value.startSide - e.value.startSide; + } + a(Ml, "cmpRange"); + var $l = + ((_i16 = class i { get length() { return this.to[this.to.length - 1]; } - findIndex(e, t, i) { + findIndex(e, t, r) { var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; - var s = i ? this.to : this.from; - for (var o = n, l = s.length; ; ) { - if (o == l) return o; - var u = (o + l) >> 1, - a = s[u] - e || (i ? this.value[u].endSide : this.value[u].startSide) - t; - if (u == o) return a >= 0 ? o : l; - a >= 0 ? (l = u) : (o = u + 1); + var s = r ? this.to : this.from; + for (var o = n, u = s.length; ; ) { + if (o == u) return o; + var l = (o + u) >> 1, + h = s[l] - e || (r ? this.value[l].endSide : this.value[l].startSide) - t; + if (l == o) return h >= 0 ? o : u; + h >= 0 ? (u = l) : (o = l + 1); } } - between(e, t, i, n) { - for (var s = this.findIndex(t, -1e9, !0), o = this.findIndex(i, 1e9, !1, s); s < o; s++) if (n(this.from[s] + e, this.to[s] + e, this.value[s]) === !1) return !1; + between(e, t, r, n) { + for (var s = this.findIndex(t, -1e9, !0), o = this.findIndex(r, 1e9, !1, s); s < o; s++) if (n(this.from[s] + e, this.to[s] + e, this.value[s]) === !1) return !1; } map(e, t) { - var i = [], + var r = [], n = [], s = [], o = -1, - l = -1; - for (var u = 0; u < this.value.length; u++) { - var a = this.value[u], - c = this.from[u] + e, - f = this.to[u] + e, + u = -1; + for (var l = 0; l < this.value.length; l++) { + var h = this.value[l], + c = this.from[l] + e, + f = this.to[l] + e, d = void 0, p = void 0; if (c == f) { - var m = t.mapPos(c, a.startSide, a.mapMode); - if (m == null || ((d = p = m), a.startSide != a.endSide && ((p = t.mapPos(c, a.endSide)), p < d))) continue; - } else if (((d = t.mapPos(c, a.startSide)), (p = t.mapPos(f, a.endSide)), d > p || (d == p && a.startSide > 0 && a.endSide <= 0))) continue; - (p - d || a.endSide - a.startSide) < 0 || (o < 0 && (o = d), a.point && (l = Math.max(l, p - d)), i.push(a), n.push(d - o), s.push(p - o)); + var m = t.mapPos(c, h.startSide, h.mapMode); + if (m == null || ((d = p = m), h.startSide != h.endSide && ((p = t.mapPos(c, h.endSide)), p < d))) continue; + } else if (((d = t.mapPos(c, h.startSide)), (p = t.mapPos(f, h.endSide)), d > p || (d == p && h.startSide > 0 && h.endSide <= 0))) continue; + (p - d || h.endSide - h.startSide) < 0 || (o < 0 && (o = d), h.point && (u = Math.max(u, p - d)), r.push(h), n.push(d - o), s.push(p - o)); } - return { mapped: i.length ? new r(n, s, i, l) : null, pos: o }; + return { mapped: r.length ? new i(n, s, r, u) : null, pos: o }; } - constructor(e, t, i, n) { - (this.from = e), (this.to = t), (this.value = i), (this.maxPoint = n); + constructor(e, t, r, n) { + (this.from = e), (this.to = t), (this.value = r), (this.maxPoint = n); } }), - h(_r17, "Chunk"), - _r17), - De = - ((_r18 = class r { - static create(e, t, i, n) { - return new r(e, t, i, n); + (() => { + a(_i16, "Chunk"); + })(), + _i16), + Ee = + ((_i17 = class i { + static create(e, t, r, n) { + return new i(e, t, r, n); } get length() { var e = this.chunk.length - 1; @@ -9095,121 +8930,121 @@ function _ts_generator(thisArg, body) { var tmp = e.add, t = tmp === void 0 ? [] : tmp, tmp1 = e.sort, - i = tmp1 === void 0 ? !1 : tmp1, + r = tmp1 === void 0 ? !1 : tmp1, tmp2 = e.filterFrom, n = tmp2 === void 0 ? 0 : tmp2, tmp3 = e.filterTo, s = tmp3 === void 0 ? this.length : tmp3, o = e.filter; if (t.length == 0 && !o) return this; - if ((i && (t = t.slice().sort(qu)), this.isEmpty)) return t.length ? r.of(t) : this; - var l = new qs(this, null, -1).goto(0), - u = 0, - a = [], - c = new wi(); - for (; l.value || u < t.length; ) - if (u < t.length && (l.from - t[u].from || l.startSide - t[u].value.startSide) >= 0) { - var f = t[u++]; - c.addInner(f.from, f.to, f.value) || a.push(f); + if ((r && (t = t.slice().sort(Ml)), this.isEmpty)) return t.length ? i.of(t) : this; + var u = new _s(this, null, -1).goto(0), + l = 0, + h = [], + c = new Ai(); + for (; u.value || l < t.length; ) + if (l < t.length && (u.from - t[l].from || u.startSide - t[l].value.startSide) >= 0) { + var f = t[l++]; + c.addInner(f.from, f.to, f.value) || h.push(f); } else - l.rangeIndex == 1 && l.chunkIndex < this.chunk.length && (u == t.length || this.chunkEnd(l.chunkIndex) < t[u].from) && (!o || n > this.chunkEnd(l.chunkIndex) || s < this.chunkPos[l.chunkIndex]) && c.addChunk(this.chunkPos[l.chunkIndex], this.chunk[l.chunkIndex]) - ? l.nextChunk() - : ((!o || n > l.to || s < l.from || o(l.from, l.to, l.value)) && (c.addInner(l.from, l.to, l.value) || a.push(tn.create(l.from, l.to, l.value))), l.next()); - return c.finishInner(this.nextLayer.isEmpty && !a.length ? r.empty : this.nextLayer.update({ add: a, filter: o, filterFrom: n, filterTo: s })); + u.rangeIndex == 1 && u.chunkIndex < this.chunk.length && (l == t.length || this.chunkEnd(u.chunkIndex) < t[l].from) && (!o || n > this.chunkEnd(u.chunkIndex) || s < this.chunkPos[u.chunkIndex]) && c.addChunk(this.chunkPos[u.chunkIndex], this.chunk[u.chunkIndex]) + ? u.nextChunk() + : ((!o || n > u.to || s < u.from || o(u.from, u.to, u.value)) && (c.addInner(u.from, u.to, u.value) || h.push(Kr.create(u.from, u.to, u.value))), u.next()); + return c.finishInner(this.nextLayer.isEmpty && !h.length ? i.empty : this.nextLayer.update({ add: h, filter: o, filterFrom: n, filterTo: s })); } map(e) { if (e.empty || this.isEmpty) return this; var t = [], - i = [], + r = [], n = -1; for (var o = 0; o < this.chunk.length; o++) { - var l = this.chunkPos[o], - u = this.chunk[o], - a = e.touchesRange(l, l + u.length); - if (a === !1) (n = Math.max(n, u.maxPoint)), t.push(u), i.push(e.mapPos(l)); - else if (a === !0) { - var _u_map = u.map(l, e), - c = _u_map.mapped, - f = _u_map.pos; - c && ((n = Math.max(n, c.maxPoint)), t.push(c), i.push(f)); + var u = this.chunkPos[o], + l = this.chunk[o], + h = e.touchesRange(u, u + l.length); + if (h === !1) (n = Math.max(n, l.maxPoint)), t.push(l), r.push(e.mapPos(u)); + else if (h === !0) { + var _l_map = l.map(u, e), + c = _l_map.mapped, + f = _l_map.pos; + c && ((n = Math.max(n, c.maxPoint)), t.push(c), r.push(f)); } } var s = this.nextLayer.map(e); - return t.length == 0 ? s : new r(i, t, s || r.empty, n); + return t.length == 0 ? s : new i(r, t, s || i.empty, n); } - between(e, t, i) { + between(e, t, r) { if (!this.isEmpty) { for (var n = 0; n < this.chunk.length; n++) { var s = this.chunkPos[n], o = this.chunk[n]; - if (t >= s && e <= s + o.length && o.between(s, e - s, t - s, i) === !1) return; + if (t >= s && e <= s + o.length && o.between(s, e - s, t - s, r) === !1) return; } - this.nextLayer.between(e, t, i); + this.nextLayer.between(e, t, r); } } iter() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; - return rn.from([this]).goto(e); + return Xr.from([this]).goto(e); } get isEmpty() { return this.nextLayer == this; } static iter(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - return rn.from(e).goto(t); + return Xr.from(e).goto(t); } - static compare(e, t, i, n) { + static compare(e, t, r, n) { var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1; var o = e.filter((f) => f.maxPoint > 0 || (!f.isEmpty && f.maxPoint >= s)), - l = t.filter((f) => f.maxPoint > 0 || (!f.isEmpty && f.maxPoint >= s)), - u = z0(o, l, i), - a = new Ai(o, u, s), - c = new Ai(l, u, s); - i.iterGaps((f, d, p) => H0(a, f, c, d, p, n)), i.empty && i.length == 0 && H0(a, 0, c, 0, 0, n); + u = t.filter((f) => f.maxPoint > 0 || (!f.isEmpty && f.maxPoint >= s)), + l = _0(o, u, r), + h = new Fi(o, l, s), + c = new Fi(u, l, s); + r.iterGaps((f, d, p) => O0(h, f, c, d, p, n)), r.empty && r.length == 0 && O0(h, 0, c, 0, 0, n); } static eq(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, n = arguments.length > 3 ? arguments[3] : void 0; - n == null && (n = 999999999); + n == null && (n = 1e9 - 1); var s = e.filter((c) => !c.isEmpty && t.indexOf(c) < 0), o = t.filter((c) => !c.isEmpty && e.indexOf(c) < 0); if (s.length != o.length) return !1; if (!s.length) return !0; - var l = z0(s, o), - u = new Ai(s, l, 0).goto(i), - a = new Ai(o, l, 0).goto(i); + var u = _0(s, o), + l = new Fi(s, u, 0).goto(r), + h = new Fi(o, u, 0).goto(r); for (;;) { - if (u.to != a.to || !Wu(u.active, a.active) || (u.point && (!a.point || !u.point.eq(a.point)))) return !1; - if (u.to > n) return !0; - u.next(), a.next(); + if (l.to != h.to || !Pl(l.active, h.active) || (l.point && (!h.point || !l.point.eq(h.point)))) return !1; + if (l.to > n) return !0; + l.next(), h.next(); } } - static spans(e, t, i, n) { + static spans(e, t, r, n) { var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1; - var o = new Ai(e, null, s).goto(t), - l = t, - u = o.openStart; + var o = new Fi(e, null, s).goto(t), + u = t, + l = o.openStart; for (;;) { - var a = Math.min(o.to, i); + var h = Math.min(o.to, r); if (o.point) { var c = o.activeForPoint(o.to), - f = o.pointFrom < t ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, u); - n.point(l, a, o.point, c, f, o.pointRank), (u = Math.min(o.openEnd(a), c.length)); - } else a > l && (n.span(l, a, o.active, u), (u = o.openEnd(a))); - if (o.to > i) return u + (o.point && o.to > i ? 1 : 0); - (l = o.to), o.next(); + f = o.pointFrom < t ? c.length + 1 : Math.min(c.length, l); + n.point(u, h, o.point, c, f, o.pointRank), (l = Math.min(o.openEnd(h), c.length)); + } else h > u && (n.span(u, h, o.active, l), (l = o.openEnd(h))); + if (o.to > r) return l + (o.point && o.to > r ? 1 : 0); + (u = o.to), o.next(); } } static of(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - var i = new wi(); + var r = new Ai(); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = (e instanceof tn ? [e] : t ? Yv(e) : e)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = (e instanceof Kr ? [e] : t ? Sv(e) : e)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - i.add(n.from, n.to, n.value); + r.add(n.from, n.to, n.value); } } catch (err) { _didIteratorError = true; @@ -9225,74 +9060,72 @@ function _ts_generator(thisArg, body) { } } } - return i.finish(); + return r.finish(); } - static join(e) { - if (!e.length) return r.empty; - var t = e[e.length - 1]; - for (var i = e.length - 2; i >= 0; i--) for (var n = e[i]; n != r.empty; n = n.nextLayer) t = new r(n.chunkPos, n.chunk, t, Math.max(n.maxPoint, t.maxPoint)); - return t; - } - constructor(e, t, i, n) { - (this.chunkPos = e), (this.chunk = t), (this.nextLayer = i), (this.maxPoint = n); + constructor(e, t, r, n) { + (this.chunkPos = e), (this.chunk = t), (this.nextLayer = r), (this.maxPoint = n); } }), - h(_r18, "RangeSet"), - _r18); - De.empty = new De([], [], null, -1); - function Yv(r) { - if (r.length > 1) - for (var e = r[0], t = 1; t < r.length; t++) { - var i = r[t]; - if (qu(e, i) > 0) return r.slice().sort(qu); - e = i; + (() => { + a(_i17, "RangeSet"); + })(), + _i17); + Ee.empty = new Ee([], [], null, -1); + function Sv(i) { + if (i.length > 1) + for (var e = i[0], t = 1; t < i.length; t++) { + var r = i[t]; + if (Ml(e, r) > 0) return i.slice().sort(Ml); + e = r; } - return r; + return i; } - h(Yv, "lazySort"); - De.empty.nextLayer = De.empty; - var wi = - ((_r19 = class r { + a(Sv, "lazySort"); + Ee.empty.nextLayer = Ee.empty; + var Ai = + ((_i18 = class i { finishChunk(e) { - this.chunks.push(new Vu(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), (this.chunkStart = -1), (this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint)), (this.maxPoint = -1), e && ((this.from = []), (this.to = []), (this.value = [])); + this.chunks.push(new $l(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), (this.chunkStart = -1), (this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint)), (this.maxPoint = -1), e && ((this.from = []), (this.to = []), (this.value = [])); } - add(e, t, i) { - this.addInner(e, t, i) || (this.nextLayer || (this.nextLayer = new r())).add(e, t, i); + add(e, t, r) { + this.addInner(e, t, r) || (this.nextLayer || (this.nextLayer = new i())).add(e, t, r); } - addInner(e, t, i) { - var n = e - this.lastTo || i.startSide - this.last.endSide; - if (n <= 0 && (e - this.lastFrom || i.startSide - this.last.startSide) < 0) throw new Error("Ranges must be added sorted by `from` position and `startSide`"); - return n < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(t - this.chunkStart), (this.last = i), (this.lastFrom = e), (this.lastTo = t), this.value.push(i), i.point && (this.maxPoint = Math.max(this.maxPoint, t - e)), !0); + addInner(e, t, r) { + var n = e - this.lastTo || r.startSide - this.last.endSide; + if (n <= 0 && (e - this.lastFrom || r.startSide - this.last.startSide) < 0) throw new Error("Ranges must be added sorted by `from` position and `startSide`"); + return n < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(t - this.chunkStart), (this.last = r), (this.lastFrom = e), (this.lastTo = t), this.value.push(r), r.point && (this.maxPoint = Math.max(this.maxPoint, t - e)), !0); } addChunk(e, t) { if ((e - this.lastTo || t.value[0].startSide - this.last.endSide) < 0) return !1; this.from.length && this.finishChunk(!0), (this.setMaxPoint = Math.max(this.setMaxPoint, t.maxPoint)), this.chunks.push(t), this.chunkPos.push(e); - var i = t.value.length - 1; - return (this.last = t.value[i]), (this.lastFrom = t.from[i] + e), (this.lastTo = t.to[i] + e), !0; + var r = t.value.length - 1; + return (this.last = t.value[r]), (this.lastFrom = t.from[r] + e), (this.lastTo = t.to[r] + e), !0; } finish() { - return this.finishInner(De.empty); + return this.finishInner(Ee.empty); } finishInner(e) { if ((this.from.length && this.finishChunk(!1), this.chunks.length == 0)) return e; - var t = De.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint); + var t = Ee.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint); return (this.from = null), t; } constructor() { (this.chunks = []), (this.chunkPos = []), (this.chunkStart = -1), (this.last = null), (this.lastFrom = -1e9), (this.lastTo = -1e9), (this.from = []), (this.to = []), (this.value = []), (this.maxPoint = -1), (this.setMaxPoint = -1), (this.nextLayer = null); } }), - h(_r19, "RangeSetBuilder"), - _r19); - function z0(r, e, t) { - var i = new Map(); + (() => { + a(_i18, "RangeSetBuilder"); + })(), + _i18); + function _0(i, e, t) { + var r = new Map(); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; - for (var o = 0; o < s.chunk.length; o++) s.chunk[o].maxPoint <= 0 && i.set(s.chunk[o], s.chunkPos[o]); + for (var o = 0; o < s.chunk.length; o++) s.chunk[o].maxPoint <= 0 && r.set(s.chunk[o], s.chunkPos[o]); } } catch (err) { _didIteratorError = true; @@ -9316,8 +9149,9 @@ function _ts_generator(thisArg, body) { for (var _iterator1 = e[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { var s1 = _step1.value; for (var o1 = 0; o1 < s1.chunk.length; o1++) { - var l = i.get(s1.chunk[o1]); - l != null && (t ? t.mapPos(l) : l) == s1.chunkPos[o1] && !(t === null || t === void 0 ? void 0 : t.touchesRange(l, l + s1.chunk[o1].length)) && n.add(s1.chunk[o1]); + var _t_touchesRange, _this; + var u = r.get(s1.chunk[o1]); + u != null && (t ? t.mapPos(u) : u) == s1.chunkPos[o1] && !((_this = t) === null || _this === void 0 ? void 0 : (_t_touchesRange = _this.touchesRange) === null || _t_touchesRange === void 0 ? void 0 : _t_touchesRange.call(_this, u, u + s1.chunk[o1].length)) && n.add(s1.chunk[o1]); } } } catch (err) { @@ -9336,8 +9170,8 @@ function _ts_generator(thisArg, body) { } return n; } - h(z0, "findSharedChunks"); - var qs = + a(_0, "findSharedChunks"); + var _s = ((_class30 = class _class { get startSide() { return this.value ? this.value.startSide : 0; @@ -9349,15 +9183,15 @@ function _ts_generator(thisArg, body) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1e9; return (this.chunkIndex = this.rangeIndex = 0), this.gotoInner(e, t, !1), this; } - gotoInner(e, t, i) { + gotoInner(e, t, r) { for (; this.chunkIndex < this.layer.chunk.length; ) { var n = this.layer.chunk[this.chunkIndex]; if (!((this.skip && this.skip.has(n)) || this.layer.chunkEnd(this.chunkIndex) < e || n.maxPoint < this.minPoint)) break; - this.chunkIndex++, (i = !1); + this.chunkIndex++, (r = !1); } if (this.chunkIndex < this.layer.chunk.length) { var n1 = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], t, !0); - (!i || this.rangeIndex < n1) && this.setRangeIndex(n1); + (!r || this.rangeIndex < n1) && this.setRangeIndex(n1); } this.next(); } @@ -9372,8 +9206,8 @@ function _ts_generator(thisArg, body) { } else { var e = this.layer.chunkPos[this.chunkIndex], t = this.layer.chunk[this.chunkIndex], - i = e + t.from[this.rangeIndex]; - if (((this.from = i), (this.to = e + t.to[this.rangeIndex]), (this.value = t.value[this.rangeIndex]), this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || (this.value.point && this.to - this.from >= this.minPoint))) break; + r = e + t.from[this.rangeIndex]; + if (((this.from = r), (this.to = e + t.to[this.rangeIndex]), (this.value = t.value[this.rangeIndex]), this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || (this.value.point && this.to - this.from >= this.minPoint))) break; } } setRangeIndex(e) { @@ -9388,21 +9222,23 @@ function _ts_generator(thisArg, body) { compare(e) { return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide; } - constructor(e, t, i, ref) { + constructor(e, t, r, ref) { var n = ref === void 0 ? 0 : ref; - (this.layer = e), (this.skip = t), (this.minPoint = i), (this.rank = n); + (this.layer = e), (this.skip = t), (this.minPoint = r), (this.rank = n); } }), - h(_class30, "LayerCursor"), + (() => { + a(_class30, "LayerCursor"); + })(), _class30), - rn = - ((_r20 = class r { + Xr = + ((_i19 = class i { static from(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; var n = []; - for (var s = 0; s < e.length; s++) for (var o = e[s]; !o.isEmpty; o = o.nextLayer) o.maxPoint >= i && n.push(new qs(o, t, i, s)); - return n.length == 1 ? n[0] : new r(n); + for (var s = 0; s < e.length; s++) for (var o = e[s]; !o.isEmpty; o = o.nextLayer) o.maxPoint >= r && n.push(new _s(o, t, r, s)); + return n.length == 1 ? n[0] : new i(n); } get startSide() { return this.value ? this.value.startSide : 0; @@ -9414,8 +9250,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.heap[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - i.goto(e, t); + var r = _step.value; + r.goto(e, t); } } catch (err) { _didIteratorError = true; @@ -9431,7 +9267,7 @@ function _ts_generator(thisArg, body) { } } } - for (var i1 = this.heap.length >> 1; i1 >= 0; i1--) _u(this.heap, i1); + for (var r1 = this.heap.length >> 1; r1 >= 0; r1--) vl(this.heap, r1); return this.next(), this; } forward(e, t) { @@ -9440,8 +9276,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.heap[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - i.forward(e, t); + var r = _step.value; + r.forward(e, t); } } catch (err) { _didIteratorError = true; @@ -9457,33 +9293,35 @@ function _ts_generator(thisArg, body) { } } } - for (var i1 = this.heap.length >> 1; i1 >= 0; i1--) _u(this.heap, i1); + for (var r1 = this.heap.length >> 1; r1 >= 0; r1--) vl(this.heap, r1); (this.to - e || this.value.endSide - t) < 0 && this.next(); } next() { if (this.heap.length == 0) (this.from = this.to = 1e9), (this.value = null), (this.rank = -1); else { var e = this.heap[0]; - (this.from = e.from), (this.to = e.to), (this.value = e.value), (this.rank = e.rank), e.value && e.next(), _u(this.heap, 0); + (this.from = e.from), (this.to = e.to), (this.value = e.value), (this.rank = e.rank), e.value && e.next(), vl(this.heap, 0); } } constructor(e) { this.heap = e; } }), - h(_r20, "HeapCursor"), - _r20); - function _u(r, e) { - for (var t = r[e]; ; ) { - var i = (e << 1) + 1; - if (i >= r.length) break; - var n = r[i]; - if ((i + 1 < r.length && n.compare(r[i + 1]) >= 0 && ((n = r[i + 1]), i++), t.compare(n) < 0)) break; - (r[i] = t), (r[e] = n), (e = i); - } - } - h(_u, "heapBubble"); - var Ai = + (() => { + a(_i19, "HeapCursor"); + })(), + _i19); + function vl(i, e) { + for (var t = i[e]; ; ) { + var r = (e << 1) + 1; + if (r >= i.length) break; + var n = i[r]; + if ((r + 1 < i.length && n.compare(i[r + 1]) >= 0 && ((n = i[r + 1]), r++), t.compare(n) < 0)) break; + (i[r] = t), (i[e] = n), (e = r); + } + } + a(vl, "heapBubble"); + var Fi = ((_class31 = class _class { goto(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1e9; @@ -9494,22 +9332,22 @@ function _ts_generator(thisArg, body) { this.cursor.forward(e, t); } removeActive(e) { - Ls(this.active, e), Ls(this.activeTo, e), Ls(this.activeRank, e), (this.minActive = j0(this.active, this.activeTo)); + Cs(this.active, e), Cs(this.activeTo, e), Cs(this.activeRank, e), (this.minActive = T0(this.active, this.activeTo)); } addActive(e) { var t = 0, _this_cursor = this.cursor, - i = _this_cursor.value, + r = _this_cursor.value, n = _this_cursor.to, s = _this_cursor.rank; - for (; t < this.activeRank.length && (s - this.activeRank[t] || n - this.activeTo[t]) > 0; ) t++; - Os(this.active, t, i), Os(this.activeTo, t, n), Os(this.activeRank, t, s), e && Os(e, t, this.cursor.from), (this.minActive = j0(this.active, this.activeTo)); + for (; t < this.activeRank.length && this.activeRank[t] <= s; ) t++; + As(this.active, t, r), As(this.activeTo, t, n), As(this.activeRank, t, s), e && As(e, t, this.cursor.from), (this.minActive = T0(this.active, this.activeTo)); } next() { var e = this.to, t = this.point; this.point = null; - var i = this.openStart < 0 ? [] : null; + var r = this.openStart < 0 ? [] : null; for (;;) { var n = this.minActive; if (n > -1 && (this.activeTo[n] - this.cursor.from || this.active[n].endSide - this.cursor.startSide) < 0) { @@ -9517,14 +9355,14 @@ function _ts_generator(thisArg, body) { (this.to = this.activeTo[n]), (this.endSide = this.active[n].endSide); break; } - this.removeActive(n), i && Ls(i, n); + this.removeActive(n), r && Cs(r, n); } else if (this.cursor.value) if (this.cursor.from > e) { (this.to = this.cursor.from), (this.endSide = this.cursor.startSide); break; } else { var s = this.cursor.value; - if (!s.point) this.addActive(i), this.cursor.next(); + if (!s.point) this.addActive(r), this.cursor.next(); else if (t && this.cursor.to == this.to && this.cursor.from < this.cursor.to) this.cursor.next(); else { (this.point = s), (this.pointFrom = this.cursor.from), (this.pointRank = this.cursor.rank), (this.to = this.cursor.to), (this.endSide = s.endSide), this.cursor.next(), this.forward(this.to, this.endSide); @@ -9536,179 +9374,178 @@ function _ts_generator(thisArg, body) { break; } } - if (i) { + if (r) { this.openStart = 0; - for (var n1 = i.length - 1; n1 >= 0 && i[n1] < e; n1--) this.openStart++; + for (var n1 = r.length - 1; n1 >= 0 && r[n1] < e; n1--) this.openStart++; } } activeForPoint(e) { if (!this.active.length) return this.active; var t = []; - for (var i = this.active.length - 1; i >= 0 && !(this.activeRank[i] < this.pointRank); i--) (this.activeTo[i] > e || (this.activeTo[i] == e && this.active[i].endSide >= this.point.endSide)) && t.push(this.active[i]); + for (var r = this.active.length - 1; r >= 0 && !(this.activeRank[r] < this.pointRank); r--) (this.activeTo[r] > e || (this.activeTo[r] == e && this.active[r].endSide >= this.point.endSide)) && t.push(this.active[r]); return t.reverse(); } openEnd(e) { var t = 0; - for (var i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > e; i--) t++; + for (var r = this.activeTo.length - 1; r >= 0 && this.activeTo[r] > e; r--) t++; return t; } - constructor(e, t, i) { - (this.minPoint = i), (this.active = []), (this.activeTo = []), (this.activeRank = []), (this.minActive = -1), (this.point = null), (this.pointFrom = 0), (this.pointRank = 0), (this.to = -1e9), (this.endSide = 0), (this.openStart = -1), (this.cursor = rn.from(e, t, i)); + constructor(e, t, r) { + (this.minPoint = r), (this.active = []), (this.activeTo = []), (this.activeRank = []), (this.minActive = -1), (this.point = null), (this.pointFrom = 0), (this.pointRank = 0), (this.to = -1e9), (this.endSide = 0), (this.openStart = -1), (this.cursor = Xr.from(e, t, r)); } }), - h(_class31, "SpanCursor"), + (() => { + a(_class31, "SpanCursor"); + })(), _class31); - function H0(r, e, t, i, n, s) { - r.goto(e), t.goto(i); - var o = i + n, - l = i, - u = i - e; + function O0(i, e, t, r, n, s) { + i.goto(e), t.goto(r); + var o = r + n, + u = r, + l = r - e; for (;;) { - var a = r.to + u - t.to || r.endSide - t.endSide, - c = a < 0 ? r.to + u : t.to, + var h = i.to + l - t.to || i.endSide - t.endSide, + c = h < 0 ? i.to + l : t.to, f = Math.min(c, o); - if ((r.point || t.point ? (r.point && t.point && (r.point == t.point || r.point.eq(t.point)) && Wu(r.activeForPoint(r.to), t.activeForPoint(t.to))) || s.comparePoint(l, f, r.point, t.point) : f > l && !Wu(r.active, t.active) && s.compareRange(l, f, r.active, t.active), c > o)) break; - (l = c), a <= 0 && r.next(), a >= 0 && t.next(); + if ((i.point || t.point ? (i.point && t.point && (i.point == t.point || i.point.eq(t.point)) && Pl(i.activeForPoint(i.to + l), t.activeForPoint(t.to))) || s.comparePoint(u, f, i.point, t.point) : f > u && !Pl(i.active, t.active) && s.compareRange(u, f, i.active, t.active), c > o)) break; + (u = c), h <= 0 && i.next(), h >= 0 && t.next(); } } - h(H0, "compare"); - function Wu(r, e) { - if (r.length != e.length) return !1; - for (var t = 0; t < r.length; t++) if (r[t] != e[t] && !r[t].eq(e[t])) return !1; + a(O0, "compare"); + function Pl(i, e) { + if (i.length != e.length) return !1; + for (var t = 0; t < i.length; t++) if (i[t] != e[t] && !i[t].eq(e[t])) return !1; return !0; } - h(Wu, "sameValues"); - function Ls(r, e) { - for (var t = e, i = r.length - 1; t < i; t++) r[t] = r[t + 1]; - r.pop(); + a(Pl, "sameValues"); + function Cs(i, e) { + for (var t = e, r = i.length - 1; t < r; t++) i[t] = i[t + 1]; + i.pop(); } - h(Ls, "remove"); - function Os(r, e, t) { - for (var i = r.length - 1; i >= e; i--) r[i + 1] = r[i]; - r[e] = t; + a(Cs, "remove"); + function As(i, e, t) { + for (var r = i.length - 1; r >= e; r--) i[r + 1] = i[r]; + i[e] = t; } - h(Os, "insert"); - function j0(r, e) { + a(As, "insert"); + function T0(i, e) { var t = -1, - i = 1e9; - for (var n = 0; n < e.length; n++) (e[n] - i || r[n].endSide - r[t].endSide) < 0 && ((t = n), (i = e[n])); + r = 1e9; + for (var n = 0; n < e.length; n++) (e[n] - r || i[n].endSide - i[t].endSide) < 0 && ((t = n), (r = e[n])); return t; } - h(j0, "findMinIndex"); - function Vs(r, e) { - var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : r.length; - var i = 0; - for (var n = 0; n < t; ) r.charCodeAt(n) == 9 ? ((i += e - (i % e)), n++) : (i++, (n = ht(r, n))); - return i; + a(T0, "findMinIndex"); + function Os(i, e) { + var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : i.length; + var r = 0; + for (var n = 0; n < t; ) i.charCodeAt(n) == 9 ? ((r += e - (r % e)), n++) : (r++, (n = yt(i, n))); + return r; } - h(Vs, "countColumn"); - function lg(r, e, t, i) { + a(Os, "countColumn"); + function G0(i, e, t, r) { for (var n = 0, s = 0; ; ) { if (s >= e) return n; - if (n == r.length) break; - (s += r.charCodeAt(n) == 9 ? t - (s % t) : 1), (n = ht(r, n)); + if (n == i.length) break; + (s += i.charCodeAt(n) == 9 ? t - (s % t) : 1), (n = yt(i, n)); } - return i === !0 ? -1 : r.length; - } - h(lg, "findColumn"); - var ju = "ͼ", - ug = typeof Symbol > "u" ? "__" + ju : Symbol.for(ju), - Yu = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), - ag = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}, - ft = + return r === !0 ? -1 : i.length; + } + a(G0, "findColumn"); + var Il = "ͼ", + Y0 = typeof Symbol > "u" ? "__" + Il : Symbol.for(Il), + Nl = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), + K0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {}, + ut = ((_class32 = class _class { getRules() { return this.rules.join("\n"); } static newName() { - var e = ag[ug] || 1; - return (ag[ug] = e + 1), ju + e.toString(36); + var e = K0[Y0] || 1; + return (K0[Y0] = e + 1), Il + e.toString(36); } - static mount(e, t, i) { - var n = e[Yu], - s = i && i.nonce; - n ? s && n.setNonce(s) : (n = new Ju(e, s)), n.mount(Array.isArray(t) ? t : [t], e); + static mount(e, t) { + (e[Nl] || new Vl(e)).mount(Array.isArray(t) ? t : [t]); } constructor(e, t) { this.rules = []; var _ref = t || {}, - i = _ref.finish; + r = _ref.finish; function n(o) { return /^@/.test(o) ? [o] : o.split(/,\s*/); } - h(n, "splitSelector"); - function s(o, l, u, a) { + a(n, "splitSelector"); + function s(o, u, l, h) { var c = [], f = /^@(\w+)\b/.exec(o[0]), d = f && f[1] == "keyframes"; - if (f && l == null) return u.push(o[0] + ";"); - for (var p in l) { - var m = l[p]; + if (f && u == null) return l.push(o[0] + ";"); + for (var p in u) { + var m = u[p]; if (/&/.test(p)) s( p .split(/,\s*/) - .map((F) => o.map((g) => F.replace(/&/, g))) - .reduce((F, g) => F.concat(g)), + .map((b) => o.map((g) => b.replace(/&/, g))) + .reduce((b, g) => b.concat(g)), m, - u, + l ); else if (m && typeof m == "object") { if (!f) throw new RangeError("The value of a property (" + p + ") should be a primitive value."); s(n(p), m, c, d); - } else m != null && c.push(p.replace(/_.*/, "").replace(/[A-Z]/g, (F) => "-" + F.toLowerCase()) + ": " + m + ";"); + } else m != null && c.push(p.replace(/_.*/, "").replace(/[A-Z]/g, (b) => "-" + b.toLowerCase()) + ": " + m + ";"); } - (c.length || d) && u.push((i && !f && !a ? o.map(i) : o).join(", ") + " {" + c.join(" ") + "}"); + (c.length || d) && l.push((r && !f && !h ? o.map(r) : o).join(", ") + " {" + c.join(" ") + "}"); } - h(s, "render"); + a(s, "render"); for (var o in e) s(n(o), e[o], this.rules); } }), - h(_class32, "StyleModule"), + (() => { + a(_class32, "StyleModule"); + })(), _class32), - hg = new Map(), - Ju = + Ts = null, + Vl = ((_class33 = class _class { - mount(e, t) { - var i = this.sheet, - n = 0, - s = 0; - for (var o = 0; o < e.length; o++) { - var l = e[o], - u = this.modules.indexOf(l); - if ((u < s && u > -1 && (this.modules.splice(u, 1), s--, (u = -1)), u == -1)) { - if ((this.modules.splice(s++, 0, l), i)) for (var a = 0; a < l.rules.length; a++) i.insertRule(l.rules[a], n++); + mount(e) { + var t = this.sheet, + r = 0, + n = 0; + for (var s = 0; s < e.length; s++) { + var o = e[s], + u = this.modules.indexOf(o); + if ((u < n && u > -1 && (this.modules.splice(u, 1), n--, (u = -1)), u == -1)) { + if ((this.modules.splice(n++, 0, o), t)) for (var l = 0; l < o.rules.length; l++) t.insertRule(o.rules[l], r++); } else { - for (; s < u; ) n += this.modules[s++].rules.length; - (n += l.rules.length), s++; + for (; n < u; ) r += this.modules[n++].rules.length; + (r += o.rules.length), n++; } } - if (i) t.adoptedStyleSheets.indexOf(this.sheet) < 0 && (t.adoptedStyleSheets = [this.sheet, ...t.adoptedStyleSheets]); - else { - var o1 = ""; - for (var u1 = 0; u1 < this.modules.length; u1++) o1 += this.modules[u1].getRules() + "\n"; - this.styleTag.textContent = o1; - var l1 = t.head || t; - this.styleTag.parentNode != l1 && l1.insertBefore(this.styleTag, l1.firstChild); + if (!t) { + var s1 = ""; + for (var o1 = 0; o1 < this.modules.length; o1++) s1 += this.modules[o1].getRules() + "\n"; + this.styleTag.textContent = s1; } } - setNonce(e) { - this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e); - } - constructor(e, t) { - var i = e.ownerDocument || e, - n = i.defaultView; - if (!e.head && e.adoptedStyleSheets && n.CSSStyleSheet) { - var s = hg.get(i); - if (s) return (e[Yu] = s); - (this.sheet = new n.CSSStyleSheet()), hg.set(i, this); - } else (this.styleTag = i.createElement("style")), t && this.styleTag.setAttribute("nonce", t); - (this.modules = []), (e[Yu] = this); + constructor(e) { + if (!e.head && e.adoptedStyleSheets && typeof CSSStyleSheet < "u") { + if (Ts) return (e.adoptedStyleSheets = [Ts.sheet].concat(e.adoptedStyleSheets)), (e[Nl] = Ts); + (this.sheet = new CSSStyleSheet()), (e.adoptedStyleSheets = [this.sheet].concat(e.adoptedStyleSheets)), (Ts = this); + } else { + this.styleTag = (e.ownerDocument || e).createElement("style"); + var t = e.head || e; + t.insertBefore(this.styleTag, t.firstChild); + } + (this.modules = []), (e[Nl] = this); } }), - h(_class33, "StyleSet"), + (() => { + a(_class33, "StyleSet"); + })(), _class33); - var Kt = { + var jt = { 8: "Backspace", 9: "Tab", 10: "Enter", @@ -9762,156 +9599,145 @@ function _ts_generator(thisArg, body) { 221: "]", 222: "'", }, - dr = { 48: ")", 49: "!", 50: "@", 51: "#", 52: "$", 53: "%", 54: "^", 55: "&", 56: "*", 57: "(", 59: ":", 61: "+", 173: "_", 186: ":", 187: "+", 188: "<", 189: "_", 190: ">", 191: "?", 192: "~", 219: "{", 220: "|", 221: "}", 222: '"' }, - Jv = typeof navigator < "u" && /Mac/.test(navigator.platform), - Gv = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent); - for (_e = 0; _e < 10; _e++) Kt[48 + _e] = Kt[96 + _e] = String(_e); - var _e; - for (_e = 1; _e <= 24; _e++) Kt[_e + 111] = "F" + _e; - var _e; - for (_e = 65; _e <= 90; _e++) (Kt[_e] = String.fromCharCode(_e + 32)), (dr[_e] = String.fromCharCode(_e)); - var _e; - for (Ws in Kt) dr.hasOwnProperty(Ws) || (dr[Ws] = Kt[Ws]); - var Ws; - function cg(r) { - var e = (Jv && r.metaKey && r.shiftKey && !r.ctrlKey && !r.altKey) || (Gv && r.shiftKey && r.key && r.key.length == 1) || r.key == "Unidentified", - t = (!e && r.key) || (r.shiftKey ? dr : Kt)[r.keyCode] || r.key || "Unidentified"; + sr = { 48: ")", 49: "!", 50: "@", 51: "#", 52: "$", 53: "%", 54: "^", 55: "&", 56: "*", 57: "(", 59: ":", 61: "+", 173: "_", 186: ":", 187: "+", 188: "<", 189: "_", 190: ">", 191: "?", 192: "~", 219: "{", 220: "|", 221: "}", 222: '"' }, + X0 = typeof navigator < "u" && /Chrome\/(\d+)/.exec(navigator.userAgent), + gB = typeof navigator < "u" && /Gecko\/\d+/.test(navigator.userAgent), + Bv = typeof navigator < "u" && /Mac/.test(navigator.platform), + _v = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent), + Ov = Bv || (X0 && +X0[1] < 57); + for (Oe = 0; Oe < 10; Oe++) jt[48 + Oe] = jt[96 + Oe] = String(Oe); + var Oe; + for (Oe = 1; Oe <= 24; Oe++) jt[Oe + 111] = "F" + Oe; + var Oe; + for (Oe = 65; Oe <= 90; Oe++) (jt[Oe] = String.fromCharCode(Oe + 32)), (sr[Oe] = String.fromCharCode(Oe)); + var Oe; + for (Rs in jt) sr.hasOwnProperty(Rs) || (sr[Rs] = jt[Rs]); + var Rs; + function Q0(i) { + var e = (Ov && (i.ctrlKey || i.altKey || i.metaKey)) || (_v && i.shiftKey && i.key && i.key.length == 1) || i.key == "Unidentified", + t = (!e && i.key) || (i.shiftKey ? sr : jt)[i.keyCode] || i.key || "Unidentified"; return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t; } - h(cg, "keyName"); - function oo(r) { + a(Q0, "keyName"); + function Ys(i) { var e; - return r.nodeType == 11 ? (e = r.getSelection ? r : r.ownerDocument) : (e = r), e.getSelection(); + return i.nodeType == 11 ? (e = i.getSelection ? i : i.ownerDocument) : (e = i), e.getSelection(); } - h(oo, "getSelection"); - function ia(r, e) { - return e ? r == e || r.contains(e.nodeType != 1 ? e.parentNode : e) : !1; + a(Ys, "getSelection"); + function fr(i, e) { + return e ? i == e || i.contains(e.nodeType != 1 ? e.parentNode : e) : !1; } - h(ia, "contains"); - function Xv(r) { - var e = r.activeElement; + a(fr, "contains"); + function Tv(i) { + var e = i.activeElement; for (; e && e.shadowRoot; ) e = e.shadowRoot.activeElement; return e; } - h(Xv, "deepActiveElement"); - function eo(r, e) { + a(Tv, "deepActiveElement"); + function zs(i, e) { if (!e.anchorNode) return !1; try { - return ia(r, e.anchorNode); + return fr(i, e.anchorNode); } catch (e) { return !1; } } - h(eo, "hasSelection"); - function gn(r) { - return r.nodeType == 3 ? _i(r, 0, r.nodeValue.length).getClientRects() : r.nodeType == 1 ? r.getClientRects() : []; + a(zs, "hasSelection"); + function sn(i) { + return i.nodeType == 3 ? dr(i, 0, i.nodeValue.length).getClientRects() : i.nodeType == 1 ? i.getClientRects() : []; } - h(gn, "clientRectsFor"); - function hn(r, e, t, i) { - return t ? fg(r, e, t, i, -1) || fg(r, e, t, i, 1) : !1; + a(sn, "clientRectsFor"); + function Ks(i, e, t, r) { + return t ? J0(i, e, t, r, -1) || J0(i, e, t, r, 1) : !1; } - h(hn, "isEquivalentPosition"); - function Qi(r) { - for (var e = 0; ; e++) if (((r = r.previousSibling), !r)) return e; + a(Ks, "isEquivalentPosition"); + function Xs(i) { + for (var e = 0; ; e++) if (((i = i.previousSibling), !i)) return e; } - h(Qi, "domIndex"); - function lo(r) { - return r.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName); - } - h(lo, "isBlockElement"); - function fg(r, e, t, i, n) { + a(Xs, "domIndex"); + function J0(i, e, t, r, n) { for (;;) { - if (r == t && e == i) return !0; - if (e == (n < 0 ? 0 : Zt(r))) { - if (r.nodeName == "DIV") return !1; - var s = r.parentNode; + if (i == t && e == r) return !0; + if (e == (n < 0 ? 0 : ri(i))) { + if (i.nodeName == "DIV") return !1; + var s = i.parentNode; if (!s || s.nodeType != 1) return !1; - (e = Qi(r) + (n < 0 ? 0 : 1)), (r = s); - } else if (r.nodeType == 1) { - if (((r = r.childNodes[e + (n < 0 ? -1 : 0)]), r.nodeType == 1 && r.contentEditable == "false")) return !1; - e = n < 0 ? Zt(r) : 0; + (e = Xs(i) + (n < 0 ? 0 : 1)), (i = s); + } else if (i.nodeType == 1) { + if (((i = i.childNodes[e + (n < 0 ? -1 : 0)]), i.nodeType == 1 && i.contentEditable == "false")) return !1; + e = n < 0 ? ri(i) : 0; } else return !1; } } - h(fg, "scanFor"); - function Zt(r) { - return r.nodeType == 3 ? r.nodeValue.length : r.childNodes.length; - } - h(Zt, "maxOffset"); - function Ma(r, e) { - var t = e ? r.left : r.right; - return { left: t, right: t, top: r.top, bottom: r.bottom }; - } - h(Ma, "flattenRect"); - function Kv(r) { - var e = r.visualViewport; - return e ? { left: 0, right: e.width, top: 0, bottom: e.height } : { left: 0, right: r.innerWidth, top: 0, bottom: r.innerHeight }; - } - h(Kv, "windowRect"); - function Jg(r, e) { - var t = e.width / r.offsetWidth, - i = e.height / r.offsetHeight; - return ((t > 0.995 && t < 1.005) || !isFinite(t) || Math.abs(e.width - r.offsetWidth) < 1) && (t = 1), ((i > 0.995 && i < 1.005) || !isFinite(i) || Math.abs(e.height - r.offsetHeight) < 1) && (i = 1), { scaleX: t, scaleY: i }; - } - h(Jg, "getScale"); - function Zv(r, e, t, i, n, s, o, l) { - var u = r.ownerDocument, - a = u.defaultView || window; - for (var c = r, f = !1; c && !f; ) + a(J0, "scanFor"); + function ri(i) { + return i.nodeType == 3 ? i.nodeValue.length : i.childNodes.length; + } + a(ri, "maxOffset"); + function Ra(i, e) { + var t = e ? i.left : i.right; + return { left: t, right: t, top: i.top, bottom: i.bottom }; + } + a(Ra, "flattenRect"); + function Rv(i) { + return { left: 0, right: i.innerWidth, top: 0, bottom: i.innerHeight }; + } + a(Rv, "windowRect"); + function Mv(i, e, t, r, n, s, o, u) { + var l = i.ownerDocument, + h = l.defaultView || window; + for (var c = i; c; ) if (c.nodeType == 1) { - var d = void 0, - p = c == u.body, - m = 1, - F = 1; - if (p) d = Kv(a); + var f = void 0, + d = c == l.body; + if (d) f = Rv(h); else { - if ((/^(fixed|sticky)$/.test(getComputedStyle(c).position) && (f = !0), c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth)) { + if (c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth) { c = c.assignedSlot || c.parentNode; continue; } var b = c.getBoundingClientRect(); - var ref; - (ref = Jg(c, b)), (m = ref.scaleX), (F = ref.scaleY), ref, (d = { left: b.left, right: b.left + c.clientWidth * m, top: b.top, bottom: b.top + c.clientHeight * F }); + f = { left: b.left, right: b.left + c.clientWidth, top: b.top, bottom: b.top + c.clientHeight }; } - var g = 0, - D = 0; - if (n == "nearest") e.top < d.top ? ((D = -(d.top - e.top + o)), t > 0 && e.bottom > d.bottom + D && (D = e.bottom - d.bottom + D + o)) : e.bottom > d.bottom && ((D = e.bottom - d.bottom + o), t < 0 && e.top - D < d.top && (D = -(d.top + D - e.top + o))); + var p = 0, + m = 0; + if (n == "nearest") e.top < f.top ? ((m = -(f.top - e.top + o)), t > 0 && e.bottom > f.bottom + m && (m = e.bottom - f.bottom + m + o)) : e.bottom > f.bottom && ((m = e.bottom - f.bottom + o), t < 0 && e.top - m < f.top && (m = -(f.top + m - e.top + o))); else { var b1 = e.bottom - e.top, - B = d.bottom - d.top; - D = (n == "center" && b1 <= B ? e.top + b1 / 2 - B / 2 : n == "start" || (n == "center" && t < 0) ? e.top - o : e.bottom - B + o) - d.top; + g = f.bottom - f.top; + m = (n == "center" && b1 <= g ? e.top + b1 / 2 - g / 2 : n == "start" || (n == "center" && t < 0) ? e.top - o : e.bottom - g + o) - f.top; } if ( - (i == "nearest" - ? e.left < d.left - ? ((g = -(d.left - e.left + s)), t > 0 && e.right > d.right + g && (g = e.right - d.right + g + s)) - : e.right > d.right && ((g = e.right - d.right + s), t < 0 && e.left < d.left + g && (g = -(d.left + g - e.left + s))) - : (g = (i == "center" ? e.left + (e.right - e.left) / 2 - (d.right - d.left) / 2 : (i == "start") == l ? e.left - s : e.right - (d.right - d.left) + s) - d.left), - g || D) + (r == "nearest" + ? e.left < f.left + ? ((p = -(f.left - e.left + s)), t > 0 && e.right > f.right + p && (p = e.right - f.right + p + s)) + : e.right > f.right && ((p = e.right - f.right + s), t < 0 && e.left < f.left + p && (p = -(f.left + p - e.left + s))) + : (p = (r == "center" ? e.left + (e.right - e.left) / 2 - (f.right - f.left) / 2 : (r == "start") == u ? e.left - s : e.right - (f.right - f.left) + s) - f.left), + p || m) ) - if (p) a.scrollBy(g, D); + if (d) h.scrollBy(p, m); else { var b2 = 0, - B1 = 0; - if (D) { - var k = c.scrollTop; - (c.scrollTop += D / F), (B1 = (c.scrollTop - k) * F); + g1 = 0; + if (m) { + var D = c.scrollTop; + (c.scrollTop += m), (g1 = c.scrollTop - D); } - if (g) { - var k1 = c.scrollLeft; - (c.scrollLeft += g / m), (b2 = (c.scrollLeft - k1) * m); + if (p) { + var D1 = c.scrollLeft; + (c.scrollLeft += p), (b2 = c.scrollLeft - D1); } - (e = { left: e.left - b2, top: e.top - B1, right: e.right - b2, bottom: e.bottom - B1 }), b2 && Math.abs(b2 - g) < 1 && (i = "nearest"), B1 && Math.abs(B1 - D) < 1 && (n = "nearest"); + (e = { left: e.left - b2, top: e.top - g1, right: e.right - b2, bottom: e.bottom - g1 }), b2 && Math.abs(b2 - p) < 1 && (r = "nearest"), g1 && Math.abs(g1 - m) < 1 && (n = "nearest"); } - if (p) break; + if (d) break; c = c.assignedSlot || c.parentNode; } else if (c.nodeType == 11) c = c.host; else break; } - h(Zv, "scrollRectIntoView"); - function ex(r) { - var e = r.ownerDocument; - for (var t = r.parentNode; t && t != e.body; ) + a(Mv, "scrollRectIntoView"); + function $v(i) { + var e = i.ownerDocument; + for (var t = i.parentNode; t && t != e.body; ) if (t.nodeType == 1) { if (t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth) return t; t = t.assignedSlot || t.parentNode; @@ -9919,142 +9745,118 @@ function _ts_generator(thisArg, body) { else break; return null; } - h(ex, "scrollableParent"); - var ra = + a($v, "scrollableParent"); + var Yl = ((_class34 = class _class { eq(e) { return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset; } setRange(e) { var t = e.anchorNode, - i = e.focusNode; - this.set(t, Math.min(e.anchorOffset, t ? Zt(t) : 0), i, Math.min(e.focusOffset, i ? Zt(i) : 0)); + r = e.focusNode; + this.set(t, Math.min(e.anchorOffset, t ? ri(t) : 0), r, Math.min(e.focusOffset, r ? ri(r) : 0)); } - set(e, t, i, n) { - (this.anchorNode = e), (this.anchorOffset = t), (this.focusNode = i), (this.focusOffset = n); + set(e, t, r, n) { + (this.anchorNode = e), (this.anchorOffset = t), (this.focusNode = r), (this.focusOffset = n); } constructor() { (this.anchorNode = null), (this.anchorOffset = 0), (this.focusNode = null), (this.focusOffset = 0); } }), - h(_class34, "DOMSelectionState"), + (() => { + a(_class34, "DOMSelectionState"); + })(), _class34), - pr = null; - function Gg(r) { - if (r.setActive) return r.setActive(); - if (pr) return r.focus(pr); + or = null; + function Mg(i) { + if (i.setActive) return i.setActive(); + if (or) return i.focus(or); var e = []; - for (var t = r; t && (e.push(t, t.scrollTop, t.scrollLeft), t != t.ownerDocument); t = t.parentNode); + for (var t = i; t && (e.push(t, t.scrollTop, t.scrollLeft), t != t.ownerDocument); t = t.parentNode); if ( - (r.focus( - pr == null + (i.focus( + or == null ? { get preventScroll() { - return (pr = { preventScroll: !0 }), !0; + return (or = { preventScroll: !0 }), !0; }, } - : void 0, + : void 0 ), - !pr) + !or) ) { - pr = !1; + or = !1; for (var t1 = 0; t1 < e.length; ) { - var i = e[t1++], + var r = e[t1++], n = e[t1++], s = e[t1++]; - i.scrollTop != n && (i.scrollTop = n), i.scrollLeft != s && (i.scrollLeft = s); + r.scrollTop != n && (r.scrollTop = n), r.scrollLeft != s && (r.scrollLeft = s); } } } - h(Gg, "focusPreventScroll"); - var dg; - function _i(r, e) { + a(Mg, "focusPreventScroll"); + var Z0; + function dr(i, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e; - var i = dg || (dg = document.createRange()); - return i.setEnd(r, t), i.setStart(r, e), i; - } - h(_i, "textRange"); - function Fr(r, e, t, i) { - var n = { key: e, code: e, keyCode: t, which: t, cancelable: !0 }; - var ref; - i && ((ref = i), (n.altKey = ref.altKey), (n.ctrlKey = ref.ctrlKey), (n.shiftKey = ref.shiftKey), (n.metaKey = ref.metaKey), ref); - var s = new KeyboardEvent("keydown", n); - (s.synthetic = !0), r.dispatchEvent(s); - var o = new KeyboardEvent("keyup", n); - return (o.synthetic = !0), r.dispatchEvent(o), s.defaultPrevented || o.defaultPrevented; - } - h(Fr, "dispatchKey"); - function tx(r) { - for (; r; ) { - if (r && (r.nodeType == 9 || (r.nodeType == 11 && r.host))) return r; - r = r.assignedSlot || r.parentNode; + var r = Z0 || (Z0 = document.createRange()); + return r.setEnd(i, t), r.setStart(i, e), r; + } + a(dr, "textRange"); + function cr(i, e, t) { + var r = { key: e, code: e, keyCode: t, which: t, cancelable: !0 }, + n = new KeyboardEvent("keydown", r); + (n.synthetic = !0), i.dispatchEvent(n); + var s = new KeyboardEvent("keyup", r); + return (s.synthetic = !0), i.dispatchEvent(s), n.defaultPrevented || s.defaultPrevented; + } + a(cr, "dispatchKey"); + function Pv(i) { + for (; i; ) { + if (i && (i.nodeType == 9 || (i.nodeType == 11 && i.host))) return i; + i = i.assignedSlot || i.parentNode; } return null; } - h(tx, "getRoot"); - function Xg(r) { - for (; r.attributes.length; ) r.removeAttributeNode(r.attributes[0]); + a(Pv, "getRoot"); + function $g(i) { + for (; i.attributes.length; ) i.removeAttributeNode(i.attributes[0]); } - h(Xg, "clearAttributes"); - function ix(r, e) { + a($g, "clearAttributes"); + function Lv(i, e) { var t = e.focusNode, - i = e.focusOffset; - if (!t || e.anchorNode != t || e.anchorOffset != i) return !1; - for (i = Math.min(i, Zt(t)); ; ) - if (i) { + r = e.focusOffset; + if (!t || e.anchorNode != t || e.anchorOffset != r) return !1; + for (r = Math.min(r, ri(t)); ; ) + if (r) { if (t.nodeType != 1) return !1; - var n = t.childNodes[i - 1]; - n.contentEditable == "false" ? i-- : ((t = n), (i = Zt(t))); + var n = t.childNodes[r - 1]; + n.contentEditable == "false" ? r-- : ((t = n), (r = ri(t))); } else { - if (t == r) return !0; - (i = Qi(t)), (t = t.parentNode); - } - } - h(ix, "atElementStart"); - function Kg(r) { - return r.scrollTop > Math.max(1, r.scrollHeight - r.clientHeight - 4); - } - h(Kg, "isScrolledToBottom"); - function Zg(r, e) { - for (var t = r, i = e; ; ) { - if (t.nodeType == 3 && i > 0) return { node: t, offset: i }; - if (t.nodeType == 1 && i > 0) { - if (t.contentEditable == "false") return null; - (t = t.childNodes[i - 1]), (i = Zt(t)); - } else if (t.parentNode && !lo(t)) (i = Qi(t)), (t = t.parentNode); - else return null; - } - } - h(Zg, "textNodeBefore"); - function eD(r, e) { - for (var t = r, i = e; ; ) { - if (t.nodeType == 3 && i < t.nodeValue.length) return { node: t, offset: i }; - if (t.nodeType == 1 && i < t.childNodes.length) { - if (t.contentEditable == "false") return null; - (t = t.childNodes[i]), (i = 0); - } else if (t.parentNode && !lo(t)) (i = Qi(t) + 1), (t = t.parentNode); - else return null; - } + if (t == i) return !0; + (r = Xs(t)), (t = t.parentNode); + } } - h(eD, "textNodeAfter"); - var ze = - ((_r21 = class r { + a(Lv, "atElementStart"); + var Ne = + ((_i20 = class i { static before(e, t) { - return new r(e.parentNode, Qi(e), t); + return new i(e.parentNode, Xs(e), t); } static after(e, t) { - return new r(e.parentNode, Qi(e) + 1, t); + return new i(e.parentNode, Xs(e) + 1, t); } constructor(e, t, ref) { - var i = ref === void 0 ? !0 : ref; - (this.node = e), (this.offset = t), (this.precise = i); + var r = ref === void 0 ? !0 : ref; + (this.node = e), (this.offset = t), (this.precise = r); } }), - h(_r21, "DOMPos"), - _r21), - Pa = [], - Fe = - ((_r22 = class r { + (() => { + a(_i20, "DOMPos"); + })(), + _i20), + Ma = [], + Ce = + ((_i21 = class i { get overrideDOMText() { return null; } @@ -10071,9 +9873,9 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - if (i == e) return t; - t += i.length + i.breakAfter; + var r = _step.value; + if (r == e) return t; + t += r.length + r.breakAfter; } } catch (err) { _didIteratorError = true; @@ -10098,8 +9900,8 @@ function _ts_generator(thisArg, body) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if (this.flags & 2) { - var i = this.dom, + if (this.dirty & 2) { + var r = this.dom, n = null, s; var _iteratorNormalCompletion1 = true, @@ -10108,15 +9910,15 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { var o = _step.value; - if (o.flags & 7) { - if (!o.dom && (s = n ? n.nextSibling : i.firstChild)) { - var l = r.get(s); - (!l || (!l.parent && l.canReuseDOM(o))) && o.reuseDOM(s); + if (o.dirty) { + if (!o.dom && (s = n ? n.nextSibling : r.firstChild)) { + var u = i.get(s); + (!u || (!u.parent && u.canReuseDOM(o))) && o.reuseDOM(s); } - o.sync(e, t), (o.flags &= -8); + o.sync(e, t), (o.dirty = 0); } - if (((s = n ? n.nextSibling : i.firstChild), t && !t.written && t.node == i && s != o.dom && (t.written = !0), o.dom.parentNode == i)) for (; s && s != o.dom; ) s = pg(s); - else i.insertBefore(o.dom, s); + if (((s = n ? n.nextSibling : r.firstChild), t && !t.written && t.node == r && s != o.dom && (t.written = !0), o.dom.parentNode == r)) for (; s && s != o.dom; ) s = eg(s); + else r.insertBefore(o.dom, s); n = o.dom; } } catch (err) { @@ -10133,12 +9935,12 @@ function _ts_generator(thisArg, body) { } } } - for (s = n ? n.nextSibling : i.firstChild, s && t && t.node == i && (t.written = !0); s; ) s = pg(s); - } else if (this.flags & 1) + for (s = n ? n.nextSibling : r.firstChild, s && t && t.node == r && (t.written = !0); s; ) s = eg(s); + } else if (this.dirty & 1) try { for (var _iterator1 = this.children[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { - var i1 = _step1.value; - i1.flags & 7 && (i1.sync(e, t), (i1.flags &= -8)); + var r1 = _step1.value; + r1.dirty && (r1.sync(e, t), (r1.dirty = 0)); } } catch (err) { _didIteratorError = true; @@ -10157,59 +9959,59 @@ function _ts_generator(thisArg, body) { } reuseDOM(e) {} localPosFromDOM(e, t) { - var i; - if (e == this.dom) i = this.dom.childNodes[t]; + var r; + if (e == this.dom) r = this.dom.childNodes[t]; else { - var n = Zt(e) == 0 ? 0 : t == 0 ? -1 : 1; + var n = ri(e) == 0 ? 0 : t == 0 ? -1 : 1; for (;;) { var s = e.parentNode; if (s == this.dom) break; n == 0 && s.firstChild != s.lastChild && (e == s.firstChild ? (n = -1) : (n = 1)), (e = s); } - n < 0 ? (i = e) : (i = e.nextSibling); + n < 0 ? (r = e) : (r = e.nextSibling); } - if (i == this.dom.firstChild) return 0; - for (; i && !r.get(i); ) i = i.nextSibling; - if (!i) return this.length; + if (r == this.dom.firstChild) return 0; + for (; r && !i.get(r); ) r = r.nextSibling; + if (!r) return this.length; for (var n1 = 0, s1 = 0; ; n1++) { var o = this.children[n1]; - if (o.dom == i) return s1; + if (o.dom == r) return s1; s1 += o.length + o.breakAfter; } } domBoundsAround(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; var n = -1, s = -1, o = -1, - l = -1; - for (var u = 0, a = i, c = i; u < this.children.length; u++) { - var f = this.children[u], - d = a + f.length; - if (a < e && d > t) return f.domBoundsAround(e, t, a); - if ((d >= e && n == -1 && ((n = u), (s = a)), a > t && f.dom.parentNode == this.dom)) { - (o = u), (l = c); + u = -1; + for (var l = 0, h = r, c = r; l < this.children.length; l++) { + var f = this.children[l], + d = h + f.length; + if (h < e && d > t) return f.domBoundsAround(e, t, h); + if ((d >= e && n == -1 && ((n = l), (s = h)), h > t && f.dom.parentNode == this.dom)) { + (o = l), (u = c); break; } - (c = d), (a = d + f.breakAfter); + (c = d), (h = d + f.breakAfter); } - return { from: s, to: l < 0 ? i + this.length : l, startDOM: (n ? this.children[n - 1].dom.nextSibling : null) || this.dom.firstChild, endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null }; + return { from: s, to: u < 0 ? r + this.length : u, startDOM: (n ? this.children[n - 1].dom.nextSibling : null) || this.dom.firstChild, endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null }; } markDirty() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1; - (this.flags |= 2), this.markParentsDirty(e); + (this.dirty |= 2), this.markParentsDirty(e); } markParentsDirty(e) { for (var t = this.parent; t; t = t.parent) { - if ((e && (t.flags |= 2), t.flags & 1)) return; - (t.flags |= 1), (e = !1); + if ((e && (t.dirty |= 2), t.dirty & 1)) return; + (t.dirty |= 1), (e = !1); } } setParent(e) { - this.parent != e && ((this.parent = e), this.flags & 7 && this.markParentsDirty(!0)); + this.parent != e && ((this.parent = e), this.dirty && this.markParentsDirty(!0)); } setDOM(e) { - this.dom != e && (this.dom && (this.dom.cmView = null), (this.dom = e), (e.cmView = this)); + this.dom && (this.dom.cmView = null), (this.dom = e), (e.cmView = this); } get rootView() { for (var e = this; ; ) { @@ -10219,14 +10021,14 @@ function _ts_generator(thisArg, body) { } } replaceChildren(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Pa; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ma; this.markDirty(); for (var n = e; n < t; n++) { var s = this.children[n]; - s.parent == this && i.indexOf(s) < 0 && s.destroy(); + s.parent == this && s.destroy(); } - this.children.splice(e, t - e, ...i); - for (var n1 = 0; n1 < i.length; n1++) i[n1].setParent(this); + this.children.splice(e, t - e, ...r); + for (var n1 = 0; n1 < r.length; n1++) r[n1].setParent(this); } ignoreMutation(e) { return !1; @@ -10236,7 +10038,7 @@ function _ts_generator(thisArg, body) { } childCursor() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.length; - return new uo(this.children, e, this.children.length); + return new Qs(this.children, e, this.children.length); } childPos(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; @@ -10258,104 +10060,86 @@ function _ts_generator(thisArg, body) { get isHidden() { return !1; } - merge(e, t, i, n, s, o) { + merge(e, t, r, n, s, o) { return !1; } become(e) { return !1; } canReuseDOM(e) { - return e.constructor == this.constructor && !((this.flags | e.flags) & 8); + return e.constructor == this.constructor; } getSide() { return 0; } destroy() { - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var e = _step.value; - e.parent == this && e.destroy(); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } this.parent = null; } constructor() { - (this.parent = null), (this.dom = null), (this.flags = 2); + (this.parent = null), (this.dom = null), (this.dirty = 2); } }), - h(_r22, "ContentView"), - _r22); - Fe.prototype.breakAfter = 0; - function pg(r) { - var e = r.nextSibling; - return r.parentNode.removeChild(r), e; - } - h(pg, "rm$1"); - var uo = + (() => { + a(_i21, "ContentView"); + })(), + _i21); + Ce.prototype.breakAfter = 0; + function eg(i) { + var e = i.nextSibling; + return i.parentNode.removeChild(i), e; + } + a(eg, "rm$1"); + var Qs = ((_class35 = class _class { findPos(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; for (;;) { if (e > this.pos || (e == this.pos && (t > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))) return (this.off = e - this.pos), this; - var i = this.children[--this.i]; - this.pos -= i.length + i.breakAfter; + var r = this.children[--this.i]; + this.pos -= r.length + r.breakAfter; } } - constructor(e, t, i) { - (this.children = e), (this.pos = t), (this.i = i), (this.off = 0); + constructor(e, t, r) { + (this.children = e), (this.pos = t), (this.i = r), (this.off = 0); } }), - h(_class35, "ChildCursor"), + (() => { + a(_class35, "ChildCursor"); + })(), _class35); - function tD(r, e, t, i, n, s, o, l, u) { - var a = r.children, - c = a.length ? a[e] : null, + function Pg(i, e, t, r, n, s, o, u, l) { + var h = i.children, + c = h.length ? h[e] : null, f = s.length ? s[s.length - 1] : null, d = f ? f.breakAfter : o; - if (!(e == i && c && !o && !d && s.length < 2 && c.merge(t, n, s.length ? f : null, t == 0, l, u))) { - if (i < a.length) { - var p = a[i]; - p && (n < p.length || (p.breakAfter && (f === null || f === void 0 ? void 0 : f.breakAfter))) ? (e == i && ((p = p.split(n)), (n = 0)), !d && f && p.merge(0, n, f, !0, 0, u) ? (s[s.length - 1] = p) : ((n || (p.children.length && !p.children[0].length)) && p.merge(0, n, null, !1, 0, u), s.push(p))) : (p === null || p === void 0 ? void 0 : p.breakAfter) && (f ? (f.breakAfter = 1) : (o = 1)), - i++; - } - for (c && ((c.breakAfter = o), t > 0 && (!o && s.length && c.merge(t, c.length, s[0], !1, l, 0) ? (c.breakAfter = s.shift().breakAfter) : (t < c.length || (c.children.length && c.children[c.children.length - 1].length == 0)) && c.merge(t, c.length, null, !1, l, 0), e++)); e < i && s.length; ) - if (a[i - 1].become(s[s.length - 1])) i--, s.pop(), (u = s.length ? 0 : l); - else if (a[e].become(s[0])) e++, s.shift(), (l = s.length ? 0 : u); + if (!(e == r && c && !o && !d && s.length < 2 && c.merge(t, n, s.length ? f : null, t == 0, u, l))) { + if (r < h.length) { + var _p; + var p = h[r]; + p && n < p.length ? (e == r && ((p = p.split(n)), (n = 0)), !d && f && p.merge(0, n, f, !0, 0, l) ? (s[s.length - 1] = p) : (n && p.merge(0, n, null, !1, 0, l), s.push(p))) : ((_p = p) === null || _p === void 0 ? void 0 : _p.breakAfter) && (f ? (f.breakAfter = 1) : (o = 1)), r++; + } + for (c && ((c.breakAfter = o), t > 0 && (!o && s.length && c.merge(t, c.length, s[0], !1, u, 0) ? (c.breakAfter = s.shift().breakAfter) : (t < c.length || (c.children.length && c.children[c.children.length - 1].length == 0)) && c.merge(t, c.length, null, !1, u, 0), e++)); e < r && s.length; ) + if (h[r - 1].become(s[s.length - 1])) r--, s.pop(), (l = s.length ? 0 : u); + else if (h[e].become(s[0])) e++, s.shift(), (u = s.length ? 0 : l); else break; - !s.length && e && i < a.length && !a[e - 1].breakAfter && a[i].merge(0, 0, a[e - 1], !1, l, u) && e--, (e < i || s.length) && r.replaceChildren(e, i, s); + !s.length && e && r < h.length && !h[e - 1].breakAfter && h[r].merge(0, 0, h[e - 1], !1, u, l) && e--, (e < r || s.length) && i.replaceChildren(e, r, s); } } - h(tD, "replaceRange"); - function iD(r, e, t, i, n, s) { - var o = r.childCursor(), + a(Pg, "replaceRange"); + function Lg(i, e, t, r, n, s) { + var o = i.childCursor(), _o_findPos = o.findPos(t, 1), - l = _o_findPos.i, - u = _o_findPos.off, + u = _o_findPos.i, + l = _o_findPos.off, _o_findPos1 = o.findPos(e, -1), - a = _o_findPos1.i, + h = _o_findPos1.i, c = _o_findPos1.off, f = e - t; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var d = _step.value; f += d.length; } @@ -10373,40 +10157,40 @@ function _ts_generator(thisArg, body) { } } } - (r.length += f), tD(r, a, c, l, u, i, 0, n, s); - } - h(iD, "mergeChildrenInto"); - var nt = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, - na = typeof document < "u" ? document : { documentElement: { style: {} } }, - sa = /Edge\/(\d+)/.exec(nt.userAgent), - rD = /MSIE \d/.test(nt.userAgent), - oa = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nt.userAgent), - Bo = !!(rD || oa || sa), - mg = !Bo && /gecko\/(\d+)/i.test(nt.userAgent), - Gu = !Bo && /Chrome\/(\d+)/.exec(nt.userAgent), - gg = "webkitFontSmoothing" in na.documentElement.style, - nD = !Bo && /Apple Computer/.test(nt.vendor), - Dg = nD && (/Mobile\/\w+/.test(nt.userAgent) || nt.maxTouchPoints > 2), + (i.length += f), Pg(i, h, c, u, l, r, 0, n, s); + } + a(Lg, "mergeChildrenInto"); + var Ze = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, + Kl = typeof document < "u" ? document : { documentElement: { style: {} } }, + Xl = /Edge\/(\d+)/.exec(Ze.userAgent), + qg = /MSIE \d/.test(Ze.userAgent), + Ql = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ze.userAgent), + go = !!(qg || Ql || Xl), + tg = !go && /gecko\/(\d+)/i.test(Ze.userAgent), + zl = !go && /Chrome\/(\d+)/.exec(Ze.userAgent), + ig = "webkitFontSmoothing" in Kl.documentElement.style, + Ig = !go && /Apple Computer/.test(Ze.vendor), + rg = Ig && (/Mobile\/\w+/.test(Ze.userAgent) || Ze.maxTouchPoints > 2), W = { - mac: Dg || /Mac/.test(nt.platform), - windows: /Win/.test(nt.platform), - linux: /Linux|X11/.test(nt.platform), - ie: Bo, - ie_version: rD ? na.documentMode || 6 : oa ? +oa[1] : sa ? +sa[1] : 0, - gecko: mg, - gecko_version: mg ? +(/Firefox\/(\d+)/.exec(nt.userAgent) || [0, 0])[1] : 0, - chrome: !!Gu, - chrome_version: Gu ? +Gu[1] : 0, - ios: Dg, - android: /Android\b/.test(nt.userAgent), - webkit: gg, - safari: nD, - webkit_version: gg ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0, - tabSize: na.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size", + mac: rg || /Mac/.test(Ze.platform), + windows: /Win/.test(Ze.platform), + linux: /Linux|X11/.test(Ze.platform), + ie: go, + ie_version: qg ? Kl.documentMode || 6 : Ql ? +Ql[1] : Xl ? +Xl[1] : 0, + gecko: tg, + gecko_version: tg ? +(/Firefox\/(\d+)/.exec(Ze.userAgent) || [0, 0])[1] : 0, + chrome: !!zl, + chrome_version: zl ? +zl[1] : 0, + ios: rg, + android: /Android\b/.test(Ze.userAgent), + webkit: ig, + safari: Ig, + webkit_version: ig ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0, + tabSize: Kl.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size", }, - rx = 256, - Rt = - ((_r23 = class r extends Fe { + qv = 256, + pr = + ((_i22 = class i extends Ce { get length() { return this.text.length; } @@ -10419,52 +10203,51 @@ function _ts_generator(thisArg, body) { reuseDOM(e) { e.nodeType == 3 && this.createDOM(e); } - merge(e, t, i) { - return this.flags & 8 || (i && (!(i instanceof r) || this.length - (t - e) + i.length > rx || i.flags & 8)) ? !1 : ((this.text = this.text.slice(0, e) + (i ? i.text : "") + this.text.slice(t)), this.markDirty(), !0); + merge(e, t, r) { + return r && (!(r instanceof i) || this.length - (t - e) + r.length > qv) ? !1 : ((this.text = this.text.slice(0, e) + (r ? r.text : "") + this.text.slice(t)), this.markDirty(), !0); } split(e) { - var t = new r(this.text.slice(e)); - return (this.text = this.text.slice(0, e)), this.markDirty(), (t.flags |= this.flags & 8), t; + var t = new i(this.text.slice(e)); + return (this.text = this.text.slice(0, e)), this.markDirty(), t; } localPosFromDOM(e, t) { return e == this.dom ? t : t ? this.text.length : 0; } domAtPos(e) { - return new ze(this.dom, e); + return new Ne(this.dom, e); } - domBoundsAround(e, t, i) { - return { from: i, to: i + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling }; + domBoundsAround(e, t, r) { + return { from: r, to: r + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling }; } coordsAt(e, t) { - return nx(this.dom, e, t); + return Jl(this.dom, e, t); } constructor(e) { super(), (this.text = e); } }), - h(_r23, "TextView"), - _r23), - ui = - ((_r24 = class r extends Fe { + (() => { + a(_i22, "TextView"); + })(), + _i22), + ni = + ((_i23 = class i extends Ce { setAttrs(e) { - if ((Xg(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)) for (var t in this.mark.attrs) e.setAttribute(t, this.mark.attrs[t]); + if (($g(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)) for (var t in this.mark.attrs) e.setAttribute(t, this.mark.attrs[t]); return e; } - canReuseDOM(e) { - return super.canReuseDOM(e) && !((this.flags | e.flags) & 8); - } reuseDOM(e) { - e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), (this.flags |= 6)); + e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), (this.dirty |= 6)); } sync(e, t) { - this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, t); + this.dom ? this.dirty & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, t); } - merge(e, t, i, n, s, o) { - return i && (!(i instanceof r && i.mark.eq(this.mark)) || (e && s <= 0) || (t < this.length && o <= 0)) ? !1 : (iD(this, e, t, i ? i.children.slice() : [], s - 1, o - 1), this.markDirty(), !0); + merge(e, t, r, n, s, o) { + return r && (!(r instanceof i && r.mark.eq(this.mark)) || (e && s <= 0) || (t < this.length && o <= 0)) ? !1 : (Lg(this, e, t, r ? r.children : [], s - 1, o - 1), this.markDirty(), !0); } split(e) { var t = [], - i = 0, + r = 0, n = -1, s = 0; var _iteratorNormalCompletion = true, @@ -10472,9 +10255,9 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - var u = i + l.length; - u > e && t.push(i < e ? l.split(e - i) : l), n < 0 && i >= e && (n = s), (i = u), s++; + var u = _step.value; + var l = r + u.length; + l > e && t.push(r < e ? u.split(e - r) : u), n < 0 && r >= e && (n = s), (r = l), s++; } } catch (err) { _didIteratorError = true; @@ -10491,18 +10274,18 @@ function _ts_generator(thisArg, body) { } } var o = this.length - e; - return (this.length = e), n > -1 && ((this.children.length = n), this.markDirty()), new r(this.mark, t, o); + return (this.length = e), n > -1 && ((this.children.length = n), this.markDirty()), new i(this.mark, t, o); } domAtPos(e) { - return sD(this, e); + return Hg(this, e); } coordsAt(e, t) { - return lD(this, e, t); + return jg(this, e, t); } constructor(e, ref, ref1) { var t = ref === void 0 ? [] : ref, - i = ref1 === void 0 ? 0 : ref1; - super(), (this.mark = e), (this.children = t), (this.length = i); + r = ref1 === void 0 ? 0 : ref1; + super(), (this.mark = e), (this.children = t), (this.length = r); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -10527,41 +10310,43 @@ function _ts_generator(thisArg, body) { } } }), - h(_r24, "MarkView"), - _r24); - function nx(r, e, t) { - var i = r.nodeValue.length; - e > i && (e = i); + (() => { + a(_i23, "MarkView"); + })(), + _i23); + function Jl(i, e, t) { + var r = i.nodeValue.length; + e > r && (e = r); var n = e, s = e, o = 0; - (e == 0 && t < 0) || (e == i && t >= 0) ? W.chrome || W.gecko || (e ? (n--, (o = 1)) : s < i && (s++, (o = -1))) : t < 0 ? n-- : s < i && s++; - var l = _i(r, n, s).getClientRects(); - if (!l.length) return null; - var u = l[(o ? o < 0 : t >= 0) ? 0 : l.length - 1]; - return W.safari && !o && u.width == 0 && (u = Array.prototype.find.call(l, (a) => a.width) || u), o ? Ma(u, o < 0) : u || null; - } - h(nx, "textCoords"); - var Dn = - ((_r25 = class r extends Fe { - static create(e, t, i) { - return new r(e, t, i); + (e == 0 && t < 0) || (e == r && t >= 0) ? W.chrome || W.gecko || (e ? (n--, (o = 1)) : s < r && (s++, (o = -1))) : t < 0 ? n-- : s < r && s++; + var u = dr(i, n, s).getClientRects(); + if (!u.length) return null; + var l = u[(o ? o < 0 : t >= 0) ? 0 : u.length - 1]; + return W.safari && !o && l.width == 0 && (l = Array.prototype.find.call(u, (h) => h.width) || l), o ? Ra(l, o < 0) : l || null; + } + a(Jl, "textCoords"); + var on = + ((_i24 = class i extends Ce { + static create(e, t, r) { + return new (e.customView || i)(e, t, r); } split(e) { - var t = r.create(this.widget, this.length - e, this.side); + var t = i.create(this.widget, this.length - e, this.side); return (this.length -= e), t; } sync(e) { - (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), (this.prevWidget = null), this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false")); + (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), (this.prevWidget = null), this.setDOM(this.widget.toDOM(e)), (this.dom.contentEditable = "false")); } getSide() { return this.side; } - merge(e, t, i, n, s, o) { - return i && (!(i instanceof r) || !this.widget.compare(i.widget) || (e > 0 && s <= 0) || (t < this.length && o <= 0)) ? !1 : ((this.length = e + (i ? i.length : 0) + (this.length - t)), !0); + merge(e, t, r, n, s, o) { + return r && (!(r instanceof i) || !this.widget.compare(r.widget) || (e > 0 && s <= 0) || (t < this.length && o <= 0)) ? !1 : ((this.length = e + (r ? r.length : 0) + (this.length - t)), !0); } become(e) { - return e instanceof r && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), (this.widget = e.widget), (this.length = e.length), !0) : !1; + return e instanceof i && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), (this.widget = e.widget), (this.length = e.length), !0) : !1; } ignoreMutation() { return !0; @@ -10570,29 +10355,29 @@ function _ts_generator(thisArg, body) { return this.widget.ignoreEvent(e); } get overrideDOMText() { - if (this.length == 0) return fe.empty; + if (this.length == 0) return de.empty; var e = this; for (; e.parent; ) e = e.parent; var t = e.view, - i = t && t.state.doc, + r = t && t.state.doc, n = this.posAtStart; - return i ? i.slice(n, n + this.length) : fe.empty; + return r ? r.slice(n, n + this.length) : de.empty; } domAtPos(e) { - return (this.length ? e == 0 : this.side > 0) ? ze.before(this.dom) : ze.after(this.dom, e == this.length); + return (this.length ? e == 0 : this.side > 0) ? Ne.before(this.dom) : Ne.after(this.dom, e == this.length); } domBoundsAround() { return null; } coordsAt(e, t) { - var i = this.widget.coordsAt(this.dom, e, t); - if (i) return i; + var r = this.widget.coordsAt(this.dom, e, t); + if (r) return r; var n = this.dom.getClientRects(), s = null; if (!n.length) return null; var o = this.side ? this.side < 0 : e > 0; - for (var l = o ? n.length - 1 : 0; (s = n[l]), !(e > 0 ? l == 0 : l == n.length - 1 || s.top < s.bottom); l += o ? -1 : 1); - return Ma(s, !o); + for (var u = o ? n.length - 1 : 0; (s = n[u]), !(e > 0 ? u == 0 : u == n.length - 1 || s.top < s.bottom); u += o ? -1 : 1); + return Ra(s, !o); } get isEditable() { return !1; @@ -10606,133 +10391,266 @@ function _ts_generator(thisArg, body) { destroy() { super.destroy(), this.dom && this.widget.destroy(this.dom); } - constructor(e, t, i) { - super(), (this.widget = e), (this.length = t), (this.side = i), (this.prevWidget = null); + constructor(e, t, r) { + super(), (this.widget = e), (this.length = t), (this.side = r), (this.prevWidget = null); } }), - h(_r25, "WidgetView"), - _r25), - Fn = - ((_r26 = class r extends Fe { - get length() { - return 0; - } - merge() { - return !1; - } - become(e) { - return e instanceof r && e.side == this.side; - } - split() { - return new r(this.side); + (() => { + a(_i24, "WidgetView"); + })(), + _i24), + Js = + ((_class36 = class _class extends on { + domAtPos(e) { + var _this_widget = this.widget, + t = _this_widget.topView, + r = _this_widget.text; + return t + ? Zl( + e, + 0, + t, + r, + this.length - t.length, + (n, s) => n.domAtPos(s), + (n, s) => new Ne(n, Math.min(s, n.nodeValue.length)) + ) + : new Ne(r, Math.min(e, r.nodeValue.length)); } sync() { - if (!this.dom) { - var e = document.createElement("img"); - (e.className = "cm-widgetBuffer"), e.setAttribute("aria-hidden", "true"), this.setDOM(e); - } - } - getSide() { - return this.side; + this.setDOM(this.widget.toDOM()); } - domAtPos(e) { - return this.side > 0 ? ze.before(this.dom) : ze.after(this.dom); + localPosFromDOM(e, t) { + var _this_widget = this.widget, + r = _this_widget.topView, + n = _this_widget.text; + return r ? Vg(e, t, r, n, this.length - r.length) : Math.min(t, this.length); } - localPosFromDOM() { - return 0; + ignoreMutation() { + return !1; } - domBoundsAround() { + get overrideDOMText() { return null; } - coordsAt(e) { - return this.dom.getBoundingClientRect(); + coordsAt(e, t) { + var _this_widget = this.widget, + r = _this_widget.topView, + n = _this_widget.text; + return r + ? Zl( + e, + t, + r, + n, + this.length - r.length, + (s, o, u) => s.coordsAt(o, u), + (s, o, u) => Jl(s, o, u) + ) + : Jl(n, e, t); } - get overrideDOMText() { - return fe.empty; + destroy() { + var e; + super.destroy(), (e = this.widget.topView) === null || e === void 0 || e.destroy(); } - get isHidden() { + get isEditable() { return !0; } - constructor(e) { - super(), (this.side = e); + canReuseDOM() { + return !0; } }), - h(_r26, "WidgetBufferView"), - _r26); - Rt.prototype.children = Dn.prototype.children = Fn.prototype.children = Pa; - function sD(r, e) { - var t = r.dom, - i = r.children, + (() => { + a(_class36, "CompositionView"); + })(), + _class36); + function Zl(i, e, t, r, n, s, o) { + if (t instanceof ni) { + for (var u = t.dom.firstChild; u; u = u.nextSibling) { + var l = Ce.get(u); + if (l) { + var h = fr(u, r), + c = l.length + (h ? n : 0); + if (i < c || (i == c && l.getSide() <= 0)) return h ? Zl(i, e, l, r, n, s, o) : s(l, i, e); + i -= c; + } else { + var h1 = Ng(i, e, u, o); + if (typeof h1 != "number") return h1; + i = h1; + } + } + return s(t, t.length, -1); + } else return t.dom == r ? o(r, i, e) : s(t, i, e); + } + a(Zl, "scanCompositionTree"); + function Ng(i, e, t, r) { + if (t.nodeType == 3) { + var n = t.nodeValue.length; + if (i <= n) return r(t, i, e); + i -= n; + } else if (t.nodeType == 1 && t.contentEditable != "false") + for (var n1 = t.firstChild; n1; n1 = n1.nextSibling) { + var s = Ng(i, e, n1, r); + if (typeof s != "number") return s; + i = s; + } + return i; + } + a(Ng, "scanCompositionNode"); + function Vg(i, e, t, r, n) { + if (t instanceof ni) { + var s = 0; + for (var o = t.dom.firstChild; o; o = o.nextSibling) { + var u = Ce.get(o); + if (u) { + var l = fr(o, r); + if (fr(o, i)) return s + (l ? Vg(i, e, u, r, n) : u.localPosFromDOM(i, e)); + s += u.length + (l ? n : 0); + } else { + var l1 = zg(i, e, o); + if (l1.result != null) return s + l1.result; + s += l1.size; + } + } + } else if (t.dom == r) return Math.min(e, r.nodeValue.length); + return t.localPosFromDOM(i, e); + } + a(Vg, "posFromDOMInCompositionTree"); + function zg(i, e, t) { + if (t.nodeType == 3) return i == t ? { result: e } : { size: t.nodeValue.length }; + if (t.nodeType == 1 && t.contentEditable != "false") { + var r = 0; + for (var n = t.firstChild, s = 0; ; n = n.nextSibling, s++) { + if (i == t && s == e) return { result: r }; + if (!n) return { size: r }; + var o = zg(i, e, n); + if (o.result != null) return { result: e + o.result }; + r += o.size; + } + } else return t.contains(i) ? { result: 0 } : { size: 0 }; + } + a(zg, "posFromDOMInOpaqueNode"); + var un = + ((_i25 = class i extends Ce { + get length() { + return 0; + } + merge() { + return !1; + } + become(e) { + return e instanceof i && e.side == this.side; + } + split() { + return new i(this.side); + } + sync() { + if (!this.dom) { + var e = document.createElement("img"); + (e.className = "cm-widgetBuffer"), e.setAttribute("aria-hidden", "true"), this.setDOM(e); + } + } + getSide() { + return this.side; + } + domAtPos(e) { + return this.side > 0 ? Ne.before(this.dom) : Ne.after(this.dom); + } + localPosFromDOM() { + return 0; + } + domBoundsAround() { + return null; + } + coordsAt(e) { + return this.dom.getBoundingClientRect(); + } + get overrideDOMText() { + return de.empty; + } + get isHidden() { + return !0; + } + constructor(e) { + super(), (this.side = e); + } + }), + (() => { + a(_i25, "WidgetBufferView"); + })(), + _i25); + pr.prototype.children = on.prototype.children = un.prototype.children = Ma; + function Hg(i, e) { + var t = i.dom, + r = i.children, n = 0; - for (var s = 0; n < i.length; n++) { - var o = i[n], - l = s + o.length; - if (!(l == s && o.getSide() <= 0)) { - if (e > s && e < l && o.dom.parentNode == t) return o.domAtPos(e - s); + for (var s = 0; n < r.length; n++) { + var o = r[n], + u = s + o.length; + if (!(u == s && o.getSide() <= 0)) { + if (e > s && e < u && o.dom.parentNode == t) return o.domAtPos(e - s); if (e <= s) break; - s = l; + s = u; } } for (var s1 = n; s1 > 0; s1--) { - var o1 = i[s1 - 1]; + var o1 = r[s1 - 1]; if (o1.dom.parentNode == t) return o1.domAtPos(o1.length); } - for (var s2 = n; s2 < i.length; s2++) { - var o2 = i[s2]; + for (var s2 = n; s2 < r.length; s2++) { + var o2 = r[s2]; if (o2.dom.parentNode == t) return o2.domAtPos(0); } - return new ze(t, 0); + return new Ne(t, 0); } - h(sD, "inlineDOMAtPos"); - function oD(r, e, t) { - var i, - n = r.children; - t > 0 && e instanceof ui && n.length && (i = n[n.length - 1]) instanceof ui && i.mark.eq(e.mark) ? oD(i, e.children[0], t - 1) : (n.push(e), e.setParent(r)), (r.length += e.length); + a(Hg, "inlineDOMAtPos"); + function Wg(i, e, t) { + var r, + n = i.children; + t > 0 && e instanceof ni && n.length && (r = n[n.length - 1]) instanceof ni && r.mark.eq(e.mark) ? Wg(r, e.children[0], t - 1) : (n.push(e), e.setParent(i)), (i.length += e.length); } - h(oD, "joinInlineInto"); - function lD(r, e, t) { - var i = null, + a(Wg, "joinInlineInto"); + function jg(i, e, t) { + var r = null, n = -1, s = null, o = -1; - function l(a, c) { - for (var f = 0, d = 0; f < a.children.length && d <= c; f++) { - var p = a.children[f], + function u(h, c) { + for (var f = 0, d = 0; f < h.children.length && d <= c; f++) { + var p = h.children[f], m = d + p.length; - m >= c && (p.children.length ? l(p, c - d) : (!s || (s.isHidden && t > 0)) && (m > c || (d == m && p.getSide() > 0)) ? ((s = p), (o = c - d)) : (d < c || (d == m && p.getSide() < 0 && !p.isHidden)) && ((i = p), (n = c - d))), (d = m); + m >= c && (p.children.length ? u(p, c - d) : (!s || (s.isHidden && t > 0)) && (m > c || (d == m && p.getSide() > 0)) ? ((s = p), (o = c - d)) : (d < c || (d == m && p.getSide() < 0 && !p.isHidden)) && ((r = p), (n = c - d))), (d = m); } } - h(l, "scan"), l(r, e); - var u = (t < 0 ? i : s) || i || s; - return u ? u.coordsAt(Math.max(0, u == i ? n : o), t) : sx(r); - } - h(lD, "coordsInChildren"); - function sx(r) { - var e = r.dom.lastChild; - if (!e) return r.dom.getBoundingClientRect(); - var t = gn(e); + a(u, "scan"), u(i, e); + var l = (t < 0 ? r : s) || r || s; + return l ? l.coordsAt(Math.max(0, l == r ? n : o), t) : Iv(i); + } + a(jg, "coordsInChildren"); + function Iv(i) { + var e = i.dom.lastChild; + if (!e) return i.dom.getBoundingClientRect(); + var t = sn(e); return t[t.length - 1] || null; } - h(sx, "fallbackRect"); - function la(r, e) { - for (var t in r) t == "class" && e.class ? (e.class += " " + r.class) : t == "style" && e.style ? (e.style += ";" + r.style) : (e[t] = r[t]); + a(Iv, "fallbackRect"); + function ea(i, e) { + for (var t in i) t == "class" && e.class ? (e.class += " " + i.class) : t == "style" && e.style ? (e.style += ";" + i.style) : (e[t] = i[t]); return e; } - h(la, "combineAttrs"); - var Fg = Object.create(null); - function Ia(r, e, t) { - if (r == e) return !0; - r || (r = Fg), e || (e = Fg); - var i = Object.keys(r), - n = Object.keys(e); - if (i.length - (t && i.indexOf(t) > -1 ? 1 : 0) != n.length - (t && n.indexOf(t) > -1 ? 1 : 0)) return !1; + a(ea, "combineAttrs"); + function $a(i, e) { + if (i == e) return !0; + if (!i || !e) return !1; + var t = Object.keys(i), + r = Object.keys(e); + if (t.length != r.length) return !1; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var s = _step.value; - if (s != t && (n.indexOf(s) == -1 || r[s] !== e[s])) return !1; + for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var n = _step.value; + if (r.indexOf(n) == -1 || i[n] !== e[n]) return !1; } } catch (err) { _didIteratorError = true; @@ -10750,87 +10668,246 @@ function _ts_generator(thisArg, body) { } return !0; } - h(Ia, "attrsEq"); - function ua(r, e, t) { - var i = !1; - if (e) for (var n in e) (t && n in t) || ((i = !0), n == "style" ? (r.style.cssText = "") : r.removeAttribute(n)); - if (t) for (var n1 in t) (e && e[n1] == t[n1]) || ((i = !0), n1 == "style" ? (r.style.cssText = t[n1]) : r.setAttribute(n1, t[n1])); - return i; - } - h(ua, "updateAttrs"); - function ox(r) { - var e = Object.create(null); - for (var t = 0; t < r.attributes.length; t++) { - var i = r.attributes[t]; - e[i.name] = i.value; - } - return e; + a($a, "attrsEq"); + function ta(i, e, t) { + var r = null; + if (e) for (var n in e) (t && n in t) || i.removeAttribute((r = n)); + if (t) for (var n1 in t) (e && e[n1] == t[n1]) || i.setAttribute((r = n1), t[n1]); + return !!r; } - h(ox, "getAttrs"); - var Re = - ((_r27 = class r extends Fe { - merge(e, t, i, n, s, o) { - if (i) { - if (!(i instanceof r)) return !1; - this.dom || i.transferDOM(this); - } - return n && this.setDeco(i ? i.attrs : null), iD(this, e, t, i ? i.children.slice() : [], s, o), !0; + a(ta, "updateAttrs"); + var Ut = + ((_class37 = class _class { + eq(e) { + return !1; } - split(e) { - var t = new r(); - if (((t.breakAfter = this.breakAfter), this.length == 0)) return t; - var _this_childPos = this.childPos(e), - i = _this_childPos.i, - n = _this_childPos.off; - n && (t.append(this.children[i].split(n), 0), this.children[i].merge(n, this.children[i].length, null, !1, 0, 0), i++); - for (var s = i; s < this.children.length; s++) t.append(this.children[s], 0); - for (; i > 0 && this.children[i - 1].length == 0; ) this.children[--i].destroy(); - return (this.children.length = i), this.markDirty(), (this.length = e), t; + updateDOM(e, t) { + return !1; } - transferDOM(e) { - this.dom && (this.markDirty(), e.setDOM(this.dom), (e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs), (this.prevAttrs = void 0), (this.dom = null)); + compare(e) { + return this == e || (this.constructor == e.constructor && this.eq(e)); } - setDeco(e) { - Ia(this.attrs, e) || (this.dom && ((this.prevAttrs = this.attrs), this.markDirty()), (this.attrs = e)); + get estimatedHeight() { + return -1; } - append(e, t) { - oD(this, e, t); + get lineBreaks() { + return 0; } - addLineDeco(e) { - var t = e.spec.attributes, - i = e.spec.class; - t && (this.attrs = la(t, this.attrs || {})), i && (this.attrs = la({ class: i }, this.attrs || {})); + ignoreEvent(e) { + return !0; } - domAtPos(e) { - return sD(this, e); + coordsAt(e, t, r) { + return null; } - reuseDOM(e) { - e.nodeName == "DIV" && (this.setDOM(e), (this.flags |= 6)); + get customView() { + return null; } - sync(e, t) { - var i; - this.dom ? this.flags & 4 && (Xg(this.dom), (this.dom.className = "cm-line"), (this.prevAttrs = this.attrs ? null : void 0)) : (this.setDOM(document.createElement("div")), (this.dom.className = "cm-line"), (this.prevAttrs = this.attrs ? null : void 0)), - this.prevAttrs !== void 0 && (ua(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), (this.prevAttrs = void 0)), - super.sync(e, t); - var n = this.dom.lastChild; - for (; n && Fe.get(n) instanceof ui; ) n = n.lastChild; - if (!n || !this.length || (n.nodeName != "BR" && ((i = Fe.get(n)) === null || i === void 0 ? void 0 : i.isEditable) == !1 && (!W.ios || !this.children.some((s) => s instanceof Rt)))) { - var s = document.createElement("BR"); - (s.cmIgnore = !0), this.dom.appendChild(s); - } + get isHidden() { + return !1; } - measureTextSize() { - if (this.children.length == 0 || this.length > 20) return null; - var e = 0, - t; - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { + destroy(e) {} + }), + (() => { + a(_class37, "WidgetType"); + })(), + _class37), + xe = (function (i) { + return (i[(i.Text = 0)] = "Text"), (i[(i.WidgetBefore = 1)] = "WidgetBefore"), (i[(i.WidgetAfter = 2)] = "WidgetAfter"), (i[(i.WidgetRange = 3)] = "WidgetRange"), i; + })(xe || (xe = {})), + he = + ((_class38 = class _class extends Ht { + get heightRelevant() { + return !1; + } + static mark(e) { + return new Zs(e); + } + static widget(e) { + var t = Math.max(-1e4, Math.min(1e4, e.side || 0)), + r = !!e.block; + return (t += r ? (t > 0 ? 3e8 : -4e8) : t > 0 ? 1e8 : -1e8), new si(e, t, t, r, e.widget || null, !1); + } + static replace(e) { + var t = !!e.block, + r, + n; + if (e.isBlockGap) (r = -5e8), (n = 4e8); + else { + var _Ug = Ug(e, t), + s = _Ug.start, + o = _Ug.end; + (r = (s ? (t ? -3e8 : -1) : 5e8) - 1), (n = (o ? (t ? 2e8 : 1) : -6e8) + 1); + } + return new si(e, r, n, t, e.widget || null, !0); + } + static line(e) { + return new ln(e); + } + static set(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; + return Ee.of(e, t); + } + hasHeight() { + return this.widget ? this.widget.estimatedHeight > -1 : !1; + } + constructor(e, t, r, n) { + super(), (this.startSide = e), (this.endSide = t), (this.widget = r), (this.spec = n); + } + }), + (() => { + a(_class38, "Decoration"); + })(), + _class38); + he.none = Ee.empty; + var Zs = + ((_i26 = class i extends he { + eq(e) { + return this == e || (e instanceof i && this.tagName == e.tagName && this.class == e.class && $a(this.attrs, e.attrs)); + } + range(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; + if (e >= t) throw new RangeError("Mark decorations may not be empty"); + return super.range(e, t); + } + constructor(e) { + var _Ug = Ug(e), + t = _Ug.start, + r = _Ug.end; + super(t ? -1 : 5e8, r ? 1 : -6e8, null, e), (this.tagName = e.tagName || "span"), (this.class = e.class || ""), (this.attrs = e.attributes || null); + } + }), + (() => { + a(_i26, "MarkDecoration"); + })(), + _i26); + Zs.prototype.point = !1; + var ln = + ((_i27 = class i extends he { + eq(e) { + return e instanceof i && this.spec.class == e.spec.class && $a(this.spec.attributes, e.spec.attributes); + } + range(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; + if (t != e) throw new RangeError("Line decoration ranges must be zero-length"); + return super.range(e, t); + } + constructor(e) { + super(-2e8, -2e8, null, e); + } + }), + (() => { + a(_i27, "LineDecoration"); + })(), + _i27); + ln.prototype.mapMode = je.TrackBefore; + ln.prototype.point = !0; + var si = + ((_i28 = class i extends he { + get type() { + return this.startSide < this.endSide ? xe.WidgetRange : this.startSide <= 0 ? xe.WidgetBefore : xe.WidgetAfter; + } + get heightRelevant() { + return this.block || (!!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0)); + } + eq(e) { + return e instanceof i && Nv(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; + } + range(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; + if (this.isReplace && (e > t || (e == t && this.startSide > 0 && this.endSide <= 0))) throw new RangeError("Invalid range for replacement decoration"); + if (!this.isReplace && t != e) throw new RangeError("Widget decorations can only have zero-length ranges"); + return super.range(e, t); + } + constructor(e, t, r, n, s, o) { + super(t, r, s, e), (this.block = n), (this.isReplace = o), (this.mapMode = n ? (t <= 0 ? je.TrackBefore : je.TrackAfter) : je.TrackDel); + } + }), + (() => { + a(_i28, "PointDecoration"); + })(), + _i28); + si.prototype.point = !0; + function Ug(i) { + var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; + var t = i.inclusiveStart, + r = i.inclusiveEnd; + return t == null && (t = i.inclusive), r == null && (r = i.inclusive), { start: t !== null && t !== void 0 ? t : e, end: r !== null && r !== void 0 ? r : e }; + } + a(Ug, "getInclusive"); + function Nv(i, e) { + return i == e || !!(i && e && i.compare(e)); + } + a(Nv, "widgetsEq"); + function ia(i, e, t) { + var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; + var n = t.length - 1; + n >= 0 && t[n] + r >= i ? (t[n] = Math.max(t[n], e)) : t.push(i, e); + } + a(ia, "addRange"); + var at = + ((_i29 = class i extends Ce { + merge(e, t, r, n, s, o) { + if (r) { + if (!(r instanceof i)) return !1; + this.dom || r.transferDOM(this); + } + return n && this.setDeco(r ? r.attrs : null), Lg(this, e, t, r ? r.children : [], s, o), !0; + } + split(e) { + var t = new i(); + if (((t.breakAfter = this.breakAfter), this.length == 0)) return t; + var _this_childPos = this.childPos(e), + r = _this_childPos.i, + n = _this_childPos.off; + n && (t.append(this.children[r].split(n), 0), this.children[r].merge(n, this.children[r].length, null, !1, 0, 0), r++); + for (var s = r; s < this.children.length; s++) t.append(this.children[s], 0); + for (; r > 0 && this.children[r - 1].length == 0; ) this.children[--r].destroy(); + return (this.children.length = r), this.markDirty(), (this.length = e), t; + } + transferDOM(e) { + this.dom && (this.markDirty(), e.setDOM(this.dom), (e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs), (this.prevAttrs = void 0), (this.dom = null)); + } + setDeco(e) { + $a(this.attrs, e) || (this.dom && ((this.prevAttrs = this.attrs), this.markDirty()), (this.attrs = e)); + } + append(e, t) { + Wg(this, e, t); + } + addLineDeco(e) { + var t = e.spec.attributes, + r = e.spec.class; + t && (this.attrs = ea(t, this.attrs || {})), r && (this.attrs = ea({ class: r }, this.attrs || {})); + } + domAtPos(e) { + return Hg(this, e); + } + reuseDOM(e) { + e.nodeName == "DIV" && (this.setDOM(e), (this.dirty |= 6)); + } + sync(e, t) { + var r; + this.dom ? this.dirty & 4 && ($g(this.dom), (this.dom.className = "cm-line"), (this.prevAttrs = this.attrs ? null : void 0)) : (this.setDOM(document.createElement("div")), (this.dom.className = "cm-line"), (this.prevAttrs = this.attrs ? null : void 0)), + this.prevAttrs !== void 0 && (ta(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), (this.prevAttrs = void 0)), + super.sync(e, t); + var n = this.dom.lastChild; + for (; n && Ce.get(n) instanceof ni; ) n = n.lastChild; + if (!n || !this.length || (n.nodeName != "BR" && ((r = Ce.get(n)) === null || r === void 0 ? void 0 : r.isEditable) == !1 && (!W.ios || !this.children.some((s) => s instanceof pr)))) { + var s = document.createElement("BR"); + (s.cmIgnore = !0), this.dom.appendChild(s); + } + } + measureTextSize() { + if (this.children.length == 0 || this.length > 20) return null; + var e = 0, + t; + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; + try { for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - if (!(i instanceof Rt) || /[^ -~]/.test(i.text)) return null; - var n = gn(i.dom); + var r = _step.value; + if (!(r instanceof pr) || /[^ -~]/.test(r.text)) return null; + var n = sn(r.dom); if (n.length != 1) return null; (e += n[0].width), (t = n[0].height); } @@ -10851,30 +10928,30 @@ function _ts_generator(thisArg, body) { return e ? { lineHeight: this.dom.getBoundingClientRect().height, charWidth: e / this.length, textHeight: t } : null; } coordsAt(e, t) { - var i = lD(this, e, t); - if (!this.children.length && i && this.parent) { + var r = jg(this, e, t); + if (!this.children.length && r && this.parent) { var _this_parent_view_viewState = this.parent.view.viewState, n = _this_parent_view_viewState.heightOracle, - s = i.bottom - i.top; + s = r.bottom - r.top; if (Math.abs(s - n.lineHeight) < 2 && n.textHeight < s) { var o = (s - n.textHeight) / 2; - return { top: i.top + o, bottom: i.bottom - o, left: i.left, right: i.left }; + return { top: r.top + o, bottom: r.bottom - o, left: r.left, right: r.left }; } } - return i; + return r; } become(e) { return !1; } - covers() { - return !0; + get type() { + return xe.Text; } static find(e, t) { - for (var i = 0, n = 0; i < e.children.length; i++) { - var s = e.children[i], + for (var r = 0, n = 0; r < e.children.length; r++) { + var s = e.children[r], o = n + s.length; if (o >= t) { - if (s instanceof r) return s; + if (s instanceof i) return s; if (o > t) break; } n = o + s.breakAfter; @@ -10885,36 +10962,38 @@ function _ts_generator(thisArg, body) { super(...arguments), (this.children = []), (this.length = 0), (this.prevAttrs = void 0), (this.attrs = null), (this.breakAfter = 0); } }), - h(_r27, "LineView"), - _r27), - br = - ((_r28 = class r extends Fe { - merge(e, t, i, n, s, o) { - return i && (!(i instanceof r) || !this.widget.compare(i.widget) || (e > 0 && s <= 0) || (t < this.length && o <= 0)) ? !1 : ((this.length = e + (i ? i.length : 0) + (this.length - t)), !0); + (() => { + a(_i29, "LineView"); + })(), + _i29), + an = + ((_i30 = class i extends Ce { + merge(e, t, r, n, s, o) { + return r && (!(r instanceof i) || !this.widget.compare(r.widget) || (e > 0 && s <= 0) || (t < this.length && o <= 0)) ? !1 : ((this.length = e + (r ? r.length : 0) + (this.length - t)), !0); } domAtPos(e) { - return e == 0 ? ze.before(this.dom) : ze.after(this.dom, e == this.length); + return e == 0 ? Ne.before(this.dom) : Ne.after(this.dom, e == this.length); } split(e) { var t = this.length - e; this.length = e; - var i = new r(this.widget, t, this.deco); - return (i.breakAfter = this.breakAfter), i; + var r = new i(this.widget, t, this.type); + return (r.breakAfter = this.breakAfter), r; } get children() { - return Pa; + return Ma; } sync(e) { - (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), (this.prevWidget = null), this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false")); + (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), (this.prevWidget = null), this.setDOM(this.widget.toDOM(e)), (this.dom.contentEditable = "false")); } get overrideDOMText() { - return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : fe.empty; + return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : de.empty; } domBoundsAround() { return null; } become(e) { - return e instanceof r && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), (this.widget = e.widget), (this.length = e.length), (this.deco = e.deco), (this.breakAfter = e.breakAfter), !0) : !1; + return e instanceof i && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), (this.widget = e.widget), (this.length = e.length), (this.type = e.type), (this.breakAfter = e.breakAfter), !0) : !1; } ignoreMutation() { return !0; @@ -10934,253 +11013,94 @@ function _ts_generator(thisArg, body) { destroy() { super.destroy(), this.dom && this.widget.destroy(this.dom); } - covers(e) { - var _this_deco = this.deco, - t = _this_deco.startSide, - i = _this_deco.endSide; - return t == i ? !1 : e < 0 ? t < 0 : i > 0; - } - constructor(e, t, i) { - super(), (this.widget = e), (this.length = t), (this.deco = i), (this.breakAfter = 0), (this.prevWidget = null); - } - }), - h(_r28, "BlockWidgetView"), - _r28), - ai = - ((_class36 = class _class { - eq(e) { - return !1; - } - updateDOM(e, t) { - return !1; - } - compare(e) { - return this == e || (this.constructor == e.constructor && this.eq(e)); - } - get estimatedHeight() { - return -1; - } - get lineBreaks() { - return 0; - } - ignoreEvent(e) { - return !0; - } - coordsAt(e, t, i) { - return null; - } - get isHidden() { - return !1; - } - get editable() { - return !1; + constructor(e, t, r) { + super(), (this.widget = e), (this.length = t), (this.type = r), (this.breakAfter = 0), (this.prevWidget = null); } - destroy(e) {} }), - h(_class36, "WidgetType"), - _class36), - He = (function (r) { - return (r[(r.Text = 0)] = "Text"), (r[(r.WidgetBefore = 1)] = "WidgetBefore"), (r[(r.WidgetAfter = 2)] = "WidgetAfter"), (r[(r.WidgetRange = 3)] = "WidgetRange"), r; - })(He || (He = {})), - pe = - ((_class37 = class _class extends Gt { - get heightRelevant() { - return !1; - } - static mark(e) { - return new bn(e); - } - static widget(e) { - var t = Math.max(-1e4, Math.min(1e4, e.side || 0)), - i = !!e.block; - return (t += i && !e.inlineOrder ? (t > 0 ? 3e8 : -4e8) : t > 0 ? 1e8 : -1e8), new hi(e, t, t, i, e.widget || null, !1); + (() => { + a(_i30, "BlockWidgetView"); + })(), + _i30), + ra = + ((_i31 = class i { + posCovered() { + if (this.content.length == 0) return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos; + var e = this.content[this.content.length - 1]; + return !e.breakAfter && !(e instanceof an && e.type == xe.WidgetBefore); + } + getLine() { + return this.curLine || (this.content.push((this.curLine = new at())), (this.atCursorPos = !0)), this.curLine; + } + flushBuffer() { + var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.bufferMarks; + this.pendingBuffer && (this.curLine.append(Ms(new un(-1), e), e.length), (this.pendingBuffer = 0)); + } + addBlockWidget(e) { + this.flushBuffer(), (this.curLine = null), this.content.push(e); } - static replace(e) { - var t = !!e.block, - i, - n; - if (e.isBlockGap) (i = -5e8), (n = 4e8); - else { - var _uD = uD(e, t), - s = _uD.start, - o = _uD.end; - (i = (s ? (t ? -3e8 : -1) : 5e8) - 1), (n = (o ? (t ? 2e8 : 1) : -6e8) + 1); + finish(e) { + this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : (this.pendingBuffer = 0), this.posCovered() || this.getLine(); + } + buildText(e, t, r) { + for (; e > 0; ) { + if (this.textOff == this.text.length) { + var _this_cursor_next = this.cursor.next(this.skip), + s = _this_cursor_next.value, + o = _this_cursor_next.lineBreak, + u = _this_cursor_next.done; + if (((this.skip = 0), u)) throw new Error("Ran out of text content when drawing inline views"); + if (o) { + this.posCovered() || this.getLine(), this.content.length ? (this.content[this.content.length - 1].breakAfter = 1) : (this.breakAtStart = 1), this.flushBuffer(), (this.curLine = null), (this.atCursorPos = !0), e--; + continue; + } else (this.text = s), (this.textOff = 0); + } + var n = Math.min(this.text.length - this.textOff, e, 512); + this.flushBuffer(t.slice(t.length - r)), this.getLine().append(Ms(new pr(this.text.slice(this.textOff, this.textOff + n)), t), r), (this.atCursorPos = !0), (this.textOff += n), (e -= n), (r = 0); } - return new hi(e, i, n, t, e.widget || null, !0); } - static line(e) { - return new yn(e); + span(e, t, r, n) { + this.buildText(t - e, r, n), (this.pos = t), this.openStart < 0 && (this.openStart = n); } - static set(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - return De.of(e, t); + point(e, t, r, n, s, o) { + if (this.disallowBlockEffectsFor[o] && r instanceof si) { + if (r.block) throw new RangeError("Block decorations may not be specified via plugins"); + if (t > this.doc.lineAt(this.pos).to) throw new RangeError("Decorations that replace line breaks may not be specified via plugins"); + } + var u = t - e; + if (r instanceof si) + if (r.block) { + var l = r.type; + l == xe.WidgetAfter && !this.posCovered() && this.getLine(), this.addBlockWidget(new an(r.widget || new eo("div"), u, l)); + } else { + var l1 = on.create(r.widget || new eo("span"), u, u ? 0 : r.startSide), + h = this.atCursorPos && !l1.isEditable && s <= n.length && (e < t || r.startSide > 0), + c = !l1.isEditable && (e < t || s > n.length || r.startSide <= 0), + f = this.getLine(); + this.pendingBuffer == 2 && !h && !l1.isEditable && (this.pendingBuffer = 0), this.flushBuffer(n), h && (f.append(Ms(new un(1), n), s), (s = n.length + Math.max(0, s - n.length))), f.append(Ms(l1, n), s), (this.atCursorPos = c), (this.pendingBuffer = c ? (e < t || s > n.length ? 1 : 2) : 0), this.pendingBuffer && (this.bufferMarks = n.slice()); + } + else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(r); + u && (this.textOff + u <= this.text.length ? (this.textOff += u) : ((this.skip += u - (this.text.length - this.textOff)), (this.text = ""), (this.textOff = 0)), (this.pos = t)), this.openStart < 0 && (this.openStart = s); } - hasHeight() { - return this.widget ? this.widget.estimatedHeight > -1 : !1; + static build(e, t, r, n, s) { + var o = new i(e, t, r, s); + return (o.openEnd = Ee.spans(n, t, r, o)), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o; } - constructor(e, t, i, n) { - super(), (this.startSide = e), (this.endSide = t), (this.widget = i), (this.spec = n); + constructor(e, t, r, n) { + (this.doc = e), (this.pos = t), (this.end = r), (this.disallowBlockEffectsFor = n), (this.content = []), (this.curLine = null), (this.breakAtStart = 0), (this.pendingBuffer = 0), (this.bufferMarks = []), (this.atCursorPos = !0), (this.openStart = -1), (this.openEnd = -1), (this.text = ""), (this.textOff = 0), (this.cursor = e.iter()), (this.skip = t); } }), - h(_class37, "Decoration"), - _class37); - pe.none = De.empty; - var bn = - ((_r29 = class r extends pe { - eq(e) { - var t, i; - return this == e || (e instanceof r && this.tagName == e.tagName && (this.class || ((t = this.attrs) === null || t === void 0 ? void 0 : t.class)) == (e.class || ((i = e.attrs) === null || i === void 0 ? void 0 : i.class)) && Ia(this.attrs, e.attrs, "class")); - } - range(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; - if (e >= t) throw new RangeError("Mark decorations may not be empty"); - return super.range(e, t); - } - constructor(e) { - var _uD = uD(e), - t = _uD.start, - i = _uD.end; - super(t ? -1 : 5e8, i ? 1 : -6e8, null, e), (this.tagName = e.tagName || "span"), (this.class = e.class || ""), (this.attrs = e.attributes || null); - } - }), - h(_r29, "MarkDecoration"), - _r29); - bn.prototype.point = !1; - var yn = - ((_r30 = class r extends pe { - eq(e) { - return e instanceof r && this.spec.class == e.spec.class && Ia(this.spec.attributes, e.spec.attributes); - } - range(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; - if (t != e) throw new RangeError("Line decoration ranges must be zero-length"); - return super.range(e, t); - } - constructor(e) { - super(-2e8, -2e8, null, e); - } - }), - h(_r30, "LineDecoration"), - _r30); - yn.prototype.mapMode = Ve.TrackBefore; - yn.prototype.point = !0; - var hi = - ((_r31 = class r extends pe { - get type() { - return this.startSide != this.endSide ? He.WidgetRange : this.startSide <= 0 ? He.WidgetBefore : He.WidgetAfter; - } - get heightRelevant() { - return this.block || (!!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0)); - } - eq(e) { - return e instanceof r && lx(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide; - } - range(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e; - if (this.isReplace && (e > t || (e == t && this.startSide > 0 && this.endSide <= 0))) throw new RangeError("Invalid range for replacement decoration"); - if (!this.isReplace && t != e) throw new RangeError("Widget decorations can only have zero-length ranges"); - return super.range(e, t); - } - constructor(e, t, i, n, s, o) { - super(t, i, s, e), (this.block = n), (this.isReplace = o), (this.mapMode = n ? (t <= 0 ? Ve.TrackBefore : Ve.TrackAfter) : Ve.TrackDel); - } - }), - h(_r31, "PointDecoration"), - _r31); - hi.prototype.point = !0; - function uD(r) { - var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; - var t = r.inclusiveStart, - i = r.inclusiveEnd; - return t == null && (t = r.inclusive), i == null && (i = r.inclusive), { start: t !== null && t !== void 0 ? t : e, end: i !== null && i !== void 0 ? i : e }; - } - h(uD, "getInclusive"); - function lx(r, e) { - return r == e || !!(r && e && r.compare(e)); - } - h(lx, "widgetsEq"); - function aa(r, e, t) { - var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; - var n = t.length - 1; - n >= 0 && t[n] + i >= r ? (t[n] = Math.max(t[n], e)) : t.push(r, e); - } - h(aa, "addRange"); - var cn = - ((_r32 = class r { - posCovered() { - if (this.content.length == 0) return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos; - var e = this.content[this.content.length - 1]; - return !(e.breakAfter || (e instanceof br && e.deco.endSide < 0)); - } - getLine() { - return this.curLine || (this.content.push((this.curLine = new Re())), (this.atCursorPos = !0)), this.curLine; - } - flushBuffer() { - var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.bufferMarks; - this.pendingBuffer && (this.curLine.append(zs(new Fn(-1), e), e.length), (this.pendingBuffer = 0)); - } - addBlockWidget(e) { - this.flushBuffer(), (this.curLine = null), this.content.push(e); - } - finish(e) { - this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : (this.pendingBuffer = 0), !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof br) && this.getLine(); - } - buildText(e, t, i) { - for (; e > 0; ) { - if (this.textOff == this.text.length) { - var _this_cursor_next = this.cursor.next(this.skip), - s = _this_cursor_next.value, - o = _this_cursor_next.lineBreak, - l = _this_cursor_next.done; - if (((this.skip = 0), l)) throw new Error("Ran out of text content when drawing inline views"); - if (o) { - this.posCovered() || this.getLine(), this.content.length ? (this.content[this.content.length - 1].breakAfter = 1) : (this.breakAtStart = 1), this.flushBuffer(), (this.curLine = null), (this.atCursorPos = !0), e--; - continue; - } else (this.text = s), (this.textOff = 0); - } - var n = Math.min(this.text.length - this.textOff, e, 512); - this.flushBuffer(t.slice(t.length - i)), this.getLine().append(zs(new Rt(this.text.slice(this.textOff, this.textOff + n)), t), i), (this.atCursorPos = !0), (this.textOff += n), (e -= n), (i = 0); - } - } - span(e, t, i, n) { - this.buildText(t - e, i, n), (this.pos = t), this.openStart < 0 && (this.openStart = n); - } - point(e, t, i, n, s, o) { - if (this.disallowBlockEffectsFor[o] && i instanceof hi) { - if (i.block) throw new RangeError("Block decorations may not be specified via plugins"); - if (t > this.doc.lineAt(this.pos).to) throw new RangeError("Decorations that replace line breaks may not be specified via plugins"); - } - var l = t - e; - if (i instanceof hi) - if (i.block) i.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new br(i.widget || ci.block, l, i)); - else { - var u = Dn.create(i.widget || ci.inline, l, l ? 0 : i.startSide), - a = this.atCursorPos && !u.isEditable && s <= n.length && (e < t || i.startSide > 0), - c = !u.isEditable && (e < t || s > n.length || i.startSide <= 0), - f = this.getLine(); - this.pendingBuffer == 2 && !a && !u.isEditable && (this.pendingBuffer = 0), this.flushBuffer(n), a && (f.append(zs(new Fn(1), n), s), (s = n.length + Math.max(0, s - n.length))), f.append(zs(u, n), s), (this.atCursorPos = c), (this.pendingBuffer = c ? (e < t || s > n.length ? 1 : 2) : 0), this.pendingBuffer && (this.bufferMarks = n.slice()); - } - else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(i); - l && (this.textOff + l <= this.text.length ? (this.textOff += l) : ((this.skip += l - (this.text.length - this.textOff)), (this.text = ""), (this.textOff = 0)), (this.pos = t)), this.openStart < 0 && (this.openStart = s); - } - static build(e, t, i, n, s) { - var o = new r(e, t, i, s); - return (o.openEnd = De.spans(n, t, i, o)), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o; - } - constructor(e, t, i, n) { - (this.doc = e), (this.pos = t), (this.end = i), (this.disallowBlockEffectsFor = n), (this.content = []), (this.curLine = null), (this.breakAtStart = 0), (this.pendingBuffer = 0), (this.bufferMarks = []), (this.atCursorPos = !0), (this.openStart = -1), (this.openEnd = -1), (this.text = ""), (this.textOff = 0), (this.cursor = e.iter()), (this.skip = t); - } - }), - h(_r32, "ContentBuilder"), - _r32); - function zs(r, e) { + (() => { + a(_i31, "ContentBuilder"); + })(), + _i31); + function Ms(i, e) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; - r = new ui(t, [r], r.length); + i = new ni(t, [i], i.length); } } catch (err) { _didIteratorError = true; @@ -11196,374 +11116,100 @@ function _ts_generator(thisArg, body) { } } } - return r; - } - h(zs, "wrapMarks"); - var ci = - ((_class38 = class _class extends ai { - eq(e) { - return e.tag == this.tag; - } - toDOM() { - return document.createElement(this.tag); - } - updateDOM(e) { - return e.nodeName.toLowerCase() == this.tag; - } - get isHidden() { - return !0; - } - constructor(e) { - super(), (this.tag = e); - } - }), - h(_class38, "NullWidget"), - _class38); - ci.inline = new ci("span"); - ci.block = new ci("div"); - var Be = (function (r) { - return (r[(r.LTR = 0)] = "LTR"), (r[(r.RTL = 1)] = "RTL"), r; - })(Be || (Be = {})), - Ui = Be.LTR, - $a = Be.RTL; - function aD(r) { - var e = []; - for (var t = 0; t < r.length; t++) e.push(1 << +r[t]); - return e; + return i; } - h(aD, "dec"); - var ux = aD("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), - ax = aD("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), - ha = Object.create(null), - Ut = []; - for (var _$_i = 0, _iter = ["()", "[]", "{}"]; _$_i < _iter.length; _$_i++) { - var r1 = _iter[_$_i]; - var e = r1.charCodeAt(0), - t = r1.charCodeAt(1); - (ha[e] = t), (ha[t] = -e); - } - function hD(r) { - return r <= 247 ? ux[r] : 1424 <= r && r <= 1524 ? 2 : 1536 <= r && r <= 1785 ? ax[r - 1536] : 1774 <= r && r <= 2220 ? 4 : 8192 <= r && r <= 8204 ? 256 : 64336 <= r && r <= 65023 ? 4 : 1; - } - h(hD, "charType"); - var hx = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/, - Ot = - ((_class39 = class _class { - get dir() { - return this.level % 2 ? $a : Ui; + a(Ms, "wrapMarks"); + var eo = + ((_class39 = class _class extends Ut { + eq(e) { + return e.tag == this.tag; } - side(e, t) { - return (this.dir == t) == e ? this.to : this.from; + toDOM() { + return document.createElement(this.tag); } - forward(e, t) { - return e == (this.dir == t); + updateDOM(e) { + return e.nodeName.toLowerCase() == this.tag; } - static find(e, t, i, n) { - var s = -1; - for (var o = 0; o < e.length; o++) { - var l = e[o]; - if (l.from <= t && l.to >= t) { - if (l.level == i) return o; - (s < 0 || (n != 0 ? (n < 0 ? l.from < t : l.to > t) : e[s].level > l.level)) && (s = o); - } - } - if (s < 0) throw new RangeError("Index out of range"); - return s; + get isHidden() { + return !0; } - constructor(e, t, i) { - (this.from = e), (this.to = t), (this.level = i); + constructor(e) { + super(), (this.tag = e); } }), - h(_class39, "BidiSpan"), - _class39); - function cD(r, e) { - if (r.length != e.length) return !1; - for (var t = 0; t < r.length; t++) { - var i = r[t], - n = e[t]; - if (i.from != n.from || i.to != n.to || i.direction != n.direction || !cD(i.inner, n.inner)) return !1; - } - return !0; - } - h(cD, "isolatesEq"); - var ge = []; - function cx(r, e, t, i, n) { - for (var s = 0; s <= i.length; s++) { - var o = s ? i[s - 1].to : e, - l = s < i.length ? i[s].from : t, - u = s ? 256 : n; - for (var a = o, c = u, f = u; a < l; a++) { - var d = hD(r.charCodeAt(a)); - d == 512 ? (d = c) : d == 8 && f == 4 && (d = 16), (ge[a] = d == 4 ? 2 : d), d & 7 && (f = d), (c = d); - } - for (var a1 = o, c1 = u, f1 = u; a1 < l; a1++) { - var d1 = ge[a1]; - if (d1 == 128) a1 < l - 1 && c1 == ge[a1 + 1] && c1 & 24 ? (d1 = ge[a1] = c1) : (ge[a1] = 256); - else if (d1 == 64) { - var p = a1 + 1; - for (; p < l && ge[p] == 64; ) p++; - var m = (a1 && c1 == 8) || (p < t && ge[p] == 8) ? (f1 == 1 ? 1 : 8) : 256; - for (var F = a1; F < p; F++) ge[F] = m; - a1 = p - 1; - } else d1 == 8 && f1 == 1 && (ge[a1] = 1); - (c1 = d1), d1 & 7 && (f1 = d1); - } - } - } - h(cx, "computeCharTypes"); - function fx(r, e, t, i, n) { - var s = n == 1 ? 2 : 1; - for (var o = 0, l = 0, u = 0; o <= i.length; o++) { - var a = o ? i[o - 1].to : e, - c = o < i.length ? i[o].from : t; - for (var f = a, d = void 0, p = void 0, m = void 0; f < c; f++) - if ((p = ha[(d = r.charCodeAt(f))])) - if (p < 0) { - for (var F = l - 3; F >= 0; F -= 3) - if (Ut[F + 1] == -p) { - var g = Ut[F + 2], - D = g & 2 ? n : g & 4 ? (g & 1 ? s : n) : 0; - D && (ge[f] = ge[Ut[F]] = D), (l = F); - break; - } - } else { - if (Ut.length == 189) break; - (Ut[l++] = f), (Ut[l++] = d), (Ut[l++] = u); - } - else if ((m = ge[f]) == 2 || m == 1) { - var F1 = m == n; - u = F1 ? 0 : 1; - for (var g1 = l - 3; g1 >= 0; g1 -= 3) { - var D1 = Ut[g1 + 2]; - if (D1 & 2) break; - if (F1) Ut[g1 + 2] |= 2; - else { - if (D1 & 4) break; - Ut[g1 + 2] |= 4; - } - } - } - } - } - h(fx, "processBracketPairs"); - function dx(r, e, t, i) { - for (var n = 0, s = i; n <= t.length; n++) { - var o = n ? t[n - 1].to : r, - l = n < t.length ? t[n].from : e; - for (var u = o; u < l; ) { - var a = ge[u]; - if (a == 256) { - var c = u + 1; - for (;;) - if (c == l) { - if (n == t.length) break; - (c = t[n++].to), (l = n < t.length ? t[n].from : e); - } else if (ge[c] == 256) c++; - else break; - var f = s == 1, - d = (c < e ? ge[c] : i) == 1, - p = f == d ? (f ? 1 : 2) : i; - for (var m = c, F = n, g = F ? t[F - 1].to : r; m > u; ) m == g && ((m = t[--F].from), (g = F ? t[F - 1].to : r)), (ge[--m] = p); - u = c; - } else (s = a), u++; - } - } - } - h(dx, "processNeutrals"); - function ca(r, e, t, i, n, s, o) { - var l = i % 2 ? 2 : 1; - if (i % 2 == n % 2) - for (var u = e, a = 0; u < t; ) { - var c = !0, - f = !1; - if (a == s.length || u < s[a].from) { - var F = ge[u]; - F != l && ((c = !1), (f = F == 16)); - } - var d = !c && l == 1 ? [] : null, - p = c ? i : i + 1, - m = u; - e: for (;;) - if (a < s.length && m == s[a].from) { - if (f) break e; - var F1 = s[a]; - if (!c) - for (var g = F1.to, D = a + 1; ; ) { - if (g == t) break e; - if (D < s.length && s[D].from == g) g = s[D++].to; - else { - if (ge[g] == l) break e; - break; - } - } - if ((a++, d)) d.push(F1); - else { - F1.from > u && o.push(new Ot(u, F1.from, p)); - var g1 = (F1.direction == Ui) != !(p % 2); - fa(r, g1 ? i + 1 : i, n, F1.inner, F1.from, F1.to, o), (u = F1.to); - } - m = F1.to; - } else { - if (m == t || (c ? ge[m] != l : ge[m] == l)) break; - m++; - } - d ? ca(r, u, m, i + 1, n, d, o) : u < m && o.push(new Ot(u, m, p)), (u = m); - } - else - for (var u1 = t, a1 = s.length; u1 > e; ) { - var c1 = !0, - f1 = !1; - if (!a1 || u1 > s[a1 - 1].to) { - var F2 = ge[u1 - 1]; - F2 != l && ((c1 = !1), (f1 = F2 == 16)); - } - var d1 = !c1 && l == 1 ? [] : null, - p1 = c1 ? i : i + 1, - m1 = u1; - e: for (;;) - if (a1 && m1 == s[a1 - 1].to) { - if (f1) break e; - var F3 = s[--a1]; - if (!c1) - for (var g2 = F3.from, D1 = a1; ; ) { - if (g2 == e) break e; - if (D1 && s[D1 - 1].to == g2) g2 = s[--D1].from; - else { - if (ge[g2 - 1] == l) break e; - break; - } - } - if (d1) d1.push(F3); - else { - F3.to < u1 && o.push(new Ot(F3.to, u1, p1)); - var g3 = (F3.direction == Ui) != !(p1 % 2); - fa(r, g3 ? i + 1 : i, n, F3.inner, F3.from, F3.to, o), (u1 = F3.from); - } - m1 = F3.from; - } else { - if (m1 == e || (c1 ? ge[m1 - 1] != l : ge[m1 - 1] == l)) break; - m1--; - } - d1 ? ca(r, m1, u1, i + 1, n, d1, o) : m1 < u1 && o.push(new Ot(m1, u1, p1)), (u1 = m1); - } - } - h(ca, "emitSpans"); - function fa(r, e, t, i, n, s, o) { - var l = e % 2 ? 2 : 1; - cx(r, n, s, i, l), fx(r, n, s, i, l), dx(n, s, i, l), ca(r, n, s, e, t, i, o); - } - h(fa, "computeSectionOrder"); - function px(r, e, t) { - if (!r) return [new Ot(0, 0, e == $a ? 1 : 0)]; - if (e == Ui && !t.length && !hx.test(r)) return fD(r.length); - if (t.length) for (; r.length > ge.length; ) ge[ge.length] = 256; - var i = [], - n = e == Ui ? 0 : 1; - return fa(r, n, n, t, 0, r.length, i), i; - } - h(px, "computeOrder"); - function fD(r) { - return [new Ot(0, r, 0)]; - } - h(fD, "trivialOrder"); - var dD = ""; - function mx(r, e, t, i, n) { - var s; - var o = i.head - r.from, - l = Ot.find(e, o, (s = i.bidiLevel) !== null && s !== void 0 ? s : -1, i.assoc), - u = e[l], - a = u.side(n, t); - if (o == a) { - var d = (l += n ? 1 : -1); - if (d < 0 || d >= e.length) return null; - (u = e[(l = d)]), (o = u.side(!n, t)), (a = u.side(n, t)); - } - var c = ht(r.text, o, u.forward(n, t)); - (c < u.from || c > u.to) && (c = a), (dD = r.text.slice(Math.min(o, c), Math.max(o, c))); - var f = l == (n ? e.length - 1 : 0) ? null : e[l + (n ? 1 : -1)]; - return f && c == a && f.level + (n ? 0 : 1) < u.level ? Z.cursor(f.side(!n, t) + r.from, f.forward(n, t) ? 1 : -1, f.level) : Z.cursor(c + r.from, u.forward(n, t) ? -1 : 1, u.level); - } - h(mx, "moveVisually"); - function gx(r, e, t) { - for (var i = e; i < t; i++) { - var n = hD(r.charCodeAt(i)); - if (n == 1) return Ui; - if (n == 2 || n == 4) return $a; - } - return Ui; - } - h(gx, "autoDirection"); - var pD = H.define(), - mD = H.define(), - gD = H.define(), - DD = H.define(), - da = H.define(), - FD = H.define(), - bD = H.define(), - yD = H.define({ combine: (r) => r.some((e) => e) }), - ED = H.define({ combine: (r) => r.some((e) => e) }), - CD = H.define(), - fn = - ((_r33 = class r { + (() => { + a(_class39, "NullWidget"); + })(), + _class39), + Gg = G.define(), + Yg = G.define(), + Kg = G.define(), + Xg = G.define(), + na = G.define(), + Qg = G.define(), + Jg = G.define(), + Zg = G.define({ combine: (i) => i.some((e) => e) }), + eD = G.define({ combine: (i) => i.some((e) => e) }), + to = + ((_i32 = class i { map(e) { - return e.empty ? this : new r(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); - } - clip(e) { - return this.range.to <= e.doc.length ? this : new r(Z.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot); + return e.empty ? this : new i(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin); } - constructor(e, ref, ref1, ref2, ref3, ref4) { + constructor(e, ref, ref1, ref2, ref3) { var t = ref === void 0 ? "nearest" : ref, - i = ref1 === void 0 ? "nearest" : ref1, + r = ref1 === void 0 ? "nearest" : ref1, n = ref2 === void 0 ? 5 : ref2, - s = ref3 === void 0 ? 5 : ref3, - o = ref4 === void 0 ? !1 : ref4; - (this.range = e), (this.y = t), (this.x = i), (this.yMargin = n), (this.xMargin = s), (this.isSnapshot = o); + s = ref3 === void 0 ? 5 : ref3; + (this.range = e), (this.y = t), (this.x = r), (this.yMargin = n), (this.xMargin = s); } }), - h(_r33, "ScrollTarget"), - _r33), - Hs = de.define({ map: (r, e) => r.map(e) }); - function Xe(r, e, t) { - var i = r.facet(DD); - i.length ? i[0](e) : window.onerror ? window.onerror(String(e), t, void 0, void 0, e) : t ? console.error(t + ":", e) : console.error(e); - } - h(Xe, "logException"); - var vo = H.define({ combine: (r) => (r.length ? r[0] : !0) }), - Dx = 0, - sn = H.define(), - je = - ((_r34 = class r { + (() => { + a(_i32, "ScrollTarget"); + })(), + _i32), + ng = pe.define({ map: (i, e) => i.map(e) }); + function ht(i, e, t) { + var r = i.facet(Xg); + r.length ? r[0](e) : window.onerror ? window.onerror(String(e), t, void 0, void 0, e) : t ? console.error(t + ":", e) : console.error(e); + } + a(ht, "logException"); + var Do = G.define({ combine: (i) => (i.length ? i[0] : !0) }), + Vv = 0, + Qr = G.define(), + Ye = + ((_i33 = class i { static define(e, t) { var _ref = t || {}, - i = _ref.eventHandlers, - n = _ref.eventObservers, - s = _ref.provide, - o = _ref.decorations; - return new r(Dx++, e, i, n, (l) => { - var u = [sn.of(l)]; + r = _ref.eventHandlers, + n = _ref.provide, + s = _ref.decorations; + return new i(Vv++, e, r, (o) => { + var u = [Qr.of(o)]; return ( - o && + s && u.push( - En.of((a) => { - var c = a.plugin(l); - return c ? o(c) : pe.none; - }), + hn.of((l) => { + var h = l.plugin(o); + return h ? s(h) : he.none; + }) ), - s && u.push(s(l)), + n && u.push(n(o)), u ); }); } static fromClass(e, t) { - return r.define((i) => new e(i), t); + return i.define((r) => new e(r), t); } - constructor(e, t, i, n, s) { - (this.id = e), (this.create = t), (this.domEventHandlers = i), (this.domEventObservers = n), (this.extension = s(this)); + constructor(e, t, r, n) { + (this.id = e), (this.create = t), (this.domEventHandlers = r), (this.extension = n(this)); } }), - h(_r34, "ViewPlugin"), - _r34), - dn = + (() => { + a(_i33, "ViewPlugin"); + })(), + _i33), + tn = ((_class40 = class _class { update(e) { if (this.value) { @@ -11572,8 +11218,8 @@ function _ts_generator(thisArg, body) { if (((this.mustUpdate = null), this.value.update)) try { this.value.update(_$t); - } catch (i) { - if ((Xe(_$t.state, i, "CodeMirror plugin crashed"), this.value.destroy)) + } catch (r) { + if ((ht(_$t.state, r, "CodeMirror plugin crashed"), this.value.destroy)) try { this.value.destroy(); } catch (e) {} @@ -11584,7 +11230,7 @@ function _ts_generator(thisArg, body) { try { this.value = this.spec.create(e); } catch (t) { - Xe(e.state, t, "CodeMirror plugin crashed"), this.deactivate(); + ht(e.state, t, "CodeMirror plugin crashed"), this.deactivate(); } return this; } @@ -11593,8 +11239,8 @@ function _ts_generator(thisArg, body) { if (!((t = this.value) === null || t === void 0) && t.destroy) try { this.value.destroy(); - } catch (i) { - Xe(e.state, i, "CodeMirror plugin crashed"); + } catch (r) { + ht(e.state, r, "CodeMirror plugin crashed"); } } deactivate() { @@ -11604,55 +11250,28 @@ function _ts_generator(thisArg, body) { (this.spec = e), (this.mustUpdate = null), (this.value = null); } }), - h(_class40, "PluginInstance"), + (() => { + a(_class40, "PluginInstance"); + })(), _class40), - BD = H.define(), - qa = H.define(), - En = H.define(), - vD = H.define(), - Va = H.define(), - xD = H.define(); - function bg(r, e) { - var t = r.state.facet(xD); - if (!t.length) return t; - var i = t.map((s) => (s instanceof Function ? s(r) : s)), - n = []; - return ( - De.spans(i, e.from, e.to, { - point() {}, - span(s, o, l, u) { - var a = s - e.from, - c = o - e.from, - f = n; - for (var d = l.length - 1; d >= 0; d--, u--) { - var p = l[d].spec.bidiIsolate, - m = void 0; - if ((p == null && (p = gx(e.text, a, c)), u > 0 && f.length && (m = f[f.length - 1]).to == a && m.direction == p)) (m.to = c), (f = m.inner); - else { - var F = { from: a, to: c, direction: p, inner: [] }; - f.push(F), (f = F.inner); - } - } - }, - }), - n - ); - } - h(bg, "getIsolatedRanges"); - var AD = H.define(); - function kD(r) { + tD = G.define(), + Pa = G.define(), + hn = G.define(), + La = G.define(), + iD = G.define(); + function rD(i) { var e = 0, t = 0, - i = 0, + r = 0, n = 0; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.state.facet(AD)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i.state.facet(iD)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; - var o = s(r); - o && (o.left != null && (e = Math.max(e, o.left)), o.right != null && (t = Math.max(t, o.right)), o.top != null && (i = Math.max(i, o.top)), o.bottom != null && (n = Math.max(n, o.bottom))); + var o = s(i); + o && (o.left != null && (e = Math.max(e, o.left)), o.right != null && (t = Math.max(t, o.right)), o.top != null && (r = Math.max(r, o.top)), o.bottom != null && (n = Math.max(n, o.bottom))); } } catch (err) { _didIteratorError = true; @@ -11668,56 +11287,58 @@ function _ts_generator(thisArg, body) { } } } - return { left: e, right: t, top: i, bottom: n }; + return { left: e, right: t, top: r, bottom: n }; } - h(kD, "getScrollMargins"); - var on = H.define(), - Tt = - ((_r35 = class r { + a(rD, "getScrollMargins"); + var Jr = G.define(), + ei = + ((_i34 = class i { join(e) { - return new r(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB)); + return new i(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB)); } addToSet(e) { var t = e.length, - i = this; + r = this; for (; t > 0; t--) { var n = e[t - 1]; - if (!(n.fromA > i.toA)) { - if (n.toA < i.fromA) break; - (i = i.join(n)), e.splice(t - 1, 1); + if (!(n.fromA > r.toA)) { + if (n.toA < r.fromA) break; + (r = r.join(n)), e.splice(t - 1, 1); } } - return e.splice(t, 0, i), e; + return e.splice(t, 0, r), e; } static extendWithRanges(e, t) { if (t.length == 0) return e; - var i = []; - for (var n = 0, s = 0, o = 0, l = 0; ; n++) { - var u = n == e.length ? null : e[n], - a = o - l, - c = u ? u.fromB : 1e9; + var r = []; + for (var n = 0, s = 0, o = 0, u = 0; ; n++) { + var l = n == e.length ? null : e[n], + h = o - u, + c = l ? l.fromB : 1e9; for (; s < t.length && t[s] < c; ) { var f = t[s], d = t[s + 1], - p = Math.max(l, f), + p = Math.max(u, f), m = Math.min(c, d); - if ((p <= m && new r(p + a, m + a, p, m).addToSet(i), d > c)) break; + if ((p <= m && new i(p + h, m + h, p, m).addToSet(r), d > c)) break; s += 2; } - if (!u) return i; - new r(u.fromA, u.toA, u.fromB, u.toB).addToSet(i), (o = u.toA), (l = u.toB); + if (!l) return r; + new i(l.fromA, l.toA, l.fromB, l.toB).addToSet(r), (o = l.toA), (u = l.toB); } } - constructor(e, t, i, n) { - (this.fromA = e), (this.toA = t), (this.fromB = i), (this.toB = n); + constructor(e, t, r, n) { + (this.fromA = e), (this.toA = t), (this.fromB = r), (this.toB = n); } }), - h(_r35, "ChangedRange"), - _r35), - ao = - ((_r36 = class r { - static create(e, t, i) { - return new r(e, t, i); + (() => { + a(_i34, "ChangedRange"); + })(), + _i34), + io = + ((_i35 = class i { + static create(e, t, r) { + return new i(e, t, r); } get viewportChanged() { return (this.flags & 4) > 0; @@ -11740,13 +11361,13 @@ function _ts_generator(thisArg, body) { get empty() { return this.flags == 0 && this.transactions.length == 0; } - constructor(e, t, i) { - (this.view = e), (this.state = t), (this.transactions = i), (this.flags = 0), (this.startState = e.state), (this.changes = We.empty(this.startState.doc.length)); + constructor(e, t, r) { + (this.view = e), (this.state = t), (this.transactions = r), (this.flags = 0), (this.startState = e.state), (this.changes = Ue.empty(this.startState.doc.length)); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; this.changes = this.changes.compose(s.changes); } @@ -11765,123 +11386,298 @@ function _ts_generator(thisArg, body) { } } var n = []; - this.changes.iterChangedRanges((s, o, l, u) => n.push(new Tt(s, o, l, u))), (this.changedRanges = n); + this.changes.iterChangedRanges((s, o, u, l) => n.push(new ei(s, o, u, l))), (this.changedRanges = n); } }), - h(_r36, "ViewUpdate"), - _r36), - ho = - ((_class41 = class _class extends Fe { - get length() { - return this.view.state.doc.length; + (() => { + a(_i35, "ViewUpdate"); + })(), + _i35), + Se = (function (i) { + return (i[(i.LTR = 0)] = "LTR"), (i[(i.RTL = 1)] = "RTL"), i; + })(Se || (Se = {})), + sa = Se.LTR, + zv = Se.RTL; + function nD(i) { + var e = []; + for (var t = 0; t < i.length; t++) e.push(1 << +i[t]); + return e; + } + a(nD, "dec"); + var Hv = nD("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), + Wv = nD("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), + oa = Object.create(null), + Bt = []; + for (var _i66 = 0, _iter = ["()", "[]", "{}"]; _i66 < _iter.length; _i66++) { + var i1 = _iter[_i66]; + var e = i1.charCodeAt(0), + t = i1.charCodeAt(1); + (oa[e] = t), (oa[t] = -e); + } + function jv(i) { + return i <= 247 ? Hv[i] : 1424 <= i && i <= 1524 ? 2 : 1536 <= i && i <= 1785 ? Wv[i - 1536] : 1774 <= i && i <= 2220 ? 4 : 8192 <= i && i <= 8203 ? 256 : 64336 <= i && i <= 65023 ? 4 : i == 8204 ? 256 : 1; + } + a(jv, "charType"); + var Uv = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/, + ti = + ((_class41 = class _class { + get dir() { + return this.level % 2 ? zv : sa; } - update(e) { - var t; - var i = e.changedRanges; - this.minWidth > 0 && - i.length && - (i.every((param) => { - var a = param.fromA, - c = param.toA; - return c < this.minWidthFrom || a > this.minWidthTo; - }) - ? ((this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1)), (this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1))) - : (this.minWidth = this.minWidthFrom = this.minWidthTo = 0)); - var n = -1; - this.view.inputState.composing >= 0 && (!((t = this.domChanged) === null || t === void 0) && t.newSel ? (n = this.domChanged.newSel.head) : !vx(e.changes, this.hasComposition) && !e.selectionSet && (n = e.state.selection.main.head)); - var s = n > -1 ? bx(this.view, e.changes, n) : null; - if (((this.domChanged = null), this.hasComposition)) { - this.markedForComposition.clear(); - var _this_hasComposition = this.hasComposition, - a = _this_hasComposition.from, - c = _this_hasComposition.to; - i = new Tt(a, c, e.changes.mapPos(a, -1), e.changes.mapPos(c, 1)).addToSet(i.slice()); - } - (this.hasComposition = s ? { from: s.range.fromB, to: s.range.toB } : null), (W.ie || W.chrome) && !s && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0); - var o = this.decorations, - l = this.updateDeco(), - u = Cx(o, l, e.changes); - return (i = Tt.extendWithRanges(i, u)), !(this.flags & 7) && i.length == 0 ? !1 : (this.updateInner(i, e.startState.doc.length, s), e.transactions.length && (this.lastUpdate = Date.now()), !0); - } - updateInner(e, t, i) { - (this.view.viewState.mustMeasureContent = !0), this.updateChildren(e, t, i); - var _this_view = this.view, - n = _this_view.observer; - n.ignore(() => { - (this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px"), (this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : ""); - var o = W.chrome || W.ios ? { node: n.selectionRange.focusNode, written: !1 } : void 0; - this.sync(this.view, o), (this.flags &= -8), o && (o.written || n.selectionRange.focusNode != o.node) && (this.forceSelection = !0), (this.dom.style.height = ""); - }), - this.markedForComposition.forEach((o) => (o.flags &= -9)); - var s = []; + side(e, t) { + return (this.dir == t) == e ? this.to : this.from; + } + static find(e, t, r, n) { + var s = -1; + for (var o = 0; o < e.length; o++) { + var u = e[o]; + if (u.from <= t && u.to >= t) { + if (u.level == r) return o; + (s < 0 || (n != 0 ? (n < 0 ? u.from < t : u.to > t) : e[s].level > u.level)) && (s = o); + } + } + if (s < 0) throw new RangeError("Index out of range"); + return s; + } + constructor(e, t, r) { + (this.from = e), (this.to = t), (this.level = r); + } + }), + (() => { + a(_class41, "BidiSpan"); + })(), + _class41), + we = []; + function Gv(i, e) { + var t = i.length, + r = e == sa ? 1 : 2, + n = e == sa ? 2 : 1; + if (!i || (r == 1 && !Uv.test(i))) return sD(t); + for (var o = 0, u = r, l = r; o < t; o++) { + var h = jv(i.charCodeAt(o)); + h == 512 ? (h = u) : h == 8 && l == 4 && (h = 16), (we[o] = h == 4 ? 2 : h), h & 7 && (l = h), (u = h); + } + for (var o1 = 0, u1 = r, l1 = r; o1 < t; o1++) { + var h1 = we[o1]; + if (h1 == 128) o1 < t - 1 && u1 == we[o1 + 1] && u1 & 24 ? (h1 = we[o1] = u1) : (we[o1] = 256); + else if (h1 == 64) { + var c = o1 + 1; + for (; c < t && we[c] == 64; ) c++; + var f = (o1 && u1 == 8) || (c < t && we[c] == 8) ? (l1 == 1 ? 1 : 8) : 256; + for (var d = o1; d < c; d++) we[d] = f; + o1 = c - 1; + } else h1 == 8 && l1 == 1 && (we[o1] = 1); + (u1 = h1), h1 & 7 && (l1 = h1); + } + for (var o2 = 0, u2 = 0, l2 = 0, h2, c1, f1; o2 < t; o2++) + if ((c1 = oa[(h2 = i.charCodeAt(o2))])) + if (c1 < 0) { + for (var d1 = u2 - 3; d1 >= 0; d1 -= 3) + if (Bt[d1 + 1] == -c1) { + var p = Bt[d1 + 2], + m = p & 2 ? r : p & 4 ? (p & 1 ? n : r) : 0; + m && (we[o2] = we[Bt[d1]] = m), (u2 = d1); + break; + } + } else { + if (Bt.length == 189) break; + (Bt[u2++] = o2), (Bt[u2++] = h2), (Bt[u2++] = l2); + } + else if ((f1 = we[o2]) == 2 || f1 == 1) { + var d2 = f1 == r; + l2 = d2 ? 0 : 1; + for (var p1 = u2 - 3; p1 >= 0; p1 -= 3) { + var m1 = Bt[p1 + 2]; + if (m1 & 2) break; + if (d2) Bt[p1 + 2] |= 2; + else { + if (m1 & 4) break; + Bt[p1 + 2] |= 4; + } + } + } + for (var o3 = 0; o3 < t; o3++) + if (we[o3] == 256) { + var u3 = o3 + 1; + for (; u3 < t && we[u3] == 256; ) u3++; + var l3 = (o3 ? we[o3 - 1] : r) == 1, + h3 = (u3 < t ? we[u3] : r) == 1, + c2 = l3 == h3 ? (l3 ? 1 : 2) : r; + for (var f2 = o3; f2 < u3; f2++) we[f2] = c2; + o3 = u3 - 1; + } + var s = []; + if (r == 1) + for (var o4 = 0; o4 < t; ) { + var u4 = o4, + l4 = we[o4++] != 1; + for (; o4 < t && l4 == (we[o4] != 1); ) o4++; + if (l4) + for (var h4 = o4; h4 > u4; ) { + var c3 = h4, + f3 = we[--h4] != 2; + for (; h4 > u4 && f3 == (we[h4 - 1] != 2); ) h4--; + s.push(new ti(h4, c3, f3 ? 2 : 1)); + } + else s.push(new ti(u4, o4, 0)); + } + else + for (var o5 = 0; o5 < t; ) { + var u5 = o5, + l5 = we[o5++] == 2; + for (; o5 < t && l5 == (we[o5] == 2); ) o5++; + s.push(new ti(u5, o5, l5 ? 1 : 2)); + } + return s; + } + a(Gv, "computeOrder"); + function sD(i) { + return [new ti(0, i, 0)]; + } + a(sD, "trivialOrder"); + var oD = ""; + function Yv(i, e, t, r, n) { + var s; + var o = r.head - i.from, + u = -1; + if (o == 0) { + if (!n || !i.length) return null; + e[0].level != t && ((o = e[0].side(!1, t)), (u = 0)); + } else if (o == i.length) { + if (n) return null; + var d = e[e.length - 1]; + d.level != t && ((o = d.side(!0, t)), (u = e.length - 1)); + } + u < 0 && (u = ti.find(e, o, (s = r.bidiLevel) !== null && s !== void 0 ? s : -1, r.assoc)); + var l = e[u]; + o == l.side(n, t) && ((l = e[(u += n ? 1 : -1)]), (o = l.side(!n, t))); + var h = n == (l.dir == t), + c = yt(i.text, o, h); + if (((oD = i.text.slice(Math.min(o, c), Math.max(o, c))), c != l.side(n, t))) return Q.cursor(c + i.from, h ? -1 : 1, l.level); + var f = u == (n ? e.length - 1 : 0) ? null : e[u + (n ? 1 : -1)]; + return !f && l.level != t ? Q.cursor(n ? i.to : i.from, n ? -1 : 1, t) : f && f.level < l.level ? Q.cursor(f.side(!n, t) + i.from, n ? 1 : -1, f.level) : Q.cursor(c + i.from, n ? -1 : 1, l.level); + } + a(Yv, "moveVisually"); + var ur = "￿", + ro = + ((_class42 = class _class { + append(e) { + this.text += e; + } + lineBreak() { + this.text += ur; + } + readRange(e, t) { + if (!e) return this; + var r = e.parentNode; + for (var n = e; ; ) { + this.findPointBefore(r, n); + var s = this.text.length; + this.readNode(n); + var o = n.nextSibling; + if (o == t) break; + var u = Ce.get(n), + l = Ce.get(o); + (u && l ? u.breakAfter : (u ? u.breakAfter : sg(n)) || (sg(o) && (n.nodeName != "BR" || n.cmIgnore) && this.text.length > s)) && this.lineBreak(), (n = o); + } + return this.findPointBefore(r, t), this; + } + readTextNode(e) { + var t = e.nodeValue; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length) + try { + for (var _iterator = this.points[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + r.node == e && (r.pos = this.text.length + Math.min(r.offset, t.length)); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { try { - for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var o = _step.value; - o instanceof br && o.widget instanceof co && s.push(o.dom); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + for (var r1 = 0, n = this.lineSeparator ? null : /\r\n?|\n/g; ; ) { + var s = -1, + o = 1, + u = void 0; + if ((this.lineSeparator ? ((s = t.indexOf(this.lineSeparator, r1)), (o = this.lineSeparator.length)) : (u = n.exec(t)) && ((s = u.index), (o = u[0].length)), this.append(t.slice(r1, s < 0 ? t.length : s)), s < 0)) break; + var _iteratorNormalCompletion1 = true, + _didIteratorError1 = false, + _iteratorError1 = undefined; + if ((this.lineBreak(), o > 1)) try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + for (var _iterator1 = this.points[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { + var l = _step1.value; + l.node == e && l.pos > this.text.length && (l.pos -= o - 1); } + } catch (err) { + _didIteratorError1 = true; + _iteratorError1 = err; } finally { - if (_didIteratorError) { - throw _iteratorError; + try { + if (!_iteratorNormalCompletion1 && _iterator1.return != null) { + _iterator1.return(); + } + } finally { + if (_didIteratorError1) { + throw _iteratorError1; + } } } + r1 = s + o; + } + } + readNode(e) { + if (e.cmIgnore) return; + var t = Ce.get(e), + r = t && t.overrideDOMText; + if (r != null) { + this.findPointInside(e, r.length); + for (var n = r.iter(); !n.next().done; ) n.lineBreak ? this.lineBreak() : this.append(n.value); + } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null); + } + findPointBefore(e, t) { + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; + try { + for (var _iterator = this.points[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + r.node == e && e.childNodes[r.offset] == t && (r.pos = this.text.length); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } } - n.updateGaps(s); + } } - updateChildren(e, t, i) { - var n = i ? i.range.addToSet(e.slice()) : e, - s = this.childCursor(t); - for (var o = n.length - 1; ; o--) { - var l = o >= 0 ? n[o] : null; - if (!l) break; - var u = l.fromA, - a = l.toA, - c = l.fromB, - f = l.toB, - d = void 0, - p = void 0, - m = void 0, - F = void 0; - var ref; - if (i && i.range.fromB < f && i.range.toB > c) { - var k = cn.build(this.view.state.doc, c, i.range.fromB, this.decorations, this.dynamicDecorationMap), - C = cn.build(this.view.state.doc, i.range.toB, f, this.decorations, this.dynamicDecorationMap); - (p = k.breakAtStart), (m = k.openStart), (F = C.openEnd); - var L = this.compositionView(i); - C.breakAtStart ? (L.breakAfter = 1) : C.content.length && L.merge(L.length, L.length, C.content[0], !1, C.openStart, 0) && ((L.breakAfter = C.content[0].breakAfter), C.content.shift()), k.content.length && L.merge(0, 0, k.content[k.content.length - 1], !0, 0, k.openEnd) && k.content.pop(), (d = k.content.concat(L).concat(C.content)); - } else (ref = cn.build(this.view.state.doc, c, f, this.decorations, this.dynamicDecorationMap)), (d = ref.content), (p = ref.breakAtStart), (m = ref.openStart), (F = ref.openEnd), ref; - var _s_findPos = s.findPos(a, 1), - g = _s_findPos.i, - D = _s_findPos.off, - _s_findPos1 = s.findPos(u, -1), - b = _s_findPos1.i, - B = _s_findPos1.off; - tD(this, b, B, g, D, d, p, m, F); - } - i && this.fixCompositionDOM(i); - } - compositionView(e) { - var t = new Rt(e.text.nodeValue); - t.flags |= 8; + findPointInside(e, t) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = e.marks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _step_value = _step.value, - n = _step_value.deco; - t = new ui(n, [t], t.length); + for (var _iterator = this.points[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + (e.nodeType == 3 ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + Math.min(t, r.offset)); } } catch (err) { _didIteratorError = true; @@ -11897,201 +11693,244 @@ function _ts_generator(thisArg, body) { } } } - var i = new Re(); - return i.append(t, 0), i; } - fixCompositionDOM(e) { - var t = h((s, o) => { - (o.flags |= 8 | (o.children.some((u) => u.flags & 7) ? 1 : 0)), this.markedForComposition.add(o); - var l = Fe.get(s); - l && l != o && (l.dom = null), o.setDOM(s); - }, "fix"), - i = this.childPos(e.range.fromB, 1), - n = this.children[i.i]; - t(e.line, n); - for (var s = e.marks.length - 1; s >= -1; s--) (i = n.childPos(i.off, 1)), (n = n.children[i.i]), t(s >= 0 ? e.marks[s].node : e.text, n); + constructor(e, t) { + (this.points = e), (this.text = ""), (this.lineSeparator = t.facet(Ae.lineSeparator)); + } + }), + (() => { + a(_class42, "DOMReader"); + })(), + _class42); + function sg(i) { + return i.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(i.nodeName); + } + a(sg, "isBlockElement"); + var no = + ((_class43 = class _class { + constructor(e, t) { + (this.node = e), (this.offset = t), (this.pos = -1); + } + }), + (() => { + a(_class43, "DOMPoint"); + })(), + _class43), + so = + ((_class44 = class _class extends Ce { + get length() { + return this.view.state.doc.length; + } + update(e) { + var t = e.changedRanges; + this.minWidth > 0 && + t.length && + (t.every((param) => { + var o = param.fromA, + u = param.toA; + return u < this.minWidthFrom || o > this.minWidthTo; + }) + ? ((this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1)), (this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1))) + : (this.minWidth = this.minWidthFrom = this.minWidthTo = 0)), + this.view.inputState.composing < 0 ? (this.compositionDeco = he.none) : (e.transactions.length || this.dirty) && (this.compositionDeco = Xv(this.view, e.changes)), + (W.ie || W.chrome) && !this.compositionDeco.size && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0); + var r = this.decorations, + n = this.updateDeco(), + s = Jv(r, n, e.changes); + return (t = ei.extendWithRanges(t, s)), this.dirty == 0 && t.length == 0 ? !1 : (this.updateInner(t, e.startState.doc.length), e.transactions.length && (this.lastUpdate = Date.now()), !0); + } + updateInner(e, t) { + (this.view.viewState.mustMeasureContent = !0), this.updateChildren(e, t); + var _this_view = this.view, + r = _this_view.observer; + r.ignore(() => { + (this.dom.style.height = this.view.viewState.contentHeight + "px"), (this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : ""); + var s = W.chrome || W.ios ? { node: r.selectionRange.focusNode, written: !1 } : void 0; + this.sync(this.view, s), (this.dirty = 0), s && (s.written || r.selectionRange.focusNode != s.node) && (this.forceSelection = !0), (this.dom.style.height = ""); + }); + var n = []; + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; + if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length) + try { + for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var s = _step.value; + s instanceof an && s.widget instanceof oo && n.push(s.dom); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + r.updateGaps(n); + } + updateChildren(e, t) { + var r = this.childCursor(t); + for (var n = e.length - 1; ; n--) { + var s = n >= 0 ? e[n] : null; + if (!s) break; + var o = s.fromA, + u = s.toA, + l = s.fromB, + h = s.toB, + _ra_build = ra.build(this.view.state.doc, l, h, this.decorations, this.dynamicDecorationMap), + c = _ra_build.content, + f = _ra_build.breakAtStart, + d = _ra_build.openStart, + p = _ra_build.openEnd, + _r_findPos = r.findPos(u, 1), + m = _r_findPos.i, + b = _r_findPos.off, + _r_findPos1 = r.findPos(o, -1), + g = _r_findPos1.i, + D = _r_findPos1.off; + Pg(this, g, D, m, b, c, f, d, p); + } } updateSelection() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange(); - var i = this.view.root.activeElement, - n = i == this.dom, - s = !n && eo(this.dom, this.view.observer.selectionRange) && !(i && this.dom.contains(i)); + var r = this.view.root.activeElement, + n = r == this.dom, + s = !n && zs(this.dom, this.view.observer.selectionRange) && !(r && this.dom.contains(r)); if (!(n || t || s)) return; var o = this.forceSelection; this.forceSelection = !1; - var l = this.view.state.selection.main, - u = this.moveToLine(this.domAtPos(l.anchor)), - a = l.empty ? u : this.moveToLine(this.domAtPos(l.head)); - if (W.gecko && l.empty && !this.hasComposition && Fx(u)) { + var u = this.view.state.selection.main, + l = this.domAtPos(u.anchor), + h = u.empty ? l : this.domAtPos(u.head); + if (W.gecko && u.empty && !this.compositionDeco.size && Kv(l)) { var f = document.createTextNode(""); - this.view.observer.ignore(() => u.node.insertBefore(f, u.node.childNodes[u.offset] || null)), (u = a = new ze(f, 0)), (o = !0); + this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), (l = h = new Ne(f, 0)), (o = !0); } var c = this.view.observer.selectionRange; - (o || !c.focusNode || ((!hn(u.node, u.offset, c.anchorNode, c.anchorOffset) || !hn(a.node, a.offset, c.focusNode, c.focusOffset)) && !this.suppressWidgetCursorChange(c, l))) && + (o || !c.focusNode || !Ks(l.node, l.offset, c.anchorNode, c.anchorOffset) || !Ks(h.node, h.offset, c.focusNode, c.focusOffset)) && (this.view.observer.ignore(() => { - W.android && W.chrome && this.dom.contains(c.focusNode) && Bx(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); - var f = oo(this.view.root); + W.android && W.chrome && this.dom.contains(c.focusNode) && Zv(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 })); + var f = Ys(this.view.root); if (f) - if (l.empty) { + if (u.empty) { if (W.gecko) { - var d = yx(u.node, u.offset); + var d = Qv(l.node, l.offset); if (d && d != 3) { - var p = (d == 1 ? Zg : eD)(u.node, u.offset); - p && (u = new ze(p.node, p.offset)); + var p = lD(l.node, l.offset, d == 1 ? 1 : -1); + p && (l = new Ne(p, d == 1 ? 0 : p.nodeValue.length)); } } - f.collapse(u.node, u.offset), l.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = l.bidiLevel); + f.collapse(l.node, l.offset), u.bidiLevel != null && c.cursorBidiLevel != null && (c.cursorBidiLevel = u.bidiLevel); } else if (f.extend) { - f.collapse(u.node, u.offset); + f.collapse(l.node, l.offset); try { - f.extend(a.node, a.offset); + f.extend(h.node, h.offset); } catch (e) {} } else { var d1 = document.createRange(); var ref; - l.anchor > l.head && ((ref = [a, u]), (u = ref[0]), (a = ref[1]), ref), d1.setEnd(a.node, a.offset), d1.setStart(u.node, u.offset), f.removeAllRanges(), f.addRange(d1); + u.anchor > u.head && ((ref = [h, l]), (l = ref[0]), (h = ref[1]), ref), d1.setEnd(h.node, h.offset), d1.setStart(l.node, l.offset), f.removeAllRanges(), f.addRange(d1); } - s && this.view.root.activeElement == this.dom && (this.dom.blur(), i && i.focus()); + s && this.view.root.activeElement == this.dom && (this.dom.blur(), r && r.focus()); }), - this.view.observer.setSelectionRange(u, a)), - (this.impreciseAnchor = u.precise ? null : new ze(c.anchorNode, c.anchorOffset)), - (this.impreciseHead = a.precise ? null : new ze(c.focusNode, c.focusOffset)); - } - suppressWidgetCursorChange(e, t) { - return this.hasComposition && t.empty && hn(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == t.head; + this.view.observer.setSelectionRange(l, h)), + (this.impreciseAnchor = l.precise ? null : new Ne(c.anchorNode, c.anchorOffset)), + (this.impreciseHead = h.precise ? null : new Ne(c.focusNode, c.focusOffset)); } enforceCursorAssoc() { - if (this.hasComposition) return; + if (this.compositionDeco.size) return; var _this = this, e = _this.view, t = e.state.selection.main, - i = oo(e.root), + r = Ys(e.root), _e_observer_selectionRange = e.observer.selectionRange, n = _e_observer_selectionRange.anchorNode, s = _e_observer_selectionRange.anchorOffset; - if (!i || !t.empty || !t.assoc || !i.modify) return; - var o = Re.find(this, t.head); + if (!r || !t.empty || !t.assoc || !r.modify) return; + var o = at.find(this, t.head); if (!o) return; - var l = o.posAtStart; - if (t.head == l || t.head == l + o.length) return; - var u = this.coordsAt(t.head, -1), - a = this.coordsAt(t.head, 1); - if (!u || !a || u.bottom > a.top) return; + var u = o.posAtStart; + if (t.head == u || t.head == u + o.length) return; + var l = this.coordsAt(t.head, -1), + h = this.coordsAt(t.head, 1); + if (!l || !h || l.bottom > h.top) return; var c = this.domAtPos(t.head + t.assoc); - i.collapse(c.node, c.offset), i.modify("move", t.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange(); + r.collapse(c.node, c.offset), r.modify("move", t.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange(); var f = e.observer.selectionRange; - e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != t.from && i.collapse(n, s); - } - moveToLine(e) { - var t = this.dom, - i; - if (e.node != t) return e; - for (var n = e.offset; !i && n < t.childNodes.length; n++) { - var s = Fe.get(t.childNodes[n]); - s instanceof Re && (i = s.domAtPos(0)); - } - for (var n1 = e.offset - 1; !i && n1 >= 0; n1--) { - var s1 = Fe.get(t.childNodes[n1]); - s1 instanceof Re && (i = s1.domAtPos(s1.length)); - } - return i ? new ze(i.node, i.offset, !0) : e; + e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != t.from && r.collapse(n, s); } nearest(e) { for (var t = e; t; ) { - var i = Fe.get(t); - if (i && i.rootView == this) return i; + var r = Ce.get(t); + if (r && r.rootView == this) return r; t = t.parentNode; } return null; } posFromDOM(e, t) { - var i = this.nearest(e); - if (!i) throw new RangeError("Trying to find position for a DOM position outside of the document"); - return i.localPosFromDOM(e, t) + i.posAtStart; + var r = this.nearest(e); + if (!r) throw new RangeError("Trying to find position for a DOM position outside of the document"); + return r.localPosFromDOM(e, t) + r.posAtStart; } domAtPos(e) { var _this_childCursor_findPos = this.childCursor().findPos(e, -1), t = _this_childCursor_findPos.i, - i = _this_childCursor_findPos.off; + r = _this_childCursor_findPos.off; for (; t < this.children.length - 1; ) { var n = this.children[t]; - if (i < n.length || n instanceof Re) break; - t++, (i = 0); + if (r < n.length || n instanceof at) break; + t++, (r = 0); } - return this.children[t].domAtPos(i); + return this.children[t].domAtPos(r); } coordsAt(e, t) { - var i = null, - n = 0; - for (var s = this.length, o = this.children.length - 1; o >= 0; o--) { - var l = this.children[o], - u = s - l.breakAfter, - a = u - l.length; - if (u < e) break; - a <= e && (a < e || l.covers(-1)) && (u > e || l.covers(1)) && (!i || (l instanceof Re && !(i instanceof Re && t >= 0))) && ((i = l), (n = a)), (s = a); - } - return i ? i.coordsAt(e - n, t) : null; - } - coordsForChar(e) { - var _this_childPos = this.childPos(e, 1), - t = _this_childPos.i, - i = _this_childPos.off, - n = this.children[t]; - if (!(n instanceof Re)) return null; - for (; n.children.length; ) { - var _n_childPos = n.childPos(i, 1), - l = _n_childPos.i, - u = _n_childPos.off; - for (; ; l++) { - if (l == n.children.length) return null; - if ((n = n.children[l]).length) break; - } - i = u; - } - if (!(n instanceof Rt)) return null; - var s = ht(n.text, i); - if (s == i) return null; - var o = _i(n.dom, i, s).getClientRects(); - for (var l1 = 0; l1 < o.length; l1++) { - var u1 = o[l1]; - if (l1 == o.length - 1 || (u1.top < u1.bottom && u1.left < u1.right)) return u1; + for (var r = this.length, n = this.children.length - 1; ; n--) { + var s = this.children[n], + o = r - s.breakAfter - s.length; + if (e > o || (e == o && s.type != xe.WidgetBefore && s.type != xe.WidgetAfter && (!n || t == 2 || this.children[n - 1].breakAfter || (this.children[n - 1].type == xe.WidgetBefore && t > -2)))) return s.coordsAt(e - o, t); + r = o; } - return null; } measureVisibleLineHeights(e) { var t = [], - i = e.from, + r = e.from, n = e.to, s = this.view.contentDOM.clientWidth, o = s > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, - l = -1, - u = this.view.textDirection == Be.LTR; - for (var a = 0, c = 0; c < this.children.length; c++) { + u = -1, + l = this.view.textDirection == Se.LTR; + for (var h = 0, c = 0; c < this.children.length; c++) { var f = this.children[c], - d = a + f.length; + d = h + f.length; if (d > n) break; - if (a >= i) { + if (h >= r) { var p = f.dom.getBoundingClientRect(); if ((t.push(p.height), o)) { var m = f.dom.lastChild, - F = m ? gn(m) : []; - if (F.length) { - var g = F[F.length - 1], - D = u ? g.right - p.left : p.right - g.left; - D > l && ((l = D), (this.minWidth = s), (this.minWidthFrom = a), (this.minWidthTo = d)); + b = m ? sn(m) : []; + if (b.length) { + var g = b[b.length - 1], + D = l ? g.right - p.left : p.right - g.left; + D > u && ((u = D), (this.minWidth = s), (this.minWidthFrom = h), (this.minWidthTo = d)); } } } - a = d + f.breakAfter; + h = d + f.breakAfter; } return t; } textDirectionAt(e) { var _this_childPos = this.childPos(e, 1), t = _this_childPos.i; - return getComputedStyle(this.children[t].dom).direction == "rtl" ? Be.RTL : Be.LTR; + return getComputedStyle(this.children[t].dom).direction == "rtl" ? Se.RTL : Se.LTR; } measureTextSize() { var _iteratorNormalCompletion = true, @@ -12100,7 +11939,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; - if (s instanceof Re) { + if (s instanceof at) { var o = s.measureTextSize(); if (o) return o; } @@ -12121,105 +11960,61 @@ function _ts_generator(thisArg, body) { } var e = document.createElement("div"), t, - i, + r, n; return ( (e.className = "cm-line"), (e.style.width = "99999px"), - (e.style.position = "absolute"), (e.textContent = "abc def ghi jkl mno pqr stu"), this.view.observer.ignore(() => { this.dom.appendChild(e); - var s = gn(e.firstChild)[0]; - (t = e.getBoundingClientRect().height), (i = s ? s.width / 27 : 7), (n = s ? s.height : t), e.remove(); + var s = sn(e.firstChild)[0]; + (t = e.getBoundingClientRect().height), (r = s ? s.width / 27 : 7), (n = s ? s.height : t), e.remove(); }), - { lineHeight: t, charWidth: i, textHeight: n } + { lineHeight: t, charWidth: r, textHeight: n } ); } childCursor() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.length; var t = this.children.length; - return t && (e -= this.children[--t].length), new uo(this.children, e, t); + return t && (e -= this.children[--t].length), new Qs(this.children, e, t); } computeBlockGapDeco() { var e = [], t = this.view.viewState; - for (var i = 0, n = 0; ; n++) { + for (var r = 0, n = 0; ; n++) { var s = n == t.viewports.length ? null : t.viewports[n], o = s ? s.from - 1 : this.length; - if (o > i) { - var l = (t.lineBlockAt(o).bottom - t.lineBlockAt(i).top) / this.view.scaleY; - e.push(pe.replace({ widget: new co(l), block: !0, inclusive: !0, isBlockGap: !0 }).range(i, o)); + if (o > r) { + var u = t.lineBlockAt(o).bottom - t.lineBlockAt(r).top; + e.push(he.replace({ widget: new oo(u), block: !0, inclusive: !0, isBlockGap: !0 }).range(r, o)); } if (!s) break; - i = s.to + 1; + r = s.to + 1; } - return pe.set(e); + return he.set(e); } updateDeco() { - var e = 0, - t = this.view.state.facet(En).map((s) => ((this.dynamicDecorationMap[e++] = typeof s == "function") ? s(this.view) : s)), - i = !1, - n = this.view.state.facet(vD).map((s, o) => { - var l = typeof s == "function"; - return l && (i = !0), l ? s(this.view) : s; - }); - for (n.length && ((this.dynamicDecorationMap[e++] = i), t.push(De.join(n))), this.decorations = [...t, this.computeBlockGapDeco(), this.view.viewState.lineGapDeco]; e < this.decorations.length; ) this.dynamicDecorationMap[e++] = !1; - return this.decorations; + var e = this.view.state.facet(hn).map((t, r) => ((this.dynamicDecorationMap[r] = typeof t == "function") ? t(this.view) : t)); + for (var t = e.length; t < e.length + 3; t++) this.dynamicDecorationMap[t] = !1; + return (this.decorations = [...e, this.compositionDeco, this.computeBlockGapDeco(), this.view.viewState.lineGapDeco]); } scrollIntoView(e) { - if (e.isSnapshot) { - var a = this.view.viewState.lineBlockAt(e.range.head); - (this.view.scrollDOM.scrollTop = a.top - e.yMargin), (this.view.scrollDOM.scrollLeft = e.xMargin); - return; - } - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = this.view.state.facet(CD)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var a1 = _step.value; - try { - if (a1(this.view, e.range, e)) return !0; - } catch (c) { - Xe(this.view.state, c, "scroll handler"); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } var t = e.range, - i = this.coordsAt(t.head, t.empty ? t.assoc : t.head > t.anchor ? -1 : 1), + r = this.coordsAt(t.head, t.empty ? t.assoc : t.head > t.anchor ? -1 : 1), n; - if (!i) return; - !t.empty && (n = this.coordsAt(t.anchor, t.anchor > t.head ? -1 : 1)) && (i = { left: Math.min(i.left, n.left), top: Math.min(i.top, n.top), right: Math.max(i.right, n.right), bottom: Math.max(i.bottom, n.bottom) }); - var s = kD(this.view), - o = { left: i.left - s.left, top: i.top - s.top, right: i.right + s.right, bottom: i.bottom + s.bottom }, - _this_view_scrollDOM = this.view.scrollDOM, - l = _this_view_scrollDOM.offsetWidth, - u = _this_view_scrollDOM.offsetHeight; - Zv(this.view.scrollDOM, o, t.head < t.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, l), -l), Math.max(Math.min(e.yMargin, u), -u), this.view.textDirection == Be.LTR); + if (!r) return; + !t.empty && (n = this.coordsAt(t.anchor, t.anchor > t.head ? -1 : 1)) && (r = { left: Math.min(r.left, n.left), top: Math.min(r.top, n.top), right: Math.max(r.right, n.right), bottom: Math.max(r.bottom, n.bottom) }); + var s = rD(this.view), + o = { left: r.left - s.left, top: r.top - s.top, right: r.right + s.right, bottom: r.bottom + s.bottom }; + Mv(this.view.scrollDOM, o, t.head < t.anchor ? -1 : 1, e.x, e.y, e.xMargin, e.yMargin, this.view.textDirection == Se.LTR); } constructor(e) { super(), (this.view = e), + (this.compositionDeco = he.none), (this.decorations = []), (this.dynamicDecorationMap = []), - (this.domChanged = null), - (this.hasComposition = null), - (this.markedForComposition = new Set()), - (this.lastCompositionAfterCursor = !1), (this.minWidth = 0), (this.minWidthFrom = 0), (this.minWidthTo = 0), @@ -12228,23 +12023,25 @@ function _ts_generator(thisArg, body) { (this.forceSelection = !1), (this.lastUpdate = Date.now()), this.setDOM(e.contentDOM), - (this.children = [new Re()]), + (this.children = [new at()]), this.children[0].setParent(this), this.updateDeco(), - this.updateInner([new Tt(0, 0, 0, e.state.doc.length)], 0, null); + this.updateInner([new ei(0, 0, 0, e.state.doc.length)], 0); } }), - h(_class41, "DocView"), - _class41); - function Fx(r) { - return r.node.nodeType == 1 && r.node.firstChild && (r.offset == 0 || r.node.childNodes[r.offset - 1].contentEditable == "false") && (r.offset == r.node.childNodes.length || r.node.childNodes[r.offset].contentEditable == "false"); - } - h(Fx, "betweenUneditable"); - var co = - ((_class42 = class _class extends ai { + (() => { + a(_class44, "DocView"); + })(), + _class44); + function Kv(i) { + return i.node.nodeType == 1 && i.node.firstChild && (i.offset == 0 || i.node.childNodes[i.offset - 1].contentEditable == "false") && (i.offset == i.node.childNodes.length || i.node.childNodes[i.offset].contentEditable == "false"); + } + a(Kv, "betweenUneditable"); + var oo = + ((_class45 = class _class extends Ut { toDOM() { var e = document.createElement("div"); - return (e.className = "cm-gap"), this.updateDOM(e), e; + return this.updateDOM(e), e; } eq(e) { return e.height == this.height; @@ -12252,295 +12049,326 @@ function _ts_generator(thisArg, body) { updateDOM(e) { return (e.style.height = this.height + "px"), !0; } - get editable() { - return !0; - } get estimatedHeight() { return this.height; } + constructor(e) { + super(), (this.height = e); + } + }), + (() => { + a(_class45, "BlockGapWidget"); + })(), + _class45); + function uD(i) { + var e = i.observer.selectionRange, + t = e.focusNode && lD(e.focusNode, e.focusOffset, 0); + if (!t) return null; + var r = i.docView.nearest(t); + if (!r) return null; + if (r instanceof at) { + var n = t; + for (; n.parentNode != r.dom; ) n = n.parentNode; + var s = n.previousSibling; + for (; s && !Ce.get(s); ) s = s.previousSibling; + var o = s ? Ce.get(s).posAtEnd : r.posAtStart; + return { from: o, to: o, node: n, text: t }; + } else { + for (;;) { + var s1 = r.parent; + if (!s1) return null; + if (s1 instanceof at) break; + r = s1; + } + var n1 = r.posAtStart; + return { from: n1, to: n1 + r.length, node: r.dom, text: t }; + } + } + a(uD, "compositionSurroundingNode"); + function Xv(i, e) { + var t = uD(i); + if (!t) return he.none; + var r = t.from, + n = t.to, + s = t.node, + o = t.text, + u = e.mapPos(r, 1), + l = Math.max(u, e.mapPos(n, -1)), + h = i.state, + c = new ro([], h); + s.nodeType == 3 ? c.readTextNode(s) : c.readRange(s.firstChild, null); + var f = c.text; + if (f.indexOf(ur) > -1) return he.none; + if (l - u < f.length) + if (h.doc.sliceString(u, Math.min(h.doc.length, u + f.length)) == f) l = u + f.length; + else if (h.doc.sliceString(Math.max(0, l - f.length), l) == f) u = l - f.length; + else return he.none; + else if (h.doc.sliceString(u, l) != f) return he.none; + var d = Ce.get(s); + return d instanceof Js ? (d = d.widget.topView) : d && (d.parent = null), he.set(he.replace({ widget: new ua(s, o, d), inclusive: !0 }).range(u, l)); + } + a(Xv, "computeCompositionDeco"); + var ua = + ((_class46 = class _class extends Ut { + eq(e) { + return this.top == e.top && this.text == e.text; + } + toDOM() { + return this.top; + } ignoreEvent() { return !1; } - constructor(e) { - super(), (this.height = e); + get customView() { + return Js; + } + constructor(e, t, r) { + super(), (this.top = e), (this.text = t), (this.topView = r); } }), - h(_class42, "BlockGapWidget"), - _class42); - function SD(r, e) { - var t = r.observer.selectionRange; - if (!t.focusNode) return null; - var i = Zg(t.focusNode, t.focusOffset), - n = eD(t.focusNode, t.focusOffset), - s = i || n; - if (n && i && n.node != i.node) { - var l = Fe.get(n.node); - if (!l || (l instanceof Rt && l.text != n.node.nodeValue)) s = n; - else if (r.docView.lastCompositionAfterCursor) { - var u = Fe.get(i.node); - !u || (u instanceof Rt && u.text != i.node.nodeValue) || (s = n); + (() => { + a(_class46, "CompositionWidget"); + })(), + _class46); + function lD(i, e, t) { + if (t <= 0) + for (var r = i, n = e; ; ) { + if (r.nodeType == 3) return r; + if (r.nodeType == 1 && n > 0) (r = r.childNodes[n - 1]), (n = ri(r)); + else break; } - } - if (((r.docView.lastCompositionAfterCursor = s != i), !s)) return null; - var o = e - s.offset; - return { from: o, to: o + s.node.nodeValue.length, node: s.node }; - } - h(SD, "findCompositionNode"); - function bx(r, e, t) { - var i = SD(r, t); - if (!i) return null; - var n = i.node, - s = i.from, - o = i.to, - l = n.nodeValue; - if (/[\n\r]/.test(l) || r.state.doc.sliceString(i.from, i.to) != l) return null; - var u = e.invertedDesc, - a = new Tt(u.mapPos(s), u.mapPos(o), s, o), - c = []; - for (var f = n.parentNode; ; f = f.parentNode) { - var d = Fe.get(f); - if (d instanceof ui) c.push({ node: f, deco: d.mark }); - else { - if (d instanceof Re || (f.nodeName == "DIV" && f.parentNode == r.contentDOM)) return { range: a, text: n, marks: c, line: f }; - if (f != r.contentDOM) c.push({ node: f, deco: new bn({ inclusive: !0, attributes: ox(f), tagName: f.tagName.toLowerCase() }) }); - else return null; + if (t >= 0) + for (var r1 = i, n1 = e; ; ) { + if (r1.nodeType == 3) return r1; + if (r1.nodeType == 1 && n1 < r1.childNodes.length && t >= 0) (r1 = r1.childNodes[n1]), (n1 = 0); + else break; } - } + return null; } - h(bx, "findCompositionRange"); - function yx(r, e) { - return r.nodeType != 1 ? 0 : (e && r.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < r.childNodes.length && r.childNodes[e].contentEditable == "false" ? 2 : 0); + a(lD, "nearbyTextNode"); + function Qv(i, e) { + return i.nodeType != 1 ? 0 : (e && i.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < i.childNodes.length && i.childNodes[e].contentEditable == "false" ? 2 : 0); } - h(yx, "nextToUneditable"); - var Ex = - ((_class43 = class _class { + a(Qv, "nextToUneditable"); + var la = + ((_class47 = class _class { compareRange(e, t) { - aa(e, t, this.changes); + ia(e, t, this.changes); } comparePoint(e, t) { - aa(e, t, this.changes); + ia(e, t, this.changes); } constructor() { this.changes = []; } }), - h(_class43, "DecorationComparator"), - _class43); - function Cx(r, e, t) { - var i = new Ex(); - return De.compare(r, e, t, i), i.changes; - } - h(Cx, "findChangedDeco"); - function Bx(r, e) { - for (var t = r; t && t != e; t = t.assignedSlot || t.parentNode) if (t.nodeType == 1 && t.contentEditable == "false") return !0; + (() => { + a(_class47, "DecorationComparator$1"); + })(), + _class47); + function Jv(i, e, t) { + var r = new la(); + return Ee.compare(i, e, t, r), r.changes; + } + a(Jv, "findChangedDeco"); + function Zv(i, e) { + for (var t = i; t && t != e; t = t.assignedSlot || t.parentNode) if (t.nodeType == 1 && t.contentEditable == "false") return !0; return !1; } - h(Bx, "inUneditable"); - function vx(r, e) { - var t = !1; - return ( - e && - r.iterChangedRanges((i, n) => { - i < e.to && n > e.from && (t = !0); - }), - t - ); - } - h(vx, "touchesComposition"); - function xx(r, e) { + a(Zv, "inUneditable"); + function ek(i, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1; - var i = r.charCategorizer(e), - n = r.doc.lineAt(e), + var r = i.charCategorizer(e), + n = i.doc.lineAt(e), s = e - n.from; - if (n.length == 0) return Z.cursor(e); + if (n.length == 0) return Q.cursor(e); s == 0 ? (t = 1) : s == n.length && (t = -1); var o = s, - l = s; - t < 0 ? (o = ht(n.text, s, !1)) : (l = ht(n.text, s)); - var u = i(n.text.slice(o, l)); + u = s; + t < 0 ? (o = yt(n.text, s, !1)) : (u = yt(n.text, s)); + var l = r(n.text.slice(o, u)); for (; o > 0; ) { - var a = ht(n.text, o, !1); - if (i(n.text.slice(a, o)) != u) break; - o = a; + var h = yt(n.text, o, !1); + if (r(n.text.slice(h, o)) != l) break; + o = h; } - for (; l < n.length; ) { - var a1 = ht(n.text, l); - if (i(n.text.slice(l, a1)) != u) break; - l = a1; + for (; u < n.length; ) { + var h1 = yt(n.text, u); + if (r(n.text.slice(u, h1)) != l) break; + u = h1; } - return Z.range(o + n.from, l + n.from); + return Q.range(o + n.from, u + n.from); } - h(xx, "groupAt"); - function Ax(r, e) { - return e.left > r ? e.left - r : Math.max(0, r - e.right); + a(ek, "groupAt"); + function tk(i, e) { + return e.left > i ? e.left - i : Math.max(0, i - e.right); } - h(Ax, "getdx"); - function kx(r, e) { - return e.top > r ? e.top - r : Math.max(0, r - e.bottom); + a(tk, "getdx"); + function ik(i, e) { + return e.top > i ? e.top - i : Math.max(0, i - e.bottom); } - h(kx, "getdy"); - function Xu(r, e) { - return r.top < e.bottom - 1 && r.bottom > e.top + 1; + a(ik, "getdy"); + function Hl(i, e) { + return i.top < e.bottom - 1 && i.bottom > e.top + 1; } - h(Xu, "yOverlap"); - function yg(r, e) { - return e < r.top ? { top: e, left: r.left, right: r.right, bottom: r.bottom } : r; + a(Hl, "yOverlap"); + function og(i, e) { + return e < i.top ? { top: e, left: i.left, right: i.right, bottom: i.bottom } : i; } - h(yg, "upTop"); - function Eg(r, e) { - return e > r.bottom ? { top: r.top, left: r.left, right: r.right, bottom: e } : r; + a(og, "upTop"); + function ug(i, e) { + return e > i.bottom ? { top: i.top, left: i.left, right: i.right, bottom: e } : i; } - h(Eg, "upBot"); - function pa(r, e, t) { - var i, + a(ug, "upBot"); + function aa(i, e, t) { + var r, n, s, o, - l = !1, - u, - a, + u = !1, + l, + h, c, f; - for (var m = r.firstChild; m; m = m.nextSibling) { - var F = gn(m); - for (var g = 0; g < F.length; g++) { - var D = F[g]; - n && Xu(n, D) && (D = yg(Eg(D, n.bottom), n.top)); - var b = Ax(e, D), - B = kx(t, D); - if (b == 0 && B == 0) return m.nodeType == 3 ? Cg(m, e, t) : pa(m, e, t); - if (!i || o > B || (o == B && s > b)) { - (i = m), (n = D), (s = b), (o = B); - var k = B ? (t < D.top ? -1 : 1) : b ? (e < D.left ? -1 : 1) : 0; - l = !k || (k > 0 ? g < F.length - 1 : g > 0); - } - b == 0 ? (t > D.bottom && (!c || c.bottom < D.bottom) ? ((u = m), (c = D)) : t < D.top && (!f || f.top > D.top) && ((a = m), (f = D))) : c && Xu(c, D) ? (c = Eg(c, D.bottom)) : f && Xu(f, D) && (f = yg(f, D.top)); - } - } - if ((c && c.bottom >= t ? ((i = u), (n = c)) : f && f.top <= t && ((i = a), (n = f)), !i)) return { node: r, offset: 0 }; + for (var m = i.firstChild; m; m = m.nextSibling) { + var b = sn(m); + for (var g = 0; g < b.length; g++) { + var D = b[g]; + n && Hl(n, D) && (D = og(ug(D, n.bottom), n.top)); + var F = tk(e, D), + w = ik(t, D); + if (F == 0 && w == 0) return m.nodeType == 3 ? lg(m, e, t) : aa(m, e, t); + if (!r || o > w || (o == w && s > F)) { + (r = m), (n = D), (s = F), (o = w); + var x = w ? (t < D.top ? -1 : 1) : F ? (e < D.left ? -1 : 1) : 0; + u = !x || (x > 0 ? g < b.length - 1 : g > 0); + } + F == 0 ? (t > D.bottom && (!c || c.bottom < D.bottom) ? ((l = m), (c = D)) : t < D.top && (!f || f.top > D.top) && ((h = m), (f = D))) : c && Hl(c, D) ? (c = ug(c, D.bottom)) : f && Hl(f, D) && (f = og(f, D.top)); + } + } + if ((c && c.bottom >= t ? ((r = l), (n = c)) : f && f.top <= t && ((r = h), (n = f)), !r)) return { node: i, offset: 0 }; var d = Math.max(n.left, Math.min(n.right, e)); - if (i.nodeType == 3) return Cg(i, d, t); - if (l && i.contentEditable != "false") return pa(i, d, t); - var p = Array.prototype.indexOf.call(r.childNodes, i) + (e >= (n.left + n.right) / 2 ? 1 : 0); - return { node: r, offset: p }; - } - h(pa, "domPosAtCoords"); - function Cg(r, e, t) { - var i = r.nodeValue.length, + if (r.nodeType == 3) return lg(r, d, t); + if (u && r.contentEditable != "false") return aa(r, d, t); + var p = Array.prototype.indexOf.call(i.childNodes, r) + (e >= (n.left + n.right) / 2 ? 1 : 0); + return { node: i, offset: p }; + } + a(aa, "domPosAtCoords"); + function lg(i, e, t) { + var r = i.nodeValue.length, n = -1, s = 1e9, o = 0; - for (var l = 0; l < i; l++) { - var u = _i(r, l, l + 1).getClientRects(); - for (var a = 0; a < u.length; a++) { - var c = u[a]; + for (var u = 0; u < r; u++) { + var l = dr(i, u, u + 1).getClientRects(); + for (var h = 0; h < l.length; h++) { + var c = l[h]; if (c.top == c.bottom) continue; o || (o = e - c.left); var f = (c.top > t ? c.top - t : t - c.bottom) - 1; if (c.left - 1 <= e && c.right + 1 >= e && f < s) { var d = e >= (c.left + c.right) / 2, p = d; - if (((W.chrome || W.gecko) && _i(r, l).getBoundingClientRect().left == c.right && (p = !d), f <= 0)) return { node: r, offset: l + (p ? 1 : 0) }; - (n = l + (p ? 1 : 0)), (s = f); + if (((W.chrome || W.gecko) && dr(i, u).getBoundingClientRect().left == c.right && (p = !d), f <= 0)) return { node: i, offset: u + (p ? 1 : 0) }; + (n = u + (p ? 1 : 0)), (s = f); } } } - return { node: r, offset: n > -1 ? n : o > 0 ? r.nodeValue.length : 0 }; + return { node: i, offset: n > -1 ? n : o > 0 ? i.nodeValue.length : 0 }; } - h(Cg, "domPosInText"); - function wD(r, e, t) { - var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1; + a(lg, "domPosInText"); + function aD(i, e, t) { + var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1; var n, s; - var o = r.contentDOM.getBoundingClientRect(), - l = o.top + r.viewState.paddingTop, - u, - _r_viewState = r.viewState, - a = _r_viewState.docHeight, + var o = i.contentDOM.getBoundingClientRect(), + u = o.top + i.viewState.paddingTop, + l, + _i_viewState = i.viewState, + h = _i_viewState.docHeight, c = e.x, f = e.y, - d = f - l; + d = f - u; if (d < 0) return 0; - if (d > a) return r.state.doc.length; - for (var k = r.viewState.heightOracle.textHeight / 2, C = !1; (u = r.elementAtHeight(d)), u.type != He.Text; ) - for (; (d = i > 0 ? u.bottom + k : u.top - k), !(d >= 0 && d <= a); ) { - if (C) return t ? null : 0; - (C = !0), (i = -i); - } - f = l + d; - var p = u.from; - if (p < r.viewport.from) return r.viewport.from == 0 ? 0 : t ? null : Bg(r, o, u, c, f); - if (p > r.viewport.to) return r.viewport.to == r.state.doc.length ? r.state.doc.length : t ? null : Bg(r, o, u, c, f); - var m = r.dom.ownerDocument, - F = r.root.elementFromPoint ? r.root : m, - g = F.elementFromPoint(c, f); - g && !r.contentDOM.contains(g) && (g = null), g || ((c = Math.max(o.left + 1, Math.min(o.right - 1, c))), (g = F.elementFromPoint(c, f)), g && !r.contentDOM.contains(g) && (g = null)); + if (d > h) return i.state.doc.length; + for (var x = i.defaultLineHeight / 2, E = !1; (l = i.elementAtHeight(d)), l.type != xe.Text; ) + for (; (d = r > 0 ? l.bottom + x : l.top - x), !(d >= 0 && d <= h); ) { + if (E) return t ? null : 0; + (E = !0), (r = -r); + } + f = u + d; + var p = l.from; + if (p < i.viewport.from) return i.viewport.from == 0 ? 0 : t ? null : ag(i, o, l, c, f); + if (p > i.viewport.to) return i.viewport.to == i.state.doc.length ? i.state.doc.length : t ? null : ag(i, o, l, c, f); + var m = i.dom.ownerDocument, + b = i.root.elementFromPoint ? i.root : m, + g = b.elementFromPoint(c, f); + g && !i.contentDOM.contains(g) && (g = null), g || ((c = Math.max(o.left + 1, Math.min(o.right - 1, c))), (g = b.elementFromPoint(c, f)), g && !i.contentDOM.contains(g) && (g = null)); var D, - b = -1; - if (g && ((n = r.docView.nearest(g)) === null || n === void 0 ? void 0 : n.isEditable) != !1) { + F = -1; + if (g && ((n = i.docView.nearest(g)) === null || n === void 0 ? void 0 : n.isEditable) != !1) { if (m.caretPositionFromPoint) { - var k1 = m.caretPositionFromPoint(c, f); + var x1 = m.caretPositionFromPoint(c, f); var ref; - k1 && ((ref = k1), (D = ref.offsetNode), (b = ref.offset), ref); + x1 && ((ref = x1), (D = ref.offsetNode), (F = ref.offset), ref); } else if (m.caretRangeFromPoint) { - var k2 = m.caretRangeFromPoint(c, f); + var x2 = m.caretRangeFromPoint(c, f); var ref1; - k2 && ((ref1 = k2), (D = ref1.startContainer), (b = ref1.startOffset), ref1, (!r.contentDOM.contains(D) || (W.safari && Sx(D, b, c)) || (W.chrome && wx(D, b, c))) && (D = void 0)); + x2 && ((ref1 = x2), (D = ref1.startContainer), (F = ref1.startOffset), ref1, (!i.contentDOM.contains(D) || (W.safari && rk(D, F, c)) || (W.chrome && nk(D, F, c))) && (D = void 0)); } } - if (!D || !r.docView.dom.contains(D)) { - var k3 = Re.find(r.docView, p); - if (!k3) return d > u.top + u.height / 2 ? u.to : u.from; + if (!D || !i.docView.dom.contains(D)) { + var x3 = at.find(i.docView, p); + if (!x3) return d > l.top + l.height / 2 ? l.to : l.from; var ref2; - (ref2 = pa(k3.dom, c, f)), (D = ref2.node), (b = ref2.offset), ref2; - } - var B = r.docView.nearest(D); - if (!B) return null; - if (B.isWidget && ((s = B.dom) === null || s === void 0 ? void 0 : s.nodeType) == 1) { - var k4 = B.dom.getBoundingClientRect(); - return e.y < k4.top || (e.y <= k4.bottom && e.x <= (k4.left + k4.right) / 2) ? B.posAtStart : B.posAtEnd; - } else return B.localPosFromDOM(D, b) + B.posAtStart; - } - h(wD, "posAtCoords"); - function Bg(r, e, t, i, n) { - var s = Math.round((i - e.left) * r.defaultCharacterWidth); - if (r.lineWrapping && t.height > r.defaultLineHeight * 1.5) { - var l = r.viewState.heightOracle.textHeight, - u = Math.floor((n - t.top - (r.defaultLineHeight - l) * 0.5) / l); - s += u * r.viewState.heightOracle.lineLength; - } - var o = r.state.sliceDoc(t.from, t.to); - return t.from + lg(o, s, r.state.tabSize); - } - h(Bg, "posAtCoordsImprecise"); - function Sx(r, e, t) { - var i; - if (r.nodeType != 3 || e != (i = r.nodeValue.length)) return !1; - for (var n = r.nextSibling; n; n = n.nextSibling) if (n.nodeType != 1 || n.nodeName != "BR") return !1; - return _i(r, i - 1, i).getBoundingClientRect().left > t; - } - h(Sx, "isSuspiciousSafariCaretResult"); - function wx(r, e, t) { + (ref2 = aa(x3.dom, c, f)), (D = ref2.node), (F = ref2.offset), ref2; + } + var w = i.docView.nearest(D); + if (!w) return null; + if (w.isWidget && ((s = w.dom) === null || s === void 0 ? void 0 : s.nodeType) == 1) { + var x4 = w.dom.getBoundingClientRect(); + return e.y < x4.top || (e.y <= x4.bottom && e.x <= (x4.left + x4.right) / 2) ? w.posAtStart : w.posAtEnd; + } else return w.localPosFromDOM(D, F) + w.posAtStart; + } + a(aD, "posAtCoords"); + function ag(i, e, t, r, n) { + var s = Math.round((r - e.left) * i.defaultCharacterWidth); + if (i.lineWrapping && t.height > i.defaultLineHeight * 1.5) { + var u = Math.floor((n - t.top) / i.defaultLineHeight); + s += u * i.viewState.heightOracle.lineLength; + } + var o = i.state.sliceDoc(t.from, t.to); + return t.from + G0(o, s, i.state.tabSize); + } + a(ag, "posAtCoordsImprecise"); + function rk(i, e, t) { + var r; + if (i.nodeType != 3 || e != (r = i.nodeValue.length)) return !1; + for (var n = i.nextSibling; n; n = n.nextSibling) if (n.nodeType != 1 || n.nodeName != "BR") return !1; + return dr(i, r - 1, r).getBoundingClientRect().left > t; + } + a(rk, "isSuspiciousSafariCaretResult"); + function nk(i, e, t) { if (e != 0) return !1; - for (var n = r; ; ) { + for (var n = i; ; ) { var s = n.parentNode; if (!s || s.nodeType != 1 || s.firstChild != n) return !1; if (s.classList.contains("cm-line")) break; n = s; } - var i = r.nodeType == 1 ? r.getBoundingClientRect() : _i(r, 0, Math.max(r.nodeValue.length, 1)).getBoundingClientRect(); - return t - i.left > 5; + var r = i.nodeType == 1 ? i.getBoundingClientRect() : dr(i, 0, Math.max(i.nodeValue.length, 1)).getBoundingClientRect(); + return t - r.left > 5; } - h(wx, "isSuspiciousChromeCaretResult"); - function ma(r, e) { - var t = r.lineBlockAt(e); + a(nk, "isSuspiciousChromeCaretResult"); + function ha(i, e) { + var t = i.lineBlockAt(e); if (Array.isArray(t.type)) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = t.type[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - if (i.to > e || (i.to == e && (i.to == t.to || i.type == He.Text))) return i; + var r = _step.value; + if (r.to > e || (r.to == e && (r.to == t.to || r.type == xe.Text))) return r; } } catch (err) { _didIteratorError = true; @@ -12559,89 +12387,85 @@ function _ts_generator(thisArg, body) { } return t; } - h(ma, "blockAt"); - function Qx(r, e, t, i) { - var n = ma(r, e.head), - s = !i || n.type != He.Text || !(r.lineWrapping || n.widgetLineBreaks) ? null : r.coordsAtPos(e.assoc < 0 && e.head > n.from ? e.head - 1 : e.head); + a(ha, "blockAt"); + function sk(i, e, t, r) { + var n = ha(i, e.head), + s = !r || n.type != xe.Text || !(i.lineWrapping || n.widgetLineBreaks) ? null : i.coordsAtPos(e.assoc < 0 && e.head > n.from ? e.head - 1 : e.head); if (s) { - var o = r.dom.getBoundingClientRect(), - l = r.textDirectionAt(n.from), - u = r.posAtCoords({ x: t == (l == Be.LTR) ? o.right - 1 : o.left + 1, y: (s.top + s.bottom) / 2 }); - if (u != null) return Z.cursor(u, t ? -1 : 1); - } - return Z.cursor(t ? n.to : n.from, t ? -1 : 1); - } - h(Qx, "moveToLineBoundary"); - function vg(r, e, t, i) { - var n = r.state.doc.lineAt(e.head), - s = r.bidiSpans(n), - o = r.textDirectionAt(n.from); - for (var l = e, u = null; ; ) { - var a = mx(n, s, o, l, t), - c = dD; - if (!a) { - if (n.number == (t ? r.state.doc.lines : 1)) return l; - (c = "\n"), (n = r.state.doc.line(n.number + (t ? 1 : -1))), (s = r.bidiSpans(n)), (a = r.visualLineSide(n, !t)); - } - if (u) { - if (!u(c)) return l; + var o = i.dom.getBoundingClientRect(), + u = i.textDirectionAt(n.from), + l = i.posAtCoords({ x: t == (u == Se.LTR) ? o.right - 1 : o.left + 1, y: (s.top + s.bottom) / 2 }); + if (l != null) return Q.cursor(l, t ? -1 : 1); + } + return Q.cursor(t ? n.to : n.from, t ? -1 : 1); + } + a(sk, "moveToLineBoundary"); + function hg(i, e, t, r) { + var n = i.state.doc.lineAt(e.head), + s = i.bidiSpans(n), + o = i.textDirectionAt(n.from); + for (var u = e, l = null; ; ) { + var h = Yv(n, s, o, u, t), + c = oD; + if (!h) { + if (n.number == (t ? i.state.doc.lines : 1)) return u; + (c = "\n"), (n = i.state.doc.line(n.number + (t ? 1 : -1))), (s = i.bidiSpans(n)), (h = Q.cursor(t ? n.from : n.to)); + } + if (l) { + if (!l(c)) return u; } else { - if (!i) return a; - u = i(c); + if (!r) return h; + l = r(c); } - l = a; + u = h; } } - h(vg, "moveByChar"); - function _x(r, e, t) { - var i = r.state.charCategorizer(e), - n = i(t); + a(hg, "moveByChar"); + function ok(i, e, t) { + var r = i.state.charCategorizer(e), + n = r(t); return (s) => { - var o = i(s); - return n == vt.Space && (n = o), n == o; + var o = r(s); + return n == Ft.Space && (n = o), n == o; }; } - h(_x, "byGroup"); - function Ux(r, e, t, i) { + a(ok, "byGroup"); + function uk(i, e, t, r) { var n = e.head, s = t ? 1 : -1; - if (n == (t ? r.state.doc.length : 0)) return Z.cursor(n, e.assoc); + if (n == (t ? i.state.doc.length : 0)) return Q.cursor(n, e.assoc); var o = e.goalColumn, - l, - u = r.contentDOM.getBoundingClientRect(), - a = r.coordsAtPos(n, e.assoc || -1), - c = r.documentTop; - if (a) o == null && (o = a.left - u.left), (l = s < 0 ? a.top : a.bottom); + u, + l = i.contentDOM.getBoundingClientRect(), + h = i.coordsAtPos(n), + c = i.documentTop; + if (h) o == null && (o = h.left - l.left), (u = s < 0 ? h.top : h.bottom); else { - var p = r.viewState.lineBlockAt(n); - o == null && (o = Math.min(u.right - u.left, r.defaultCharacterWidth * (n - p.from))), (l = (s < 0 ? p.top : p.bottom) + c); + var p = i.viewState.lineBlockAt(n); + o == null && (o = Math.min(l.right - l.left, i.defaultCharacterWidth * (n - p.from))), (u = (s < 0 ? p.top : p.bottom) + c); } - var f = u.left + o, - d = i !== null && i !== void 0 ? i : r.viewState.heightOracle.textHeight >> 1; + var f = l.left + o, + d = r !== null && r !== void 0 ? r : i.defaultLineHeight >> 1; for (var p1 = 0; ; p1 += 10) { - var m = l + (d + p1) * s, - F = wD(r, { x: f, y: m }, !1, s); - if (m < u.top || m > u.bottom || (s < 0 ? F < n : F > n)) { - var g = r.docView.coordsForChar(F), - D = !g || m < g.top ? -1 : 1; - return Z.cursor(F, D, void 0, o); - } + var m = u + (d + p1) * s, + b = aD(i, { x: f, y: m }, !1, s); + if (m < l.top || m > l.bottom || (s < 0 ? b < n : b > n)) return Q.cursor(b, e.assoc, void 0, o); } } - h(Ux, "moveVertically"); - function to(r, e, t) { + a(uk, "moveVertically"); + function Hs(i, e, t) { for (;;) { - var i = 0; + var r = 0; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - n.between(e - 1, e + 1, (s, o, l) => { + n.between(e - 1, e + 1, (s, o, u) => { if (e > s && e < o) { - var u = i || t || (e - s < o - e ? -1 : 1); - (e = u < 0 ? s : o), (i = u); + var l = r || t || (e - s < o - e ? -1 : 1); + (e = l < 0 ? s : o), (r = l); } }); } @@ -12659,37 +12483,47 @@ function _ts_generator(thisArg, body) { } } } - if (!i) return e; + if (!r) return e; } } - h(to, "skipAtomicRanges"); - function Ku(r, e, t) { - var i = to( - r.state.facet(Va).map((n) => n(r)), + a(Hs, "skipAtomicRanges"); + function Wl(i, e, t) { + var r = Hs( + i.state.facet(La).map((n) => n(i)), t.from, - e.head > t.from ? -1 : 1, + e.head > t.from ? -1 : 1 ); - return i == t.from ? t : Z.cursor(i, i < t.from ? 1 : -1); + return r == t.from ? t : Q.cursor(r, r < t.from ? 1 : -1); } - h(Ku, "skipAtoms"); - var ga = - ((_class44 = class _class { - setSelectionOrigin(e) { - (this.lastSelectionOrigin = e), (this.lastSelectionTime = Date.now()); - } - handleEvent(e) { - !Px(this.view, e) || this.ignoreDuringComposition(e) || (e.type == "keydown" && this.keydown(e)) || this.runHandlers(e.type, e); - } - runHandlers(e, t) { - var i = this.handlers[e]; - if (i) { + a(Wl, "skipAtoms"); + var ca = + ((_class48 = class _class { + setSelectionOrigin(e) { + (this.lastSelectionOrigin = e), (this.lastSelectionTime = Date.now()); + } + ensureHandlers(e, t) { + var r; + var n; + this.customHandlers = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = i.observers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var n = _step.value; - n(this.view, t); + for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var s = _step.value; + if ((n = (r = s.update(e).spec) === null || r === void 0 ? void 0 : r.domEventHandlers)) { + var _this = this, + _loop = function (o) { + _this.registeredEvents.indexOf(o) < 0 && + o != "scroll" && + (_this.registeredEvents.push(o), + e.contentDOM.addEventListener(o, (u) => { + cg(e, u) && _this.runCustomHandlers(o, e, u) && u.preventDefault(); + })); + }; + this.customHandlers.push({ plugin: s.value, handlers: n }); + for (var o in n) _loop(o); + } } } catch (err) { _didIteratorError = true; @@ -12705,184 +12539,188 @@ function _ts_generator(thisArg, body) { } } } - var _iteratorNormalCompletion1 = true, - _didIteratorError1 = false, - _iteratorError1 = undefined; + } + runCustomHandlers(e, t, r) { + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; try { - for (var _iterator1 = i.handlers[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var n1 = _step1.value; - if (t.defaultPrevented) break; - if (n1(this.view, t)) { - t.preventDefault(); - break; - } + for (var _iterator = this.customHandlers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var n = _step.value; + var s = n.handlers[e]; + if (s) + try { + if (s.call(n.plugin, r, t) || r.defaultPrevented) return !0; + } catch (o) { + ht(t.state, o); + } } } catch (err) { - _didIteratorError1 = true; - _iteratorError1 = err; + _didIteratorError = true; + _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion1 && _iterator1.return != null) { - _iterator1.return(); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } } finally { - if (_didIteratorError1) { - throw _iteratorError1; + if (_didIteratorError) { + throw _iteratorError; } } } + return !1; } - } - ensureHandlers(e) { - var t = Lx(e), - i = this.handlers, - n = this.view.contentDOM; - for (var s in t) - if (s != "scroll") { - var o = !t[s].handlers.length, - l = i[s]; - l && o != !l.handlers.length && (n.removeEventListener(s, this.handleEvent), (l = null)), l || n.addEventListener(s, this.handleEvent, { passive: o }); - } - for (var s1 in i) s1 != "scroll" && !t[s1] && n.removeEventListener(s1, this.handleEvent); - this.handlers = t; - } - keydown(e) { - if (((this.lastKeyCode = e.keyCode), (this.lastKeyTime = Date.now()), e.keyCode == 9 && Date.now() < this.lastEscPress + 2e3)) return !0; - if ((e.keyCode != 27 && _D.indexOf(e.keyCode) < 0 && (this.view.inputState.lastEscPress = 0), W.android && W.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))) return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0; - var t; - return W.ios && !e.synthetic && !e.altKey && !e.metaKey && (((t = QD.find((i) => i.keyCode == e.keyCode)) && !e.ctrlKey) || (Ox.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey)) ? ((this.pendingIOSKey = t || e), setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1); - } - flushIOSKey(e) { - var t = this.pendingIOSKey; - return !t || (t.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString())) ? !1 : ((this.pendingIOSKey = void 0), Fr(this.view.contentDOM, t.key, t.keyCode, t instanceof KeyboardEvent ? t : void 0)); - } - ignoreDuringComposition(e) { - return /^key/.test(e.type) ? (this.composing > 0 ? !0 : W.safari && !W.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? ((this.compositionPendingKey = !1), !0) : !1) : !1; - } - startMouseSelection(e) { - this.mouseSelection && this.mouseSelection.destroy(), (this.mouseSelection = e); - } - update(e) { - this.mouseSelection && this.mouseSelection.update(e), this.draggedContent && e.docChanged && (this.draggedContent = this.draggedContent.map(e.changes)), e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0); - } - destroy() { - this.mouseSelection && this.mouseSelection.destroy(); - } - constructor(e) { - (this.view = e), - (this.lastKeyCode = 0), - (this.lastKeyTime = 0), - (this.lastTouchTime = 0), - (this.lastFocusTime = 0), - (this.lastScrollTop = 0), - (this.lastScrollLeft = 0), - (this.pendingIOSKey = void 0), - (this.lastSelectionOrigin = null), - (this.lastSelectionTime = 0), - (this.lastEscPress = 0), - (this.lastContextMenu = 0), - (this.scrollHandlers = []), - (this.handlers = Object.create(null)), - (this.composing = -1), - (this.compositionFirstChange = null), - (this.compositionEndedAt = 0), - (this.compositionPendingKey = !1), - (this.compositionPendingChange = !1), - (this.mouseSelection = null), - (this.draggedContent = null), - (this.handleEvent = this.handleEvent.bind(this)), - (this.notifiedFocused = e.hasFocus), - W.safari && e.contentDOM.addEventListener("input", () => null), - W.gecko && jx(e.contentDOM.ownerDocument); - } - }), - h(_class44, "InputState"), - _class44); - function xg(r, e) { - return (t, i) => { - try { - return e.call(r, i, t); - } catch (n) { - Xe(t.state, n); - } - }; - } - h(xg, "bindHandler"); - function Lx(r) { - var e = Object.create(null); - function t(i) { - return e[i] || (e[i] = { observers: [], handlers: [] }); - } - h(t, "record"); - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - var n = i.spec; - if (n && n.domEventHandlers) - for (var s in n.domEventHandlers) { - var o = n.domEventHandlers[s]; - o && t(s).handlers.push(xg(i.value, o)); - } - if (n && n.domEventObservers) - for (var s1 in n.domEventObservers) { - var o1 = n.domEventObservers[s1]; - o1 && t(s1).observers.push(xg(i.value, o1)); + runScrollHandlers(e, t) { + (this.lastScrollTop = e.scrollDOM.scrollTop), (this.lastScrollLeft = e.scrollDOM.scrollLeft); + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; + try { + for (var _iterator = this.customHandlers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + var n = r.handlers.scroll; + if (n) + try { + n.call(r.plugin, t, e); + } catch (s) { + ht(e.state, s); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); } - } finally { - if (_didIteratorError) { - throw _iteratorError; + keydown(e, t) { + if (((this.lastKeyCode = t.keyCode), (this.lastKeyTime = Date.now()), t.keyCode == 9 && Date.now() < this.lastEscPress + 2e3)) return !0; + if ((t.keyCode != 27 && cD.indexOf(t.keyCode) < 0 && (e.inputState.lastEscPress = 0), W.android && W.chrome && !t.synthetic && (t.keyCode == 13 || t.keyCode == 8))) return e.observer.delayAndroidKey(t.key, t.keyCode), !0; + var r; + return W.ios && !t.synthetic && !t.altKey && !t.metaKey && (((r = hD.find((n) => n.keyCode == t.keyCode)) && !t.ctrlKey) || (lk.indexOf(t.key) > -1 && t.ctrlKey && !t.shiftKey)) ? ((this.pendingIOSKey = r || t), setTimeout(() => this.flushIOSKey(e), 250), !0) : !1; } - } - } - for (var i1 in xt) t(i1).handlers.push(xt[i1]); - for (var i2 in pt) t(i2).observers.push(pt[i2]); - return e; - } - h(Lx, "computeHandlers"); - var QD = [ + flushIOSKey(e) { + var t = this.pendingIOSKey; + return t ? ((this.pendingIOSKey = void 0), cr(e.contentDOM, t.key, t.keyCode)) : !1; + } + ignoreDuringComposition(e) { + return /^key/.test(e.type) ? (this.composing > 0 ? !0 : W.safari && !W.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? ((this.compositionPendingKey = !1), !0) : !1) : !1; + } + mustFlushObserver(e) { + return e.type == "keydown" && e.keyCode != 229; + } + startMouseSelection(e) { + this.mouseSelection && this.mouseSelection.destroy(), (this.mouseSelection = e); + } + update(e) { + this.mouseSelection && this.mouseSelection.update(e), e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0); + } + destroy() { + this.mouseSelection && this.mouseSelection.destroy(); + } + constructor(e) { + var _this = this, + _loop = function (r) { + var n = Te[r]; + e.contentDOM.addEventListener( + r, + (s) => { + cg(e, s) && t(n, s); + }, + da[r] + ), + _this.registeredEvents.push(r); + }; + (this.lastKeyCode = 0), + (this.lastKeyTime = 0), + (this.lastTouchTime = 0), + (this.lastFocusTime = 0), + (this.lastScrollTop = 0), + (this.lastScrollLeft = 0), + (this.chromeScrollHack = -1), + (this.pendingIOSKey = void 0), + (this.lastSelectionOrigin = null), + (this.lastSelectionTime = 0), + (this.lastEscPress = 0), + (this.lastContextMenu = 0), + (this.scrollHandlers = []), + (this.registeredEvents = []), + (this.customHandlers = []), + (this.composing = -1), + (this.compositionFirstChange = null), + (this.compositionEndedAt = 0), + (this.compositionPendingKey = !1), + (this.compositionPendingChange = !1), + (this.mouseSelection = null); + var t = a((r, n) => { + this.ignoreDuringComposition(n) || (n.type == "keydown" && this.keydown(e, n)) || (this.mustFlushObserver(n) && e.observer.forceFlush(), this.runCustomHandlers(n.type, e, n) ? n.preventDefault() : r(e, n)); + }, "handleEvent"); + for (var r in Te) _loop(r); + e.scrollDOM.addEventListener("mousedown", (r) => { + if (r.target == e.scrollDOM && r.clientY > e.contentDOM.getBoundingClientRect().bottom && (t(Te.mousedown, r), !r.defaultPrevented && r.button == 2)) { + var n = e.contentDOM.style.minHeight; + (e.contentDOM.style.minHeight = "100%"), setTimeout(() => (e.contentDOM.style.minHeight = n), 200); + } + }), + e.scrollDOM.addEventListener("drop", (r) => { + r.target == e.scrollDOM && r.clientY > e.contentDOM.getBoundingClientRect().bottom && t(Te.drop, r); + }), + W.chrome && + W.chrome_version == 102 && + e.scrollDOM.addEventListener( + "wheel", + () => { + this.chromeScrollHack < 0 ? (e.contentDOM.style.pointerEvents = "none") : window.clearTimeout(this.chromeScrollHack), + (this.chromeScrollHack = setTimeout(() => { + (this.chromeScrollHack = -1), (e.contentDOM.style.pointerEvents = ""); + }, 100)); + }, + { passive: !0 } + ), + (this.notifiedFocused = e.hasFocus), + W.safari && e.contentDOM.addEventListener("input", () => null); + } + }), + (() => { + a(_class48, "InputState"); + })(), + _class48), + hD = [ { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" }, { key: "Enter", keyCode: 13, inputType: "insertParagraph" }, - { key: "Enter", keyCode: 13, inputType: "insertLineBreak" }, { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }, ], - Ox = "dthko", - _D = [16, 17, 18, 20, 91, 92, 224, 225], - js = 6; - function Ys(r) { - return Math.max(0, r) * 0.7 + 8; - } - h(Ys, "dragScrollSpeed"); - function Tx(r, e) { - return Math.max(Math.abs(r.clientX - e.clientX), Math.abs(r.clientY - e.clientY)); - } - h(Tx, "dist"); - var Da = - ((_class45 = class _class { + lk = "dthko", + cD = [16, 17, 18, 20, 91, 92, 224, 225], + $s = 6; + function Ps(i) { + return Math.max(0, i) * 0.7 + 8; + } + a(Ps, "dragScrollSpeed"); + var fa = + ((_class49 = class _class { start(e) { - this.dragging === !1 && this.select(e); + this.dragging === !1 && (e.preventDefault(), this.select(e)); } move(e) { var t; if (e.buttons == 0) return this.destroy(); - if (this.dragging || (this.dragging == null && Tx(this.startEvent, e) < 10)) return; + if (this.dragging !== !1) return; this.select((this.lastEvent = e)); - var i = 0, + var r = 0, n = 0, s = ((t = this.scrollParent) === null || t === void 0 ? void 0 : t.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, - o = kD(this.view); - e.clientX - o.left <= s.left + js ? (i = -Ys(s.left - e.clientX)) : e.clientX + o.right >= s.right - js && (i = Ys(e.clientX - s.right)), e.clientY - o.top <= s.top + js ? (n = -Ys(s.top - e.clientY)) : e.clientY + o.bottom >= s.bottom - js && (n = Ys(e.clientY - s.bottom)), this.setScrollSpeed(i, n); + o = rD(this.view); + e.clientX - o.left <= s.left + $s ? (r = -Ps(s.left - e.clientX)) : e.clientX + o.right >= s.right - $s && (r = Ps(e.clientX - s.right)), e.clientY - o.top <= s.top + $s ? (n = -Ps(s.top - e.clientY)) : e.clientY + o.bottom >= s.bottom - $s && (n = Ps(e.clientY - s.bottom)), this.setScrollSpeed(r, n); } up(e) { this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy(); @@ -12890,7 +12728,7 @@ function _ts_generator(thisArg, body) { destroy() { this.setScrollSpeed(0, 0); var e = this.view.contentDOM.ownerDocument; - e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), (this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null); + e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), (this.view.inputState.mouseSelection = null); } setScrollSpeed(e, t) { (this.scrollSpeed = { x: e, y: t }), e || t ? this.scrolling < 0 && (this.scrolling = setInterval(() => this.scroll(), 50)) : this.scrolling > -1 && (clearInterval(this.scrolling), (this.scrolling = -1)); @@ -12900,128 +12738,130 @@ function _ts_generator(thisArg, body) { } skipAtoms(e) { var t = null; - for (var i = 0; i < e.ranges.length; i++) { - var n = e.ranges[i], + for (var r = 0; r < e.ranges.length; r++) { + var n = e.ranges[r], s = null; if (n.empty) { - var o = to(this.atoms, n.from, 0); - o != n.from && (s = Z.cursor(o, -1)); + var o = Hs(this.atoms, n.from, 0); + o != n.from && (s = Q.cursor(o, -1)); } else { - var o1 = to(this.atoms, n.from, -1), - l = to(this.atoms, n.to, 1); - (o1 != n.from || l != n.to) && (s = Z.range(n.from == n.anchor ? o1 : l, n.from == n.head ? o1 : l)); + var o1 = Hs(this.atoms, n.from, -1), + u = Hs(this.atoms, n.to, 1); + (o1 != n.from || u != n.to) && (s = Q.range(n.from == n.anchor ? o1 : u, n.from == n.head ? o1 : u)); } - s && (t || (t = e.ranges.slice()), (t[i] = s)); + s && (t || (t = e.ranges.slice()), (t[r] = s)); } - return t ? Z.create(t, e.mainIndex) : e; + return t ? Q.create(t, e.mainIndex) : e; } select(e) { var _this = this, t = _this.view, - i = this.skipAtoms(this.style.get(e, this.extend, this.multiple)); - (this.mustSelect || !i.eq(t.state.selection, this.dragging === !1)) && this.view.dispatch({ selection: i, userEvent: "select.pointer" }), (this.mustSelect = !1); + r = this.skipAtoms(this.style.get(e, this.extend, this.multiple)); + (this.mustSelect || !r.eq(t.state.selection) || r.main.assoc != t.state.selection.main.assoc) && this.view.dispatch({ selection: r, userEvent: "select.pointer" }), (this.mustSelect = !1); } update(e) { - this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20); + e.docChanged && this.dragging && (this.dragging = this.dragging.map(e.changes)), this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20); } - constructor(e, t, i, n) { - (this.view = e), (this.startEvent = t), (this.style = i), (this.mustSelect = n), (this.scrollSpeed = { x: 0, y: 0 }), (this.scrolling = -1), (this.lastEvent = t), (this.scrollParent = ex(e.contentDOM)), (this.atoms = e.state.facet(Va).map((o) => o(e))); + constructor(e, t, r, n) { + (this.view = e), (this.style = r), (this.mustSelect = n), (this.scrollSpeed = { x: 0, y: 0 }), (this.scrolling = -1), (this.lastEvent = t), (this.scrollParent = $v(e.contentDOM)), (this.atoms = e.state.facet(La).map((o) => o(e))); var s = e.contentDOM.ownerDocument; - s.addEventListener("mousemove", (this.move = this.move.bind(this))), s.addEventListener("mouseup", (this.up = this.up.bind(this))), (this.extend = t.shiftKey), (this.multiple = e.state.facet(Ae.allowMultipleSelections) && Rx(e, t)), (this.dragging = Mx(e, t) && TD(t) == 1 ? null : !1); + s.addEventListener("mousemove", (this.move = this.move.bind(this))), s.addEventListener("mouseup", (this.up = this.up.bind(this))), (this.extend = t.shiftKey), (this.multiple = e.state.facet(Ae.allowMultipleSelections) && ak(e, t)), (this.dragMove = hk(e, t)), (this.dragging = ck(e, t) && mD(t) == 1 ? null : !1); } }), - h(_class45, "MouseSelection"), - _class45); - function Rx(r, e) { - var t = r.state.facet(pD); + (() => { + a(_class49, "MouseSelection"); + })(), + _class49); + function ak(i, e) { + var t = i.state.facet(Gg); return t.length ? t[0](e) : W.mac ? e.metaKey : e.ctrlKey; } - h(Rx, "addsSelectionRange"); - function Nx(r, e) { - var t = r.state.facet(mD); + a(ak, "addsSelectionRange"); + function hk(i, e) { + var t = i.state.facet(Yg); return t.length ? t[0](e) : W.mac ? !e.altKey : !e.ctrlKey; } - h(Nx, "dragMovesSelection"); - function Mx(r, e) { - var _r_state_selection = r.state.selection, - t = _r_state_selection.main; + a(hk, "dragMovesSelection"); + function ck(i, e) { + var _i_state_selection = i.state.selection, + t = _i_state_selection.main; if (t.empty) return !1; - var i = oo(r.root); - if (!i || i.rangeCount == 0) return !0; - var n = i.getRangeAt(0).getClientRects(); + var r = Ys(i.root); + if (!r || r.rangeCount == 0) return !0; + var n = r.getRangeAt(0).getClientRects(); for (var s = 0; s < n.length; s++) { var o = n[s]; if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY) return !0; } return !1; } - h(Mx, "isInPrimarySelection"); - function Px(r, e) { + a(ck, "isInPrimarySelection"); + function cg(i, e) { if (!e.bubbles) return !0; if (e.defaultPrevented) return !1; - for (var t = e.target, i; t != r.contentDOM; t = t.parentNode) if (!t || t.nodeType == 11 || ((i = Fe.get(t)) && i.ignoreEvent(e))) return !1; + for (var t = e.target, r; t != i.contentDOM; t = t.parentNode) if (!t || t.nodeType == 11 || ((r = Ce.get(t)) && r.ignoreEvent(e))) return !1; return !0; } - h(Px, "eventBelongsToEditor"); - var xt = Object.create(null), - pt = Object.create(null), - UD = (W.ie && W.ie_version < 15) || (W.ios && W.webkit_version < 604); - function Ix(r) { - var e = r.dom.parentNode; + a(cg, "eventBelongsToEditor"); + var Te = Object.create(null), + da = Object.create(null), + fD = (W.ie && W.ie_version < 15) || (W.ios && W.webkit_version < 604); + function fk(i) { + var e = i.dom.parentNode; if (!e) return; var t = e.appendChild(document.createElement("textarea")); (t.style.cssText = "position: fixed; left: -10000px; top: 10px"), t.focus(), setTimeout(() => { - r.focus(), t.remove(), LD(r, t.value); + i.focus(), t.remove(), dD(i, t.value); }, 50); } - h(Ix, "capturePaste"); - function LD(r, e) { - var t = r.state, - i, + a(fk, "capturePaste"); + function dD(i, e) { + var t = i.state, + r, n = 1, s = t.toText(e), o = s.lines == t.selection.ranges.length; - if (Fa != null && t.selection.ranges.every((u) => u.empty) && Fa == s.toString()) { - var u = -1; - i = t.changeByRange((a) => { - var c = t.doc.lineAt(a.from); - if (c.from == u) return { range: a }; - u = c.from; + if (pa != null && t.selection.ranges.every((l) => l.empty) && pa == s.toString()) { + var l = -1; + r = t.changeByRange((h) => { + var c = t.doc.lineAt(h.from); + if (c.from == l) return { range: h }; + l = c.from; var f = t.toText((o ? s.line(n++).text : e) + t.lineBreak); - return { changes: { from: c.from, insert: f }, range: Z.cursor(a.from + f.length) }; + return { changes: { from: c.from, insert: f }, range: Q.cursor(h.from + f.length) }; }); } else o - ? (i = t.changeByRange((u) => { - var a = s.line(n++); - return { changes: { from: u.from, to: u.to, insert: a.text }, range: Z.cursor(u.from + a.length) }; + ? (r = t.changeByRange((l) => { + var h = s.line(n++); + return { changes: { from: l.from, to: l.to, insert: h.text }, range: Q.cursor(l.from + h.length) }; })) - : (i = t.replaceSelection(s)); - r.dispatch(i, { userEvent: "input.paste", scrollIntoView: !0 }); + : (r = t.replaceSelection(s)); + i.dispatch(r, { userEvent: "input.paste", scrollIntoView: !0 }); } - h(LD, "doPaste"); - pt.scroll = (r) => { - (r.inputState.lastScrollTop = r.scrollDOM.scrollTop), (r.inputState.lastScrollLeft = r.scrollDOM.scrollLeft); + a(dD, "doPaste"); + Te.keydown = (i, e) => { + i.inputState.setSelectionOrigin("select"), e.keyCode == 27 && (i.inputState.lastEscPress = Date.now()); }; - xt.keydown = (r, e) => (r.inputState.setSelectionOrigin("select"), e.keyCode == 27 && (r.inputState.lastEscPress = Date.now()), !1); - pt.touchstart = (r, e) => { - (r.inputState.lastTouchTime = Date.now()), r.inputState.setSelectionOrigin("select.pointer"); + Te.touchstart = (i, e) => { + (i.inputState.lastTouchTime = Date.now()), i.inputState.setSelectionOrigin("select.pointer"); }; - pt.touchmove = (r) => { - r.inputState.setSelectionOrigin("select.pointer"); + Te.touchmove = (i) => { + i.inputState.setSelectionOrigin("select.pointer"); }; - xt.mousedown = (r, e) => { - if ((r.observer.flush(), r.inputState.lastTouchTime > Date.now() - 2e3)) return !1; + da.touchstart = da.touchmove = { passive: !0 }; + Te.mousedown = (i, e) => { + if ((i.observer.flush(), i.inputState.lastTouchTime > Date.now() - 2e3)) return; var t = null; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.state.facet(gD)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - if (((t = i(r, e)), t)) break; + for (var _iterator = i.state.facet(Kg)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + if (((t = r(i, e)), t)) break; } } catch (err) { _didIteratorError = true; @@ -13037,173 +12877,159 @@ function _ts_generator(thisArg, body) { } } } - if ((!t && e.button == 0 && (t = Vx(r, e)), t)) { - var i1 = !r.hasFocus; - r.inputState.startMouseSelection(new Da(r, e, t, i1)), i1 && r.observer.ignore(() => Gg(r.contentDOM)); - var n = r.inputState.mouseSelection; - if (n) return n.start(e), n.dragging === !1; + if ((!t && e.button == 0 && (t = mk(i, e)), t)) { + var r1 = i.root.activeElement != i.contentDOM; + i.inputState.startMouseSelection(new fa(i, e, t, r1)), r1 && i.observer.ignore(() => Mg(i.contentDOM)), i.inputState.mouseSelection && i.inputState.mouseSelection.start(e); } - return !1; }; - function Ag(r, e, t, i) { - if (i == 1) return Z.cursor(e, t); - if (i == 2) return xx(r.state, e, t); + function fg(i, e, t, r) { + if (r == 1) return Q.cursor(e, t); + if (r == 2) return ek(i.state, e, t); { - var n = Re.find(r.docView, e), - s = r.state.doc.lineAt(n ? n.posAtEnd : e), + var n = at.find(i.docView, e), + s = i.state.doc.lineAt(n ? n.posAtEnd : e), o = n ? n.posAtStart : s.from, - l = n ? n.posAtEnd : s.to; - return l < r.state.doc.length && l == s.to && l++, Z.range(o, l); + u = n ? n.posAtEnd : s.to; + return u < i.state.doc.length && u == s.to && u++, Q.range(o, u); } } - h(Ag, "rangeForClick"); - var OD = h((r, e) => r >= e.top && r <= e.bottom, "insideY"), - kg = h((r, e, t) => OD(e, t) && r >= t.left && r <= t.right, "inside"); - function $x(r, e, t, i) { - var n = Re.find(r.docView, e); + a(fg, "rangeForClick"); + var pD = a((i, e) => i >= e.top && i <= e.bottom, "insideY"), + dg = a((i, e, t) => pD(e, t) && i >= t.left && i <= t.right, "inside"); + function dk(i, e, t, r) { + var n = at.find(i.docView, e); if (!n) return 1; var s = e - n.posAtStart; if (s == 0) return 1; if (s == n.length) return -1; var o = n.coordsAt(s, -1); - if (o && kg(t, i, o)) return -1; - var l = n.coordsAt(s, 1); - return l && kg(t, i, l) ? 1 : o && OD(i, o) ? -1 : 1; - } - h($x, "findPositionSide"); - function Sg(r, e) { - var t = r.posAtCoords({ x: e.clientX, y: e.clientY }, !1); - return { pos: t, bias: $x(r, t, e.clientX, e.clientY) }; - } - h(Sg, "queryPos"); - var qx = W.ie && W.ie_version <= 11, - wg = null, - Qg = 0, - _g = 0; - function TD(r) { - if (!qx) return r.detail; - var e = wg, - t = _g; - return (wg = r), (_g = Date.now()), (Qg = !e || (t > Date.now() - 400 && Math.abs(e.clientX - r.clientX) < 2 && Math.abs(e.clientY - r.clientY) < 2) ? (Qg + 1) % 3 : 1); - } - h(TD, "getClickType"); - function Vx(r, e) { - var t = Sg(r, e), - i = TD(e), - n = r.state.selection; + if (o && dg(t, r, o)) return -1; + var u = n.coordsAt(s, 1); + return u && dg(t, r, u) ? 1 : o && pD(r, o) ? -1 : 1; + } + a(dk, "findPositionSide"); + function pg(i, e) { + var t = i.posAtCoords({ x: e.clientX, y: e.clientY }, !1); + return { pos: t, bias: dk(i, t, e.clientX, e.clientY) }; + } + a(pg, "queryPos"); + var pk = W.ie && W.ie_version <= 11, + mg = null, + gg = 0, + Dg = 0; + function mD(i) { + if (!pk) return i.detail; + var e = mg, + t = Dg; + return (mg = i), (Dg = Date.now()), (gg = !e || (t > Date.now() - 400 && Math.abs(e.clientX - i.clientX) < 2 && Math.abs(e.clientY - i.clientY) < 2) ? (gg + 1) % 3 : 1); + } + a(mD, "getClickType"); + function mk(i, e) { + var t = pg(i, e), + r = mD(e), + n = i.state.selection; return { update(s) { s.docChanged && ((t.pos = s.changes.mapPos(t.pos)), (n = n.map(s.changes))); }, - get(s, o, l) { - var u = Sg(r, s), - a, - c = Ag(r, u.pos, u.bias, i); - if (t.pos != u.pos && !o) { - var f = Ag(r, t.pos, t.bias, i), + get(s, o, u) { + var l = pg(i, s), + h, + c = fg(i, l.pos, l.bias, r); + if (t.pos != l.pos && !o) { + var f = fg(i, t.pos, t.bias, r), d = Math.min(f.from, c.from), p = Math.max(f.to, c.to); - c = d < c.from ? Z.range(d, p) : Z.range(p, d); + c = d < c.from ? Q.range(d, p) : Q.range(p, d); } - return o ? n.replaceRange(n.main.extend(c.from, c.to)) : l && i == 1 && n.ranges.length > 1 && (a = Wx(n, u.pos)) ? a : l ? n.addRange(c) : Z.create([c]); + return o ? n.replaceRange(n.main.extend(c.from, c.to)) : u && r == 1 && n.ranges.length > 1 && (h = gk(n, l.pos)) ? h : u ? n.addRange(c) : Q.create([c]); }, }; } - h(Vx, "basicMouseSelection"); - function Wx(r, e) { - for (var t = 0; t < r.ranges.length; t++) { - var _r_ranges_t = r.ranges[t], - i = _r_ranges_t.from, - n = _r_ranges_t.to; - if (i <= e && n >= e) return Z.create(r.ranges.slice(0, t).concat(r.ranges.slice(t + 1)), r.mainIndex == t ? 0 : r.mainIndex - (r.mainIndex > t ? 1 : 0)); + a(mk, "basicMouseSelection"); + function gk(i, e) { + for (var t = 0; t < i.ranges.length; t++) { + var _i_ranges_t = i.ranges[t], + r = _i_ranges_t.from, + n = _i_ranges_t.to; + if (r <= e && n >= e) return Q.create(i.ranges.slice(0, t).concat(i.ranges.slice(t + 1)), i.mainIndex == t ? 0 : i.mainIndex - (i.mainIndex > t ? 1 : 0)); } return null; } - h(Wx, "removeRangeAround"); - xt.dragstart = (r, e) => { - var _r_state = r.state, - _r_state_selection = _r_state.selection, - t = _r_state_selection.main; - if (e.target.draggable) { - var n = r.docView.nearest(e.target); - if (n && n.isWidget) { - var s = n.posAtStart, - o = s + n.length; - (s >= t.to || o <= t.from) && (t = Z.range(s, o)); - } - } - var i = r.inputState; - return i.mouseSelection && (i.mouseSelection.dragging = !0), (i.draggedContent = t), e.dataTransfer && (e.dataTransfer.setData("Text", r.state.sliceDoc(t.from, t.to)), (e.dataTransfer.effectAllowed = "copyMove")), !1; + a(gk, "removeRangeAround"); + Te.dragstart = (i, e) => { + var _i_state = i.state, + _i_state_selection = _i_state.selection, + t = _i_state_selection.main, + _i_inputState = i.inputState, + r = _i_inputState.mouseSelection; + r && (r.dragging = t), e.dataTransfer && (e.dataTransfer.setData("Text", i.state.sliceDoc(t.from, t.to)), (e.dataTransfer.effectAllowed = "copyMove")); }; - xt.dragend = (r) => ((r.inputState.draggedContent = null), !1); - function Ug(r, e, t, i) { + function bg(i, e, t, r) { if (!t) return; - var n = r.posAtCoords({ x: e.clientX, y: e.clientY }, !1), - _r_inputState = r.inputState, - s = _r_inputState.draggedContent, - o = i && s && Nx(r, e) ? { from: s.from, to: s.to } : null, - l = { from: n, insert: t }, - u = r.state.changes(o ? [o, l] : l); - r.focus(), r.dispatch({ changes: u, selection: { anchor: u.mapPos(n, -1), head: u.mapPos(n, 1) }, userEvent: o ? "move.drop" : "input.drop" }), (r.inputState.draggedContent = null); - } - h(Ug, "dropText"); - xt.drop = (r, e) => { - if (!e.dataTransfer) return !1; - if (r.state.readOnly) return !0; + var n = i.posAtCoords({ x: e.clientX, y: e.clientY }, !1); + e.preventDefault(); + var _i_inputState = i.inputState, + s = _i_inputState.mouseSelection, + o = r && s && s.dragging && s.dragMove ? { from: s.dragging.from, to: s.dragging.to } : null, + u = { from: n, insert: t }, + l = i.state.changes(o ? [o, u] : u); + i.focus(), i.dispatch({ changes: l, selection: { anchor: l.mapPos(n, -1), head: l.mapPos(n, 1) }, userEvent: o ? "move.drop" : "input.drop" }); + } + a(bg, "dropText"); + Te.drop = (i, e) => { + if (!e.dataTransfer) return; + if (i.state.readOnly) return e.preventDefault(); var t = e.dataTransfer.files; if (t && t.length) { var _loop = function (o) { - var l = new FileReader(); - (l.onerror = s), - (l.onload = () => { - /[\x00-\x08\x0e-\x1f]{2}/.test(l.result) || (i[o] = l.result), s(); + var u = new FileReader(); + (u.onerror = s), + (u.onload = () => { + /[\x00-\x08\x0e-\x1f]{2}/.test(u.result) || (r[o] = u.result), s(); }), - l.readAsText(t[o]); + u.readAsText(t[o]); }; - var i = Array(t.length), + e.preventDefault(); + var r = Array(t.length), n = 0, - s = h(() => { - ++n == t.length && Ug(r, e, i.filter((o) => o != null).join(r.state.lineBreak), !1); + s = a(() => { + ++n == t.length && bg(i, e, r.filter((o) => o != null).join(i.state.lineBreak), !1); }, "finishFile"); for (var o = 0; o < t.length; o++) _loop(o); - return !0; - } else { - var i1 = e.dataTransfer.getData("Text"); - if (i1) return Ug(r, e, i1, !0), !0; - } - return !1; + } else bg(i, e, e.dataTransfer.getData("Text"), !0); }; - xt.paste = (r, e) => { - if (r.state.readOnly) return !0; - r.observer.flush(); - var t = UD ? null : e.clipboardData; - return t ? (LD(r, t.getData("text/plain") || t.getData("text/uri-list")), !0) : (Ix(r), !1); + Te.paste = (i, e) => { + if (i.state.readOnly) return e.preventDefault(); + i.observer.flush(); + var t = fD ? null : e.clipboardData; + t ? (dD(i, t.getData("text/plain") || t.getData("text/uri-text")), e.preventDefault()) : fk(i); }; - function zx(r, e) { - var t = r.dom.parentNode; + function Dk(i, e) { + var t = i.dom.parentNode; if (!t) return; - var i = t.appendChild(document.createElement("textarea")); - (i.style.cssText = "position: fixed; left: -10000px; top: 10px"), - (i.value = e), - i.focus(), - (i.selectionEnd = e.length), - (i.selectionStart = 0), + var r = t.appendChild(document.createElement("textarea")); + (r.style.cssText = "position: fixed; left: -10000px; top: 10px"), + (r.value = e), + r.focus(), + (r.selectionEnd = e.length), + (r.selectionStart = 0), setTimeout(() => { - i.remove(), r.focus(); + r.remove(), i.focus(); }, 50); } - h(zx, "captureCopy"); - function Hx(r) { + a(Dk, "captureCopy"); + function bk(i) { var e = [], t = [], - i = !1; + r = !1; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.selection.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i.selection.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - n.empty || (e.push(r.sliceDoc(n.from, n.to)), t.push(n)); + n.empty || (e.push(i.sliceDoc(n.from, n.to)), t.push(n)); } } catch (err) { _didIteratorError = true; @@ -13225,11 +13051,11 @@ function _ts_generator(thisArg, body) { _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator1 = r.selection.ranges[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator1 = i.selection.ranges[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { var _step_value = _step1.value, s = _step_value.from; - var o = r.doc.lineAt(s); - o.number > n1 && (e.push(o.text), t.push({ from: o.from, to: Math.min(r.doc.length, o.to + 1) })), (n1 = o.number); + var o = i.doc.lineAt(s); + o.number > n1 && (e.push(o.text), t.push({ from: o.from, to: Math.min(i.doc.length, o.to + 1) })), (n1 = o.number); } } catch (err) { _didIteratorError1 = true; @@ -13245,32 +13071,32 @@ function _ts_generator(thisArg, body) { } } } - i = !0; + r = !0; } - return { text: e.join(r.lineBreak), ranges: t, linewise: i }; - } - h(Hx, "copiedRange"); - var Fa = null; - xt.copy = xt.cut = (r, e) => { - var _Hx = Hx(r.state), - t = _Hx.text, - i = _Hx.ranges, - n = _Hx.linewise; - if (!t && !n) return !1; - (Fa = n ? t : null), e.type == "cut" && !r.state.readOnly && r.dispatch({ changes: i, scrollIntoView: !0, userEvent: "delete.cut" }); - var s = UD ? null : e.clipboardData; - return s ? (s.clearData(), s.setData("text/plain", t), !0) : (zx(r, t), !1); + return { text: e.join(i.lineBreak), ranges: t, linewise: r }; + } + a(bk, "copiedRange"); + var pa = null; + Te.copy = Te.cut = (i, e) => { + var _bk = bk(i.state), + t = _bk.text, + r = _bk.ranges, + n = _bk.linewise; + if (!t && !n) return; + pa = n ? t : null; + var s = fD ? null : e.clipboardData; + s ? (e.preventDefault(), s.clearData(), s.setData("text/plain", t)) : Dk(i, t), e.type == "cut" && !i.state.readOnly && i.dispatch({ changes: r, scrollIntoView: !0, userEvent: "delete.cut" }); }; - var RD = ct.define(); - function ND(r, e) { + var gD = ot.define(); + function DD(i, e) { var t = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.facet(bD)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - var n = i(r, e); + for (var _iterator = i.facet(Jg)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + var n = r(i, e); n && t.push(n); } } catch (err) { @@ -13287,68 +13113,62 @@ function _ts_generator(thisArg, body) { } } } - return t ? r.update({ effects: t, annotations: RD.of(!0) }) : null; + return t ? i.update({ effects: t, annotations: gD.of(!0) }) : null; } - h(ND, "focusChangeTransaction"); - function MD(r) { + a(DD, "focusChangeTransaction"); + function bD(i) { setTimeout(() => { - var e = r.hasFocus; - if (e != r.inputState.notifiedFocused) { - var t = ND(r.state, e); - t ? r.dispatch(t) : r.update([]); + var e = i.hasFocus; + if (e != i.inputState.notifiedFocused) { + var t = DD(i.state, e); + t ? i.dispatch(t) : i.update([]); } }, 10); } - h(MD, "updateForFocusChange"); - pt.focus = (r) => { - (r.inputState.lastFocusTime = Date.now()), !r.scrollDOM.scrollTop && (r.inputState.lastScrollTop || r.inputState.lastScrollLeft) && ((r.scrollDOM.scrollTop = r.inputState.lastScrollTop), (r.scrollDOM.scrollLeft = r.inputState.lastScrollLeft)), MD(r); + a(bD, "updateForFocusChange"); + Te.focus = (i) => { + (i.inputState.lastFocusTime = Date.now()), !i.scrollDOM.scrollTop && (i.inputState.lastScrollTop || i.inputState.lastScrollLeft) && ((i.scrollDOM.scrollTop = i.inputState.lastScrollTop), (i.scrollDOM.scrollLeft = i.inputState.lastScrollLeft)), bD(i); }; - pt.blur = (r) => { - r.observer.clearSelectionRange(), MD(r); + Te.blur = (i) => { + i.observer.clearSelectionRange(), bD(i); }; - pt.compositionstart = pt.compositionupdate = (r) => { - r.inputState.compositionFirstChange == null && (r.inputState.compositionFirstChange = !0), r.inputState.composing < 0 && (r.inputState.composing = 0); + Te.compositionstart = Te.compositionupdate = (i) => { + i.inputState.compositionFirstChange == null && (i.inputState.compositionFirstChange = !0), i.inputState.composing < 0 && (i.inputState.composing = 0); }; - pt.compositionend = (r) => { - (r.inputState.composing = -1), - (r.inputState.compositionEndedAt = Date.now()), - (r.inputState.compositionPendingKey = !0), - (r.inputState.compositionPendingChange = r.observer.pendingRecords().length > 0), - (r.inputState.compositionFirstChange = null), + Te.compositionend = (i) => { + (i.inputState.composing = -1), + (i.inputState.compositionEndedAt = Date.now()), + (i.inputState.compositionPendingKey = !0), + (i.inputState.compositionPendingChange = i.observer.pendingRecords().length > 0), + (i.inputState.compositionFirstChange = null), W.chrome && W.android - ? r.observer.flushSoon() - : r.inputState.compositionPendingChange - ? Promise.resolve().then(() => r.observer.flush()) - : setTimeout(() => { - r.inputState.composing < 0 && r.docView.hasComposition && r.update([]); - }, 50); + ? i.observer.flushSoon() + : i.inputState.compositionPendingChange + ? Promise.resolve().then(() => i.observer.flush()) + : setTimeout(() => { + i.inputState.composing < 0 && i.docView.compositionDeco.size && i.update([]); + }, 50); }; - pt.contextmenu = (r) => { - r.inputState.lastContextMenu = Date.now(); + Te.contextmenu = (i) => { + i.inputState.lastContextMenu = Date.now(); }; - xt.beforeinput = (r, e) => { + Te.beforeinput = (i, e) => { var t; - var i; - if (W.chrome && W.android && (i = QD.find((n) => n.inputType == e.inputType)) && (r.observer.delayAndroidKey(i.key, i.keyCode), i.key == "Backspace" || i.key == "Delete")) { + var r; + if (W.chrome && W.android && (r = hD.find((n) => n.inputType == e.inputType)) && (i.observer.delayAndroidKey(r.key, r.keyCode), r.key == "Backspace" || r.key == "Delete")) { var n = ((t = window.visualViewport) === null || t === void 0 ? void 0 : t.height) || 0; setTimeout(() => { var s; - (((s = window.visualViewport) === null || s === void 0 ? void 0 : s.height) || 0) > n + 10 && r.hasFocus && (r.contentDOM.blur(), r.focus()); + (((s = window.visualViewport) === null || s === void 0 ? void 0 : s.height) || 0) > n + 10 && i.hasFocus && (i.contentDOM.blur(), i.focus()); }, 100); } - return W.ios && e.inputType == "deleteContentForward" && r.observer.flushSoon(), W.safari && e.inputType == "insertText" && r.inputState.composing >= 0 && setTimeout(() => pt.compositionend(r, e), 20), !1; }; - var Lg = new Set(); - function jx(r) { - Lg.has(r) || (Lg.add(r), r.addEventListener("copy", () => {}), r.addEventListener("cut", () => {})); - } - h(jx, "firefoxCopyCutHack"); - var Og = ["pre-wrap", "normal", "pre-line", "break-spaces"], - ba = - ((_class46 = class _class { + var Fg = ["pre-wrap", "normal", "pre-line", "break-spaces"], + ma = + ((_class50 = class _class { heightForGap(e, t) { - var i = this.doc.lineAt(t).number - this.doc.lineAt(e).number + 1; - return this.lineWrapping && (i += Math.max(0, Math.ceil((t - e - i * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * i; + var r = this.doc.lineAt(t).number - this.doc.lineAt(e).number + 1; + return this.lineWrapping && (r += Math.max(0, Math.ceil((t - e - r * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * r; } heightForLine(e) { return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight; @@ -13357,36 +13177,38 @@ function _ts_generator(thisArg, body) { return (this.doc = e), this; } mustRefreshForWrapping(e) { - return Og.indexOf(e) > -1 != this.lineWrapping; + return Fg.indexOf(e) > -1 != this.lineWrapping; } mustRefreshForHeights(e) { var t = !1; - for (var i = 0; i < e.length; i++) { - var n = e[i]; - n < 0 ? i++ : this.heightSamples[Math.floor(n * 10)] || ((t = !0), (this.heightSamples[Math.floor(n * 10)] = !0)); + for (var r = 0; r < e.length; r++) { + var n = e[r]; + n < 0 ? r++ : this.heightSamples[Math.floor(n * 10)] || ((t = !0), (this.heightSamples[Math.floor(n * 10)] = !0)); } return t; } - refresh(e, t, i, n, s, o) { - var l = Og.indexOf(e) > -1, - u = Math.round(t) != Math.round(this.lineHeight) || this.lineWrapping != l; - if (((this.lineWrapping = l), (this.lineHeight = t), (this.charWidth = i), (this.textHeight = n), (this.lineLength = s), u)) { + refresh(e, t, r, n, s, o) { + var u = Fg.indexOf(e) > -1, + l = Math.round(t) != Math.round(this.lineHeight) || this.lineWrapping != u; + if (((this.lineWrapping = u), (this.lineHeight = t), (this.charWidth = r), (this.textHeight = n), (this.lineLength = s), l)) { this.heightSamples = {}; - for (var a = 0; a < o.length; a++) { - var c = o[a]; - c < 0 ? a++ : (this.heightSamples[Math.floor(c * 10)] = !0); + for (var h = 0; h < o.length; h++) { + var c = o[h]; + c < 0 ? h++ : (this.heightSamples[Math.floor(c * 10)] = !0); } } - return u; + return l; } constructor(e) { - (this.lineWrapping = e), (this.doc = fe.empty), (this.heightSamples = {}), (this.lineHeight = 14), (this.charWidth = 7), (this.textHeight = 14), (this.lineLength = 30), (this.heightChanged = !1); + (this.lineWrapping = e), (this.doc = de.empty), (this.heightSamples = {}), (this.lineHeight = 14), (this.charWidth = 7), (this.textHeight = 14), (this.lineLength = 30), (this.heightChanged = !1); } }), - h(_class46, "HeightOracle"), - _class46), - ya = - ((_class47 = class _class { + (() => { + a(_class50, "HeightOracle"); + })(), + _class50), + ga = + ((_class51 = class _class { get more() { return this.index < this.heights.length; } @@ -13394,12 +13216,14 @@ function _ts_generator(thisArg, body) { (this.from = e), (this.heights = t), (this.index = 0); } }), - h(_class47, "MeasuredHeights"), - _class47), - Lt = - ((_r37 = class r { + (() => { + a(_class51, "MeasuredHeights"); + })(), + _class51), + _t = + ((_i36 = class i { get type() { - return typeof this._content == "number" ? He.Text : Array.isArray(this._content) ? this._content : this._content.type; + return typeof this._content == "number" ? xe.Text : Array.isArray(this._content) ? this._content : this._content.type; } get to() { return this.from + this.length; @@ -13408,27 +13232,29 @@ function _ts_generator(thisArg, body) { return this.top + this.height; } get widget() { - return this._content instanceof hi ? this._content.widget : null; + return this._content instanceof si ? this._content.widget : null; } get widgetLineBreaks() { return typeof this._content == "number" ? this._content : 0; } join(e) { var t = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]); - return new r(this.from, this.length + e.length, this.top, this.height + e.height, t); + return new i(this.from, this.length + e.length, this.top, this.height + e.height, t); } - constructor(e, t, i, n, s) { - (this.from = e), (this.length = t), (this.top = i), (this.height = n), (this._content = s); + constructor(e, t, r, n, s) { + (this.from = e), (this.length = t), (this.top = r), (this.height = n), (this._content = s); } }), - h(_r37, "BlockInfo"), - _r37), - Ce = (function (r) { - return (r[(r.ByPos = 0)] = "ByPos"), (r[(r.ByHeight = 1)] = "ByHeight"), (r[(r.ByPosNoHeight = 2)] = "ByPosNoHeight"), r; - })(Ce || (Ce = {})), - io = 0.001, - st = - ((_r38 = class r { + (() => { + a(_i36, "BlockInfo"); + })(), + _i36), + ye = (function (i) { + return (i[(i.ByPos = 0)] = "ByPos"), (i[(i.ByHeight = 1)] = "ByHeight"), (i[(i.ByPosNoHeight = 2)] = "ByPosNoHeight"), i; + })(ye || (ye = {})), + Ws = 0.001, + et = + ((_i37 = class i { get outdated() { return (this.flags & 2) > 0; } @@ -13436,10 +13262,10 @@ function _ts_generator(thisArg, body) { this.flags = (e ? 2 : 0) | (this.flags & -3); } setHeight(e, t) { - this.height != t && (Math.abs(this.height - t) > io && (e.heightChanged = !0), (this.height = t)); + this.height != t && (Math.abs(this.height - t) > Ws && (e.heightChanged = !0), (this.height = t)); } - replace(e, t, i) { - return r.of(i); + replace(e, t, r) { + return i.of(r); } decomposeLeft(e, t) { t.push(this); @@ -13447,100 +13273,104 @@ function _ts_generator(thisArg, body) { decomposeRight(e, t) { t.push(this); } - applyChanges(e, t, i, n) { + applyChanges(e, t, r, n) { var s = this, - o = i.doc; - for (var l = n.length - 1; l >= 0; l--) { - var _n_l = n[l], - u = _n_l.fromA, - a = _n_l.toA, - c = _n_l.fromB, - f = _n_l.toB, - d = s.lineAt(u, Ce.ByPosNoHeight, i.setDoc(t), 0, 0), - p = d.to >= a ? d : s.lineAt(a, Ce.ByPosNoHeight, i, 0, 0); - for (f += p.to - a, a = p.to; l > 0 && d.from <= n[l - 1].toA; ) (u = n[l - 1].fromA), (c = n[l - 1].fromB), l--, u < d.from && (d = s.lineAt(u, Ce.ByPosNoHeight, i, 0, 0)); - (c += d.from - u), (u = d.from); - var m = Ca.build(i.setDoc(o), e, c, f); - s = s.replace(u, a, m); - } - return s.updateHeight(i, 0); + o = r.doc; + for (var u = n.length - 1; u >= 0; u--) { + var _n_u = n[u], + l = _n_u.fromA, + h = _n_u.toA, + c = _n_u.fromB, + f = _n_u.toB, + d = s.lineAt(l, ye.ByPosNoHeight, r.setDoc(t), 0, 0), + p = d.to >= h ? d : s.lineAt(h, ye.ByPosNoHeight, r, 0, 0); + for (f += p.to - h, h = p.to; u > 0 && d.from <= n[u - 1].toA; ) (l = n[u - 1].fromA), (c = n[u - 1].fromB), u--, l < d.from && (d = s.lineAt(l, ye.ByPosNoHeight, r, 0, 0)); + (c += d.from - l), (l = d.from); + var m = ba.build(r.setDoc(o), e, c, f); + s = s.replace(l, h, m); + } + return s.updateHeight(r, 0); } static empty() { - return new dt(0, 0); + return new lt(0, 0); } static of(e) { if (e.length == 1) return e[0]; var t = 0, - i = e.length, + r = e.length, n = 0, s = 0; for (;;) - if (t == i) + if (t == r) if (n > s * 2) { - var l = e[t - 1]; - l.break ? e.splice(--t, 1, l.left, null, l.right) : e.splice(--t, 1, l.left, l.right), (i += 1 + l.break), (n -= l.size); + var u = e[t - 1]; + u.break ? e.splice(--t, 1, u.left, null, u.right) : e.splice(--t, 1, u.left, u.right), (r += 1 + u.break), (n -= u.size); } else if (s > n * 2) { - var l1 = e[i]; - l1.break ? e.splice(i, 1, l1.left, null, l1.right) : e.splice(i, 1, l1.left, l1.right), (i += 2 + l1.break), (s -= l1.size); + var u1 = e[r]; + u1.break ? e.splice(r, 1, u1.left, null, u1.right) : e.splice(r, 1, u1.left, u1.right), (r += 2 + u1.break), (s -= u1.size); } else break; else if (n < s) { - var l2 = e[t++]; - l2 && (n += l2.size); + var u2 = e[t++]; + u2 && (n += u2.size); } else { - var l3 = e[--i]; - l3 && (s += l3.size); + var u3 = e[--r]; + u3 && (s += u3.size); } var o = 0; - return e[t - 1] == null ? ((o = 1), t--) : e[t] == null && ((o = 1), i++), new Ea(r.of(e.slice(0, t)), o, r.of(e.slice(i))); + return e[t - 1] == null ? ((o = 1), t--) : e[t] == null && ((o = 1), r++), new Da(i.of(e.slice(0, t)), o, i.of(e.slice(r))); } constructor(e, t, ref) { - var i = ref === void 0 ? 2 : ref; - (this.length = e), (this.height = t), (this.flags = i); + var r = ref === void 0 ? 2 : ref; + (this.length = e), (this.height = t), (this.flags = r); } }), - h(_r38, "HeightMap"), - _r38); - st.prototype.size = 1; - var fo = - ((_class48 = class _class extends st { - blockAt(e, t, i, n) { - return new Lt(n, this.length, i, this.height, this.deco || 0); + (() => { + a(_i37, "HeightMap"); + })(), + _i37); + et.prototype.size = 1; + var uo = + ((_class52 = class _class extends et { + blockAt(e, t, r, n) { + return new _t(n, this.length, r, this.height, this.deco || 0); } - lineAt(e, t, i, n, s) { - return this.blockAt(0, i, n, s); + lineAt(e, t, r, n, s) { + return this.blockAt(0, r, n, s); } - forEachLine(e, t, i, n, s, o) { - e <= s + this.length && t >= s && o(this.blockAt(0, i, n, s)); + forEachLine(e, t, r, n, s, o) { + e <= s + this.length && t >= s && o(this.blockAt(0, r, n, s)); } updateHeight(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = arguments.length > 3 ? arguments[3] : void 0; return n && n.from <= t && n.more && this.setHeight(e, n.heights[n.index++]), (this.outdated = !1), this; } toString() { return "block(".concat(this.length, ")"); } - constructor(e, t, i) { - super(e, t), (this.deco = i); + constructor(e, t, r) { + super(e, t), (this.deco = r); } }), - h(_class48, "HeightMapBlock"), - _class48), - dt = - ((_r39 = class r extends fo { - blockAt(e, t, i, n) { - return new Lt(n, this.length, i, this.height, this.breaks); + (() => { + a(_class52, "HeightMapBlock"); + })(), + _class52), + lt = + ((_i38 = class i extends uo { + blockAt(e, t, r, n) { + return new _t(n, this.length, r, this.height, this.breaks); } - replace(e, t, i) { - var n = i[0]; - return i.length == 1 && (n instanceof r || (n instanceof li && n.flags & 4)) && Math.abs(this.length - n.length) < 10 ? (n instanceof li ? (n = new r(n.length, this.height)) : (n.height = this.height), this.outdated || (n.outdated = !1), n) : st.of(i); + replace(e, t, r) { + var n = r[0]; + return r.length == 1 && (n instanceof i || (n instanceof ii && n.flags & 4)) && Math.abs(this.length - n.length) < 10 ? (n instanceof ii ? (n = new i(n.length, this.height)) : (n.height = this.height), this.outdated || (n.outdated = !1), n) : et.of(r); } updateHeight(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = arguments.length > 3 ? arguments[3] : void 0; - return n && n.from <= t && n.more ? this.setHeight(e, n.heights[n.index++]) : (i || this.outdated) && this.setHeight(e, Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), (this.outdated = !1), this; + return n && n.from <= t && n.more ? this.setHeight(e, n.heights[n.index++]) : (r || this.outdated) && this.setHeight(e, Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), (this.outdated = !1), this; } toString() { return "line(" @@ -13552,115 +13382,117 @@ function _ts_generator(thisArg, body) { super(e, t, null), (this.collapsed = 0), (this.widgetHeight = 0), (this.breaks = 0); } }), - h(_r39, "HeightMapText"), - _r39), - li = - ((_r40 = class r extends st { + (() => { + a(_i38, "HeightMapText"); + })(), + _i38), + ii = + ((_i39 = class i extends et { heightMetrics(e, t) { - var i = e.doc.lineAt(t).number, + var r = e.doc.lineAt(t).number, n = e.doc.lineAt(t + this.length).number, - s = n - i + 1, + s = n - r + 1, o, - l = 0; + u = 0; if (e.lineWrapping) { - var u = Math.min(this.height, e.lineHeight * s); - (o = u / s), this.length > s + 1 && (l = (this.height - u) / (this.length - s - 1)); + var l = Math.min(this.height, e.lineHeight * s); + (o = l / s), this.length > s + 1 && (u = (this.height - l) / (this.length - s - 1)); } else o = this.height / s; - return { firstLine: i, lastLine: n, perLine: o, perChar: l }; + return { firstLine: r, lastLine: n, perLine: o, perChar: u }; } - blockAt(e, t, i, n) { + blockAt(e, t, r, n) { var _this_heightMetrics = this.heightMetrics(t, n), s = _this_heightMetrics.firstLine, o = _this_heightMetrics.lastLine, - l = _this_heightMetrics.perLine, - u = _this_heightMetrics.perChar; + u = _this_heightMetrics.perLine, + l = _this_heightMetrics.perChar; if (t.lineWrapping) { - var a = n + (e < t.lineHeight ? 0 : Math.round(Math.max(0, Math.min(1, (e - i) / this.height)) * this.length)), - c = t.doc.lineAt(a), - f = l + c.length * u, - d = Math.max(i, e - f / 2); - return new Lt(c.from, c.length, d, f, 0); + var h = n + Math.round(Math.max(0, Math.min(1, (e - r) / this.height)) * this.length), + c = t.doc.lineAt(h), + f = u + c.length * l, + d = Math.max(r, e - f / 2); + return new _t(c.from, c.length, d, f, 0); } else { - var a1 = Math.max(0, Math.min(o - s, Math.floor((e - i) / l))), - _t_doc_line = t.doc.line(s + a1), + var h1 = Math.max(0, Math.min(o - s, Math.floor((e - r) / u))), + _t_doc_line = t.doc.line(s + h1), c1 = _t_doc_line.from, f1 = _t_doc_line.length; - return new Lt(c1, f1, i + l * a1, l, 0); + return new _t(c1, f1, r + u * h1, u, 0); } } - lineAt(e, t, i, n, s) { - if (t == Ce.ByHeight) return this.blockAt(e, i, n, s); - if (t == Ce.ByPosNoHeight) { - var _i_doc_lineAt = i.doc.lineAt(e), - p = _i_doc_lineAt.from, - m = _i_doc_lineAt.to; - return new Lt(p, m - p, 0, 0, 0); + lineAt(e, t, r, n, s) { + if (t == ye.ByHeight) return this.blockAt(e, r, n, s); + if (t == ye.ByPosNoHeight) { + var _r_doc_lineAt = r.doc.lineAt(e), + p = _r_doc_lineAt.from, + m = _r_doc_lineAt.to; + return new _t(p, m - p, 0, 0, 0); } - var _this_heightMetrics = this.heightMetrics(i, s), + var _this_heightMetrics = this.heightMetrics(r, s), o = _this_heightMetrics.firstLine, - l = _this_heightMetrics.perLine, - u = _this_heightMetrics.perChar, - a = i.doc.lineAt(e), - c = l + a.length * u, - f = a.number - o, - d = n + l * f + u * (a.from - s - f); - return new Lt(a.from, a.length, Math.max(n, Math.min(d, n + this.height - c)), c, 0); - } - forEachLine(e, t, i, n, s, o) { - (e = Math.max(e, s)), (t = Math.min(t, s + this.length)); - var _this_heightMetrics = this.heightMetrics(i, s), - l = _this_heightMetrics.firstLine, u = _this_heightMetrics.perLine, - a = _this_heightMetrics.perChar; + l = _this_heightMetrics.perChar, + h = r.doc.lineAt(e), + c = u + h.length * l, + f = h.number - o, + d = n + u * f + l * (h.from - s - f); + return new _t(h.from, h.length, Math.max(n, Math.min(d, n + this.height - c)), c, 0); + } + forEachLine(e, t, r, n, s, o) { + (e = Math.max(e, s)), (t = Math.min(t, s + this.length)); + var _this_heightMetrics = this.heightMetrics(r, s), + u = _this_heightMetrics.firstLine, + l = _this_heightMetrics.perLine, + h = _this_heightMetrics.perChar; for (var c = e, f = n; c <= t; ) { - var d = i.doc.lineAt(c); + var d = r.doc.lineAt(c); if (c == e) { - var m = d.number - l; - f += u * m + a * (e - s - m); + var m = d.number - u; + f += l * m + h * (e - s - m); } - var p = u + a * d.length; - o(new Lt(d.from, d.length, f, p, 0)), (f += p), (c = d.to + 1); + var p = l + h * d.length; + o(new _t(d.from, d.length, f, p, 0)), (f += p), (c = d.to + 1); } } - replace(e, t, i) { + replace(e, t, r) { var n = this.length - t; if (n > 0) { - var s = i[i.length - 1]; - s instanceof r ? (i[i.length - 1] = new r(s.length + n)) : i.push(null, new r(n - 1)); + var s = r[r.length - 1]; + s instanceof i ? (r[r.length - 1] = new i(s.length + n)) : r.push(null, new i(n - 1)); } if (e > 0) { - var s1 = i[0]; - s1 instanceof r ? (i[0] = new r(e + s1.length)) : i.unshift(new r(e - 1), null); + var s1 = r[0]; + s1 instanceof i ? (r[0] = new i(e + s1.length)) : r.unshift(new i(e - 1), null); } - return st.of(i); + return et.of(r); } decomposeLeft(e, t) { - t.push(new r(e - 1), null); + t.push(new i(e - 1), null); } decomposeRight(e, t) { - t.push(null, new r(this.length - e - 1)); + t.push(null, new i(this.length - e - 1)); } updateHeight(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = arguments.length > 3 ? arguments[3] : void 0; var s = t + this.length; if (n && n.from <= t + this.length && n.more) { var o = [], - l = Math.max(t, n.from), - u = -1; - for (n.from > t && o.push(new r(n.from - t - 1).updateHeight(e, t)); l <= s && n.more; ) { - var c = e.doc.lineAt(l).length; + u = Math.max(t, n.from), + l = -1; + for (n.from > t && o.push(new i(n.from - t - 1).updateHeight(e, t)); u <= s && n.more; ) { + var c = e.doc.lineAt(u).length; o.length && o.push(null); var f = n.heights[n.index++]; - u == -1 ? (u = f) : Math.abs(f - u) >= io && (u = -2); - var d = new dt(c, f); - (d.outdated = !1), o.push(d), (l += c + 1); - } - l <= s && o.push(null, new r(s - l).updateHeight(e, l)); - var a = st.of(o); - return (u < 0 || Math.abs(a.height - this.height) >= io || Math.abs(u - this.heightMetrics(e, t).perLine) >= io) && (e.heightChanged = !0), a; - } else (i || this.outdated) && (this.setHeight(e, e.heightForGap(t, t + this.length)), (this.outdated = !1)); + l == -1 ? (l = f) : Math.abs(f - l) >= Ws && (l = -2); + var d = new lt(c, f); + (d.outdated = !1), o.push(d), (u += c + 1); + } + u <= s && o.push(null, new i(s - u).updateHeight(e, u)); + var h = et.of(o); + return (l < 0 || Math.abs(h.height - this.height) >= Ws || Math.abs(l - this.heightMetrics(e, t).perLine) >= Ws) && (e.heightChanged = !0), h; + } else (r || this.outdated) && (this.setHeight(e, e.heightForGap(t, t + this.length)), (this.outdated = !1)); return this; } toString() { @@ -13670,39 +13502,41 @@ function _ts_generator(thisArg, body) { super(e, 0); } }), - h(_r40, "HeightMapGap"), - _r40), - Ea = - ((_class49 = class _class extends st { + (() => { + a(_i39, "HeightMapGap"); + })(), + _i39), + Da = + ((_class53 = class _class extends et { get break() { return this.flags & 1; } - blockAt(e, t, i, n) { - var s = i + this.left.height; - return e < s ? this.left.blockAt(e, t, i, n) : this.right.blockAt(e, t, s, n + this.left.length + this.break); + blockAt(e, t, r, n) { + var s = r + this.left.height; + return e < s ? this.left.blockAt(e, t, r, n) : this.right.blockAt(e, t, s, n + this.left.length + this.break); } - lineAt(e, t, i, n, s) { + lineAt(e, t, r, n, s) { var o = n + this.left.height, - l = s + this.left.length + this.break, - u = t == Ce.ByHeight ? e < o : e < l, - a = u ? this.left.lineAt(e, t, i, n, s) : this.right.lineAt(e, t, i, o, l); - if (this.break || (u ? a.to < l : a.from > l)) return a; - var c = t == Ce.ByPosNoHeight ? Ce.ByPosNoHeight : Ce.ByPos; - return u ? a.join(this.right.lineAt(l, c, i, o, l)) : this.left.lineAt(l, c, i, n, s).join(a); - } - forEachLine(e, t, i, n, s, o) { - var l = n + this.left.height, - u = s + this.left.length + this.break; - if (this.break) e < u && this.left.forEachLine(e, t, i, n, s, o), t >= u && this.right.forEachLine(e, t, i, l, u, o); + u = s + this.left.length + this.break, + l = t == ye.ByHeight ? e < o : e < u, + h = l ? this.left.lineAt(e, t, r, n, s) : this.right.lineAt(e, t, r, o, u); + if (this.break || (l ? h.to < u : h.from > u)) return h; + var c = t == ye.ByPosNoHeight ? ye.ByPosNoHeight : ye.ByPos; + return l ? h.join(this.right.lineAt(u, c, r, o, u)) : this.left.lineAt(u, c, r, n, s).join(h); + } + forEachLine(e, t, r, n, s, o) { + var u = n + this.left.height, + l = s + this.left.length + this.break; + if (this.break) e < l && this.left.forEachLine(e, t, r, n, s, o), t >= l && this.right.forEachLine(e, t, r, u, l, o); else { - var a = this.lineAt(u, Ce.ByPos, i, n, s); - e < a.from && this.left.forEachLine(e, a.from - 1, i, n, s, o), a.to >= e && a.from <= t && o(a), t > a.to && this.right.forEachLine(a.to + 1, t, i, l, u, o); + var h = this.lineAt(l, ye.ByPos, r, n, s); + e < h.from && this.left.forEachLine(e, h.from - 1, r, n, s, o), h.to >= e && h.from <= t && o(h), t > h.to && this.right.forEachLine(h.to + 1, t, r, u, l, o); } } - replace(e, t, i) { + replace(e, t, r) { var n = this.left.length + this.break; - if (t < n) return this.balanced(this.left.replace(e, t, i), this.right); - if (e > this.left.length) return this.balanced(this.left, this.right.replace(e - n, t - n, i)); + if (t < n) return this.balanced(this.left.replace(e, t, r), this.right); + if (e > this.left.length) return this.balanced(this.left, this.right.replace(e - n, t - n, r)); var s = []; e > 0 && this.decomposeLeft(e, s); var o = s.length; @@ -13710,9 +13544,9 @@ function _ts_generator(thisArg, body) { _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - s.push(l); + for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var u = _step.value; + s.push(u); } } catch (err) { _didIteratorError = true; @@ -13728,72 +13562,74 @@ function _ts_generator(thisArg, body) { } } } - if ((e > 0 && Tg(s, o - 1), t < this.length)) { - var l1 = s.length; - this.decomposeRight(t, s), Tg(s, l1); + if ((e > 0 && yg(s, o - 1), t < this.length)) { + var u1 = s.length; + this.decomposeRight(t, s), yg(s, u1); } - return st.of(s); + return et.of(s); } decomposeLeft(e, t) { - var i = this.left.length; - if (e <= i) return this.left.decomposeLeft(e, t); - t.push(this.left), this.break && (i++, e >= i && t.push(null)), e > i && this.right.decomposeLeft(e - i, t); + var r = this.left.length; + if (e <= r) return this.left.decomposeLeft(e, t); + t.push(this.left), this.break && (r++, e >= r && t.push(null)), e > r && this.right.decomposeLeft(e - r, t); } decomposeRight(e, t) { - var i = this.left.length, - n = i + this.break; + var r = this.left.length, + n = r + this.break; if (e >= n) return this.right.decomposeRight(e - n, t); - e < i && this.left.decomposeRight(e, t), this.break && e < n && t.push(null), t.push(this.right); + e < r && this.left.decomposeRight(e, t), this.break && e < n && t.push(null), t.push(this.right); } balanced(e, t) { - return e.size > 2 * t.size || t.size > 2 * e.size ? st.of(this.break ? [e, null, t] : [e, t]) : ((this.left = e), (this.right = t), (this.height = e.height + t.height), (this.outdated = e.outdated || t.outdated), (this.size = e.size + t.size), (this.length = e.length + this.break + t.length), this); + return e.size > 2 * t.size || t.size > 2 * e.size ? et.of(this.break ? [e, null, t] : [e, t]) : ((this.left = e), (this.right = t), (this.height = e.height + t.height), (this.outdated = e.outdated || t.outdated), (this.size = e.size + t.size), (this.length = e.length + this.break + t.length), this); } updateHeight(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = arguments.length > 3 ? arguments[3] : void 0; var _this = this, s = _this.left, o = _this.right, - l = t + s.length + this.break, - u = null; - return n && n.from <= t + s.length && n.more ? (u = s = s.updateHeight(e, t, i, n)) : s.updateHeight(e, t, i), n && n.from <= l + o.length && n.more ? (u = o = o.updateHeight(e, l, i, n)) : o.updateHeight(e, l, i), u ? this.balanced(s, o) : ((this.height = this.left.height + this.right.height), (this.outdated = !1), this); + u = t + s.length + this.break, + l = null; + return n && n.from <= t + s.length && n.more ? (l = s = s.updateHeight(e, t, r, n)) : s.updateHeight(e, t, r), n && n.from <= u + o.length && n.more ? (l = o = o.updateHeight(e, u, r, n)) : o.updateHeight(e, u, r), l ? this.balanced(s, o) : ((this.height = this.left.height + this.right.height), (this.outdated = !1), this); } toString() { return this.left + (this.break ? " " : "-") + this.right; } - constructor(e, t, i) { - super(e.length + t + i.length, e.height + i.height, t | (e.outdated || i.outdated ? 2 : 0)), (this.left = e), (this.right = i), (this.size = e.size + i.size); + constructor(e, t, r) { + super(e.length + t + r.length, e.height + r.height, t | (e.outdated || r.outdated ? 2 : 0)), (this.left = e), (this.right = r), (this.size = e.size + r.size); } }), - h(_class49, "HeightMapBranch"), - _class49); - function Tg(r, e) { - var t, i; - r[e] == null && (t = r[e - 1]) instanceof li && (i = r[e + 1]) instanceof li && r.splice(e - 1, 3, new li(t.length + 1 + i.length)); - } - h(Tg, "mergeGaps"); - var Yx = 5, - Ca = - ((_r41 = class r { + (() => { + a(_class53, "HeightMapBranch"); + })(), + _class53); + function yg(i, e) { + var t, r; + i[e] == null && (t = i[e - 1]) instanceof ii && (r = i[e + 1]) instanceof ii && i.splice(e - 1, 3, new ii(t.length + 1 + r.length)); + } + a(yg, "mergeGaps"); + var Fk = 5, + ba = + ((_i40 = class i { get isCovered() { return this.covering && this.nodes[this.nodes.length - 1] == this.covering; } span(e, t) { if (this.lineStart > -1) { - var i = Math.min(t, this.lineEnd), + var r = Math.min(t, this.lineEnd), n = this.nodes[this.nodes.length - 1]; - n instanceof dt ? (n.length += i - this.pos) : (i > this.pos || !this.isCovered) && this.nodes.push(new dt(i - this.pos, -1)), (this.writtenTo = i), t > i && (this.nodes.push(null), this.writtenTo++, (this.lineStart = -1)); + n instanceof lt ? (n.length += r - this.pos) : (r > this.pos || !this.isCovered) && this.nodes.push(new lt(r - this.pos, -1)), (this.writtenTo = r), t > r && (this.nodes.push(null), this.writtenTo++, (this.lineStart = -1)); } this.pos = t; } - point(e, t, i) { - if (e < t || i.heightRelevant) { - var n = i.widget ? i.widget.estimatedHeight : 0, - s = i.widget ? i.widget.lineBreaks : 0; + point(e, t, r) { + if (e < t || r.heightRelevant) { + var n = r.widget ? r.widget.estimatedHeight : 0, + s = r.widget ? r.widget.lineBreaks : 0; n < 0 && (n = this.oracle.lineHeight); var o = t - e; - i.block ? this.addBlock(new fo(o, n, i)) : (o || s || n >= Yx) && this.addLineDeco(n, s, o); + r.block ? this.addBlock(new uo(o, n, r)) : (o || s || n >= Fk) && this.addLineDeco(n, s, o); } else t > e && this.span(e, t); this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to); } @@ -13802,39 +13638,40 @@ function _ts_generator(thisArg, body) { var _this_oracle_doc_lineAt = this.oracle.doc.lineAt(this.pos), e = _this_oracle_doc_lineAt.from, t = _this_oracle_doc_lineAt.to; - (this.lineStart = e), (this.lineEnd = t), this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new dt(this.pos - e, -1)), (this.writtenTo = this.pos); + (this.lineStart = e), (this.lineEnd = t), this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new lt(this.pos - e, -1)), (this.writtenTo = this.pos); } blankContent(e, t) { - var i = new li(t - e); - return this.oracle.doc.lineAt(e).to == t && (i.flags |= 4), i; + var r = new ii(t - e); + return this.oracle.doc.lineAt(e).to == t && (r.flags |= 4), r; } ensureLine() { this.enterLine(); var e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null; - if (e instanceof dt) return e; - var t = new dt(0, -1); + if (e instanceof lt) return e; + var t = new lt(0, -1); return this.nodes.push(t), t; } addBlock(e) { + var t; this.enterLine(); - var t = e.deco; - t && t.startSide > 0 && !this.isCovered && this.ensureLine(), this.nodes.push(e), (this.writtenTo = this.pos = this.pos + e.length), t && t.endSide > 0 && (this.covering = e); + var r = (t = e.deco) === null || t === void 0 ? void 0 : t.type; + r == xe.WidgetAfter && !this.isCovered && this.ensureLine(), this.nodes.push(e), (this.writtenTo = this.pos = this.pos + e.length), r != xe.WidgetBefore && (this.covering = e); } - addLineDeco(e, t, i) { + addLineDeco(e, t, r) { var n = this.ensureLine(); - (n.length += i), (n.collapsed += i), (n.widgetHeight = Math.max(n.widgetHeight, e)), (n.breaks += t), (this.writtenTo = this.pos = this.pos + i); + (n.length += r), (n.collapsed += r), (n.widgetHeight = Math.max(n.widgetHeight, e)), (n.breaks += t), (this.writtenTo = this.pos = this.pos + r); } finish(e) { var t = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1]; - this.lineStart > -1 && !(t instanceof dt) && !this.isCovered ? this.nodes.push(new dt(0, -1)) : (this.writtenTo < this.pos || t == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos)); - var i = e; + this.lineStart > -1 && !(t instanceof lt) && !this.isCovered ? this.nodes.push(new lt(0, -1)) : (this.writtenTo < this.pos || t == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos)); + var r = e; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - n instanceof dt && n.updateHeight(this.oracle, i), (i += n ? n.length : 1); + n instanceof lt && n.updateHeight(this.oracle, r), (r += n ? n.length : 1); } } catch (err) { _didIteratorError = true; @@ -13852,82 +13689,88 @@ function _ts_generator(thisArg, body) { } return this.nodes; } - static build(e, t, i, n) { - var s = new r(i, e); - return De.spans(t, i, n, s, 0), s.finish(i); + static build(e, t, r, n) { + var s = new i(r, e); + return Ee.spans(t, r, n, s, 0), s.finish(r); } constructor(e, t) { (this.pos = e), (this.oracle = t), (this.nodes = []), (this.lineStart = -1), (this.lineEnd = -1), (this.covering = null), (this.writtenTo = e); } }), - h(_r41, "NodeBuilder"), - _r41); - function Jx(r, e, t) { - var i = new Ba(); - return De.compare(r, e, t, i, 0), i.changes; - } - h(Jx, "heightRelevantDecoChanges"); - var Ba = - ((_class50 = class _class { + (() => { + a(_i40, "NodeBuilder"); + })(), + _i40); + function yk(i, e, t) { + var r = new Fa(); + return Ee.compare(i, e, t, r, 0), r.changes; + } + a(yk, "heightRelevantDecoChanges"); + var Fa = + ((_class54 = class _class { compareRange() {} - comparePoint(e, t, i, n) { - (e < t || (i && i.heightRelevant) || (n && n.heightRelevant)) && aa(e, t, this.changes, 5); + comparePoint(e, t, r, n) { + (e < t || (r && r.heightRelevant) || (n && n.heightRelevant)) && ia(e, t, this.changes, 5); } constructor() { this.changes = []; } }), - h(_class50, "DecorationComparator"), - _class50); - function Gx(r, e) { - var t = r.getBoundingClientRect(), - i = r.ownerDocument, - n = i.defaultView || window, + (() => { + a(_class54, "DecorationComparator"); + })(), + _class54); + function Ck(i, e) { + var t = i.getBoundingClientRect(), + r = i.ownerDocument, + n = r.defaultView || window, s = Math.max(0, t.left), o = Math.min(n.innerWidth, t.right), - l = Math.max(0, t.top), - u = Math.min(n.innerHeight, t.bottom); - for (var a = r.parentNode; a && a != i.body; ) - if (a.nodeType == 1) { - var c = a, + u = Math.max(0, t.top), + l = Math.min(n.innerHeight, t.bottom); + for (var h = i.parentNode; h && h != r.body; ) + if (h.nodeType == 1) { + var c = h, f = window.getComputedStyle(c); if ((c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth) && f.overflow != "visible") { var d = c.getBoundingClientRect(); - (s = Math.max(s, d.left)), (o = Math.min(o, d.right)), (l = Math.max(l, d.top)), (u = a == r.parentNode ? d.bottom : Math.min(u, d.bottom)); + (s = Math.max(s, d.left)), (o = Math.min(o, d.right)), (u = Math.max(u, d.top)), (l = h == i.parentNode ? d.bottom : Math.min(l, d.bottom)); } - a = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode; - } else if (a.nodeType == 11) a = a.host; + h = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode; + } else if (h.nodeType == 11) h = h.host; else break; - return { left: s - t.left, right: Math.max(s, o) - t.left, top: l - (t.top + e), bottom: Math.max(l, u) - (t.top + e) }; + return { left: s - t.left, right: Math.max(s, o) - t.left, top: u - (t.top + e), bottom: Math.max(u, l) - (t.top + e) }; } - h(Gx, "visiblePixelRange"); - function Xx(r, e) { - var t = r.getBoundingClientRect(); + a(Ck, "visiblePixelRange"); + function Ak(i, e) { + var t = i.getBoundingClientRect(); return { left: 0, right: t.right - t.left, top: e, bottom: t.bottom - (t.top + e) }; } - h(Xx, "fullPixelRange"); - var pn = - ((_class51 = class _class { + a(Ak, "fullPixelRange"); + var rn = + ((_class55 = class _class { static same(e, t) { if (e.length != t.length) return !1; - for (var i = 0; i < e.length; i++) { - var n = e[i], - s = t[i]; + for (var r = 0; r < e.length; r++) { + var n = e[r], + s = t[r]; if (n.from != s.from || n.to != s.to || n.size != s.size) return !1; } return !0; } - draw(e, t) { - return pe.replace({ widget: new va(this.size * (t ? e.scaleY : e.scaleX), t) }).range(this.from, this.to); + draw(e) { + return he.replace({ widget: new ya(this.size, e) }).range(this.from, this.to); } - constructor(e, t, i) { - (this.from = e), (this.to = t), (this.size = i); + constructor(e, t, r) { + (this.from = e), (this.to = t), (this.size = r); } }), - h(_class51, "LineGap"), - _class51), - va = - ((_class52 = class _class extends ai { + (() => { + a(_class55, "LineGap"); + })(), + _class55), + ya = + ((_class56 = class _class extends Ut { eq(e) { return e.size == this.size && e.vertical == this.vertical; } @@ -13942,14 +13785,16 @@ function _ts_generator(thisArg, body) { super(), (this.size = e), (this.vertical = t); } }), - h(_class52, "LineGapWidget"), - _class52), - po = - ((_class53 = class _class { + (() => { + a(_class56, "LineGapWidget"); + })(), + _class56), + lo = + ((_class57 = class _class { updateForViewport() { - var _this, - _loop = function (i) { - var n = i ? t.head : t.anchor; + var _this = this, + _loop = function (r) { + var n = r ? t.head : t.anchor; if ( !e.some((param) => { var s = param.from, @@ -13960,90 +13805,85 @@ function _ts_generator(thisArg, body) { var _this_lineBlockAt = _this.lineBlockAt(n), s = _this_lineBlockAt.from, o = _this_lineBlockAt.to; - e.push(new mr(s, o)); + e.push(new lr(s, o)); } }; var e = [this.viewport], _this_state_selection = this.state.selection, t = _this_state_selection.main; - for (var i = 0; i <= 1; i++) (_this = this), _loop(i); - (this.viewports = e.sort((i, n) => i.from - n.from)), (this.scaler = this.heightMap.height <= 7e6 ? Rg : new xa(this.heightOracle, this.heightMap, this.viewports)); + for (var r = 0; r <= 1; r++) _loop(r); + (this.viewports = e.sort((r, n) => r.from - n.from)), (this.scaler = this.heightMap.height <= 7e6 ? Cg : new Ca(this.heightOracle, this.heightMap, this.viewports)); } updateViewportLines() { (this.viewportLines = []), this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => { - this.viewportLines.push(this.scaler.scale == 1 ? e : ln(e, this.scaler)); + this.viewportLines.push(this.scaler.scale == 1 ? e : Zr(e, this.scaler)); }); } update(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; this.state = e.state; - var i = this.stateDeco; - this.stateDeco = this.state.facet(En).filter((c) => typeof c != "function"); + var r = this.stateDeco; + this.stateDeco = this.state.facet(hn).filter((c) => typeof c != "function"); var n = e.changedRanges, - s = Tt.extendWithRanges(n, Jx(i, this.stateDeco, e ? e.changes : We.empty(this.state.doc.length))), + s = ei.extendWithRanges(n, yk(r, this.stateDeco, e ? e.changes : Ue.empty(this.state.doc.length))), o = this.heightMap.height, - l = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop); - (this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), s)), this.heightMap.height != o && (e.flags |= 2), l ? ((this.scrollAnchorPos = e.changes.mapPos(l.from, -1)), (this.scrollAnchorHeight = l.top)) : ((this.scrollAnchorPos = -1), (this.scrollAnchorHeight = this.heightMap.height)); - var u = s.length ? this.mapViewport(this.viewport, e.changes) : this.viewport; - ((t && (t.range.head < u.from || t.range.head > u.to)) || !this.viewportIsAppropriate(u)) && (u = this.getViewport(0, t)); - var a = !e.changes.empty || e.flags & 2 || u.from != this.viewport.from || u.to != this.viewport.to; - (this.viewport = u), + u = this.scrolledToBottom ? null : this.lineBlockAtHeight(this.scrollTop); + (this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), s)), this.heightMap.height != o && (e.flags |= 2), u ? ((this.scrollAnchorPos = e.changes.mapPos(u.from, -1)), (this.scrollAnchorHeight = u.top)) : ((this.scrollAnchorPos = -1), (this.scrollAnchorHeight = this.heightMap.height)); + var l = s.length ? this.mapViewport(this.viewport, e.changes) : this.viewport; + ((t && (t.range.head < l.from || t.range.head > l.to)) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, t)); + var h = !e.changes.empty || e.flags & 2 || l.from != this.viewport.from || l.to != this.viewport.to; + (this.viewport = l), this.updateForViewport(), - a && this.updateViewportLines(), + h && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), (e.flags |= this.computeVisibleRanges()), t && (this.scrollTarget = t), - !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(ED) && (this.mustEnforceCursorAssoc = !0); + !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(eD) && (this.mustEnforceCursorAssoc = !0); } measure(e) { var t = e.contentDOM, - i = window.getComputedStyle(t), + r = window.getComputedStyle(t), n = this.heightOracle, - s = i.whiteSpace; - this.defaultTextDirection = i.direction == "rtl" ? Be.RTL : Be.LTR; + s = r.whiteSpace; + this.defaultTextDirection = r.direction == "rtl" ? Se.RTL : Se.LTR; var o = this.heightOracle.mustRefreshForWrapping(s), - l = t.getBoundingClientRect(), - u = o || this.mustMeasureContent || this.contentDOMHeight != l.height; - (this.contentDOMHeight = l.height), (this.mustMeasureContent = !1); - var a = 0, - c = 0; - if (l.width && l.height) { - var _Jg = Jg(t, l), - k = _Jg.scaleX, - C = _Jg.scaleY; - ((k > 0.005 && Math.abs(this.scaleX - k) > 0.005) || (C > 0.005 && Math.abs(this.scaleY - C) > 0.005)) && ((this.scaleX = k), (this.scaleY = C), (a |= 8), (o = u = !0)); - } - var f = (parseInt(i.paddingTop) || 0) * this.scaleY, - d = (parseInt(i.paddingBottom) || 0) * this.scaleY; - (this.paddingTop != f || this.paddingBottom != d) && ((this.paddingTop = f), (this.paddingBottom = d), (a |= 10)), this.editorWidth != e.scrollDOM.clientWidth && (n.lineWrapping && (u = !0), (this.editorWidth = e.scrollDOM.clientWidth), (a |= 8)); - var p = e.scrollDOM.scrollTop * this.scaleY; - this.scrollTop != p && ((this.scrollAnchorHeight = -1), (this.scrollTop = p)), (this.scrolledToBottom = Kg(e.scrollDOM)); - var m = (this.printing ? Xx : Gx)(t, this.paddingTop), - F = m.top - this.pixelViewport.top, - g = m.bottom - this.pixelViewport.bottom; - this.pixelViewport = m; - var D = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left; - if ((D != this.inView && ((this.inView = D), D && (u = !0)), !this.inView && !this.scrollTarget)) return 0; - var b = l.width; - if (((this.contentDOMWidth != b || this.editorHeight != e.scrollDOM.clientHeight) && ((this.contentDOMWidth = l.width), (this.editorHeight = e.scrollDOM.clientHeight), (a |= 8)), u)) { - var k1 = e.docView.measureVisibleLineHeights(this.viewport); - if ((n.mustRefreshForHeights(k1) && (o = !0), o || (n.lineWrapping && Math.abs(b - this.contentDOMWidth) > n.charWidth))) { + u = t.getBoundingClientRect(), + l = o || this.mustMeasureContent || this.contentDOMHeight != u.height; + (this.contentDOMHeight = u.height), (this.mustMeasureContent = !1); + var h = 0, + c = 0, + f = parseInt(r.paddingTop) || 0, + d = parseInt(r.paddingBottom) || 0; + (this.paddingTop != f || this.paddingBottom != d) && ((this.paddingTop = f), (this.paddingBottom = d), (h |= 10)), + this.editorWidth != e.scrollDOM.clientWidth && (n.lineWrapping && (l = !0), (this.editorWidth = e.scrollDOM.clientWidth), (h |= 8)), + this.scrollTop != e.scrollDOM.scrollTop && ((this.scrollAnchorHeight = -1), (this.scrollTop = e.scrollDOM.scrollTop)), + (this.scrolledToBottom = this.scrollTop > e.scrollDOM.scrollHeight - e.scrollDOM.clientHeight - 4); + var p = (this.printing ? Ak : Ck)(t, this.paddingTop), + m = p.top - this.pixelViewport.top, + b = p.bottom - this.pixelViewport.bottom; + this.pixelViewport = p; + var g = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left; + if ((g != this.inView && ((this.inView = g), g && (l = !0)), !this.inView && !this.scrollTarget)) return 0; + var D = u.width; + if (((this.contentDOMWidth != D || this.editorHeight != e.scrollDOM.clientHeight) && ((this.contentDOMWidth = u.width), (this.editorHeight = e.scrollDOM.clientHeight), (h |= 8)), l)) { + var w = e.docView.measureVisibleLineHeights(this.viewport); + if ((n.mustRefreshForHeights(w) && (o = !0), o || (n.lineWrapping && Math.abs(D - this.contentDOMWidth) > n.charWidth))) { var _e_docView_measureTextSize = e.docView.measureTextSize(), - C1 = _e_docView_measureTextSize.lineHeight, - L = _e_docView_measureTextSize.charWidth, - Q = _e_docView_measureTextSize.textHeight; - (o = C1 > 0 && n.refresh(s, C1, L, Q, b / L, k1)), o && ((e.docView.minWidth = 0), (a |= 8)); + x = _e_docView_measureTextSize.lineHeight, + E = _e_docView_measureTextSize.charWidth, + _ = _e_docView_measureTextSize.textHeight; + (o = x > 0 && n.refresh(s, x, E, _, D / E, w)), o && ((e.docView.minWidth = 0), (h |= 8)); } - F > 0 && g > 0 ? (c = Math.max(F, g)) : F < 0 && g < 0 && (c = Math.min(F, g)), (n.heightChanged = !1); + m > 0 && b > 0 ? (c = Math.max(m, b)) : m < 0 && b < 0 && (c = Math.min(m, b)), (n.heightChanged = !1); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.viewports[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var C2 = _step.value; - var L1 = C2.from == this.viewport.from ? k1 : e.docView.measureVisibleLineHeights(C2); - this.heightMap = (o ? st.empty().applyChanges(this.stateDeco, fe.empty, this.heightOracle, [new Tt(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(n, 0, o, new ya(C2.from, L1)); + var x1 = _step.value; + var E1 = x1.from == this.viewport.from ? w : e.docView.measureVisibleLineHeights(x1); + this.heightMap = (o ? et.empty().applyChanges(this.stateDeco, de.empty, this.heightOracle, [new ei(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(n, 0, o, new ga(x1.from, E1)); } } catch (err) { _didIteratorError = true; @@ -14059,17 +13899,17 @@ function _ts_generator(thisArg, body) { } } } - n.heightChanged && (a |= 2); + n.heightChanged && (h |= 2); } - var B = !this.viewportIsAppropriate(this.viewport, c) || (this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to)); + var F = !this.viewportIsAppropriate(this.viewport, c) || (this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to)); return ( - B && (this.viewport = this.getViewport(c, this.scrollTarget)), + F && (this.viewport = this.getViewport(c, this.scrollTarget)), this.updateForViewport(), - (a & 2 || B) && this.updateViewportLines(), + (h & 2 || F) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), - (a |= this.computeVisibleRanges()), + (h |= this.computeVisibleRanges()), this.mustEnforceCursorAssoc && ((this.mustEnforceCursorAssoc = !1), e.docView.enforceCursorAssoc()), - a + h ); } get visibleTop() { @@ -14079,54 +13919,54 @@ function _ts_generator(thisArg, body) { return this.scaler.fromDOM(this.pixelViewport.bottom); } getViewport(e, t) { - var i = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), + var r = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), n = this.heightMap, s = this.heightOracle, _this = this, o = _this.visibleTop, - l = _this.visibleBottom, - u = new mr(n.lineAt(o - i * 1e3, Ce.ByHeight, s, 0, 0).from, n.lineAt(l + (1 - i) * 1e3, Ce.ByHeight, s, 0, 0).to); + u = _this.visibleBottom, + l = new lr(n.lineAt(o - r * 1e3, ye.ByHeight, s, 0, 0).from, n.lineAt(u + (1 - r) * 1e3, ye.ByHeight, s, 0, 0).to); if (t) { var _t_range = t.range, - a = _t_range.head; - if (a < u.from || a > u.to) { + h = _t_range.head; + if (h < l.from || h > l.to) { var c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), - f = n.lineAt(a, Ce.ByPos, s, 0, 0), + f = n.lineAt(h, ye.ByPos, s, 0, 0), d; - t.y == "center" ? (d = (f.top + f.bottom) / 2 - c / 2) : t.y == "start" || (t.y == "nearest" && a < u.from) ? (d = f.top) : (d = f.bottom - c), (u = new mr(n.lineAt(d - 1e3 / 2, Ce.ByHeight, s, 0, 0).from, n.lineAt(d + c + 1e3 / 2, Ce.ByHeight, s, 0, 0).to)); + t.y == "center" ? (d = (f.top + f.bottom) / 2 - c / 2) : t.y == "start" || (t.y == "nearest" && h < l.from) ? (d = f.top) : (d = f.bottom - c), (l = new lr(n.lineAt(d - 1e3 / 2, ye.ByHeight, s, 0, 0).from, n.lineAt(d + c + 1e3 / 2, ye.ByHeight, s, 0, 0).to)); } } - return u; + return l; } mapViewport(e, t) { - var i = t.mapPos(e.from, -1), + var r = t.mapPos(e.from, -1), n = t.mapPos(e.to, 1); - return new mr(this.heightMap.lineAt(i, Ce.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(n, Ce.ByPos, this.heightOracle, 0, 0).to); + return new lr(this.heightMap.lineAt(r, ye.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(n, ye.ByPos, this.heightOracle, 0, 0).to); } viewportIsAppropriate(param) { var e = param.from, t = param.to, - i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (!this.inView) return !0; - var _this_heightMap_lineAt = this.heightMap.lineAt(e, Ce.ByPos, this.heightOracle, 0, 0), + var _this_heightMap_lineAt = this.heightMap.lineAt(e, ye.ByPos, this.heightOracle, 0, 0), n = _this_heightMap_lineAt.top, - _this_heightMap_lineAt1 = this.heightMap.lineAt(t, Ce.ByPos, this.heightOracle, 0, 0), + _this_heightMap_lineAt1 = this.heightMap.lineAt(t, ye.ByPos, this.heightOracle, 0, 0), s = _this_heightMap_lineAt1.bottom, _this = this, o = _this.visibleTop, - l = _this.visibleBottom; - return (e == 0 || n <= o - Math.max(10, Math.min(-i, 250))) && (t == this.state.doc.length || s >= l + Math.max(10, Math.min(i, 250))) && n > o - 2 * 1e3 && s < l + 2 * 1e3; + u = _this.visibleBottom; + return (e == 0 || n <= o - Math.max(10, Math.min(-r, 250))) && (t == this.state.doc.length || s >= u + Math.max(10, Math.min(r, 250))) && n > o - 2 * 1e3 && s < u + 2 * 1e3; } mapLineGaps(e, t) { if (!e.length || t.empty) return e; - var i = []; + var r = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - t.touchesRange(n.from, n.to) || i.push(new pn(t.mapPos(n.from), t.mapPos(n.to), n.size)); + t.touchesRange(n.from, n.to) || r.push(new rn(t.mapPos(n.from), t.mapPos(n.to), n.size)); } } catch (err) { _didIteratorError = true; @@ -14142,17 +13982,17 @@ function _ts_generator(thisArg, body) { } } } - return i; + return r; } ensureLineGaps(e, t) { - var i = this.heightOracle.lineWrapping, - n = i ? 1e4 : 2e3, + var r = this.heightOracle.lineWrapping, + n = r ? 1e4 : 2e3, s = n >> 1, o = n << 1; - if (this.defaultTextDirection != Be.LTR && !i) return []; - var l = [], - u = h((a, c, f, d) => { - if (c - a < s) return; + if (this.defaultTextDirection != Se.LTR && !r) return []; + var u = [], + l = a((h, c, f, d) => { + if (c - h < s) return; var p = this.state.selection.main, m = [p.from]; p.empty || m.push(p.to); @@ -14162,8 +14002,8 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = m[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var g = _step.value; - if (g > a && g < c) { - u(a, g - 10, f, d), u(g + 10, c, f, d); + if (g > h && g < c) { + l(h, g - 10, f, d), l(g + 10, c, f, d); return; } } @@ -14181,51 +14021,51 @@ function _ts_generator(thisArg, body) { } } } - var F = Zx(e, (g) => g.from >= f.from && g.to <= f.to && Math.abs(g.from - a) < s && Math.abs(g.to - c) < s && !m.some((D) => g.from < D && g.to > D)); - if (!F) { - if (c < f.to && t && i && t.visibleRanges.some((g) => g.from <= c && g.to >= c)) { - var g1 = t.moveToLineBoundary(Z.cursor(c), !1, !0).head; - g1 > a && (c = g1); + var b = vk(e, (g) => g.from >= f.from && g.to <= f.to && Math.abs(g.from - h) < s && Math.abs(g.to - c) < s && !m.some((D) => g.from < D && g.to > D)); + if (!b) { + if (c < f.to && t && r && t.visibleRanges.some((g) => g.from <= c && g.to >= c)) { + var g1 = t.moveToLineBoundary(Q.cursor(c), !1, !0).head; + g1 > h && (c = g1); } - F = new pn(a, c, this.gapSize(f, a, c, d)); + b = new rn(h, c, this.gapSize(f, h, c, d)); } - l.push(F); + u.push(b); }, "addGap"); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.viewportLines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var a = _step.value; - if (a.length < o) continue; - var c = Kx(a.from, a.to, this.stateDeco); + var h = _step.value; + if (h.length < o) continue; + var c = Ek(h.from, h.to, this.stateDeco); if (c.total < o) continue; var f = this.scrollTarget ? this.scrollTarget.range.head : null, d = void 0, p = void 0; - if (i) { + if (r) { var m = (n / this.heightOracle.lineLength) * this.heightOracle.lineHeight, - F = void 0, + b = void 0, g = void 0; if (f != null) { - var D = Gs(c, f), - b = ((this.visibleBottom - this.visibleTop) / 2 + m) / a.height; - (F = D - b), (g = D + b); - } else (F = (this.visibleTop - a.top - m) / a.height), (g = (this.visibleBottom - a.top + m) / a.height); - (d = Js(c, F)), (p = Js(c, g)); + var D = qs(c, f), + F = ((this.visibleBottom - this.visibleTop) / 2 + m) / h.height; + (b = D - F), (g = D + F); + } else (b = (this.visibleTop - h.top - m) / h.height), (g = (this.visibleBottom - h.top + m) / h.height); + (d = Ls(c, b)), (p = Ls(c, g)); } else { var m1 = c.total * this.heightOracle.charWidth, - F1 = n * this.heightOracle.charWidth, + b1 = n * this.heightOracle.charWidth, g1 = void 0, D1 = void 0; if (f != null) { - var b1 = Gs(c, f), - B = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + F1) / m1; - (g1 = b1 - B), (D1 = b1 + B); - } else (g1 = (this.pixelViewport.left - F1) / m1), (D1 = (this.pixelViewport.right + F1) / m1); - (d = Js(c, g1)), (p = Js(c, D1)); + var F1 = qs(c, f), + w = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + b1) / m1; + (g1 = F1 - w), (D1 = F1 + w); + } else (g1 = (this.pixelViewport.left - b1) / m1), (D1 = (this.pixelViewport.right + b1) / m1); + (d = Ls(c, g1)), (p = Ls(c, D1)); } - d > a.from && u(a.from, d, a, c), p < a.to && u(p, a.to, a, c); + d > h.from && l(h.from, d, h, c), p < h.to && l(p, h.to, h, c); } } catch (err) { _didIteratorError = true; @@ -14241,20 +14081,20 @@ function _ts_generator(thisArg, body) { } } } - return l; + return u; } - gapSize(e, t, i, n) { - var s = Gs(n, i) - Gs(n, t); + gapSize(e, t, r, n) { + var s = qs(n, r) - qs(n, t); return this.heightOracle.lineWrapping ? e.height * s : n.total * this.heightOracle.charWidth * s; } updateLineGaps(e) { - pn.same(e, this.lineGaps) || ((this.lineGaps = e), (this.lineGapDeco = pe.set(e.map((t) => t.draw(this, this.heightOracle.lineWrapping))))); + rn.same(e, this.lineGaps) || ((this.lineGaps = e), (this.lineGapDeco = he.set(e.map((t) => t.draw(this.heightOracle.lineWrapping))))); } computeVisibleRanges() { var e = this.stateDeco; this.lineGaps.length && (e = e.concat(this.lineGapDeco)); var t = []; - De.spans( + Ee.spans( e, this.viewport.from, this.viewport.to, @@ -14264,23 +14104,19 @@ function _ts_generator(thisArg, body) { }, point() {}, }, - 20, + 20 ); - var i = t.length != this.visibleRanges.length || this.visibleRanges.some((n, s) => n.from != t[s].from || n.to != t[s].to); - return (this.visibleRanges = t), i ? 4 : 0; + var r = t.length != this.visibleRanges.length || this.visibleRanges.some((n, s) => n.from != t[s].from || n.to != t[s].to); + return (this.visibleRanges = t), r ? 4 : 0; } lineBlockAt(e) { - return (e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((t) => t.from <= e && t.to >= e)) || ln(this.heightMap.lineAt(e, Ce.ByPos, this.heightOracle, 0, 0), this.scaler); + return (e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((t) => t.from <= e && t.to >= e)) || Zr(this.heightMap.lineAt(e, ye.ByPos, this.heightOracle, 0, 0), this.scaler); } lineBlockAtHeight(e) { - return ln(this.heightMap.lineAt(this.scaler.fromDOM(e), Ce.ByHeight, this.heightOracle, 0, 0), this.scaler); - } - scrollAnchorAt(e) { - var t = this.lineBlockAtHeight(e + 8); - return t.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? t : this.viewportLines[0]; + return Zr(this.heightMap.lineAt(this.scaler.fromDOM(e), ye.ByHeight, this.heightOracle, 0, 0), this.scaler); } elementAtHeight(e) { - return ln(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler); + return Zr(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler); } get docHeight() { return this.scaler.toDOM(this.heightMap.height); @@ -14299,93 +14135,95 @@ function _ts_generator(thisArg, body) { (this.editorHeight = 0), (this.editorWidth = 0), (this.scrollTop = 0), - (this.scrolledToBottom = !1), - (this.scaleX = 1), - (this.scaleY = 1), + (this.scrolledToBottom = !0), (this.scrollAnchorPos = 0), (this.scrollAnchorHeight = -1), - (this.scaler = Rg), + (this.scaler = Cg), (this.scrollTarget = null), (this.printing = !1), (this.mustMeasureContent = !0), - (this.defaultTextDirection = Be.LTR), + (this.defaultTextDirection = Se.LTR), (this.visibleRanges = []), (this.mustEnforceCursorAssoc = !1); - var t = e.facet(qa).some((i) => typeof i != "function" && i.class == "cm-lineWrapping"); - (this.heightOracle = new ba(t)), - (this.stateDeco = e.facet(En).filter((i) => typeof i != "function")), - (this.heightMap = st.empty().applyChanges(this.stateDeco, fe.empty, this.heightOracle.setDoc(e.doc), [new Tt(0, 0, 0, e.doc.length)])), + var t = e.facet(Pa).some((r) => typeof r != "function" && r.class == "cm-lineWrapping"); + (this.heightOracle = new ma(t)), + (this.stateDeco = e.facet(hn).filter((r) => typeof r != "function")), + (this.heightMap = et.empty().applyChanges(this.stateDeco, de.empty, this.heightOracle.setDoc(e.doc), [new ei(0, 0, 0, e.doc.length)])), (this.viewport = this.getViewport(0, null)), this.updateViewportLines(), this.updateForViewport(), (this.lineGaps = this.ensureLineGaps([])), - (this.lineGapDeco = pe.set(this.lineGaps.map((i) => i.draw(this, !1)))), + (this.lineGapDeco = he.set(this.lineGaps.map((r) => r.draw(!1)))), this.computeVisibleRanges(); } }), - h(_class53, "ViewState"), - _class53), - mr = - ((_class54 = class _class { + (() => { + a(_class57, "ViewState"); + })(), + _class57), + lr = + ((_class58 = class _class { constructor(e, t) { (this.from = e), (this.to = t); } }), - h(_class54, "Viewport"), - _class54); - function Kx(r, e, t) { - var i = [], - n = r, + (() => { + a(_class58, "Viewport"); + })(), + _class58); + function Ek(i, e, t) { + var r = [], + n = i, s = 0; return ( - De.spans( + Ee.spans( t, - r, + i, e, { span() {}, - point(o, l) { - o > n && (i.push({ from: n, to: o }), (s += o - n)), (n = l); + point(o, u) { + o > n && (r.push({ from: n, to: o }), (s += o - n)), (n = u); }, }, - 20, + 20 ), - n < e && (i.push({ from: n, to: e }), (s += e - n)), - { total: s, ranges: i } + n < e && (r.push({ from: n, to: e }), (s += e - n)), + { total: s, ranges: r } ); } - h(Kx, "lineStructure"); - function Js(param, t) { - var r = param.total, + a(Ek, "lineStructure"); + function Ls(param, t) { + var i = param.total, e = param.ranges; if (t <= 0) return e[0].from; if (t >= 1) return e[e.length - 1].to; - var i = Math.floor(r * t); + var r = Math.floor(i * t); for (var n = 0; ; n++) { var _e_n = e[n], s = _e_n.from, o = _e_n.to, - l = o - s; - if (i <= l) return s + i; - i -= l; + u = o - s; + if (r <= u) return s + r; + r -= u; } } - h(Js, "findPosition"); - function Gs(r, e) { + a(Ls, "findPosition"); + function qs(i, e) { var t = 0; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _step_value = _step.value, - i = _step_value.from, + r = _step_value.from, n = _step_value.to; if (e <= n) { - t += e - i; + t += e - r; break; } - t += n - i; + t += n - r; } } catch (err) { _didIteratorError = true; @@ -14401,15 +14239,15 @@ function _ts_generator(thisArg, body) { } } } - return t / r.total; + return t / i.total; } - h(Gs, "findFraction"); - function Zx(r, e) { + a(qs, "findFraction"); + function vk(i, e) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; if (e(t)) return t; } @@ -14428,44 +14266,44 @@ function _ts_generator(thisArg, body) { } } } - h(Zx, "find"); - var Rg = { - toDOM(r) { - return r; + a(vk, "find"); + var Cg = { + toDOM(i) { + return i; }, - fromDOM(r) { - return r; + fromDOM(i) { + return i; }, scale: 1, }, - xa = - ((_class55 = class _class { + Ca = + ((_class59 = class _class { toDOM(e) { - for (var t = 0, i = 0, n = 0; ; t++) { + for (var t = 0, r = 0, n = 0; ; t++) { var s = t < this.viewports.length ? this.viewports[t] : null; - if (!s || e < s.top) return n + (e - i) * this.scale; + if (!s || e < s.top) return n + (e - r) * this.scale; if (e <= s.bottom) return s.domTop + (e - s.top); - (i = s.bottom), (n = s.domBottom); + (r = s.bottom), (n = s.domBottom); } } fromDOM(e) { - for (var t = 0, i = 0, n = 0; ; t++) { + for (var t = 0, r = 0, n = 0; ; t++) { var s = t < this.viewports.length ? this.viewports[t] : null; - if (!s || e < s.domTop) return i + (e - n) / this.scale; + if (!s || e < s.domTop) return r + (e - n) / this.scale; if (e <= s.domBottom) return s.top + (e - s.domTop); - (i = s.bottom), (n = s.domBottom); + (r = s.bottom), (n = s.domBottom); } } - constructor(e, t, i) { + constructor(e, t, r) { var n = 0, s = 0, o = 0; - (this.viewports = i.map((param) => { - var l = param.from, - u = param.to; - var a = t.lineAt(l, Ce.ByPos, e, 0, 0).top, - c = t.lineAt(u, Ce.ByPos, e, 0, 0).bottom; - return (n += c - a), { from: l, to: u, top: a, bottom: c, domTop: 0, domBottom: 0 }; + (this.viewports = r.map((param) => { + var u = param.from, + l = param.to; + var h = t.lineAt(u, ye.ByPos, e, 0, 0).top, + c = t.lineAt(l, ye.ByPos, e, 0, 0).bottom; + return (n += c - h), { from: u, to: l, top: h, bottom: c, domTop: 0, domBottom: 0 }; })), (this.scale = (7e6 - n) / (t.height - n)); var _iteratorNormalCompletion = true, @@ -14473,8 +14311,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.viewports[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - (l.domTop = o + (l.top - s) * this.scale), (o = l.domBottom = l.domTop + (l.bottom - l.top)), (s = l.bottom); + var u = _step.value; + (u.domTop = o + (u.top - s) * this.scale), (o = u.domBottom = u.domTop + (u.bottom - u.top)), (s = u.bottom); } } catch (err) { _didIteratorError = true; @@ -14492,41 +14330,43 @@ function _ts_generator(thisArg, body) { } } }), - h(_class55, "BigScaler"), - _class55); - function ln(r, e) { - if (e.scale == 1) return r; - var t = e.toDOM(r.top), - i = e.toDOM(r.bottom); - return new Lt(r.from, r.length, t, i - t, Array.isArray(r._content) ? r._content.map((n) => ln(n, e)) : r._content); - } - h(ln, "scaleBlock"); - var Xs = H.define({ combine: (r) => r.join(" ") }), - Aa = H.define({ combine: (r) => r.indexOf(!0) > -1 }), - ka = ft.newName(), - PD = ft.newName(), - ID = ft.newName(), - $D = { "&light": "." + PD, "&dark": "." + ID }; - function Sa(r, e, t) { - return new ft(e, { - finish(i) { - return /&/.test(i) - ? i.replace(/&\w*/, (n) => { - if (n == "&") return r; + (() => { + a(_class59, "BigScaler"); + })(), + _class59); + function Zr(i, e) { + if (e.scale == 1) return i; + var t = e.toDOM(i.top), + r = e.toDOM(i.bottom); + return new _t(i.from, i.length, t, r - t, Array.isArray(i._content) ? i._content.map((n) => Zr(n, e)) : i._content); + } + a(Zr, "scaleBlock"); + var Is = G.define({ combine: (i) => i.join(" ") }), + Aa = G.define({ combine: (i) => i.indexOf(!0) > -1 }), + Ea = ut.newName(), + FD = ut.newName(), + yD = ut.newName(), + CD = { "&light": "." + FD, "&dark": "." + yD }; + function va(i, e, t) { + return new ut(e, { + finish(r) { + return /&/.test(r) + ? r.replace(/&\w*/, (n) => { + if (n == "&") return i; if (!t || !t[n]) throw new RangeError("Unsupported selector: ".concat(n)); return t[n]; }) - : r + " " + i; + : i + " " + r; }, }); } - h(Sa, "buildTheme"); - var eA = Sa( - "." + ka, + a(va, "buildTheme"); + var kk = va( + "." + Ea, { "&": { position: "relative !important", boxSizing: "border-box", "&.cm-focused": { outline: "1px dotted #212121" }, display: "flex !important", flexDirection: "column" }, ".cm-scroller": { display: "flex !important", alignItems: "flex-start !important", fontFamily: "monospace", lineHeight: 1.4, height: "100%", overflowX: "auto", position: "relative", zIndex: 0 }, - ".cm-content": { margin: 0, flexGrow: 2, flexShrink: 0, display: "block", whiteSpace: "pre", wordWrap: "normal", boxSizing: "border-box", minHeight: "100%", padding: "4px 0", outline: "none", "&[contenteditable=true]": { WebkitUserModify: "read-write-plaintext-only" } }, + ".cm-content": { margin: 0, flexGrow: 2, flexShrink: 0, display: "block", whiteSpace: "pre", wordWrap: "normal", boxSizing: "border-box", padding: "4px 0", outline: "none", "&[contenteditable=true]": { WebkitUserModify: "read-write-plaintext-only" } }, ".cm-lineWrapping": { whiteSpace_fallback: "pre-wrap", whiteSpace: "break-spaces", wordBreak: "break-word", overflowWrap: "anywhere", flexShrink: 1 }, "&light .cm-content": { caretColor: "black" }, "&dark .cm-content": { caretColor: "white" }, @@ -14545,14 +14385,11 @@ function _ts_generator(thisArg, body) { "&dark .cm-cursor": { borderLeftColor: "#444" }, ".cm-dropCursor": { position: "absolute" }, "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": { display: "block" }, - ".cm-iso": { unicodeBidi: "isolate" }, - ".cm-announced": { position: "fixed", top: "-10000px" }, - "@media print": { ".cm-announced": { display: "none" } }, "&light .cm-activeLine": { backgroundColor: "#cceeff44" }, "&dark .cm-activeLine": { backgroundColor: "#99eeff33" }, "&light .cm-specialChar": { color: "red" }, "&dark .cm-specialChar": { color: "#f78" }, - ".cm-gutters": { flexShrink: 0, display: "flex", height: "100%", boxSizing: "border-box", insetInlineStart: 0, zIndex: 200 }, + ".cm-gutters": { flexShrink: 0, display: "flex", height: "100%", boxSizing: "border-box", left: 0, zIndex: 200 }, "&light .cm-gutters": { backgroundColor: "#f5f5f5", color: "#6c6c6c", borderRight: "1px solid #ddd" }, "&dark .cm-gutters": { backgroundColor: "#333338", color: "#ccc" }, ".cm-gutter": { display: "flex !important", flexDirection: "column", flexShrink: 0, boxSizing: "border-box", minHeight: "100%", overflow: "hidden" }, @@ -14578,324 +14415,146 @@ function _ts_generator(thisArg, body) { "&light .cm-textfield": { backgroundColor: "white" }, "&dark .cm-textfield": { border: "1px solid #555", backgroundColor: "inherit" }, }, - $D, + CD ), - un = "￿", - wa = - ((_class56 = class _class { - append(e) { - this.text += e; - } - lineBreak() { - this.text += un; - } - readRange(e, t) { - if (!e) return this; - var i = e.parentNode; - for (var n = e; ; ) { - this.findPointBefore(i, n); - var s = this.text.length; - this.readNode(n); - var o = n.nextSibling; - if (o == t) break; - var l = Fe.get(n), - u = Fe.get(o); - (l && u ? l.breakAfter : (l ? l.breakAfter : lo(n)) || (lo(o) && (n.nodeName != "BR" || n.cmIgnore) && this.text.length > s)) && this.lineBreak(), (n = o); - } - return this.findPointBefore(i, t), this; - } - readTextNode(e) { - var t = e.nodeValue; - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = this.points[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - i.node == e && (i.pos = this.text.length + Math.min(i.offset, t.length)); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - for (var i1 = 0, n = this.lineSeparator ? null : /\r\n?|\n/g; ; ) { - var s = -1, - o = 1, - l = void 0; - if ((this.lineSeparator ? ((s = t.indexOf(this.lineSeparator, i1)), (o = this.lineSeparator.length)) : (l = n.exec(t)) && ((s = l.index), (o = l[0].length)), this.append(t.slice(i1, s < 0 ? t.length : s)), s < 0)) break; - var _iteratorNormalCompletion1 = true, - _didIteratorError1 = false, - _iteratorError1 = undefined; - if ((this.lineBreak(), o > 1)) - try { - for (var _iterator1 = this.points[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var u = _step1.value; - u.node == e && u.pos > this.text.length && (u.pos -= o - 1); - } - } catch (err) { - _didIteratorError1 = true; - _iteratorError1 = err; - } finally { - try { - if (!_iteratorNormalCompletion1 && _iterator1.return != null) { - _iterator1.return(); - } - } finally { - if (_didIteratorError1) { - throw _iteratorError1; - } - } - } - i1 = s + o; - } - } - readNode(e) { - if (e.cmIgnore) return; - var t = Fe.get(e), - i = t && t.overrideDOMText; - if (i != null) { - this.findPointInside(e, i.length); - for (var n = i.iter(); !n.next().done; ) n.lineBreak ? this.lineBreak() : this.append(n.value); - } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null); - } - findPointBefore(e, t) { - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = this.points[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - i.node == e && e.childNodes[i.offset] == t && (i.pos = this.text.length); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } - findPointInside(e, t) { - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = this.points[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - (e.nodeType == 3 ? i.node == e : e.contains(i.node)) && (i.pos = this.text.length + (tA(e, i.node, i.offset) ? t : 0)); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } - constructor(e, t) { - (this.points = e), (this.text = ""), (this.lineSeparator = t.facet(Ae.lineSeparator)); - } - }), - h(_class56, "DOMReader"), - _class56); - function tA(r, e, t) { - for (;;) { - if (!e || t < Zt(e)) return !1; - if (e == r) return !0; - (t = Qi(e) + 1), (e = e.parentNode); - } - } - h(tA, "isAtEnd"); - var mo = - ((_class57 = class _class { - constructor(e, t) { - (this.node = e), (this.offset = t), (this.pos = -1); - } - }), - h(_class57, "DOMPoint"), - _class57), - Qa = - ((_class58 = class _class { - constructor(e, t, i, n) { - (this.typeOver = n), (this.bounds = null), (this.text = ""); - var _e_docView = e.docView, - s = _e_docView.impreciseHead, - o = _e_docView.impreciseAnchor; - if (e.state.readOnly && t > -1) this.newSel = null; - else if (t > -1 && (this.bounds = e.docView.domBoundsAround(t, i, 0))) { - var l = s || o ? [] : nA(e), - u = new wa(l, e.state); - u.readRange(this.bounds.startDOM, this.bounds.endDOM), (this.text = u.text), (this.newSel = sA(l, this.bounds.from)); - } else { - var l1 = e.observer.selectionRange, - u1 = (s && s.node == l1.focusNode && s.offset == l1.focusOffset) || !ia(e.contentDOM, l1.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(l1.focusNode, l1.focusOffset), - a = (o && o.node == l1.anchorNode && o.offset == l1.anchorOffset) || !ia(e.contentDOM, l1.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(l1.anchorNode, l1.anchorOffset), - c = e.viewport; - if ((W.ios || W.chrome) && e.state.selection.main.empty && u1 != a && (c.from > 0 || c.to < e.state.doc.length)) { - var f = Math.min(u1, a), - d = Math.max(u1, a), - p = c.from - f, - m = c.to - d; - (p == 0 || p == 1 || f == 0) && (m == 0 || m == -1 || d == e.state.doc.length) && ((u1 = 0), (a = e.state.doc.length)); - } - this.newSel = Z.single(a, u1); + ka = + ((_class60 = class _class { + constructor(e, t, r, n) { + (this.typeOver = n), (this.bounds = null), (this.text = ""); + var _e_docView = e.docView, + s = _e_docView.impreciseHead, + o = _e_docView.impreciseAnchor; + if (e.state.readOnly && t > -1) this.newSel = null; + else if (t > -1 && (this.bounds = e.docView.domBoundsAround(t, r, 0))) { + var u = s || o ? [] : xk(e), + l = new ro(u, e.state); + l.readRange(this.bounds.startDOM, this.bounds.endDOM), (this.text = l.text), (this.newSel = Sk(u, this.bounds.from)); + } else { + var u1 = e.observer.selectionRange, + l1 = (s && s.node == u1.focusNode && s.offset == u1.focusOffset) || !fr(e.contentDOM, u1.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(u1.focusNode, u1.focusOffset), + h = (o && o.node == u1.anchorNode && o.offset == u1.anchorOffset) || !fr(e.contentDOM, u1.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(u1.anchorNode, u1.anchorOffset); + this.newSel = Q.single(h, l1); } } }), - h(_class58, "DOMChange"), - _class58); - function qD(r, e) { + (() => { + a(_class60, "DOMChange"); + })(), + _class60); + function AD(i, e) { var t, - i = e.newSel, - n = r.state.selection.main, - s = r.inputState.lastKeyTime > Date.now() - 100 ? r.inputState.lastKeyCode : -1; + r = e.newSel, + n = i.state.selection.main, + s = i.inputState.lastKeyTime > Date.now() - 100 ? i.inputState.lastKeyCode : -1; if (e.bounds) { var _e_bounds = e.bounds, o = _e_bounds.from, - l = _e_bounds.to, - u = n.from, - a = null; - (s === 8 || (W.android && e.text.length < l - o)) && ((u = n.to), (a = "end")); - var c = rA(r.state.doc.sliceString(o, l, un), e.text, u - o, a); - c && (W.chrome && s == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == un + un && c.toB--, (t = { from: o + c.from, to: o + c.toA, insert: fe.of(e.text.slice(c.from, c.toB).split(un)) })); - } else i && ((!r.hasFocus && r.state.facet(vo)) || i.main.eq(n)) && (i = null); - if (!t && !i) return !1; + u = _e_bounds.to, + l = n.from, + h = null; + (s === 8 || (W.android && e.text.length < u - o)) && ((l = n.to), (h = "end")); + var c = wk(i.state.doc.sliceString(o, u, ur), e.text, l - o, h); + c && (W.chrome && s == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == ur + ur && c.toB--, (t = { from: o + c.from, to: o + c.toA, insert: de.of(e.text.slice(c.from, c.toB).split(ur)) })); + } else r && ((!i.hasFocus && i.state.facet(Do)) || r.main.eq(n)) && (r = null); + if (!t && !r) return !1; if ( - (!t && e.typeOver && !n.empty && i && i.main.empty - ? (t = { from: n.from, to: n.to, insert: r.state.doc.slice(n.from, n.to) }) + (!t && e.typeOver && !n.empty && r && r.main.empty + ? (t = { from: n.from, to: n.to, insert: i.state.doc.slice(n.from, n.to) }) : t && t.from >= n.from && t.to <= n.to && (t.from != n.from || t.to != n.to) && n.to - n.from - (t.to - t.from) <= 4 - ? (t = { from: n.from, to: n.to, insert: r.state.doc.slice(n.from, t.from).append(t.insert).append(r.state.doc.slice(t.to, n.to)) }) - : (W.mac || W.android) && t && t.from == t.to && t.from == n.head - 1 && /^\. ?$/.test(t.insert.toString()) && r.contentDOM.getAttribute("autocorrect") == "off" - ? (i && t.insert.length == 2 && (i = Z.single(i.main.anchor - 1, i.main.head - 1)), (t = { from: n.from, to: n.to, insert: fe.of([" "]) })) - : W.chrome && t && t.from == t.to && t.from == n.head && t.insert.toString() == "\n " && r.lineWrapping && (i && (i = Z.single(i.main.anchor - 1, i.main.head - 1)), (t = { from: n.from, to: n.to, insert: fe.of([" "]) })), + ? (t = { from: n.from, to: n.to, insert: i.state.doc.slice(n.from, t.from).append(t.insert).append(i.state.doc.slice(t.to, n.to)) }) + : (W.mac || W.android) && t && t.from == t.to && t.from == n.head - 1 && /^\. ?$/.test(t.insert.toString()) && i.contentDOM.getAttribute("autocorrect") == "off" + ? (r && t.insert.length == 2 && (r = Q.single(r.main.anchor - 1, r.main.head - 1)), (t = { from: n.from, to: n.to, insert: de.of([" "]) })) + : W.chrome && t && t.from == t.to && t.from == n.head && t.insert.toString() == "\n " && i.lineWrapping && (r && (r = Q.single(r.main.anchor - 1, r.main.head - 1)), (t = { from: n.from, to: n.to, insert: de.of([" "]) })), t) ) { + var o1 = i.state; if ( - (W.ios && r.inputState.flushIOSKey(t)) || - (W.android && - ((t.to == n.to && (t.from == n.from || (t.from == n.from - 1 && r.state.sliceDoc(t.from, n.from) == " ")) && t.insert.length == 1 && t.insert.lines == 2 && Fr(r.contentDOM, "Enter", 13)) || - (((t.from == n.from - 1 && t.to == n.to && t.insert.length == 0) || (s == 8 && t.insert.length < t.to - t.from && t.to > n.head)) && Fr(r.contentDOM, "Backspace", 8)) || - (t.from == n.from && t.to == n.to + 1 && t.insert.length == 0 && Fr(r.contentDOM, "Delete", 46)))) + (W.ios && i.inputState.flushIOSKey(i)) || + (W.android && ((t.from == n.from && t.to == n.to && t.insert.length == 1 && t.insert.lines == 2 && cr(i.contentDOM, "Enter", 13)) || (((t.from == n.from - 1 && t.to == n.to && t.insert.length == 0) || (s == 8 && t.insert.length < t.to - t.from)) && cr(i.contentDOM, "Backspace", 8)) || (t.from == n.from && t.to == n.to + 1 && t.insert.length == 0 && cr(i.contentDOM, "Delete", 46)))) ) return !0; - var o1 = t.insert.toString(); - r.inputState.composing >= 0 && r.inputState.composing++; - var l1, - u1 = h(() => l1 || (l1 = iA(r, t, i)), "defaultInsert"); - return r.state.facet(FD).some((a) => a(r, t.from, t.to, o1, u1)) || r.dispatch(u1()), !0; - } else if (i && !i.main.eq(n)) { + var u1 = t.insert.toString(); + if (i.state.facet(Qg).some((c) => c(i, t.from, t.to, u1))) return !0; + i.inputState.composing >= 0 && i.inputState.composing++; + var l1; + if (t.from >= n.from && t.to <= n.to && t.to - t.from >= (n.to - n.from) / 3 && (!r || (r.main.empty && r.main.from == t.from + t.insert.length)) && i.inputState.composing < 0) { + var c1 = n.from < t.from ? o1.sliceDoc(n.from, t.from) : "", + f = n.to > t.to ? o1.sliceDoc(t.to, n.to) : ""; + l1 = o1.replaceSelection(i.state.toText(c1 + t.insert.sliceString(0, void 0, i.state.lineBreak) + f)); + } else { + var c2 = o1.changes(t), + f1 = r && r.main.to <= c2.newLength ? r.main : void 0; + if (o1.selection.ranges.length > 1 && i.inputState.composing >= 0 && t.to <= n.to && t.to >= n.to - 10) { + var d = i.state.sliceDoc(t.from, t.to), + p = uD(i) || i.state.doc.lineAt(n.head), + m = n.to - t.to, + b = n.to - n.from; + l1 = o1.changeByRange((g) => { + if (g.from == n.from && g.to == n.to) return { changes: c2, range: f1 || g.map(c2) }; + var D = g.to - m, + F = D - d.length; + if (g.to - g.from != b || i.state.sliceDoc(F, D) != d || (p && g.to >= p.from && g.from <= p.to)) return { range: g }; + var w = o1.changes({ from: F, to: D, insert: t.insert }), + x = g.to - n.to; + return { changes: w, range: f1 ? Q.range(Math.max(0, f1.anchor + x), Math.max(0, f1.head + x)) : g.map(w) }; + }); + } else l1 = { changes: c2, selection: f1 && o1.selection.replaceRange(f1) }; + } + var h1 = "input.type"; + return (i.composing || (i.inputState.compositionPendingChange && i.inputState.compositionEndedAt > Date.now() - 50)) && ((i.inputState.compositionPendingChange = !1), (h1 += ".compose"), i.inputState.compositionFirstChange && ((h1 += ".start"), (i.inputState.compositionFirstChange = !1))), i.dispatch(l1, { scrollIntoView: !0, userEvent: h1 }), !0; + } else if (r && !r.main.eq(n)) { var o2 = !1, - l2 = "select"; - return r.inputState.lastSelectionTime > Date.now() - 50 && (r.inputState.lastSelectionOrigin == "select" && (o2 = !0), (l2 = r.inputState.lastSelectionOrigin)), r.dispatch({ selection: i, scrollIntoView: o2, userEvent: l2 }), !0; + u2 = "select"; + return i.inputState.lastSelectionTime > Date.now() - 50 && (i.inputState.lastSelectionOrigin == "select" && (o2 = !0), (u2 = i.inputState.lastSelectionOrigin)), i.dispatch({ selection: r, scrollIntoView: o2, userEvent: u2 }), !0; } else return !1; } - h(qD, "applyDOMChange"); - function iA(r, e, t) { - var i, - n = r.state, - s = n.selection.main; - if (e.from >= s.from && e.to <= s.to && e.to - e.from >= (s.to - s.from) / 3 && (!t || (t.main.empty && t.main.from == e.from + e.insert.length)) && r.inputState.composing < 0) { - var l = s.from < e.from ? n.sliceDoc(s.from, e.from) : "", - u = s.to > e.to ? n.sliceDoc(e.to, s.to) : ""; - i = n.replaceSelection(r.state.toText(l + e.insert.sliceString(0, void 0, r.state.lineBreak) + u)); - } else { - var l1 = n.changes(e), - u1 = t && t.main.to <= l1.newLength ? t.main : void 0; - if (n.selection.ranges.length > 1 && r.inputState.composing >= 0 && e.to <= s.to && e.to >= s.to - 10) { - var a = r.state.sliceDoc(e.from, e.to), - c, - f = t && SD(r, t.main.head); - if (f) { - var m = e.insert.length - (e.to - e.from); - c = { from: f.from, to: f.to - m }; - } else c = r.state.doc.lineAt(s.head); - var d = s.to - e.to, - p = s.to - s.from; - i = n.changeByRange((m) => { - if (m.from == s.from && m.to == s.to) return { changes: l1, range: u1 || m.map(l1) }; - var F = m.to - d, - g = F - a.length; - if (m.to - m.from != p || r.state.sliceDoc(g, F) != a || (m.to >= c.from && m.from <= c.to)) return { range: m }; - var D = n.changes({ from: g, to: F, insert: e.insert }), - b = m.to - s.to; - return { changes: D, range: u1 ? Z.range(Math.max(0, u1.anchor + b), Math.max(0, u1.head + b)) : m.map(D) }; - }); - } else i = { changes: l1, selection: u1 && n.selection.replaceRange(u1) }; - } - var o = "input.type"; - return (r.composing || (r.inputState.compositionPendingChange && r.inputState.compositionEndedAt > Date.now() - 50)) && ((r.inputState.compositionPendingChange = !1), (o += ".compose"), r.inputState.compositionFirstChange && ((o += ".start"), (r.inputState.compositionFirstChange = !1))), n.update(i, { userEvent: o, scrollIntoView: !0 }); - } - h(iA, "applyDefaultInsert"); - function rA(r, e, t, i) { - var n = Math.min(r.length, e.length), + a(AD, "applyDOMChange"); + function wk(i, e, t, r) { + var n = Math.min(i.length, e.length), s = 0; - for (; s < n && r.charCodeAt(s) == e.charCodeAt(s); ) s++; - if (s == n && r.length == e.length) return null; - var o = r.length, - l = e.length; - for (; o > 0 && l > 0 && r.charCodeAt(o - 1) == e.charCodeAt(l - 1); ) o--, l--; - if (i == "end") { - var u = Math.max(0, s - Math.min(o, l)); - t -= o + u - s; - } - if (o < s && r.length < e.length) { - var u1 = t <= s && t >= o ? s - t : 0; - (s -= u1), (l = s + (l - o)), (o = s); - } else if (l < s) { - var u2 = t <= s && t >= l ? s - t : 0; - (s -= u2), (o = s + (o - l)), (l = s); - } - return { from: s, toA: o, toB: l }; - } - h(rA, "findDiff"); - function nA(r) { + for (; s < n && i.charCodeAt(s) == e.charCodeAt(s); ) s++; + if (s == n && i.length == e.length) return null; + var o = i.length, + u = e.length; + for (; o > 0 && u > 0 && i.charCodeAt(o - 1) == e.charCodeAt(u - 1); ) o--, u--; + if (r == "end") { + var l = Math.max(0, s - Math.min(o, u)); + t -= o + l - s; + } + if (o < s && i.length < e.length) { + var l1 = t <= s && t >= o ? s - t : 0; + (s -= l1), (u = s + (u - o)), (o = s); + } else if (u < s) { + var l2 = t <= s && t >= u ? s - t : 0; + (s -= l2), (o = s + (o - u)), (u = s); + } + return { from: s, toA: o, toB: u }; + } + a(wk, "findDiff"); + function xk(i) { var e = []; - if (r.root.activeElement != r.contentDOM) return e; - var _r_observer_selectionRange = r.observer.selectionRange, - t = _r_observer_selectionRange.anchorNode, - i = _r_observer_selectionRange.anchorOffset, - n = _r_observer_selectionRange.focusNode, - s = _r_observer_selectionRange.focusOffset; - return t && (e.push(new mo(t, i)), (n != t || s != i) && e.push(new mo(n, s))), e; - } - h(nA, "selectionPoints"); - function sA(r, e) { - if (r.length == 0) return null; - var t = r[0].pos, - i = r.length == 2 ? r[1].pos : t; - return t > -1 && i > -1 ? Z.single(t + e, i + e) : null; - } - h(sA, "selectionFromPoints"); - var oA = { childList: !0, characterData: !0, subtree: !0, attributes: !0, characterDataOldValue: !0 }, - Zu = W.ie && W.ie_version <= 11, - _a = - ((_class59 = class _class { + if (i.root.activeElement != i.contentDOM) return e; + var _i_observer_selectionRange = i.observer.selectionRange, + t = _i_observer_selectionRange.anchorNode, + r = _i_observer_selectionRange.anchorOffset, + n = _i_observer_selectionRange.focusNode, + s = _i_observer_selectionRange.focusOffset; + return t && (e.push(new no(t, r)), (n != t || s != r) && e.push(new no(n, s))), e; + } + a(xk, "selectionPoints"); + function Sk(i, e) { + if (i.length == 0) return null; + var t = i[0].pos, + r = i.length == 2 ? i[1].pos : t; + return t > -1 && r > -1 ? Q.single(t + e, r + e) : null; + } + a(Sk, "selectionFromPoints"); + var Bk = { childList: !0, characterData: !0, subtree: !0, attributes: !0, characterDataOldValue: !0 }, + jl = W.ie && W.ie_version <= 11, + wa = + ((_class61 = class _class { onScrollChanged(e) { - this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure(); + this.view.inputState.runScrollHandlers(this.view, e), this.intersecting && this.view.measure(); } onScroll(e) { this.intersecting && this.flush(!1), this.onScrollChanged(e); @@ -14906,16 +14565,15 @@ function _ts_generator(thisArg, body) { (this.resizeTimeout = -1), this.view.requestMeasure(); }, 50)); } - onPrint(e) { - (e.type == "change" && !e.matches) || - ((this.view.viewState.printing = !0), + onPrint() { + (this.view.viewState.printing = !0), this.view.measure(), setTimeout(() => { (this.view.viewState.printing = !1), this.view.requestMeasure(); - }, 500)); + }, 500); } updateGaps(e) { - if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((t, i) => t != e[i]))) { + if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((t, r) => t != e[r]))) { this.gapIntersection.disconnect(); var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -14946,25 +14604,23 @@ function _ts_generator(thisArg, body) { var t = this.selectionChanged; if (!this.readSelectionRange() || this.delayedAndroidKey) return; var _this = this, - i = _this.view, + r = _this.view, n = this.selectionRange; - if (i.state.facet(vo) ? i.root.activeElement != this.dom : !eo(i.dom, n)) return; - var s = n.anchorNode && i.docView.nearest(n.anchorNode); + if (r.state.facet(Do) ? r.root.activeElement != this.dom : !zs(r.dom, n)) return; + var s = n.anchorNode && r.docView.nearest(n.anchorNode); if (s && s.ignoreEvent(e)) { t || (this.selectionChanged = !1); return; } - ((W.ie && W.ie_version <= 11) || (W.android && W.chrome)) && !i.state.selection.main.empty && n.focusNode && hn(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset) ? this.flushSoon() : this.flush(!1); + ((W.ie && W.ie_version <= 11) || (W.android && W.chrome)) && !r.state.selection.main.empty && n.focusNode && Ks(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset) ? this.flushSoon() : this.flush(!1); } readSelectionRange() { var _this = this, e = _this.view, - t = oo(e.root); - if (!t) return !1; - var i = (W.safari && e.root.nodeType == 11 && Xv(this.dom.ownerDocument) == this.dom && lA(this.view, t)) || t; - if (!i || this.selectionRange.eq(i)) return !1; - var n = eo(this.dom, i); - return n && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && ix(this.dom, i) ? ((this.view.inputState.lastFocusTime = 0), e.docView.updateSelection(), !1) : (this.selectionRange.setRange(i), n && (this.selectionChanged = !0), !0); + t = (W.safari && e.root.nodeType == 11 && Tv(this.dom.ownerDocument) == this.dom && _k(this.view)) || Ys(e.root); + if (!t || this.selectionRange.eq(t)) return !1; + var r = zs(this.dom, t); + return r && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Lv(this.dom, t) ? ((this.view.inputState.lastFocusTime = 0), e.docView.updateSelection(), !1) : (this.selectionRange.setRange(t), r && (this.selectionChanged = !0), !0); } setSelectionRange(e, t) { this.selectionRange.set(e.node, e.offset, t.node, t.offset), (this.selectionChanged = !1); @@ -14976,9 +14632,9 @@ function _ts_generator(thisArg, body) { this.parentCheck = -1; var e = 0, t = null; - for (var i = this.dom; i; ) - if (i.nodeType == 1) !t && e < this.scrollTargets.length && this.scrollTargets[e] == i ? e++ : t || (t = this.scrollTargets.slice(0, e)), t && t.push(i), (i = i.assignedSlot || i.parentNode); - else if (i.nodeType == 11) i = i.host; + for (var r = this.dom; r; ) + if (r.nodeType == 1) !t && e < this.scrollTargets.length && this.scrollTargets[e] == r ? e++ : t || (t = this.scrollTargets.slice(0, e)), t && t.push(r), (r = r.assignedSlot || r.parentNode); + else if (r.nodeType == 11) r = r.host; else break; if ((e < this.scrollTargets.length && !t && (t = this.scrollTargets.slice(0, e)), t)) { var _iteratorNormalCompletion = true, @@ -14986,8 +14642,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.scrollTargets[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i1 = _step.value; - i1.removeEventListener("scroll", this.onScroll); + var r1 = _step.value; + r1.removeEventListener("scroll", this.onScroll); } } catch (err) { _didIteratorError = true; @@ -15008,8 +14664,8 @@ function _ts_generator(thisArg, body) { _iteratorError1 = undefined; try { for (var _iterator1 = (this.scrollTargets = t)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var i2 = _step1.value; - i2.addEventListener("scroll", this.onScroll); + var r2 = _step1.value; + r2.addEventListener("scroll", this.onScroll); } } catch (err) { _didIteratorError1 = true; @@ -15036,24 +14692,24 @@ function _ts_generator(thisArg, body) { } } start() { - this.active || (this.observer.observe(this.dom, oA), Zu && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), (this.active = !0)); + this.active || (this.observer.observe(this.dom, Bk), jl && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), (this.active = !0)); } stop() { - this.active && ((this.active = !1), this.observer.disconnect(), Zu && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); + this.active && ((this.active = !1), this.observer.disconnect(), jl && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); } clear() { this.processRecords(), (this.queue.length = 0), (this.selectionChanged = !1); } delayAndroidKey(e, t) { - var i; + var r; if (!this.delayedAndroidKey) { - var n = h(() => { + var n = a(() => { var s = this.delayedAndroidKey; - s && (this.clearDelayedAndroidKey(), (this.view.inputState.lastKeyCode = s.keyCode), (this.view.inputState.lastKeyTime = Date.now()), !this.flush() && s.force && Fr(this.dom, s.key, s.keyCode)); + s && (this.clearDelayedAndroidKey(), (this.view.inputState.lastKeyCode = s.keyCode), (this.view.inputState.lastKeyTime = Date.now()), !this.flush() && s.force && cr(this.dom, s.key, s.keyCode)); }, "flush"); this.flushingAndroidKey = this.view.win.requestAnimationFrame(n); } - (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = { key: e, keyCode: t, force: this.lastChange < Date.now() - 50 || !!(!((i = this.delayedAndroidKey) === null || i === void 0) && i.force) }); + (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = { key: e, keyCode: t, force: this.lastChange < Date.now() - 50 || !!(!((r = this.delayedAndroidKey) === null || r === void 0) && r.force) }); } clearDelayedAndroidKey() { this.win.cancelAnimationFrame(this.flushingAndroidKey), (this.delayedAndroidKey = null), (this.flushingAndroidKey = -1); @@ -15096,7 +14752,7 @@ function _ts_generator(thisArg, body) { var e = this.pendingRecords(); e.length && (this.queue = []); var t = -1, - i = -1, + r = -1, n = !1; var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -15106,7 +14762,7 @@ function _ts_generator(thisArg, body) { var s = _step.value; var o = this.readMutation(s); var ref; - o && (o.typeOver && (n = !0), t == -1 ? ((ref = o), (t = ref.from), (i = ref.to), ref) : ((t = Math.min(o.from, t)), (i = Math.max(o.to, i)))); + o && (o.typeOver && (n = !0), t == -1 ? ((ref = o), (t = ref.from), (r = ref.to), ref) : ((t = Math.min(o.from, t)), (r = Math.max(o.to, r)))); } } catch (err) { _didIteratorError = true; @@ -15122,57 +14778,54 @@ function _ts_generator(thisArg, body) { } } } - return { from: t, to: i, typeOver: n }; + return { from: t, to: r, typeOver: n }; } readChange() { var _this_processRecords = this.processRecords(), e = _this_processRecords.from, t = _this_processRecords.to, - i = _this_processRecords.typeOver, - n = this.selectionChanged && eo(this.dom, this.selectionRange); - if (e < 0 && !n) return null; - e > -1 && (this.lastChange = Date.now()), (this.view.inputState.lastFocusTime = 0), (this.selectionChanged = !1); - var s = new Qa(this.view, e, t, i); - return (this.view.docView.domChanged = { newSel: s.newSel ? s.newSel.main : null }), s; + r = _this_processRecords.typeOver, + n = this.selectionChanged && zs(this.dom, this.selectionRange); + return e < 0 && !n ? null : (e > -1 && (this.lastChange = Date.now()), (this.view.inputState.lastFocusTime = 0), (this.selectionChanged = !1), new ka(this.view, e, t, r)); } flush() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; if (this.delayedFlush >= 0 || this.delayedAndroidKey) return !1; e && this.readSelectionRange(); var t = this.readChange(); - if (!t) return this.view.requestMeasure(), !1; - var i = this.view.state, - n = qD(this.view, t); - return this.view.state == i && this.view.update([]), n; + if (!t) return !1; + var r = this.view.state, + n = AD(this.view, t); + return this.view.state == r && this.view.update([]), n; } readMutation(e) { var t = this.view.docView.nearest(e.target); if (!t || t.ignoreMutation(e)) return null; - if ((t.markDirty(e.type == "attributes"), e.type == "attributes" && (t.flags |= 4), e.type == "childList")) { - var i = Ng(t, e.previousSibling || e.target.previousSibling, -1), - n = Ng(t, e.nextSibling || e.target.nextSibling, 1); - return { from: i ? t.posAfter(i) : t.posAtStart, to: n ? t.posBefore(n) : t.posAtEnd, typeOver: !1 }; + if ((t.markDirty(e.type == "attributes"), e.type == "attributes" && (t.dirty |= 4), e.type == "childList")) { + var r = Ag(t, e.previousSibling || e.target.previousSibling, -1), + n = Ag(t, e.nextSibling || e.target.nextSibling, 1); + return { from: r ? t.posAfter(r) : t.posAtStart, to: n ? t.posBefore(n) : t.posAtEnd, typeOver: !1 }; } else return e.type == "characterData" ? { from: t.posAtStart, to: t.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null; } setWindow(e) { e != this.win && (this.removeWindowListeners(this.win), (this.win = e), this.addWindowListeners(this.win)); } addWindowListeners(e) { - e.addEventListener("resize", this.onResize), this.printQuery ? this.printQuery.addEventListener("change", this.onPrint) : e.addEventListener("beforeprint", this.onPrint), e.addEventListener("scroll", this.onScroll), e.document.addEventListener("selectionchange", this.onSelectionChange); + e.addEventListener("resize", this.onResize), e.addEventListener("beforeprint", this.onPrint), e.addEventListener("scroll", this.onScroll), e.document.addEventListener("selectionchange", this.onSelectionChange); } removeWindowListeners(e) { - e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), this.printQuery ? this.printQuery.removeEventListener("change", this.onPrint) : e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange); + e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange); } destroy() { - var e, t, i; - this.stop(), (e = this.intersection) === null || e === void 0 || e.disconnect(), (t = this.gapIntersection) === null || t === void 0 || t.disconnect(), (i = this.resizeScroll) === null || i === void 0 || i.disconnect(); + var e, t, r, n; + this.stop(), (e = this.intersection) === null || e === void 0 || e.disconnect(), (t = this.gapIntersection) === null || t === void 0 || t.disconnect(), (r = this.resizeScroll) === null || r === void 0 || r.disconnect(), (n = this.resizeContent) === null || n === void 0 || n.disconnect(); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.scrollTargets[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var n = _step.value; - n.removeEventListener("scroll", this.onScroll); + var s = _step.value; + s.removeEventListener("scroll", this.onScroll); } } catch (err) { _didIteratorError = true; @@ -15193,7 +14846,7 @@ function _ts_generator(thisArg, body) { constructor(e) { (this.view = e), (this.active = !1), - (this.selectionRange = new ra()), + (this.selectionRange = new Yl()), (this.selectionChanged = !1), (this.delayedFlush = -1), (this.resizeTimeout = -1), @@ -15204,10 +14857,10 @@ function _ts_generator(thisArg, body) { (this.scrollTargets = []), (this.intersection = null), (this.resizeScroll = null), + (this.resizeContent = null), (this.intersecting = !1), (this.gapIntersection = null), (this.gaps = []), - (this.printQuery = null), (this.parentCheck = -1), (this.dom = e.contentDOM), (this.observer = new MutationObserver((t) => { @@ -15216,8 +14869,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - this.queue.push(i); + var r = _step.value; + this.queue.push(r); } } catch (err) { _didIteratorError = true; @@ -15233,9 +14886,9 @@ function _ts_generator(thisArg, body) { } } } - ((W.ie && W.ie_version <= 11) || (W.ios && e.composing)) && t.some((i) => (i.type == "childList" && i.removedNodes.length) || (i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length)) ? this.flushSoon() : this.flush(); + ((W.ie && W.ie_version <= 11) || (W.ios && e.composing)) && t.some((r) => (r.type == "childList" && r.removedNodes.length) || (r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length)) ? this.flushSoon() : this.flush(); })), - Zu && + jl && (this.onCharData = (t) => { this.queue.push({ target: t.target, type: "characterData", oldValue: t.prevValue }), this.flushSoon(); }), @@ -15243,13 +14896,14 @@ function _ts_generator(thisArg, body) { (this.onResize = this.onResize.bind(this)), (this.onPrint = this.onPrint.bind(this)), (this.onScroll = this.onScroll.bind(this)), - window.matchMedia && (this.printQuery = window.matchMedia("print")), typeof ResizeObserver == "function" && ((this.resizeScroll = new ResizeObserver(() => { var t; ((t = this.view.docView) === null || t === void 0 ? void 0 : t.lastUpdate) < Date.now() - 75 && this.onResize(); })), - this.resizeScroll.observe(e.scrollDOM)), + this.resizeScroll.observe(e.scrollDOM), + (this.resizeContent = new ResizeObserver(() => this.view.requestMeasure())), + this.resizeContent.observe(e.contentDOM)), this.addWindowListeners((this.win = e.win)), this.start(), typeof IntersectionObserver == "function" && @@ -15257,7 +14911,7 @@ function _ts_generator(thisArg, body) { (t) => { this.parentCheck < 0 && (this.parentCheck = setTimeout(this.listenForScroll.bind(this), 1e3)), t.length > 0 && t[t.length - 1].intersectionRatio > 0 != this.intersecting && ((this.intersecting = !this.intersecting), this.intersecting != this.view.inView && this.onScrollChanged(document.createEvent("Event"))); }, - { threshold: [0, 0.001] }, + { threshold: [0, 0.001] } )), this.intersection.observe(this.dom), (this.gapIntersection = new IntersectionObserver((t) => { @@ -15267,42 +14921,37 @@ function _ts_generator(thisArg, body) { this.readSelectionRange(); } }), - h(_class59, "DOMObserver"), - _class59); - function Ng(r, e, t) { + (() => { + a(_class61, "DOMObserver"); + })(), + _class61); + function Ag(i, e, t) { for (; e; ) { - var i = Fe.get(e); - if (i && i.parent == r) return i; + var r = Ce.get(e); + if (r && r.parent == i) return r; var n = e.parentNode; - e = n != r.dom ? n : t > 0 ? e.nextSibling : e.previousSibling; + e = n != i.dom ? n : t > 0 ? e.nextSibling : e.previousSibling; } return null; } - h(Ng, "findChild"); - function Mg(r, e) { - var t = e.startContainer, - i = e.startOffset, - n = e.endContainer, - s = e.endOffset, - o = r.docView.domAtPos(r.state.selection.main.anchor); + a(Ag, "findChild"); + function _k(i) { + var e = null; + function t(l) { + l.preventDefault(), l.stopImmediatePropagation(), (e = l.getTargetRanges()[0]); + } + if ((a(t, "read"), i.contentDOM.addEventListener("beforeinput", t, !0), i.dom.ownerDocument.execCommand("indent"), i.contentDOM.removeEventListener("beforeinput", t, !0), !e)) return null; + var r = e.startContainer, + n = e.startOffset, + s = e.endContainer, + o = e.endOffset, + u = i.docView.domAtPos(i.state.selection.main.anchor); var ref; - return hn(o.node, o.offset, n, s) && ((ref = [n, s, t, i]), (t = ref[0]), (i = ref[1]), (n = ref[2]), (s = ref[3]), ref), { anchorNode: t, anchorOffset: i, focusNode: n, focusOffset: s }; - } - h(Mg, "buildSelectionRangeFromRange"); - function lA(r, e) { - if (e.getComposedRanges) { - var n = e.getComposedRanges(r.root)[0]; - if (n) return Mg(r, n); - } - var t = null; - function i(n) { - n.preventDefault(), n.stopImmediatePropagation(), (t = n.getTargetRanges()[0]); - } - return h(i, "read"), r.contentDOM.addEventListener("beforeinput", i, !0), r.dom.ownerDocument.execCommand("indent"), r.contentDOM.removeEventListener("beforeinput", i, !0), t ? Mg(r, t) : null; + return Ks(u.node, u.offset, s, o) && ((ref = [s, o, r, n]), (r = ref[0]), (n = ref[1]), (s = ref[2]), (o = ref[3]), ref), { anchorNode: r, anchorOffset: n, focusNode: s, focusOffset: o }; } - h(lA, "safariSelectionRangeHack"); - var ne = - ((_r42 = class r { + a(_k, "safariSelectionRangeHack"); + var re = + ((_i41 = class i { get state() { return this.viewState.state; } @@ -15331,13 +14980,13 @@ function _ts_generator(thisArg, body) { for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) { e[_key] = arguments[_key]; } - var t = e.length == 1 && e[0] instanceof Le ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)]; - this.dispatchTransactions(t, this); + var t = e.length == 1 && e[0] instanceof Pe ? e[0] : this.state.update(...e); + this._dispatch(t, this); } update(e) { if (this.updateState != 0) throw new Error("Calls to EditorView.update are not allowed while an update is in progress"); var t = !1, - i = !1, + r = !1, n, s = this.state; var _iteratorNormalCompletion = true, @@ -15368,13 +15017,13 @@ function _ts_generator(thisArg, body) { return; } var o = this.hasFocus, - l = 0, - u = null; - e.some((d) => d.annotation(RD)) ? ((this.inputState.notifiedFocused = o), (l = 1)) : o != this.inputState.notifiedFocused && ((this.inputState.notifiedFocused = o), (u = ND(s, o)), u || (l = 1)); - var a = this.observer.delayedAndroidKey, + u = 0, + l = null; + e.some((d) => d.annotation(gD)) ? ((this.inputState.notifiedFocused = o), (u = 1)) : o != this.inputState.notifiedFocused && ((this.inputState.notifiedFocused = o), (l = DD(s, o)), l || (u = 1)); + var h = this.observer.delayedAndroidKey, c = null; - if ((a ? (this.observer.clearDelayedAndroidKey(), (c = this.observer.readChange()), ((c && !this.state.doc.eq(s.doc)) || !this.state.selection.eq(s.selection)) && (c = null)) : this.observer.clear(), s.facet(Ae.phrases) != this.state.facet(Ae.phrases))) return this.setState(s); - (n = ao.create(this, s, e)), (n.flags |= l); + if ((h ? (this.observer.clearDelayedAndroidKey(), (c = this.observer.readChange()), ((c && !this.state.doc.eq(s.doc)) || !this.state.selection.eq(s.selection)) && (c = null)) : this.observer.clear(), s.facet(Ae.phrases) != this.state.facet(Ae.phrases))) return this.setState(s); + (n = io.create(this, s, e)), (n.flags |= u); var f = this.viewState.scrollTarget; try { this.updateState = 2; @@ -15386,16 +15035,16 @@ function _ts_generator(thisArg, body) { var d1 = _step1.value; if ((f && (f = f.map(d1.changes)), d1.scrollIntoView)) { var _d_state_selection = d1.state.selection, - _$p = _d_state_selection.main; - f = new fn(_$p.empty ? _$p : Z.cursor(_$p.head, _$p.head > _$p.anchor ? -1 : 1)); + p = _d_state_selection.main; + f = new to(p.empty ? p : Q.cursor(p.head, p.head > p.anchor ? -1 : 1)); } var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined; try { for (var _iterator2 = d1.effects[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var _$p1 = _step2.value; - _$p1.is(Hs) && (f = _$p1.value.clip(this.state)); + var p1 = _step2.value; + p1.is(ng) && (f = p1.value); } } catch (err) { _didIteratorError2 = true; @@ -15427,15 +15076,15 @@ function _ts_generator(thisArg, body) { } } this.viewState.update(n, f), - (this.bidiCache = go.update(this.bidiCache, n.changes)), + (this.bidiCache = ao.update(this.bidiCache, n.changes)), n.empty || (this.updatePlugins(n), this.inputState.update(n)), (t = this.docView.update(n)), - this.state.facet(on) != this.styleModules && this.mountStyles(), - (i = this.updateAttrs()), + this.state.facet(Jr) != this.styleModules && this.mountStyles(), + (r = this.updateAttrs()), this.showAnnouncements(e), this.docView.updateSelection( t, - e.some((d) => d.isUserEvent("select.pointer")), + e.some((d) => d.isUserEvent("select.pointer")) ); } finally { this.updateState = 0; @@ -15443,15 +15092,11 @@ function _ts_generator(thisArg, body) { var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = undefined; - if ((n.startState.facet(Xs) != n.state.facet(Xs) && (this.viewState.mustMeasureContent = !0), (t || i || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), t && this.docViewUpdate(), !n.empty)) + if ((n.startState.facet(Is) != n.state.facet(Is) && (this.viewState.mustMeasureContent = !0), (t || r || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), !n.empty)) try { - for (var _iterator3 = this.state.facet(da)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + for (var _iterator3 = this.state.facet(na)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { var d2 = _step3.value; - try { - d2(n); - } catch (p) { - Xe(this.state, p, "update listener"); - } + d2(n); } } catch (err) { _didIteratorError3 = true; @@ -15467,9 +15112,9 @@ function _ts_generator(thisArg, body) { } } } - (u || c) && + (l || c) && Promise.resolve().then(() => { - u && this.state == u.startState && this.dispatch(u), c && !qD(this, c) && a.force && Fr(this.contentDOM, a.key, a.keyCode); + l && this.state == l.startState && this.dispatch(l), c && !AD(this, c) && h.force && cr(this.contentDOM, h.key, h.keyCode); }); } setState(e) { @@ -15486,8 +15131,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - i.destroy(this); + var r = _step.value; + r.destroy(this); } } catch (err) { _didIteratorError = true; @@ -15503,14 +15148,14 @@ function _ts_generator(thisArg, body) { } } } - (this.viewState = new po(e)), (this.plugins = e.facet(sn).map((i) => new dn(i))), this.pluginMap.clear(); + (this.viewState = new lo(e)), (this.plugins = e.facet(Qr).map((r) => new tn(r))), this.pluginMap.clear(); var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; try { for (var _iterator1 = this.plugins[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var i1 = _step1.value; - i1.update(this); + var r1 = _step1.value; + r1.update(this); } } catch (err) { _didIteratorError1 = true; @@ -15526,31 +15171,31 @@ function _ts_generator(thisArg, body) { } } } - this.docView.destroy(), (this.docView = new ho(this)), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), (this.bidiCache = []); + (this.docView = new so(this)), this.inputState.ensureHandlers(this, this.plugins), this.mountStyles(), this.updateAttrs(), (this.bidiCache = []); } finally { this.updateState = 0; } t && this.focus(), this.requestMeasure(); } updatePlugins(e) { - var t = e.startState.facet(sn), - i = e.state.facet(sn); + var t = e.startState.facet(Qr), + r = e.state.facet(Qr); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if (t != i) { + if (t != r) { var n = []; var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { var s = _step.value; var o = t.indexOf(s); - if (o < 0) n.push(new dn(s)); + if (o < 0) n.push(new tn(s)); else { - var l = this.plugins[o]; - (l.mustUpdate = e), n.push(l); + var u = this.plugins[o]; + (u.mustUpdate = e), n.push(u); } } } catch (err) { @@ -15589,7 +15234,7 @@ function _ts_generator(thisArg, body) { } } } - (this.plugins = n), this.pluginMap.clear(); + (this.plugins = n), this.pluginMap.clear(), this.inputState.ensureHandlers(this, this.plugins); } else try { for (var _iterator2 = this.plugins[Symbol.iterator](), _step2; !(_iteratorNormalCompletion = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion = true) { @@ -15611,107 +15256,68 @@ function _ts_generator(thisArg, body) { } } for (var n2 = 0; n2 < this.plugins.length; n2++) this.plugins[n2].update(this); - t != i && this.inputState.ensureHandlers(this.plugins); - } - docViewUpdate() { - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = this.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var e = _step.value; - var t = e.value; - if (t && t.docViewUpdate) - try { - t.docViewUpdate(this); - } catch (i) { - Xe(this.state, i, "doc view update listener"); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } } measure() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; if (this.destroyed) return; - if ((this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey)) { - (this.measureScheduled = -1), this.requestMeasure(); - return; - } - (this.measureScheduled = 0), e && this.observer.forceFlush(); + this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), (this.measureScheduled = 0), e && this.observer.forceFlush(); var t = null, - i = this.scrollDOM, - n = i.scrollTop * this.scaleY, + r = this.scrollDOM, + n = r.scrollTop, _this_viewState = this.viewState, s = _this_viewState.scrollAnchorPos, o = _this_viewState.scrollAnchorHeight; - Math.abs(n - this.viewState.scrollTop) > 1 && (o = -1), (this.viewState.scrollAnchorHeight = -1); + if (((this.viewState.scrollAnchorHeight = -1), o < 0 || n != this.viewState.scrollTop)) + if (n > r.scrollHeight - r.clientHeight - 4) (s = -1), (o = this.viewState.heightMap.height); + else { + var u = this.viewState.lineBlockAtHeight(n); + (s = u.from), (o = u.top); + } try { - var _this, - _loop = function (l) { - if (o < 0) - if (Kg(i)) (s = -1), (o = _this.viewState.heightMap.height); - else { - var p = _this.viewState.scrollAnchorAt(n); - (s = p.from), (o = p.top); - } + var _this = this, + _loop = function (u1) { _this.updateState = 1; - var u = _this.viewState.measure(_this); - if (!u && !_this.measureRequests.length && _this.viewState.scrollTarget == null) return "break"; - if (l > 5) { + var l = _this.viewport, + h = _this.viewState.measure(_this); + if (!h && !_this.measureRequests.length && _this.viewState.scrollTarget == null) return "break"; + if (u1 > 5) { console.warn(_this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize"); return "break"; } - var a = []; + var c = []; var ref; - u & 4 || ((ref = [a, _this.measureRequests]), (_this.measureRequests = ref[0]), (a = ref[1]), ref); - var c = a.map((p) => { + h & 4 || ((ref = [c, _this.measureRequests]), (_this.measureRequests = ref[0]), (c = ref[1]), ref); + var f = c.map((b) => { try { - return p.read(_this); - } catch (m) { - return Xe(_this.state, m), Pg; + return b.read(_this); + } catch (g) { + return ht(_this.state, g), Eg; } }), - f = ao.create(_this, _this.state, []), - d = !1; - (f.flags |= u), t ? (t.flags |= u) : (t = f), (_this.updateState = 2), f.empty || (_this.updatePlugins(f), _this.inputState.update(f), _this.updateAttrs(), (d = _this.docView.update(f)), d && _this.docViewUpdate()); - for (var p1 = 0; p1 < a.length; p1++) - if (c[p1] != Pg) + d = io.create(_this, _this.state, []), + p = !1, + m = !1; + (d.flags |= h), t ? (t.flags |= h) : (t = d), (_this.updateState = 2), d.empty || (_this.updatePlugins(d), _this.inputState.update(d), _this.updateAttrs(), (p = _this.docView.update(d))); + for (var b = 0; b < c.length; b++) + if (f[b] != Eg) try { - var _$m = a[p1]; - _$m.write && _$m.write(c[p1], _this); - } catch (m) { - Xe(_this.state, m); - } - if ((d && _this.docView.updateSelection(!0), !f.viewportChanged && _this.measureRequests.length == 0)) { - if (_this.viewState.editorHeight) - if (_this.viewState.scrollTarget) { - _this.docView.scrollIntoView(_this.viewState.scrollTarget), (_this.viewState.scrollTarget = null), (o = -1); - return "continue"; - } else { - var _$m1 = (s < 0 ? _this.viewState.heightMap.height : _this.viewState.lineBlockAt(s).top) - o; - if (_$m1 > 1 || _$m1 < -1) { - (n = n + _$m1), (i.scrollTop = n / _this.scaleY), (o = -1); - return "continue"; - } + var _$g = c[b]; + _$g.write && _$g.write(f[b], _this); + } catch (g) { + ht(_this.state, g); } - return "break"; + if (_this.viewState.editorHeight) { + if (_this.viewState.scrollTarget) _this.docView.scrollIntoView(_this.viewState.scrollTarget), (_this.viewState.scrollTarget = null), (m = !0); + else if (o > -1) { + var _$g1 = (s < 0 ? _this.viewState.heightMap.height : _this.viewState.lineBlockAt(s).top) - o; + (_$g1 > 1 || _$g1 < -1) && ((r.scrollTop = n + _$g1), (m = !0)); + } } + if ((p && _this.docView.updateSelection(!0), _this.viewport.from == l.from && _this.viewport.to == l.to && !m && _this.measureRequests.length == 0)) return "break"; + o = -1; }; - for (var l = 0; ; l++) { - var _ret = ((_this = this), _loop(l)); + for (var u1 = 0; ; u1++) { + var _ret = _loop(u1); if (_ret === "break") break; } } finally { @@ -15722,9 +15328,9 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; if (t && !t.empty) try { - for (var _iterator = this.state.facet(da)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l1 = _step.value; - l1(t); + for (var _iterator = this.state.facet(na)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var u2 = _step.value; + u2(t); } } catch (err) { _didIteratorError = true; @@ -15742,18 +15348,18 @@ function _ts_generator(thisArg, body) { } } get themeClasses() { - return ka + " " + (this.state.facet(Aa) ? ID : PD) + " " + this.state.facet(Xs); + return Ea + " " + (this.state.facet(Aa) ? yD : FD) + " " + this.state.facet(Is); } updateAttrs() { - var e = Ig(this, BD, { class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses }), - t = { spellcheck: "false", autocorrect: "off", autocapitalize: "off", translate: "no", contenteditable: this.state.facet(vo) ? "true" : "false", class: "cm-content", style: "".concat(W.tabSize, ": ").concat(this.state.tabSize), role: "textbox", "aria-multiline": "true" }; - this.state.readOnly && (t["aria-readonly"] = "true"), Ig(this, qa, t); - var i = this.observer.ignore(() => { - var n = ua(this.contentDOM, this.contentAttrs, t), - s = ua(this.dom, this.editorAttrs, e); + var e = vg(this, tD, { class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses }), + t = { spellcheck: "false", autocorrect: "off", autocapitalize: "off", translate: "no", contenteditable: this.state.facet(Do) ? "true" : "false", class: "cm-content", style: "".concat(W.tabSize, ": ").concat(this.state.tabSize), role: "textbox", "aria-multiline": "true" }; + this.state.readOnly && (t["aria-readonly"] = "true"), vg(this, Pa, t); + var r = this.observer.ignore(() => { + var n = ta(this.contentDOM, this.contentAttrs, t), + s = ta(this.dom, this.editorAttrs, e); return n || s; }); - return (this.editorAttrs = e), (this.contentAttrs = t), i; + return (this.editorAttrs = e), (this.contentAttrs = t), r; } showAnnouncements(e) { var t = !0; @@ -15765,11 +15371,11 @@ function _ts_generator(thisArg, body) { _iteratorError1 = undefined; try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { - var i = _step.value; + var r = _step.value; try { - for (var _iterator1 = i.effects[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator1 = r.effects[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { var n = _step1.value; - if (n.is(r.announce)) { + if (n.is(i.announce)) { t && (this.announceDOM.textContent = ""), (t = !1); var s = this.announceDOM.appendChild(document.createElement("div")); s.textContent = n.value; @@ -15806,9 +15412,7 @@ function _ts_generator(thisArg, body) { } } mountStyles() { - this.styleModules = this.state.facet(on); - var e = this.state.facet(r.cspNonce); - ft.mount(this.root, this.styleModules.concat(eA).reverse(), e ? { nonce: e } : void 0); + (this.styleModules = this.state.facet(Jr)), ut.mount(this.root, this.styleModules.concat(kk).reverse()); } readMeasured() { if (this.updateState == 2) throw new Error("Reading the editor layout isn't allowed during an update"); @@ -15829,7 +15433,7 @@ function _ts_generator(thisArg, body) { } plugin(e) { var t = this.pluginMap.get(e); - return (t === void 0 || (t && t.spec != e)) && this.pluginMap.set(e, (t = this.plugins.find((i) => i.spec == e) || null)), t && t.update(this).value; + return (t === void 0 || (t && t.spec != e)) && this.pluginMap.set(e, (t = this.plugins.find((r) => r.spec == e) || null)), t && t.update(this).value; } get documentTop() { return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop; @@ -15837,12 +15441,6 @@ function _ts_generator(thisArg, body) { get documentPadding() { return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom }; } - get scaleX() { - return this.viewState.scaleX; - } - get scaleY() { - return this.viewState.scaleY; - } elementAtHeight(e) { return this.readMeasured(), this.viewState.elementAtHeight(e); } @@ -15858,28 +15456,22 @@ function _ts_generator(thisArg, body) { get contentHeight() { return this.viewState.contentHeight; } - moveByChar(e, t, i) { - return Ku(this, e, vg(this, e, t, i)); + moveByChar(e, t, r) { + return Wl(this, e, hg(this, e, t, r)); } moveByGroup(e, t) { - return Ku( + return Wl( this, e, - vg(this, e, t, (i) => _x(this, e.head, i)), + hg(this, e, t, (r) => ok(this, e.head, r)) ); } - visualLineSide(e, t) { - var i = this.bidiSpans(e), - n = this.textDirectionAt(e.from), - s = i[t ? i.length - 1 : 0]; - return Z.cursor(s.side(t, n) + e.from, s.forward(!t, n) ? 1 : -1); - } moveToLineBoundary(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; - return Qx(this, e, t, i); + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; + return sk(this, e, t, r); } - moveVertically(e, t, i) { - return Ku(this, e, Ux(this, e, t, i)); + moveVertically(e, t, r) { + return Wl(this, e, uk(this, e, t, r)); } domAtPos(e) { return this.docView.domAtPos(e); @@ -15890,20 +15482,17 @@ function _ts_generator(thisArg, body) { } posAtCoords(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; - return this.readMeasured(), wD(this, e, t); + return this.readMeasured(), aD(this, e, t); } coordsAtPos(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; this.readMeasured(); - var i = this.docView.coordsAt(e, t); - if (!i || i.left == i.right) return i; + var r = this.docView.coordsAt(e, t); + if (!r || r.left == r.right) return r; var n = this.state.doc.lineAt(e), s = this.bidiSpans(n), - o = s[Ot.find(s, e - n.from, -1, t)]; - return Ma(i, (o.dir == Be.LTR) == t > 0); - } - coordsForChar(e) { - return this.readMeasured(), this.docView.coordsForChar(e); + o = s[ti.find(s, e - n.from, -1, t)]; + return Ra(r, (o.dir == Se.LTR) == t > 0); } get defaultCharacterWidth() { return this.viewState.heightOracle.charWidth; @@ -15915,22 +15504,21 @@ function _ts_generator(thisArg, body) { return this.viewState.defaultTextDirection; } textDirectionAt(e) { - return !this.state.facet(yD) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e)); + return !this.state.facet(Zg) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e)); } get lineWrapping() { return this.viewState.heightOracle.lineWrapping; } bidiSpans(e) { - if (e.length > uA) return fD(e.length); - var t = this.textDirectionAt(e.from), - i; + if (e.length > Ok) return sD(e.length); + var t = this.textDirectionAt(e.from); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.bidiCache[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var s = _step.value; - if (s.from == e.from && s.dir == t && (s.fresh || cD(s.isolates, (i = bg(this, e))))) return s.order; + var n = _step.value; + if (n.from == e.from && n.dir == t) return n.order; } } catch (err) { _didIteratorError = true; @@ -15946,9 +15534,8 @@ function _ts_generator(thisArg, body) { } } } - i || (i = bg(this, e)); - var n = px(e.text, t, i); - return this.bidiCache.push(new go(e.from, e.to, t, i, !0, n)), n; + var r = Gv(e.text, t); + return this.bidiCache.push(new ao(e.from, e.to, t, r)), r; } get hasFocus() { var e; @@ -15956,7 +15543,7 @@ function _ts_generator(thisArg, body) { } focus() { this.observer.ignore(() => { - Gg(this.contentDOM), this.docView.updateSelection(); + Mg(this.contentDOM), this.docView.updateSelection(); }); } setRoot(e) { @@ -15985,38 +15572,29 @@ function _ts_generator(thisArg, body) { } } } - (this.plugins = []), this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), (this.destroyed = !0); + (this.plugins = []), this.inputState.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), (this.destroyed = !0); } static scrollIntoView(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - return Hs.of(new fn(typeof e == "number" ? Z.cursor(e) : e, t.y, t.x, t.yMargin, t.xMargin)); - } - scrollSnapshot() { - var _this_scrollDOM = this.scrollDOM, - e = _this_scrollDOM.scrollTop, - t = _this_scrollDOM.scrollLeft, - i = this.viewState.scrollAnchorAt(e); - return Hs.of(new fn(Z.cursor(i.from), "start", "start", i.top - e, t, !0)); + return ng.of(new to(typeof e == "number" ? Q.cursor(e) : e, t.y, t.x, t.yMargin, t.xMargin)); } static domEventHandlers(e) { - return je.define(() => ({}), { eventHandlers: e }); - } - static domEventObservers(e) { - return je.define(() => ({}), { eventObservers: e }); + return Ye.define(() => ({}), { eventHandlers: e }); } static theme(e, t) { - var i = ft.newName(), - n = [Xs.of(i), on.of(Sa(".".concat(i), e))]; + var r = ut.newName(), + n = [Is.of(r), Jr.of(va(".".concat(r), e))]; return t && t.dark && n.push(Aa.of(!0)), n; } static baseTheme(e) { - return fr.lowest(on.of(Sa("." + ka, e, $D))); + return nr.lowest(Jr.of(va("." + Ea, e, CD))); } static findFromDOM(e) { + var _n; var t; - var i = e.querySelector(".cm-content"), - n = (i && Fe.get(i)) || Fe.get(e); - return ((t = n === null || n === void 0 ? void 0 : n.rootView) === null || t === void 0 ? void 0 : t.view) || null; + var r = e.querySelector(".cm-content"), + n = (r && Ce.get(r)) || Ce.get(e); + return ((t = (_n = n) === null || _n === void 0 ? void 0 : _n.rootView) === null || t === void 0 ? void 0 : t.view) || null; } constructor(ref) { var e = ref === void 0 ? {} : ref; @@ -16035,26 +15613,23 @@ function _ts_generator(thisArg, body) { (this.scrollDOM.className = "cm-scroller"), this.scrollDOM.appendChild(this.contentDOM), (this.announceDOM = document.createElement("div")), - (this.announceDOM.className = "cm-announced"), + (this.announceDOM.style.cssText = "position: fixed; top: -10000px"), this.announceDOM.setAttribute("aria-live", "polite"), (this.dom = document.createElement("div")), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), - e.parent && e.parent.appendChild(this.dom); - var t = e.dispatch; - (this.dispatchTransactions = e.dispatchTransactions || (t && ((i) => i.forEach((n) => t(n, this)))) || ((i) => this.update(i))), + (this._dispatch = e.dispatch || ((t) => this.update([t]))), (this.dispatch = this.dispatch.bind(this)), - (this._root = e.root || tx(e.parent) || document), - (this.viewState = new po(e.state || Ae.create(e))), - e.scrollTo && e.scrollTo.is(Hs) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), - (this.plugins = this.state.facet(sn).map((i) => new dn(i))); + (this._root = e.root || Pv(e.parent) || document), + (this.viewState = new lo(e.state || Ae.create(e))), + (this.plugins = this.state.facet(Qr).map((t) => new tn(t))); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - i.update(this); + var t = _step.value; + t.update(this); } } catch (err) { _didIteratorError = true; @@ -16070,156 +15645,155 @@ function _ts_generator(thisArg, body) { } } } - (this.observer = new _a(this)), (this.inputState = new ga(this)), this.inputState.ensureHandlers(this.plugins), (this.docView = new ho(this)), this.mountStyles(), this.updateAttrs(), (this.updateState = 0), this.requestMeasure(); + (this.observer = new wa(this)), (this.inputState = new ca(this)), this.inputState.ensureHandlers(this, this.plugins), (this.docView = new so(this)), this.mountStyles(), this.updateAttrs(), (this.updateState = 0), this.requestMeasure(), e.parent && e.parent.appendChild(this.dom); } }), - h(_r42, "EditorView"), - _r42); - ne.styleModule = on; - ne.inputHandler = FD; - ne.scrollHandler = CD; - ne.focusChangeEffect = bD; - ne.perLineTextDirection = yD; - ne.exceptionSink = DD; - ne.updateListener = da; - ne.editable = vo; - ne.mouseSelectionStyle = gD; - ne.dragMovesSelection = mD; - ne.clickAddsSelectionRange = pD; - ne.decorations = En; - ne.outerDecorations = vD; - ne.atomicRanges = Va; - ne.bidiIsolatedRanges = xD; - ne.scrollMargins = AD; - ne.darkTheme = Aa; - ne.cspNonce = H.define({ combine: (r) => (r.length ? r[0] : "") }); - ne.contentAttributes = qa; - ne.editorAttributes = BD; - ne.lineWrapping = ne.contentAttributes.of({ class: "cm-lineWrapping" }); - ne.announce = de.define(); - var uA = 4096, - Pg = {}, - go = - ((_r43 = class r { + (() => { + a(_i41, "EditorView"); + })(), + _i41); + re.styleModule = Jr; + re.inputHandler = Qg; + re.focusChangeEffect = Jg; + re.perLineTextDirection = Zg; + re.exceptionSink = Xg; + re.updateListener = na; + re.editable = Do; + re.mouseSelectionStyle = Kg; + re.dragMovesSelection = Yg; + re.clickAddsSelectionRange = Gg; + re.decorations = hn; + re.atomicRanges = La; + re.scrollMargins = iD; + re.darkTheme = Aa; + re.contentAttributes = Pa; + re.editorAttributes = tD; + re.lineWrapping = re.contentAttributes.of({ class: "cm-lineWrapping" }); + re.announce = pe.define(); + var Ok = 4096, + Eg = {}, + ao = + ((_i42 = class i { static update(e, t) { - if (t.empty && !e.some((s) => s.fresh)) return e; - var i = [], - n = e.length ? e[e.length - 1].dir : Be.LTR; + if (t.empty) return e; + var r = [], + n = e.length ? e[e.length - 1].dir : Se.LTR; for (var s = Math.max(0, e.length - 10); s < e.length; s++) { var o = e[s]; - o.dir == n && !t.touchesRange(o.from, o.to) && i.push(new r(t.mapPos(o.from, 1), t.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order)); + o.dir == n && !t.touchesRange(o.from, o.to) && r.push(new i(t.mapPos(o.from, 1), t.mapPos(o.to, -1), o.dir, o.order)); } - return i; + return r; } - constructor(e, t, i, n, s, o) { - (this.from = e), (this.to = t), (this.dir = i), (this.isolates = n), (this.fresh = s), (this.order = o); + constructor(e, t, r, n) { + (this.from = e), (this.to = t), (this.dir = r), (this.order = n); } }), - h(_r43, "CachedOrder"), - _r43); - function Ig(r, e, t) { - for (var i = r.state.facet(e), n = i.length - 1; n >= 0; n--) { - var s = i[n], - o = typeof s == "function" ? s(r) : s; - o && la(o, t); + (() => { + a(_i42, "CachedOrder"); + })(), + _i42); + function vg(i, e, t) { + for (var r = i.state.facet(e), n = r.length - 1; n >= 0; n--) { + var s = r[n], + o = typeof s == "function" ? s(i) : s; + o && ea(o, t); } return t; } - h(Ig, "attrsFromFacet"); - var aA = W.mac ? "mac" : W.windows ? "win" : W.linux ? "linux" : "key"; - function hA(r, e) { - var t = r.split(/-(?!$)/), - i = t[t.length - 1]; - i == "Space" && (i = " "); - var n, s, o, l; - for (var u = 0; u < t.length - 1; ++u) { - var a = t[u]; - if (/^(cmd|meta|m)$/i.test(a)) l = !0; - else if (/^a(lt)?$/i.test(a)) n = !0; - else if (/^(c|ctrl|control)$/i.test(a)) s = !0; - else if (/^s(hift)?$/i.test(a)) o = !0; - else if (/^mod$/i.test(a)) e == "mac" ? (l = !0) : (s = !0); - else throw new Error("Unrecognized modifier name: " + a); - } - return n && (i = "Alt-" + i), s && (i = "Ctrl-" + i), l && (i = "Meta-" + i), o && (i = "Shift-" + i), i; - } - h(hA, "normalizeKeyName"); - function Ks(r, e, t) { - return e.altKey && (r = "Alt-" + r), e.ctrlKey && (r = "Ctrl-" + r), e.metaKey && (r = "Meta-" + r), t !== !1 && e.shiftKey && (r = "Shift-" + r), r; - } - h(Ks, "modifiers"); - var cA = fr.default( - ne.domEventHandlers({ - keydown(r, e) { - return mA(fA(e.state), r, e, "editor"); + a(vg, "attrsFromFacet"); + var Tk = W.mac ? "mac" : W.windows ? "win" : W.linux ? "linux" : "key"; + function Rk(i, e) { + var t = i.split(/-(?!$)/), + r = t[t.length - 1]; + r == "Space" && (r = " "); + var n, s, o, u; + for (var l = 0; l < t.length - 1; ++l) { + var h = t[l]; + if (/^(cmd|meta|m)$/i.test(h)) u = !0; + else if (/^a(lt)?$/i.test(h)) n = !0; + else if (/^(c|ctrl|control)$/i.test(h)) s = !0; + else if (/^s(hift)?$/i.test(h)) o = !0; + else if (/^mod$/i.test(h)) e == "mac" ? (u = !0) : (s = !0); + else throw new Error("Unrecognized modifier name: " + h); + } + return n && (r = "Alt-" + r), s && (r = "Ctrl-" + r), u && (r = "Meta-" + r), o && (r = "Shift-" + r), r; + } + a(Rk, "normalizeKeyName"); + function Ns(i, e, t) { + return e.altKey && (i = "Alt-" + i), e.ctrlKey && (i = "Ctrl-" + i), e.metaKey && (i = "Meta-" + i), t !== !1 && e.shiftKey && (i = "Shift-" + i), i; + } + a(Ns, "modifiers"); + var Mk = nr.default( + re.domEventHandlers({ + keydown(i, e) { + return qk($k(e.state), i, e, "editor"); }, - }), + }) ), - Wa = H.define({ enables: cA }), - $g = new WeakMap(); - function fA(r) { - var e = r.facet(Wa), - t = $g.get(e); - return t || $g.set(e, (t = pA(e.reduce((i, n) => i.concat(n), [])))), t; - } - h(fA, "getKeymap"); - var oi = null, - dA = 4e3; - function pA(r) { - var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : aA; + qa = G.define({ enables: Mk }), + kg = new WeakMap(); + function $k(i) { + var e = i.facet(qa), + t = kg.get(e); + return t || kg.set(e, (t = Lk(e.reduce((r, n) => r.concat(n), [])))), t; + } + a($k, "getKeymap"); + var Zt = null, + Pk = 4e3; + function Lk(i) { + var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Tk; var t = Object.create(null), - i = Object.create(null), - n = h((o, l) => { - var u = i[o]; - if (u == null) i[o] = l; - else if (u != l) throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix"); + r = Object.create(null), + n = a((o, u) => { + var l = r[o]; + if (l == null) r[o] = u; + else if (l != u) throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix"); }, "checkPrefix"), - s = h((o, l, u, a, c) => { - var _loop = function (D) { - var b = m.slice(0, D).join(" "); - n(b, !0), - p[b] || - (p[b] = { + s = a((o, u, l, h) => { + var _loop = function (g) { + var D = p.slice(0, g).join(" "); + n(D, !0), + d[D] || + (d[D] = { preventDefault: !0, - stopPropagation: !1, run: [ - (B) => { - var k = (oi = { view: B, prefix: b, scope: o }); + (F) => { + var w = (Zt = { view: F, prefix: D, scope: o }); return ( setTimeout(() => { - oi == k && (oi = null); - }, dA), + Zt == w && (Zt = null); + }, Pk), !0 ); }, ], }); }; - var f, d; - var p = t[o] || (t[o] = Object.create(null)), - m = l.split(/ (?!$)/).map((D) => hA(D, e)); - for (var D = 1; D < m.length; D++) _loop(D); - var F = m.join(" "); - n(F, !1); - var g = p[F] || (p[F] = { preventDefault: !1, stopPropagation: !1, run: ((d = (f = p._any) === null || f === void 0 ? void 0 : f.run) === null || d === void 0 ? void 0 : d.slice()) || [] }); - u && g.run.push(u), a && (g.preventDefault = !0), c && (g.stopPropagation = !0); + var c, f; + var d = t[o] || (t[o] = Object.create(null)), + p = u.split(/ (?!$)/).map((g) => Rk(g, e)); + for (var g = 1; g < p.length; g++) _loop(g); + var m = p.join(" "); + n(m, !1); + var b = d[m] || (d[m] = { preventDefault: !1, run: ((f = (c = d._any) === null || c === void 0 ? void 0 : c.run) === null || f === void 0 ? void 0 : f.slice()) || [] }); + l && b.run.push(l), h && (b.preventDefault = !0); }, "add"); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var o = _step.value; - var l = o.scope ? o.scope.split(" ") : ["editor"]; + var u = o.scope ? o.scope.split(" ") : ["editor"]; var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; if (o.any) try { - for (var _iterator1 = l[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var a = _step1.value; - var c = t[a] || (t[a] = Object.create(null)); - c._any || (c._any = { preventDefault: !1, stopPropagation: !1, run: [] }); + for (var _iterator1 = u[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { + var h = _step1.value; + var c = t[h] || (t[h] = Object.create(null)); + c._any || (c._any = { preventDefault: !1, run: [] }); for (var f in c) c[f].run.push(o.any); } } catch (err) { @@ -16236,15 +15810,15 @@ function _ts_generator(thisArg, body) { } } } - var u = o[e] || o.key; + var l = o[e] || o.key; var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined; - if (u) + if (l) try { - for (var _iterator2 = l[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var a1 = _step2.value; - s(a1, u, o.run, o.preventDefault, o.stopPropagation), o.shift && s(a1, "Shift-" + u, o.shift, o.preventDefault, o.stopPropagation); + for (var _iterator2 = u[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var h1 = _step2.value; + s(h1, l, o.run, o.preventDefault), o.shift && s(h1, "Shift-" + l, o.shift, o.preventDefault); } } catch (err) { _didIteratorError2 = true; @@ -16277,26 +15851,24 @@ function _ts_generator(thisArg, body) { } return t; } - h(pA, "buildKeymap"); - function mA(r, e, t, i) { - var n = cg(e), - s = Kr(n, 0), - o = Ms(s) == n.length && n != " ", - l = "", - u = !1, - a = !1, - c = !1; - oi && oi.view == t && oi.scope == i && ((l = oi.prefix + " "), _D.indexOf(e.keyCode) < 0 && ((a = !0), (oi = null))); - var f = new Set(), - d = h((g) => { - if (g) { + a(Lk, "buildKeymap"); + function qk(i, e, t, r) { + var n = Q0(e), + s = Ur(n, 0), + o = ws(s) == n.length && n != " ", + u = "", + l = !1; + Zt && Zt.view == t && Zt.scope == r && ((u = Zt.prefix + " "), (l = cD.indexOf(e.keyCode) < 0) && (Zt = null)); + var h = new Set(), + c = a((m) => { + if (m) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = g.run[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var D = _step.value; - if (!f.has(D) && (f.add(D), D(t, e))) return g.stopPropagation && (c = !0), !0; + for (var _iterator = m.run[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var b = _step.value; + if (!h.has(b) && (h.add(b), b(t, e))) return !0; } } catch (err) { _didIteratorError = true; @@ -16312,23 +15884,26 @@ function _ts_generator(thisArg, body) { } } } - g.preventDefault && (g.stopPropagation && (c = !0), (a = !0)); + m.preventDefault && (l = !0); } return !1; }, "runFor"), - p = r[i], - m, - F; - return ( - p && (d(p[l + Ks(n, e, !o)]) ? (u = !0) : o && (e.altKey || e.metaKey || e.ctrlKey) && !(W.windows && e.ctrlKey && e.altKey) && (m = Kt[e.keyCode]) && m != n ? (d(p[l + Ks(m, e, !0)]) || (e.shiftKey && (F = dr[e.keyCode]) != n && F != m && d(p[l + Ks(F, e, !1)]))) && (u = !0) : o && e.shiftKey && d(p[l + Ks(n, e, !0)]) && (u = !0), !u && d(p._any) && (u = !0)), - a && (u = !0), - u && c && e.stopPropagation(), - u - ); - } - h(mA, "runHandlers"); - var Cn = - ((_r44 = class r { + f = i[r], + d, + p; + if (f) { + if (c(f[u + Ns(n, e, !o)])) return !0; + if (o && (e.altKey || e.metaKey || e.ctrlKey) && !(W.windows && e.ctrlKey && e.altKey) && (d = jt[e.keyCode]) && d != n) { + if (c(f[u + Ns(d, e, !0)])) return !0; + if (e.shiftKey && (p = sr[e.keyCode]) != n && p != d && c(f[u + Ns(p, e, !1)])) return !0; + } else if (o && e.shiftKey && c(f[u + Ns(n, e, !0)])) return !0; + if (c(f._any)) return !0; + } + return l; + } + a(qk, "runHandlers"); + var cn = + ((_i43 = class i { draw() { var e = document.createElement("div"); return (e.className = this.className), this.adjust(e), e; @@ -16342,97 +15917,99 @@ function _ts_generator(thisArg, body) { eq(e) { return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className; } - static forRange(e, t, i) { - if (i.empty) { - var n = e.coordsAtPos(i.head, i.assoc || 1); + static forRange(e, t, r) { + if (r.empty) { + var n = e.coordsAtPos(r.head, r.assoc || 1); if (!n) return []; - var s = VD(e); - return [new r(t, n.left - s.left, n.top - s.top, null, n.bottom - n.top)]; - } else return gA(e, t, i); + var s = ED(e); + return [new i(t, n.left - s.left, n.top - s.top, null, n.bottom - n.top)]; + } else return Ik(e, t, r); } - constructor(e, t, i, n, s) { - (this.className = e), (this.left = t), (this.top = i), (this.width = n), (this.height = s); + constructor(e, t, r, n, s) { + (this.className = e), (this.left = t), (this.top = r), (this.width = n), (this.height = s); } }), - h(_r44, "RectangleMarker"), - _r44); - function VD(r) { - var e = r.scrollDOM.getBoundingClientRect(); - return { left: (r.textDirection == Be.LTR ? e.left : e.right - r.scrollDOM.clientWidth * r.scaleX) - r.scrollDOM.scrollLeft * r.scaleX, top: e.top - r.scrollDOM.scrollTop * r.scaleY }; - } - h(VD, "getBase"); - function qg(r, e, t) { - var i = Z.cursor(e); - return { from: Math.max(t.from, r.moveToLineBoundary(i, !1, !0).from), to: Math.min(t.to, r.moveToLineBoundary(i, !0, !0).from), type: He.Text }; - } - h(qg, "wrappedLine"); - function gA(r, e, t) { - if (t.to <= r.viewport.from || t.from >= r.viewport.to) return []; - var i = Math.max(t.from, r.viewport.from), - n = Math.min(t.to, r.viewport.to), - s = r.textDirection == Be.LTR, - o = r.contentDOM, - l = o.getBoundingClientRect(), - u = VD(r), - a = o.querySelector(".cm-line"), - c = a && window.getComputedStyle(a), - f = l.left + (c ? parseInt(c.paddingLeft) + Math.min(0, parseInt(c.textIndent)) : 0), - d = l.right - (c ? parseInt(c.paddingRight) : 0), - p = ma(r, i), - m = ma(r, n), - F = p.type == He.Text ? p : null, - g = m.type == He.Text ? m : null; - if ((F && (r.lineWrapping || p.widgetLineBreaks) && (F = qg(r, i, F)), g && (r.lineWrapping || m.widgetLineBreaks) && (g = qg(r, n, g)), F && g && F.from == g.from)) return b(B(t.from, t.to, F)); + (() => { + a(_i43, "RectangleMarker"); + })(), + _i43); + function ED(i) { + var e = i.scrollDOM.getBoundingClientRect(); + return { left: (i.textDirection == Se.LTR ? e.left : e.right - i.scrollDOM.clientWidth) - i.scrollDOM.scrollLeft, top: e.top - i.scrollDOM.scrollTop }; + } + a(ED, "getBase"); + function wg(i, e, t) { + var r = Q.cursor(e); + return { from: Math.max(t.from, i.moveToLineBoundary(r, !1, !0).from), to: Math.min(t.to, i.moveToLineBoundary(r, !0, !0).from), type: xe.Text }; + } + a(wg, "wrappedLine"); + function Ik(i, e, t) { + if (t.to <= i.viewport.from || t.from >= i.viewport.to) return []; + var r = Math.max(t.from, i.viewport.from), + n = Math.min(t.to, i.viewport.to), + s = i.textDirection == Se.LTR, + o = i.contentDOM, + u = o.getBoundingClientRect(), + l = ED(i), + h = o.querySelector(".cm-line"), + c = h && window.getComputedStyle(h), + f = u.left + (c ? parseInt(c.paddingLeft) + Math.min(0, parseInt(c.textIndent)) : 0), + d = u.right - (c ? parseInt(c.paddingRight) : 0), + p = ha(i, r), + m = ha(i, n), + b = p.type == xe.Text ? p : null, + g = m.type == xe.Text ? m : null; + if ((b && (i.lineWrapping || p.widgetLineBreaks) && (b = wg(i, r, b)), g && (i.lineWrapping || m.widgetLineBreaks) && (g = wg(i, n, g)), b && g && b.from == g.from)) return F(w(t.from, t.to, b)); { - var C = F ? B(t.from, null, F) : k(p, !1), - L = g ? B(null, t.to, g) : k(m, !0), - Q = []; - return (F || p).to < (g || m).from - (F && g ? 1 : 0) || (p.widgetLineBreaks > 1 && C.bottom + r.defaultLineHeight / 2 < L.top) ? Q.push(D(f, C.bottom, d, L.top)) : C.bottom < L.top && r.elementAtHeight((C.bottom + L.top) / 2).type == He.Text && (C.bottom = L.top = (C.bottom + L.top) / 2), b(C).concat(Q).concat(b(L)); - } - function D(C, L, Q, V) { - return new Cn(e, C - u.left, L - u.top - 0.01, Q - C, V - L + 0.01); - } - h(D, "piece"); - function b(param) { - var C = param.top, - L = param.bottom, - Q = param.horizontal; - var V = []; - for (var z = 0; z < Q.length; z += 2) V.push(D(Q[z], C, Q[z + 1], L)); - return V; - } - h(b, "pieces"); - function B(C, L, Q) { - var V = 1e9, + var E = b ? w(t.from, null, b) : x(p, !1), + _ = g ? w(null, t.to, g) : x(m, !0), + I = []; + return (b || p).to < (g || m).from - (b && g ? 1 : 0) || (p.widgetLineBreaks > 1 && E.bottom + i.defaultLineHeight / 2 < _.top) ? I.push(D(f, E.bottom, d, _.top)) : E.bottom < _.top && i.elementAtHeight((E.bottom + _.top) / 2).type == xe.Text && (E.bottom = _.top = (E.bottom + _.top) / 2), F(E).concat(I).concat(F(_)); + } + function D(E, _, I, J) { + return new cn(e, E - l.left, _ - l.top - 0.01, I - E, J - _ + 0.01); + } + a(D, "piece"); + function F(param) { + var E = param.top, + _ = param.bottom, + I = param.horizontal; + var J = []; + for (var z = 0; z < I.length; z += 2) J.push(D(I[z], E, I[z + 1], _)); + return J; + } + a(F, "pieces"); + function w(E, _, I) { + var J = 1e9, z = -1e9, - G = []; - function T(P, _, ee, he, ve) { - var xe = r.coordsAtPos(P, P == Q.to ? -2 : 2), - ae = r.coordsAtPos(ee, ee == Q.from ? 2 : -2); - !xe || !ae || ((V = Math.min(xe.top, ae.top, V)), (z = Math.max(xe.bottom, ae.bottom, z)), ve == Be.LTR ? G.push(s && _ ? f : xe.left, s && he ? d : ae.right) : G.push(!s && he ? f : ae.left, !s && _ ? d : xe.right)); - } - h(T, "addSpan"); - var j = C !== null && C !== void 0 ? C : Q.from, - te = L !== null && L !== void 0 ? L : Q.to; + U = []; + function N(H, T, Z, ge, De) { + var ce = i.coordsAtPos(H, H == I.to ? -2 : 2), + ae = i.coordsAtPos(Z, Z == I.from ? 2 : -2); + !ce || !ae || ((J = Math.min(ce.top, ae.top, J)), (z = Math.max(ce.bottom, ae.bottom, z)), De == Se.LTR ? U.push(s && T ? f : ce.left, s && ge ? d : ae.right) : U.push(!s && ge ? f : ae.left, !s && T ? d : ce.right)); + } + a(N, "addSpan"); + var ne = E !== null && E !== void 0 ? E : I.from, + le = _ !== null && _ !== void 0 ? _ : I.to; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.visibleRanges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var P = _step.value; - if (P.to > j && P.from < te) - for (var _ = Math.max(P.from, j), ee = Math.min(P.to, te); ; ) { - var he = r.state.doc.lineAt(_); + for (var _iterator = i.visibleRanges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var H = _step.value; + if (H.to > ne && H.from < le) + for (var T = Math.max(H.from, ne), Z = Math.min(H.to, le); ; ) { + var ge = i.state.doc.lineAt(T); var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator1 = r.bidiSpans(he)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var ve = _step1.value; - var xe = ve.from + he.from, - ae = ve.to + he.from; - if (xe >= ee) break; - ae > _ && T(Math.max(xe, _), C == null && xe <= j, Math.min(ae, ee), L == null && ae >= te, ve.dir); + for (var _iterator1 = i.bidiSpans(ge)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { + var De = _step1.value; + var ce = De.from + ge.from, + ae = De.to + ge.from; + if (ce >= Z) break; + ae > T && N(Math.max(ce, T), E == null && ce <= ne, Math.min(ae, Z), _ == null && ae >= le, De.dir); } } catch (err) { _didIteratorError1 = true; @@ -16448,7 +16025,7 @@ function _ts_generator(thisArg, body) { } } } - if (((_ = he.to + 1), _ >= ee)) break; + if (((T = ge.to + 1), T >= Z)) break; } } } catch (err) { @@ -16465,54 +16042,45 @@ function _ts_generator(thisArg, body) { } } } - return G.length == 0 && T(j, C == null, te, L == null, r.textDirection), { top: V, bottom: z, horizontal: G }; + return U.length == 0 && N(ne, E == null, le, _ == null, i.textDirection), { top: J, bottom: z, horizontal: U }; } - h(B, "drawForLine"); - function k(C, L) { - var Q = l.top + (L ? C.top : C.bottom); - return { top: Q, bottom: Q, horizontal: [] }; + a(w, "drawForLine"); + function x(E, _) { + var I = u.top + (_ ? E.top : E.bottom); + return { top: I, bottom: I, horizontal: [] }; } - h(k, "drawForWidget"); + a(x, "drawForWidget"); } - h(gA, "rectanglesForRange"); - function DA(r, e) { - return r.constructor == e.constructor && r.eq(e); + a(Ik, "rectanglesForRange"); + function Nk(i, e) { + return i.constructor == e.constructor && i.eq(e); } - h(DA, "sameMarker"); - var Ua = - ((_class60 = class _class { + a(Nk, "sameMarker"); + var xa = + ((_class62 = class _class { update(e) { - e.startState.facet(ro) != e.state.facet(ro) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq)); - } - docViewUpdate(e) { - this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq); + e.startState.facet(js) != e.state.facet(js) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && e.view.requestMeasure(this.measureReq); } setOrder(e) { var t = 0, - i = e.facet(ro); - for (; t < i.length && i[t] != this.layer; ) t++; + r = e.facet(js); + for (; t < r.length && r[t] != this.layer; ) t++; this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - t); } measure() { return this.layer.markers(this.view); } - scale() { - var _this_view = this.view, - e = _this_view.scaleX, - t = _this_view.scaleY; - (e != this.scaleX || t != this.scaleY) && ((this.scaleX = e), (this.scaleY = t), (this.dom.style.transform = "scale(".concat(1 / e, ", ").concat(1 / t, ")"))); - } draw(e) { - if (e.length != this.drawn.length || e.some((t, i) => !DA(t, this.drawn[i]))) { + if (e.length != this.drawn.length || e.some((t, r) => !Nk(t, this.drawn[r]))) { var t = this.dom.firstChild, - i = 0; + r = 0; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - n.update && t && n.constructor && this.drawn[i].constructor && n.update(t, this.drawn[i]) ? ((t = t.nextSibling), i++) : this.dom.insertBefore(n.draw(), t); + n.update && t && n.constructor && this.drawn[r].constructor && n.update(t, this.drawn[r]) ? ((t = t.nextSibling), r++) : this.dom.insertBefore(n.draw(), t); } } catch (err) { _didIteratorError = true; @@ -16542,48 +16110,47 @@ function _ts_generator(thisArg, body) { (this.view = e), (this.layer = t), (this.drawn = []), - (this.scaleX = 1), - (this.scaleY = 1), (this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }), (this.dom = e.scrollDOM.appendChild(document.createElement("div"))), this.dom.classList.add("cm-layer"), t.above && this.dom.classList.add("cm-layer-above"), t.class && this.dom.classList.add(t.class), - this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), t.mount && t.mount(this.dom, e); } }), - h(_class60, "LayerView"), - _class60), - ro = H.define(); - function WD(r) { - return [je.define((e) => new Ua(e, r)), ro.of(r)]; - } - h(WD, "layer"); - var zD = !W.ios, - Bn = H.define({ - combine(r) { - return Xt(r, { cursorBlinkRate: 1200, drawRangeCursor: !0 }, { cursorBlinkRate: (e, t) => Math.min(e, t), drawRangeCursor: (e, t) => e || t }); + (() => { + a(_class62, "LayerView"); + })(), + _class62), + js = G.define(); + function vD(i) { + return [Ye.define((e) => new xa(e, i)), js.of(i)]; + } + a(vD, "layer"); + var kD = !W.ios, + fn = G.define({ + combine(i) { + return Wt(i, { cursorBlinkRate: 1200, drawRangeCursor: !0 }, { cursorBlinkRate: (e, t) => Math.min(e, t), drawRangeCursor: (e, t) => e || t }); }, }); - function HD() { - var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - return [Bn.of(r), FA, bA, yA, ED.of(!0)]; + function wD() { + var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + return [fn.of(i), Vk, zk, Hk, eD.of(!0)]; } - h(HD, "drawSelection"); - function jD(r) { - return r.startState.facet(Bn) != r.state.facet(Bn); + a(wD, "drawSelection"); + function xD(i) { + return i.startState.facet(fn) != i.state.facet(fn); } - h(jD, "configChanged"); - var FA = WD({ + a(xD, "configChanged"); + var Vk = vD({ above: !0, - markers(r) { - var e = r.state, - t = e.facet(Bn), - i = []; + markers(i) { + var e = i.state, + t = e.facet(fn), + r = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -16591,16 +16158,16 @@ function _ts_generator(thisArg, body) { for (var _iterator = e.selection.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; var s = n == e.selection.main; - if (n.empty ? !s || zD : t.drawRangeCursor) { + if (n.empty ? !s || kD : t.drawRangeCursor) { var o = s ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", - l = n.empty ? n : Z.cursor(n.head, n.head > n.anchor ? -1 : 1); + u = n.empty ? n : Q.cursor(n.head, n.head > n.anchor ? -1 : 1); var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator1 = Cn.forRange(r, o, l)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var u = _step1.value; - i.push(u); + for (var _iterator1 = cn.forRange(i, o, u)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { + var l = _step1.value; + r.push(l); } } catch (err) { _didIteratorError1 = true; @@ -16632,89 +16199,82 @@ function _ts_generator(thisArg, body) { } } } - return i; + return r; }, - update(r, e) { - r.transactions.some((i) => i.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink"); - var t = jD(r); - return t && Vg(r.state, e), r.docChanged || r.selectionSet || t; + update(i, e) { + i.transactions.some((r) => r.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink"); + var t = xD(i); + return t && xg(i.state, e), i.docChanged || i.selectionSet || t; }, - mount(r, e) { - Vg(e.state, r); + mount(i, e) { + xg(e.state, i); }, class: "cm-cursorLayer", }); - function Vg(r, e) { - e.style.animationDuration = r.facet(Bn).cursorBlinkRate + "ms"; + function xg(i, e) { + e.style.animationDuration = i.facet(fn).cursorBlinkRate + "ms"; } - h(Vg, "setBlinkRate"); - var bA = WD({ + a(xg, "setBlinkRate"); + var zk = vD({ above: !1, - markers(r) { - return r.state.selection.ranges.map((e) => (e.empty ? [] : Cn.forRange(r, "cm-selectionBackground", e))).reduce((e, t) => e.concat(t)); + markers(i) { + return i.state.selection.ranges.map((e) => (e.empty ? [] : cn.forRange(i, "cm-selectionBackground", e))).reduce((e, t) => e.concat(t)); }, - update(r, e) { - return r.docChanged || r.selectionSet || r.viewportChanged || jD(r); + update(i, e) { + return i.docChanged || i.selectionSet || i.viewportChanged || xD(i); }, class: "cm-selectionLayer", }), - La = { ".cm-line": { "& ::selection": { backgroundColor: "transparent !important" }, "&::selection": { backgroundColor: "transparent !important" } } }; - zD && ((La[".cm-line"].caretColor = "transparent !important"), (La[".cm-content"] = { caretColor: "transparent !important" })); - var yA = fr.highest(ne.theme(La)), - YD = de.define({ - map(r, e) { - return r == null ? null : e.mapPos(r); + SD = { ".cm-line": { "& ::selection": { backgroundColor: "transparent !important" }, "&::selection": { backgroundColor: "transparent !important" } } }; + kD && (SD[".cm-line"].caretColor = "transparent !important"); + var Hk = nr.highest(re.theme(SD)), + BD = pe.define({ + map(i, e) { + return i == null ? null : e.mapPos(i); }, }), - an = Pe.define({ + en = Ie.define({ create() { return null; }, - update(r, e) { - return r != null && (r = e.changes.mapPos(r)), e.effects.reduce((t, i) => (i.is(YD) ? i.value : t), r); + update(i, e) { + return i != null && (i = e.changes.mapPos(i)), e.effects.reduce((t, r) => (r.is(BD) ? r.value : t), i); }, }), - EA = je.fromClass( + Wk = Ye.fromClass( class { - update(r) { + update(i) { var e; - var t = r.state.field(an); - t == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), (this.cursor = null)) : (this.cursor || ((this.cursor = this.view.scrollDOM.appendChild(document.createElement("div"))), (this.cursor.className = "cm-dropCursor")), (r.startState.field(an) != t || r.docChanged || r.geometryChanged) && this.view.requestMeasure(this.measureReq)); + var t = i.state.field(en); + t == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), (this.cursor = null)) : (this.cursor || ((this.cursor = this.view.scrollDOM.appendChild(document.createElement("div"))), (this.cursor.className = "cm-dropCursor")), (i.startState.field(en) != t || i.docChanged || i.geometryChanged) && this.view.requestMeasure(this.measureReq)); } readPos() { - var _this = this, - r = _this.view, - e = r.state.field(an), - t = e != null && r.coordsAtPos(e); - if (!t) return null; - var i = r.scrollDOM.getBoundingClientRect(); - return { left: t.left - i.left + r.scrollDOM.scrollLeft * r.scaleX, top: t.top - i.top + r.scrollDOM.scrollTop * r.scaleY, height: t.bottom - t.top }; - } - drawCursor(r) { - if (this.cursor) { - var _this_view = this.view, - e = _this_view.scaleX, - t = _this_view.scaleY; - r ? ((this.cursor.style.left = r.left / e + "px"), (this.cursor.style.top = r.top / t + "px"), (this.cursor.style.height = r.height / t + "px")) : (this.cursor.style.left = "-100000px"); - } + var i = this.view.state.field(en), + e = i != null && this.view.coordsAtPos(i); + if (!e) return null; + var t = this.view.scrollDOM.getBoundingClientRect(); + return { left: e.left - t.left + this.view.scrollDOM.scrollLeft, top: e.top - t.top + this.view.scrollDOM.scrollTop, height: e.bottom - e.top }; + } + drawCursor(i) { + this.cursor && (i ? ((this.cursor.style.left = i.left + "px"), (this.cursor.style.top = i.top + "px"), (this.cursor.style.height = i.height + "px")) : (this.cursor.style.left = "-100000px")); } destroy() { this.cursor && this.cursor.remove(); } - setDropPos(r) { - this.view.state.field(an) != r && this.view.dispatch({ effects: YD.of(r) }); + setDropPos(i) { + this.view.state.field(en) != i && this.view.dispatch({ effects: BD.of(i) }); } - constructor(r) { - (this.view = r), (this.cursor = null), (this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) }); + constructor(i) { + (this.view = i), (this.cursor = null), (this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) }); } }, { - eventObservers: { - dragover(r) { - this.setDropPos(this.view.posAtCoords({ x: r.clientX, y: r.clientY })); + eventHandlers: { + dragover(i) { + this.setDropPos(this.view.posAtCoords({ x: i.clientX, y: i.clientY })); }, - dragleave(r) { - (r.target == this.view.contentDOM || !this.view.contentDOM.contains(r.relatedTarget)) && this.setDropPos(null); + dragleave(i) { + (i.target == this.view.contentDOM || !this.view.contentDOM.contains(i.relatedTarget)) && this.setDropPos(null); }, dragend() { this.setDropPos(null); @@ -16723,28 +16283,28 @@ function _ts_generator(thisArg, body) { this.setDropPos(null); }, }, - }, + } ); - function JD() { - return [an, EA]; + function _D() { + return [en, Wk]; } - h(JD, "dropCursor"); - var u8 = /x/.unicode != null ? "gu" : "g"; - var nn = "-10000px", - Do = - ((_class61 = class _class { - update(e, t) { - var i; - var n = e.state.facet(this.facet), - s = n.filter((u) => u); - if (n === this.input) { + a(_D, "dropCursor"); + var AB = /x/.unicode != null ? "gu" : "g"; + var Vs = "-10000px", + ho = + ((_class63 = class _class { + update(e) { + var t; + var r = e.state.facet(this.facet), + n = r.filter((o) => o); + if (r === this.input) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.tooltipViews[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var u = _step.value; - u.update && u.update(e); + var o = _step.value; + o.update && o.update(e); } } catch (err) { _didIteratorError = true; @@ -16762,20 +16322,19 @@ function _ts_generator(thisArg, body) { } return !1; } - var o = [], - l = t ? [] : null; - for (var u1 = 0; u1 < s.length; u1++) { - var a = s[u1], - c = -1; - if (a) { - for (var f = 0; f < this.tooltips.length; f++) { - var d = this.tooltips[f]; - d && d.create == a.create && (c = f); - } - if (c < 0) (o[u1] = this.createTooltipView(a, u1 ? o[u1 - 1] : null)), l && (l[u1] = !!a.above); + var s = []; + for (var o1 = 0; o1 < n.length; o1++) { + var u = n[o1], + l = -1; + if (u) { + for (var h = 0; h < this.tooltips.length; h++) { + var c = this.tooltips[h]; + c && c.create == u.create && (l = h); + } + if (l < 0) s[o1] = this.createTooltipView(u); else { - var f1 = (o[u1] = this.tooltipViews[c]); - l && (l[u1] = t[c]), f1.update && f1.update(e); + var h1 = (s[o1] = this.tooltipViews[l]); + h1.update && h1.update(e); } } } @@ -16784,8 +16343,8 @@ function _ts_generator(thisArg, body) { _iteratorError1 = undefined; try { for (var _iterator1 = this.tooltipViews[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var u2 = _step1.value; - o.indexOf(u2) < 0 && (this.removeTooltipView(u2), (i = u2.destroy) === null || i === void 0 || i.call(u2)); + var o2 = _step1.value; + s.indexOf(o2) < 0 && (o2.dom.remove(), (t = o2.destroy) === null || t === void 0 || t.call(o2)); } } catch (err) { _didIteratorError1 = true; @@ -16801,29 +16360,29 @@ function _ts_generator(thisArg, body) { } } } - return t && (l.forEach((u, a) => (t[a] = u)), (t.length = l.length)), (this.input = n), (this.tooltips = s), (this.tooltipViews = o), !0; + return (this.input = r), (this.tooltips = n), (this.tooltipViews = s), !0; } - constructor(e, t, i, n) { - (this.facet = t), (this.createTooltipView = i), (this.removeTooltipView = n), (this.input = e.state.facet(t)), (this.tooltips = this.input.filter((o) => o)); - var s = null; - this.tooltipViews = this.tooltips.map((o) => (s = i(o, s))); + constructor(e, t, r) { + (this.facet = t), (this.createTooltipView = r), (this.input = e.state.facet(t)), (this.tooltips = this.input.filter((n) => n)), (this.tooltipViews = this.tooltips.map(r)); } }), - h(_class61, "TooltipViewManager"), - _class61); - function CA(r) { - var e = r.win; + (() => { + a(_class63, "TooltipViewManager"); + })(), + _class63); + function jk(i) { + var e = i.win; return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth }; } - h(CA, "windowSpace"); - var ea = H.define({ - combine: (r) => { - var e, t, i; - return { position: W.ios ? "absolute" : ((e = r.find((n) => n.position)) === null || e === void 0 ? void 0 : e.position) || "fixed", parent: ((t = r.find((n) => n.parent)) === null || t === void 0 ? void 0 : t.parent) || null, tooltipSpace: ((i = r.find((n) => n.tooltipSpace)) === null || i === void 0 ? void 0 : i.tooltipSpace) || CA }; + a(jk, "windowSpace"); + var Ul = G.define({ + combine: (i) => { + var e, t, r; + return { position: W.ios ? "absolute" : ((e = i.find((n) => n.position)) === null || e === void 0 ? void 0 : e.position) || "fixed", parent: ((t = i.find((n) => n.parent)) === null || t === void 0 ? void 0 : t.parent) || null, tooltipSpace: ((r = i.find((n) => n.tooltipSpace)) === null || r === void 0 ? void 0 : r.tooltipSpace) || jk }; }, }), - Wg = new WeakMap(), - GD = je.fromClass( + Sg = new WeakMap(), + Uk = Ye.fromClass( class { createContainer() { this.parent ? ((this.container = document.createElement("div")), (this.container.style.position = "relative"), (this.container.className = this.view.themeClasses), this.parent.appendChild(this.container)) : (this.container = this.view.dom); @@ -16836,8 +16395,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.manager.tooltipViews[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var r = _step.value; - this.intersectionObserver.observe(r.dom); + var i = _step.value; + this.intersectionObserver.observe(i.dom); } } catch (err) { _didIteratorError = true; @@ -16861,14 +16420,14 @@ function _ts_generator(thisArg, body) { (this.measureTimeout = -1), this.maybeMeasure(); }, 50)); } - update(r) { - r.transactions.length && (this.lastTransaction = Date.now()); - var e = this.manager.update(r, this.above); + update(i) { + i.transactions.length && (this.lastTransaction = Date.now()); + var e = this.manager.update(i); e && this.observeIntersection(); - var t = e || r.geometryChanged, - i = r.state.facet(ea); - if (i.position != this.position && !this.madeAbsolute) { - this.position = i.position; + var t = e || i.geometryChanged, + r = i.state.facet(Ul); + if (r.position != this.position) { + this.position = r.position; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -16893,8 +16452,8 @@ function _ts_generator(thisArg, body) { } t = !0; } - if (i.parent != this.parent) { - this.parent && this.container.remove(), (this.parent = i.parent), this.createContainer(); + if (r.parent != this.parent) { + this.parent && this.container.remove(), (this.parent = r.parent), this.createContainer(); var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; @@ -16921,25 +16480,24 @@ function _ts_generator(thisArg, body) { } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses); t && this.maybeMeasure(); } - createTooltip(r, e) { - var t = r.create(this.view), - i = e ? e.dom : null; - if ((t.dom.classList.add("cm-tooltip"), r.arrow && !t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow"))) { - var n = document.createElement("div"); - (n.className = "cm-tooltip-arrow"), t.dom.appendChild(n); + createTooltip(i) { + var e = i.create(this.view); + if ((e.dom.classList.add("cm-tooltip"), i.arrow && !e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow"))) { + var t = document.createElement("div"); + (t.className = "cm-tooltip-arrow"), e.dom.appendChild(t); } - return (t.dom.style.position = this.position), (t.dom.style.top = nn), (t.dom.style.left = "0px"), this.container.insertBefore(t.dom, i), t.mount && t.mount(this.view), this.resizeObserver && this.resizeObserver.observe(t.dom), t; + return (e.dom.style.position = this.position), (e.dom.style.top = Vs), this.container.appendChild(e.dom), e.mount && e.mount(this.view), e; } destroy() { - var r, e, t; + var i, e; this.view.win.removeEventListener("resize", this.measureSoon); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.manager.tooltipViews[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - i.dom.remove(), (r = i.destroy) === null || r === void 0 || r.call(i); + var t = _step.value; + t.dom.remove(), (i = t.destroy) === null || i === void 0 || i.call(t); } } catch (err) { _didIteratorError = true; @@ -16955,134 +16513,87 @@ function _ts_generator(thisArg, body) { } } } - this.parent && this.container.remove(), (e = this.resizeObserver) === null || e === void 0 || e.disconnect(), (t = this.intersectionObserver) === null || t === void 0 || t.disconnect(), clearTimeout(this.measureTimeout); + (e = this.intersectionObserver) === null || e === void 0 || e.disconnect(), clearTimeout(this.measureTimeout); } readMeasure() { - var r = this.view.dom.getBoundingClientRect(), - e = 1, - t = 1, - i = !1; - if (this.position == "fixed" && this.manager.tooltipViews.length) { - var _this_manager_tooltipViews_ = this.manager.tooltipViews[0], - n = _this_manager_tooltipViews_.dom; - if (W.gecko) i = n.offsetParent != this.container.ownerDocument.body; - else if (n.style.top == nn && n.style.left == "0px") { - var s = n.getBoundingClientRect(); - i = Math.abs(s.top + 1e4) > 1 || Math.abs(s.left) > 1; - } - } - var ref; - if (i || this.position == "absolute") - if (this.parent) { - var n1 = this.parent.getBoundingClientRect(); - n1.width && n1.height && ((e = n1.width / this.parent.offsetWidth), (t = n1.height / this.parent.offsetHeight)); - } else (ref = this.view.viewState), (e = ref.scaleX), (t = ref.scaleY), ref; + var i = this.view.dom.getBoundingClientRect(); return { - editor: r, - parent: this.parent ? this.container.getBoundingClientRect() : r, - pos: this.manager.tooltips.map((n, s) => { - var o = this.manager.tooltipViews[s]; - return o.getCoords ? o.getCoords(n.pos) : this.view.coordsAtPos(n.pos); + editor: i, + parent: this.parent ? this.container.getBoundingClientRect() : i, + pos: this.manager.tooltips.map((e, t) => { + var r = this.manager.tooltipViews[t]; + return r.getCoords ? r.getCoords(e.pos) : this.view.coordsAtPos(e.pos); }), size: this.manager.tooltipViews.map((param) => { - var n = param.dom; - return n.getBoundingClientRect(); + var e = param.dom; + return e.getBoundingClientRect(); }), - space: this.view.state.facet(ea).tooltipSpace(this.view), - scaleX: e, - scaleY: t, - makeAbsolute: i, + space: this.view.state.facet(Ul).tooltipSpace(this.view), }; } - writeMeasure(r) { + writeMeasure(i) { var e; - if (r.makeAbsolute) { - (this.madeAbsolute = !0), (this.position = "absolute"); + var t = i.editor, + r = i.space, + n = []; + for (var s = 0; s < this.manager.tooltips.length; s++) { + var o = this.manager.tooltips[s], + u = this.manager.tooltipViews[s], + l = u.dom, + h = i.pos[s], + c = i.size[s]; + if (!h || h.bottom <= Math.max(t.top, r.top) || h.top >= Math.min(t.bottom, r.bottom) || h.right < Math.max(t.left, r.left) - 0.1 || h.left > Math.min(t.right, r.right) + 0.1) { + l.style.top = Vs; + continue; + } + var f = o.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, + d = f ? 7 : 0, + p = c.right - c.left, + m = (e = Sg.get(u)) !== null && e !== void 0 ? e : c.bottom - c.top, + b = u.offset || Yk, + g = this.view.textDirection == Se.LTR, + D = c.width > r.right - r.left ? (g ? r.left : r.right - c.width) : g ? Math.min(h.left - (f ? 14 : 0) + b.x, r.right - p) : Math.max(r.left, h.left - p + (f ? 14 : 0) - b.x), + F = !!o.above; + !o.strictSide && (F ? h.top - (c.bottom - c.top) - b.y < r.top : h.bottom + (c.bottom - c.top) + b.y > r.bottom) && F == r.bottom - h.bottom > h.top - r.top && (F = !F); + var w = (F ? h.top - r.top : r.bottom - h.bottom) - d; + if (w < m && u.resize !== !1) { + if (w < this.view.defaultLineHeight) { + l.style.top = Vs; + continue; + } + Sg.set(u, m), (l.style.height = (m = w) + "px"); + } else l.style.height && (l.style.height = ""); + var x = F ? h.top - m - d - b.y : h.bottom + d + b.y, + E = D + p; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - try { - for (var _iterator = this.manager.tooltipViews[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - l.dom.style.position = "absolute"; - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { + if (u.overlap !== !0) try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } - var t = r.editor, - i = r.space, - n = r.scaleX, - s = r.scaleY, - o = []; - for (var l1 = 0; l1 < this.manager.tooltips.length; l1++) { - var u = this.manager.tooltips[l1], - a = this.manager.tooltipViews[l1], - c = a.dom, - f = r.pos[l1], - d = r.size[l1]; - if (!f || f.bottom <= Math.max(t.top, i.top) || f.top >= Math.min(t.bottom, i.bottom) || f.right < Math.max(t.left, i.left) - 0.1 || f.left > Math.min(t.right, i.right) + 0.1) { - c.style.top = nn; - continue; - } - var p = u.arrow ? a.dom.querySelector(".cm-tooltip-arrow") : null, - m = p ? 7 : 0, - F = d.right - d.left, - g = (e = Wg.get(a)) !== null && e !== void 0 ? e : d.bottom - d.top, - D = a.offset || vA, - b = this.view.textDirection == Be.LTR, - B = d.width > i.right - i.left ? (b ? i.left : i.right - d.width) : b ? Math.min(f.left - (p ? 14 : 0) + D.x, i.right - F) : Math.max(i.left, f.left - F + (p ? 14 : 0) - D.x), - k = this.above[l1]; - !u.strictSide && (k ? f.top - (d.bottom - d.top) - D.y < i.top : f.bottom + (d.bottom - d.top) + D.y > i.bottom) && k == i.bottom - f.bottom > f.top - i.top && (k = this.above[l1] = !k); - var C = (k ? f.top - i.top : i.bottom - f.bottom) - m; - if (C < g && a.resize !== !1) { - if (C < this.view.defaultLineHeight) { - c.style.top = nn; - continue; - } - Wg.set(a, g), (c.style.height = (g = C) / s + "px"); - } else c.style.height && (c.style.height = ""); - var L = k ? f.top - g - m - D.y : f.bottom + m + D.y, - Q = B + F; - var _iteratorNormalCompletion1 = true, - _didIteratorError1 = false, - _iteratorError1 = undefined; - if (a.overlap !== !0) - try { - for (var _iterator1 = o[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var V = _step1.value; - V.left < Q && V.right > B && V.top < L + g && V.bottom > L && (L = k ? V.top - g - 2 - m : V.bottom + m + 2); + for (var _iterator = n[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _ = _step.value; + _.left < E && _.right > D && _.top < x + m && _.bottom > x && (x = F ? _.top - m - 2 - d : _.bottom + d + 2); } } catch (err) { - _didIteratorError1 = true; - _iteratorError1 = err; + _didIteratorError = true; + _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion1 && _iterator1.return != null) { - _iterator1.return(); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } } finally { - if (_didIteratorError1) { - throw _iteratorError1; + if (_didIteratorError) { + throw _iteratorError; } } } - if ((this.position == "absolute" ? ((c.style.top = (L - r.parent.top) / s + "px"), (c.style.left = (B - r.parent.left) / n + "px")) : ((c.style.top = L / s + "px"), (c.style.left = B / n + "px")), p)) { - var V1 = f.left + (b ? D.x : -D.x) - (B + 14 - 7); - p.style.left = V1 / n + "px"; - } - a.overlap !== !0 && o.push({ left: B, top: L, right: Q, bottom: L + g }), c.classList.toggle("cm-tooltip-above", k), c.classList.toggle("cm-tooltip-below", !k), a.positioned && a.positioned(r.space); + this.position == "absolute" ? ((l.style.top = x - i.parent.top + "px"), (l.style.left = D - i.parent.left + "px")) : ((l.style.top = x + "px"), (l.style.left = D + "px")), + f && (f.style.left = "".concat(h.left + (g ? b.x : -b.x) - (D + 14 - 7), "px")), + u.overlap !== !0 && n.push({ left: D, top: x, right: E, bottom: x + m }), + l.classList.toggle("cm-tooltip-above", F), + l.classList.toggle("cm-tooltip-below", !F), + u.positioned && u.positioned(i.space); } } maybeMeasure() { @@ -17092,8 +16603,8 @@ function _ts_generator(thisArg, body) { if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && ((this.inView = this.view.inView), !this.inView))) try { for (var _iterator = this.manager.tooltipViews[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var r = _step.value; - r.dom.style.top = nn; + var i = _step.value; + i.dom.style.top = Vs; } } catch (err) { _didIteratorError = true; @@ -17110,47 +16621,38 @@ function _ts_generator(thisArg, body) { } } } - constructor(r) { - (this.view = r), (this.above = []), (this.inView = !0), (this.madeAbsolute = !1), (this.lastTransaction = 0), (this.measureTimeout = -1); - var e = r.state.facet(ea); + constructor(i) { + (this.view = i), (this.inView = !0), (this.lastTransaction = 0), (this.measureTimeout = -1); + var e = i.state.facet(Ul); (this.position = e.position), (this.parent = e.parent), - (this.classes = r.themeClasses), + (this.classes = i.themeClasses), this.createContainer(), (this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }), - (this.resizeObserver = typeof ResizeObserver == "function" ? new ResizeObserver(() => this.measureSoon()) : null), - (this.manager = new Do( - r, - za, - (t, i) => this.createTooltip(t, i), - (t) => { - this.resizeObserver && this.resizeObserver.unobserve(t.dom), t.dom.remove(); - }, - )), - (this.above = this.manager.tooltips.map((t) => !!t.above)), + (this.manager = new ho(i, Ia, (t) => this.createTooltip(t))), (this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver( (t) => { Date.now() > this.lastTransaction - 50 && t.length > 0 && t[t.length - 1].intersectionRatio < 1 && this.measureSoon(); }, - { threshold: [1] }, + { threshold: [1] } ) : null), this.observeIntersection(), - r.win.addEventListener("resize", (this.measureSoon = this.measureSoon.bind(this))), + i.win.addEventListener("resize", (this.measureSoon = this.measureSoon.bind(this))), this.maybeMeasure(); } }, { - eventObservers: { + eventHandlers: { scroll() { this.maybeMeasure(); }, }, - }, + } ), - BA = ne.baseTheme({ + Gk = re.baseTheme({ ".cm-tooltip": { zIndex: 100, boxSizing: "border-box" }, "&light .cm-tooltip": { border: "1px solid #bbb", backgroundColor: "#f5f5f5" }, "&light .cm-tooltip-section:not(:first-child)": { borderTop: "1px solid #bbb" }, @@ -17167,17 +16669,17 @@ function _ts_generator(thisArg, body) { }, "&dark .cm-tooltip .cm-tooltip-arrow": { "&:before": { borderTopColor: "#333338", borderBottomColor: "#333338" }, "&:after": { borderTopColor: "transparent", borderBottomColor: "transparent" } }, }), - vA = { x: 0, y: 0 }, - za = H.define({ enables: [GD, BA] }), - Fo = H.define({ combine: (r) => r.reduce((e, t) => e.concat(t), []) }), - bo = - ((_r45 = class r { + Yk = { x: 0, y: 0 }, + Ia = G.define({ enables: [Uk, Gk] }), + co = G.define(), + Sa = + ((_i44 = class i { static create(e) { - return new r(e); + return new i(e); } - createHostedView(e, t) { - var i = e.create(this.view); - return i.dom.classList.add("cm-tooltip-section"), this.dom.insertBefore(i.dom, t ? t.dom.nextSibling : this.dom.firstChild), this.mounted && i.mount && i.mount(this.view), i; + createHostedView(e) { + var t = e.create(this.view); + return t.dom.classList.add("cm-tooltip-section"), this.dom.appendChild(t.dom), this.mounted && t.mount && t.mount(this.view), t; } mount(e) { var _iteratorNormalCompletion = true, @@ -17256,82 +16758,20 @@ function _ts_generator(thisArg, body) { } } } - passProp(e) { - var t; - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = this.manager.tooltipViews[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - var n = i[e]; - if (n !== void 0) { - if (t === void 0) t = n; - else if (t !== n) return; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - return t; - } - get offset() { - return this.passProp("offset"); - } - get getCoords() { - return this.passProp("getCoords"); - } - get overlap() { - return this.passProp("overlap"); - } - get resize() { - return this.passProp("resize"); - } constructor(e) { - (this.view = e), - (this.mounted = !1), - (this.dom = document.createElement("div")), - this.dom.classList.add("cm-tooltip-hover"), - (this.manager = new Do( - e, - Fo, - (t, i) => this.createHostedView(t, i), - (t) => t.dom.remove(), - )); + (this.view = e), (this.mounted = !1), (this.dom = document.createElement("div")), this.dom.classList.add("cm-tooltip-hover"), (this.manager = new ho(e, co, (t) => this.createHostedView(t))); } }), - h(_r45, "HoverTooltipHost"), - _r45), - xA = za.compute([Fo], (r) => { - var e = r.facet(Fo); - return e.length === 0 - ? null - : { - pos: Math.min(...e.map((t) => t.pos)), - end: Math.max( - ...e.map((t) => { - var i; - return (i = t.end) !== null && i !== void 0 ? i : t.pos; - }), - ), - create: bo.create, - above: e[0].above, - arrow: e.some((t) => t.arrow), - }; + (() => { + a(_i44, "HoverTooltipHost"); + })(), + _i44), + Kk = Ia.compute([co], (i) => { + var e = i.facet(co).filter((t) => t); + return e.length === 0 ? null : { pos: Math.min(...e.map((t) => t.pos)), end: Math.max(...e.filter((t) => t.end != null).map((t) => t.end)), create: Sa.create, above: e[0].above, arrow: e.some((t) => t.arrow) }; }), - Oa = - ((_class62 = class _class { + Ba = + ((_class64 = class _class { update() { this.pending && ((this.pending = null), clearTimeout(this.restartTimeout), (this.restartTimeout = setTimeout(() => this.startHover(), 20))); } @@ -17339,80 +16779,54 @@ function _ts_generator(thisArg, body) { return this.view.state.field(this.field); } checkHover() { - if (((this.hoverTimeout = -1), this.active.length)) return; + if (((this.hoverTimeout = -1), this.active)) return; var e = Date.now() - this.lastMove.time; e < this.hoverTime ? (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e)) : this.startHover(); } startHover() { + var _$_o; clearTimeout(this.restartTimeout); var _this = this, - e = _this.view, - t = _this.lastMove, - i = e.docView.nearest(t.target); - if (!i) return; - var n, - s = 1; - if (i instanceof Dn) n = i.posAtStart; - else { - if (((n = e.posAtCoords(t)), n == null)) return; - var l = e.coordsAtPos(n); - if (!l || t.y < l.top || t.y > l.bottom || t.x < l.left - e.defaultCharacterWidth || t.x > l.right + e.defaultCharacterWidth) return; - var u = e.bidiSpans(e.state.doc.lineAt(n)).find((c) => c.from <= n && c.to >= n), - a = u && u.dir == Be.RTL ? -1 : 1; - s = t.x < l.left ? -a : a; - } - var o = this.source(e, n, s); - if (o === null || o === void 0 ? void 0 : o.then) { - var l1 = (this.pending = { pos: n }); + e = _this.lastMove, + t = this.view.contentDOM.contains(e.target) ? this.view.posAtCoords(e) : null; + if (t == null) return; + var r = this.view.coordsAtPos(t); + if (r == null || e.y < r.top || e.y > r.bottom || e.x < r.left - this.view.defaultCharacterWidth || e.x > r.right + this.view.defaultCharacterWidth) return; + var n = this.view.bidiSpans(this.view.state.doc.lineAt(t)).find((u) => u.from <= t && u.to >= t), + s = n && n.dir == Se.RTL ? -1 : 1, + o = this.source(this.view, t, e.x < r.left ? -s : s); + if ((_$_o = o) === null || _$_o === void 0 ? void 0 : _$_o.then) { + var u = (this.pending = { pos: t }); o.then( - (u) => { - this.pending == l1 && ((this.pending = null), u && !(Array.isArray(u) && !u.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(u) ? u : [u]) })); + (l) => { + this.pending == u && ((this.pending = null), l && this.view.dispatch({ effects: this.setHover.of(l) })); }, - (u) => Xe(e.state, u, "hover tooltip"), + (l) => ht(this.view.state, l, "hover tooltip") ); - } else o && !(Array.isArray(o) && !o.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(o) ? o : [o]) }); - } - get tooltip() { - var e = this.view.plugin(GD), - t = e ? e.manager.tooltips.findIndex((i) => i.create == bo.create) : -1; - return t > -1 ? e.manager.tooltipViews[t] : null; + } else o && this.view.dispatch({ effects: this.setHover.of(o) }); } mousemove(e) { - var t, i; + var t; (this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }), this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime)); - var _this = this, - n = _this.active, - s = _this.tooltip; - if ((n.length && s && !AA(s.dom, e)) || this.pending) { - var _ref = n[0] || this.pending, - o = _ref.pos, - l = (i = (t = n[0]) === null || t === void 0 ? void 0 : t.end) !== null && i !== void 0 ? i : o; - (o == l ? this.view.posAtCoords(this.lastMove) != o : !kA(this.view, o, l, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), (this.pending = null)); + var r = this.active; + if ((r && !Bg(this.lastMove.target)) || this.pending) { + var _r; + var _ref = r || this.pending, + n = _ref.pos, + s = (t = (_r = r) === null || _r === void 0 ? void 0 : _r.end) !== null && t !== void 0 ? t : n; + (n == s ? this.view.posAtCoords(this.lastMove) != n : !Xk(this.view, n, s, e.clientX, e.clientY, 6)) && (this.view.dispatch({ effects: this.setHover.of(null) }), (this.pending = null)); } } mouseleave(e) { - clearTimeout(this.hoverTimeout), (this.hoverTimeout = -1); - var _this = this, - t = _this.active; - if (t.length) { - var _this1 = this, - i = _this1.tooltip; - i && i.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(i.dom) : this.view.dispatch({ effects: this.setHover.of([]) }); - } - } - watchTooltipLeave(e) { - var t = h((i) => { - e.removeEventListener("mouseleave", t), this.active.length && !this.view.dom.contains(i.relatedTarget) && this.view.dispatch({ effects: this.setHover.of([]) }); - }, "watch"); - e.addEventListener("mouseleave", t); + clearTimeout(this.hoverTimeout), (this.hoverTimeout = -1), this.active && !Bg(e.relatedTarget) && this.view.dispatch({ effects: this.setHover.of(null) }); } destroy() { clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove); } - constructor(e, t, i, n, s) { + constructor(e, t, r, n, s) { (this.view = e), (this.source = t), - (this.field = i), + (this.field = r), (this.setHover = n), (this.hoverTime = s), (this.hoverTimeout = -1), @@ -17424,100 +16838,84 @@ function _ts_generator(thisArg, body) { e.dom.addEventListener("mousemove", (this.mousemove = this.mousemove.bind(this))); } }), - h(_class62, "HoverPlugin"), - _class62), - Zs = 4; - function AA(r, e) { - var t = r.getBoundingClientRect(); - return e.clientX >= t.left - Zs && e.clientX <= t.right + Zs && e.clientY >= t.top - Zs && e.clientY <= t.bottom + Zs; - } - h(AA, "isInTooltip"); - function kA(r, e, t, i, n, s) { - var o = r.scrollDOM.getBoundingClientRect(), - l = r.documentTop + r.documentPadding.top + r.contentHeight; - if (o.left > i || o.right < i || o.top > n || Math.min(o.bottom, l) < n) return !1; - var u = r.posAtCoords({ x: i, y: n }, !1); - return u >= e && u <= t; - } - h(kA, "isOverRange"); - function XD(r) { + (() => { + a(_class64, "HoverPlugin"); + })(), + _class64); + function Bg(i) { + for (var e = i; e; e = e.parentNode) if (e.nodeType == 1 && e.classList.contains("cm-tooltip")) return !0; + return !1; + } + a(Bg, "isInTooltip"); + function Xk(i, e, t, r, n, s) { + var o = document.createRange(), + u = i.domAtPos(e), + l = i.domAtPos(t); + o.setEnd(l.node, l.offset), o.setStart(u.node, u.offset); + var h = o.getClientRects(); + o.detach(); + for (var c = 0; c < h.length; c++) { + var f = h[c]; + if (Math.max(f.top - n, n - f.bottom, f.left - r, r - f.right) <= s) return !0; + } + return !1; + } + a(Xk, "isOverRange"); + function OD(i) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - var t = de.define(), - i = Pe.define({ + var t = pe.define(), + r = Ie.define({ create() { - return []; + return null; }, update(n, s) { - if (n.length && (e.hideOnChange && (s.docChanged || s.selection) ? (n = []) : e.hideOn && (n = n.filter((o) => !e.hideOn(s, o))), s.docChanged)) { - var o = []; - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; - try { - for (var _iterator = n[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - var u = s.changes.mapPos(l.pos, -1, Ve.TrackDel); - if (u != null) { - var a = Object.assign(Object.create(null), l); - (a.pos = u), a.end != null && (a.end = s.changes.mapPos(a.end)), o.push(a); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - n = o; + if (n && ((e.hideOnChange && (s.docChanged || s.selection)) || (e.hideOn && e.hideOn(s, n)))) return null; + if (n && s.docChanged) { + var o = s.changes.mapPos(n.pos, -1, je.TrackDel); + if (o == null) return null; + var u = Object.assign(Object.create(null), n); + (u.pos = o), n.end != null && (u.end = s.changes.mapPos(n.end)), (n = u); } - var _iteratorNormalCompletion1 = true, - _didIteratorError1 = false, - _iteratorError1 = undefined; + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; try { - for (var _iterator1 = s.effects[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var o1 = _step1.value; - o1.is(t) && (n = o1.value), o1.is(SA) && (n = []); + for (var _iterator = s.effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var o1 = _step.value; + o1.is(t) && (n = o1.value), o1.is(Qk) && (n = null); } } catch (err) { - _didIteratorError1 = true; - _iteratorError1 = err; + _didIteratorError = true; + _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion1 && _iterator1.return != null) { - _iterator1.return(); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } } finally { - if (_didIteratorError1) { - throw _iteratorError1; + if (_didIteratorError) { + throw _iteratorError; } } } return n; }, - provide: (n) => Fo.from(n), + provide: (n) => co.from(n), }); - return [i, je.define((n) => new Oa(n, r, i, t, e.hoverTime || 300)), xA]; + return [r, Ye.define((n) => new Ba(n, i, r, t, e.hoverTime || 300)), Kk]; } - h(XD, "hoverTooltip"); - var SA = de.define(); - var zg = H.define({ - combine(r) { + a(OD, "hoverTooltip"); + var Qk = pe.define(); + var _g = G.define({ + combine(i) { var e, t; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - (e = e || i.topContainer), (t = t || i.bottomContainer); + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + (e = e || r.topContainer), (t = t || r.bottomContainer); } } catch (err) { _didIteratorError = true; @@ -17536,30 +16934,30 @@ function _ts_generator(thisArg, body) { return { topContainer: e, bottomContainer: t }; }, }); - var wA = je.fromClass( + var Jk = Ye.fromClass( class { - update(r) { - var e = r.state.facet(zg); - this.top.container != e.topContainer && (this.top.sync([]), (this.top = new gr(r.view, !0, e.topContainer))), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), (this.bottom = new gr(r.view, !1, e.bottomContainer))), this.top.syncClasses(), this.bottom.syncClasses(); - var t = r.state.facet(yo); + update(i) { + var e = i.state.facet(_g); + this.top.container != e.topContainer && (this.top.sync([]), (this.top = new ar(i.view, !0, e.topContainer))), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), (this.bottom = new ar(i.view, !1, e.bottomContainer))), this.top.syncClasses(), this.bottom.syncClasses(); + var t = i.state.facet(fo); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; if (t != this.input) { - var i = t.filter((u) => u), + var r = t.filter((l) => l), n = [], s = [], o = [], - l = []; + u = []; var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { - var u = _step.value; - var a = this.specs.indexOf(u), + for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { + var l = _step.value; + var h = this.specs.indexOf(l), c = void 0; - a < 0 ? ((c = u(r.view)), l.push(c)) : ((c = this.panels[a]), c.update && c.update(r)), n.push(c), (c.top ? s : o).push(c); + h < 0 ? ((c = l(i.view)), u.push(c)) : ((c = this.panels[h]), c.update && c.update(i)), n.push(c), (c.top ? s : o).push(c); } } catch (err) { _didIteratorError1 = true; @@ -17575,14 +16973,14 @@ function _ts_generator(thisArg, body) { } } } - (this.specs = i), (this.panels = n), this.top.sync(s), this.bottom.sync(o); + (this.specs = r), (this.panels = n), this.top.sync(s), this.bottom.sync(o); var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined; try { - for (var _iterator1 = l[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion2 = true) { - var u1 = _step1.value; - u1.dom.classList.add("cm-panel"), u1.mount && u1.mount(); + for (var _iterator1 = u[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion2 = true) { + var l1 = _step1.value; + l1.dom.classList.add("cm-panel"), l1.mount && l1.mount(); } } catch (err) { _didIteratorError2 = true; @@ -17601,8 +16999,8 @@ function _ts_generator(thisArg, body) { } else try { for (var _iterator2 = this.panels[Symbol.iterator](), _step2; !(_iteratorNormalCompletion = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion = true) { - var i1 = _step2.value; - i1.update && i1.update(r); + var r1 = _step2.value; + r1.update && r1.update(i); } } catch (err) { _didIteratorError = true; @@ -17622,10 +17020,10 @@ function _ts_generator(thisArg, body) { destroy() { this.top.sync([]), this.bottom.sync([]); } - constructor(r) { - (this.input = r.state.facet(yo)), (this.specs = this.input.filter((t) => t)), (this.panels = this.specs.map((t) => t(r))); - var e = r.state.facet(zg); - (this.top = new gr(r, !0, e.topContainer)), (this.bottom = new gr(r, !1, e.bottomContainer)), this.top.sync(this.panels.filter((t) => t.top)), this.bottom.sync(this.panels.filter((t) => !t.top)); + constructor(i) { + (this.input = i.state.facet(fo)), (this.specs = this.input.filter((t) => t)), (this.panels = this.specs.map((t) => t(i))); + var e = i.state.facet(_g); + (this.top = new ar(i, !0, e.topContainer)), (this.bottom = new ar(i, !1, e.bottomContainer)), this.top.sync(this.panels.filter((t) => t.top)), this.bottom.sync(this.panels.filter((t) => !t.top)); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -17651,15 +17049,15 @@ function _ts_generator(thisArg, body) { } }, { - provide: (r) => - ne.scrollMargins.of((e) => { - var t = e.plugin(r); + provide: (i) => + re.scrollMargins.of((e) => { + var t = e.plugin(i); return t && { top: t.top.scrollMargin(), bottom: t.bottom.scrollMargin() }; }), - }, + } ), - gr = - ((_class63 = class _class { + ar = + ((_class65 = class _class { sync(e) { var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -17703,7 +17101,7 @@ function _ts_generator(thisArg, body) { for (var _iterator = this.panels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t1 = _step.value; if (t1.dom.parentNode == this.dom) { - for (; e != t1.dom; ) e = Hg(e); + for (; e != t1.dom; ) e = Og(e); e = e.nextSibling; } else this.dom.insertBefore(t1.dom, e); } @@ -17721,7 +17119,7 @@ function _ts_generator(thisArg, body) { } } } - for (; e; ) e = Hg(e); + for (; e; ) e = Og(e); } scrollMargin() { return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top); @@ -17774,20 +17172,22 @@ function _ts_generator(thisArg, body) { } } } - constructor(e, t, i) { - (this.view = e), (this.top = t), (this.container = i), (this.dom = void 0), (this.classes = ""), (this.panels = []), this.syncClasses(); + constructor(e, t, r) { + (this.view = e), (this.top = t), (this.container = r), (this.dom = void 0), (this.classes = ""), (this.panels = []), this.syncClasses(); } }), - h(_class63, "PanelGroup"), - _class63); - function Hg(r) { - var e = r.nextSibling; - return r.remove(), e; - } - h(Hg, "rm"); - var yo = H.define({ enables: wA }), - mt = - ((_class64 = class _class extends Gt { + (() => { + a(_class65, "PanelGroup"); + })(), + _class65); + function Og(i) { + var e = i.nextSibling; + return i.remove(), e; + } + a(Og, "rm"); + var fo = G.define({ enables: Jk }), + ct = + ((_class66 = class _class extends Ht { compare(e) { return this == e || (this.constructor == e.constructor && this.eq(e)); } @@ -17796,205 +17196,185 @@ function _ts_generator(thisArg, body) { } destroy(e) {} }), - h(_class64, "GutterMarker"), - _class64); - mt.prototype.elementClass = ""; - mt.prototype.toDOM = void 0; - mt.prototype.mapMode = Ve.TrackBefore; - mt.prototype.startSide = mt.prototype.endSide = -1; - mt.prototype.point = !0; - var no = H.define(); - var so = H.define(); - var Ta = H.define({ combine: (r) => r.some((e) => e) }); - function QA(r) { - var e = [_A]; - return r && r.fixed === !1 && e.push(Ta.of(!0)), e; - } - h(QA, "gutters"); - var _A = je.fromClass( + (() => { + a(_class66, "GutterMarker"); + })(), + _class66); + ct.prototype.elementClass = ""; + ct.prototype.toDOM = void 0; + ct.prototype.mapMode = je.TrackBefore; + ct.prototype.startSide = ct.prototype.endSide = -1; + ct.prototype.point = !0; + var Us = G.define(); + var Gs = G.define(); + var _a = G.define({ combine: (i) => i.some((e) => e) }); + function Zk(i) { + var e = [ew]; + return i && i.fixed === !1 && e.push(_a.of(!0)), e; + } + a(Zk, "gutters"); + var ew = Ye.fromClass( class { - update(r) { - if (this.updateGutters(r)) { + update(i) { + if (this.updateGutters(i)) { var e = this.prevViewport, - t = r.view.viewport, - i = Math.min(e.to, t.to) - Math.max(e.from, t.from); - this.syncGutters(i < (t.to - t.from) * 0.8); + t = i.view.viewport, + r = Math.min(e.to, t.to) - Math.max(e.from, t.from); + this.syncGutters(r < (t.to - t.from) * 0.8); } - r.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(Ta) != !this.fixed && ((this.fixed = !this.fixed), (this.dom.style.position = this.fixed ? "sticky" : "")), (this.prevViewport = r.view.viewport); + i.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight + "px"), this.view.state.facet(_a) != !this.fixed && ((this.fixed = !this.fixed), (this.dom.style.position = this.fixed ? "sticky" : "")), (this.prevViewport = i.view.viewport); } - syncGutters(r) { + syncGutters(i) { var e = this.dom.nextSibling; - r && this.dom.remove(); - var t = De.iter(this.view.state.facet(no), this.view.viewport.from), - i = [], - n = this.gutters.map((s) => new Na(s, this.view.viewport, -this.view.documentPadding.top)); + i && this.dom.remove(); + var t = Ee.iter(this.view.state.facet(Us), this.view.viewport.from), + r = [], + n = this.gutters.map((s) => new Ta(s, this.view.viewport, -this.view.documentPadding.top)); var _iteratorNormalCompletion = true, _didIteratorError = false, - _iteratorError = undefined, - _iteratorNormalCompletion1 = true, - _didIteratorError1 = false, - _iteratorError1 = undefined; + _iteratorError = undefined; try { - for (var _iterator = this.view.viewportLineBlocks[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator = this.view.viewportLineBlocks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; - if ((i.length && (i = []), Array.isArray(s.type))) { + if ((r.length && (r = []), Array.isArray(s.type))) { var o = !0; - var _iteratorNormalCompletion2 = true, + var _iteratorNormalCompletion1 = true, + _didIteratorError1 = false, + _iteratorError1 = undefined, + _iteratorNormalCompletion2 = true, _didIteratorError2 = false, - _iteratorError2 = undefined, - _iteratorNormalCompletion3 = true, - _didIteratorError3 = false, - _iteratorError3 = undefined; + _iteratorError2 = undefined; try { - for (var _iterator1 = s.type[Symbol.iterator](), _step1; !(_iteratorNormalCompletion3 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion3 = true) { - var l = _step1.value; - if (l.type == He.Text && o) { - Ra(t, i, l.from); - var _iteratorNormalCompletion4 = true, - _didIteratorError4 = false, - _iteratorError4 = undefined; + for (var _iterator1 = s.type[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion2 = true) { + var u = _step1.value; + if (u.type == xe.Text && o) { + Oa(t, r, u.from); + var _iteratorNormalCompletion3 = true, + _didIteratorError3 = false, + _iteratorError3 = undefined; try { - for (var _iterator2 = n[Symbol.iterator](), _step2; !(_iteratorNormalCompletion4 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion4 = true) { - var u = _step2.value; - u.line(this.view, l, i); + for (var _iterator2 = n[Symbol.iterator](), _step2; !(_iteratorNormalCompletion3 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion3 = true) { + var l = _step2.value; + l.line(this.view, u, r); } } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; + _didIteratorError3 = true; + _iteratorError3 = err; } finally { try { - if (!_iteratorNormalCompletion4 && _iterator2.return != null) { + if (!_iteratorNormalCompletion3 && _iterator2.return != null) { _iterator2.return(); } } finally { - if (_didIteratorError4) { - throw _iteratorError4; + if (_didIteratorError3) { + throw _iteratorError3; } } } o = !1; - } else if (l.widget) + } else if (u.widget) try { - for (var _iterator3 = n[Symbol.iterator](), _step3; !(_iteratorNormalCompletion2 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion2 = true) { - var u1 = _step3.value; - u1.widget(this.view, l); + for (var _iterator3 = n[Symbol.iterator](), _step3; !(_iteratorNormalCompletion1 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion1 = true) { + var l1 = _step3.value; + l1.widget(this.view, u); } } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; + _didIteratorError1 = true; + _iteratorError1 = err; } finally { try { - if (!_iteratorNormalCompletion2 && _iterator3.return != null) { + if (!_iteratorNormalCompletion1 && _iterator3.return != null) { _iterator3.return(); } } finally { - if (_didIteratorError2) { - throw _iteratorError2; + if (_didIteratorError1) { + throw _iteratorError1; } } } } } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; + _didIteratorError2 = true; + _iteratorError2 = err; } finally { try { - if (!_iteratorNormalCompletion3 && _iterator1.return != null) { + if (!_iteratorNormalCompletion2 && _iterator1.return != null) { _iterator1.return(); } } finally { - if (_didIteratorError3) { - throw _iteratorError3; + if (_didIteratorError2) { + throw _iteratorError2; } } } - } else if (s.type == He.Text) { - Ra(t, i, s.from); - var _iteratorNormalCompletion5 = true, - _didIteratorError5 = false, - _iteratorError5 = undefined; + } else if (s.type == xe.Text) { + Oa(t, r, s.from); + var _iteratorNormalCompletion4 = true, + _didIteratorError4 = false, + _iteratorError4 = undefined; try { - for (var _iterator4 = n[Symbol.iterator](), _step4; !(_iteratorNormalCompletion5 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion5 = true) { + for (var _iterator4 = n[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { var o1 = _step4.value; - o1.line(this.view, s, i); + o1.line(this.view, s, r); } } catch (err) { - _didIteratorError5 = true; - _iteratorError5 = err; + _didIteratorError4 = true; + _iteratorError4 = err; } finally { try { - if (!_iteratorNormalCompletion5 && _iterator4.return != null) { + if (!_iteratorNormalCompletion4 && _iterator4.return != null) { _iterator4.return(); } } finally { - if (_didIteratorError5) { - throw _iteratorError5; - } - } - } - } else if (s.widget) - try { - for (var _iterator5 = n[Symbol.iterator](), _step5; !(_iteratorNormalCompletion = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion = true) { - var o2 = _step5.value; - o2.widget(this.view, s); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator5.return != null) { - _iterator5.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; + if (_didIteratorError4) { + throw _iteratorError4; } } } + } } } catch (err) { - _didIteratorError1 = true; - _iteratorError1 = err; + _didIteratorError = true; + _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion1 && _iterator.return != null) { + if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { - if (_didIteratorError1) { - throw _iteratorError1; + if (_didIteratorError) { + throw _iteratorError; } } } - var _iteratorNormalCompletion6 = true, - _didIteratorError6 = false, - _iteratorError6 = undefined; + var _iteratorNormalCompletion5 = true, + _didIteratorError5 = false, + _iteratorError5 = undefined; try { - for (var _iterator6 = n[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { - var s1 = _step6.value; + for (var _iterator5 = n[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { + var s1 = _step5.value; s1.finish(); } } catch (err) { - _didIteratorError6 = true; - _iteratorError6 = err; + _didIteratorError5 = true; + _iteratorError5 = err; } finally { try { - if (!_iteratorNormalCompletion6 && _iterator6.return != null) { - _iterator6.return(); + if (!_iteratorNormalCompletion5 && _iterator5.return != null) { + _iterator5.return(); } } finally { - if (_didIteratorError6) { - throw _iteratorError6; + if (_didIteratorError5) { + throw _iteratorError5; } } } - r && this.view.scrollDOM.insertBefore(this.dom, e); + i && this.view.scrollDOM.insertBefore(this.dom, e); } - updateGutters(r) { - var e = r.startState.facet(so), - t = r.state.facet(so), - i = r.docChanged || r.heightChanged || r.viewportChanged || !De.eq(r.startState.facet(no), r.state.facet(no), r.view.viewport.from, r.view.viewport.to); + updateGutters(i) { + var e = i.startState.facet(Gs), + t = i.state.facet(Gs), + r = i.docChanged || i.heightChanged || i.viewportChanged || !Ee.eq(i.startState.facet(Us), i.state.facet(Us), i.view.viewport.from, i.view.viewport.to); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -18002,7 +17382,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = this.gutters[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - n.update(r) && (i = !0); + n.update(i) && (r = !0); } } catch (err) { _didIteratorError = true; @@ -18019,7 +17399,7 @@ function _ts_generator(thisArg, body) { } } else { - i = !0; + r = !0; var n1 = []; var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, @@ -18028,7 +17408,7 @@ function _ts_generator(thisArg, body) { for (var _iterator1 = t[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { var s = _step1.value; var o = e.indexOf(s); - o < 0 ? n1.push(new Eo(this.view, s)) : (this.gutters[o].update(r), n1.push(this.gutters[o])); + o < 0 ? n1.push(new po(this.view, s)) : (this.gutters[o].update(i), n1.push(this.gutters[o])); } } catch (err) { _didIteratorError1 = true; @@ -18090,7 +17470,7 @@ function _ts_generator(thisArg, body) { } this.gutters = n1; } - return i; + return r; } destroy() { var _iteratorNormalCompletion = true, @@ -18098,8 +17478,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.gutters[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var r = _step.value; - r.destroy(); + var i = _step.value; + i.destroy(); } } catch (err) { _didIteratorError = true; @@ -18117,8 +17497,8 @@ function _ts_generator(thisArg, body) { } this.dom.remove(); } - constructor(r) { - (this.view = r), (this.prevViewport = r.viewport), (this.dom = document.createElement("div")), (this.dom.className = "cm-gutters"), this.dom.setAttribute("aria-hidden", "true"), (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), (this.gutters = r.state.facet(so).map((e) => new Eo(r, e))); + constructor(i) { + (this.view = i), (this.prevViewport = i.viewport), (this.dom = document.createElement("div")), (this.dom.className = "cm-gutters"), this.dom.setAttribute("aria-hidden", "true"), (this.dom.style.minHeight = this.view.contentHeight + "px"), (this.gutters = i.state.facet(Gs).map((e) => new po(i, e))); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -18141,49 +17521,48 @@ function _ts_generator(thisArg, body) { } } } - (this.fixed = !r.state.facet(Ta)), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), r.scrollDOM.insertBefore(this.dom, r.contentDOM); + (this.fixed = !i.state.facet(_a)), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), i.scrollDOM.insertBefore(this.dom, i.contentDOM); } }, { - provide: (r) => - ne.scrollMargins.of((e) => { - var t = e.plugin(r); - return !t || t.gutters.length == 0 || !t.fixed ? null : e.textDirection == Be.LTR ? { left: t.dom.offsetWidth * e.scaleX } : { right: t.dom.offsetWidth * e.scaleX }; + provide: (i) => + re.scrollMargins.of((e) => { + var t = e.plugin(i); + return !t || t.gutters.length == 0 || !t.fixed ? null : e.textDirection == Se.LTR ? { left: t.dom.offsetWidth } : { right: t.dom.offsetWidth }; }), - }, + } ); - function jg(r) { - return Array.isArray(r) ? r : [r]; + function Tg(i) { + return Array.isArray(i) ? i : [i]; } - h(jg, "asArray"); - function Ra(r, e, t) { - for (; r.value && r.from <= t; ) r.from == t && e.push(r.value), r.next(); + a(Tg, "asArray"); + function Oa(i, e, t) { + for (; i.value && i.from <= t; ) i.from == t && e.push(i.value), i.next(); } - h(Ra, "advanceCursor"); - var Na = - ((_class65 = class _class { - addElement(e, t, i) { + a(Oa, "advanceCursor"); + var Ta = + ((_class67 = class _class { + addElement(e, t, r) { var _this = this, n = _this.gutter, - s = (t.top - this.height) / e.scaleY, - o = t.height / e.scaleY; + s = t.top - this.height; if (this.i == n.elements.length) { - var l = new Co(e, o, s, i); - n.elements.push(l), n.dom.appendChild(l.dom); - } else n.elements[this.i].update(e, o, s, i); + var o = new mo(e, t.height, s, r); + n.elements.push(o), n.dom.appendChild(o.dom); + } else n.elements[this.i].update(e, t.height, s, r); (this.height = t.bottom), this.i++; } - line(e, t, i) { + line(e, t, r) { var n = []; - Ra(this.cursor, n, t.from), i.length && (n = n.concat(i)); + Oa(this.cursor, n, t.from), r.length && (n = n.concat(r)); var s = this.gutter.config.lineMarker(e, t, n); s && n.unshift(s); var o = this.gutter; (n.length == 0 && !o.config.renderEmptyElements) || this.addElement(e, t, n); } widget(e, t) { - var i = this.gutter.config.widgetMarker(e, t.widget, t); - i && this.addElement(e, t, [i]); + var r = this.gutter.config.widgetMarker(e, t.widget, t); + r && this.addElement(e, t, [r]); } finish() { var e = this.gutter; @@ -18192,22 +17571,24 @@ function _ts_generator(thisArg, body) { e.dom.removeChild(t.dom), t.destroy(); } } - constructor(e, t, i) { - (this.gutter = e), (this.height = i), (this.i = 0), (this.cursor = De.iter(e.markers, t.from)); + constructor(e, t, r) { + (this.gutter = e), (this.height = r), (this.i = 0), (this.cursor = Ee.iter(e.markers, t.from)); } }), - h(_class65, "UpdateContext"), - _class65), - Eo = - ((_class66 = class _class { + (() => { + a(_class67, "UpdateContext"); + })(), + _class67), + po = + ((_class68 = class _class { update(e) { var t = this.markers; - if (((this.markers = jg(this.config.markers(e.view))), this.spacer && this.config.updateSpacer)) { + if (((this.markers = Tg(this.config.markers(e.view))), this.spacer && this.config.updateSpacer)) { var n = this.config.updateSpacer(this.spacer.markers[0], e); n != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [n]); } - var i = e.view.viewport; - return !De.eq(this.markers, t, i.from, i.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1); + var r = e.view.viewport; + return !Ee.eq(this.markers, t, r.from, r.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1); } destroy() { var _iteratorNormalCompletion = true, @@ -18234,49 +17615,51 @@ function _ts_generator(thisArg, body) { } } constructor(e, t) { - var _this, - _loop = function (i) { - _this.dom.addEventListener(i, (n) => { + var _this = this, + _loop = function (r) { + _this.dom.addEventListener(r, (n) => { var s = n.target, o; if (s != _this.dom && _this.dom.contains(s)) { for (; s.parentNode != _this.dom; ) s = s.parentNode; - var u = s.getBoundingClientRect(); - o = (u.top + u.bottom) / 2; + var l = s.getBoundingClientRect(); + o = (l.top + l.bottom) / 2; } else o = n.clientY; - var l = e.lineBlockAtHeight(o - e.documentTop); - t.domEventHandlers[i](e, l, n) && n.preventDefault(); + var u = e.lineBlockAtHeight(o - e.documentTop); + t.domEventHandlers[r](e, u, n) && n.preventDefault(); }); }; (this.view = e), (this.config = t), (this.elements = []), (this.spacer = null), (this.dom = document.createElement("div")), (this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : "")); - for (var i in t.domEventHandlers) (_this = this), _loop(i); - (this.markers = jg(t.markers(e))), t.initialSpacer && ((this.spacer = new Co(e, 0, 0, [t.initialSpacer(e)])), this.dom.appendChild(this.spacer.dom), (this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none")); + for (var r in t.domEventHandlers) _loop(r); + (this.markers = Tg(t.markers(e))), t.initialSpacer && ((this.spacer = new mo(e, 0, 0, [t.initialSpacer(e)])), this.dom.appendChild(this.spacer.dom), (this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none")); } }), - h(_class66, "SingleGutterView"), - _class66), - Co = - ((_class67 = class _class { - update(e, t, i, n) { - this.height != t && ((this.height = t), (this.dom.style.height = t + "px")), this.above != i && (this.dom.style.marginTop = (this.above = i) ? i + "px" : ""), UA(this.markers, n) || this.setMarkers(e, n); + (() => { + a(_class68, "SingleGutterView"); + })(), + _class68), + mo = + ((_class69 = class _class { + update(e, t, r, n) { + this.height != t && (this.dom.style.height = (this.height = t) + "px"), this.above != r && (this.dom.style.marginTop = (this.above = r) ? r + "px" : ""), tw(this.markers, n) || this.setMarkers(e, n); } setMarkers(e, t) { - var i = "cm-gutterElement", + var r = "cm-gutterElement", n = this.dom.firstChild; for (var s = 0, o = 0; ; ) { - var l = o, - u = s < t.length ? t[s++] : null, - a = !1; - if (u) { - var c = u.elementClass; - c && (i += " " + c); + var u = o, + l = s < t.length ? t[s++] : null, + h = !1; + if (l) { + var c = l.elementClass; + c && (r += " " + c); for (var f = o; f < this.markers.length; f++) - if (this.markers[f].compare(u)) { - (l = f), (a = !0); + if (this.markers[f].compare(l)) { + (u = f), (h = !0); break; } - } else l = this.markers.length; - for (; o < l; ) { + } else u = this.markers.length; + for (; o < u; ) { var c1 = this.markers[o++]; if (c1.toDOM) { c1.destroy(n); @@ -18284,49 +17667,51 @@ function _ts_generator(thisArg, body) { n.remove(), (n = f1); } } - if (!u) break; - u.toDOM && (a ? (n = n.nextSibling) : this.dom.insertBefore(u.toDOM(e), n)), a && o++; + if (!l) break; + l.toDOM && (h ? (n = n.nextSibling) : this.dom.insertBefore(l.toDOM(e), n)), h && o++; } - (this.dom.className = i), (this.markers = t); + (this.dom.className = r), (this.markers = t); } destroy() { this.setMarkers(null, []); } - constructor(e, t, i, n) { - (this.height = -1), (this.above = 0), (this.markers = []), (this.dom = document.createElement("div")), (this.dom.className = "cm-gutterElement"), this.update(e, t, i, n); + constructor(e, t, r, n) { + (this.height = -1), (this.above = 0), (this.markers = []), (this.dom = document.createElement("div")), (this.dom.className = "cm-gutterElement"), this.update(e, t, r, n); } }), - h(_class67, "GutterElement"), - _class67); - function UA(r, e) { - if (r.length != e.length) return !1; - for (var t = 0; t < r.length; t++) if (!r[t].compare(e[t])) return !1; + (() => { + a(_class69, "GutterElement"); + })(), + _class69); + function tw(i, e) { + if (i.length != e.length) return !1; + for (var t = 0; t < i.length; t++) if (!i[t].compare(e[t])) return !1; return !0; } - h(UA, "sameMarkers"); - var LA = H.define(), - Dr = H.define({ - combine(r) { - return Xt( - r, + a(tw, "sameMarkers"); + var iw = G.define(), + hr = G.define({ + combine(i) { + return Wt( + i, { formatNumber: String, domEventHandlers: {} }, { domEventHandlers(e, t) { var _loop = function (n) { - var s = i[n], + var s = r[n], o = t[n]; - i[n] = s ? (l, u, a) => s(l, u, a) || o(l, u, a) : o; + r[n] = s ? (u, l, h) => s(u, l, h) || o(u, l, h) : o; }; - var i = Object.assign({}, e); + var r = Object.assign({}, e); for (var n in t) _loop(n); - return i; + return r; }, - }, + } ); }, }), - mn = - ((_class68 = class _class extends mt { + nn = + ((_class70 = class _class extends ct { eq(e) { return this.number == e.number; } @@ -18337,59 +17722,61 @@ function _ts_generator(thisArg, body) { super(), (this.number = e); } }), - h(_class68, "NumberMarker"), - _class68); - function ta(r, e) { - return r.state.facet(Dr).formatNumber(e, r.state); + (() => { + a(_class70, "NumberMarker"); + })(), + _class70); + function Gl(i, e) { + return i.state.facet(hr).formatNumber(e, i.state); } - h(ta, "formatNumber"); - var OA = so.compute([Dr], (r) => ({ + a(Gl, "formatNumber"); + var rw = Gs.compute([hr], (i) => ({ class: "cm-lineNumbers", renderEmptyElements: !1, markers(e) { - return e.state.facet(LA); + return e.state.facet(iw); }, - lineMarker(e, t, i) { - return i.some((n) => n.toDOM) ? null : new mn(ta(e, e.state.doc.lineAt(t.from).number)); + lineMarker(e, t, r) { + return r.some((n) => n.toDOM) ? null : new nn(Gl(e, e.state.doc.lineAt(t.from).number)); }, widgetMarker: () => null, - lineMarkerChange: (e) => e.startState.facet(Dr) != e.state.facet(Dr), + lineMarkerChange: (e) => e.startState.facet(hr) != e.state.facet(hr), initialSpacer(e) { - return new mn(ta(e, Yg(e.state.doc.lines))); + return new nn(Gl(e, Rg(e.state.doc.lines))); }, updateSpacer(e, t) { - var i = ta(t.view, Yg(t.view.state.doc.lines)); - return i == e.number ? e : new mn(i); + var r = Gl(t.view, Rg(t.view.state.doc.lines)); + return r == e.number ? e : new nn(r); }, - domEventHandlers: r.facet(Dr).domEventHandlers, + domEventHandlers: i.facet(hr).domEventHandlers, })); - function KD() { - var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - return [Dr.of(r), QA(), OA]; + function TD() { + var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + return [hr.of(i), Zk(), rw]; } - h(KD, "lineNumbers"); - function Yg(r) { + a(TD, "lineNumbers"); + function Rg(i) { var e = 9; - for (; e < r; ) e = e * 10 + 9; + for (; e < i; ) e = e * 10 + 9; return e; } - h(Yg, "maxLineNumber"); - var TA = new (class extends mt { + a(Rg, "maxLineNumber"); + var nw = new (class extends ct { constructor() { super(...arguments), (this.elementClass = "cm-activeLineGutter"); } })(), - RA = no.compute(["selection"], (r) => { + sw = Us.compute(["selection"], (i) => { var e = [], t = -1; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r.selection.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - var n = r.doc.lineAt(i.head).from; - n > t && ((t = n), e.push(TA.range(n))); + for (var _iterator = i.selection.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + var n = i.doc.lineAt(r.head).from; + n > t && ((t = n), e.push(nw.range(n))); } } catch (err) { _didIteratorError = true; @@ -18405,36 +17792,38 @@ function _ts_generator(thisArg, body) { } } } - return De.of(e); + return Ee.of(e); }); - function ZD() { - return RA; + function RD() { + return sw; } - h(ZD, "highlightActiveLineGutter"); - var NA = 0, - vn = - ((_class69 = class _class { + a(RD, "highlightActiveLineGutter"); + var ow = 0, + dn = + ((_class71 = class _class { constructor(e, t) { (this.from = e), (this.to = t); } }), - h(_class69, "Range"), - _class69), + (() => { + a(_class71, "Range"); + })(), + _class71), ue = - ((_class70 = class _class { + ((_class72 = class _class { add(e) { if (this.perNode) throw new RangeError("Can't add per-node props to node types"); return ( - typeof e != "function" && (e = Ie.match(e)), + typeof e != "function" && (e = Ve.match(e)), (t) => { - var i = e(t); - return i === void 0 ? null : [this, i]; + var r = e(t); + return r === void 0 ? null : [this, r]; } ); } constructor(ref) { var e = ref === void 0 ? {} : ref; - (this.id = NA++), + (this.id = ow++), (this.perNode = !!e.perNode), (this.deserialize = e.deserialize || @@ -18443,38 +17832,23 @@ function _ts_generator(thisArg, body) { })); } }), - h(_class70, "NodeProp"), - _class70); - ue.closedBy = new ue({ deserialize: (r) => r.split(" ") }); - ue.openedBy = new ue({ deserialize: (r) => r.split(" ") }); - ue.group = new ue({ deserialize: (r) => r.split(" ") }); - ue.isolate = new ue({ - deserialize: (r) => { - if (r && r != "rtl" && r != "ltr" && r != "auto") throw new RangeError("Invalid value for isolate: " + r); - return r || "auto"; - }, - }); + (() => { + a(_class72, "NodeProp"); + })(), + _class72); + ue.closedBy = new ue({ deserialize: (i) => i.split(" ") }); + ue.openedBy = new ue({ deserialize: (i) => i.split(" ") }); + ue.group = new ue({ deserialize: (i) => i.split(" ") }); ue.contextHash = new ue({ perNode: !0 }); ue.lookAhead = new ue({ perNode: !0 }); ue.mounted = new ue({ perNode: !0 }); - var yr = - ((_class71 = class _class { - static get(e) { - return e && e.props && e.props[ue.mounted.id]; - } - constructor(e, t, i) { - (this.tree = e), (this.overlay = t), (this.parser = i); - } - }), - h(_class71, "MountedTree"), - _class71), - MA = Object.create(null), - Ie = - ((_r46 = class r { + var uw = Object.create(null), + Ve = + ((_i45 = class i { static define(e) { - var t = e.props && e.props.length ? Object.create(null) : MA, - i = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), - n = new r(e.name || "", t, e.id, i); + var t = e.props && e.props.length ? Object.create(null) : uw, + r = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), + n = new i(e.name || "", t, e.id, r); if (e.props) { var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -18532,11 +17906,11 @@ function _ts_generator(thisArg, body) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - for (var i in e) + for (var r in e) try { - for (var _iterator = i.split(" ")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = r.split(" ")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; - t[n] = e[i]; + t[n] = e[r]; } } catch (err) { _didIteratorError = true; @@ -18552,23 +17926,25 @@ function _ts_generator(thisArg, body) { } } } - return (i) => { - for (var n = i.prop(ue.group), s = -1; s < (n ? n.length : 0); s++) { - var o = t[s < 0 ? i.name : n[s]]; + return (r) => { + for (var n = r.prop(ue.group), s = -1; s < (n ? n.length : 0); s++) { + var o = t[s < 0 ? r.name : n[s]]; if (o) return o; } }; } - constructor(e, t, i, ref) { + constructor(e, t, r, ref) { var n = ref === void 0 ? 0 : ref; - (this.name = e), (this.props = t), (this.id = i), (this.flags = n); + (this.name = e), (this.props = t), (this.id = r), (this.flags = n); } }), - h(_r46, "NodeType"), - _r46); - Ie.none = new Ie("", Object.create(null), 0, 8); - var xn = - ((_r47 = class r { + (() => { + a(_i45, "NodeType"); + })(), + _i45); + Ve.none = new Ve("", Object.create(null), 0, 8); + var pn = + ((_i46 = class i { extend() { for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) { e[_key] = arguments[_key]; @@ -18579,7 +17955,7 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.types[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; + var r = _step.value; var n = null; var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, @@ -18587,8 +17963,8 @@ function _ts_generator(thisArg, body) { try { for (var _iterator1 = e[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { var s = _step1.value; - var o = s(i); - o && (n || (n = Object.assign({}, i.props)), (n[o[0].id] = o[1])); + var o = s(r); + o && (n || (n = Object.assign({}, r.props)), (n[o[0].id] = o[1])); } } catch (err) { _didIteratorError1 = true; @@ -18604,7 +17980,7 @@ function _ts_generator(thisArg, body) { } } } - t.push(n ? new Ie(i.name, n, i.id, i.flags) : i); + t.push(n ? new Ve(r.name, n, r.id, r.flags) : r); } } catch (err) { _didIteratorError = true; @@ -18620,25 +17996,27 @@ function _ts_generator(thisArg, body) { } } } - return new r(t); + return new i(t); } constructor(e) { this.types = e; for (var t = 0; t < e.length; t++) if (e[t].id != t) throw new RangeError("Node type ids should correspond to array positions when creating a node set"); } }), - h(_r47, "NodeSet"), - _r47), - xo = new WeakMap(), - eF = new WeakMap(), - Ue; - (function (r) { - (r[(r.ExcludeBuffers = 1)] = "ExcludeBuffers"), (r[(r.IncludeAnonymous = 2)] = "IncludeAnonymous"), (r[(r.IgnoreMounts = 4)] = "IgnoreMounts"), (r[(r.IgnoreOverlays = 8)] = "IgnoreOverlays"); - })(Ue || (Ue = {})); - var Qe = - ((_r48 = class r { + (() => { + a(_i46, "NodeSet"); + })(), + _i46), + bo = new WeakMap(), + MD = new WeakMap(), + Re; + (function (i) { + (i[(i.ExcludeBuffers = 1)] = "ExcludeBuffers"), (i[(i.IncludeAnonymous = 2)] = "IncludeAnonymous"), (i[(i.IgnoreMounts = 4)] = "IgnoreMounts"), (i[(i.IgnoreOverlays = 8)] = "IgnoreOverlays"); + })(Re || (Re = {})); + var Be = + ((_i47 = class i { toString() { - var e = yr.get(this); + var e = this.prop(ue.mounted); if (e && !e.overlay) return e.tree.toString(); var t = ""; var _iteratorNormalCompletion = true, @@ -18646,8 +18024,8 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - var n = i.toString(); + var r = _step.value; + var n = r.toString(); n && (t && (t += ","), (t += n)); } } catch (err) { @@ -18668,50 +18046,44 @@ function _ts_generator(thisArg, body) { } cursor() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; - return new Sn(this.topNode, e); + return new gr(this.topNode, e); } cursorAt(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; - var n = xo.get(this) || this.topNode, - s = new Sn(n); - return s.moveTo(e, t), xo.set(this, s._tree), s; + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + var n = bo.get(this) || this.topNode, + s = new gr(n); + return s.moveTo(e, t), bo.set(this, s._tree), s; } get topNode() { - return new Nt(this, 0, 0, null); + return new vi(this, 0, 0, null); } resolve(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - var i = An(xo.get(this) || this.topNode, e, t, !1); - return xo.set(this, i), i; + var r = mr(bo.get(this) || this.topNode, e, t, !1); + return bo.set(this, r), r; } resolveInner(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - var i = An(eF.get(this) || this.topNode, e, t, !0); - return eF.set(this, i), i; - } - resolveStack(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - return PA(this, e, t); + var r = mr(MD.get(this) || this.topNode, e, t, !0); + return MD.set(this, r), r; } iterate(e) { var t = e.enter, - i = e.leave, + r = e.leave, tmp = e.from, n = tmp === void 0 ? 0 : tmp, tmp1 = e.to, - s = tmp1 === void 0 ? this.length : tmp1, - o = e.mode || 0, - l = (o & Ue.IncludeAnonymous) > 0; - for (var u = this.cursor(o | Ue.IncludeAnonymous); ; ) { - var a = !1; - if (u.from <= s && u.to >= n && ((!l && u.type.isAnonymous) || t(u) !== !1)) { - if (u.firstChild()) continue; - a = !0; + s = tmp1 === void 0 ? this.length : tmp1; + for (var o = this.cursor((e.mode || 0) | Re.IncludeAnonymous); ; ) { + var u = !1; + if (o.from <= s && o.to >= n && (o.type.isAnonymous || t(o) !== !1)) { + if (o.firstChild()) continue; + u = !0; } - for (; a && i && (l || !u.type.isAnonymous) && i(u), !u.nextSibling(); ) { - if (!u.parent()) return; - a = !0; + for (; u && r && !o.type.isAnonymous && r(o), !o.nextSibling(); ) { + if (!o.parent()) return; + u = !0; } } } @@ -18725,13 +18097,13 @@ function _ts_generator(thisArg, body) { } balance() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - return this.children.length <= 8 ? this : Ka(Ie.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t, i, n) => new r(this.type, t, i, n, this.propValues), e.makeTree || ((t, i, n) => new r(Ie.none, t, i, n))); + return this.children.length <= 8 ? this : Wa(Ve.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t, r, n) => new i(this.type, t, r, n, this.propValues), e.makeTree || ((t, r, n) => new i(Ve.none, t, r, n))); } static build(e) { - return IA(e); + return lw(e); } - constructor(e, t, i, n, s) { - if (((this.type = e), (this.children = t), (this.positions = i), (this.length = n), (this.props = null), s && s.length)) { + constructor(e, t, r, n, s) { + if (((this.type = e), (this.children = t), (this.positions = r), (this.length = n), (this.props = null), s && s.length)) { this.props = Object.create(null); var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -18740,8 +18112,8 @@ function _ts_generator(thisArg, body) { for (var _iterator = s[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _step_value = _sliced_to_array(_step.value, 2), o = _step_value[0], - l = _step_value[1]; - this.props[typeof o == "number" ? o : o.id] = l; + u = _step_value[1]; + this.props[typeof o == "number" ? o : o.id] = u; } } catch (err) { _didIteratorError = true; @@ -18760,11 +18132,13 @@ function _ts_generator(thisArg, body) { } } }), - h(_r48, "Tree"), - _r48); - Qe.empty = new Qe(Ie.none, [], [], 0); - var Ha = - ((_r49 = class r { + (() => { + a(_i47, "Tree"); + })(), + _i47); + Be.empty = new Be(Ve.none, [], [], 0); + var Na = + ((_i48 = class i { get id() { return this.buffer[this.index - 4]; } @@ -18784,18 +18158,20 @@ function _ts_generator(thisArg, body) { this.index -= 4; } fork() { - return new r(this.buffer, this.index); + return new i(this.buffer, this.index); } constructor(e, t) { (this.buffer = e), (this.index = t); } }), - h(_r49, "FlatBufferCursor"), - _r49), - fi = - ((_r50 = class r { + (() => { + a(_i48, "FlatBufferCursor"); + })(), + _i48), + Ei = + ((_i49 = class i { get type() { - return Ie.none; + return Ve.none; } toString() { var e = []; @@ -18804,258 +18180,259 @@ function _ts_generator(thisArg, body) { } childString(e) { var t = this.buffer[e], - i = this.buffer[e + 3], + r = this.buffer[e + 3], n = this.set.types[t], s = n.name; - if ((/\W/.test(s) && !n.isError && (s = JSON.stringify(s)), (e += 4), i == e)) return s; + if ((/\W/.test(s) && !n.isError && (s = JSON.stringify(s)), (e += 4), r == e)) return s; var o = []; - for (; e < i; ) o.push(this.childString(e)), (e = this.buffer[e + 3]); + for (; e < r; ) o.push(this.childString(e)), (e = this.buffer[e + 3]); return s + "(" + o.join(",") + ")"; } - findChild(e, t, i, n, s) { + findChild(e, t, r, n, s) { var _this = this, o = _this.buffer, - l = -1; - for (var u = e; u != t && !(rF(s, n, o[u + 1], o[u + 2]) && ((l = u), i > 0)); u = o[u + 3]); - return l; + u = -1; + for (var l = e; l != t && !(PD(s, n, o[l + 1], o[l + 2]) && ((u = l), r > 0)); l = o[l + 3]); + return u; } - slice(e, t, i) { + slice(e, t, r) { var n = this.buffer, s = new Uint16Array(t - e), o = 0; - for (var l = e, u = 0; l < t; ) { - (s[u++] = n[l++]), (s[u++] = n[l++] - i); - var a = (s[u++] = n[l++] - i); - (s[u++] = n[l++] - e), (o = Math.max(o, a)); + for (var u = e, l = 0; u < t; ) { + (s[l++] = n[u++]), (s[l++] = n[u++] - r); + var h = (s[l++] = n[u++] - r); + (s[l++] = n[u++] - e), (o = Math.max(o, h)); } - return new r(s, o, this.set); + return new i(s, o, this.set); } - constructor(e, t, i) { - (this.buffer = e), (this.length = t), (this.set = i); + constructor(e, t, r) { + (this.buffer = e), (this.length = t), (this.set = r); } }), - h(_r50, "TreeBuffer"), - _r50); - function rF(r, e, t, i) { - switch (r) { + (() => { + a(_i49, "TreeBuffer"); + })(), + _i49); + function PD(i, e, t, r) { + switch (i) { case -2: return t < e; case -1: - return i >= e && t < e; + return r >= e && t < e; case 0: - return t < e && i > e; + return t < e && r > e; case 1: - return t <= e && i > e; + return t <= e && r > e; case 2: - return i > e; + return r > e; case 4: return !0; } } - h(rF, "checkSide"); - function An(r, e, t, i) { - for (var n; r.from == r.to || (t < 1 ? r.from >= e : r.from > e) || (t > -1 ? r.to <= e : r.to < e); ) { - var o = !i && r instanceof Nt && r.index < 0 ? null : r.parent; - if (!o) return r; - r = o; + a(PD, "checkSide"); + function LD(i, e) { + var t = i.childBefore(e); + for (; t; ) { + var r = t.lastChild; + if (!r || r.to != t.to) break; + r.type.isError && r.from == r.to ? ((i = t), (t = r.prevSibling)) : (t = r); } - var s = i ? 0 : Ue.IgnoreOverlays; - if (i) for (var o1 = r, l = o1.parent; l; o1 = l, l = o1.parent) o1 instanceof Nt && o1.index < 0 && ((n = l.enter(e, t, s)) === null || n === void 0 ? void 0 : n.from) != o1.from && (r = l); + return i; + } + a(LD, "enterUnfinishedNodesBefore"); + function mr(i, e, t, r) { + for (var n; i.from == i.to || (t < 1 ? i.from >= e : i.from > e) || (t > -1 ? i.to <= e : i.to < e); ) { + var o = !r && i instanceof vi && i.index < 0 ? null : i.parent; + if (!o) return i; + i = o; + } + var s = r ? 0 : Re.IgnoreOverlays; + if (r) for (var o1 = i, u = o1.parent; u; o1 = u, u = o1.parent) o1 instanceof vi && o1.index < 0 && ((n = u.enter(e, t, s)) === null || n === void 0 ? void 0 : n.from) != o1.from && (i = u); for (;;) { - var o2 = r.enter(e, t, s); - if (!o2) return r; - r = o2; + var o2 = i.enter(e, t, s); + if (!o2) return i; + i = o2; } } - h(An, "resolveNode"); - var ko = - ((_class72 = class _class { - cursor() { - var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; - return new Sn(this, e); - } - getChild(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; - var n = tF(this, e, t, i); - return n.length ? n[0] : null; - } - getChildren(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; - return tF(this, e, t, i); - } - resolve(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - return An(this, e, t, !1); - } - resolveInner(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - return An(this, e, t, !0); - } - matchContext(e) { - return ja(this, e); - } - enterUnfinishedNodesBefore(e) { - var t = this.childBefore(e), - i = this; - for (; t; ) { - var n = t.lastChild; - if (!n || n.to != t.to) break; - n.type.isError && n.from == n.to ? ((i = t), (t = n.prevSibling)) : (t = n); - } - return i; - } - get node() { - return this; - } - get next() { - return this.parent; - } - }), - h(_class72, "BaseNode"), - _class72), - Nt = - ((_r51 = class r extends ko { - get type() { - return this._tree.type; - } - get name() { - return this._tree.type.name; - } - get to() { - return this.from + this._tree.length; - } - nextChild(e, t, i, n) { - var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0; - for (var o = this; ; ) { - for (var _o__tree = o._tree, l = _o__tree.children, u = _o__tree.positions, a = t > 0 ? l.length : -1; e != a; e += t) { - var c = l[e], - f = u[e] + o.from; - if (rF(n, i, f, f + c.length)) { - if (c instanceof fi) { - if (s & Ue.ExcludeBuffers) continue; - var d = c.findChild(0, c.buffer.length, t, i - f, n); - if (d > -1) return new kn(new Ya(o, c, e, f), null, d); - } else if (s & Ue.IncludeAnonymous || !c.type.isAnonymous || Xa(c)) { - var d1 = void 0; - if (!(s & Ue.IgnoreMounts) && (d1 = yr.get(c)) && !d1.overlay) return new r(d1.tree, f, e, o); - var p = new r(c, f, e, o); - return s & Ue.IncludeAnonymous || !p.type.isAnonymous ? p : p.nextChild(t < 0 ? c.children.length - 1 : 0, t, i, n); - } + a(mr, "resolveNode"); + var vi = + ((_i50 = class i { + get type() { + return this._tree.type; + } + get name() { + return this._tree.type.name; + } + get to() { + return this.from + this._tree.length; + } + nextChild(e, t, r, n) { + var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0; + for (var o = this; ; ) { + for (var _o__tree = o._tree, u = _o__tree.children, l = _o__tree.positions, h = t > 0 ? u.length : -1; e != h; e += t) { + var c = u[e], + f = l[e] + o.from; + if (PD(n, r, f, f + c.length)) { + if (c instanceof Ei) { + if (s & Re.ExcludeBuffers) continue; + var d = c.findChild(0, c.buffer.length, t, r - f, n); + if (d > -1) return new mn(new Va(o, c, e, f), null, d); + } else if (s & Re.IncludeAnonymous || !c.type.isAnonymous || Ha(c)) { + var d1 = void 0; + if (!(s & Re.IgnoreMounts) && c.props && (d1 = c.prop(ue.mounted)) && !d1.overlay) return new i(d1.tree, f, e, o); + var p = new i(c, f, e, o); + return s & Re.IncludeAnonymous || !p.type.isAnonymous ? p : p.nextChild(t < 0 ? c.children.length - 1 : 0, t, r, n); } } - if (s & Ue.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? (e = o.index + t) : (e = t < 0 ? -1 : o._parent._tree.children.length), (o = o._parent), !o)) return null; } + if (s & Re.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? (e = o.index + t) : (e = t < 0 ? -1 : o._parent._tree.children.length), (o = o._parent), !o)) return null; } - get firstChild() { - return this.nextChild(0, 1, 0, 4); - } - get lastChild() { - return this.nextChild(this._tree.children.length - 1, -1, 0, 4); - } - childAfter(e) { - return this.nextChild(0, 1, e, 2); - } - childBefore(e) { - return this.nextChild(this._tree.children.length - 1, -1, e, -2); - } - enter(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; - var n; - if (!(i & Ue.IgnoreOverlays) && (n = yr.get(this._tree)) && n.overlay) { - var s = e - this.from; - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; + } + get firstChild() { + return this.nextChild(0, 1, 0, 4); + } + get lastChild() { + return this.nextChild(this._tree.children.length - 1, -1, 0, 4); + } + childAfter(e) { + return this.nextChild(0, 1, e, 2); + } + childBefore(e) { + return this.nextChild(this._tree.children.length - 1, -1, e, -2); + } + enter(e, t) { + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + var n; + if (!(r & Re.IgnoreOverlays) && (n = this._tree.prop(ue.mounted)) && n.overlay) { + var s = e - this.from; + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; + try { + for (var _iterator = n.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _step_value = _step.value, + o = _step_value.from, + u = _step_value.to; + if ((t > 0 ? o <= s : o < s) && (t < 0 ? u >= s : u > s)) return new i(n.tree, n.overlay[0].from + this.from, -1, this); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { try { - for (var _iterator = n.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _step_value = _step.value, - o = _step_value.from, - l = _step_value.to; - if ((t > 0 ? o <= s : o < s) && (t < 0 ? l >= s : l > s)) return new r(n.tree, n.overlay[0].from + this.from, -1, this); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } + if (_didIteratorError) { + throw _iteratorError; } } } - return this.nextChild(0, 1, e, t, i); - } - nextSignificantParent() { - var e = this; - for (; e.type.isAnonymous && e._parent; ) e = e._parent; - return e; - } - get parent() { - return this._parent ? this._parent.nextSignificantParent() : null; } - get nextSibling() { - return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4) : null; - } - get prevSibling() { - return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4) : null; - } - get tree() { - return this._tree; - } - toTree() { - return this._tree; - } - toString() { - return this._tree.toString(); - } - constructor(e, t, i, n) { - super(), (this._tree = e), (this.from = t), (this.index = i), (this._parent = n); - } - }), - h(_r51, "TreeNode"), - _r51); - function tF(r, e, t, i) { - var n = r.cursor(), + return this.nextChild(0, 1, e, t, r); + } + nextSignificantParent() { + var e = this; + for (; e.type.isAnonymous && e._parent; ) e = e._parent; + return e; + } + get parent() { + return this._parent ? this._parent.nextSignificantParent() : null; + } + get nextSibling() { + return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4) : null; + } + get prevSibling() { + return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4) : null; + } + cursor() { + var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return new gr(this, e); + } + get tree() { + return this._tree; + } + toTree() { + return this._tree; + } + resolve(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + return mr(this, e, t, !1); + } + resolveInner(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + return mr(this, e, t, !0); + } + enterUnfinishedNodesBefore(e) { + return LD(this, e); + } + getChild(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; + var n = yo(this, e, t, r); + return n.length ? n[0] : null; + } + getChildren(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; + return yo(this, e, t, r); + } + toString() { + return this._tree.toString(); + } + get node() { + return this; + } + matchContext(e) { + return Co(this, e); + } + constructor(e, t, r, n) { + (this._tree = e), (this.from = t), (this.index = r), (this._parent = n); + } + }), + (() => { + a(_i50, "TreeNode"); + })(), + _i50); + function yo(i, e, t, r) { + var n = i.cursor(), s = []; if (!n.firstChild()) return s; if (t != null) { - for (var o = !1; !o; ) if (((o = n.type.is(t)), !n.nextSibling())) return s; + for (; !n.type.is(t); ) if (!n.nextSibling()) return s; } for (;;) { - if (i != null && n.type.is(i)) return s; - if ((n.type.is(e) && s.push(n.node), !n.nextSibling())) return i == null ? s : []; + if (r != null && n.type.is(r)) return s; + if ((n.type.is(e) && s.push(n.node), !n.nextSibling())) return r == null ? s : []; } } - h(tF, "getChildren"); - function ja(r, e) { + a(yo, "getChildren"); + function Co(i, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length - 1; - for (var i = r.parent; t >= 0; i = i.parent) { - if (!i) return !1; - if (!i.type.isAnonymous) { - if (e[t] && e[t] != i.name) return !1; + for (var r = i.parent; t >= 0; r = r.parent) { + if (!r) return !1; + if (!r.type.isAnonymous) { + if (e[t] && e[t] != r.name) return !1; t--; } } return !0; } - h(ja, "matchNodeContext"); - var Ya = + a(Co, "matchNodeContext"); + var Va = ((_class73 = class _class { - constructor(e, t, i, n) { - (this.parent = e), (this.buffer = t), (this.index = i), (this.start = n); + constructor(e, t, r, n) { + (this.parent = e), (this.buffer = t), (this.index = r), (this.start = n); } }), - h(_class73, "BufferContext"), + (() => { + a(_class73, "BufferContext"); + })(), _class73), - kn = - ((_r52 = class r extends ko { + mn = + ((_i51 = class i { get name() { return this.type.name; } @@ -19065,11 +18442,11 @@ function _ts_generator(thisArg, body) { get to() { return this.context.start + this.context.buffer.buffer[this.index + 2]; } - child(e, t, i) { + child(e, t, r) { var _this_context = this.context, n = _this_context.buffer, - s = n.findChild(this.index + 4, n.buffer[this.index + 3], e, t - this.context.start, i); - return s < 0 ? null : new r(this.context, this, s); + s = n.findChild(this.index + 4, n.buffer[this.index + 3], e, t - this.context.start, r); + return s < 0 ? null : new i(this.context, this, s); } get firstChild() { return this.child(1, 0, 4); @@ -19084,12 +18461,12 @@ function _ts_generator(thisArg, body) { return this.child(-1, e, -2); } enter(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; - if (i & Ue.ExcludeBuffers) return null; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + if (r & Re.ExcludeBuffers) return null; var _this_context = this.context, n = _this_context.buffer, s = n.findChild(this.index + 4, n.buffer[this.index + 3], t > 0 ? 1 : -1, e - this.context.start, t); - return s < 0 ? null : new r(this.context, this, s); + return s < 0 ? null : new i(this.context, this, s); } get parent() { return this._parent || this.context.parent.nextSignificantParent(); @@ -19101,13 +18478,17 @@ function _ts_generator(thisArg, body) { var _this_context = this.context, e = _this_context.buffer, t = e.buffer[this.index + 3]; - return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new r(this.context, this._parent, t) : this.externalSibling(1); + return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new i(this.context, this._parent, t) : this.externalSibling(1); } get prevSibling() { var _this_context = this.context, e = _this_context.buffer, t = this._parent ? this._parent.index + 4 : 0; - return this.index == t ? this.externalSibling(-1) : new r(this.context, this._parent, e.findChild(t, this.index, -1, 0, 4)); + return this.index == t ? this.externalSibling(-1) : new i(this.context, this._parent, e.findChild(t, this.index, -1, 0, 4)); + } + cursor() { + var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return new gr(this, e); } get tree() { return null; @@ -19116,420 +18497,388 @@ function _ts_generator(thisArg, body) { var e = [], t = [], _this_context = this.context, - i = _this_context.buffer, + r = _this_context.buffer, n = this.index + 4, - s = i.buffer[this.index + 3]; + s = r.buffer[this.index + 3]; if (s > n) { - var o = i.buffer[this.index + 1]; - e.push(i.slice(n, s, o)), t.push(0); + var o = r.buffer[this.index + 1]; + e.push(r.slice(n, s, o)), t.push(0); } - return new Qe(this.type, e, t, this.to - this.from); + return new Be(this.type, e, t, this.to - this.from); + } + resolve(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + return mr(this, e, t, !1); + } + resolveInner(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + return mr(this, e, t, !0); + } + enterUnfinishedNodesBefore(e) { + return LD(this, e); } toString() { return this.context.buffer.childString(this.index); } - constructor(e, t, i) { - super(), (this.context = e), (this._parent = t), (this.index = i), (this.type = e.buffer.set.types[e.buffer.buffer[i]]); + getChild(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; + var n = yo(this, e, t, r); + return n.length ? n[0] : null; + } + getChildren(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; + return yo(this, e, t, r); + } + get node() { + return this; + } + matchContext(e) { + return Co(this, e); + } + constructor(e, t, r) { + (this.context = e), (this._parent = t), (this.index = r), (this.type = e.buffer.set.types[e.buffer.buffer[r]]); } }), - h(_r52, "BufferNode"), - _r52); - function nF(r) { - if (!r.length) return null; - var e = 0, - t = r[0]; - for (var s = 1; s < r.length; s++) { - var o = r[s]; - (o.from > t.from || o.to < t.to) && ((t = o), (e = s)); - } - var i = t instanceof Nt && t.index < 0 ? null : t.parent, - n = r.slice(); - return i ? (n[e] = i) : n.splice(e, 1), new Ja(n, t); - } - h(nF, "iterStack"); - var Ja = - ((_class74 = class _class { - get next() { - return nF(this.heads); - } - constructor(e, t) { - (this.heads = e), (this.node = t); - } - }), - h(_class74, "StackIterator"), - _class74); - function PA(r, e, t) { - var i = r.resolveInner(e, t), - n = null; - for (var s = i instanceof Nt ? i : i.context.parent; s; s = s.parent) - if (s.index < 0) { - var o = s.parent; - (n || (n = [i])).push(o.resolve(e, t)), (s = o); - } else { - var o1 = yr.get(s.tree); - if (o1 && o1.overlay && o1.overlay[0].from <= e && o1.overlay[o1.overlay.length - 1].to >= e) { - var l = new Nt(o1.tree, o1.overlay[0].from + s.from, -1, s); - (n || (n = [i])).push(An(l, e, t, !1)); + (() => { + a(_i51, "BufferNode"); + })(), + _i51), + gr = + ((_class74 = class _class { + get name() { + return this.type.name; } - } - return n ? nF(n) : i; - } - h(PA, "stackIterator"); - var Sn = - ((_class75 = class _class { - get name() { - return this.type.name; - } - yieldNode(e) { - return e ? ((this._tree = e), (this.type = e.type), (this.from = e.from), (this.to = e.to), !0) : !1; - } - yieldBuf(e, t) { - this.index = e; - var _this_buffer = this.buffer, - i = _this_buffer.start, - n = _this_buffer.buffer; - return (this.type = t || n.set.types[n.buffer[e]]), (this.from = i + n.buffer[e + 1]), (this.to = i + n.buffer[e + 2]), !0; - } - yield(e) { - return e ? (e instanceof Nt ? ((this.buffer = null), this.yieldNode(e)) : ((this.buffer = e.context), this.yieldBuf(e.index, e.type))) : !1; - } - toString() { - return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString(); - } - enterChild(e, t, i) { - if (!this.buffer) return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, t, i, this.mode)); - var _this_buffer = this.buffer, - n = _this_buffer.buffer, - s = n.findChild(this.index + 4, n.buffer[this.index + 3], e, t - this.buffer.start, i); - return s < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(s)); - } - firstChild() { - return this.enterChild(1, 0, 4); - } - lastChild() { - return this.enterChild(-1, 0, 4); - } - childAfter(e) { - return this.enterChild(1, e, 2); - } - childBefore(e) { - return this.enterChild(-1, e, -2); - } - enter(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.mode; - return this.buffer ? (i & Ue.ExcludeBuffers ? !1 : this.enterChild(1, e, t)) : this.yield(this._tree.enter(e, t, i)); - } - parent() { - if (!this.buffer) return this.yieldNode(this.mode & Ue.IncludeAnonymous ? this._tree._parent : this._tree.parent); - if (this.stack.length) return this.yieldBuf(this.stack.pop()); - var e = this.mode & Ue.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); - return (this.buffer = null), this.yieldNode(e); - } - sibling(e) { - if (!this.buffer) return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1; - var _this_buffer = this.buffer, - t = _this_buffer.buffer, - i = this.stack.length - 1; - if (e < 0) { - var n = i < 0 ? 0 : this.stack[i] + 4; - if (this.index != n) return this.yieldBuf(t.findChild(n, this.index, -1, 0, 4)); - } else { - var n1 = t.buffer[this.index + 3]; - if (n1 < (i < 0 ? t.buffer.length : t.buffer[this.stack[i] + 3])) return this.yieldBuf(n1); + yieldNode(e) { + return e ? ((this._tree = e), (this.type = e.type), (this.from = e.from), (this.to = e.to), !0) : !1; } - return i < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1; - } - nextSibling() { - return this.sibling(1); - } - prevSibling() { - return this.sibling(-1); - } - atLastNode(e) { - var t, - i, - _this = this, - n = _this.buffer; - var ref; - if (n) { - if (e > 0) { - if (this.index < n.buffer.buffer.length) return !1; - } else for (var s = 0; s < this.index; s++) if (n.buffer.buffer[s + 3] < this.index) return !1; - var ref1; - (ref1 = n), (t = ref1.index), (i = ref1.parent), ref1; - } else (ref = this._tree), (t = ref.index), (i = ref._parent), ref; - var ref2; - for (; i; ref2 = i, t = ref2.index, i = ref2._parent, ref2) - if (t > -1) - for (var s1 = t + e, o = e < 0 ? -1 : i._tree.children.length; s1 != o; s1 += e) { - var l = i._tree.children[s1]; - if (this.mode & Ue.IncludeAnonymous || l instanceof fi || !l.type.isAnonymous || Xa(l)) return !1; + yieldBuf(e, t) { + this.index = e; + var _this_buffer = this.buffer, + r = _this_buffer.start, + n = _this_buffer.buffer; + return (this.type = t || n.set.types[n.buffer[e]]), (this.from = r + n.buffer[e + 1]), (this.to = r + n.buffer[e + 2]), !0; + } + yield(e) { + return e ? (e instanceof vi ? ((this.buffer = null), this.yieldNode(e)) : ((this.buffer = e.context), this.yieldBuf(e.index, e.type))) : !1; + } + toString() { + return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString(); + } + enterChild(e, t, r) { + if (!this.buffer) return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, t, r, this.mode)); + var _this_buffer = this.buffer, + n = _this_buffer.buffer, + s = n.findChild(this.index + 4, n.buffer[this.index + 3], e, t - this.buffer.start, r); + return s < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(s)); + } + firstChild() { + return this.enterChild(1, 0, 4); + } + lastChild() { + return this.enterChild(-1, 0, 4); + } + childAfter(e) { + return this.enterChild(1, e, 2); + } + childBefore(e) { + return this.enterChild(-1, e, -2); + } + enter(e, t) { + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.mode; + return this.buffer ? (r & Re.ExcludeBuffers ? !1 : this.enterChild(1, e, t)) : this.yield(this._tree.enter(e, t, r)); + } + parent() { + if (!this.buffer) return this.yieldNode(this.mode & Re.IncludeAnonymous ? this._tree._parent : this._tree.parent); + if (this.stack.length) return this.yieldBuf(this.stack.pop()); + var e = this.mode & Re.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); + return (this.buffer = null), this.yieldNode(e); + } + sibling(e) { + if (!this.buffer) return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1; + var _this_buffer = this.buffer, + t = _this_buffer.buffer, + r = this.stack.length - 1; + if (e < 0) { + var n = r < 0 ? 0 : this.stack[r] + 4; + if (this.index != n) return this.yieldBuf(t.findChild(n, this.index, -1, 0, 4)); + } else { + var n1 = t.buffer[this.index + 3]; + if (n1 < (r < 0 ? t.buffer.length : t.buffer[this.stack[r] + 3])) return this.yieldBuf(n1); + } + return r < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1; + } + nextSibling() { + return this.sibling(1); + } + prevSibling() { + return this.sibling(-1); + } + atLastNode(e) { + var t, + r, + _this = this, + n = _this.buffer; + var ref; + if (n) { + if (e > 0) { + if (this.index < n.buffer.buffer.length) return !1; + } else for (var s = 0; s < this.index; s++) if (n.buffer.buffer[s + 3] < this.index) return !1; + var ref1; + (ref1 = n), (t = ref1.index), (r = ref1.parent), ref1; + } else (ref = this._tree), (t = ref.index), (r = ref._parent), ref; + var ref2; + for (; r; ref2 = r, t = ref2.index, r = ref2._parent, ref2) + if (t > -1) + for (var s1 = t + e, o = e < 0 ? -1 : r._tree.children.length; s1 != o; s1 += e) { + var u = r._tree.children[s1]; + if (this.mode & Re.IncludeAnonymous || u instanceof Ei || !u.type.isAnonymous || Ha(u)) return !1; + } + return !0; + } + move(e, t) { + if (t && this.enterChild(e, 0, 4)) return !0; + for (;;) { + if (this.sibling(e)) return !0; + if (this.atLastNode(e) || !this.parent()) return !1; + } + } + next() { + var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; + return this.move(1, e); + } + prev() { + var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; + return this.move(-1, e); + } + moveTo(e) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + for (; (this.from == this.to || (t < 1 ? this.from >= e : this.from > e) || (t > -1 ? this.to <= e : this.to < e)) && this.parent(); ); + for (; this.enterChild(1, e, t); ); + return this; + } + get node() { + if (!this.buffer) return this._tree; + var e = this.bufferNode, + t = null, + r = 0; + if (e && e.context == this.buffer) + e: for (var n = this.index, s = this.stack.length; s >= 0; ) { + for (var o = e; o; o = o._parent) + if (o.index == n) { + if (n == this.index) return o; + (t = o), (r = s + 1); + break e; + } + n = this.stack[--s]; } - return !0; - } - move(e, t) { - if (t && this.enterChild(e, 0, 4)) return !0; - for (;;) { - if (this.sibling(e)) return !0; - if (this.atLastNode(e) || !this.parent()) return !1; + for (var n1 = r; n1 < this.stack.length; n1++) t = new mn(this.buffer, t, this.stack[n1]); + return (this.bufferNode = new mn(this.buffer, t, this.index)); } - } - next() { - var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; - return this.move(1, e); - } - prev() { - var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; - return this.move(-1, e); - } - moveTo(e) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - for (; (this.from == this.to || (t < 1 ? this.from >= e : this.from > e) || (t > -1 ? this.to <= e : this.to < e)) && this.parent(); ); - for (; this.enterChild(1, e, t); ); - return this; - } - get node() { - if (!this.buffer) return this._tree; - var e = this.bufferNode, - t = null, - i = 0; - if (e && e.context == this.buffer) - e: for (var n = this.index, s = this.stack.length; s >= 0; ) { - for (var o = e; o; o = o._parent) - if (o.index == n) { - if (n == this.index) return o; - (t = o), (i = s + 1); - break e; - } - n = this.stack[--s]; - } - for (var n1 = i; n1 < this.stack.length; n1++) t = new kn(this.buffer, t, this.stack[n1]); - return (this.bufferNode = new kn(this.buffer, t, this.index)); - } - get tree() { - return this.buffer ? null : this._tree._tree; - } - iterate(e, t) { - for (var i = 0; ; ) { - var n = !1; - if (this.type.isAnonymous || e(this) !== !1) { - if (this.firstChild()) { - i++; - continue; + get tree() { + return this.buffer ? null : this._tree._tree; + } + iterate(e, t) { + for (var r = 0; ; ) { + var n = !1; + if (this.type.isAnonymous || e(this) !== !1) { + if (this.firstChild()) { + r++; + continue; + } + this.type.isAnonymous || (n = !0); + } + for (; n && t && t(this), (n = this.type.isAnonymous), !this.nextSibling(); ) { + if (!r) return; + this.parent(), r--, (n = !0); } - this.type.isAnonymous || (n = !0); - } - for (; n && t && t(this), (n = this.type.isAnonymous), !this.nextSibling(); ) { - if (!i) return; - this.parent(), i--, (n = !0); } } - } - matchContext(e) { - if (!this.buffer) return ja(this.node, e); - var _this_buffer = this.buffer, - t = _this_buffer.buffer, - _t_set = t.set, - i = _t_set.types; - for (var n = e.length - 1, s = this.stack.length - 1; n >= 0; s--) { - if (s < 0) return ja(this.node, e, n); - var o = i[t.buffer[this.stack[s]]]; - if (!o.isAnonymous) { - if (e[n] && e[n] != o.name) return !1; - n--; + matchContext(e) { + if (!this.buffer) return Co(this.node, e); + var _this_buffer = this.buffer, + t = _this_buffer.buffer, + _t_set = t.set, + r = _t_set.types; + for (var n = e.length - 1, s = this.stack.length - 1; n >= 0; s--) { + if (s < 0) return Co(this.node, e, n); + var o = r[t.buffer[this.stack[s]]]; + if (!o.isAnonymous) { + if (e[n] && e[n] != o.name) return !1; + n--; + } } + return !0; } - return !0; - } - constructor(e, ref) { - var t = ref === void 0 ? 0 : ref; - if (((this.mode = t), (this.buffer = null), (this.stack = []), (this.index = 0), (this.bufferNode = null), e instanceof Nt)) this.yieldNode(e); - else { - (this._tree = e.context.parent), (this.buffer = e.context); - for (var i = e._parent; i; i = i._parent) this.stack.unshift(i.index); - (this.bufferNode = e), this.yieldBuf(e.index); + constructor(e, ref) { + var t = ref === void 0 ? 0 : ref; + if (((this.mode = t), (this.buffer = null), (this.stack = []), (this.index = 0), (this.bufferNode = null), e instanceof vi)) this.yieldNode(e); + else { + (this._tree = e.context.parent), (this.buffer = e.context); + for (var r = e._parent; r; r = r._parent) this.stack.unshift(r.index); + (this.bufferNode = e), this.yieldBuf(e.index); + } } - } - }), - h(_class75, "TreeCursor"), - _class75); - function Xa(r) { - return r.children.some((e) => e instanceof fi || !e.type.isAnonymous || Xa(e)); - } - h(Xa, "hasChild"); - function IA(r) { + }), + (() => { + a(_class74, "TreeCursor"); + })(), + _class74); + function Ha(i) { + return i.children.some((e) => e instanceof Ei || !e.type.isAnonymous || Ha(e)); + } + a(Ha, "hasChild"); + function lw(i) { var e; - var t = r.buffer, - i = r.nodeSet, - tmp = r.maxBufferLength, + var t = i.buffer, + r = i.nodeSet, + tmp = i.maxBufferLength, n = tmp === void 0 ? 1024 : tmp, - tmp1 = r.reused, + tmp1 = i.reused, s = tmp1 === void 0 ? [] : tmp1, - tmp2 = r.minRepeatType, - o = tmp2 === void 0 ? i.types.length : tmp2, - l = Array.isArray(t) ? new Ha(t, t.length) : t, - u = i.types, - a = 0, + tmp2 = i.minRepeatType, + o = tmp2 === void 0 ? r.types.length : tmp2, + u = Array.isArray(t) ? new Na(t, t.length) : t, + l = r.types, + h = 0, c = 0; - function f(C, L, Q, V, z, G) { - var T = l.id, - j = l.start, - te = l.end, - P = l.size, - _ = c; - for (; P < 0; ) - if ((l.next(), P == -1)) { - var ae = s[T]; - Q.push(ae), V.push(j - C); + function f(x, E, _, I, J) { + var z = u.id, + U = u.start, + N = u.end, + ne = u.size, + le = c; + for (; ne < 0; ) + if ((u.next(), ne == -1)) { + var De = s[z]; + _.push(De), I.push(U - x); return; - } else if (P == -3) { - a = T; + } else if (ne == -3) { + h = z; return; - } else if (P == -4) { - c = T; + } else if (ne == -4) { + c = z; return; - } else throw new RangeError("Unrecognized record size: ".concat(P)); - var ee = u[T], - he, - ve, - xe = j - C; - if (te - j <= n && (ve = g(l.pos - L, z))) { - var ae1 = new Uint16Array(ve.size - ve.skip), - be = l.pos - ve.size, - we = ae1.length; - for (; l.pos > be; ) we = D(ve.start, ae1, we); - (he = new fi(ae1, te - ve.start, i)), (xe = ve.start - C); + } else throw new RangeError("Unrecognized record size: ".concat(ne)); + var H = l[z], + T, + Z, + ge = U - x; + if (N - U <= n && (Z = b(u.pos - E, J))) { + var De1 = new Uint16Array(Z.size - Z.skip), + ce = u.pos - Z.size, + ae = De1.length; + for (; u.pos > ce; ) ae = g(Z.start, De1, ae); + (T = new Ei(De1, N - Z.start, r)), (ge = Z.start - x); } else { - var ae2 = l.pos - P; - l.next(); - var be1 = [], - we1 = [], - Ye = T >= o ? T : -1, - et = 0, - Ft = te; - for (; l.pos > ae2; ) Ye >= 0 && l.id == Ye && l.size >= 0 ? (l.end <= Ft - n && (m(be1, we1, j, et, l.end, Ft, Ye, _), (et = be1.length), (Ft = l.end)), l.next()) : G > 2500 ? d(j, ae2, be1, we1) : f(j, ae2, be1, we1, Ye, G + 1); - if ((Ye >= 0 && et > 0 && et < be1.length && m(be1, we1, j, et, j, Ft, Ye, _), be1.reverse(), we1.reverse(), Ye > -1 && et > 0)) { - var qt = p(ee); - he = Ka(ee, be1, we1, 0, be1.length, 0, te - j, qt, qt); - } else he = F(ee, be1, we1, te - j, _ - te); - } - Q.push(he), V.push(xe); - } - h(f, "takeNode"); - function d(C, L, Q, V) { - var z = [], - G = 0, - T = -1; - for (; l.pos > L; ) { - var j = l.id, - te = l.start, - P = l.end, - _ = l.size; - if (_ > 4) l.next(); - else { - if (T > -1 && te < T) break; - T < 0 && (T = P - n), z.push(j, te, P), G++, l.next(); - } - } - if (G) { - var j1 = new Uint16Array(G * 4), - te1 = z[z.length - 2]; - for (var P1 = z.length - 3, _1 = 0; P1 >= 0; P1 -= 3) (j1[_1++] = z[P1]), (j1[_1++] = z[P1 + 1] - te1), (j1[_1++] = z[P1 + 2] - te1), (j1[_1++] = _1); - Q.push(new fi(j1, z[2] - te1, i)), V.push(te1 - C); - } - } - h(d, "takeFlatNode"); - function p(C) { - return (L, Q, V) => { - var z = 0, - G = L.length - 1, - T, - j; - if (G >= 0 && (T = L[G]) instanceof Qe) { - if (!G && T.type == C && T.length == V) return T; - (j = T.prop(ue.lookAhead)) && (z = Q[G] + T.length + j); - } - return F(C, L, Q, V, z); + var De2 = u.pos - ne; + u.next(); + var ce1 = [], + ae1 = [], + _e = z >= o ? z : -1, + Me = 0, + pt = N; + for (; u.pos > De2; ) _e >= 0 && u.id == _e && u.size >= 0 ? (u.end <= pt - n && (p(ce1, ae1, U, Me, u.end, pt, _e, le), (Me = ce1.length), (pt = u.end)), u.next()) : f(U, De2, ce1, ae1, _e); + if ((_e >= 0 && Me > 0 && Me < ce1.length && p(ce1, ae1, U, Me, U, pt, _e, le), ce1.reverse(), ae1.reverse(), _e > -1 && Me > 0)) { + var $t = d(H); + T = Wa(H, ce1, ae1, 0, ce1.length, 0, N - U, $t, $t); + } else T = m(H, ce1, ae1, N - U, le - N); + } + _.push(T), I.push(ge); + } + a(f, "takeNode"); + function d(x) { + return (E, _, I) => { + var J = 0, + z = E.length - 1, + U, + N; + if (z >= 0 && (U = E[z]) instanceof Be) { + if (!z && U.type == x && U.length == I) return U; + (N = U.prop(ue.lookAhead)) && (J = _[z] + U.length + N); + } + return m(x, E, _, I, J); }; } - h(p, "makeBalanced"); - function m(C, L, Q, V, z, G, T, j) { - var te = [], - P = []; - for (; C.length > V; ) te.push(C.pop()), P.push(L.pop() + Q - z); - C.push(F(i.types[T], te, P, G - z, j - G)), L.push(z - Q); - } - h(m, "makeRepeatLeaf"); - function F(C, L, Q, V) { - var z = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, - G = arguments.length > 5 ? arguments[5] : void 0; - if (a) { - var T = [ue.contextHash, a]; - G = G ? [T].concat(G) : [T]; - } - if (z > 25) { - var T1 = [ue.lookAhead, z]; - G = G ? [T1].concat(G) : [T1]; - } - return new Qe(C, L, Q, V, G); - } - h(F, "makeTree"); - function g(C, L) { - var Q = l.fork(), - V = 0, + a(d, "makeBalanced"); + function p(x, E, _, I, J, z, U, N) { + var ne = [], + le = []; + for (; x.length > I; ) ne.push(x.pop()), le.push(E.pop() + _ - J); + x.push(m(r.types[U], ne, le, z - J, N - z)), E.push(J - _); + } + a(p, "makeRepeatLeaf"); + function m(x, E, _, I) { + var J = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, + z = arguments.length > 5 ? arguments[5] : void 0; + if (h) { + var U = [ue.contextHash, h]; + z = z ? [U].concat(z) : [U]; + } + if (J > 25) { + var U1 = [ue.lookAhead, J]; + z = z ? [U1].concat(z) : [U1]; + } + return new Be(x, E, _, I, z); + } + a(m, "makeTree"); + function b(x, E) { + var _ = u.fork(), + I = 0, + J = 0, z = 0, - G = 0, - T = Q.end - n, - j = { size: 0, start: 0, skip: 0 }; - e: for (var te = Q.pos - C; Q.pos > te; ) { - var P = Q.size; - if (Q.id == L && P >= 0) { - (j.size = V), (j.start = z), (j.skip = G), (G += 4), (V += 4), Q.next(); + U = _.end - n, + N = { size: 0, start: 0, skip: 0 }; + e: for (var ne = _.pos - x; _.pos > ne; ) { + var le = _.size; + if (_.id == E && le >= 0) { + (N.size = I), (N.start = J), (N.skip = z), (z += 4), (I += 4), _.next(); continue; } - var _ = Q.pos - P; - if (P < 0 || _ < te || Q.start < T) break; - var ee = Q.id >= o ? 4 : 0, - he = Q.start; - for (Q.next(); Q.pos > _; ) { - if (Q.size < 0) - if (Q.size == -3) ee += 4; + var H = _.pos - le; + if (le < 0 || H < ne || _.start < U) break; + var T = _.id >= o ? 4 : 0, + Z = _.start; + for (_.next(); _.pos > H; ) { + if (_.size < 0) + if (_.size == -3) T += 4; else break e; - else Q.id >= o && (ee += 4); - Q.next(); - } - (z = he), (V += P), (G += ee); - } - return (L < 0 || V == C) && ((j.size = V), (j.start = z), (j.skip = G)), j.size > 4 ? j : void 0; - } - h(g, "findBufferSize"); - function D(C, L, Q) { - var V = l.id, - z = l.start, - G = l.end, - T = l.size; - if ((l.next(), T >= 0 && V < o)) { - var j = Q; - if (T > 4) { - var te = l.pos - (T - 4); - for (; l.pos > te; ) Q = D(C, L, Q); - } - (L[--Q] = j), (L[--Q] = G - C), (L[--Q] = z - C), (L[--Q] = V); - } else T == -3 ? (a = V) : T == -4 && (c = V); - return Q; - } - h(D, "copyToBuffer"); - var b = [], - B = []; - for (; l.pos > 0; ) f(r.start || 0, r.bufferStart || 0, b, B, -1, 0); - var k = (e = r.length) !== null && e !== void 0 ? e : b.length ? B[0] + b[0].length : 0; - return new Qe(u[r.topID], b.reverse(), B.reverse(), k); - } - h(IA, "buildTree"); - var iF = new WeakMap(); - function Ao(r, e) { - if (!r.isAnonymous || e instanceof fi || e.type != r) return 1; - var t = iF.get(e); + else _.id >= o && (T += 4); + _.next(); + } + (J = Z), (I += le), (z += T); + } + return (E < 0 || I == x) && ((N.size = I), (N.start = J), (N.skip = z)), N.size > 4 ? N : void 0; + } + a(b, "findBufferSize"); + function g(x, E, _) { + var I = u.id, + J = u.start, + z = u.end, + U = u.size; + if ((u.next(), U >= 0 && I < o)) { + var N = _; + if (U > 4) { + var ne = u.pos - (U - 4); + for (; u.pos > ne; ) _ = g(x, E, _); + } + (E[--_] = N), (E[--_] = z - x), (E[--_] = J - x), (E[--_] = I); + } else U == -3 ? (h = I) : U == -4 && (c = I); + return _; + } + a(g, "copyToBuffer"); + var D = [], + F = []; + for (; u.pos > 0; ) f(i.start || 0, i.bufferStart || 0, D, F, -1); + var w = (e = i.length) !== null && e !== void 0 ? e : D.length ? F[0] + D[0].length : 0; + return new Be(l[i.topID], D.reverse(), F.reverse(), w); + } + a(lw, "buildTree"); + var $D = new WeakMap(); + function Fo(i, e) { + if (!i.isAnonymous || e instanceof Ei || e.type != i) return 1; + var t = $D.get(e); if (t == null) { t = 1; var _iteratorNormalCompletion = true, @@ -19537,12 +18886,12 @@ function _ts_generator(thisArg, body) { _iteratorError = undefined; try { for (var _iterator = e.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - if (i.type != r || !(i instanceof Qe)) { + var r = _step.value; + if (r.type != i || !(r instanceof Be)) { t = 1; break; } - t += Ao(r, i); + t += Fo(i, r); } } catch (err) { _didIteratorError = true; @@ -19558,46 +18907,46 @@ function _ts_generator(thisArg, body) { } } } - iF.set(e, t); + $D.set(e, t); } return t; } - h(Ao, "nodeSize"); - function Ka(r, e, t, i, n, s, o, l, u) { - var a = 0; - for (var m = i; m < n; m++) a += Ao(r, e[m]); - var c = Math.ceil((a * 1.5) / 8), + a(Fo, "nodeSize"); + function Wa(i, e, t, r, n, s, o, u, l) { + var h = 0; + for (var m = r; m < n; m++) h += Fo(i, e[m]); + var c = Math.ceil((h * 1.5) / 8), f = [], d = []; - function p(m, F, g, D, b) { - for (var B = g; B < D; ) { - var k = B, - C = F[B], - L = Ao(r, m[B]); - for (B++; B < D; B++) { - var Q = Ao(r, m[B]); - if (L + Q >= c) break; - L += Q; - } - if (B == k + 1) { - if (L > c) { - var Q1 = m[k]; - p(Q1.children, Q1.positions, 0, Q1.children.length, F[k] + b); + function p(m, b, g, D, F) { + for (var w = g; w < D; ) { + var x = w, + E = b[w], + _ = Fo(i, m[w]); + for (w++; w < D; w++) { + var I = Fo(i, m[w]); + if (_ + I >= c) break; + _ += I; + } + if (w == x + 1) { + if (_ > c) { + var I1 = m[x]; + p(I1.children, I1.positions, 0, I1.children.length, b[x] + F); continue; } - f.push(m[k]); + f.push(m[x]); } else { - var Q2 = F[B - 1] + m[B - 1].length - C; - f.push(Ka(r, m, F, k, B, C, Q2, null, u)); + var I2 = b[w - 1] + m[w - 1].length - E; + f.push(Wa(i, m, b, x, w, E, I2, null, l)); } - d.push(C + b - s); + d.push(E + F - s); } } - return h(p, "divide"), p(e, t, i, n, 0), (l || u)(f, d, o); + return a(p, "divide"), p(e, t, r, n, 0), (u || l)(f, d, o); } - h(Ka, "balanceRange"); - var Li = - ((_r53 = class r { + a(Wa, "balanceRange"); + var ki = + ((_i52 = class i { get openStart() { return (this.open & 1) > 0; } @@ -19606,8 +18955,8 @@ function _ts_generator(thisArg, body) { } static addTree(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], - i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; - var n = [new r(0, e.length, e, 0, !1, i)]; + r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + var n = [new i(0, e.length, e, 0, !1, r)]; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -19633,55 +18982,59 @@ function _ts_generator(thisArg, body) { return n; } static applyChanges(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 128; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 128; if (!t.length) return e; var n = [], s = 1, o = e.length ? e[0] : null; - for (var l = 0, u = 0, a = 0; ; l++) { - var c = l < t.length ? t[l] : null, + for (var u = 0, l = 0, h = 0; ; u++) { + var c = u < t.length ? t[u] : null, f = c ? c.fromA : 1e9; - if (f - u >= i) + if (f - l >= r) for (; o && o.from < f; ) { var d = o; - if (u >= d.from || f <= d.to || a) { - var p = Math.max(d.from, u) - a, - m = Math.min(d.to, f) - a; - d = p >= m ? null : new r(p, m, d.tree, d.offset + a, l > 0, !!c); + if (l >= d.from || f <= d.to || h) { + var p = Math.max(d.from, l) - h, + m = Math.min(d.to, f) - h; + d = p >= m ? null : new i(p, m, d.tree, d.offset + h, u > 0, !!c); } if ((d && n.push(d), o.to > f)) break; o = s < e.length ? e[s++] : null; } if (!c) break; - (u = c.toA), (a = c.toA - c.toB); + (l = c.toA), (h = c.toA - c.toB); } return n; } - constructor(e, t, i, n, ref, ref1) { + constructor(e, t, r, n, ref, ref1) { var s = ref === void 0 ? !1 : ref, o = ref1 === void 0 ? !1 : ref1; - (this.from = e), (this.to = t), (this.tree = i), (this.offset = n), (this.open = (s ? 1 : 0) | (o ? 2 : 0)); + (this.from = e), (this.to = t), (this.tree = r), (this.offset = n), (this.open = (s ? 1 : 0) | (o ? 2 : 0)); } }), - h(_r53, "TreeFragment"), - _r53), - Er = - ((_class76 = class _class { - startParse(e, t, i) { - return typeof e == "string" && (e = new Ga(e)), (i = i ? (i.length ? i.map((n) => new vn(n.from, n.to)) : [new vn(0, 0)]) : [new vn(0, e.length)]), this.createParse(e, t || [], i); - } - parse(e, t, i) { - var n = this.startParse(e, t, i); + (() => { + a(_i52, "TreeFragment"); + })(), + _i52), + Dr = + ((_class75 = class _class { + startParse(e, t, r) { + return typeof e == "string" && (e = new za(e)), (r = r ? (r.length ? r.map((n) => new dn(n.from, n.to)) : [new dn(0, 0)]) : [new dn(0, e.length)]), this.createParse(e, t || [], r); + } + parse(e, t, r) { + var n = this.startParse(e, t, r); for (;;) { var s = n.advance(); if (s) return s; } } }), - h(_class76, "Parser"), - _class76), - Ga = - ((_class77 = class _class { + (() => { + a(_class75, "Parser"); + })(), + _class75), + za = + ((_class76 = class _class { get length() { return this.string.length; } @@ -19698,23 +19051,26 @@ function _ts_generator(thisArg, body) { this.string = e; } }), - h(_class77, "StringInput"), - _class77); - var g8 = new ue({ perNode: !0 }); - var $A = 0, - $t = - ((_r54 = class r { + (() => { + a(_class76, "StringInput"); + })(), + _class76); + var _B = new ue({ perNode: !0 }); + var aw = 0, + Mt = + ((_i53 = class i { static define(e) { - if (e === null || e === void 0 ? void 0 : e.base) throw new Error("Can not derive from a modified tag"); - var t = new r([], null, []); + var _e; + if ((_e = e) === null || _e === void 0 ? void 0 : _e.base) throw new Error("Can not derive from a modified tag"); + var t = new i([], null, []); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; if ((t.set.push(t), e)) try { for (var _iterator = e.set[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - t.set.push(i); + var r = _step.value; + t.set.push(r); } } catch (err) { _didIteratorError = true; @@ -19733,37 +19089,39 @@ function _ts_generator(thisArg, body) { return t; } static defineModifier() { - var e = new _o(); + var e = new ko(); return (t) => t.modified.indexOf(e) > -1 ? t - : _o.get( + : ko.get( t.base || t, - t.modified.concat(e).sort((i, n) => i.id - n.id), + t.modified.concat(e).sort((r, n) => r.id - n.id) ); } - constructor(e, t, i) { - (this.set = e), (this.base = t), (this.modified = i), (this.id = $A++); + constructor(e, t, r) { + (this.set = e), (this.base = t), (this.modified = r), (this.id = aw++); } }), - h(_r54, "Tag"), - _r54), - qA = 0, - _o = - ((_r55 = class r { + (() => { + a(_i53, "Tag"); + })(), + _i53), + hw = 0, + ko = + ((_i54 = class i { static get(e, t) { if (!t.length) return e; - var i = t[0].instances.find((l) => l.base == e && VA(t, l.modified)); - if (i) return i; + var r = t[0].instances.find((u) => u.base == e && cw(t, u.modified)); + if (r) return r; var n = [], - s = new $t(n, e, t); + s = new Mt(n, e, t); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - l.instances.push(s); + var u = _step.value; + u.instances.push(s); } } catch (err) { _didIteratorError = true; @@ -19779,7 +19137,7 @@ function _ts_generator(thisArg, body) { } } } - var o = WA(t); + var o = fw(t); var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined, @@ -19788,12 +19146,12 @@ function _ts_generator(thisArg, body) { _iteratorError2 = undefined; try { for (var _iterator1 = e.set[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion2 = true) { - var l1 = _step1.value; - if (!l1.modified.length) + var u1 = _step1.value; + if (!u1.modified.length) try { for (var _iterator2 = o[Symbol.iterator](), _step2; !(_iteratorNormalCompletion1 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion1 = true) { - var u = _step2.value; - n.push(r.get(l1, u)); + var l = _step2.value; + n.push(i.get(u1, l)); } } catch (err) { _didIteratorError1 = true; @@ -19827,26 +19185,28 @@ function _ts_generator(thisArg, body) { return s; } constructor() { - (this.instances = []), (this.id = qA++); + (this.instances = []), (this.id = hw++); } }), - h(_r55, "Modifier"), - _r55); - function VA(r, e) { - return r.length == e.length && r.every((t, i) => t == e[i]); - } - h(VA, "sameArray"); - function WA(r) { + (() => { + a(_i54, "Modifier"); + })(), + _i54); + function cw(i, e) { + return i.length == e.length && i.every((t, r) => t == e[r]); + } + a(cw, "sameArray"); + function fw(i) { var e = [[]]; - for (var t = 0; t < r.length; t++) for (var i = 0, n = e.length; i < n; i++) e.push(e[i].concat(r[t])); - return e.sort((t, i) => i.length - t.length); + for (var t = 0; t < i.length; t++) for (var r = 0, n = e.length; r < n; r++) e.push(e[r].concat(i[t])); + return e.sort((t, r) => r.length - t.length); } - h(WA, "powerSet"); - function Uo(r) { + a(fw, "powerSet"); + function wo(i) { var e = Object.create(null); - for (var t in r) { - var i = r[t]; - Array.isArray(i) || (i = [i]); + for (var t in i) { + var r = i[t]; + Array.isArray(r) || (r = [r]); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -19856,13 +19216,13 @@ function _ts_generator(thisArg, body) { if (n) { var s = [], o = 2, - l = n; + u = n; for (var f = 0; ; ) { - if (l == "..." && f > 0 && f + 3 == n.length) { + if (u == "..." && f > 0 && f + 3 == n.length) { o = 1; break; } - var d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l); + var d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(u); if (!d) throw new RangeError("Invalid path: " + n); if ((s.push(d[0] == "*" ? "" : d[0][0] == '"' ? JSON.parse(d[0]) : d[0]), (f += d[0].length), f == n.length)) break; var p = n[f++]; @@ -19871,13 +19231,13 @@ function _ts_generator(thisArg, body) { break; } if (p != "/") throw new RangeError("Invalid path: " + n); - l = n.slice(f); + u = n.slice(f); } - var u = s.length - 1, - a = s[u]; - if (!a) throw new RangeError("Invalid path: " + n); - var c = new Cr(i, o, u > 0 ? s.slice(0, u) : null); - e[a] = c.sort(e[a]); + var l = s.length - 1, + h = s[l]; + if (!h) throw new RangeError("Invalid path: " + n); + var c = new br(r, o, l > 0 ? s.slice(0, l) : null); + e[h] = c.sort(e[h]); } } } catch (err) { @@ -19895,12 +19255,12 @@ function _ts_generator(thisArg, body) { } } } - return lF.add(e); + return ND.add(e); } - h(Uo, "styleTags"); - var lF = new ue(), - Cr = - ((_class78 = class _class { + a(wo, "styleTags"); + var ND = new ue(), + br = + ((_class77 = class _class { get opaque() { return this.mode == 0; } @@ -19913,14 +19273,16 @@ function _ts_generator(thisArg, body) { get depth() { return this.context ? this.context.length : 0; } - constructor(e, t, i, n) { - (this.tags = e), (this.mode = t), (this.context = i), (this.next = n); + constructor(e, t, r, n) { + (this.tags = e), (this.mode = t), (this.context = r), (this.next = n); } }), - h(_class78, "Rule"), - _class78); - Cr.empty = new Cr([], 2, null); - function ih(r, e) { + (() => { + a(_class77, "Rule"); + })(), + _class77); + br.empty = new br([], 2, null); + function Ya(i, e) { var t = Object.create(null); var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -19929,7 +19291,7 @@ function _ts_generator(thisArg, body) { _didIteratorError1 = false, _iteratorError1 = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { var s = _step.value; if (!Array.isArray(s.tag)) t[s.tag.id] = s.class; else @@ -19968,7 +19330,7 @@ function _ts_generator(thisArg, body) { } } var _ref = e || {}, - i = _ref.scope, + r = _ref.scope, tmp = _ref.all, n = tmp === void 0 ? null : tmp; return { @@ -19982,13 +19344,13 @@ function _ts_generator(thisArg, body) { _iteratorError1 = undefined; try { for (var _iterator = s[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true) { - var l = _step.value; + var u = _step.value; try { - for (var _iterator1 = l.set[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { - var u = _step1.value; - var a = t[u.id]; - if (a) { - o = o ? o + " " + a : a; + for (var _iterator1 = u.set[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true) { + var l = _step1.value; + var h = t[l.id]; + if (h) { + o = o ? o + " " + h : h; break; } } @@ -20023,19 +19385,19 @@ function _ts_generator(thisArg, body) { } return o; }, - scope: i, + scope: r, }; } - h(ih, "tagHighlighter"); - function zA(r, e) { + a(Ya, "tagHighlighter"); + function dw(i, e) { var t = null; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - var n = i.style(e); + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var r = _step.value; + var n = r.style(e); n && (t = t ? t + " " + n : n); } } catch (err) { @@ -20054,237 +19416,240 @@ function _ts_generator(thisArg, body) { } return t; } - h(zA, "highlightTags"); - function uF(r, e, t) { - var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, - n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : r.length; - var s = new eh(i, Array.isArray(e) ? e : [e], t); - s.highlightRange(r.cursor(), i, n, "", s.highlighters), s.flush(n); + a(dw, "highlightTags"); + function VD(i, e, t) { + var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, + n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : i.length; + var s = new Ua(r, Array.isArray(e) ? e : [e], t); + s.highlightRange(i.cursor(), r, n, "", s.highlighters), s.flush(n); } - h(uF, "highlightTree"); - var eh = - ((_class79 = class _class { + a(VD, "highlightTree"); + var Ua = + ((_class78 = class _class { startSpan(e, t) { t != this.class && (this.flush(e), e > this.at && (this.at = e), (this.class = t)); } flush(e) { e > this.at && this.class && this.span(this.at, e, this.class); } - highlightRange(e, t, i, n, s) { + highlightRange(e, t, r, n, s) { var o = e.type, - l = e.from, - u = e.to; - if (l >= i || u <= t) return; + u = e.from, + l = e.to; + if (u >= r || l <= t) return; o.isTop && (s = this.highlighters.filter((p) => !p.scope || p.scope(o))); - var a = n, - c = HA(e) || Cr.empty, - f = zA(s, c.tags); - if ((f && (a && (a += " "), (a += f), c.mode == 1 && (n += (n ? " " : "") + f)), this.startSpan(Math.max(t, l), a), c.opaque)) return; + var h = n, + c = pw(e) || br.empty, + f = dw(s, c.tags); + if ((f && (h && (h += " "), (h += f), c.mode == 1 && (n += (n ? " " : "") + f)), this.startSpan(Math.max(t, u), h), c.opaque)) return; var d = e.tree && e.tree.prop(ue.mounted); if (d && d.overlay) { - var p = e.node.enter(d.overlay[0].from + l, 1), + var p = e.node.enter(d.overlay[0].from + u, 1), m = this.highlighters.filter((g) => !g.scope || g.scope(d.tree.type)), - F = e.firstChild(); - for (var g = 0, D = l; ; g++) { - var b = g < d.overlay.length ? d.overlay[g] : null, - B = b ? b.from + l : u, - k = Math.max(t, D), - C = Math.min(i, B); - if (k < C && F) for (; e.from < C && (this.highlightRange(e, k, C, n, s), this.startSpan(Math.min(C, e.to), a), !(e.to >= B || !e.nextSibling())); ); - if (!b || B > i) break; - (D = b.to + l), D > t && (this.highlightRange(p.cursor(), Math.max(t, b.from + l), Math.min(i, D), "", m), this.startSpan(Math.min(i, D), a)); - } - F && e.parent(); + b = e.firstChild(); + for (var g = 0, D = u; ; g++) { + var F = g < d.overlay.length ? d.overlay[g] : null, + w = F ? F.from + u : l, + x = Math.max(t, D), + E = Math.min(r, w); + if (x < E && b) for (; e.from < E && (this.highlightRange(e, x, E, n, s), this.startSpan(Math.min(E, e.to), h), !(e.to >= w || !e.nextSibling())); ); + if (!F || w > r) break; + (D = F.to + u), D > t && (this.highlightRange(p.cursor(), Math.max(t, F.from + u), Math.min(r, D), "", m), this.startSpan(Math.min(r, D), h)); + } + b && e.parent(); } else if (e.firstChild()) { d && (n = ""); do if (!(e.to <= t)) { - if (e.from >= i) break; - this.highlightRange(e, t, i, n, s), this.startSpan(Math.min(i, e.to), a); + if (e.from >= r) break; + this.highlightRange(e, t, r, n, s), this.startSpan(Math.min(r, e.to), h); } while (e.nextSibling()); e.parent(); } } - constructor(e, t, i) { - (this.at = e), (this.highlighters = t), (this.span = i), (this.class = ""); + constructor(e, t, r) { + (this.at = e), (this.highlighters = t), (this.span = r), (this.class = ""); } }), - h(_class79, "HighlightBuilder"), - _class79); - function HA(r) { - var e = r.type.prop(lF); - for (; e && e.context && !r.matchContext(e.context); ) e = e.next; + (() => { + a(_class78, "HighlightBuilder"); + })(), + _class78); + function pw(i) { + var e = i.type.prop(ND); + for (; e && e.context && !i.matchContext(e.context); ) e = e.next; return e || null; } - h(HA, "getStyleTags"); - var I = $t.define, - So = I(), - di = I(), - sF = I(di), - oF = I(di), - pi = I(), - wo = I(pi), - Za = I(pi), - It = I(), - Oi = I(It), - Mt = I(), - Pt = I(), - th = I(), - wn = I(th), - Qo = I(), - U = { - comment: So, - lineComment: I(So), - blockComment: I(So), - docComment: I(So), - name: di, - variableName: I(di), - typeName: sF, - tagName: I(sF), - propertyName: oF, - attributeName: I(oF), - className: I(di), - labelName: I(di), - namespace: I(di), - macroName: I(di), - literal: pi, - string: wo, - docString: I(wo), - character: I(wo), - attributeValue: I(wo), - number: Za, - integer: I(Za), - float: I(Za), - bool: I(pi), - regexp: I(pi), - escape: I(pi), - color: I(pi), - url: I(pi), - keyword: Mt, - self: I(Mt), - null: I(Mt), - atom: I(Mt), - unit: I(Mt), - modifier: I(Mt), - operatorKeyword: I(Mt), - controlKeyword: I(Mt), - definitionKeyword: I(Mt), - moduleKeyword: I(Mt), - operator: Pt, - derefOperator: I(Pt), - arithmeticOperator: I(Pt), - logicOperator: I(Pt), - bitwiseOperator: I(Pt), - compareOperator: I(Pt), - updateOperator: I(Pt), - definitionOperator: I(Pt), - typeOperator: I(Pt), - controlOperator: I(Pt), - punctuation: th, - separator: I(th), - bracket: wn, - angleBracket: I(wn), - squareBracket: I(wn), - paren: I(wn), - brace: I(wn), - content: It, - heading: Oi, - heading1: I(Oi), - heading2: I(Oi), - heading3: I(Oi), - heading4: I(Oi), - heading5: I(Oi), - heading6: I(Oi), - contentSeparator: I(It), - list: I(It), - quote: I(It), - emphasis: I(It), - strong: I(It), - link: I(It), - monospace: I(It), - strikethrough: I(It), - inserted: I(), - deleted: I(), - changed: I(), - invalid: I(), - meta: Qo, - documentMeta: I(Qo), - annotation: I(Qo), - processingInstruction: I(Qo), - definition: $t.defineModifier(), - constant: $t.defineModifier(), - function: $t.defineModifier(), - standard: $t.defineModifier(), - local: $t.defineModifier(), - special: $t.defineModifier(), + a(pw, "getStyleTags"); + var L = Mt.define, + Ao = L(), + oi = L(), + qD = L(oi), + ID = L(oi), + ui = L(), + Eo = L(ui), + ja = L(ui), + Rt = L(), + wi = L(Rt), + Ot = L(), + Tt = L(), + Ga = L(), + gn = L(Ga), + vo = L(), + O = { + comment: Ao, + lineComment: L(Ao), + blockComment: L(Ao), + docComment: L(Ao), + name: oi, + variableName: L(oi), + typeName: qD, + tagName: L(qD), + propertyName: ID, + attributeName: L(ID), + className: L(oi), + labelName: L(oi), + namespace: L(oi), + macroName: L(oi), + literal: ui, + string: Eo, + docString: L(Eo), + character: L(Eo), + attributeValue: L(Eo), + number: ja, + integer: L(ja), + float: L(ja), + bool: L(ui), + regexp: L(ui), + escape: L(ui), + color: L(ui), + url: L(ui), + keyword: Ot, + self: L(Ot), + null: L(Ot), + atom: L(Ot), + unit: L(Ot), + modifier: L(Ot), + operatorKeyword: L(Ot), + controlKeyword: L(Ot), + definitionKeyword: L(Ot), + moduleKeyword: L(Ot), + operator: Tt, + derefOperator: L(Tt), + arithmeticOperator: L(Tt), + logicOperator: L(Tt), + bitwiseOperator: L(Tt), + compareOperator: L(Tt), + updateOperator: L(Tt), + definitionOperator: L(Tt), + typeOperator: L(Tt), + controlOperator: L(Tt), + punctuation: Ga, + separator: L(Ga), + bracket: gn, + angleBracket: L(gn), + squareBracket: L(gn), + paren: L(gn), + brace: L(gn), + content: Rt, + heading: wi, + heading1: L(wi), + heading2: L(wi), + heading3: L(wi), + heading4: L(wi), + heading5: L(wi), + heading6: L(wi), + contentSeparator: L(Rt), + list: L(Rt), + quote: L(Rt), + emphasis: L(Rt), + strong: L(Rt), + link: L(Rt), + monospace: L(Rt), + strikethrough: L(Rt), + inserted: L(), + deleted: L(), + changed: L(), + invalid: L(), + meta: vo, + documentMeta: L(vo), + annotation: L(vo), + processingInstruction: L(vo), + definition: Mt.defineModifier(), + constant: Mt.defineModifier(), + function: Mt.defineModifier(), + standard: Mt.defineModifier(), + local: Mt.defineModifier(), + special: Mt.defineModifier(), }, - y8 = ih([ - { tag: U.link, class: "tok-link" }, - { tag: U.heading, class: "tok-heading" }, - { tag: U.emphasis, class: "tok-emphasis" }, - { tag: U.strong, class: "tok-strong" }, - { tag: U.keyword, class: "tok-keyword" }, - { tag: U.atom, class: "tok-atom" }, - { tag: U.bool, class: "tok-bool" }, - { tag: U.url, class: "tok-url" }, - { tag: U.labelName, class: "tok-labelName" }, - { tag: U.inserted, class: "tok-inserted" }, - { tag: U.deleted, class: "tok-deleted" }, - { tag: U.literal, class: "tok-literal" }, - { tag: U.string, class: "tok-string" }, - { tag: U.number, class: "tok-number" }, - { tag: [U.regexp, U.escape, U.special(U.string)], class: "tok-string2" }, - { tag: U.variableName, class: "tok-variableName" }, - { tag: U.local(U.variableName), class: "tok-variableName tok-local" }, - { tag: U.definition(U.variableName), class: "tok-variableName tok-definition" }, - { tag: U.special(U.variableName), class: "tok-variableName2" }, - { tag: U.definition(U.propertyName), class: "tok-propertyName tok-definition" }, - { tag: U.typeName, class: "tok-typeName" }, - { tag: U.namespace, class: "tok-namespace" }, - { tag: U.className, class: "tok-className" }, - { tag: U.macroName, class: "tok-macroName" }, - { tag: U.propertyName, class: "tok-propertyName" }, - { tag: U.operator, class: "tok-operator" }, - { tag: U.comment, class: "tok-comment" }, - { tag: U.meta, class: "tok-meta" }, - { tag: U.invalid, class: "tok-invalid" }, - { tag: U.punctuation, class: "tok-punctuation" }, + MB = Ya([ + { tag: O.link, class: "tok-link" }, + { tag: O.heading, class: "tok-heading" }, + { tag: O.emphasis, class: "tok-emphasis" }, + { tag: O.strong, class: "tok-strong" }, + { tag: O.keyword, class: "tok-keyword" }, + { tag: O.atom, class: "tok-atom" }, + { tag: O.bool, class: "tok-bool" }, + { tag: O.url, class: "tok-url" }, + { tag: O.labelName, class: "tok-labelName" }, + { tag: O.inserted, class: "tok-inserted" }, + { tag: O.deleted, class: "tok-deleted" }, + { tag: O.literal, class: "tok-literal" }, + { tag: O.string, class: "tok-string" }, + { tag: O.number, class: "tok-number" }, + { tag: [O.regexp, O.escape, O.special(O.string)], class: "tok-string2" }, + { tag: O.variableName, class: "tok-variableName" }, + { tag: O.local(O.variableName), class: "tok-variableName tok-local" }, + { tag: O.definition(O.variableName), class: "tok-variableName tok-definition" }, + { tag: O.special(O.variableName), class: "tok-variableName2" }, + { tag: O.definition(O.propertyName), class: "tok-propertyName tok-definition" }, + { tag: O.typeName, class: "tok-typeName" }, + { tag: O.namespace, class: "tok-namespace" }, + { tag: O.className, class: "tok-className" }, + { tag: O.macroName, class: "tok-macroName" }, + { tag: O.propertyName, class: "tok-propertyName" }, + { tag: O.operator, class: "tok-operator" }, + { tag: O.comment, class: "tok-comment" }, + { tag: O.meta, class: "tok-meta" }, + { tag: O.invalid, class: "tok-invalid" }, + { tag: O.punctuation, class: "tok-punctuation" }, ]); - var rh, - Br = new ue(); - function YA(r) { - return H.define({ combine: r ? (e) => e.concat(r) : void 0 }); - } - h(YA, "defineLanguageFacet"); - var JA = new ue(), - ot = - ((_class80 = class _class { + var Ka, + Fr = new ue(); + function gw(i) { + return G.define({ combine: i ? (e) => e.concat(i) : void 0 }); + } + a(gw, "defineLanguageFacet"); + var Dw = new ue(), + tt = + ((_class79 = class _class { isActiveAt(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; - return aF(e, t, i).type.prop(Br) == this.data; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; + return zD(e, t, r).type.prop(Fr) == this.data; } findRegions(e) { - var t = e.facet(vr); - if ((t === null || t === void 0 ? void 0 : t.data) == this.data) return [{ from: 0, to: e.doc.length }]; + var _t; + var t = e.facet(yr); + if (((_t = t) === null || _t === void 0 ? void 0 : _t.data) == this.data) return [{ from: 0, to: e.doc.length }]; if (!t || !t.allowsNesting) return []; - var i = [], - n = h((s, o) => { - if (s.prop(Br) == this.data) { - i.push({ from: o, to: o + s.length }); + var r = [], + n = a((s, o) => { + if (s.prop(Fr) == this.data) { + r.push({ from: o, to: o + s.length }); return; } - var l = s.prop(ue.mounted); - if (l) { - if (l.tree.prop(Br) == this.data) { + var u = s.prop(ue.mounted); + if (u) { + if (u.tree.prop(Fr) == this.data) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if (l.overlay) + if (u.overlay) try { - for (var _iterator = l.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var u = _step.value; - i.push({ from: u.from + o, to: u.to + o }); + for (var _iterator = u.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var l = _step.value; + r.push({ from: l.from + o, to: l.to + o }); } } catch (err) { _didIteratorError = true; @@ -20300,45 +19665,45 @@ function _ts_generator(thisArg, body) { } } } - else i.push({ from: o, to: o + s.length }); + else r.push({ from: o, to: o + s.length }); return; - } else if (l.overlay) { - var u1 = i.length; - if ((n(l.tree, l.overlay[0].from + o), i.length > u1)) return; + } else if (u.overlay) { + var l1 = r.length; + if ((n(u.tree, u.overlay[0].from + o), r.length > l1)) return; } } - for (var u2 = 0; u2 < s.children.length; u2++) { - var a = s.children[u2]; - a instanceof Qe && n(a, s.positions[u2] + o); + for (var l2 = 0; l2 < s.children.length; l2++) { + var h = s.children[l2]; + h instanceof Be && n(h, s.positions[l2] + o); } }, "explore"); - return n(Ti(e), 0), i; + return n(xi(e), 0), r; } get allowsNesting() { return !0; } constructor(e, t, ref, ref1) { - var i = ref === void 0 ? [] : ref, + var r = ref === void 0 ? [] : ref, n = ref1 === void 0 ? "" : ref1; (this.data = e), (this.name = n), Ae.prototype.hasOwnProperty("tree") || Object.defineProperty(Ae.prototype, "tree", { get() { - return Ti(this); + return xi(this); }, }), (this.parser = t), (this.extension = [ - vr.of(this), - Ae.languageData.of((s, o, l) => { - var u = aF(s, o, l), - a = u.type.prop(Br); - if (!a) return []; - var c = s.facet(a), - f = u.type.prop(JA); + yr.of(this), + Ae.languageData.of((s, o, u) => { + var l = zD(s, o, u), + h = l.type.prop(Fr); + if (!h) return []; + var c = s.facet(h), + f = l.type.prop(Dw); if (f) { - var d = u.resolve(o - u.from, l); + var d = l.resolve(o - l.from, u); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -20367,44 +19732,48 @@ function _ts_generator(thisArg, body) { } return c; }), - ].concat(i)); + ].concat(r)); } }), - h(_class80, "Language"), - _class80); - ot.setState = de.define(); - function aF(r, e, t) { - var i = r.facet(vr), - n = Ti(r).topNode; - if (!i || i.allowsNesting) for (var s = n; s; s = s.enter(e, t, Ue.ExcludeBuffers)) s.type.isTop && (n = s); + (() => { + a(_class79, "Language"); + })(), + _class79); + tt.setState = pe.define(); + function zD(i, e, t) { + var r = i.facet(yr), + n = xi(i).topNode; + if (!r || r.allowsNesting) for (var s = n; s; s = s.enter(e, t, Re.ExcludeBuffers)) s.type.isTop && (n = s); return n; } - h(aF, "topNodeAt"); - var Lo = - ((_r56 = class r extends ot { + a(zD, "topNodeAt"); + var xo = + ((_i55 = class i extends tt { static define(e) { - var t = YA(e.languageData); - return new r(t, e.parser.configure({ props: [Br.add((i) => (i.isTop ? t : void 0))] }), e.name); + var t = gw(e.languageData); + return new i(t, e.parser.configure({ props: [Fr.add((r) => (r.isTop ? t : void 0))] }), e.name); } configure(e, t) { - return new r(this.data, this.parser.configure(e), t || this.name); + return new i(this.data, this.parser.configure(e), t || this.name); } get allowsNesting() { return this.parser.hasWrappers(); } - constructor(e, t, i) { - super(e, t, [], i), (this.parser = t); + constructor(e, t, r) { + super(e, t, [], r), (this.parser = t); } }), - h(_r56, "LRLanguage"), - _r56); - function Ti(r) { - var e = r.field(ot.state, !1); - return e ? e.tree : Qe.empty; - } - h(Ti, "syntaxTree"); - var lh = - ((_class81 = class _class { + (() => { + a(_i55, "LRLanguage"); + })(), + _i55); + function xi(i) { + var e = i.field(tt.state, !1); + return e ? e.tree : Be.empty; + } + a(xi, "syntaxTree"); + var Za = + ((_class80 = class _class { get length() { return this.doc.length; } @@ -20418,39 +19787,41 @@ function _ts_generator(thisArg, body) { return !0; } read(e, t) { - var i = this.cursorPos - this.string.length; - return e < i || t >= this.cursorPos ? this.doc.sliceString(e, t) : this.string.slice(e - i, t - i); + var r = this.cursorPos - this.string.length; + return e < r || t >= this.cursorPos ? this.doc.sliceString(e, t) : this.string.slice(e - r, t - r); } constructor(e) { (this.doc = e), (this.cursorPos = 0), (this.string = ""), (this.cursor = e.iter()); } }), - h(_class81, "DocInput"), - _class81), - Qn = null, - uh = - ((_r57 = class r { - static create(e, t, i) { - return new r(e, t, [], Qe.empty, 0, i, [], null); + (() => { + a(_class80, "DocInput"); + })(), + _class80), + Dn = null, + eh = + ((_i56 = class i { + static create(e, t, r) { + return new i(e, t, [], Be.empty, 0, r, [], null); } startParse() { - return this.parser.startParse(new lh(this.state.doc), this.fragments); + return this.parser.startParse(new Za(this.state.doc), this.fragments); } work(e, t) { return ( t != null && t >= this.state.doc.length && (t = void 0), - this.tree != Qe.empty && this.isDone(t !== null && t !== void 0 ? t : this.state.doc.length) + this.tree != Be.empty && this.isDone(t !== null && t !== void 0 ? t : this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => { - var i; + var r; if (typeof e == "number") { var n = Date.now() + e; - e = h(() => Date.now() > n, "until"); + e = a(() => Date.now() > n, "until"); } for (this.parse || (this.parse = this.startParse()), t != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > t) && t < this.state.doc.length && this.parse.stopAt(t); ; ) { var n1 = this.parse.advance(); if (n1) - if (((this.fragments = this.withoutTempSkipped(Li.addTree(n1, this.fragments, this.parse.stoppedAt != null))), (this.treeLen = (i = this.parse.stoppedAt) !== null && i !== void 0 ? i : this.state.doc.length), (this.tree = n1), (this.parse = null), this.treeLen < (t !== null && t !== void 0 ? t : this.state.doc.length))) this.parse = this.startParse(); + if (((this.fragments = this.withoutTempSkipped(ki.addTree(n1, this.fragments, this.parse.stoppedAt != null))), (this.treeLen = (r = this.parse.stoppedAt) !== null && r !== void 0 ? r : this.state.doc.length), (this.tree = n1), (this.parse = null), this.treeLen < (t !== null && t !== void 0 ? t : this.state.doc.length))) this.parse = this.startParse(); else return !0; if (e()) return !1; } @@ -20467,42 +19838,42 @@ function _ts_generator(thisArg, body) { }), (this.treeLen = e), (this.tree = t), - (this.fragments = this.withoutTempSkipped(Li.addTree(this.tree, this.fragments, !0))), + (this.fragments = this.withoutTempSkipped(ki.addTree(this.tree, this.fragments, !0))), (this.parse = null)); } withContext(e) { - var t = Qn; - Qn = this; + var t = Dn; + Dn = this; try { return e(); } finally { - Qn = t; + Dn = t; } } withoutTempSkipped(e) { - for (var t; (t = this.tempSkipped.pop()); ) e = hF(e, t.from, t.to); + for (var t; (t = this.tempSkipped.pop()); ) e = HD(e, t.from, t.to); return e; } changes(e, t) { var _this = this, - i = _this.fragments, + r = _this.fragments, n = _this.tree, s = _this.treeLen, o = _this.viewport, - l = _this.skipped; + u = _this.skipped; if ((this.takeTree(), !e.empty)) { - var u = []; - if ((e.iterChangedRanges((a, c, f, d) => u.push({ fromA: a, toA: c, fromB: f, toB: d })), (i = Li.applyChanges(i, u)), (n = Qe.empty), (s = 0), (o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }), this.skipped.length)) { - l = []; + var l = []; + if ((e.iterChangedRanges((h, c, f, d) => l.push({ fromA: h, toA: c, fromB: f, toB: d })), (r = ki.applyChanges(r, l)), (n = Be.empty), (s = 0), (o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }), this.skipped.length)) { + u = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.skipped[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var a = _step.value; - var c = e.mapPos(a.from, 1), - f = e.mapPos(a.to, -1); - c < f && l.push({ from: c, to: f }); + var h = _step.value; + var c = e.mapPos(h.from, 1), + f = e.mapPos(h.to, -1); + c < f && u.push({ from: c, to: f }); } } catch (err) { _didIteratorError = true; @@ -20520,17 +19891,17 @@ function _ts_generator(thisArg, body) { } } } - return new r(this.parser, t, i, n, s, o, l, this.scheduleOn); + return new i(this.parser, t, r, n, s, o, u, this.scheduleOn); } updateViewport(e) { if (this.viewport.from == e.from && this.viewport.to == e.to) return !1; this.viewport = e; var t = this.skipped.length; - for (var i = 0; i < this.skipped.length; i++) { - var _this_skipped_i = this.skipped[i], - n = _this_skipped_i.from, - s = _this_skipped_i.to; - n < e.to && s > e.from && ((this.fragments = hF(this.fragments, n, s)), this.skipped.splice(i--, 1)); + for (var r = 0; r < this.skipped.length; r++) { + var _this_skipped_r = this.skipped[r], + n = _this_skipped_r.from, + s = _this_skipped_r.to; + n < e.to && s > e.from && ((this.fragments = HD(this.fragments, n, s)), this.skipped.splice(r--, 1)); } return this.skipped.length >= t ? !1 : (this.reset(), !0); } @@ -20541,22 +19912,22 @@ function _ts_generator(thisArg, body) { this.skipped.push({ from: e, to: t }); } static getSkippingParser(e) { - return new (class extends Er { - createParse(t, i, n) { + return new (class extends Dr { + createParse(t, r, n) { var s = n[0].from, o = n[n.length - 1].to; return { parsedPos: s, advance() { - var u = Qn; - if (u) { + var l = Dn; + if (l) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = n[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var a = _step.value; - u.tempSkipped.push(a); + var h = _step.value; + l.tempSkipped.push(h); } } catch (err) { _didIteratorError = true; @@ -20572,9 +19943,9 @@ function _ts_generator(thisArg, body) { } } } - e && (u.scheduleOn = u.scheduleOn ? Promise.all([u.scheduleOn, e]) : e); + e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e); } - return (this.parsedPos = o), new Qe(Ie.none, [], [], o - s); + return (this.parsedPos = o), new Be(Ve.none, [], [], o - s); }, stoppedAt: null, stopAt() {}, @@ -20588,48 +19959,52 @@ function _ts_generator(thisArg, body) { return this.treeLen >= e && t.length && t[0].from == 0 && t[0].to >= e; } static get() { - return Qn; + return Dn; } - constructor(e, t, ref, n, s, o, l, u) { - var i = ref === void 0 ? [] : ref; - (this.parser = e), (this.state = t), (this.fragments = i), (this.tree = n), (this.treeLen = s), (this.viewport = o), (this.skipped = l), (this.scheduleOn = u), (this.parse = null), (this.tempSkipped = []); + constructor(e, t, ref, n, s, o, u, l) { + var r = ref === void 0 ? [] : ref; + (this.parser = e), (this.state = t), (this.fragments = r), (this.tree = n), (this.treeLen = s), (this.viewport = o), (this.skipped = u), (this.scheduleOn = l), (this.parse = null), (this.tempSkipped = []); } }), - h(_r57, "ParseContext"), - _r57); - function hF(r, e, t) { - return Li.applyChanges(r, [{ fromA: e, toA: t, fromB: e, toB: t }]); - } - h(hF, "cutFragments"); - var Un = - ((_r58 = class r { + (() => { + a(_i56, "ParseContext"); + })(), + _i56); + function HD(i, e, t) { + return ki.applyChanges(i, [{ fromA: e, toA: t, fromB: e, toB: t }]); + } + a(HD, "cutFragments"); + var Fn = + ((_i57 = class i { apply(e) { if (!e.docChanged && this.tree == this.context.tree) return this; var t = this.context.changes(e.changes, e.state), - i = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), t.viewport.to); - return t.work(20, i) || t.takeTree(), new r(t); + r = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), t.viewport.to); + return t.work(20, r) || t.takeTree(), new i(t); } static init(e) { var t = Math.min(3e3, e.doc.length), - i = uh.create(e.facet(vr).parser, e, { from: 0, to: t }); - return i.work(20, t) || i.takeTree(), new r(i); + r = eh.create(e.facet(yr).parser, e, { from: 0, to: t }); + return r.work(20, t) || r.takeTree(), new i(r); } constructor(e) { (this.context = e), (this.tree = e.tree); } }), - h(_r58, "LanguageState"), - _r58); - ot.state = Pe.define({ - create: Un.init, - update(r, e) { + (() => { + a(_i57, "LanguageState"); + })(), + _i57); + tt.state = Ie.define({ + create: Fn.init, + update(i, e) { var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = e.effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; - if (t.is(ot.setState)) return t.value; + if (t.is(tt.setState)) return t.value; } } catch (err) { _didIteratorError = true; @@ -20645,56 +20020,56 @@ function _ts_generator(thisArg, body) { } } } - return e.startState.facet(vr) != e.state.facet(vr) ? Un.init(e.state) : r.apply(e); + return e.startState.facet(yr) != e.state.facet(yr) ? Fn.init(e.state) : i.apply(e); }, }); - var pF = h((r) => { - var e = setTimeout(() => r(), 500); + var UD = a((i) => { + var e = setTimeout(() => i(), 500); return () => clearTimeout(e); }, "requestIdle"); typeof requestIdleCallback < "u" && - (pF = h((r) => { + (UD = a((i) => { var e = -1, t = setTimeout(() => { - e = requestIdleCallback(r, { timeout: 400 }); + e = requestIdleCallback(i, { timeout: 500 - 100 }); }, 100); return () => (e < 0 ? clearTimeout(t) : cancelIdleCallback(e)); }, "requestIdle")); - var nh = typeof navigator < "u" && !((rh = navigator.scheduling) === null || rh === void 0) && rh.isInputPending ? () => navigator.scheduling.isInputPending() : null, - GA = je.fromClass( - ((_class82 = class _class { + var Xa = typeof navigator < "u" && !((Ka = navigator.scheduling) === null || Ka === void 0) && Ka.isInputPending ? () => navigator.scheduling.isInputPending() : null, + bw = Ye.fromClass( + ((_class81 = class _class { update(e) { - var t = this.view.state.field(ot.state).context; - (t.updateViewport(e.view.viewport) || this.view.viewport.to > t.treeLen) && this.scheduleWork(), (e.docChanged || e.selectionSet) && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(t); + var t = this.view.state.field(tt.state).context; + (t.updateViewport(e.view.viewport) || this.view.viewport.to > t.treeLen) && this.scheduleWork(), e.docChanged && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(t); } scheduleWork() { if (this.working) return; var _this_view = this.view, e = _this_view.state, - t = e.field(ot.state); - (t.tree != t.context.tree || !t.context.isDone(e.doc.length)) && (this.working = pF(this.work)); + t = e.field(tt.state); + (t.tree != t.context.tree || !t.context.isDone(e.doc.length)) && (this.working = UD(this.work)); } work(e) { this.working = null; var t = Date.now(); if ((this.chunkEnd < t && (this.chunkEnd < 0 || this.view.hasFocus) && ((this.chunkEnd = t + 3e4), (this.chunkBudget = 3e3)), this.chunkBudget <= 0)) return; var _this_view = this.view, - i = _this_view.state, + r = _this_view.state, _this_view_viewport = _this_view.viewport, n = _this_view_viewport.to, - s = i.field(ot.state); + s = r.field(tt.state); if (s.tree == s.context.tree && s.context.isDone(n + 1e5)) return; - var o = Date.now() + Math.min(this.chunkBudget, 100, e && !nh ? Math.max(25, e.timeRemaining() - 5) : 1e9), - l = s.context.treeLen < n && i.doc.length > n + 1e3, - u = s.context.work(() => (nh && nh()) || Date.now() > o, n + (l ? 0 : 1e5)); - (this.chunkBudget -= Date.now() - t), (u || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: ot.setState.of(new Un(s.context)) })), this.chunkBudget > 0 && !(u && !l) && this.scheduleWork(), this.checkAsyncSchedule(s.context); + var o = Date.now() + Math.min(this.chunkBudget, 100, e && !Xa ? Math.max(25, e.timeRemaining() - 5) : 1e9), + u = s.context.treeLen < n && r.doc.length > n + 1e3, + l = s.context.work(() => (Xa && Xa()) || Date.now() > o, n + (u ? 0 : 1e5)); + (this.chunkBudget -= Date.now() - t), (l || this.chunkBudget <= 0) && (s.context.takeTree(), this.view.dispatch({ effects: tt.setState.of(new Fn(s.context)) })), this.chunkBudget > 0 && !(l && !u) && this.scheduleWork(), this.checkAsyncSchedule(s.context); } checkAsyncSchedule(e) { e.scheduleOn && (this.workScheduled++, e.scheduleOn .then(() => this.scheduleWork()) - .catch((t) => Xe(this.view.state, t)) + .catch((t) => ht(this.view.state, t)) .then(() => this.workScheduled--), (e.scheduleOn = null)); } @@ -20708,120 +20083,124 @@ function _ts_generator(thisArg, body) { (this.view = e), (this.working = null), (this.workScheduled = 0), (this.chunkEnd = -1), (this.chunkBudget = -1), (this.work = this.work.bind(this)), this.scheduleWork(); } }), - h(_class82, "ParseWorker"), - _class82), + (() => { + a(_class81, "ParseWorker"); + })(), + _class81), { eventHandlers: { focus() { this.scheduleWork(); }, }, - }, + } ), - vr = H.define({ - combine(r) { - return r.length ? r[0] : null; + yr = G.define({ + combine(i) { + return i.length ? i[0] : null; }, - enables: (r) => [ - ot.state, - GA, - ne.contentAttributes.compute([r], (e) => { - var t = e.facet(r); + enables: (i) => [ + tt.state, + bw, + re.contentAttributes.compute([i], (e) => { + var t = e.facet(i); return t && t.name ? { "data-language": t.name } : {}; }), ], }), - Oo = - ((_class83 = class _class { + So = + ((_class82 = class _class { constructor(e, ref) { var t = ref === void 0 ? [] : ref; (this.language = e), (this.support = t), (this.extension = [e, t]); } }), - h(_class83, "LanguageSupport"), - _class83); - var To = H.define({ - combine: (r) => { - if (!r.length) return " "; - var e = r[0]; - if (!e || /\S/.test(e) || Array.from(e).some((t) => t != e[0])) throw new Error("Invalid indent unit: " + JSON.stringify(r[0])); + (() => { + a(_class82, "LanguageSupport"); + })(), + _class82); + var Bo = G.define({ + combine: (i) => { + if (!i.length) return " "; + var e = i[0]; + if (!e || /\S/.test(e) || Array.from(e).some((t) => t != e[0])) throw new Error("Invalid indent unit: " + JSON.stringify(i[0])); return e; }, }); - function mF(r) { - var e = r.facet(To); - return e.charCodeAt(0) == 9 ? r.tabSize * e.length : e.length; + function GD(i) { + var e = i.facet(Bo); + return e.charCodeAt(0) == 9 ? i.tabSize * e.length : e.length; } - h(mF, "getIndentUnit"); - function gF(r, e) { + a(GD, "getIndentUnit"); + function YD(i, e) { var t = "", - i = r.tabSize, - n = r.facet(To)[0]; + r = i.tabSize, + n = i.facet(Bo)[0]; if (n == " ") { - for (; e >= i; ) (t += " "), (e -= i); + for (; e >= r; ) (t += " "), (e -= r); n = " "; } for (var s = 0; s < e; s++) t += n; return t; } - h(gF, "indentString"); - var xr = - ((_r59 = class r { + a(YD, "indentString"); + var Cr = + ((_i58 = class i { static define(e, t) { - return new r(e, t || {}); + return new i(e, t || {}); } constructor(e, t) { this.specs = e; - var i; - function n(l) { - var u = ft.newName(); - return ((i || (i = Object.create(null)))["." + u] = l), u; + var r; + function n(u) { + var l = ut.newName(); + return ((r || (r = Object.create(null)))["." + l] = u), l; } - h(n, "def"); + a(n, "def"); var s = typeof t.all == "string" ? t.all : t.all ? n(t.all) : void 0, o = t.scope; - (this.scope = o instanceof ot ? (l) => l.prop(Br) == o.data : o ? (l) => l == o : void 0), - (this.style = ih( - e.map((l) => ({ tag: l.tag, class: l.class || n(Object.assign({}, l, { tag: null })) })), - { all: s }, + (this.scope = o instanceof tt ? (u) => u.prop(Fr) == o.data : o ? (u) => u == o : void 0), + (this.style = Ya( + e.map((u) => ({ tag: u.tag, class: u.class || n(Object.assign({}, u, { tag: null })) })), + { all: s } ).style), - (this.module = i ? new ft(i) : null), + (this.module = r ? new ut(r) : null), (this.themeType = t.themeType); } }), - h(_r59, "HighlightStyle"), - _r59), - ah = H.define(), - DF = H.define({ - combine(r) { - return r.length ? [r[0]] : null; + (() => { + a(_i58, "HighlightStyle"); + })(), + _i58), + th = G.define(), + KD = G.define({ + combine(i) { + return i.length ? [i[0]] : null; }, }); - function sh(r) { - var e = r.facet(ah); - return e.length ? e : r.facet(DF); - } - h(sh, "getHighlighters"); - function FF(r, e) { - var t = [XA], - i; - return r instanceof xr && (r.module && t.push(ne.styleModule.of(r.module)), (i = r.themeType)), (e === null || e === void 0 ? void 0 : e.fallback) ? t.push(DF.of(r)) : i ? t.push(ah.computeN([ne.darkTheme], (n) => (n.facet(ne.darkTheme) == (i == "dark") ? [r] : []))) : t.push(ah.of(r)), t; - } - h(FF, "syntaxHighlighting"); - var hh = - ((_class84 = class _class { + function Qa(i) { + var e = i.facet(th); + return e.length ? e : i.facet(KD); + } + a(Qa, "getHighlighters"); + function XD(i, e) { + var _e; + var t = [Fw], + r; + return i instanceof Cr && (i.module && t.push(re.styleModule.of(i.module)), (r = i.themeType)), ((_e = e) === null || _e === void 0 ? void 0 : _e.fallback) ? t.push(KD.of(i)) : r ? t.push(th.computeN([re.darkTheme], (n) => (n.facet(re.darkTheme) == (r == "dark") ? [i] : []))) : t.push(th.of(i)), t; + } + a(XD, "syntaxHighlighting"); + var ih = + ((_class83 = class _class { update(e) { - var t = Ti(e.state), - i = sh(e.state), - n = i != sh(e.startState), - _e_view = e.view, - s = _e_view.viewport, - o = e.changes.mapPos(this.decoratedTo, 1); - t.length < s.to && !n && t.type == this.tree.type && o >= s.to ? ((this.decorations = this.decorations.map(e.changes)), (this.decoratedTo = o)) : (t != this.tree || e.viewportChanged || n) && ((this.tree = t), (this.decorations = this.buildDeco(e.view, i)), (this.decoratedTo = s.to)); + var t = xi(e.state), + r = Qa(e.state), + n = r != Qa(e.startState); + t.length < e.view.viewport.to && !n && t.type == this.tree.type ? (this.decorations = this.decorations.map(e.changes)) : (t != this.tree || e.viewportChanged || n) && ((this.tree = t), (this.decorations = this.buildDeco(e.view, r))); } buildDeco(e, t) { - if (!t || !this.tree.length) return pe.none; - var i = new wi(); + if (!t || !this.tree.length) return he.none; + var r = new Ai(); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -20830,14 +20209,14 @@ function _ts_generator(thisArg, body) { var _step_value = _step.value, n = _step_value.from, s = _step_value.to; - uF( + VD( this.tree, t, - (o, l, u) => { - i.add(o, l, this.markCache[u] || (this.markCache[u] = pe.mark({ class: u }))); + (o, u, l) => { + r.add(o, u, this.markCache[l] || (this.markCache[l] = he.mark({ class: l }))); }, n, - s, + s ); } } catch (err) { @@ -20854,60 +20233,62 @@ function _ts_generator(thisArg, body) { } } } - return i.finish(); + return r.finish(); } constructor(e) { - (this.markCache = Object.create(null)), (this.tree = Ti(e.state)), (this.decorations = this.buildDeco(e, sh(e.state))), (this.decoratedTo = e.viewport.to); + (this.markCache = Object.create(null)), (this.tree = xi(e.state)), (this.decorations = this.buildDeco(e, Qa(e.state))); } }), - h(_class84, "TreeHighlighter"), - _class84), - XA = fr.high(je.fromClass(hh, { decorations: (r) => r.decorations })), - w8 = xr.define([ - { tag: U.meta, color: "#404740" }, - { tag: U.link, textDecoration: "underline" }, - { tag: U.heading, textDecoration: "underline", fontWeight: "bold" }, - { tag: U.emphasis, fontStyle: "italic" }, - { tag: U.strong, fontWeight: "bold" }, - { tag: U.strikethrough, textDecoration: "line-through" }, - { tag: U.keyword, color: "#708" }, - { tag: [U.atom, U.bool, U.url, U.contentSeparator, U.labelName], color: "#219" }, - { tag: [U.literal, U.inserted], color: "#164" }, - { tag: [U.string, U.deleted], color: "#a11" }, - { tag: [U.regexp, U.escape, U.special(U.string)], color: "#e40" }, - { tag: U.definition(U.variableName), color: "#00f" }, - { tag: U.local(U.variableName), color: "#30a" }, - { tag: [U.typeName, U.namespace], color: "#085" }, - { tag: U.className, color: "#167" }, - { tag: [U.special(U.variableName), U.macroName], color: "#256" }, - { tag: U.definition(U.propertyName), color: "#00c" }, - { tag: U.comment, color: "#940" }, - { tag: U.invalid, color: "#f00" }, + (() => { + a(_class83, "TreeHighlighter"); + })(), + _class83), + Fw = nr.high(Ye.fromClass(ih, { decorations: (i) => i.decorations })), + HB = Cr.define([ + { tag: O.meta, color: "#404740" }, + { tag: O.link, textDecoration: "underline" }, + { tag: O.heading, textDecoration: "underline", fontWeight: "bold" }, + { tag: O.emphasis, fontStyle: "italic" }, + { tag: O.strong, fontWeight: "bold" }, + { tag: O.strikethrough, textDecoration: "line-through" }, + { tag: O.keyword, color: "#708" }, + { tag: [O.atom, O.bool, O.url, O.contentSeparator, O.labelName], color: "#219" }, + { tag: [O.literal, O.inserted], color: "#164" }, + { tag: [O.string, O.deleted], color: "#a11" }, + { tag: [O.regexp, O.escape, O.special(O.string)], color: "#e40" }, + { tag: O.definition(O.variableName), color: "#00f" }, + { tag: O.local(O.variableName), color: "#30a" }, + { tag: [O.typeName, O.namespace], color: "#085" }, + { tag: O.className, color: "#167" }, + { tag: [O.special(O.variableName), O.macroName], color: "#256" }, + { tag: O.definition(O.propertyName), color: "#00c" }, + { tag: O.comment, color: "#940" }, + { tag: O.invalid, color: "#f00" }, ]), - KA = ne.baseTheme({ "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" }, "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" } }), - bF = 1e4, - yF = "()[]{}", - EF = H.define({ - combine(r) { - return Xt(r, { afterCursor: !0, brackets: yF, maxScanDistance: bF, renderMatch: tk }); + yw = re.baseTheme({ "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" }, "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" } }), + QD = 1e4, + JD = "()[]{}", + ZD = G.define({ + combine(i) { + return Wt(i, { afterCursor: !0, brackets: JD, maxScanDistance: QD, renderMatch: Ew }); }, }), - ZA = pe.mark({ class: "cm-matchingBracket" }), - ek = pe.mark({ class: "cm-nonmatchingBracket" }); - function tk(r) { + Cw = he.mark({ class: "cm-matchingBracket" }), + Aw = he.mark({ class: "cm-nonmatchingBracket" }); + function Ew(i) { var e = [], - t = r.matched ? ZA : ek; - return e.push(t.range(r.start.from, r.start.to)), r.end && e.push(t.range(r.end.from, r.end.to)), e; + t = i.matched ? Cw : Aw; + return e.push(t.range(i.start.from, i.start.to)), i.end && e.push(t.range(i.end.from, i.end.to)), e; } - h(tk, "defaultRenderMatch"); - var ik = Pe.define({ + a(Ew, "defaultRenderMatch"); + var vw = Ie.define({ create() { - return pe.none; + return he.none; }, - update(r, e) { - if (!e.docChanged && !e.selection) return r; + update(i, e) { + if (!e.docChanged && !e.selection) return i; var t = [], - i = e.state.facet(EF); + r = e.state.facet(ZD); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -20915,8 +20296,8 @@ function _ts_generator(thisArg, body) { for (var _iterator = e.state.selection.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; if (!n.empty) continue; - var s = _n(e.state, n.head, -1, i) || (n.head > 0 && _n(e.state, n.head - 1, 1, i)) || (i.afterCursor && (_n(e.state, n.head, 1, i) || (n.head < e.state.doc.length && _n(e.state, n.head + 1, -1, i)))); - s && (t = t.concat(i.renderMatch(s, e.state))); + var s = bn(e.state, n.head, -1, r) || (n.head > 0 && bn(e.state, n.head - 1, 1, r)) || (r.afterCursor && (bn(e.state, n.head, 1, r) || (n.head < e.state.doc.length && bn(e.state, n.head + 1, -1, r)))); + s && (t = t.concat(r.renderMatch(s, e.state))); } } catch (err) { _didIteratorError = true; @@ -20932,104 +20313,104 @@ function _ts_generator(thisArg, body) { } } } - return pe.set(t, !0); + return he.set(t, !0); }, - provide: (r) => ne.decorations.from(r), + provide: (i) => re.decorations.from(i), }), - rk = [ik, KA]; - function CF() { - var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - return [EF.of(r), rk]; - } - h(CF, "bracketMatching"); - var nk = new ue(); - function ch(r, e, t) { - var i = r.prop(e < 0 ? ue.openedBy : ue.closedBy); - if (i) return i; - if (r.name.length == 1) { - var n = t.indexOf(r.name); + kw = [vw, yw]; + function e1() { + var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + return [ZD.of(i), kw]; + } + a(e1, "bracketMatching"); + var ww = new ue(); + function rh(i, e, t) { + var r = i.prop(e < 0 ? ue.openedBy : ue.closedBy); + if (r) return r; + if (i.name.length == 1) { + var n = t.indexOf(i.name); if (n > -1 && n % 2 == (e < 0 ? 1 : 0)) return [t[n + e]]; } return null; } - h(ch, "matchingNodes"); - function fh(r) { - var e = r.type.prop(nk); - return e ? e(r.node) : r; - } - h(fh, "findHandle"); - function _n(r, e, t) { - var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; - var n = i.maxScanDistance || bF, - s = i.brackets || yF, - o = Ti(r), - l = o.resolveInner(e, t); - for (var u = l; u; u = u.parent) { - var a = ch(u.type, t, s); - if (a && u.from < u.to) { - var c = fh(u); - if (c && (t > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to)) return sk(r, e, t, u, c, a, s); - } - } - return ok(r, e, t, o, l.type, n, s); - } - h(_n, "matchBrackets"); - function sk(r, e, t, i, n, s, o) { - var l = i.parent, - u = { from: n.from, to: n.to }, - a = 0, - c = l === null || l === void 0 ? void 0 : l.cursor(); - if (c && (t < 0 ? c.childBefore(i.from) : c.childAfter(i.to))) + a(rh, "matchingNodes"); + function nh(i) { + var e = i.type.prop(ww); + return e ? e(i.node) : i; + } + a(nh, "findHandle"); + function bn(i, e, t) { + var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; + var n = r.maxScanDistance || QD, + s = r.brackets || JD, + o = xi(i), + u = o.resolveInner(e, t); + for (var l = u; l; l = l.parent) { + var h = rh(l.type, t, s); + if (h && l.from < l.to) { + var c = nh(l); + if (c && (t > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to)) return xw(i, e, t, l, c, h, s); + } + } + return Sw(i, e, t, o, u.type, n, s); + } + a(bn, "matchBrackets"); + function xw(i, e, t, r, n, s, o) { + var _u_cursor, _this; + var u = r.parent, + l = { from: n.from, to: n.to }, + h = 0, + c = (_this = u) === null || _this === void 0 ? void 0 : (_u_cursor = _this.cursor) === null || _u_cursor === void 0 ? void 0 : _u_cursor.call(_this); + if (c && (t < 0 ? c.childBefore(r.from) : c.childAfter(r.to))) do - if (t < 0 ? c.to <= i.from : c.from >= i.to) { - if (a == 0 && s.indexOf(c.type.name) > -1 && c.from < c.to) { - var f = fh(c); - return { start: u, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 }; - } else if (ch(c.type, t, o)) a++; - else if (ch(c.type, -t, o)) { - if (a == 0) { - var f1 = fh(c); - return { start: u, end: f1 && f1.from < f1.to ? { from: f1.from, to: f1.to } : void 0, matched: !1 }; + if (t < 0 ? c.to <= r.from : c.from >= r.to) { + if (h == 0 && s.indexOf(c.type.name) > -1 && c.from < c.to) { + var f = nh(c); + return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 }; + } else if (rh(c.type, t, o)) h++; + else if (rh(c.type, -t, o)) { + if (h == 0) { + var f1 = nh(c); + return { start: l, end: f1 && f1.from < f1.to ? { from: f1.from, to: f1.to } : void 0, matched: !1 }; } - a--; + h--; } } while (t < 0 ? c.prevSibling() : c.nextSibling()); - return { start: u, matched: !1 }; - } - h(sk, "matchMarkedBrackets"); - function ok(r, e, t, i, n, s, o) { - var l = t < 0 ? r.sliceDoc(e - 1, e) : r.sliceDoc(e, e + 1), - u = o.indexOf(l); - if (u < 0 || (u % 2 == 0) != t > 0) return null; - var a = { from: t < 0 ? e - 1 : e, to: t > 0 ? e + 1 : e }, - c = r.doc.iterRange(e, t > 0 ? r.doc.length : 0), + return { start: l, matched: !1 }; + } + a(xw, "matchMarkedBrackets"); + function Sw(i, e, t, r, n, s, o) { + var u = t < 0 ? i.sliceDoc(e - 1, e) : i.sliceDoc(e, e + 1), + l = o.indexOf(u); + if (l < 0 || (l % 2 == 0) != t > 0) return null; + var h = { from: t < 0 ? e - 1 : e, to: t > 0 ? e + 1 : e }, + c = i.doc.iterRange(e, t > 0 ? i.doc.length : 0), f = 0; for (var d = 0; !c.next().done && d <= s; ) { var p = c.value; t < 0 && (d += p.length); var m = e + d * t; - for (var F = t > 0 ? 0 : p.length - 1, g = t > 0 ? p.length : -1; F != g; F += t) { - var D = o.indexOf(p[F]); - if (!(D < 0 || i.resolveInner(m + F, 1).type != n)) + for (var b = t > 0 ? 0 : p.length - 1, g = t > 0 ? p.length : -1; b != g; b += t) { + var D = o.indexOf(p[b]); + if (!(D < 0 || r.resolveInner(m + b, 1).type != n)) if ((D % 2 == 0) == t > 0) f++; else { - if (f == 1) return { start: a, end: { from: m + F, to: m + F + 1 }, matched: D >> 1 == u >> 1 }; + if (f == 1) return { start: h, end: { from: m + b, to: m + b + 1 }, matched: D >> 1 == l >> 1 }; f--; } } t > 0 && (d += p.length); } - return c.done ? { start: a, matched: !1 } : null; - } - h(ok, "matchPlainBrackets"); - var lk = Object.create(null), - cF = [Ie.none]; - var fF = [], - dF = Object.create(null), - uk = Object.create(null); + return c.done ? { start: h, matched: !1 } : null; + } + a(Sw, "matchPlainBrackets"); + var Bw = Object.create(null), + WD = [Ve.none]; + var jD = [], + _w = Object.create(null); for ( - var _$_i1 = 0, + var _i67 = 0, _iter1 = [ ["variable", "variableName"], ["variable-2", "variableName.special"], @@ -21044,72 +20425,28 @@ function _ts_generator(thisArg, body) { ["header", "heading"], ["property", "propertyName"], ]; - _$_i1 < _iter1.length; - _$_i1++ + _i67 < _iter1.length; + _i67++ ) { - var _iter__i = _sliced_to_array(_iter1[_$_i1], 2), - r2 = _iter__i[0], - e1 = _iter__i[1]; - uk[r2] = ak(lk, e1); + var _iter__i = _sliced_to_array(_iter1[_i67], 2), + i2 = _iter__i[0], + e2 = _iter__i[1]; + _w[i2] = Ow(Bw, e2); } - function oh(r, e) { - fF.indexOf(r) > -1 || (fF.push(r), console.warn(e)); + function Ja(i, e) { + jD.indexOf(i) > -1 || (jD.push(i), console.warn(e)); } - h(oh, "warnForPart"); - function ak(r, e) { - var t = []; + a(Ja, "warnForPart"); + function Ow(i, e) { + var t = null; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = e.split(" ")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l = _step.value; - var u = []; - var _iteratorNormalCompletion1 = true, - _didIteratorError1 = false, - _iteratorError1 = undefined; - try { - for (var _iterator1 = l.split(".")[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) { - var a = _step1.value; - var c = r[a] || U[a]; - c ? (typeof c == "function" ? (u.length ? (u = u.map(c)) : oh(a, "Modifier ".concat(a, " used at start of tag"))) : u.length ? oh(a, "Tag ".concat(a, " used as modifier")) : (u = Array.isArray(c) ? c : [c])) : oh(a, "Unknown highlighting tag ".concat(a)); - } - } catch (err) { - _didIteratorError1 = true; - _iteratorError1 = err; - } finally { - try { - if (!_iteratorNormalCompletion1 && _iterator1.return != null) { - _iterator1.return(); - } - } finally { - if (_didIteratorError1) { - throw _iteratorError1; - } - } - } - var _iteratorNormalCompletion2 = true, - _didIteratorError2 = false, - _iteratorError2 = undefined; - try { - for (var _iterator2 = u[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var a1 = _step2.value; - t.push(a1); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } + for (var _iterator = e.split(".")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var s = _step.value; + var o = i[s] || O[s]; + o ? (typeof o == "function" ? (t ? (t = o(t)) : Ja(s, "Modifier ".concat(s, " used at start of tag"))) : t ? Ja(s, "Tag ".concat(s, " used as modifier")) : (t = o)) : Ja(s, "Unknown highlighting tag ".concat(s)); } } catch (err) { _didIteratorError = true; @@ -21125,103 +20462,105 @@ function _ts_generator(thisArg, body) { } } } - if (!t.length) return 0; - var i = e.replace(/ /g, "_"), - n = i + " " + t.map((l) => l.id), - s = dF[n]; - if (s) return s.id; - var o = (dF[n] = Ie.define({ id: cF.length, name: i, props: [Uo({ [i]: t })] })); - return cF.push(o), o.id; - } - h(ak, "createTokenType"); - var Q8 = { rtl: pe.mark({ class: "cm-iso", inclusive: !0, attributes: { dir: "rtl" }, bidiIsolate: Be.RTL }), ltr: pe.mark({ class: "cm-iso", inclusive: !0, attributes: { dir: "ltr" }, bidiIsolate: Be.LTR }), auto: pe.mark({ class: "cm-iso", inclusive: !0, attributes: { dir: "auto" }, bidiIsolate: null }) }; - var ph = ct.define(), - hk = ct.define(), - ck = H.define(), - BF = H.define({ - combine(r) { - return Xt(r, { minDepth: 100, newGroupDelay: 500, joinToEvent: (e, t) => t }, { minDepth: Math.max, newGroupDelay: Math.min, joinToEvent: (e, t) => (i, n) => e(i, n) || t(i, n) }); - }, - }), - vF = Pe.define({ - create() { - return Ri.empty; - }, - update(r, e) { - var t = e.state.facet(BF), - i = e.annotation(ph); - if (i) { - var u = At.fromTransaction(e, i.selection), - a = i.side, - c = a == 0 ? r.undone : r.done; - return u ? (c = Ro(c, c.length, t.minDepth, u)) : (c = SF(c, e.startState.selection)), new Ri(a == 0 ? i.rest : c, a == 0 ? c : i.rest); - } - var n = e.annotation(hk); - if (((n == "full" || n == "before") && (r = r.isolate()), e.annotation(Le.addToHistory) === !1)) return e.changes.empty ? r : r.addMapping(e.changes.desc); - var s = At.fromTransaction(e), - o = e.annotation(Le.time), - l = e.annotation(Le.userEvent); - return s ? (r = r.addChanges(s, o, l, t, e)) : e.selection && (r = r.addSelection(e.startState.selection, o, l, t.newGroupDelay)), (n == "full" || n == "after") && (r = r.isolate()), r; - }, - toJSON(r) { - return { done: r.done.map((e) => e.toJSON()), undone: r.undone.map((e) => e.toJSON()) }; - }, - fromJSON(r) { - return new Ri(r.done.map(At.fromJSON), r.undone.map(At.fromJSON)); + if (!t) return 0; + var r = e.replace(/ /g, "_"), + n = Ve.define({ id: WD.length, name: r, props: [wo({ [r]: t })] }); + return WD.push(n), n.id; + } + a(Ow, "createTokenType"); + var oh = ot.define(), + Tw = ot.define(), + Rw = G.define(), + t1 = G.define({ + combine(i) { + return Wt(i, { minDepth: 100, newGroupDelay: 500, joinToEvent: (e, t) => t }, { minDepth: Math.max, newGroupDelay: Math.min, joinToEvent: (e, t) => (r, n) => e(r, n) || t(r, n) }); }, }); - function xF() { - var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + function Mw(i) { + var e = 0; + return i.iterChangedRanges((t, r) => (e = r)), e; + } + a(Mw, "changeEnd"); + var i11 = Ie.define({ + create() { + return Si.empty; + }, + update(i, e) { + var t = e.state.facet(t1), + r = e.annotation(oh); + if (r) { + var l = e.docChanged ? Q.single(Mw(e.changes)) : void 0, + h = Ct.fromTransaction(e, l), + c = r.side, + f = c == 0 ? i.undone : i.done; + return h ? (f = _o(f, f.length, t.minDepth, h)) : (f = o1(f, e.startState.selection)), new Si(c == 0 ? r.rest : f, c == 0 ? f : r.rest); + } + var n = e.annotation(Tw); + if (((n == "full" || n == "before") && (i = i.isolate()), e.annotation(Pe.addToHistory) === !1)) return e.changes.empty ? i : i.addMapping(e.changes.desc); + var s = Ct.fromTransaction(e), + o = e.annotation(Pe.time), + u = e.annotation(Pe.userEvent); + return s ? (i = i.addChanges(s, o, u, t, e)) : e.selection && (i = i.addSelection(e.startState.selection, o, u, t.newGroupDelay)), (n == "full" || n == "after") && (i = i.isolate()), i; + }, + toJSON(i) { + return { done: i.done.map((e) => e.toJSON()), undone: i.undone.map((e) => e.toJSON()) }; + }, + fromJSON(i) { + return new Si(i.done.map(Ct.fromJSON), i.undone.map(Ct.fromJSON)); + }, + }); + function r1() { + var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [ - vF, - BF.of(r), - ne.domEventHandlers({ + i11, + t1.of(i), + re.domEventHandlers({ beforeinput(e, t) { - var i = e.inputType == "historyUndo" ? AF : e.inputType == "historyRedo" ? mh : null; - return i ? (e.preventDefault(), i(t)) : !1; + var r = e.inputType == "historyUndo" ? n1 : e.inputType == "historyRedo" ? uh : null; + return r ? (e.preventDefault(), r(t)) : !1; }, }), ]; } - h(xF, "history"); - function No(r, e) { + a(r1, "history"); + function Oo(i, e) { return function (param) { var t = param.state, - i = param.dispatch; + r = param.dispatch; if (!e && t.readOnly) return !1; - var n = t.field(vF, !1); + var n = t.field(i11, !1); if (!n) return !1; - var s = n.pop(r, t, e); - return s ? (i(s), !0) : !1; + var s = n.pop(i, t, e); + return s ? (r(s), !0) : !1; }; } - h(No, "cmd"); - var AF = No(0, !1), - mh = No(1, !1), - fk = No(0, !0), - dk = No(1, !0); - var At = - ((_r60 = class r { + a(Oo, "cmd"); + var n1 = Oo(0, !1), + uh = Oo(1, !1), + $w = Oo(0, !0), + Pw = Oo(1, !0); + var Ct = + ((_i59 = class i { setSelAfter(e) { - return new r(this.changes, this.effects, this.mapped, this.startSelection, e); + return new i(this.changes, this.effects, this.mapped, this.startSelection, e); } toJSON() { - var e, t, i; - return { changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(), mapped: (t = this.mapped) === null || t === void 0 ? void 0 : t.toJSON(), startSelection: (i = this.startSelection) === null || i === void 0 ? void 0 : i.toJSON(), selectionsAfter: this.selectionsAfter.map((n) => n.toJSON()) }; + var e, t, r; + return { changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(), mapped: (t = this.mapped) === null || t === void 0 ? void 0 : t.toJSON(), startSelection: (r = this.startSelection) === null || r === void 0 ? void 0 : r.toJSON(), selectionsAfter: this.selectionsAfter.map((n) => n.toJSON()) }; } static fromJSON(e) { - return new r(e.changes && We.fromJSON(e.changes), [], e.mapped && Jt.fromJSON(e.mapped), e.startSelection && Z.fromJSON(e.startSelection), e.selectionsAfter.map(Z.fromJSON)); + return new i(e.changes && Ue.fromJSON(e.changes), [], e.mapped && zt.fromJSON(e.mapped), e.startSelection && Q.fromJSON(e.startSelection), e.selectionsAfter.map(Q.fromJSON)); } static fromTransaction(e, t) { - var i = gt; + var r = ft; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = e.startState.facet(ck)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = e.startState.facet(Rw)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; var s = n(e); - s.length && (i = i.concat(s)); + s.length && (r = r.concat(s)); } } catch (err) { _didIteratorError = true; @@ -21237,280 +20576,286 @@ function _ts_generator(thisArg, body) { } } } - return !i.length && e.changes.empty ? null : new r(e.changes.invert(e.startState.doc), i, void 0, t || e.startState.selection, gt); + return !r.length && e.changes.empty ? null : new i(e.changes.invert(e.startState.doc), r, void 0, t || e.startState.selection, ft); } static selection(e) { - return new r(void 0, gt, void 0, void 0, e); + return new i(void 0, ft, void 0, void 0, e); } - constructor(e, t, i, n, s) { - (this.changes = e), (this.effects = t), (this.mapped = i), (this.startSelection = n), (this.selectionsAfter = s); + constructor(e, t, r, n, s) { + (this.changes = e), (this.effects = t), (this.mapped = r), (this.startSelection = n), (this.selectionsAfter = s); } }), - h(_r60, "HistEvent"), - _r60); - function Ro(r, e, t, i) { + (() => { + a(_i59, "HistEvent"); + })(), + _i59); + function _o(i, e, t, r) { var n = e + 1 > t + 20 ? e - t - 1 : 0, - s = r.slice(n, e); - return s.push(i), s; + s = i.slice(n, e); + return s.push(r), s; } - h(Ro, "updateBranch"); - function pk(r, e) { + a(_o, "updateBranch"); + function Lw(i, e) { var t = [], - i = !1; + r = !1; return ( - r.iterChangedRanges((n, s) => t.push(n, s)), - e.iterChangedRanges((n, s, o, l) => { - for (var u = 0; u < t.length; ) { - var a = t[u++], - c = t[u++]; - l >= a && o <= c && (i = !0); + i.iterChangedRanges((n, s) => t.push(n, s)), + e.iterChangedRanges((n, s, o, u) => { + for (var l = 0; l < t.length; ) { + var h = t[l++], + c = t[l++]; + u >= h && o <= c && (r = !0); } }), - i + r ); } - h(pk, "isAdjacent"); - function mk(r, e) { - return r.ranges.length == e.ranges.length && r.ranges.filter((t, i) => t.empty != e.ranges[i].empty).length === 0; - } - h(mk, "eqSelectionShape"); - function kF(r, e) { - return r.length ? (e.length ? r.concat(e) : r) : e; - } - h(kF, "conc"); - var gt = [], - gk = 200; - function SF(r, e) { - if (r.length) { - var t = r[r.length - 1], - i = t.selectionsAfter.slice(Math.max(0, t.selectionsAfter.length - gk)); - return i.length && i[i.length - 1].eq(e) ? r : (i.push(e), Ro(r, r.length - 1, 1e9, t.setSelAfter(i))); - } else return [At.selection([e])]; - } - h(SF, "addSelection"); - function Dk(r) { - var e = r[r.length - 1], - t = r.slice(); - return (t[r.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1))), t; - } - h(Dk, "popSelection"); - function dh(r, e) { - if (!r.length) return r; - var t = r.length, - i = gt; + a(Lw, "isAdjacent"); + function qw(i, e) { + return i.ranges.length == e.ranges.length && i.ranges.filter((t, r) => t.empty != e.ranges[r].empty).length === 0; + } + a(qw, "eqSelectionShape"); + function s1(i, e) { + return i.length ? (e.length ? i.concat(e) : i) : e; + } + a(s1, "conc"); + var ft = [], + Iw = 200; + function o1(i, e) { + if (i.length) { + var t = i[i.length - 1], + r = t.selectionsAfter.slice(Math.max(0, t.selectionsAfter.length - Iw)); + return r.length && r[r.length - 1].eq(e) ? i : (r.push(e), _o(i, i.length - 1, 1e9, t.setSelAfter(r))); + } else return [Ct.selection([e])]; + } + a(o1, "addSelection"); + function Nw(i) { + var e = i[i.length - 1], + t = i.slice(); + return (t[i.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1))), t; + } + a(Nw, "popSelection"); + function sh(i, e) { + if (!i.length) return i; + var t = i.length, + r = ft; for (; t; ) { - var n = Fk(r[t - 1], e, i); + var n = Vw(i[t - 1], e, r); if ((n.changes && !n.changes.empty) || n.effects.length) { - var s = r.slice(0, t); + var s = i.slice(0, t); return (s[t - 1] = n), s; - } else (e = n.mapped), t--, (i = n.selectionsAfter); - } - return i.length ? [At.selection(i)] : gt; - } - h(dh, "addMappingToBranch"); - function Fk(r, e, t) { - var i = kF(r.selectionsAfter.length ? r.selectionsAfter.map((l) => l.map(e)) : gt, t); - if (!r.changes) return At.selection(i); - var n = r.changes.map(e), - s = e.mapDesc(r.changes, !0), - o = r.mapped ? r.mapped.composeDesc(s) : s; - return new At(n, de.mapEffects(r.effects, e), o, r.startSelection.map(s), i); - } - h(Fk, "mapEvent"); - var bk = /^(input\.type|delete)($|\.)/, - Ri = - ((_r61 = class r { + } else (e = n.mapped), t--, (r = n.selectionsAfter); + } + return r.length ? [Ct.selection(r)] : ft; + } + a(sh, "addMappingToBranch"); + function Vw(i, e, t) { + var r = s1(i.selectionsAfter.length ? i.selectionsAfter.map((u) => u.map(e)) : ft, t); + if (!i.changes) return Ct.selection(r); + var n = i.changes.map(e), + s = e.mapDesc(i.changes, !0), + o = i.mapped ? i.mapped.composeDesc(s) : s; + return new Ct(n, pe.mapEffects(i.effects, e), o, i.startSelection.map(s), r); + } + a(Vw, "mapEvent"); + var zw = /^(input\.type|delete)($|\.)/, + Si = + ((_i60 = class i { isolate() { - return this.prevTime ? new r(this.done, this.undone) : this; + return this.prevTime ? new i(this.done, this.undone) : this; } - addChanges(e, t, i, n, s) { + addChanges(e, t, r, n, s) { var o = this.done, - l = o[o.length - 1]; + u = o[o.length - 1]; return ( - l && l.changes && !l.changes.empty && e.changes && (!i || bk.test(i)) && ((!l.selectionsAfter.length && t - this.prevTime < n.newGroupDelay && n.joinToEvent(s, pk(l.changes, e.changes))) || i == "input.type.compose") - ? (o = Ro(o, o.length - 1, n.minDepth, new At(e.changes.compose(l.changes), kF(e.effects, l.effects), l.mapped, l.startSelection, gt))) - : (o = Ro(o, o.length, n.minDepth, e)), - new r(o, gt, t, i) + u && u.changes && !u.changes.empty && e.changes && (!r || zw.test(r)) && ((!u.selectionsAfter.length && t - this.prevTime < n.newGroupDelay && n.joinToEvent(s, Lw(u.changes, e.changes))) || r == "input.type.compose") + ? (o = _o(o, o.length - 1, n.minDepth, new Ct(e.changes.compose(u.changes), s1(e.effects, u.effects), u.mapped, u.startSelection, ft))) + : (o = _o(o, o.length, n.minDepth, e)), + new i(o, ft, t, r) ); } - addSelection(e, t, i, n) { - var s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : gt; - return s.length > 0 && t - this.prevTime < n && i == this.prevUserEvent && i && /^select($|\.)/.test(i) && mk(s[s.length - 1], e) ? this : new r(SF(this.done, e), this.undone, t, i); + addSelection(e, t, r, n) { + var s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : ft; + return s.length > 0 && t - this.prevTime < n && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && qw(s[s.length - 1], e) ? this : new i(o1(this.done, e), this.undone, t, r); } addMapping(e) { - return new r(dh(this.done, e), dh(this.undone, e), this.prevTime, this.prevUserEvent); + return new i(sh(this.done, e), sh(this.undone, e), this.prevTime, this.prevUserEvent); } - pop(e, t, i) { + pop(e, t, r) { var n = e == 0 ? this.done : this.undone; if (n.length == 0) return null; - var s = n[n.length - 1], - o = s.selectionsAfter[0] || t.selection; - if (i && s.selectionsAfter.length) return t.update({ selection: s.selectionsAfter[s.selectionsAfter.length - 1], annotations: ph.of({ side: e, rest: Dk(n), selection: o }), userEvent: e == 0 ? "select.undo" : "select.redo", scrollIntoView: !0 }); + var s = n[n.length - 1]; + if (r && s.selectionsAfter.length) return t.update({ selection: s.selectionsAfter[s.selectionsAfter.length - 1], annotations: oh.of({ side: e, rest: Nw(n) }), userEvent: e == 0 ? "select.undo" : "select.redo", scrollIntoView: !0 }); if (s.changes) { - var l = n.length == 1 ? gt : n.slice(0, n.length - 1); - return s.mapped && (l = dh(l, s.mapped)), t.update({ changes: s.changes, selection: s.startSelection, effects: s.effects, annotations: ph.of({ side: e, rest: l, selection: o }), filter: !1, userEvent: e == 0 ? "undo" : "redo", scrollIntoView: !0 }); + var o = n.length == 1 ? ft : n.slice(0, n.length - 1); + return s.mapped && (o = sh(o, s.mapped)), t.update({ changes: s.changes, selection: s.startSelection, effects: s.effects, annotations: oh.of({ side: e, rest: o }), filter: !1, userEvent: e == 0 ? "undo" : "redo", scrollIntoView: !0 }); } else return null; } constructor(e, t, ref, ref1) { - var i = ref === void 0 ? 0 : ref, + var r = ref === void 0 ? 0 : ref, n = ref1 === void 0 ? void 0 : ref1; - (this.done = e), (this.undone = t), (this.prevTime = i), (this.prevUserEvent = n); + (this.done = e), (this.undone = t), (this.prevTime = r), (this.prevUserEvent = n); } }), - h(_r61, "HistoryState"), - _r61); - Ri.empty = new Ri(gt, gt); - var wF = [ - { key: "Mod-z", run: AF, preventDefault: !0 }, - { key: "Mod-y", mac: "Mod-Shift-z", run: mh, preventDefault: !0 }, - { linux: "Ctrl-Shift-z", run: mh, preventDefault: !0 }, - { key: "Mod-u", run: fk, preventDefault: !0 }, - { key: "Alt-u", mac: "Mod-Shift-u", run: dk, preventDefault: !0 }, + (() => { + a(_i60, "HistoryState"); + })(), + _i60); + Si.empty = new Si(ft, ft); + var u1 = [ + { key: "Mod-z", run: n1, preventDefault: !0 }, + { key: "Mod-y", mac: "Mod-Shift-z", run: uh, preventDefault: !0 }, + { linux: "Ctrl-Shift-z", run: uh, preventDefault: !0 }, + { key: "Mod-u", run: $w, preventDefault: !0 }, + { key: "Alt-u", mac: "Mod-Shift-u", run: Pw, preventDefault: !0 }, ]; - var I8 = typeof Intl < "u" && Intl.Segmenter ? new Intl.Segmenter(void 0, { granularity: "word" }) : null; - function QF(r, e) { + function l1(i, e) { var t = -1; - return r.changeByRange((i) => { + return i.changeByRange((r) => { var n = []; - for (var o = i.from; o <= i.to; ) { - var l = r.doc.lineAt(o); - l.number > t && (i.empty || i.to > l.from) && (e(l, n, i), (t = l.number)), (o = l.to + 1); + for (var o = r.from; o <= r.to; ) { + var u = i.doc.lineAt(o); + u.number > t && (r.empty || r.to > u.from) && (e(u, n, r), (t = u.number)), (o = u.to + 1); } - var s = r.changes(n); - return { changes: n, range: Z.range(s.mapPos(i.anchor, 1), s.mapPos(i.head, 1)) }; + var s = i.changes(n); + return { changes: n, range: Q.range(s.mapPos(r.anchor, 1), s.mapPos(r.head, 1)) }; }); } - h(QF, "changeBySelectedLine"); - var yk = h((param) => { - var r = param.state, + a(l1, "changeBySelectedLine"); + var Hw = a((param) => { + var i = param.state, e = param.dispatch; - return r.readOnly + return i.readOnly ? !1 : (e( - r.update( - QF(r, (t, i) => { - i.push({ from: t.from, insert: r.facet(To) }); + i.update( + l1(i, (t, r) => { + r.push({ from: t.from, insert: i.facet(Bo) }); }), - { userEvent: "input.indent" }, - ), + { userEvent: "input.indent" } + ) ), !0); }, "indentMore"), - Ek = h((param) => { - var r = param.state, + Ww = a((param) => { + var i = param.state, e = param.dispatch; - return r.readOnly + return i.readOnly ? !1 : (e( - r.update( - QF(r, (t, i) => { + i.update( + l1(i, (t, r) => { var n = /^\s*/.exec(t.text)[0]; if (!n) return; - var s = Vs(n, r.tabSize), + var s = Os(n, i.tabSize), o = 0, - l = gF(r, Math.max(0, s - mF(r))); - for (; o < n.length && o < l.length && n.charCodeAt(o) == l.charCodeAt(o); ) o++; - i.push({ from: t.from + o, to: t.from + n.length, insert: l.slice(o) }); + u = YD(i, Math.max(0, s - GD(i))); + for (; o < n.length && o < u.length && n.charCodeAt(o) == u.charCodeAt(o); ) o++; + r.push({ from: t.from + o, to: t.from + n.length, insert: u.slice(o) }); }), - { userEvent: "delete.dedent" }, - ), + { userEvent: "delete.dedent" } + ) ), !0); }, "indentLess"); - var _F = { key: "Tab", run: yk, shift: Ek }; - function Dt() { - var r = arguments[0]; - typeof r == "string" && (r = document.createElement(r)); + var a1 = { key: "Tab", run: Hw, shift: Ww }; + function dt() { + var i = arguments[0]; + typeof i == "string" && (i = document.createElement(i)); var e = 1, t = arguments[1]; if (t && typeof t == "object" && t.nodeType == null && !Array.isArray(t)) { - for (var i in t) - if (Object.prototype.hasOwnProperty.call(t, i)) { - var n = t[i]; - typeof n == "string" ? r.setAttribute(i, n) : n != null && (r[i] = n); + for (var r in t) + if (Object.prototype.hasOwnProperty.call(t, r)) { + var n = t[r]; + typeof n == "string" ? i.setAttribute(r, n) : n != null && (i[r] = n); } e++; } - for (; e < arguments.length; e++) UF(r, arguments[e]); - return r; + for (; e < arguments.length; e++) h1(i, arguments[e]); + return i; } - h(Dt, "crelt"); - function UF(r, e) { - if (typeof e == "string") r.appendChild(document.createTextNode(e)); + a(dt, "crelt"); + function h1(i, e) { + if (typeof e == "string") i.appendChild(document.createTextNode(e)); else if (e != null) - if (e.nodeType != null) r.appendChild(e); - else if (Array.isArray(e)) for (var t = 0; t < e.length; t++) UF(r, e[t]); + if (e.nodeType != null) i.appendChild(e); + else if (Array.isArray(e)) for (var t = 0; t < e.length; t++) h1(i, e[t]); else throw new RangeError("Unsupported child node: " + e); } - h(UF, "add"); - var gh = - ((_class85 = class _class { - constructor(e, t, i) { - (this.from = e), (this.to = t), (this.diagnostic = i); + a(h1, "add"); + var ah = + ((_class84 = class _class { + constructor(e, t, r) { + (this.from = e), (this.to = t), (this.diagnostic = r); } }), - h(_class85, "SelectedDiagnostic"), - _class85), - Ni = - ((_r62 = class r { - static init(e, t, i) { + (() => { + a(_class84, "SelectedDiagnostic"); + })(), + _class84), + Bi = + ((_i61 = class i { + static init(e, t, r) { var n = e, - s = i.facet(Mi).markerFilter; - s && (n = s(n, i)); - var o = pe.set( - n.map((l) => (l.from == l.to || (l.from == l.to - 1 && i.doc.lineAt(l.from).to == l.from) ? pe.widget({ widget: new Dh(l), diagnostic: l }).range(l.from) : pe.mark({ attributes: { class: "cm-lintRange cm-lintRange-" + l.severity + (l.markClass ? " " + l.markClass : "") }, diagnostic: l, inclusive: !0 }).range(l.from, l.to))), - !0, + s = r.facet(_i68).markerFilter; + s && (n = s(n)); + var o = he.set( + n.map((u) => (u.from == u.to || (u.from == u.to - 1 && r.doc.lineAt(u.from).to == u.from) ? he.widget({ widget: new hh(u), diagnostic: u }).range(u.from) : he.mark({ attributes: { class: "cm-lintRange cm-lintRange-" + u.severity }, diagnostic: u }).range(u.from, u.to))), + !0 ); - return new r(o, t, Ar(o)); + return new i(o, t, Ar(o)); } - constructor(e, t, i) { - (this.diagnostics = e), (this.panel = t), (this.selected = i); + constructor(e, t, r) { + (this.diagnostics = e), (this.panel = t), (this.selected = r); } }), - h(_r62, "LintState"), - _r62); - function Ar(r) { + (() => { + a(_i61, "LintState"); + })(), + _i61); + function Ar(i) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; - var i = null; + var r = null; return ( - r.between(t, 1e9, (n, s, param) => { + i.between(t, 1e9, (n, s, param) => { var o = param.spec; - if (!(e && o.diagnostic != e)) return (i = new gh(n, s, o.diagnostic)), !1; + if (!(e && o.diagnostic != e)) return (r = new ah(n, s, o.diagnostic)), !1; }), - i + r ); } - h(Ar, "findDiagnostic"); - function Ck(r, e) { - var t = r.startState.doc.lineAt(e.pos); - return !!(r.effects.some((i) => i.is(bh)) || r.changes.touchesRange(t.from, t.to)); + a(Ar, "findDiagnostic"); + function jw(i, e) { + var t = i.startState.doc.lineAt(e.pos); + return !!(i.effects.some((r) => r.is(fh)) || i.changes.touchesRange(t.from, t.to)); } - h(Ck, "hideTooltip"); - function Bk(r, e) { - return r.field(kt, !1) ? e : e.concat(de.appendConfig.of(PF)); + a(jw, "hideTooltip"); + function Uw(i, e) { + return i.field(At, !1) ? e : e.concat(pe.appendConfig.of(D1)); } - h(Bk, "maybeEnableLint"); - function vk(r, e) { - return { effects: Bk(r, [bh.of(e)]) }; + a(Uw, "maybeEnableLint"); + function Gw(i, e) { + return { effects: Uw(i, [fh.of(e)]) }; } - h(vk, "setDiagnostics"); - var bh = de.define(), - OF = de.define(), - TF = de.define(), - kt = Pe.define({ + a(Gw, "setDiagnostics"); + var fh = pe.define(), + f1 = pe.define(), + d1 = pe.define(), + At = Ie.define({ create() { - return new Ni(pe.none, null, null); + return new Bi(he.none, null, null); }, - update(r, e) { + update(i, e) { if (e.docChanged) { - var t = r.diagnostics.map(e.changes), - i = null; - if (r.selected) { - var n = e.changes.mapPos(r.selected.from, 1); - i = Ar(t, r.selected.diagnostic, n) || Ar(t, null, n); + var t = i.diagnostics.map(e.changes), + r = null; + if (i.selected) { + var n = e.changes.mapPos(i.selected.from, 1); + r = Ar(t, i.selected.diagnostic, n) || Ar(t, null, n); } - r = new Ni(t, r.panel, i); + i = new Bi(t, i.panel, r); } var _iteratorNormalCompletion = true, _didIteratorError = false, @@ -21518,7 +20863,7 @@ function _ts_generator(thisArg, body) { try { for (var _iterator = e.effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t1 = _step.value; - t1.is(bh) ? (r = Ni.init(t1.value, r.panel, e.state)) : t1.is(OF) ? (r = new Ni(r.diagnostics, t1.value ? Fh.open : null, r.selected)) : t1.is(TF) && (r = new Ni(r.diagnostics, r.panel, t1.value)); + t1.is(fh) ? (i = Bi.init(t1.value, i.panel, e.state)) : t1.is(f1) ? (i = new Bi(i.diagnostics, t1.value ? ch.open : null, i.selected)) : t1.is(d1) && (i = new Bi(i.diagnostics, i.panel, t1.value)); } } catch (err) { _didIteratorError = true; @@ -21534,75 +20879,74 @@ function _ts_generator(thisArg, body) { } } } - return r; + return i; }, - provide: (r) => [yo.from(r, (e) => e.panel), ne.decorations.from(r, (e) => e.diagnostics)], + provide: (i) => [fo.from(i, (e) => e.panel), re.decorations.from(i, (e) => e.diagnostics)], }); - var xk = pe.mark({ class: "cm-lintRange cm-lintRange-active", inclusive: !0 }); - function Ak(r, e, t) { - var _r_state_field = r.state.field(kt), - i = _r_state_field.diagnostics, + var Yw = he.mark({ class: "cm-lintRange cm-lintRange-active" }); + function Kw(i, e, t) { + var _i_state_field = i.state.field(At), + r = _i_state_field.diagnostics, n = [], s = 2e8, o = 0; - i.between(e - (t < 0 ? 1 : 0), e + (t > 0 ? 1 : 0), (u, a, param) => { + r.between(e - (t < 0 ? 1 : 0), e + (t > 0 ? 1 : 0), (l, h, param) => { var c = param.spec; - e >= u && e <= a && (u == a || ((e > u || t > 0) && (e < a || t < 0))) && (n.push(c.diagnostic), (s = Math.min(u, s)), (o = Math.max(a, o))); + e >= l && e <= h && (l == h || ((e > l || t > 0) && (e < h || t < 0))) && (n.push(c.diagnostic), (s = Math.min(l, s)), (o = Math.max(h, o))); }); - var l = r.state.facet(Mi).tooltipFilter; + var u = i.state.facet(_i68).tooltipFilter; return ( - l && (n = l(n, r.state)), + u && (n = u(n)), n.length ? { pos: s, end: o, - above: r.state.doc.lineAt(s).to < o, + above: i.state.doc.lineAt(s).to < o, create() { - return { dom: kk(r, n) }; + return { dom: Xw(i, n) }; }, } : null ); } - h(Ak, "lintTooltip"); - function kk(r, e) { - return Dt( + a(Kw, "lintTooltip"); + function Xw(i, e) { + return dt( "ul", { class: "cm-tooltip-lint" }, - e.map((t) => MF(r, t, !1)), + e.map((t) => g1(i, t, !1)) ); } - h(kk, "diagnosticsTooltip"); - var LF = h((r) => { - var e = r.state.field(kt, !1); - return !e || !e.panel ? !1 : (r.dispatch({ effects: OF.of(!1) }), !0); + a(Xw, "diagnosticsTooltip"); + var c1 = a((i) => { + var e = i.state.field(At, !1); + return !e || !e.panel ? !1 : (i.dispatch({ effects: f1.of(!1) }), !0); }, "closeLintPanel"); - var Sk = je.fromClass( + var Qw = Ye.fromClass( class { run() { - var r = Date.now(); - if (r < this.lintTime - 10) this.timeout = setTimeout(this.run, this.lintTime - r); + var i = Date.now(); + if (i < this.lintTime - 10) setTimeout(this.run, this.lintTime - i); else { this.set = !1; var _this_view = this.view, e = _this_view.state, - _e_facet = e.facet(Mi), + _e_facet = e.facet(_i68), t = _e_facet.sources; - t.length && - Promise.all(t.map((i) => Promise.resolve(i(this.view)))).then( - (i) => { - var n = i.reduce((s, o) => s.concat(o)); - this.view.state.doc == e.doc && this.view.dispatch(vk(this.view.state, n)); - }, - (i) => { - Xe(this.view.state, i); - }, - ); + Promise.all(t.map((r) => Promise.resolve(r(this.view)))).then( + (r) => { + var n = r.reduce((s, o) => s.concat(o)); + this.view.state.doc == e.doc && this.view.dispatch(Gw(this.view.state, n)); + }, + (r) => { + ht(this.view.state, r); + } + ); } } - update(r) { - var e = r.state.facet(Mi); - (r.docChanged || e != r.startState.facet(Mi) || (e.needsRefresh && e.needsRefresh(r))) && ((this.lintTime = Date.now() + e.delay), this.set || ((this.set = !0), (this.timeout = setTimeout(this.run, e.delay)))); + update(i) { + var e = i.state.facet(_i68); + (i.docChanged || e != i.startState.facet(_i68) || (e.needsRefresh && e.needsRefresh(i))) && ((this.lintTime = Date.now() + e.delay), this.set || ((this.set = !0), (this.timeout = setTimeout(this.run, e.delay)))); } force() { this.set && ((this.lintTime = Date.now()), this.run()); @@ -21610,41 +20954,41 @@ function _ts_generator(thisArg, body) { destroy() { clearTimeout(this.timeout); } - constructor(r) { - (this.view = r), (this.timeout = -1), (this.set = !0); - var _r_state_facet = r.state.facet(Mi), - e = _r_state_facet.delay; + constructor(i) { + (this.view = i), (this.timeout = -1), (this.set = !0); + var _i_state_facet = i.state.facet(_i68), + e = _i_state_facet.delay; (this.lintTime = Date.now() + e), (this.run = this.run.bind(this)), (this.timeout = setTimeout(this.run, e)); } - }, + } ), - Mi = H.define({ - combine(r) { + _i68 = G.define({ + combine(i) { return Object.assign( - { sources: r.map((e) => e.source).filter((e) => e != null) }, - Xt( - r.map((e) => e.config), + { sources: i.map((e) => e.source) }, + Wt( + i.map((e) => e.config), { delay: 750, markerFilter: null, tooltipFilter: null, needsRefresh: null }, - { needsRefresh: (e, t) => (e ? (t ? (i) => e(i) || t(i) : e) : t) }, - ), + { needsRefresh: (e, t) => (e ? (t ? (r) => e(r) || t(r) : e) : t) } + ) ); }, }); - function RF(r) { + function p1(i) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - return [Mi.of({ source: r, config: e }), Sk, PF]; + return [_i68.of({ source: i, config: e }), Qw, D1]; } - h(RF, "linter"); - function NF(r) { + a(p1, "linter"); + function m1(i) { var e = []; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if (r) + if (i) try { var _loop = function () { - var _loop = function (i) { - var n = t[i]; + var _loop = function (r) { + var n = t[r]; if (/[a-zA-Z]/.test(n) && !e.some((s) => s.toLowerCase() == n.toLowerCase())) { e.push(n); return "continue|e"; @@ -21652,8 +20996,8 @@ function _ts_generator(thisArg, body) { }; var _step_value = _step.value, t = _step_value.name; - for (var i = 0; i < t.length; i++) { - var _ret = _loop(i); + for (var r = 0; r < t.length; r++) { + var _ret = _loop(r); switch (_ret) { case "continue|e": return "continue|e"; @@ -21661,7 +21005,7 @@ function _ts_generator(thisArg, body) { } e.push(""); }; - e: for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + e: for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _ret = _loop(); switch (_ret) { case "continue|e": @@ -21684,87 +21028,91 @@ function _ts_generator(thisArg, body) { } return e; } - h(NF, "assignKeys"); - function MF(r, e, t) { - var i; - var n = t ? NF(e.actions) : []; - return Dt( + a(m1, "assignKeys"); + function g1(i, e, t) { + var r; + var n = t ? m1(e.actions) : []; + return dt( "li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, - Dt("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage() : e.message), - (i = e.actions) === null || i === void 0 + dt("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage() : e.message), + (r = e.actions) === null || r === void 0 ? void 0 - : i.map((s, o) => { - var l = !1, - u = h((d) => { - if ((d.preventDefault(), l)) return; - l = !0; - var p = Ar(r.state.field(kt).diagnostics, e); - p && s.apply(r, p.from, p.to); + : r.map((s, o) => { + var u = !1, + l = a((d) => { + if ((d.preventDefault(), u)) return; + u = !0; + var p = Ar(i.state.field(At).diagnostics, e); + p && s.apply(i, p.from, p.to); }, "click"), - a = s.name, - c = n[o] ? a.indexOf(n[o]) : -1, - f = c < 0 ? a : [a.slice(0, c), Dt("u", a.slice(c, c + 1)), a.slice(c + 1)]; - return Dt("button", { type: "button", class: "cm-diagnosticAction", onclick: u, onmousedown: u, "aria-label": " Action: ".concat(a).concat(c < 0 ? "" : ' (access key "'.concat(n[o], ')"'), ".") }, f); + h = s.name, + c = n[o] ? h.indexOf(n[o]) : -1, + f = c < 0 ? h : [h.slice(0, c), dt("u", h.slice(c, c + 1)), h.slice(c + 1)]; + return dt("button", { type: "button", class: "cm-diagnosticAction", onclick: l, onmousedown: l, "aria-label": " Action: ".concat(h).concat(c < 0 ? "" : ' (access key "'.concat(n[o], ')"'), ".") }, f); }), - e.source && Dt("div", { class: "cm-diagnosticSource" }, e.source), + e.source && dt("div", { class: "cm-diagnosticSource" }, e.source) ); } - h(MF, "renderDiagnostic"); - var Dh = - ((_class86 = class _class extends ai { + a(g1, "renderDiagnostic"); + var hh = + ((_class85 = class _class extends Ut { eq(e) { return e.diagnostic == this.diagnostic; } toDOM() { - return Dt("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity }); + return dt("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity }); } constructor(e) { super(), (this.diagnostic = e); } }), - h(_class86, "DiagnosticWidget"), - _class86), - Po = - ((_class87 = class _class { + (() => { + a(_class85, "DiagnosticWidget"); + })(), + _class85), + To = + ((_class86 = class _class { constructor(e, t) { - (this.diagnostic = t), (this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16)), (this.dom = MF(e, t, !0)), (this.dom.id = this.id), this.dom.setAttribute("role", "option"); + (this.diagnostic = t), (this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16)), (this.dom = g1(e, t, !0)), (this.dom.id = this.id), this.dom.setAttribute("role", "option"); } }), - h(_class87, "PanelItem"), - _class87), - Fh = - ((_r63 = class r { + (() => { + a(_class86, "PanelItem"); + })(), + _class86), + ch = + ((_i62 = class i { get selectedIndex() { - var e = this.view.state.field(kt).selected; + var e = this.view.state.field(At).selected; if (!e) return -1; for (var t = 0; t < this.items.length; t++) if (this.items[t].diagnostic == e.diagnostic) return t; return -1; } update() { - var _this_view_state_field = this.view.state.field(kt), + var _this_view_state_field = this.view.state.field(At), e = _this_view_state_field.diagnostics, t = _this_view_state_field.selected, - i = 0, + r = 0, n = !1, s = null; for ( - e.between(0, this.view.state.doc.length, (o, l, param) => { - var u = param.spec; - var a = -1, + e.between(0, this.view.state.doc.length, (o, u, param) => { + var l = param.spec; + var h = -1, c; - for (var f = i; f < this.items.length; f++) - if (this.items[f].diagnostic == u.diagnostic) { - a = f; + for (var f = r; f < this.items.length; f++) + if (this.items[f].diagnostic == l.diagnostic) { + h = f; break; } - a < 0 ? ((c = new Po(this.view, u.diagnostic)), this.items.splice(i, 0, c), (n = !0)) : ((c = this.items[a]), a > i && (this.items.splice(i, a - i), (n = !0))), t && c.diagnostic == t.diagnostic ? c.dom.hasAttribute("aria-selected") || (c.dom.setAttribute("aria-selected", "true"), (s = c)) : c.dom.hasAttribute("aria-selected") && c.dom.removeAttribute("aria-selected"), i++; + h < 0 ? ((c = new To(this.view, l.diagnostic)), this.items.splice(r, 0, c), (n = !0)) : ((c = this.items[h]), h > r && (this.items.splice(r, h - r), (n = !0))), t && c.diagnostic == t.diagnostic ? c.dom.hasAttribute("aria-selected") || (c.dom.setAttribute("aria-selected", "true"), (s = c)) : c.dom.hasAttribute("aria-selected") && c.dom.removeAttribute("aria-selected"), r++; }); - i < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); + r < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); ) (n = !0), this.items.pop(); - this.items.length == 0 && (this.items.push(new Po(this.view, { from: -1, to: -1, severity: "info", message: this.view.state.phrase("No diagnostics") })), (n = !0)), + this.items.length == 0 && (this.items.push(new To(this.view, { from: -1, to: -1, severity: "info", message: this.view.state.phrase("No diagnostics") })), (n = !0)), s ? (this.list.setAttribute("aria-activedescendant", s.id), this.view.requestMeasure({ @@ -21772,9 +21120,8 @@ function _ts_generator(thisArg, body) { read: () => ({ sel: s.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }), write: (param) => { var o = param.sel, - l = param.panel; - var u = l.height / this.list.offsetHeight; - o.top < l.top ? (this.list.scrollTop -= (l.top - o.top) / u) : o.bottom > l.bottom && (this.list.scrollTop += (o.bottom - l.bottom) / u); + u = param.panel; + o.top < u.top ? (this.list.scrollTop -= u.top - o.top) : o.bottom > u.bottom && (this.list.scrollTop += o.bottom - u.bottom); }, })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), @@ -21783,20 +21130,20 @@ function _ts_generator(thisArg, body) { sync() { var e = this.list.firstChild; function t() { - var i = e; - (e = i.nextSibling), i.remove(); + var r = e; + (e = r.nextSibling), r.remove(); } - h(t, "rm"); + a(t, "rm"); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var i = _step.value; - if (i.dom.parentNode == this.list) { - for (; e != i.dom; ) t(); - e = i.dom.nextSibling; - } else this.list.insertBefore(i.dom, e); + var r = _step.value; + if (r.dom.parentNode == this.list) { + for (; e != r.dom; ) t(); + e = r.dom.nextSibling; + } else this.list.insertBefore(r.dom, e); } } catch (err) { _didIteratorError = true; @@ -21816,17 +21163,17 @@ function _ts_generator(thisArg, body) { } moveSelection(e) { if (this.selectedIndex < 0) return; - var t = this.view.state.field(kt), - i = Ar(t.diagnostics, this.items[e].diagnostic); - i && this.view.dispatch({ selection: { anchor: i.from, head: i.to }, scrollIntoView: !0, effects: TF.of(i) }); + var t = this.view.state.field(At), + r = Ar(t.diagnostics, this.items[e].diagnostic); + r && this.view.dispatch({ selection: { anchor: r.from, head: r.to }, scrollIntoView: !0, effects: d1.of(r) }); } static open(e) { - return new r(e); + return new i(e); } constructor(e) { (this.view = e), (this.items = []); - var t = h((n) => { - if (n.keyCode == 27) LF(this.view), this.view.focus(); + var t = a((n) => { + if (n.keyCode == 27) c1(this.view), this.view.focus(); else if (n.keyCode == 38 || n.keyCode == 33) this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length); else if (n.keyCode == 40 || n.keyCode == 34) this.moveSelection((this.selectedIndex + 1) % this.items.length); else if (n.keyCode == 36) this.moveSelection(0); @@ -21835,101 +21182,100 @@ function _ts_generator(thisArg, body) { else if (n.keyCode >= 65 && n.keyCode <= 90 && this.selectedIndex >= 0) { var _this_items_this_selectedIndex = this.items[this.selectedIndex], s = _this_items_this_selectedIndex.diagnostic, - o = NF(s.actions); - for (var l = 0; l < o.length; l++) - if (o[l].toUpperCase().charCodeAt(0) == n.keyCode) { - var u = Ar(this.view.state.field(kt).diagnostics, s); - u && s.actions[l].apply(e, u.from, u.to); + o = m1(s.actions); + for (var u = 0; u < o.length; u++) + if (o[u].toUpperCase().charCodeAt(0) == n.keyCode) { + var l = Ar(this.view.state.field(At).diagnostics, s); + l && s.actions[u].apply(e, l.from, l.to); } } else return; n.preventDefault(); }, "onkeydown"), - i = h((n) => { + r = a((n) => { for (var s = 0; s < this.items.length; s++) this.items[s].dom.contains(n.target) && this.moveSelection(s); }, "onclick"); - (this.list = Dt("ul", { tabIndex: 0, role: "listbox", "aria-label": this.view.state.phrase("Diagnostics"), onkeydown: t, onclick: i })), (this.dom = Dt("div", { class: "cm-panel-lint" }, this.list, Dt("button", { type: "button", name: "close", "aria-label": this.view.state.phrase("close"), onclick: () => LF(this.view) }, "\xd7"))), this.update(); + (this.list = dt("ul", { tabIndex: 0, role: "listbox", "aria-label": this.view.state.phrase("Diagnostics"), onkeydown: t, onclick: r })), (this.dom = dt("div", { class: "cm-panel-lint" }, this.list, dt("button", { type: "button", name: "close", "aria-label": this.view.state.phrase("close"), onclick: () => c1(this.view) }, "\xd7"))), this.update(); } }), - h(_r63, "LintPanel"), - _r63); - function wk(r) { + (() => { + a(_i62, "LintPanel"); + })(), + _i62); + function Jw(i) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'viewBox="0 0 40 40"'; - return 'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" '.concat(e, ">").concat(encodeURIComponent(r), "</svg>')"); + return 'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" '.concat(e, ">").concat(encodeURIComponent(i), "</svg>')"); } - h(wk, "svg"); - function Mo(r) { - return wk('<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="'.concat(r, '" fill="none" stroke-width=".7"/>'), 'width="6" height="3"'); + a(Jw, "svg"); + function lh(i) { + return Jw('<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="'.concat(i, '" fill="none" stroke-width=".7"/>'), 'width="6" height="3"'); } - h(Mo, "underline"); - var Qk = ne.baseTheme({ + a(lh, "underline"); + var Zw = re.baseTheme({ ".cm-diagnostic": { padding: "3px 6px 3px 8px", marginLeft: "-1px", display: "block", whiteSpace: "pre-wrap" }, ".cm-diagnostic-error": { borderLeft: "5px solid #d11" }, ".cm-diagnostic-warning": { borderLeft: "5px solid orange" }, ".cm-diagnostic-info": { borderLeft: "5px solid #999" }, - ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" }, ".cm-diagnosticAction": { font: "inherit", border: "none", padding: "2px 4px", backgroundColor: "#444", color: "white", borderRadius: "3px", marginLeft: "8px", cursor: "pointer" }, ".cm-diagnosticSource": { fontSize: "70%", opacity: 0.7 }, ".cm-lintRange": { backgroundPosition: "left bottom", backgroundRepeat: "repeat-x", paddingBottom: "0.7px" }, - ".cm-lintRange-error": { backgroundImage: Mo("#d11") }, - ".cm-lintRange-warning": { backgroundImage: Mo("orange") }, - ".cm-lintRange-info": { backgroundImage: Mo("#999") }, - ".cm-lintRange-hint": { backgroundImage: Mo("#66d") }, + ".cm-lintRange-error": { backgroundImage: lh("#d11") }, + ".cm-lintRange-warning": { backgroundImage: lh("orange") }, + ".cm-lintRange-info": { backgroundImage: lh("#999") }, ".cm-lintRange-active": { backgroundColor: "#ffdd9980" }, ".cm-tooltip-lint": { padding: 0, margin: 0 }, ".cm-lintPoint": { position: "relative", "&:after": { content: '""', position: "absolute", bottom: 0, left: "-2px", borderLeft: "3px solid transparent", borderRight: "3px solid transparent", borderBottom: "4px solid #d11" } }, ".cm-lintPoint-warning": { "&:after": { borderBottomColor: "orange" } }, ".cm-lintPoint-info": { "&:after": { borderBottomColor: "#999" } }, - ".cm-lintPoint-hint": { "&:after": { borderBottomColor: "#66d" } }, ".cm-panel.cm-panel-lint": { position: "relative", "& ul": { maxHeight: "100px", overflowY: "auto", "& [aria-selected]": { backgroundColor: "#ddd", "& u": { textDecoration: "underline" } }, "&:focus [aria-selected]": { background_fallback: "#bdf", backgroundColor: "Highlight", color_fallback: "white", color: "HighlightText" }, "& u": { textDecoration: "none" }, padding: 0, margin: 0 }, "& [name=close]": { position: "absolute", top: "0", right: "2px", background: "inherit", border: "none", font: "inherit", padding: 0, margin: 0 }, }, }); - var PF = [ - kt, - ne.decorations.compute([kt], (r) => { - var _r_field = r.field(kt), - e = _r_field.selected, - t = _r_field.panel; - return !e || !t || e.from == e.to ? pe.none : pe.set([xk.range(e.from, e.to)]); + var D1 = [ + At, + re.decorations.compute([At], (i) => { + var _i_field = i.field(At), + e = _i_field.selected, + t = _i_field.panel; + return !e || !t || e.from == e.to ? he.none : he.set([Yw.range(e.from, e.to)]); }), - XD(Ak, { hideOn: Ck }), - Qk, + OD(Kw, { hideOn: jw }), + Zw, ]; - function _k(r) { - var e, t, i; + function e4(i) { + var e, t, r; return { c() { - (e = O("button")), + (e = R("button")), (e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" class="svelte-1ha11jr"><path d="M704 896H64V320h640v192h64V192c0-35-29-64-64-64H512C512 57 455 0 384 0S256 57 256 128H64c-35 0-64 29-64 64v704c0 35 29 64 64 64h640c35 0 64-29 64-64V768h-64v128zM192 192h64s64-29 64-64 29-64 64-64 64 29 64 64 32 64 64 64h64s64 29 64 64H128c0-39 28-64 64-64zm-64 512h128v-64H128v64zm448-128V448L320 640l256 192V704h320V576H576zM128 832h192v-64H128v64zm320-448H128v64h320v-64zM256 512H128v64h128v-64z"></path></svg>'), - v(e, "class", "btn svelte-1ha11jr"), - v(e, "id", "copy"), - v(e, "title", "Copy bibtex"), - tr(e, "copied", r[0]); + A(e, "class", "btn svelte-1ha11jr"), + A(e, "id", "copy"), + A(e, "title", "Copy bibtex"), + Yi(e, "copied", i[0]); }, m(n, s) { - E(n, e, s), t || ((i = ye(e, "click", r[1])), (t = !0)); + C(n, e, s), t || ((r = be(e, "click", i[1])), (t = !0)); }, p(n, param) { var _param = _sliced_to_array(param, 1), s = _param[0]; - s & 1 && tr(e, "copied", n[0]); + s & 1 && Yi(e, "copied", n[0]); }, - i: Se, - o: Se, + i: ke, + o: ke, d(n) { - n && y(e), (t = !1), i(); + n && y(e), (t = !1), r(); }, }; } - h(_k, "create_fragment"); - function Uk(r, e, t) { - var i, + a(e4, "create_fragment"); + function t4(i, e, t) { + var r, n = !1, s = e.bibtex, - o = h( + o = a( _async_to_generator(function () { var e; return _ts_generator(this, function (_state) { @@ -21938,7 +21284,7 @@ function _ts_generator(thisArg, body) { _state.trys.push([0, 2, , 3]); return [4, navigator.clipboard.writeText(s)]; case 1: - _state.sent(), t(0, (n = !0)), clearInterval(i), (i = setTimeout(() => t(0, (n = !1)), 3e3)); + _state.sent(), t(0, (n = !0)), clearInterval(r), (r = setTimeout(() => t(0, (n = !1)), 3e3)); return [3, 3]; case 2: e = _state.sent(); @@ -21949,27 +21295,29 @@ function _ts_generator(thisArg, body) { } }); }), - "handleCopy", + "handleCopy" ); return ( - (r.$$set = (l) => { - "bibtex" in l && t(2, (s = l.bibtex)); + (i.$$set = (u) => { + "bibtex" in u && t(2, (s = u.bibtex)); }), [n, o, s] ); } - h(Uk, "instance"); - var yh = - ((_class88 = class _class extends se { + a(t4, "instance"); + var dh = + ((_class87 = class _class extends ie { constructor(e) { - super(), le(this, e, Uk, _k, oe, { bibtex: 2 }); + super(), oe(this, e, t4, e4, se, { bibtex: 2 }); } }), - h(_class88, "CopyButton"), - _class88), - IF = yh; - var Ch = - ((_r64 = class r { + (() => { + a(_class87, "CopyButton"); + })(), + _class87), + b1 = dh; + var mh = + ((_i63 = class i { toString() { return "[" .concat(this.stack.filter((e, t) => t % 3 == 0).concat(this.state), "]@") @@ -21977,9 +21325,9 @@ function _ts_generator(thisArg, body) { .concat(this.score ? "!" + this.score : ""); } static start(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; var n = e.parser.context; - return new r(e, [], t, i, i, 0, [], 0, n ? new Io(n, n.start) : null, 0, null); + return new i(e, [], t, r, r, 0, [], 0, n ? new Ro(n, n.start) : null, 0, null); } get context() { return this.curContext ? this.curContext.context : null; @@ -21989,93 +21337,93 @@ function _ts_generator(thisArg, body) { } reduce(e) { var t; - var i = e >> 19, + var r = e >> 19, n = e & 65535, _this_p = this.p, s = _this_p.parser, o = s.dynamicPrecedence(n); - if ((o && (this.score += o), i == 0)) { + if ((o && (this.score += o), r == 0)) { this.pushState(s.getGoto(this.state, n, !0), this.reducePos), n < s.minRepeatTerm && this.storeNode(n, this.reducePos, this.reducePos, 4, !0), this.reduceContext(n, this.reducePos); return; } - var l = this.stack.length - (i - 1) * 3 - (e & 262144 ? 6 : 0), - u = l ? this.stack[l - 2] : this.p.ranges[0].from, - a = this.reducePos - u; - a >= 2e3 && !(!((t = this.p.parser.nodeSet.types[n]) === null || t === void 0) && t.isAnonymous) && (u == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, (this.p.lastBigReductionSize = a)) : this.p.lastBigReductionSize < a && ((this.p.bigReductionCount = 1), (this.p.lastBigReductionStart = u), (this.p.lastBigReductionSize = a))); - var c = l ? this.stack[l - 1] : 0, + var u = this.stack.length - (r - 1) * 3 - (e & 262144 ? 6 : 0), + l = u ? this.stack[u - 2] : this.p.ranges[0].from, + h = this.reducePos - l; + h >= 2e3 && !(!((t = this.p.parser.nodeSet.types[n]) === null || t === void 0) && t.isAnonymous) && (l == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, (this.p.lastBigReductionSize = h)) : this.p.lastBigReductionSize < h && ((this.p.bigReductionCount = 1), (this.p.lastBigReductionStart = l), (this.p.lastBigReductionSize = h))); + var c = u ? this.stack[u - 1] : 0, f = this.bufferBase + this.buffer.length - c; if (n < s.minRepeatTerm || e & 131072) { var d = s.stateFlag(this.state, 1) ? this.pos : this.reducePos; - this.storeNode(n, u, d, f + 4, !0); + this.storeNode(n, l, d, f + 4, !0); } - if (e & 262144) this.state = this.stack[l]; + if (e & 262144) this.state = this.stack[u]; else { - var d1 = this.stack[l - 3]; + var d1 = this.stack[u - 3]; this.state = s.getGoto(d1, n, !0); } - for (; this.stack.length > l; ) this.stack.pop(); - this.reduceContext(n, u); + for (; this.stack.length > u; ) this.stack.pop(); + this.reduceContext(n, l); } - storeNode(e, t, i) { + storeNode(e, t, r) { var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1; if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) { var o = this, - l = this.buffer.length; - if ((l == 0 && o.parent && ((l = o.bufferBase - o.parent.bufferBase), (o = o.parent)), l > 0 && o.buffer[l - 4] == 0 && o.buffer[l - 1] > -1)) { - if (t == i) return; - if (o.buffer[l - 2] >= t) { - o.buffer[l - 2] = i; + u = this.buffer.length; + if ((u == 0 && o.parent && ((u = o.bufferBase - o.parent.bufferBase), (o = o.parent)), u > 0 && o.buffer[u - 4] == 0 && o.buffer[u - 1] > -1)) { + if (t == r) return; + if (o.buffer[u - 2] >= t) { + o.buffer[u - 2] = r; return; } } } - if (!s || this.pos == i) this.buffer.push(e, t, i, n); + if (!s || this.pos == r) this.buffer.push(e, t, r, n); else { var o1 = this.buffer.length; - if (o1 > 0 && this.buffer[o1 - 4] != 0) for (; o1 > 0 && this.buffer[o1 - 2] > i; ) (this.buffer[o1] = this.buffer[o1 - 4]), (this.buffer[o1 + 1] = this.buffer[o1 - 3]), (this.buffer[o1 + 2] = this.buffer[o1 - 2]), (this.buffer[o1 + 3] = this.buffer[o1 - 1]), (o1 -= 4), n > 4 && (n -= 4); - (this.buffer[o1] = e), (this.buffer[o1 + 1] = t), (this.buffer[o1 + 2] = i), (this.buffer[o1 + 3] = n); + if (o1 > 0 && this.buffer[o1 - 4] != 0) for (; o1 > 0 && this.buffer[o1 - 2] > r; ) (this.buffer[o1] = this.buffer[o1 - 4]), (this.buffer[o1 + 1] = this.buffer[o1 - 3]), (this.buffer[o1 + 2] = this.buffer[o1 - 2]), (this.buffer[o1 + 3] = this.buffer[o1 - 1]), (o1 -= 4), n > 4 && (n -= 4); + (this.buffer[o1] = e), (this.buffer[o1 + 1] = t), (this.buffer[o1 + 2] = r), (this.buffer[o1 + 3] = n); } } - shift(e, t, i) { + shift(e, t, r) { var n = this.pos; if (e & 131072) this.pushState(e & 65535, this.pos); - else if (e & 262144) (this.pos = i), this.shiftContext(t, n), t <= this.p.parser.maxNode && this.buffer.push(t, n, i, 4); + else if (e & 262144) (this.pos = r), this.shiftContext(t, n), t <= this.p.parser.maxNode && this.buffer.push(t, n, r, 4); else { var s = e, _this_p = this.p, o = _this_p.parser; - (i > this.pos || t <= o.maxNode) && ((this.pos = i), o.stateFlag(s, 1) || (this.reducePos = i)), this.pushState(s, n), this.shiftContext(t, n), t <= o.maxNode && this.buffer.push(t, n, i, 4); + (r > this.pos || t <= o.maxNode) && ((this.pos = r), o.stateFlag(s, 1) || (this.reducePos = r)), this.pushState(s, n), this.shiftContext(t, n), t <= o.maxNode && this.buffer.push(t, n, r, 4); } } - apply(e, t, i) { - e & 65536 ? this.reduce(e) : this.shift(e, t, i); + apply(e, t, r) { + e & 65536 ? this.reduce(e) : this.shift(e, t, r); } useNode(e, t) { - var i = this.p.reused.length - 1; - (i < 0 || this.p.reused[i] != e) && (this.p.reused.push(e), i++); + var r = this.p.reused.length - 1; + (r < 0 || this.p.reused[r] != e) && (this.p.reused.push(e), r++); var n = this.pos; - (this.reducePos = this.pos = n + e.length), this.pushState(t, n), this.buffer.push(i, n, this.reducePos, -1), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length))); + (this.reducePos = this.pos = n + e.length), this.pushState(t, n), this.buffer.push(r, n, this.reducePos, -1), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length))); } split() { var e = this, t = e.buffer.length; for (; t > 0 && e.buffer[t - 2] > e.reducePos; ) t -= 4; - var i = e.buffer.slice(t), + var r = e.buffer.slice(t), n = e.bufferBase + t; for (; e && n == e.bufferBase; ) e = e.parent; - return new r(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, i, n, this.curContext, this.lookAhead, e); + return new i(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r, n, this.curContext, this.lookAhead, e); } recoverByDelete(e, t) { - var i = e <= this.p.parser.maxNode; - i && this.storeNode(e, this.pos, t, 4), this.storeNode(0, this.pos, t, i ? 8 : 4), (this.pos = this.reducePos = t), (this.score -= 190); + var r = e <= this.p.parser.maxNode; + r && this.storeNode(e, this.pos, t, 4), this.storeNode(0, this.pos, t, r ? 8 : 4), (this.pos = this.reducePos = t), (this.score -= 190); } canShift(e) { - for (var t = new Bh(this); ; ) { - var i = this.p.parser.stateSlot(t.state, 4) || this.p.parser.hasAction(t.state, e); - if (i == 0) return !1; - if (!(i & 65536)) return !0; - t.reduce(i); + for (var t = new gh(this); ; ) { + var r = this.p.parser.stateSlot(t.state, 4) || this.p.parser.hasAction(t.state, e); + if (r == 0) return !1; + if (!(r & 65536)) return !0; + t.reduce(r); } } recoverByInsert(e) { @@ -22084,65 +21432,35 @@ function _ts_generator(thisArg, body) { if (t.length > 8 || this.stack.length >= 120) { var _loop = function (s1) { var o = t[s1 + 1]; - n.some((l, u) => u & 1 && l == o) || n.push(t[s1], o); + n.some((u, l) => l & 1 && u == o) || n.push(t[s1], o); }; var n = []; for (var s = 0, o; s < t.length; s += 2) (o = t[s + 1]) != this.state && this.p.parser.hasAction(o, e) && n.push(t[s], o); if (this.stack.length < 120) for (var s1 = 0; n.length < 8 && s1 < t.length; s1 += 2) _loop(s1); t = n; } - var i = []; - for (var n1 = 0; n1 < t.length && i.length < 4; n1 += 2) { + var r = []; + for (var n1 = 0; n1 < t.length && r.length < 4; n1 += 2) { var s2 = t[n1 + 1]; if (s2 == this.state) continue; var o1 = this.split(); - o1.pushState(s2, this.pos), o1.storeNode(0, o1.pos, o1.pos, 4, !0), o1.shiftContext(t[n1], this.pos), (o1.score -= 200), i.push(o1); + o1.pushState(s2, this.pos), o1.storeNode(0, o1.pos, o1.pos, 4, !0), o1.shiftContext(t[n1], this.pos), (o1.score -= 200), r.push(o1); } - return i; + return r; } forceReduce() { + var e = this.p.parser.stateSlot(this.state, 5); + if (!(e & 65536)) return !1; var _this_p = this.p, - e = _this_p.parser, - t = e.stateSlot(this.state, 5); - if (!(t & 65536)) return !1; - if (!e.validAction(this.state, t)) { - var i = t >> 19, - n = t & 65535, - s = this.stack.length - i * 3; - if (s < 0 || e.getGoto(this.stack[s], n, !1) < 0) { - var o = this.findForcedReduction(); - if (o == null) return !1; - t = o; - } - this.storeNode(0, this.pos, this.pos, 4, !0), (this.score -= 100); - } - return (this.reducePos = this.pos), this.reduce(t), !0; - } - findForcedReduction() { - var _this_p = this.p, - e = _this_p.parser, - t = [], - i = h((n, s) => { - if (!t.includes(n)) - return ( - t.push(n), - e.allActions(n, (o) => { - if (!(o & 393216)) - if (o & 65536) { - var l = (o >> 19) - s; - if (l > 1) { - var u = o & 65535, - a = this.stack.length - l * 3; - if (a >= 0 && e.getGoto(this.stack[a], u, !1) >= 0) return (l << 19) | 65536 | u; - } - } else { - var l1 = i(o, s + 1); - if (l1 != null) return l1; - } - }) - ); - }, "explore"); - return i(this.state, 0); + t = _this_p.parser; + if (!t.validAction(this.state, e)) { + var r = e >> 19, + n = e & 65535, + s = this.stack.length - r * 3; + if (s < 0 || t.getGoto(this.stack[s], n, !1) < 0) return !1; + this.storeNode(0, this.reducePos, this.reducePos, 4, !0), (this.score -= 100); + } + return (this.reducePos = this.pos), this.reduce(e), !0; } forceAll() { for (; !this.p.parser.stateFlag(this.state, 2); ) @@ -22180,15 +21498,15 @@ function _ts_generator(thisArg, body) { } emitContext() { var e = this.buffer.length - 1; - (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3); + (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.reducePos, this.reducePos, -3); } emitLookAhead() { var e = this.buffer.length - 1; - (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4); + (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.reducePos, this.reducePos, -4); } updateContext(e) { if (e != this.curContext.context) { - var t = new Io(this.curContext.tracker, e); + var t = new Ro(this.curContext.tracker, e); t.hash != this.curContext.hash && this.emitContext(), (this.curContext = t); } } @@ -22198,27 +21516,35 @@ function _ts_generator(thisArg, body) { close() { this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead(); } - constructor(e, t, i, n, s, o, l, u, a, ref, f) { + constructor(e, t, r, n, s, o, u, l, h, ref, f) { var c = ref === void 0 ? 0 : ref; - (this.p = e), (this.stack = t), (this.state = i), (this.reducePos = n), (this.pos = s), (this.score = o), (this.buffer = l), (this.bufferBase = u), (this.curContext = a), (this.lookAhead = c), (this.parent = f); + (this.p = e), (this.stack = t), (this.state = r), (this.reducePos = n), (this.pos = s), (this.score = o), (this.buffer = u), (this.bufferBase = l), (this.curContext = h), (this.lookAhead = c), (this.parent = f); } }), - h(_r64, "Stack"), - _r64), - Io = - ((_class89 = class _class { + (() => { + a(_i63, "Stack"); + })(), + _i63), + Ro = + ((_class88 = class _class { constructor(e, t) { (this.tracker = e), (this.context = t), (this.hash = e.strict ? e.hash(t) : 0); } }), - h(_class89, "StackContext"), - _class89), - Bh = - ((_class90 = class _class { + (() => { + a(_class88, "StackContext"); + })(), + _class88), + F1; + (function (i) { + (i[(i.Insert = 200)] = "Insert"), (i[(i.Delete = 190)] = "Delete"), (i[(i.Reduce = 100)] = "Reduce"), (i[(i.MaxNext = 4)] = "MaxNext"), (i[(i.MaxInsertStackDepth = 300)] = "MaxInsertStackDepth"), (i[(i.DampenInsertStackDepth = 120)] = "DampenInsertStackDepth"), (i[(i.MinBigReduction = 2e3)] = "MinBigReduction"); + })(F1 || (F1 = {})); + var gh = + ((_class89 = class _class { reduce(e) { var t = e & 65535, - i = e >> 19; - i == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), (this.base += 3)) : (this.base -= (i - 1) * 3); + r = e >> 19; + r == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), (this.base += 3)) : (this.base -= (r - 1) * 3); var n = this.start.p.parser.getGoto(this.stack[this.base - 3], t, !0); this.state = n; } @@ -22226,13 +21552,15 @@ function _ts_generator(thisArg, body) { (this.start = e), (this.state = e.state), (this.stack = e.stack), (this.base = this.stack.length); } }), - h(_class90, "SimulatedStack"), - _class90), - vh = - ((_r65 = class r { + (() => { + a(_class89, "SimulatedStack"); + })(), + _class89), + Dh = + ((_i64 = class i { static create(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.bufferBase + e.buffer.length; - return new r(e, t, t - e.bufferBase); + return new i(e, t, t - e.bufferBase); } maybeNext() { var e = this.stack.parent; @@ -22254,61 +21582,65 @@ function _ts_generator(thisArg, body) { (this.index -= 4), (this.pos -= 4), this.index == 0 && this.maybeNext(); } fork() { - return new r(this.stack, this.pos, this.index); + return new i(this.stack, this.pos, this.index); } - constructor(e, t, i) { - (this.stack = e), (this.pos = t), (this.index = i), (this.buffer = e.buffer), this.index == 0 && this.maybeNext(); + constructor(e, t, r) { + (this.stack = e), (this.pos = t), (this.index = r), (this.buffer = e.buffer), this.index == 0 && this.maybeNext(); } }), - h(_r65, "StackBufferCursor"), - _r65); - function Ln(r) { + (() => { + a(_i64, "StackBufferCursor"); + })(), + _i64); + function yn(i) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Uint16Array; - if (typeof r != "string") return r; + if (typeof i != "string") return i; var t = null; - for (var i = 0, n = 0; i < r.length; ) { + for (var r = 0, n = 0; r < i.length; ) { var s = 0; for (;;) { - var o = r.charCodeAt(i++), - l = !1; + var o = i.charCodeAt(r++), + u = !1; if (o == 126) { s = 65535; break; } o >= 92 && o--, o >= 34 && o--; - var u = o - 32; - if ((u >= 46 && ((u -= 46), (l = !0)), (s += u), l)) break; + var l = o - 32; + if ((l >= 46 && ((l -= 46), (u = !0)), (s += l), u)) break; s *= 46; } t ? (t[n++] = s) : (t = new e(s)); } return t; } - h(Ln, "decodeArray"); - var kr = - ((_class91 = class _class { + a(yn, "decodeArray"); + var Er = + ((_class90 = class _class { constructor() { (this.start = -1), (this.value = -1), (this.end = -1), (this.extended = -1), (this.lookAhead = 0), (this.mask = 0), (this.context = 0); } }), - h(_class91, "CachedToken"), - _class91), - $F = new kr(), - xh = - ((_class92 = class _class { + (() => { + a(_class90, "CachedToken"); + })(), + _class90), + y1 = new Er(), + bh = + ((_class91 = class _class { resolveOffset(e, t) { - var i = this.range, + var r = this.range, n = this.rangeIndex, s = this.pos + e; - for (; s < i.from; ) { + for (; s < r.from; ) { if (!n) return null; var o = this.ranges[--n]; - (s -= i.from - o.to), (i = o); + (s -= r.from - o.to), (r = o); } - for (; t < 0 ? s > i.to : s >= i.to; ) { + for (; t < 0 ? s > r.to : s >= r.to; ) { if (n == this.ranges.length - 1) return null; var o1 = this.ranges[++n]; - (s += o1.from - i.to), (i = o1); + (s += o1.from - r.to), (r = o1); } return s; } @@ -22340,27 +21672,27 @@ function _ts_generator(thisArg, body) { } peek(e) { var t = this.chunkOff + e, - i, + r, n; - if (t >= 0 && t < this.chunk.length) (i = this.pos + e), (n = this.chunk.charCodeAt(t)); + if (t >= 0 && t < this.chunk.length) (r = this.pos + e), (n = this.chunk.charCodeAt(t)); else { var s = this.resolveOffset(e, 1); if (s == null) return -1; - if (((i = s), i >= this.chunk2Pos && i < this.chunk2Pos + this.chunk2.length)) n = this.chunk2.charCodeAt(i - this.chunk2Pos); + if (((r = s), r >= this.chunk2Pos && r < this.chunk2Pos + this.chunk2.length)) n = this.chunk2.charCodeAt(r - this.chunk2Pos); else { var o = this.rangeIndex, - l = this.range; - for (; l.to <= i; ) l = this.ranges[++o]; - (this.chunk2 = this.input.chunk((this.chunk2Pos = i))), i + this.chunk2.length > l.to && (this.chunk2 = this.chunk2.slice(0, l.to - i)), (n = this.chunk2.charCodeAt(0)); + u = this.range; + for (; u.to <= r; ) u = this.ranges[++o]; + (this.chunk2 = this.input.chunk((this.chunk2Pos = r))), r + this.chunk2.length > u.to && (this.chunk2 = this.chunk2.slice(0, u.to - r)), (n = this.chunk2.charCodeAt(0)); } } - return i >= this.token.lookAhead && (this.token.lookAhead = i + 1), n; + return r >= this.token.lookAhead && (this.token.lookAhead = r + 1), n; } acceptToken(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - var i = t ? this.resolveOffset(t, -1) : this.pos; - if (i == null || i < this.token.start) throw new RangeError("Token end out of bounds"); - (this.token.value = e), (this.token.end = i); + var r = t ? this.resolveOffset(t, -1) : this.pos; + if (r == null || r < this.token.start) throw new RangeError("Token end out of bounds"); + (this.token.value = e), (this.token.end = r); } getChunk() { if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) { @@ -22390,7 +21722,7 @@ function _ts_generator(thisArg, body) { return (this.pos = this.chunkPos = this.end), (this.range = this.ranges[(this.rangeIndex = this.ranges.length - 1)]), (this.chunk = ""), (this.next = -1); } reset(e, t) { - if ((t ? ((this.token = t), (t.start = e), (t.lookAhead = e + 1), (t.value = t.extended = -1)) : (this.token = $F), this.pos != e)) { + if ((t ? ((this.token = t), (t.start = e), (t.lookAhead = e + 1), (t.value = t.extended = -1)) : (this.token = y1), this.pos != e)) { if (((this.pos = e), e == this.end)) return this.setDone(), this; for (; e < this.range.from; ) this.range = this.ranges[--this.rangeIndex]; for (; e >= this.range.to; ) this.range = this.ranges[++this.rangeIndex]; @@ -22402,7 +21734,7 @@ function _ts_generator(thisArg, body) { if (e >= this.chunkPos && t <= this.chunkPos + this.chunk.length) return this.chunk.slice(e - this.chunkPos, t - this.chunkPos); if (e >= this.chunk2Pos && t <= this.chunk2Pos + this.chunk2.length) return this.chunk2.slice(e - this.chunk2Pos, t - this.chunk2Pos); if (e >= this.range.from && t <= this.range.to) return this.input.read(e, t); - var i = ""; + var r = ""; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -22410,7 +21742,7 @@ function _ts_generator(thisArg, body) { for (var _iterator = this.ranges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var n = _step.value; if (n.from >= t) break; - n.to > e && (i += this.input.read(Math.max(n.from, e), Math.min(n.to, t))); + n.to > e && (r += this.input.read(Math.max(n.from, e), Math.min(n.to, t))); } } catch (err) { _didIteratorError = true; @@ -22426,117 +21758,124 @@ function _ts_generator(thisArg, body) { } } } - return i; + return r; } constructor(e, t) { - (this.input = e), (this.ranges = t), (this.chunk = ""), (this.chunkOff = 0), (this.chunk2 = ""), (this.chunk2Pos = 0), (this.next = -1), (this.token = $F), (this.rangeIndex = 0), (this.pos = this.chunkPos = t[0].from), (this.range = t[0]), (this.end = t[t.length - 1].to), this.readNext(); + (this.input = e), (this.ranges = t), (this.chunk = ""), (this.chunkOff = 0), (this.chunk2 = ""), (this.chunk2Pos = 0), (this.next = -1), (this.token = y1), (this.rangeIndex = 0), (this.pos = this.chunkPos = t[0].from), (this.range = t[0]), (this.end = t[t.length - 1].to), this.readNext(); } }), - h(_class92, "InputStream"), - _class92), - mi = - ((_class93 = class _class { + (() => { + a(_class91, "InputStream"); + })(), + _class91), + li = + ((_class92 = class _class { token(e, t) { var _t_p = t.p, - i = _t_p.parser; - HF(this.data, e, t, this.id, i.data, i.tokenPrecTable); + r = _t_p.parser; + x1(this.data, e, t, this.id, r.data, r.tokenPrecTable); } constructor(e, t) { (this.data = e), (this.id = t); } }), - h(_class93, "TokenGroup"), - _class93); - mi.prototype.contextual = mi.prototype.fallback = mi.prototype.extend = !1; - var Ah = - ((_class94 = class _class { + (() => { + a(_class92, "TokenGroup"); + })(), + _class92); + li.prototype.contextual = li.prototype.fallback = li.prototype.extend = !1; + var Fh = + ((_class93 = class _class { token(e, t) { - var i = e.pos, - n = 0; - for (;;) { - var s = e.next < 0, - o = e.resolveOffset(1, 1); - if ((HF(this.data, e, t, 0, this.data, this.precTable), e.token.value > -1)) break; + var r = e.pos, + n; + for (; (n = e.pos), x1(this.data, e, t, 0, this.data, this.precTable), !(e.token.value > -1); ) { if (this.elseToken == null) return; - if ((s || n++, o == null)) break; - e.reset(o, e.token); + if (e.next < 0) break; + e.advance(), e.reset(n + 1, e.token); } - n && (e.reset(i, e.token), e.acceptToken(this.elseToken, n)); + n > r && (e.reset(r, e.token), e.acceptToken(this.elseToken, n - r)); } - constructor(e, t, i) { - (this.precTable = t), (this.elseToken = i), (this.data = typeof e == "string" ? Ln(e) : e); + constructor(e, t, r) { + (this.precTable = t), (this.elseToken = r), (this.data = typeof e == "string" ? yn(e) : e); } }), - h(_class94, "LocalTokenGroup"), - _class94); - Ah.prototype.contextual = mi.prototype.fallback = mi.prototype.extend = !1; - function HF(r, e, t, i, n, s) { + (() => { + a(_class93, "LocalTokenGroup"); + })(), + _class93); + Fh.prototype.contextual = li.prototype.fallback = li.prototype.extend = !1; + function x1(i, e, t, r, n, s) { var o = 0, - l = 1 << i, + u = 1 << r, _t_p_parser = t.p.parser, - u = _t_p_parser.dialect; - e: for (; l & r[o]; ) { - var a = r[o + 1]; - for (var p = o + 3; p < a; p += 2) - if ((r[p + 1] & l) > 0) { - var m = r[p]; - if (u.allows(m) && (e.token.value == -1 || e.token.value == m || Ok(m, e.token.value, n, s))) { + l = _t_p_parser.dialect; + e: for (; u & i[o]; ) { + var h = i[o + 1]; + for (var p = o + 3; p < h; p += 2) + if ((i[p + 1] & u) > 0) { + var m = i[p]; + if (l.allows(m) && (e.token.value == -1 || e.token.value == m || r4(m, e.token.value, n, s))) { e.acceptToken(m); break; } } var c = e.next, f = 0, - d = r[o + 2]; - if (e.next < 0 && d > f && r[a + d * 3 - 3] == 65535 && r[a + d * 3 - 3] == 65535) { - o = r[a + d * 3 - 1]; + d = i[o + 2]; + if (e.next < 0 && d > f && i[h + d * 3 - 3] == 65535 && i[h + d * 3 - 3] == 65535) { + o = i[h + d * 3 - 1]; continue e; } for (; f < d; ) { var p1 = (f + d) >> 1, - m1 = a + p1 + (p1 << 1), - F = r[m1], - g = r[m1 + 1] || 65536; - if (c < F) d = p1; + m1 = h + p1 + (p1 << 1), + b = i[m1], + g = i[m1 + 1] || 65536; + if (c < b) d = p1; else if (c >= g) f = p1 + 1; else { - (o = r[m1 + 2]), e.advance(); + (o = i[m1 + 2]), e.advance(); continue e; } } break; } } - h(HF, "readToken"); - function qF(r, e, t) { - for (var i = e, n; (n = r[i]) != 65535; i++) if (n == t) return i - e; + a(x1, "readToken"); + function C1(i, e, t) { + for (var r = e, n; (n = i[r]) != 65535; r++) if (n == t) return r - e; return -1; } - h(qF, "findOffset"); - function Ok(r, e, t, i) { - var n = qF(t, i, e); - return n < 0 || qF(t, i, r) < n; - } - h(Ok, "overrides"); - var lt = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG), - Eh = null; - function VF(r, e, t) { - var i = r.cursor(Ue.IncludeAnonymous); - for (i.moveTo(e); ; ) - if (!(t < 0 ? i.childBefore(e) : i.childAfter(e))) + a(C1, "findOffset"); + function r4(i, e, t, r) { + var n = C1(t, r, e); + return n < 0 || C1(t, r, i) < n; + } + a(r4, "overrides"); + var Et = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG), + ph = null, + A1; + (function (i) { + i[(i.Margin = 25)] = "Margin"; + })(A1 || (A1 = {})); + function E1(i, e, t) { + var r = i.cursor(Re.IncludeAnonymous); + for (r.moveTo(e); ; ) + if (!(t < 0 ? r.childBefore(e) : r.childAfter(e))) for (;;) { - if ((t < 0 ? i.to < e : i.from > e) && !i.type.isError) return t < 0 ? Math.max(0, Math.min(i.to - 1, e - 25)) : Math.min(r.length, Math.max(i.from + 1, e + 25)); - if (t < 0 ? i.prevSibling() : i.nextSibling()) break; - if (!i.parent()) return t < 0 ? 0 : r.length; + if ((t < 0 ? r.to < e : r.from > e) && !r.type.isError) return t < 0 ? Math.max(0, Math.min(r.to - 1, e - 25)) : Math.min(i.length, Math.max(r.from + 1, e + 25)); + if (t < 0 ? r.prevSibling() : r.nextSibling()) break; + if (!r.parent()) return t < 0 ? 0 : i.length; } } - h(VF, "cutAt"); - var kh = - ((_class95 = class _class { + a(E1, "cutAt"); + var yh = + ((_class94 = class _class { nextFragment() { var e = (this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++]); if (e) { - for (this.safeFrom = e.openStart ? VF(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? VF(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; ) this.trees.pop(), this.start.pop(), this.index.pop(); + for (this.safeFrom = e.openStart ? E1(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? E1(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; ) this.trees.pop(), this.start.pop(), this.index.pop(); this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), (this.nextStart = this.safeFrom); } else this.nextStart = 1e9; } @@ -22547,22 +21886,22 @@ function _ts_generator(thisArg, body) { for (;;) { var t = this.trees.length - 1; if (t < 0) return this.nextFragment(), null; - var i = this.trees[t], + var r = this.trees[t], n = this.index[t]; - if (n == i.children.length) { + if (n == r.children.length) { this.trees.pop(), this.start.pop(), this.index.pop(); continue; } - var s = i.children[n], - o = this.start[t] + i.positions[n]; + var s = r.children[n], + o = this.start[t] + r.positions[n]; if (o > e) return (this.nextStart = o), null; - if (s instanceof Qe) { + if (s instanceof Be) { if (o == e) { if (o < this.safeFrom) return null; - var l = o + s.length; - if (l <= this.safeTo) { - var u = s.prop(ue.lookAhead); - if (!u || l + u < this.fragment.to) return s; + var u = o + s.length; + if (u <= this.safeTo) { + var l = s.prop(ue.lookAhead); + if (!l || u + l < this.fragment.to) return s; } } this.index[t]++, o + s.length >= Math.max(this.safeFrom, e) && (this.trees.push(s), this.start.push(o), this.index.push(0)); @@ -22573,290 +21912,309 @@ function _ts_generator(thisArg, body) { (this.fragments = e), (this.nodeSet = t), (this.i = 0), (this.fragment = null), (this.safeFrom = -1), (this.safeTo = -1), (this.trees = []), (this.start = []), (this.index = []), this.nextFragment(); } }), - h(_class95, "FragmentCursor"), - _class95), - Sh = - ((_class96 = class _class { + (() => { + a(_class94, "FragmentCursor"); + })(), + _class94), + Ch = + ((_class95 = class _class { getActions(e) { var t = 0, - i = null, + r = null, _e_p = e.p, n = _e_p.parser, s = n.tokenizers, o = n.stateSlot(e.state, 3), - l = e.curContext ? e.curContext.hash : 0, - u = 0; - for (var a = 0; a < s.length; a++) { - if (!((1 << a) & o)) continue; - var c = s[a], - f = this.tokens[a]; - if (!(i && !c.fallback) && ((c.contextual || f.start != e.pos || f.mask != o || f.context != l) && (this.updateCachedToken(f, c, e), (f.mask = o), (f.context = l)), f.lookAhead > f.end + 25 && (u = Math.max(f.lookAhead, u)), f.value != 0)) { + u = e.curContext ? e.curContext.hash : 0, + l = 0; + for (var h = 0; h < s.length; h++) { + if (!((1 << h) & o)) continue; + var c = s[h], + f = this.tokens[h]; + if (!(r && !c.fallback) && ((c.contextual || f.start != e.pos || f.mask != o || f.context != u) && (this.updateCachedToken(f, c, e), (f.mask = o), (f.context = u)), f.lookAhead > f.end + 25 && (l = Math.max(f.lookAhead, l)), f.value != 0)) { var d = t; - if ((f.extended > -1 && (t = this.addActions(e, f.extended, f.end, t)), (t = this.addActions(e, f.value, f.end, t)), !c.extend && ((i = f), t > d))) break; + if ((f.extended > -1 && (t = this.addActions(e, f.extended, f.end, t)), (t = this.addActions(e, f.value, f.end, t)), !c.extend && ((r = f), t > d))) break; } } for (; this.actions.length > t; ) this.actions.pop(); - return u && e.setLookAhead(u), !i && e.pos == this.stream.end && ((i = new kr()), (i.value = e.p.parser.eofTerm), (i.start = i.end = e.pos), (t = this.addActions(e, i.value, i.end, t))), (this.mainToken = i), this.actions; + return l && e.setLookAhead(l), !r && e.pos == this.stream.end && ((r = new Er()), (r.value = e.p.parser.eofTerm), (r.start = r.end = e.pos), (t = this.addActions(e, r.value, r.end, t))), (this.mainToken = r), this.actions; } getMainToken(e) { if (this.mainToken) return this.mainToken; - var t = new kr(), - i = e.pos, + var t = new Er(), + r = e.pos, n = e.p; - return (t.start = i), (t.end = Math.min(i + 1, n.stream.end)), (t.value = i == n.stream.end ? n.parser.eofTerm : 0), t; + return (t.start = r), (t.end = Math.min(r + 1, n.stream.end)), (t.value = r == n.stream.end ? n.parser.eofTerm : 0), t; } - updateCachedToken(e, t, i) { - var n = this.stream.clipPos(i.pos); - if ((t.token(this.stream.reset(n, e), i), e.value > -1)) { - var _i_p = i.p, - s = _i_p.parser; + updateCachedToken(e, t, r) { + var n = this.stream.clipPos(r.pos); + if ((t.token(this.stream.reset(n, e), r), e.value > -1)) { + var _r_p = r.p, + s = _r_p.parser; for (var o = 0; o < s.specialized.length; o++) if (s.specialized[o] == e.value) { - var l = s.specializers[o](this.stream.read(e.start, e.end), i); - if (l >= 0 && i.p.parser.dialect.allows(l >> 1)) { - l & 1 ? (e.extended = l >> 1) : (e.value = l >> 1); + var u = s.specializers[o](this.stream.read(e.start, e.end), r); + if (u >= 0 && r.p.parser.dialect.allows(u >> 1)) { + u & 1 ? (e.extended = u >> 1) : (e.value = u >> 1); break; } } } else (e.value = 0), (e.end = this.stream.clipPos(n + 1)); } - putAction(e, t, i, n) { + putAction(e, t, r, n) { for (var s = 0; s < n; s += 3) if (this.actions[s] == e) return n; - return (this.actions[n++] = e), (this.actions[n++] = t), (this.actions[n++] = i), n; + return (this.actions[n++] = e), (this.actions[n++] = t), (this.actions[n++] = r), n; } - addActions(e, t, i, n) { + addActions(e, t, r, n) { var s = e.state, _e_p = e.p, o = _e_p.parser, - l = o.data; - for (var u = 0; u < 2; u++) - for (var a = o.stateSlot(s, u ? 2 : 1); ; a += 3) { - if (l[a] == 65535) - if (l[a + 1] == 1) a = ei(l, a + 2); + u = o.data; + for (var l = 0; l < 2; l++) + for (var h = o.stateSlot(s, l ? 2 : 1); ; h += 3) { + if (u[h] == 65535) + if (u[h + 1] == 1) h = Gt(u, h + 2); else { - n == 0 && l[a + 1] == 2 && (n = this.putAction(ei(l, a + 2), t, i, n)); + n == 0 && u[h + 1] == 2 && (n = this.putAction(Gt(u, h + 2), t, r, n)); break; } - l[a] == t && (n = this.putAction(ei(l, a + 1), t, i, n)); + u[h] == t && (n = this.putAction(Gt(u, h + 1), t, r, n)); } return n; } constructor(e, t) { - (this.stream = t), (this.tokens = []), (this.mainToken = null), (this.actions = []), (this.tokens = e.tokenizers.map((i) => new kr())); + (this.stream = t), (this.tokens = []), (this.mainToken = null), (this.actions = []), (this.tokens = e.tokenizers.map((r) => new Er())); } }), - h(_class96, "TokenCache"), - _class96), - wh = - ((_class97 = class _class { - get parsedPos() { - return this.minStackPos; - } - advance() { - var e = this.stacks, - t = this.minStackPos, - i = (this.stacks = []), - n, - s; - if (this.bigReductionCount > 300 && e.length == 1) { - var _e = _sliced_to_array(e, 1), - o = _e[0]; - for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; ); - this.bigReductionCount = this.lastBigReductionSize = 0; - } - for (var o1 = 0; o1 < e.length; o1++) { - var l = e[o1]; - for (;;) { - if (((this.tokens.mainToken = null), l.pos > t)) i.push(l); - else { - if (this.advanceStack(l, i, e)) continue; - { - n || ((n = []), (s = [])), n.push(l); - var u = this.tokens.getMainToken(l); - s.push(u.value, u.end); - } + (() => { + a(_class95, "TokenCache"); + })(), + _class95), + v1; + (function (i) { + (i[(i.Distance = 5)] = "Distance"), + (i[(i.MaxRemainingPerStep = 3)] = "MaxRemainingPerStep"), + (i[(i.MinBufferLengthPrune = 500)] = "MinBufferLengthPrune"), + (i[(i.ForceReduceLimit = 10)] = "ForceReduceLimit"), + (i[(i.CutDepth = 15e3)] = "CutDepth"), + (i[(i.CutTo = 9e3)] = "CutTo"), + (i[(i.MaxLeftAssociativeReductionCount = 300)] = "MaxLeftAssociativeReductionCount"), + (i[(i.MaxStackCount = 12)] = "MaxStackCount"); + })(v1 || (v1 = {})); + var Ah = + ((_class96 = class _class { + get parsedPos() { + return this.minStackPos; + } + advance() { + var e = this.stacks, + t = this.minStackPos, + r = (this.stacks = []), + n, + s; + if (this.bigReductionCount > 300 && e.length == 1) { + var _e = _sliced_to_array(e, 1), + o = _e[0]; + for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; ); + this.bigReductionCount = this.lastBigReductionSize = 0; + } + for (var o1 = 0; o1 < e.length; o1++) { + var u = e[o1]; + for (;;) { + if (((this.tokens.mainToken = null), u.pos > t)) r.push(u); + else { + if (this.advanceStack(u, r, e)) continue; + { + n || ((n = []), (s = [])), n.push(u); + var l = this.tokens.getMainToken(u); + s.push(l.value, l.end); } - break; } + break; } - if (!i.length) { - var o2 = n && Tk(n); - if (o2) return lt && console.log("Finish with " + this.stackID(o2)), this.stackToTree(o2); - if (this.parser.strict) throw (lt && n && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + t)); - this.recovering || (this.recovering = 5); - } - if (this.recovering && n) { - var o3 = this.stoppedAt != null && n[0].pos > this.stoppedAt ? n[0] : this.runRecovery(n, s, i); - if (o3) return lt && console.log("Force-finish " + this.stackID(o3)), this.stackToTree(o3.forceAll()); - } - if (this.recovering) { - var o4 = this.recovering == 1 ? 1 : this.recovering * 3; - if (i.length > o4) for (i.sort((l, u) => u.score - l.score); i.length > o4; ) i.pop(); - i.some((l) => l.reducePos > t) && this.recovering--; - } else if (i.length > 1) { - e: for (var o5 = 0; o5 < i.length - 1; o5++) { - var l1 = i[o5]; - for (var u1 = o5 + 1; u1 < i.length; u1++) { - var a = i[u1]; - if (l1.sameState(a) || (l1.buffer.length > 500 && a.buffer.length > 500)) - if ((l1.score - a.score || l1.buffer.length - a.buffer.length) > 0) i.splice(u1--, 1); - else { - i.splice(o5--, 1); - continue e; - } - } + } + if (!r.length) { + var o2 = n && n4(n); + if (o2) return this.stackToTree(o2); + if (this.parser.strict) throw (Et && n && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + t)); + this.recovering || (this.recovering = 5); + } + if (this.recovering && n) { + var o3 = this.stoppedAt != null && n[0].pos > this.stoppedAt ? n[0] : this.runRecovery(n, s, r); + if (o3) return this.stackToTree(o3.forceAll()); + } + if (this.recovering) { + var o4 = this.recovering == 1 ? 1 : this.recovering * 3; + if (r.length > o4) for (r.sort((u, l) => l.score - u.score); r.length > o4; ) r.pop(); + r.some((u) => u.reducePos > t) && this.recovering--; + } else if (r.length > 1) { + e: for (var o5 = 0; o5 < r.length - 1; o5++) { + var u1 = r[o5]; + for (var l1 = o5 + 1; l1 < r.length; l1++) { + var h = r[l1]; + if (u1.sameState(h) || (u1.buffer.length > 500 && h.buffer.length > 500)) + if ((u1.score - h.score || u1.buffer.length - h.buffer.length) > 0) r.splice(l1--, 1); + else { + r.splice(o5--, 1); + continue e; + } } - i.length > 12 && i.splice(12, i.length - 12); } - this.minStackPos = i[0].pos; - for (var o6 = 1; o6 < i.length; o6++) i[o6].pos < this.minStackPos && (this.minStackPos = i[o6].pos); - return null; - } - stopAt(e) { - if (this.stoppedAt != null && this.stoppedAt < e) throw new RangeError("Can't move stoppedAt forward"); - this.stoppedAt = e; + r.length > 12 && r.splice(12, r.length - 12); } - advanceStack(e, t, i) { - var n = e.pos, - _this = this, - s = _this.parser, - o = lt ? this.stackID(e) + " -> " : ""; - if (this.stoppedAt != null && n > this.stoppedAt) return e.forceReduce() ? e : null; - if (this.fragments) { - var a = e.curContext && e.curContext.tracker.strict, - c = a ? e.curContext.hash : 0; - for (var f = this.fragments.nodeAt(n); f; ) { - var d = this.parser.nodeSet.types[f.type.id] == f.type ? s.getGoto(e.state, f.type.id) : -1; - if (d > -1 && f.length && (!a || (f.prop(ue.contextHash) || 0) == c)) return e.useNode(f, d), lt && console.log(o + this.stackID(e) + " (via reuse of ".concat(s.getName(f.type.id), ")")), !0; - if (!(f instanceof Qe) || f.children.length == 0 || f.positions[0] > 0) break; - var p = f.children[0]; - if (p instanceof Qe && f.positions[0] == 0) f = p; - else break; - } - } - var l = s.stateSlot(e.state, 4); - if (l > 0) return e.reduce(l), lt && console.log(o + this.stackID(e) + " (via always-reduce ".concat(s.getName(l & 65535), ")")), !0; - if (e.stack.length >= 15e3) for (; e.stack.length > 9e3 && e.forceReduce(); ); - var u = this.tokens.getActions(e); - for (var a1 = 0; a1 < u.length; ) { - var c1 = u[a1++], - f1 = u[a1++], - d1 = u[a1++], - p1 = a1 == u.length || !i, - m = p1 ? e : e.split(); - if ( - (m.apply(c1, f1, d1), - lt && - console.log( - o + - this.stackID(m) + - " (via " - .concat(c1 & 65536 ? "reduce of ".concat(s.getName(c1 & 65535)) : "shift", " for ") - .concat(s.getName(f1), " @ ") - .concat(n) - .concat(m == e ? "" : ", split", ")"), - ), - p1) - ) - return !0; - m.pos > n ? t.push(m) : i.push(m); + this.minStackPos = r[0].pos; + for (var o6 = 1; o6 < r.length; o6++) r[o6].pos < this.minStackPos && (this.minStackPos = r[o6].pos); + return null; + } + stopAt(e) { + if (this.stoppedAt != null && this.stoppedAt < e) throw new RangeError("Can't move stoppedAt forward"); + this.stoppedAt = e; + } + advanceStack(e, t, r) { + var n = e.pos, + _this = this, + s = _this.parser, + o = Et ? this.stackID(e) + " -> " : ""; + if (this.stoppedAt != null && n > this.stoppedAt) return e.forceReduce() ? e : null; + if (this.fragments) { + var h = e.curContext && e.curContext.tracker.strict, + c = h ? e.curContext.hash : 0; + for (var f = this.fragments.nodeAt(n); f; ) { + var d = this.parser.nodeSet.types[f.type.id] == f.type ? s.getGoto(e.state, f.type.id) : -1; + if (d > -1 && f.length && (!h || (f.prop(ue.contextHash) || 0) == c)) return e.useNode(f, d), Et && console.log(o + this.stackID(e) + " (via reuse of ".concat(s.getName(f.type.id), ")")), !0; + if (!(f instanceof Be) || f.children.length == 0 || f.positions[0] > 0) break; + var p = f.children[0]; + if (p instanceof Be && f.positions[0] == 0) f = p; + else break; } - return !1; } - advanceFully(e, t) { - var i = e.pos; - for (;;) { - if (!this.advanceStack(e, null, null)) return !1; - if (e.pos > i) return WF(e, t), !0; - } + var u = s.stateSlot(e.state, 4); + if (u > 0) return e.reduce(u), Et && console.log(o + this.stackID(e) + " (via always-reduce ".concat(s.getName(u & 65535), ")")), !0; + if (e.stack.length >= 15e3) for (; e.stack.length > 9e3 && e.forceReduce(); ); + var l = this.tokens.getActions(e); + for (var h1 = 0; h1 < l.length; ) { + var c1 = l[h1++], + f1 = l[h1++], + d1 = l[h1++], + p1 = h1 == l.length || !r, + m = p1 ? e : e.split(); + if ( + (m.apply(c1, f1, d1), + Et && + console.log( + o + + this.stackID(m) + + " (via " + .concat(c1 & 65536 ? "reduce of ".concat(s.getName(c1 & 65535)) : "shift", " for ") + .concat(s.getName(f1), " @ ") + .concat(n) + .concat(m == e ? "" : ", split", ")") + ), + p1) + ) + return !0; + m.pos > n ? t.push(m) : r.push(m); } - runRecovery(e, t, i) { - var n = null, - s = !1; - for (var o = 0; o < e.length; o++) { - var l = e[o], - u = t[o << 1], - a = t[(o << 1) + 1], - c = lt ? this.stackID(l) + " -> " : ""; - if (l.deadEnd && (s || ((s = !0), l.restart(), lt && console.log(c + this.stackID(l) + " (restarted)"), this.advanceFully(l, i)))) continue; - var f = l.split(), - d = c; - for (var p = 0; f.forceReduce() && p < 10 && (lt && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, i)); p++) lt && (d = this.stackID(f) + " -> "); - var _iteratorNormalCompletion = true, - _didIteratorError = false, - _iteratorError = undefined; + return !1; + } + advanceFully(e, t) { + var r = e.pos; + for (;;) { + if (!this.advanceStack(e, null, null)) return !1; + if (e.pos > r) return k1(e, t), !0; + } + } + runRecovery(e, t, r) { + var n = null, + s = !1; + for (var o = 0; o < e.length; o++) { + var u = e[o], + l = t[o << 1], + h = t[(o << 1) + 1], + c = Et ? this.stackID(u) + " -> " : ""; + if (u.deadEnd && (s || ((s = !0), u.restart(), Et && console.log(c + this.stackID(u) + " (restarted)"), this.advanceFully(u, r)))) continue; + var f = u.split(), + d = c; + for (var p = 0; f.forceReduce() && p < 10 && (Et && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, r)); p++) Et && (d = this.stackID(f) + " -> "); + var _iteratorNormalCompletion = true, + _didIteratorError = false, + _iteratorError = undefined; + try { + for (var _iterator = u.recoverByInsert(l)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var p1 = _step.value; + Et && console.log(c + this.stackID(p1) + " (via recover-insert)"), this.advanceFully(p1, r); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { try { - for (var _iterator = l.recoverByInsert(u)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var p1 = _step.value; - lt && console.log(c + this.stackID(p1) + " (via recover-insert)"), this.advanceFully(p1, i); + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } + if (_didIteratorError) { + throw _iteratorError; } } - this.stream.end > l.pos ? (a == l.pos && (a++, (u = 0)), l.recoverByDelete(u, a), lt && console.log(c + this.stackID(l) + " (via recover-delete ".concat(this.parser.getName(u), ")")), WF(l, i)) : (!n || n.score < l.score) && (n = l); } - return n; - } - stackToTree(e) { - return e.close(), Qe.build({ buffer: vh.create(e), nodeSet: this.parser.nodeSet, topID: this.topTerm, maxBufferLength: this.parser.bufferLength, reused: this.reused, start: this.ranges[0].from, length: e.pos - this.ranges[0].from, minRepeatType: this.parser.minRepeatTerm }); - } - stackID(e) { - var t = (Eh || (Eh = new WeakMap())).get(e); - return t || Eh.set(e, (t = String.fromCodePoint(this.nextStackID++))), t + e; - } - constructor(e, t, i, n) { - (this.parser = e), (this.input = t), (this.ranges = n), (this.recovering = 0), (this.nextStackID = 9812), (this.minStackPos = 0), (this.reused = []), (this.stoppedAt = null), (this.lastBigReductionStart = -1), (this.lastBigReductionSize = 0), (this.bigReductionCount = 0), (this.stream = new xh(t, n)), (this.tokens = new Sh(e, this.stream)), (this.topTerm = e.top[1]); - var _n_ = n[0], - s = _n_.from; - (this.stacks = [Ch.start(this, e.top[0], s)]), (this.fragments = i.length && this.stream.end - s > e.bufferLength * 4 ? new kh(i, e.nodeSet) : null); + this.stream.end > u.pos ? (h == u.pos && (h++, (l = 0)), u.recoverByDelete(l, h), Et && console.log(c + this.stackID(u) + " (via recover-delete ".concat(this.parser.getName(l), ")")), k1(u, r)) : (!n || n.score < u.score) && (n = u); } - }), - h(_class97, "Parse"), - _class97); - function WF(r, e) { + return n; + } + stackToTree(e) { + return e.close(), Be.build({ buffer: Dh.create(e), nodeSet: this.parser.nodeSet, topID: this.topTerm, maxBufferLength: this.parser.bufferLength, reused: this.reused, start: this.ranges[0].from, length: e.pos - this.ranges[0].from, minRepeatType: this.parser.minRepeatTerm }); + } + stackID(e) { + var t = (ph || (ph = new WeakMap())).get(e); + return t || ph.set(e, (t = String.fromCodePoint(this.nextStackID++))), t + e; + } + constructor(e, t, r, n) { + (this.parser = e), (this.input = t), (this.ranges = n), (this.recovering = 0), (this.nextStackID = 9812), (this.minStackPos = 0), (this.reused = []), (this.stoppedAt = null), (this.lastBigReductionStart = -1), (this.lastBigReductionSize = 0), (this.bigReductionCount = 0), (this.stream = new bh(t, n)), (this.tokens = new Ch(e, this.stream)), (this.topTerm = e.top[1]); + var _n_ = n[0], + s = _n_.from; + (this.stacks = [mh.start(this, e.top[0], s)]), (this.fragments = r.length && this.stream.end - s > e.bufferLength * 4 ? new yh(r, e.nodeSet) : null); + } + }), + (() => { + a(_class96, "Parse"); + })(), + _class96); + function k1(i, e) { for (var t = 0; t < e.length; t++) { - var i = e[t]; - if (i.pos == r.pos && i.sameState(r)) { - e[t].score < r.score && (e[t] = r); + var r = e[t]; + if (r.pos == i.pos && r.sameState(i)) { + e[t].score < i.score && (e[t] = i); return; } } - e.push(r); + e.push(i); } - h(WF, "pushStackDedup"); - var Qh = - ((_class98 = class _class { + a(k1, "pushStackDedup"); + var Eh = + ((_class97 = class _class { allows(e) { return !this.disabled || this.disabled[e] == 0; } - constructor(e, t, i) { - (this.source = e), (this.flags = t), (this.disabled = i); + constructor(e, t, r) { + (this.source = e), (this.flags = t), (this.disabled = r); } }), - h(_class98, "Dialect"), - _class98); - var $o = - ((_r66 = class r extends Er { - createParse(e, t, i) { - var n = new wh(this, e, t, i); + (() => { + a(_class97, "Dialect"); + })(), + _class97); + var Mo = + ((_i65 = class i extends Dr { + createParse(e, t, r) { + var n = new Ah(this, e, t, r); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { for (var _iterator = this.wrappers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; - n = s(n, e, t, i); + n = s(n, e, t, r); } } catch (err) { _didIteratorError = true; @@ -22875,29 +22233,29 @@ function _ts_generator(thisArg, body) { return n; } getGoto(e, t) { - var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1; var n = this.goto; if (t >= n[0]) return -1; for (var s = n[t + 1]; ; ) { var o = n[s++], - l = o & 1, - u = n[s++]; - if (l && i) return u; - for (var a = s + (o >> 1); s < a; s++) if (n[s] == e) return u; - if (l) return -1; + u = o & 1, + l = n[s++]; + if (u && r) return l; + for (var h = s + (o >> 1); s < h; s++) if (n[s] == e) return l; + if (u) return -1; } } hasAction(e, t) { - var i = this.data; + var r = this.data; for (var n = 0; n < 2; n++) for (var s = this.stateSlot(e, n ? 2 : 1), o = void 0; ; s += 3) { - if ((o = i[s]) == 65535) - if (i[s + 1] == 1) o = i[(s = ei(i, s + 2))]; + if ((o = r[s]) == 65535) + if (r[s + 1] == 1) o = r[(s = Gt(r, s + 2))]; else { - if (i[s + 1] == 2) return ei(i, s + 2); + if (r[s + 1] == 2) return Gt(r, s + 2); break; } - if (o == t || o == 0) return ei(i, s + 1); + if (o == t || o == 0) return Gt(r, s + 1); } return 0; } @@ -22908,58 +22266,53 @@ function _ts_generator(thisArg, body) { return (this.stateSlot(e, 0) & t) > 0; } validAction(e, t) { - return !!this.allActions(e, (i) => (i == t ? !0 : null)); - } - allActions(e, t) { - var i = this.stateSlot(e, 4), - n = i ? t(i) : void 0; - for (var s = this.stateSlot(e, 1); n == null; s += 3) { - if (this.data[s] == 65535) - if (this.data[s + 1] == 1) s = ei(this.data, s + 2); - else break; - n = t(ei(this.data, s + 1)); + if (t == this.stateSlot(e, 4)) return !0; + for (var r = this.stateSlot(e, 1); ; r += 3) { + if (this.data[r] == 65535) + if (this.data[r + 1] == 1) r = Gt(this.data, r + 2); + else return !1; + if (t == Gt(this.data, r + 1)) return !0; } - return n; } nextStates(e) { - var _this, - _loop = function (i1) { - if (_this.data[i1] == 65535) - if (_this.data[i1 + 1] == 1) i1 = ei(_this.data, i1 + 2); - else return (i = i1), "break"; - if (!(_this.data[i1 + 2] & 1)) { - var n = _this.data[i1 + 1]; - t.some((s, o) => o & 1 && s == n) || t.push(_this.data[i1], n); - } - (i = i1), void 0; + var _this = this, + _loop = function (r1) { + if (_this.data[r1] == 65535) + if (_this.data[r1 + 1] == 1) r1 = Gt(_this.data, r1 + 2); + else return (r = r1), "break"; + if (!(_this.data[r1 + 2] & 1)) { + var n = _this.data[r1 + 1]; + t.some((s, o) => o & 1 && s == n) || t.push(_this.data[r1], n); + } + (r = r1), void 0; }; var t = []; - for (var i = this.stateSlot(e, 1); ; i += 3) { - var _ret = ((_this = this), _loop(i)); + for (var r = this.stateSlot(e, 1); ; r += 3) { + var _ret = _loop(r); if (_ret === "break") break; } return t; } configure(e) { - var t = Object.assign(Object.create(r.prototype), this); + var t = Object.assign(Object.create(i.prototype), this); if ((e.props && (t.nodeSet = this.nodeSet.extend(...e.props)), e.top)) { - var i = this.topRules[e.top]; - if (!i) throw new RangeError("Invalid top rule name ".concat(e.top)); - t.top = i; + var r = this.topRules[e.top]; + if (!r) throw new RangeError("Invalid top rule name ".concat(e.top)); + t.top = r; } return ( e.tokenizers && - (t.tokenizers = this.tokenizers.map((i) => { - var n = e.tokenizers.find((s) => s.from == i); - return n ? n.to : i; + (t.tokenizers = this.tokenizers.map((r) => { + var n = e.tokenizers.find((s) => s.from == r); + return n ? n.to : r; })), e.specializers && ((t.specializers = this.specializers.slice()), - (t.specializerSpecs = this.specializerSpecs.map((i, n) => { - var s = e.specializers.find((l) => l.from == i.external); - if (!s) return i; - var o = Object.assign(Object.assign({}, i), { external: s.to }); - return (t.specializers[n] = zF(o)), o; + (t.specializerSpecs = this.specializerSpecs.map((r, n) => { + var s = e.specializers.find((u) => u.from == r.external); + if (!s) return r; + var o = Object.assign(Object.assign({}, r), { external: s.to }); + return (t.specializers[n] = w1(o)), o; }))), e.contextTracker && (t.context = e.contextTracker), e.dialect && (t.dialect = this.parseDialect(e.dialect)), @@ -22987,7 +22340,7 @@ function _ts_generator(thisArg, body) { } parseDialect(e) { var t = Object.keys(this.dialects), - i = t.map(() => !1); + r = t.map(() => !1); var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; @@ -22996,7 +22349,7 @@ function _ts_generator(thisArg, body) { for (var _iterator = e.split(" ")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var s = _step.value; var o = t.indexOf(s); - o >= 0 && (i[o] = !0); + o >= 0 && (r[o] = !0); } } catch (err) { _didIteratorError = true; @@ -23013,39 +22366,39 @@ function _ts_generator(thisArg, body) { } } var n = null; - for (var s1 = 0; s1 < t.length; s1++) if (!i[s1]) for (var o1 = this.dialects[t[s1]], l = void 0; (l = this.data[o1++]) != 65535; ) (n || (n = new Uint8Array(this.maxTerm + 1)))[l] = 1; - return new Qh(e, i, n); + for (var s1 = 0; s1 < t.length; s1++) if (!r[s1]) for (var o1 = this.dialects[t[s1]], u = void 0; (u = this.data[o1++]) != 65535; ) (n || (n = new Uint8Array(this.maxTerm + 1)))[u] = 1; + return new Eh(e, r, n); } static deserialize(e) { - return new r(e); + return new i(e); } constructor(e) { if ((super(), (this.wrappers = []), e.version != 14)) throw new RangeError("Parser version (".concat(e.version, ") doesn't match runtime version (14)")); var t = e.nodeNames.split(" "); this.minRepeatTerm = t.length; - for (var l = 0; l < e.repeatNodeCount; l++) t.push(""); - var i = Object.keys(e.topRules).map((l) => e.topRules[l][1]), + for (var u = 0; u < e.repeatNodeCount; u++) t.push(""); + var r = Object.keys(e.topRules).map((u) => e.topRules[u][1]), n = []; - for (var l1 = 0; l1 < t.length; l1++) n.push([]); - function s(l, u, a) { - n[l].push([u, u.deserialize(String(a))]); + for (var u1 = 0; u1 < t.length; u1++) n.push([]); + function s(u, l, h) { + n[u].push([l, l.deserialize(String(h))]); } var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; - if ((h(s, "setProp"), e.nodeProps)) + if ((a(s, "setProp"), e.nodeProps)) try { for (var _iterator = e.nodeProps[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var l2 = _step.value; - var u = l2[0]; - typeof u == "string" && (u = ue[u]); - for (var a = 1; a < l2.length; ) { - var c = l2[a++]; - if (c >= 0) s(c, u, l2[a++]); + var u2 = _step.value; + var l = u2[0]; + typeof l == "string" && (l = ue[l]); + for (var h = 1; h < u2.length; ) { + var c = u2[h++]; + if (c >= 0) s(c, l, u2[h++]); else { - var f = l2[a + -c]; - for (var d = -c; d > 0; d--) s(l2[a++], u, f); - a++; + var f = u2[h + -c]; + for (var d = -c; d > 0; d--) s(u2[h++], l, f); + h++; } } } @@ -23063,16 +22416,16 @@ function _ts_generator(thisArg, body) { } } } - (this.nodeSet = new xn(t.map((l, u) => Ie.define({ name: u >= this.minRepeatTerm ? void 0 : l, id: u, props: n[u], top: i.indexOf(u) > -1, error: u == 0, skipped: e.skippedNodes && e.skippedNodes.indexOf(u) > -1 })))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), (this.strict = !1), (this.bufferLength = 1024); - var o = Ln(e.tokenData); + (this.nodeSet = new pn(t.map((u, l) => Ve.define({ name: l >= this.minRepeatTerm ? void 0 : u, id: l, props: n[l], top: r.indexOf(l) > -1, error: l == 0, skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1 })))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), (this.strict = !1), (this.bufferLength = 1024); + var o = yn(e.tokenData); (this.context = e.context), (this.specializerSpecs = e.specialized || []), (this.specialized = new Uint16Array(this.specializerSpecs.length)); - for (var l3 = 0; l3 < this.specializerSpecs.length; l3++) this.specialized[l3] = this.specializerSpecs[l3].term; - (this.specializers = this.specializerSpecs.map(zF)), - (this.states = Ln(e.states, Uint32Array)), - (this.data = Ln(e.stateData)), - (this.goto = Ln(e.goto)), + for (var u3 = 0; u3 < this.specializerSpecs.length; u3++) this.specialized[u3] = this.specializerSpecs[u3].term; + (this.specializers = this.specializerSpecs.map(w1)), + (this.states = yn(e.states, Uint32Array)), + (this.data = yn(e.stateData)), + (this.goto = yn(e.goto)), (this.maxTerm = e.maxTerm), - (this.tokenizers = e.tokenizers.map((l) => (typeof l == "number" ? new mi(o, l) : l))), + (this.tokenizers = e.tokenizers.map((u) => (typeof u == "number" ? new li(o, u) : u))), (this.topRules = e.topRules), (this.dialects = e.dialects || {}), (this.dynamicPrecedences = e.dynamicPrecedences || null), @@ -23083,22 +22436,24 @@ function _ts_generator(thisArg, body) { (this.top = this.topRules[Object.keys(this.topRules)[0]]); } }), - h(_r66, "LRParser"), - _r66); - function ei(r, e) { - return r[e] | (r[e + 1] << 16); + (() => { + a(_i65, "LRParser"); + })(), + _i65); + function Gt(i, e) { + return i[e] | (i[e + 1] << 16); } - h(ei, "pair"); - function Tk(r) { + a(Gt, "pair"); + function n4(i) { var e = null; var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined; try { - for (var _iterator = r[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for (var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var t = _step.value; - var i = t.p.stoppedAt; - (t.pos == t.p.stream.end || (i != null && t.pos > i)) && t.p.parser.stateFlag(t.state, 2) && (!e || e.score < t.score) && (e = t); + var r = t.p.stoppedAt; + (t.pos == t.p.stream.end || (r != null && t.pos > r)) && t.p.parser.stateFlag(t.state, 2) && (!e || e.score < t.score) && (e = t); } } catch (err) { _didIteratorError = true; @@ -23116,16 +22471,16 @@ function _ts_generator(thisArg, body) { } return e; } - h(Tk, "findFinished"); - function zF(r) { - if (r.external) { - var e = r.extend ? 1 : 0; - return (t, i) => (r.external(t, i) << 1) | e; + a(n4, "findFinished"); + function w1(i) { + if (i.external) { + var e = i.extend ? 1 : 0; + return (t, r) => (i.external(t, r) << 1) | e; } - return r.get; + return i.get; } - h(zF, "getSpecializer"); - var jF = $o.deserialize({ + a(w1, "getSpecializer"); + var S1 = Mo.deserialize({ version: 14, states: "'[QVQPOOOhQPO'#CsOmQPO'#CwOrQPO'#CzOOQO'#Cp'#CpOOQO'#Ci'#CiQVQPOOOwQPO'#CpO|QQO,59_O![QQO,59cO!aQSO,59fOOQO-E6g-E6gO!fQWO'#C_OOQO,59[,59[OOQO'#Cu'#CuO!qQPO'#CtO!|QPO1G.yO#RQPO'#CxO#WQPO1G.}O#]QPO1G/QO#bQWO'#CjO#mQPO,58yOOQO,58y,58yO#mQPO,58yO|QQO'#CkO#uQPO,59`OOQO7+$e7+$eO|QQO,59dOOQO7+$i7+$iO![QQO7+$lOOQO,59U,59UOOQO-E6h-E6hOOQO1G.e1G.eO$QQPO1G.eOOQO,59V,59VOOQO-E6i-E6iOOQO1G/O1G/OO$YQPO<<HWOOQO7+$P7+$PO$bQQOAN=rO$jQPOAN=rOOQOAN=rAN=rOOQO,59W,59WOOQOG23^G23^O$rQQOG23^OOQO-E6j-E6jOOQOLD(xLD(xP![QQO'#Cl", @@ -23141,33 +22496,33 @@ function _ts_generator(thisArg, body) { topRules: { Program: [0, 1] }, tokenPrec: 4, }); - var Rk = Lo.define({ parser: jF.configure({ props: [Uo({ Identifier: U.variableName, Comment: U.comment, Key: U.name, Number: U.number, BraceContent: U.string, Quoted: U.string, Command: U.className, CommentCommand: U.className, PreambleCommand: U.className, StringCommand: U.className, Field: U.variableName })] }) }), - Nk = xr.define([ - { tag: U.comment, color: "var(--light5)" }, - { tag: U.name, color: "var(--orange)" }, - { tag: U.number, color: "var(--light-blue)" }, - { tag: U.string, color: "var(--green)" }, - { tag: U.className, color: "var(--pink)" }, - { tag: U.variableName, color: "white" }, + var s4 = xo.define({ parser: S1.configure({ props: [wo({ Identifier: O.variableName, Comment: O.comment, Key: O.name, Number: O.number, BraceContent: O.string, Quoted: O.string, Command: O.className, CommentCommand: O.className, PreambleCommand: O.className, StringCommand: O.className, Field: O.variableName })] }) }), + o4 = Cr.define([ + { tag: O.comment, color: "var(--light5)" }, + { tag: O.name, color: "var(--orange)" }, + { tag: O.number, color: "var(--light-blue)" }, + { tag: O.string, color: "var(--green)" }, + { tag: O.className, color: "var(--pink)" }, + { tag: O.variableName, color: "white" }, ]); - function YF() { - return new Oo(Rk); + function B1() { + return new So(s4); } - h(YF, "bibtexLanguage"); - function JF() { - return FF(Nk); + a(B1, "bibtexLanguage"); + function _1() { + return XD(o4); } - h(JF, "bibtexSyntaxHighlighting"); - function Mk(r) { - var e, t, i; + a(_1, "bibtexSyntaxHighlighting"); + function u4(i) { + var e, t, r; return ( - (t = new IF({ props: { bibtex: r[0] } })), + (t = new b1({ props: { bibtex: i[0] } })), { c() { - (e = O("main")), M(t.$$.fragment), v(e, "id", "editor"), v(e, "class", "svelte-x4zh2g"); + (e = R("main")), P(t.$$.fragment), A(e, "id", "editor"), A(e, "class", "svelte-x4zh2g"); }, m(n, s) { - E(n, e, s), N(t, e, null), r[5](e), (i = !0); + C(n, e, s), $(t, e, null), i[5](e), (r = !0); }, p(n, param) { var _param = _sliced_to_array(param, 1), @@ -23176,1647 +22531,1665 @@ function _ts_generator(thisArg, body) { s & 1 && (o.bibtex = n[0]), t.$set(o); }, i(n) { - i || (S(t.$$.fragment, n), (i = !0)); + r || (S(t.$$.fragment, n), (r = !0)); }, o(n) { - w(t.$$.fragment, n), (i = !1); + B(t.$$.fragment, n), (r = !1); }, d(n) { - n && y(e), R(t), r[5](null); + n && y(e), M(t), i[5](null); }, } ); } - h(Mk, "create_fragment"); - function Pk(r, e, t) { - var i = e.bibtex, + a(u4, "create_fragment"); + function l4(i, e, t) { + var r = e.bibtex, n = e.error, s, o, - l; - mu(() => { - var a = ne.updateListener.of((c) => { - o && c.docChanged && t(0, (i = o.state.doc.toString())); + u; + ll(() => { + var h = re.updateListener.of((c) => { + o && c.docChanged && t(0, (r = o.state.doc.toString())); }); - t(4, (l = new cr())), t(3, (o = new ne({ parent: s, state: Ae.create({ doc: i, extensions: [KD(), ZD(), JD(), Ae.allowMultipleSelections.of(!0), CF(), HD(), YF(), JF(), Wa.of([...wF, _F]), xF(), a, l.of([])] }) }))), o.focus(), (window.cmEditor = o); + t(4, (u = new rr())), t(3, (o = new re({ parent: s, state: Ae.create({ doc: r, extensions: [TD(), RD(), _D(), Ae.allowMultipleSelections.of(!0), e1(), wD(), B1(), _1(), qa.of([...u1, a1]), r1(), h, u.of([])] }) }))), o.focus(), (window.cmEditor = o); }); - function u(a) { - J[a ? "unshift" : "push"](() => { - (s = a), t(1, s); + function l(h) { + Y[h ? "unshift" : "push"](() => { + (s = h), t(1, s); }); } return ( - h(u, "main_binding"), - (r.$$set = (a) => { - "bibtex" in a && t(0, (i = a.bibtex)), "error" in a && t(2, (n = a.error)); + a(l, "main_binding"), + (i.$$set = (h) => { + "bibtex" in h && t(0, (r = h.bibtex)), "error" in h && t(2, (n = h.error)); }), - (r.$$.update = () => { - r.$$.dirty & 28 && - (o === null || o === void 0 + (i.$$.update = () => { + var _o_dispatch, _this; + if (i.$$.dirty & 28) + e: (_this = o) === null || _this === void 0 + ? void 0 + : (_o_dispatch = _this.dispatch) === null || _o_dispatch === void 0 ? void 0 - : o.dispatch({ - effects: l.reconfigure( - RF(() => { + : _o_dispatch.call(_this, { + effects: u.reconfigure( + p1(() => { if (n && o) { - var a = o.state.doc.line(n.line), - c = a.from, - f = a.to; + var h = o.state.doc.line(n.line), + c = h.from, + f = h.to; return [{ from: c, to: f, severity: "error", message: "Syntax Error" }]; } else return []; - }), + }) ), - })), - r.$$.dirty & 9 && o && i !== o.state.doc.toString() && o.dispatch({ changes: { from: 0, to: o.state.doc.length, insert: i } }); + }); + if (i.$$.dirty & 9) e: o && r !== o.state.doc.toString() && o.dispatch({ changes: { from: 0, to: o.state.doc.length, insert: r } }); }), - [i, s, n, o, l, u] + [r, s, n, o, u, l] ); } - h(Pk, "instance"); - var _h = - ((_class99 = class _class extends se { + a(l4, "instance"); + var vh = + ((_class98 = class _class extends ie { constructor(e) { - super(), le(this, e, Pk, Mk, oe, { bibtex: 0, error: 2 }); + super(), oe(this, e, l4, u4, se, { bibtex: 0, error: 2 }); } }), - h(_class99, "Editor"), - _class99), - GF = _h; - function Ik(r) { + (() => { + a(_class98, "Editor"); + })(), + _class98), + O1 = vh; + function a4(i) { var e, t, - i, + r, n, s, - o = r[3].default, - l = ti(o, r, r[2], null); + o = i[3].default, + u = Yt(o, i, i[2], null); return { c() { - (e = O("details")), (t = O("summary")), (i = Y(r[0])), (n = $()), l && l.c(), v(t, "class", "svelte-ee92zc"), (e.open = r[1]), v(e, "class", "svelte-ee92zc"); + (e = R("details")), (t = R("summary")), (r = j(i[0])), (n = q()), u && u.c(), A(t, "class", "svelte-ee92zc"), (e.open = i[1]), A(e, "class", "svelte-ee92zc"); }, - m(u, a) { - E(u, e, a), q(e, t), q(t, i), q(e, n), l && l.m(e, null), (s = !0); + m(l, h) { + C(l, e, h), V(e, t), V(t, r), V(e, n), u && u.m(e, null), (s = !0); }, - p(u, param) { + p(l, param) { var _param = _sliced_to_array(param, 1), - a = _param[0]; - (!s || a & 1) && qe(i, u[0]), l && l.p && (!s || a & 4) && ri(l, o, u, u[2], s ? ii(o, u[2], a, null) : ni(u[2]), null), (!s || a & 2) && (e.open = u[1]); + h = _param[0]; + (!s || h & 1) && We(r, l[0]), u && u.p && (!s || h & 4) && Xt(u, o, l, l[2], s ? Kt(o, l[2], h, null) : Qt(l[2]), null), (!s || h & 2) && (e.open = l[1]); }, - i(u) { - s || (S(l, u), (s = !0)); + i(l) { + s || (S(u, l), (s = !0)); }, - o(u) { - w(l, u), (s = !1); + o(l) { + B(u, l), (s = !1); }, - d(u) { - u && y(e), l && l.d(u); + d(l) { + l && y(e), u && u.d(l); }, }; } - h(Ik, "create_fragment"); - function $k(r, e, t) { + a(a4, "create_fragment"); + function h4(i, e, t) { var tmp = e.$$slots, - i = tmp === void 0 ? {} : tmp, + r = tmp === void 0 ? {} : tmp, n = e.$$scope, s = e.title, tmp1 = e.open, o = tmp1 === void 0 ? !1 : tmp1; return ( - (r.$$set = (l) => { - "title" in l && t(0, (s = l.title)), "open" in l && t(1, (o = l.open)), "$$scope" in l && t(2, (n = l.$$scope)); + (i.$$set = (u) => { + "title" in u && t(0, (s = u.title)), "open" in u && t(1, (o = u.open)), "$$scope" in u && t(2, (n = u.$$scope)); }), - [s, o, n, i] + [s, o, n, r] ); } - h($k, "instance"); - var Uh = - ((_class100 = class _class extends se { + a(h4, "instance"); + var kh = + ((_class99 = class _class extends ie { constructor(e) { - super(), le(this, e, $k, Ik, oe, { title: 0, open: 1 }); + super(), oe(this, e, h4, a4, se, { title: 0, open: 1 }); } }), - h(_class100, "Collapsible"), - _class100), - Ke = Uh; - function qk(r) { - var e, t, i; + (() => { + a(_class99, "Collapsible"); + })(), + _class99), + Ke = kh; + function c4(i) { + var e, t, r; return { c() { - (e = O("input")), v(e, "type", "checkbox"), v(e, "name", r[1]), v(e, "class", "svelte-doypik"); + (e = R("input")), A(e, "type", "checkbox"), A(e, "name", i[1]), A(e, "class", "svelte-doypik"); }, m(n, s) { - E(n, e, s), (e.checked = r[0]), t || ((i = [ye(e, "change", r[3]), ye(e, "change", r[4])]), (t = !0)); + C(n, e, s), (e.checked = i[0]), t || ((r = [be(e, "change", i[3]), be(e, "change", i[4])]), (t = !0)); }, p(n, param) { var _param = _sliced_to_array(param, 1), s = _param[0]; - s & 2 && v(e, "name", n[1]), s & 1 && (e.checked = n[0]); + s & 2 && A(e, "name", n[1]), s & 1 && (e.checked = n[0]); }, - i: Se, - o: Se, + i: ke, + o: ke, d(n) { - n && y(e), (t = !1), Qt(i); + n && y(e), (t = !1), xt(r); }, }; } - h(qk, "create_fragment"); - function Vk(r, e, t) { - var i = e.name, + a(c4, "create_fragment"); + function f4(i, e, t) { + var r = e.name, tmp = e.checked, n = tmp === void 0 ? void 0 : tmp, - s = Ei(); + s = pi(); function o() { (n = this.checked), t(0, n); } - h(o, "input_change_handler"); - var l = h(() => s("change"), "change_handler"); + a(o, "input_change_handler"); + var u = a(() => s("change"), "change_handler"); return ( - (r.$$set = (u) => { - "name" in u && t(1, (i = u.name)), "checked" in u && t(0, (n = u.checked)); + (i.$$set = (l) => { + "name" in l && t(1, (r = l.name)), "checked" in l && t(0, (n = l.checked)); }), - [n, i, s, o, l] + [n, r, s, o, u] ); } - h(Vk, "instance"); - var Lh = - ((_class101 = class _class extends se { + a(f4, "instance"); + var wh = + ((_class100 = class _class extends ie { constructor(e) { - super(), le(this, e, Vk, qk, oe, { name: 1, checked: 0 }); + super(), oe(this, e, f4, c4, se, { name: 1, checked: 0 }); } }), - h(_class101, "Checkbox"), - _class101), - Pi = Lh; - function Wk(r) { + (() => { + a(_class100, "Checkbox"); + })(), + _class100), + Oi = wh; + function d4(i) { var e, t, - i = r[3].default, - n = ti(i, r, r[2], null); + r = i[3].default, + n = Yt(r, i, i[2], null); return { c() { - (e = O("label")), n && n.c(), v(e, "title", r[0]), v(e, "class", "svelte-a2tm3u"), tr(e, "inset", r[1]); + (e = R("label")), n && n.c(), A(e, "title", i[0]), A(e, "class", "svelte-a2tm3u"), Yi(e, "inset", i[1]); }, m(s, o) { - E(s, e, o), n && n.m(e, null), (t = !0); + C(s, e, o), n && n.m(e, null), (t = !0); }, p(s, param) { var _param = _sliced_to_array(param, 1), o = _param[0]; - n && n.p && (!t || o & 4) && ri(n, i, s, s[2], t ? ii(i, s[2], o, null) : ni(s[2]), null), (!t || o & 1) && v(e, "title", s[0]), (!t || o & 2) && tr(e, "inset", s[1]); + n && n.p && (!t || o & 4) && Xt(n, r, s, s[2], t ? Kt(r, s[2], o, null) : Qt(s[2]), null), (!t || o & 1) && A(e, "title", s[0]), (!t || o & 2) && Yi(e, "inset", s[1]); }, i(s) { t || (S(n, s), (t = !0)); }, o(s) { - w(n, s), (t = !1); + B(n, s), (t = !1); }, d(s) { s && y(e), n && n.d(s); }, }; } - h(Wk, "create_fragment"); - function zk(r, e, t) { + a(d4, "create_fragment"); + function p4(i, e, t) { var tmp = e.$$slots, - i = tmp === void 0 ? {} : tmp, + r = tmp === void 0 ? {} : tmp, n = e.$$scope, tmp1 = e.title, s = tmp1 === void 0 ? void 0 : tmp1, tmp2 = e.inset, o = tmp2 === void 0 ? void 0 : tmp2; return ( - (r.$$set = (l) => { - "title" in l && t(0, (s = l.title)), "inset" in l && t(1, (o = l.inset)), "$$scope" in l && t(2, (n = l.$$scope)); + (i.$$set = (u) => { + "title" in u && t(0, (s = u.title)), "inset" in u && t(1, (o = u.inset)), "$$scope" in u && t(2, (n = u.$$scope)); }), - [s, o, n, i] + [s, o, n, r] ); } - h(zk, "instance"); - var Oh = - ((_class102 = class _class extends se { + a(p4, "instance"); + var xh = + ((_class101 = class _class extends ie { constructor(e) { - super(), le(this, e, zk, Wk, oe, { title: 0, inset: 1 }); + super(), oe(this, e, p4, d4, se, { title: 0, inset: 1 }); } }), - h(_class102, "Label"), - _class102), - Ze = Oh; - function Hk(r) { + (() => { + a(_class101, "Label"); + })(), + _class101), + Xe = xh; + function m4(i) { var e, t, - i = r[1].default, - n = ti(i, r, r[0], null); + r = i[1].default, + n = Yt(r, i, i[0], null); return { c() { - (e = O("div")), n && n.c(), v(e, "class", "suboptions svelte-1gkj6ol"); + (e = R("div")), n && n.c(), A(e, "class", "suboptions svelte-1gkj6ol"); }, m(s, o) { - E(s, e, o), n && n.m(e, null), (t = !0); + C(s, e, o), n && n.m(e, null), (t = !0); }, p(s, param) { var _param = _sliced_to_array(param, 1), o = _param[0]; - n && n.p && (!t || o & 1) && ri(n, i, s, s[0], t ? ii(i, s[0], o, null) : ni(s[0]), null); + n && n.p && (!t || o & 1) && Xt(n, r, s, s[0], t ? Kt(r, s[0], o, null) : Qt(s[0]), null); }, i(s) { t || (S(n, s), (t = !0)); }, o(s) { - w(n, s), (t = !1); + B(n, s), (t = !1); }, d(s) { s && y(e), n && n.d(s); }, }; } - h(Hk, "create_fragment"); - function jk(r, e, t) { + a(m4, "create_fragment"); + function g4(i, e, t) { var tmp = e.$$slots, - i = tmp === void 0 ? {} : tmp, + r = tmp === void 0 ? {} : tmp, n = e.$$scope; return ( - (r.$$set = (s) => { + (i.$$set = (s) => { "$$scope" in s && t(0, (n = s.$$scope)); }), - [n, i] + [n, r] ); } - h(jk, "instance"); - var Th = - ((_class103 = class _class extends se { + a(g4, "instance"); + var Sh = + ((_class102 = class _class extends ie { constructor(e) { - super(), le(this, e, jk, Hk, oe, {}); + super(), oe(this, e, g4, m4, se, {}); } }), - h(_class103, "SubOptions"), - _class103), - qo = Th; - function Yk(r) { + (() => { + a(_class102, "SubOptions"); + })(), + _class102), + $o = Sh; + function D4(i) { var e, t, - i, - n = r[3].title + "", + r, + n = i[3].title + "", s, o; - function l(a) { - r[6](a); + function u(h) { + i[6](h); } - h(l, "checkbox_checked_binding"); - var u = { name: r[1] }; + a(u, "checkbox_checked_binding"); + var l = { name: i[1] }; return ( - r[0] !== void 0 && (u.checked = r[0]), - (e = new Pi({ props: u })), - J.push(() => K(e, "checked", l)), - e.$on("change", r[7]), + i[0] !== void 0 && (l.checked = i[0]), + (e = new Oi({ props: l })), + Y.push(() => X(e, "checked", u)), + e.$on("change", i[7]), { c() { - M(e.$$.fragment), (i = $()), (s = Y(n)); + P(e.$$.fragment), (r = q()), (s = j(n)); }, - m(a, c) { - N(e, a, c), E(a, i, c), E(a, s, c), (o = !0); + m(h, c) { + $(e, h, c), C(h, r, c), C(h, s, c), (o = !0); }, - p(a, c) { + p(h, c) { var f = {}; - c & 2 && (f.name = a[1]), !t && c & 1 && ((t = !0), (f.checked = a[0]), X(() => (t = !1))), e.$set(f); + c & 2 && (f.name = h[1]), !t && c & 1 && ((t = !0), (f.checked = h[0]), K(() => (t = !1))), e.$set(f); }, - i(a) { - o || (S(e.$$.fragment, a), (o = !0)); + i(h) { + o || (S(e.$$.fragment, h), (o = !0)); }, - o(a) { - w(e.$$.fragment, a), (o = !1); + o(h) { + B(e.$$.fragment, h), (o = !1); }, - d(a) { - R(e, a), a && y(i), a && y(s); + d(h) { + M(e, h), h && y(r), h && y(s); }, } ); } - h(Yk, "create_default_slot_1"); - function XF(r) { + a(D4, "create_default_slot_1"); + function T1(i) { var e, t, - i = r[0] && KF(r); + r = i[0] && R1(i); return { c() { - i && i.c(), (e = Ht()); + r && r.c(), (e = It()); }, m(n, s) { - i && i.m(n, s), E(n, e, s), (t = !0); + r && r.m(n, s), C(n, e, s), (t = !0); }, p(n, s) { n[0] - ? i - ? (i.p(n, s), s & 1 && S(i, 1)) - : ((i = KF(n)), i.c(), S(i, 1), i.m(e.parentNode, e)) - : i && - (jt(), - w(i, 1, 1, () => { - i = null; + ? r + ? (r.p(n, s), s & 1 && S(r, 1)) + : ((r = R1(n)), r.c(), S(r, 1), r.m(e.parentNode, e)) + : r && + (Nt(), + B(r, 1, 1, () => { + r = null; }), - Yt()); + Vt()); }, i(n) { - t || (S(i), (t = !0)); + t || (S(r), (t = !0)); }, o(n) { - w(i), (t = !1); + B(r), (t = !1); }, d(n) { - i && i.d(n), n && y(e); + r && r.d(n), n && y(e); }, }; } - h(XF, "create_if_block"); - function KF(r) { + a(T1, "create_if_block"); + function R1(i) { var e, t; return ( - (e = new qo({ props: { $$slots: { default: [Jk] }, $$scope: { ctx: r } } })), + (e = new $o({ props: { $$slots: { default: [b4] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, n) { + p(r, n) { var s = {}; - n & 256 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 256 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(KF, "create_if_block_1"); - function Jk(r) { + a(R1, "create_if_block_1"); + function b4(i) { var e, - t = r[5].default, - i = ti(t, r, r[8], null); + t = i[5].default, + r = Yt(t, i, i[8], null); return { c() { - i && i.c(); + r && r.c(); }, m(n, s) { - i && i.m(n, s), (e = !0); + r && r.m(n, s), (e = !0); }, p(n, s) { - i && i.p && (!e || s & 256) && ri(i, t, n, n[8], e ? ii(t, n[8], s, null) : ni(n[8]), null); + r && r.p && (!e || s & 256) && Xt(r, t, n, n[8], e ? Kt(t, n[8], s, null) : Qt(n[8]), null); }, i(n) { - e || (S(i, n), (e = !0)); + e || (S(r, n), (e = !0)); }, o(n) { - w(i, n), (e = !1); + B(r, n), (e = !1); }, d(n) { - i && i.d(n); + r && r.d(n); }, }; } - h(Jk, "create_default_slot"); - function Gk(r) { - var _r__description; - var e, t, i, n; - e = new Ze({ props: { title: (_r__description = r[3].description) === null || _r__description === void 0 ? void 0 : _r__description.join("\n"), inset: !0, $$slots: { default: [Yk] }, $$scope: { ctx: r } } }); - var s = r[4].default && XF(r); + a(b4, "create_default_slot"); + function F4(i) { + var _i__description_join, _this; + var e, t, r, n; + e = new Xe({ props: { title: (_this = i[3].description) === null || _this === void 0 ? void 0 : (_i__description_join = _this.join) === null || _i__description_join === void 0 ? void 0 : _i__description_join.call(_this, "\n"), inset: !0, $$slots: { default: [D4] }, $$scope: { ctx: i } } }); + var s = i[4].default && T1(i); return { c() { - M(e.$$.fragment), (t = $()), s && s.c(), (i = Ht()); + P(e.$$.fragment), (t = q()), s && s.c(), (r = It()); }, - m(o, l) { - N(e, o, l), E(o, t, l), s && s.m(o, l), E(o, i, l), (n = !0); + m(o, u) { + $(e, o, u), C(o, t, u), s && s.m(o, u), C(o, r, u), (n = !0); }, p(o, param) { var _param = _sliced_to_array(param, 1), - l = _param[0]; - var u = {}; - l & 259 && (u.$$scope = { dirty: l, ctx: o }), - e.$set(u), + u = _param[0]; + var l = {}; + u & 259 && (l.$$scope = { dirty: u, ctx: o }), + e.$set(l), o[4].default ? s - ? (s.p(o, l), l & 16 && S(s, 1)) - : ((s = XF(o)), s.c(), S(s, 1), s.m(i.parentNode, i)) + ? (s.p(o, u), u & 16 && S(s, 1)) + : ((s = T1(o)), s.c(), S(s, 1), s.m(r.parentNode, r)) : s && - (jt(), - w(s, 1, 1, () => { + (Nt(), + B(s, 1, 1, () => { s = null; }), - Yt()); + Vt()); }, i(o) { n || (S(e.$$.fragment, o), S(s), (n = !0)); }, o(o) { - w(e.$$.fragment, o), w(s), (n = !1); + B(e.$$.fragment, o), B(s), (n = !1); }, d(o) { - R(e, o), o && y(t), s && s.d(o), o && y(i); + M(e, o), o && y(t), s && s.d(o), o && y(r); }, }; } - h(Gk, "create_fragment"); - function Xk(r, e, t) { + a(F4, "create_fragment"); + function y4(i, e, t) { var tmp = e.$$slots, - i = tmp === void 0 ? {} : tmp, + r = tmp === void 0 ? {} : tmp, n = e.$$scope, - s = u0(i), + s = Km(r), o = e.option, tmp1 = e.checked, - l = tmp1 === void 0 ? void 0 : tmp1, - u = Ei(), - a = R0[o]; + u = tmp1 === void 0 ? void 0 : tmp1, + l = pi(), + h = C0[o]; function c(d) { - (l = d), t(0, l); + (u = d), t(0, u); } - h(c, "checkbox_checked_binding"); - var f = h(() => u("change", l), "change_handler"); + a(c, "checkbox_checked_binding"); + var f = a(() => l("change", u), "change_handler"); return ( - (r.$$set = (d) => { - "option" in d && t(1, (o = d.option)), "checked" in d && t(0, (l = d.checked)), "$$scope" in d && t(8, (n = d.$$scope)); + (i.$$set = (d) => { + "option" in d && t(1, (o = d.option)), "checked" in d && t(0, (u = d.checked)), "$$scope" in d && t(8, (n = d.$$scope)); }), - [l, o, u, a, s, i, c, f, n] + [u, o, l, h, s, r, c, f, n] ); } - h(Xk, "instance"); - var Rh = - ((_class104 = class _class extends se { + a(y4, "instance"); + var Bh = + ((_class103 = class _class extends ie { constructor(e) { - super(), le(this, e, Xk, Gk, oe, { option: 1, checked: 0 }); + super(), oe(this, e, y4, F4, se, { option: 1, checked: 0 }); } }), - h(_class104, "Option"), - _class104), - me = Rh; - function Kk(r) { - var e, t, i, n, s, o; + (() => { + a(_class103, "Option"); + })(), + _class103), + me = Bh; + function C4(i) { + var e, t, r, n, s, o; return { c() { - (e = Y("Fields to omit:\n ")), (t = O("textarea")), (i = $()), (n = O("p")), (n.innerHTML = "Space delimited, e.g: <code>id type publisher author</code>"), v(t, "name", "omitList"), v(t, "class", "omit svelte-1t0249j"), v(t, "placeholder", "e.g. abstract keywords"), v(t, "spellcheck", "false"); + (e = j("Fields to omit:\n ")), (t = R("textarea")), (r = q()), (n = R("p")), (n.innerHTML = "Space delimited, e.g: <code>id type publisher author</code>"), A(t, "name", "omitList"), A(t, "class", "omit svelte-1t0249j"), A(t, "placeholder", "e.g. abstract keywords"), A(t, "spellcheck", "false"); }, - m(l, u) { - E(l, e, u), E(l, t, u), Ee(t, r[1]), E(l, i, u), E(l, n, u), s || ((o = ye(t, "input", r[9])), (s = !0)); + m(u, l) { + C(u, e, l), C(u, t, l), Fe(t, i[1]), C(u, r, l), C(u, n, l), s || ((o = be(t, "input", i[9])), (s = !0)); }, - p(l, u) { - u & 2 && Ee(t, l[1]); + p(u, l) { + l & 2 && Fe(t, u[1]); }, - d(l) { - l && y(e), l && y(t), l && y(i), l && y(n), (s = !1), o(); + d(u) { + u && y(e), u && y(t), u && y(r), u && y(n), (s = !1), o(); }, }; } - h(Kk, "create_default_slot_2"); - function Zk(r) { - var e, t, i, n, s, o, l; + a(C4, "create_default_slot_2"); + function A4(i) { + var e, t, r, n, s, o, u; return { c() { - (e = O("label")), (t = Y("Template:\n ")), (i = O("textarea")), (n = $()), (s = O("p")), (s.innerHTML = '<a href="./manual/key-generation.html" target="_blank">Template documentation</a>'), v(i, "name", "generateKeysTemplate"); + (e = R("label")), (t = j("Template:\n ")), (r = R("textarea")), (n = q()), (s = R("p")), (s.innerHTML = '<a href="./manual/key-generation.html" target="_blank">Template documentation</a>'), A(r, "name", "generateKeysTemplate"); }, - m(u, a) { - E(u, e, a), q(e, t), q(e, i), Ee(i, r[7]), E(u, n, a), E(u, s, a), o || ((l = ye(i, "input", r[14])), (o = !0)); + m(l, h) { + C(l, e, h), V(e, t), V(e, r), Fe(r, i[7]), C(l, n, h), C(l, s, h), o || ((u = be(r, "input", i[14])), (o = !0)); }, - p(u, a) { - a & 128 && Ee(i, u[7]); + p(l, h) { + h & 128 && Fe(r, l[7]); }, - d(u) { - u && y(e), u && y(n), u && y(s), (o = !1), l(); + d(l) { + l && y(e), l && y(n), l && y(s), (o = !1), u(); }, }; } - h(Zk, "create_default_slot_1"); - function eS(r) { - var e, t, i, n, s, o, l, u, a, c, f, d, p, m, F, g, D, b; - function B(_) { - r[10](_); - } - h(B, "option0_checked_binding"); - var k = { option: "omit", $$slots: { default: [Kk] }, $$scope: { ctx: r } }; - r[0] !== void 0 && (k.checked = r[0]), (e = new me({ props: k })), J.push(() => K(e, "checked", B)); - function C(_) { - r[11](_); - } - h(C, "option1_checked_binding"); - var L = { option: "stripComments" }; - r[2] !== void 0 && (L.checked = r[2]), (n = new me({ props: L })), J.push(() => K(n, "checked", C)); - function Q(_) { - r[12](_); - } - h(Q, "option2_checked_binding"); - var V = { option: "tidyComments" }; - r[3] !== void 0 && (V.checked = r[3]), (l = new me({ props: V })), J.push(() => K(l, "checked", Q)); - function z(_) { - r[13](_); - } - h(z, "option3_checked_binding"); - var G = { option: "lowercase" }; - r[4] !== void 0 && (G.checked = r[4]), (c = new me({ props: G })), J.push(() => K(c, "checked", z)); - function T(_) { - r[15](_); - } - h(T, "option4_checked_binding"); - var j = { option: "generateKeys", $$slots: { default: [Zk] }, $$scope: { ctx: r } }; - r[6] !== void 0 && (j.checked = r[6]), (p = new me({ props: j })), J.push(() => K(p, "checked", T)); - function te(_) { - r[16](_); - } - h(te, "option5_checked_binding"); - var P = { option: "trailingCommas" }; + a(A4, "create_default_slot_1"); + function E4(i) { + var e, t, r, n, s, o, u, l, h, c, f, d, p, m, b, g, D, F; + function w(T) { + i[10](T); + } + a(w, "option0_checked_binding"); + var x = { option: "omit", $$slots: { default: [C4] }, $$scope: { ctx: i } }; + i[0] !== void 0 && (x.checked = i[0]), (e = new me({ props: x })), Y.push(() => X(e, "checked", w)); + function E(T) { + i[11](T); + } + a(E, "option1_checked_binding"); + var _ = { option: "stripComments" }; + i[2] !== void 0 && (_.checked = i[2]), (n = new me({ props: _ })), Y.push(() => X(n, "checked", E)); + function I(T) { + i[12](T); + } + a(I, "option2_checked_binding"); + var J = { option: "tidyComments" }; + i[3] !== void 0 && (J.checked = i[3]), (u = new me({ props: J })), Y.push(() => X(u, "checked", I)); + function z(T) { + i[13](T); + } + a(z, "option3_checked_binding"); + var U = { option: "lowercase" }; + i[4] !== void 0 && (U.checked = i[4]), (c = new me({ props: U })), Y.push(() => X(c, "checked", z)); + function N(T) { + i[15](T); + } + a(N, "option4_checked_binding"); + var ne = { option: "generateKeys", $$slots: { default: [A4] }, $$scope: { ctx: i } }; + i[6] !== void 0 && (ne.checked = i[6]), (p = new me({ props: ne })), Y.push(() => X(p, "checked", N)); + function le(T) { + i[16](T); + } + a(le, "option5_checked_binding"); + var H = { option: "trailingCommas" }; return ( - r[5] !== void 0 && (P.checked = r[5]), - (g = new me({ props: P })), - J.push(() => K(g, "checked", te)), + i[5] !== void 0 && (H.checked = i[5]), + (g = new me({ props: H })), + Y.push(() => X(g, "checked", le)), { c() { - M(e.$$.fragment), (i = $()), M(n.$$.fragment), (o = $()), M(l.$$.fragment), (a = $()), M(c.$$.fragment), (d = $()), M(p.$$.fragment), (F = $()), M(g.$$.fragment); + P(e.$$.fragment), (r = q()), P(n.$$.fragment), (o = q()), P(u.$$.fragment), (h = q()), P(c.$$.fragment), (d = q()), P(p.$$.fragment), (b = q()), P(g.$$.fragment); }, - m(_, ee) { - N(e, _, ee), E(_, i, ee), N(n, _, ee), E(_, o, ee), N(l, _, ee), E(_, a, ee), N(c, _, ee), E(_, d, ee), N(p, _, ee), E(_, F, ee), N(g, _, ee), (b = !0); + m(T, Z) { + $(e, T, Z), C(T, r, Z), $(n, T, Z), C(T, o, Z), $(u, T, Z), C(T, h, Z), $(c, T, Z), C(T, d, Z), $(p, T, Z), C(T, b, Z), $(g, T, Z), (F = !0); }, - p(_, ee) { - var he = {}; - ee & 16777218 && (he.$$scope = { dirty: ee, ctx: _ }), !t && ee & 1 && ((t = !0), (he.checked = _[0]), X(() => (t = !1))), e.$set(he); - var ve = {}; - !s && ee & 4 && ((s = !0), (ve.checked = _[2]), X(() => (s = !1))), n.$set(ve); - var xe = {}; - !u && ee & 8 && ((u = !0), (xe.checked = _[3]), X(() => (u = !1))), l.$set(xe); + p(T, Z) { + var ge = {}; + Z & 16777218 && (ge.$$scope = { dirty: Z, ctx: T }), !t && Z & 1 && ((t = !0), (ge.checked = T[0]), K(() => (t = !1))), e.$set(ge); + var De = {}; + !s && Z & 4 && ((s = !0), (De.checked = T[2]), K(() => (s = !1))), n.$set(De); + var ce = {}; + !l && Z & 8 && ((l = !0), (ce.checked = T[3]), K(() => (l = !1))), u.$set(ce); var ae = {}; - !f && ee & 16 && ((f = !0), (ae.checked = _[4]), X(() => (f = !1))), c.$set(ae); - var be = {}; - ee & 16777344 && (be.$$scope = { dirty: ee, ctx: _ }), !m && ee & 64 && ((m = !0), (be.checked = _[6]), X(() => (m = !1))), p.$set(be); - var we = {}; - !D && ee & 32 && ((D = !0), (we.checked = _[5]), X(() => (D = !1))), g.$set(we); + !f && Z & 16 && ((f = !0), (ae.checked = T[4]), K(() => (f = !1))), c.$set(ae); + var _e = {}; + Z & 16777344 && (_e.$$scope = { dirty: Z, ctx: T }), !m && Z & 64 && ((m = !0), (_e.checked = T[6]), K(() => (m = !1))), p.$set(_e); + var Me = {}; + !D && Z & 32 && ((D = !0), (Me.checked = T[5]), K(() => (D = !1))), g.$set(Me); }, - i(_) { - b || (S(e.$$.fragment, _), S(n.$$.fragment, _), S(l.$$.fragment, _), S(c.$$.fragment, _), S(p.$$.fragment, _), S(g.$$.fragment, _), (b = !0)); + i(T) { + F || (S(e.$$.fragment, T), S(n.$$.fragment, T), S(u.$$.fragment, T), S(c.$$.fragment, T), S(p.$$.fragment, T), S(g.$$.fragment, T), (F = !0)); }, - o(_) { - w(e.$$.fragment, _), w(n.$$.fragment, _), w(l.$$.fragment, _), w(c.$$.fragment, _), w(p.$$.fragment, _), w(g.$$.fragment, _), (b = !1); + o(T) { + B(e.$$.fragment, T), B(n.$$.fragment, T), B(u.$$.fragment, T), B(c.$$.fragment, T), B(p.$$.fragment, T), B(g.$$.fragment, T), (F = !1); }, - d(_) { - R(e, _), _ && y(i), R(n, _), _ && y(o), R(l, _), _ && y(a), R(c, _), _ && y(d), R(p, _), _ && y(F), R(g, _); + d(T) { + M(e, T), T && y(r), M(n, T), T && y(o), M(u, T), T && y(h), M(c, T), T && y(d), M(p, T), T && y(b), M(g, T); }, } ); } - h(eS, "create_default_slot"); - function tS(r) { + a(E4, "create_default_slot"); + function v4(i) { var e, t; return ( - (e = new Ke({ props: { title: "Clean up", open: !0, $$slots: { default: [eS] }, $$scope: { ctx: r } } })), + (e = new Ke({ props: { title: "Clean up", open: !0, $$slots: { default: [E4] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, param) { + p(r, param) { var _param = _sliced_to_array(param, 1), n = _param[0]; var s = {}; - n & 16777471 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 16777471 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(tS, "create_fragment"); - function iS(r, e, t) { - var i, n, s, o, l, u, a; + a(v4, "create_fragment"); + function k4(i, e, t) { + var r, n, s, o, u, l, h; var c = e.options, f = c.omit !== void 0 && c.omit.length > 0, - d = (n = (i = c.omit) === null || i === void 0 ? void 0 : i.join(" ")) !== null && n !== void 0 ? n : "", + d = (n = (r = c.omit) === null || r === void 0 ? void 0 : r.join(" ")) !== null && n !== void 0 ? n : "", p = (s = c.stripComments) !== null && s !== void 0 ? s : !1, m = (o = c.tidyComments) !== null && o !== void 0 ? o : !1, - F = (l = c.lowercase) !== null && l !== void 0 ? l : !1, - g = (u = c.trailingCommas) !== null && u !== void 0 ? u : !1, + b = (u = c.lowercase) !== null && u !== void 0 ? u : !1, + g = (l = c.trailingCommas) !== null && l !== void 0 ? l : !1, D = c.generateKeys !== void 0 && c.generateKeys.length > 0, - b = (a = c.generateKeys) !== null && a !== void 0 ? a : "[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]"; - function B() { + F = (h = c.generateKeys) !== null && h !== void 0 ? h : "[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]"; + function w() { (d = this.value), t(1, d); } - h(B, "textarea_input_handler"); - function k(T) { - (f = T), t(0, f); + a(w, "textarea_input_handler"); + function x(N) { + (f = N), t(0, f); } - h(k, "option0_checked_binding"); - function C(T) { - (p = T), t(2, p); + a(x, "option0_checked_binding"); + function E(N) { + (p = N), t(2, p); } - h(C, "option1_checked_binding"); - function L(T) { - (m = T), t(3, m); + a(E, "option1_checked_binding"); + function _(N) { + (m = N), t(3, m); } - h(L, "option2_checked_binding"); - function Q(T) { - (F = T), t(4, F); + a(_, "option2_checked_binding"); + function I(N) { + (b = N), t(4, b); } - h(Q, "option3_checked_binding"); - function V() { - (b = this.value), t(7, b); + a(I, "option3_checked_binding"); + function J() { + (F = this.value), t(7, F); } - h(V, "textarea_input_handler_1"); - function z(T) { - (D = T), t(6, D); + a(J, "textarea_input_handler_1"); + function z(N) { + (D = N), t(6, D); } - h(z, "option4_checked_binding"); - function G(T) { - (g = T), t(5, g); + a(z, "option4_checked_binding"); + function U(N) { + (g = N), t(5, g); } return ( - h(G, "option5_checked_binding"), - (r.$$set = (T) => { - "options" in T && t(8, (c = T.options)); + a(U, "option5_checked_binding"), + (i.$$set = (N) => { + "options" in N && t(8, (c = N.options)); }), - (r.$$.update = () => { - r.$$.dirty & 255 && (t(8, (c.omit = f && d.length > 0 ? d.split(/[\n\t ,]+/) : void 0), c), t(8, (c.stripComments = p), c), t(8, (c.tidyComments = m), c), t(8, (c.lowercase = F), c), t(8, (c.trailingCommas = g), c), t(8, (c.generateKeys = D ? b : void 0), c)); + (i.$$.update = () => { + if (i.$$.dirty & 255) e: t(8, (c.omit = f && d.length > 0 ? d.split(/[\n\t ,]+/) : void 0), c), t(8, (c.stripComments = p), c), t(8, (c.tidyComments = m), c), t(8, (c.lowercase = b), c), t(8, (c.trailingCommas = g), c), t(8, (c.generateKeys = D ? F : void 0), c); }), - [f, d, p, m, F, g, D, b, c, B, k, C, L, Q, V, z, G] + [f, d, p, m, b, g, D, F, c, w, x, E, _, I, J, z, U] ); } - h(iS, "instance"); - var Nh = - ((_class105 = class _class extends se { + a(k4, "instance"); + var _h = + ((_class104 = class _class extends ie { constructor(e) { - super(), le(this, e, iS, tS, oe, { options: 8 }); + super(), oe(this, e, k4, v4, se, { options: 8 }); } }), - h(_class105, "CleanupOptions"), - _class105), - ZF = Nh; - function e11(r) { - return Jr.map((e) => { - var _e_toCLI; - return (_e_toCLI = e.toCLI) === null || _e_toCLI === void 0 ? void 0 : _e_toCLI.call(e, r[e.key], r); + (() => { + a(_class104, "CleanupOptions"); + })(), + _class104), + M1 = _h; + function $1(i) { + return Hr.map((e) => { + var _e_toCLI, _object; + return (_object = e) === null || _object === void 0 ? void 0 : (_e_toCLI = _object.toCLI) === null || _e_toCLI === void 0 ? void 0 : _e_toCLI.call(_object, i[e.key], i); }).filter((e) => typeof e == "string"); } - h(e11, "optionsToCLIArgs"); - function t1(r, e, t) { - var i = r.slice(); - return (i[2] = e[t][0]), (i[3] = e[t][1]), i; + a($1, "optionsToCLIArgs"); + function P1(i, e, t) { + var r = i.slice(); + return (r[2] = e[t][0]), (r[3] = e[t][1]), r; } - h(t1, "get_each_context"); - function i1(r) { + a(P1, "get_each_context"); + function L1(i) { var e, t, - i = r[3] + "", + r = i[3] + "", n, s; return { c() { - (e = Y("=")), (t = O("span")), (n = Y(i)), (s = $()), v(t, "class", "opt-val svelte-1xnx1c1"); + (e = j("=")), (t = R("span")), (n = j(r)), (s = q()), A(t, "class", "opt-val svelte-1xnx1c1"); }, - m(o, l) { - E(o, e, l), E(o, t, l), q(t, n), E(o, s, l); + m(o, u) { + C(o, e, u), C(o, t, u), V(t, n), C(o, s, u); }, - p(o, l) { - l & 1 && i !== (i = o[3] + "") && qe(n, i); + p(o, u) { + u & 1 && r !== (r = o[3] + "") && We(n, r); }, d(o) { o && y(e), o && y(t), o && y(s); }, }; } - h(i1, "create_if_block"); - function r11(r) { + a(L1, "create_if_block"); + function q1(i) { var e, - t = r[2] + "", - i, + t = i[2] + "", + r, n = " ", s, - o = r[3] && r[3].length > 0 && i1(r); + o = i[3] && i[3].length > 0 && L1(i); return { c() { - (e = O("span")), (i = Y(t)), o && o.c(), (s = Y(n)), v(e, "class", "opt-name svelte-1xnx1c1"); + (e = R("span")), (r = j(t)), o && o.c(), (s = j(n)), A(e, "class", "opt-name svelte-1xnx1c1"); }, - m(l, u) { - E(l, e, u), q(e, i), o && o.m(l, u), E(l, s, u); + m(u, l) { + C(u, e, l), V(e, r), o && o.m(u, l), C(u, s, l); }, - p(l, u) { - u & 1 && t !== (t = l[2] + "") && qe(i, t), l[3] && l[3].length > 0 ? (o ? o.p(l, u) : ((o = i1(l)), o.c(), o.m(s.parentNode, s))) : o && (o.d(1), (o = null)); + p(u, l) { + l & 1 && t !== (t = u[2] + "") && We(r, t), u[3] && u[3].length > 0 ? (o ? o.p(u, l) : ((o = L1(u)), o.c(), o.m(s.parentNode, s))) : o && (o.d(1), (o = null)); }, - d(l) { - l && y(e), o && o.d(l), l && y(s); + d(u) { + u && y(e), o && o.d(u), u && y(s); }, }; } - h(r11, "create_each_block"); - function rS(r) { + a(q1, "create_each_block"); + function w4(i) { var e, t, - i, + r, n, s, - o = r[0], - l = []; - for (var u = 0; u < o.length; u += 1) l[u] = r11(t1(r, o, u)); + o = i[0], + u = []; + for (var l = 0; l < o.length; l += 1) u[l] = q1(P1(i, o, l)); return { c() { - (e = O("p")), (e.textContent = "To run this configuration on the command line:"), (t = $()), (i = O("code")), (n = Y("bibtex-tidy ")); - for (var u = 0; u < l.length; u += 1) l[u].c(); - (s = Y(" YOUR_FILE.bib")), v(i, "id", "cli"), v(i, "class", "svelte-1xnx1c1"); + (e = R("p")), (e.textContent = "To run this configuration on the command line:"), (t = q()), (r = R("code")), (n = j("bibtex-tidy ")); + for (var l = 0; l < u.length; l += 1) u[l].c(); + (s = j(" YOUR_FILE.bib")), A(r, "id", "cli"), A(r, "class", "svelte-1xnx1c1"); }, - m(u, a) { - E(u, e, a), E(u, t, a), E(u, i, a), q(i, n); - for (var c = 0; c < l.length; c += 1) l[c] && l[c].m(i, null); - q(i, s); + m(l, h) { + C(l, e, h), C(l, t, h), C(l, r, h), V(r, n); + for (var c = 0; c < u.length; c += 1) u[c].m(r, null); + V(r, s); }, - p(u, a) { - if (a & 1) { - o = u[0]; + p(l, h) { + if (h & 1) { + o = l[0]; var c; for (c = 0; c < o.length; c += 1) { - var f = t1(u, o, c); - l[c] ? l[c].p(f, a) : ((l[c] = r11(f)), l[c].c(), l[c].m(i, s)); + var f = P1(l, o, c); + u[c] ? u[c].p(f, h) : ((u[c] = q1(f)), u[c].c(), u[c].m(r, s)); } - for (; c < l.length; c += 1) l[c].d(1); - l.length = o.length; + for (; c < u.length; c += 1) u[c].d(1); + u.length = o.length; } }, - d(u) { - u && y(e), u && y(t), u && y(i), Hr(l, u); + d(l) { + l && y(e), l && y(t), l && y(r), Nr(u, l); }, }; } - h(rS, "create_default_slot"); - function nS(r) { + a(w4, "create_default_slot"); + function x4(i) { var e, t; return ( - (e = new Ke({ props: { title: "CLI", $$slots: { default: [rS] }, $$scope: { ctx: r } } })), + (e = new Ke({ props: { title: "CLI", $$slots: { default: [w4] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, param) { + p(r, param) { var _param = _sliced_to_array(param, 1), n = _param[0]; var s = {}; - n & 65 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 65 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(nS, "create_fragment"); - function sS(r, e, t) { - var i = e.options, + a(x4, "create_fragment"); + function S4(i, e, t) { + var r = e.options, n; return ( - (r.$$set = (s) => { - "options" in s && t(1, (i = s.options)); + (i.$$set = (s) => { + "options" in s && t(1, (r = s.options)); }), - (r.$$.update = () => { - r.$$.dirty & 2 && - t( + (i.$$.update = () => { + if (i.$$.dirty & 2) + e: t( 0, - (n = e11(i).map((s) => { + (n = $1(r).map((s) => { var o = s.indexOf("="); return o === -1 ? [s] : [s.slice(0, o), s.slice(o + 1)]; - })), + })) ); }), - [n, i] + [n, r] ); } - h(sS, "instance"); - var Mh = - ((_class106 = class _class extends se { + a(S4, "instance"); + var Oh = + ((_class105 = class _class extends ie { constructor(e) { - super(), le(this, e, sS, nS, oe, { options: 1 }); + super(), oe(this, e, S4, x4, se, { options: 1 }); } }), - h(_class106, "Cli"), - _class106), - n1 = Mh; - function oS(r) { - var e, - t = !1, - i, - n, - s; - return ( - (i = c0(r[4][0])), - { - c() { - (e = O("input")), v(e, "type", "radio"), v(e, "name", r[1]), (e.__value = r[2]), (e.value = e.__value), v(e, "class", "svelte-qhlda7"), i.p(e); - }, - m(o, l) { - E(o, e, l), (e.checked = e.__value === r[0]), n || ((s = ye(e, "change", r[3])), (n = !0)); - }, - p(o, param) { - var _param = _sliced_to_array(param, 1), - l = _param[0]; - l & 2 && v(e, "name", o[1]), l & 4 && ((e.__value = o[2]), (e.value = e.__value), (t = !0)), (t || l & 1) && (e.checked = e.__value === o[0]); - }, - i: Se, - o: Se, - d(o) { - o && y(e), i.r(), (n = !1), s(); - }, - } - ); + (() => { + a(_class105, "Cli"); + })(), + _class105), + I1 = Oh; + function B4(i) { + var e, t, r; + return { + c() { + (e = R("input")), A(e, "type", "radio"), A(e, "name", i[1]), (e.__value = i[2]), (e.value = e.__value), A(e, "class", "svelte-qhlda7"), i[4][0].push(e); + }, + m(n, s) { + C(n, e, s), (e.checked = e.__value === i[0]), t || ((r = be(e, "change", i[3])), (t = !0)); + }, + p(n, param) { + var _param = _sliced_to_array(param, 1), + s = _param[0]; + s & 2 && A(e, "name", n[1]), s & 4 && ((e.__value = n[2]), (e.value = e.__value)), s & 1 && (e.checked = e.__value === n[0]); + }, + i: ke, + o: ke, + d(n) { + n && y(e), i[4][0].splice(i[4][0].indexOf(e), 1), (t = !1), r(); + }, + }; } - h(oS, "create_fragment"); - function lS(r, e, t) { - var i = e.name, + a(B4, "create_fragment"); + function _4(i, e, t) { + var r = e.name, n = e.group, tmp = e.value, s = tmp === void 0 ? void 0 : tmp, o = [[]]; - function l() { + function u() { (n = this.__value), t(0, n); } return ( - h(l, "input_change_handler"), - (r.$$set = (u) => { - "name" in u && t(1, (i = u.name)), "group" in u && t(0, (n = u.group)), "value" in u && t(2, (s = u.value)); + a(u, "input_change_handler"), + (i.$$set = (l) => { + "name" in l && t(1, (r = l.name)), "group" in l && t(0, (n = l.group)), "value" in l && t(2, (s = l.value)); }), - [n, i, s, l, o] + [n, r, s, u, o] ); } - h(lS, "instance"); - var Ph = - ((_class107 = class _class extends se { + a(_4, "instance"); + var Th = + ((_class106 = class _class extends ie { constructor(e) { - super(), le(this, e, lS, oS, oe, { name: 1, group: 0, value: 2 }); + super(), oe(this, e, _4, B4, se, { name: 1, group: 0, value: 2 }); } }), - h(_class107, "Radio"), - _class107), - gi = Ph; - function uS(r) { - var e, t, i, n; - function s(l) { - r[8](l); + (() => { + a(_class106, "Radio"); + })(), + _class106), + ai = Th; + function O4(i) { + var e, t, r, n; + function s(u) { + i[8](u); } - h(s, "checkbox_checked_binding"); + a(s, "checkbox_checked_binding"); var o = { name: "uniqKEY" }; return ( - r[1] !== void 0 && (o.checked = r[1]), - (e = new Pi({ props: o })), - J.push(() => K(e, "checked", s)), + i[1] !== void 0 && (o.checked = i[1]), + (e = new Oi({ props: o })), + Y.push(() => X(e, "checked", s)), { c() { - M(e.$$.fragment), (i = Y("\n Matching Keys")); + P(e.$$.fragment), (r = j("\n Matching Keys")); }, - m(l, u) { - N(e, l, u), E(l, i, u), (n = !0); + m(u, l) { + $(e, u, l), C(u, r, l), (n = !0); }, - p(l, u) { - var a = {}; - !t && u & 2 && ((t = !0), (a.checked = l[1]), X(() => (t = !1))), e.$set(a); + p(u, l) { + var h = {}; + !t && l & 2 && ((t = !0), (h.checked = u[1]), K(() => (t = !1))), e.$set(h); }, - i(l) { - n || (S(e.$$.fragment, l), (n = !0)); + i(u) { + n || (S(e.$$.fragment, u), (n = !0)); }, - o(l) { - w(e.$$.fragment, l), (n = !1); + o(u) { + B(e.$$.fragment, u), (n = !1); }, - d(l) { - R(e, l), l && y(i); + d(u) { + M(e, u), u && y(r); }, } ); } - h(uS, "create_default_slot_10"); - function aS(r) { - var e, t, i, n; - function s(l) { - r[9](l); + a(O4, "create_default_slot_10"); + function T4(i) { + var e, t, r, n; + function s(u) { + i[9](u); } - h(s, "checkbox_checked_binding_1"); + a(s, "checkbox_checked_binding_1"); var o = { name: "uniqDOI" }; return ( - r[2] !== void 0 && (o.checked = r[2]), - (e = new Pi({ props: o })), - J.push(() => K(e, "checked", s)), + i[2] !== void 0 && (o.checked = i[2]), + (e = new Oi({ props: o })), + Y.push(() => X(e, "checked", s)), { c() { - M(e.$$.fragment), (i = Y("\n Matching DOIs")); + P(e.$$.fragment), (r = j("\n Matching DOIs")); }, - m(l, u) { - N(e, l, u), E(l, i, u), (n = !0); + m(u, l) { + $(e, u, l), C(u, r, l), (n = !0); }, - p(l, u) { - var a = {}; - !t && u & 4 && ((t = !0), (a.checked = l[2]), X(() => (t = !1))), e.$set(a); + p(u, l) { + var h = {}; + !t && l & 4 && ((t = !0), (h.checked = u[2]), K(() => (t = !1))), e.$set(h); }, - i(l) { - n || (S(e.$$.fragment, l), (n = !0)); + i(u) { + n || (S(e.$$.fragment, u), (n = !0)); }, - o(l) { - w(e.$$.fragment, l), (n = !1); + o(u) { + B(e.$$.fragment, u), (n = !1); }, - d(l) { - R(e, l), l && y(i); + d(u) { + M(e, u), u && y(r); }, } ); } - h(aS, "create_default_slot_9"); - function hS(r) { - var e, t, i, n; - function s(l) { - r[10](l); + a(T4, "create_default_slot_9"); + function R4(i) { + var e, t, r, n; + function s(u) { + i[10](u); } - h(s, "checkbox_checked_binding_2"); + a(s, "checkbox_checked_binding_2"); var o = { name: "uniqCIT" }; return ( - r[3] !== void 0 && (o.checked = r[3]), - (e = new Pi({ props: o })), - J.push(() => K(e, "checked", s)), + i[3] !== void 0 && (o.checked = i[3]), + (e = new Oi({ props: o })), + Y.push(() => X(e, "checked", s)), { c() { - M(e.$$.fragment), (i = Y("\n Similar author and title")); + P(e.$$.fragment), (r = j("\n Similar author and title")); }, - m(l, u) { - N(e, l, u), E(l, i, u), (n = !0); + m(u, l) { + $(e, u, l), C(u, r, l), (n = !0); }, - p(l, u) { - var a = {}; - !t && u & 8 && ((t = !0), (a.checked = l[3]), X(() => (t = !1))), e.$set(a); + p(u, l) { + var h = {}; + !t && l & 8 && ((t = !0), (h.checked = u[3]), K(() => (t = !1))), e.$set(h); }, - i(l) { - n || (S(e.$$.fragment, l), (n = !0)); + i(u) { + n || (S(e.$$.fragment, u), (n = !0)); }, - o(l) { - w(e.$$.fragment, l), (n = !1); + o(u) { + B(e.$$.fragment, u), (n = !1); }, - d(l) { - R(e, l), l && y(i); + d(u) { + M(e, u), u && y(r); }, } ); } - h(hS, "create_default_slot_8"); - function cS(r) { - var e, t, i, n; - function s(l) { - r[11](l); + a(R4, "create_default_slot_8"); + function M4(i) { + var e, t, r, n; + function s(u) { + i[11](u); } - h(s, "checkbox_checked_binding_3"); + a(s, "checkbox_checked_binding_3"); var o = { name: "uniqABS" }; return ( - r[4] !== void 0 && (o.checked = r[4]), - (e = new Pi({ props: o })), - J.push(() => K(e, "checked", s)), + i[4] !== void 0 && (o.checked = i[4]), + (e = new Oi({ props: o })), + Y.push(() => X(e, "checked", s)), { c() { - M(e.$$.fragment), (i = Y("\n Similar abstracts")); + P(e.$$.fragment), (r = j("\n Similar abstracts")); }, - m(l, u) { - N(e, l, u), E(l, i, u), (n = !0); + m(u, l) { + $(e, u, l), C(u, r, l), (n = !0); }, - p(l, u) { - var a = {}; - !t && u & 16 && ((t = !0), (a.checked = l[4]), X(() => (t = !1))), e.$set(a); + p(u, l) { + var h = {}; + !t && l & 16 && ((t = !0), (h.checked = u[4]), K(() => (t = !1))), e.$set(h); }, - i(l) { - n || (S(e.$$.fragment, l), (n = !0)); + i(u) { + n || (S(e.$$.fragment, u), (n = !0)); }, - o(l) { - w(e.$$.fragment, l), (n = !1); + o(u) { + B(e.$$.fragment, u), (n = !1); }, - d(l) { - R(e, l), l && y(i); + d(u) { + M(e, u), u && y(r); }, } ); } - h(cS, "create_default_slot_7"); - function fS(r) { - var e, t, i, n, s, o, l, u, a, c; + a(M4, "create_default_slot_7"); + function $4(i) { + var e, t, r, n, s, o, u, l, h, c; return ( - (i = new Ze({ props: { $$slots: { default: [uS] }, $$scope: { ctx: r } } })), - (s = new Ze({ props: { $$slots: { default: [aS] }, $$scope: { ctx: r } } })), - (l = new Ze({ props: { $$slots: { default: [hS] }, $$scope: { ctx: r } } })), - (a = new Ze({ props: { $$slots: { default: [cS] }, $$scope: { ctx: r } } })), + (r = new Xe({ props: { $$slots: { default: [O4] }, $$scope: { ctx: i } } })), + (s = new Xe({ props: { $$slots: { default: [T4] }, $$scope: { ctx: i } } })), + (u = new Xe({ props: { $$slots: { default: [R4] }, $$scope: { ctx: i } } })), + (h = new Xe({ props: { $$slots: { default: [M4] }, $$scope: { ctx: i } } })), { c() { - (e = O("p")), (e.textContent = "What to check:"), (t = $()), M(i.$$.fragment), (n = $()), M(s.$$.fragment), (o = $()), M(l.$$.fragment), (u = $()), M(a.$$.fragment); + (e = R("p")), (e.textContent = "What to check:"), (t = q()), P(r.$$.fragment), (n = q()), P(s.$$.fragment), (o = q()), P(u.$$.fragment), (l = q()), P(h.$$.fragment); }, m(f, d) { - E(f, e, d), E(f, t, d), N(i, f, d), E(f, n, d), N(s, f, d), E(f, o, d), N(l, f, d), E(f, u, d), N(a, f, d), (c = !0); + C(f, e, d), C(f, t, d), $(r, f, d), C(f, n, d), $(s, f, d), C(f, o, d), $(u, f, d), C(f, l, d), $(h, f, d), (c = !0); }, p(f, d) { var p = {}; - d & 134217730 && (p.$$scope = { dirty: d, ctx: f }), i.$set(p); + d & 134217730 && (p.$$scope = { dirty: d, ctx: f }), r.$set(p); var m = {}; d & 134217732 && (m.$$scope = { dirty: d, ctx: f }), s.$set(m); - var F = {}; - d & 134217736 && (F.$$scope = { dirty: d, ctx: f }), l.$set(F); + var b = {}; + d & 134217736 && (b.$$scope = { dirty: d, ctx: f }), u.$set(b); var g = {}; - d & 134217744 && (g.$$scope = { dirty: d, ctx: f }), a.$set(g); + d & 134217744 && (g.$$scope = { dirty: d, ctx: f }), h.$set(g); }, i(f) { - c || (S(i.$$.fragment, f), S(s.$$.fragment, f), S(l.$$.fragment, f), S(a.$$.fragment, f), (c = !0)); + c || (S(r.$$.fragment, f), S(s.$$.fragment, f), S(u.$$.fragment, f), S(h.$$.fragment, f), (c = !0)); }, o(f) { - w(i.$$.fragment, f), w(s.$$.fragment, f), w(l.$$.fragment, f), w(a.$$.fragment, f), (c = !1); + B(r.$$.fragment, f), B(s.$$.fragment, f), B(u.$$.fragment, f), B(h.$$.fragment, f), (c = !1); }, d(f) { - f && y(e), f && y(t), R(i, f), f && y(n), R(s, f), f && y(o), R(l, f), f && y(u), R(a, f); + f && y(e), f && y(t), M(r, f), f && y(n), M(s, f), f && y(o), M(u, f), f && y(l), M(h, f); }, } ); } - h(fS, "create_default_slot_6"); - function dS(r) { - var e, t, i, n, s; - function o(u) { - r[13](u); + a($4, "create_default_slot_6"); + function P4(i) { + var e, t, r, n, s; + function o(l) { + i[13](l); } - h(o, "radio_group_binding"); - var l = { name: "mergeStrategy", value: "combine" }; + a(o, "radio_group_binding"); + var u = { name: "mergeStrategy", value: "combine" }; return ( - r[6] !== void 0 && (l.group = r[6]), - (e = new gi({ props: l })), - J.push(() => K(e, "group", o)), + i[6] !== void 0 && (u.group = i[6]), + (e = new ai({ props: u })), + Y.push(() => X(e, "group", o)), { c() { - M(e.$$.fragment), (i = $()), (n = O("span")), (n.innerHTML = "<strong>Combine</strong><br/> \n <small>Keep original entry and merge in fields of duplicates if they do not\n already exist</small>"); + P(e.$$.fragment), (r = q()), (n = R("span")), (n.innerHTML = "<strong>Combine</strong><br/> \n <small>Keep original entry and merge in fields of duplicates if they do not\n already exist</small>"); }, - m(u, a) { - N(e, u, a), E(u, i, a), E(u, n, a), (s = !0); + m(l, h) { + $(e, l, h), C(l, r, h), C(l, n, h), (s = !0); }, - p(u, a) { + p(l, h) { var c = {}; - !t && a & 64 && ((t = !0), (c.group = u[6]), X(() => (t = !1))), e.$set(c); + !t && h & 64 && ((t = !0), (c.group = l[6]), K(() => (t = !1))), e.$set(c); }, - i(u) { - s || (S(e.$$.fragment, u), (s = !0)); + i(l) { + s || (S(e.$$.fragment, l), (s = !0)); }, - o(u) { - w(e.$$.fragment, u), (s = !1); + o(l) { + B(e.$$.fragment, l), (s = !1); }, - d(u) { - R(e, u), u && y(i), u && y(n); + d(l) { + M(e, l), l && y(r), l && y(n); }, } ); } - h(dS, "create_default_slot_5"); - function pS(r) { - var e, t, i, n, s; - function o(u) { - r[14](u); + a(P4, "create_default_slot_5"); + function L4(i) { + var e, t, r, n, s; + function o(l) { + i[14](l); } - h(o, "radio_group_binding_1"); - var l = { name: "mergeStrategy", value: "overwrite" }; + a(o, "radio_group_binding_1"); + var u = { name: "mergeStrategy", value: "overwrite" }; return ( - r[6] !== void 0 && (l.group = r[6]), - (e = new gi({ props: l })), - J.push(() => K(e, "group", o)), + i[6] !== void 0 && (u.group = i[6]), + (e = new ai({ props: u })), + Y.push(() => X(e, "group", o)), { c() { - M(e.$$.fragment), (i = $()), (n = O("span")), (n.innerHTML = "<strong>Overwrite</strong><br/> \n <small>Keep original entry and merge in fields of duplicates, overwriting\n existing fields if they exist</small>"); + P(e.$$.fragment), (r = q()), (n = R("span")), (n.innerHTML = "<strong>Overwrite</strong><br/> \n <small>Keep original entry and merge in fields of duplicates, overwriting\n existing fields if they exist</small>"); }, - m(u, a) { - N(e, u, a), E(u, i, a), E(u, n, a), (s = !0); + m(l, h) { + $(e, l, h), C(l, r, h), C(l, n, h), (s = !0); }, - p(u, a) { + p(l, h) { var c = {}; - !t && a & 64 && ((t = !0), (c.group = u[6]), X(() => (t = !1))), e.$set(c); + !t && h & 64 && ((t = !0), (c.group = l[6]), K(() => (t = !1))), e.$set(c); }, - i(u) { - s || (S(e.$$.fragment, u), (s = !0)); + i(l) { + s || (S(e.$$.fragment, l), (s = !0)); }, - o(u) { - w(e.$$.fragment, u), (s = !1); + o(l) { + B(e.$$.fragment, l), (s = !1); }, - d(u) { - R(e, u), u && y(i), u && y(n); + d(l) { + M(e, l), l && y(r), l && y(n); }, } ); } - h(pS, "create_default_slot_4"); - function mS(r) { - var e, t, i, n, s; - function o(u) { - r[15](u); + a(L4, "create_default_slot_4"); + function q4(i) { + var e, t, r, n, s; + function o(l) { + i[15](l); } - h(o, "radio_group_binding_2"); - var l = { name: "mergeStrategy", value: "first" }; + a(o, "radio_group_binding_2"); + var u = { name: "mergeStrategy", value: "first" }; return ( - r[6] !== void 0 && (l.group = r[6]), - (e = new gi({ props: l })), - J.push(() => K(e, "group", o)), + i[6] !== void 0 && (u.group = i[6]), + (e = new ai({ props: u })), + Y.push(() => X(e, "group", o)), { c() { - M(e.$$.fragment), (i = $()), (n = O("span")), (n.innerHTML = "<strong>First</strong><br/> \n <small>Only keep the original entry</small>"); + P(e.$$.fragment), (r = q()), (n = R("span")), (n.innerHTML = "<strong>First</strong><br/> \n <small>Only keep the original entry</small>"); }, - m(u, a) { - N(e, u, a), E(u, i, a), E(u, n, a), (s = !0); + m(l, h) { + $(e, l, h), C(l, r, h), C(l, n, h), (s = !0); }, - p(u, a) { + p(l, h) { var c = {}; - !t && a & 64 && ((t = !0), (c.group = u[6]), X(() => (t = !1))), e.$set(c); + !t && h & 64 && ((t = !0), (c.group = l[6]), K(() => (t = !1))), e.$set(c); }, - i(u) { - s || (S(e.$$.fragment, u), (s = !0)); + i(l) { + s || (S(e.$$.fragment, l), (s = !0)); }, - o(u) { - w(e.$$.fragment, u), (s = !1); + o(l) { + B(e.$$.fragment, l), (s = !1); }, - d(u) { - R(e, u), u && y(i), u && y(n); + d(l) { + M(e, l), l && y(r), l && y(n); }, } ); } - h(mS, "create_default_slot_3"); - function gS(r) { - var e, t, i, n, s; - function o(u) { - r[16](u); + a(q4, "create_default_slot_3"); + function I4(i) { + var e, t, r, n, s; + function o(l) { + i[16](l); } - h(o, "radio_group_binding_3"); - var l = { name: "mergeStrategy", value: "last" }; + a(o, "radio_group_binding_3"); + var u = { name: "mergeStrategy", value: "last" }; return ( - r[6] !== void 0 && (l.group = r[6]), - (e = new gi({ props: l })), - J.push(() => K(e, "group", o)), + i[6] !== void 0 && (u.group = i[6]), + (e = new ai({ props: u })), + Y.push(() => X(e, "group", o)), { c() { - M(e.$$.fragment), (i = $()), (n = O("span")), (n.innerHTML = "<strong>Last</strong><br/> \n <small>Only keep the last found duplicate</small>"); + P(e.$$.fragment), (r = q()), (n = R("span")), (n.innerHTML = "<strong>Last</strong><br/> \n <small>Only keep the last found duplicate</small>"); }, - m(u, a) { - N(e, u, a), E(u, i, a), E(u, n, a), (s = !0); + m(l, h) { + $(e, l, h), C(l, r, h), C(l, n, h), (s = !0); }, - p(u, a) { + p(l, h) { var c = {}; - !t && a & 64 && ((t = !0), (c.group = u[6]), X(() => (t = !1))), e.$set(c); + !t && h & 64 && ((t = !0), (c.group = l[6]), K(() => (t = !1))), e.$set(c); }, - i(u) { - s || (S(e.$$.fragment, u), (s = !0)); + i(l) { + s || (S(e.$$.fragment, l), (s = !0)); }, - o(u) { - w(e.$$.fragment, u), (s = !1); + o(l) { + B(e.$$.fragment, l), (s = !1); }, - d(u) { - R(e, u), u && y(i), u && y(n); + d(l) { + M(e, l), l && y(r), l && y(n); }, } ); } - h(gS, "create_default_slot_2"); - function DS(r) { - var e, t, i, n, s, o, l, u; + a(I4, "create_default_slot_2"); + function N4(i) { + var e, t, r, n, s, o, u, l; return ( - (e = new Ze({ props: { $$slots: { default: [dS] }, $$scope: { ctx: r } } })), - (i = new Ze({ props: { $$slots: { default: [pS] }, $$scope: { ctx: r } } })), - (s = new Ze({ props: { $$slots: { default: [mS] }, $$scope: { ctx: r } } })), - (l = new Ze({ props: { $$slots: { default: [gS] }, $$scope: { ctx: r } } })), + (e = new Xe({ props: { $$slots: { default: [P4] }, $$scope: { ctx: i } } })), + (r = new Xe({ props: { $$slots: { default: [L4] }, $$scope: { ctx: i } } })), + (s = new Xe({ props: { $$slots: { default: [q4] }, $$scope: { ctx: i } } })), + (u = new Xe({ props: { $$slots: { default: [I4] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment), (t = $()), M(i.$$.fragment), (n = $()), M(s.$$.fragment), (o = $()), M(l.$$.fragment); + P(e.$$.fragment), (t = q()), P(r.$$.fragment), (n = q()), P(s.$$.fragment), (o = q()), P(u.$$.fragment); }, - m(a, c) { - N(e, a, c), E(a, t, c), N(i, a, c), E(a, n, c), N(s, a, c), E(a, o, c), N(l, a, c), (u = !0); + m(h, c) { + $(e, h, c), C(h, t, c), $(r, h, c), C(h, n, c), $(s, h, c), C(h, o, c), $(u, h, c), (l = !0); }, - p(a, c) { + p(h, c) { var f = {}; - c & 134217792 && (f.$$scope = { dirty: c, ctx: a }), e.$set(f); + c & 134217792 && (f.$$scope = { dirty: c, ctx: h }), e.$set(f); var d = {}; - c & 134217792 && (d.$$scope = { dirty: c, ctx: a }), i.$set(d); + c & 134217792 && (d.$$scope = { dirty: c, ctx: h }), r.$set(d); var p = {}; - c & 134217792 && (p.$$scope = { dirty: c, ctx: a }), s.$set(p); + c & 134217792 && (p.$$scope = { dirty: c, ctx: h }), s.$set(p); var m = {}; - c & 134217792 && (m.$$scope = { dirty: c, ctx: a }), l.$set(m); + c & 134217792 && (m.$$scope = { dirty: c, ctx: h }), u.$set(m); }, - i(a) { - u || (S(e.$$.fragment, a), S(i.$$.fragment, a), S(s.$$.fragment, a), S(l.$$.fragment, a), (u = !0)); + i(h) { + l || (S(e.$$.fragment, h), S(r.$$.fragment, h), S(s.$$.fragment, h), S(u.$$.fragment, h), (l = !0)); }, - o(a) { - w(e.$$.fragment, a), w(i.$$.fragment, a), w(s.$$.fragment, a), w(l.$$.fragment, a), (u = !1); + o(h) { + B(e.$$.fragment, h), B(r.$$.fragment, h), B(s.$$.fragment, h), B(u.$$.fragment, h), (l = !1); }, - d(a) { - R(e, a), a && y(t), R(i, a), a && y(n), R(s, a), a && y(o), R(l, a); + d(h) { + M(e, h), h && y(t), M(r, h), h && y(n), M(s, h), h && y(o), M(u, h); }, } ); } - h(DS, "create_default_slot_1"); - function FS(r) { - var e, t, i, n, s, o; - function l(f) { - r[12](f); + a(N4, "create_default_slot_1"); + function V4(i) { + var e, t, r, n, s, o; + function u(f) { + i[12](f); } - h(l, "option0_checked_binding"); - var u = { option: "duplicates", $$slots: { default: [fS] }, $$scope: { ctx: r } }; - r[0] !== void 0 && (u.checked = r[0]), (e = new me({ props: u })), J.push(() => K(e, "checked", l)); - function a(f) { - r[17](f); + a(u, "option0_checked_binding"); + var l = { option: "duplicates", $$slots: { default: [$4] }, $$scope: { ctx: i } }; + i[0] !== void 0 && (l.checked = i[0]), (e = new me({ props: l })), Y.push(() => X(e, "checked", u)); + function h(f) { + i[17](f); } - h(a, "option1_checked_binding"); - var c = { option: "merge", $$slots: { default: [DS] }, $$scope: { ctx: r } }; + a(h, "option1_checked_binding"); + var c = { option: "merge", $$slots: { default: [N4] }, $$scope: { ctx: i } }; return ( - r[5] !== void 0 && (c.checked = r[5]), + i[5] !== void 0 && (c.checked = i[5]), (n = new me({ props: c })), - J.push(() => K(n, "checked", a)), + Y.push(() => X(n, "checked", h)), { c() { - M(e.$$.fragment), (i = $()), M(n.$$.fragment); + P(e.$$.fragment), (r = q()), P(n.$$.fragment); }, m(f, d) { - N(e, f, d), E(f, i, d), N(n, f, d), (o = !0); + $(e, f, d), C(f, r, d), $(n, f, d), (o = !0); }, p(f, d) { var p = {}; - d & 134217758 && (p.$$scope = { dirty: d, ctx: f }), !t && d & 1 && ((t = !0), (p.checked = f[0]), X(() => (t = !1))), e.$set(p); + d & 134217758 && (p.$$scope = { dirty: d, ctx: f }), !t && d & 1 && ((t = !0), (p.checked = f[0]), K(() => (t = !1))), e.$set(p); var m = {}; - d & 134217792 && (m.$$scope = { dirty: d, ctx: f }), !s && d & 32 && ((s = !0), (m.checked = f[5]), X(() => (s = !1))), n.$set(m); + d & 134217792 && (m.$$scope = { dirty: d, ctx: f }), !s && d & 32 && ((s = !0), (m.checked = f[5]), K(() => (s = !1))), n.$set(m); }, i(f) { o || (S(e.$$.fragment, f), S(n.$$.fragment, f), (o = !0)); }, o(f) { - w(e.$$.fragment, f), w(n.$$.fragment, f), (o = !1); + B(e.$$.fragment, f), B(n.$$.fragment, f), (o = !1); }, d(f) { - R(e, f), f && y(i), R(n, f); + M(e, f), f && y(r), M(n, f); }, } ); } - h(FS, "create_default_slot"); - function bS(r) { + a(V4, "create_default_slot"); + function z4(i) { var e, t; return ( - (e = new Ke({ props: { title: "Duplicates", open: !0, $$slots: { default: [FS] }, $$scope: { ctx: r } } })), + (e = new Ke({ props: { title: "Duplicates", open: !0, $$slots: { default: [V4] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, param) { + p(r, param) { var _param = _sliced_to_array(param, 1), n = _param[0]; var s = {}; - n & 134217855 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 134217855 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(bS, "create_fragment"); - function yS(r, e, t) { - var i, n, s, o, l, u, a, c, f; + a(z4, "create_fragment"); + function H4(i, e, t) { + var r, n, s, o, u, l, h, c, f; var d = e.options, p = d.duplicates !== void 0, - m = (n = (i = d.duplicates) === null || i === void 0 ? void 0 : i.includes("key")) !== null && n !== void 0 ? n : !0, - F = (o = (s = d.duplicates) === null || s === void 0 ? void 0 : s.includes("doi")) !== null && o !== void 0 ? o : !1, - g = (u = (l = d.duplicates) === null || l === void 0 ? void 0 : l.includes("citation")) !== null && u !== void 0 ? u : !1, - D = (c = (a = d.duplicates) === null || a === void 0 ? void 0 : a.includes("abstract")) !== null && c !== void 0 ? c : !1, - b = d.merge !== void 0, - B = (f = d.merge) !== null && f !== void 0 ? f : "combine"; - function k(P) { - (m = P), t(1, m); - } - h(k, "checkbox_checked_binding"); - function C(P) { - (F = P), t(2, F); - } - h(C, "checkbox_checked_binding_1"); - function L(P) { - (g = P), t(3, g); - } - h(L, "checkbox_checked_binding_2"); - function Q(P) { - (D = P), t(4, D); - } - h(Q, "checkbox_checked_binding_3"); - function V(P) { - (p = P), t(0, p); - } - h(V, "option0_checked_binding"); - function z(P) { - (B = P), t(6, B); - } - h(z, "radio_group_binding"); - function G(P) { - (B = P), t(6, B); - } - h(G, "radio_group_binding_1"); - function T(P) { - (B = P), t(6, B); - } - h(T, "radio_group_binding_2"); - function j(P) { - (B = P), t(6, B); - } - h(j, "radio_group_binding_3"); - function te(P) { - (b = P), t(5, b); + m = (n = (r = d.duplicates) === null || r === void 0 ? void 0 : r.includes("key")) !== null && n !== void 0 ? n : !0, + b = (o = (s = d.duplicates) === null || s === void 0 ? void 0 : s.includes("doi")) !== null && o !== void 0 ? o : !1, + g = (l = (u = d.duplicates) === null || u === void 0 ? void 0 : u.includes("citation")) !== null && l !== void 0 ? l : !1, + D = (c = (h = d.duplicates) === null || h === void 0 ? void 0 : h.includes("abstract")) !== null && c !== void 0 ? c : !1, + F = d.merge !== void 0, + w = (f = d.merge) !== null && f !== void 0 ? f : "combine"; + function x(H) { + (m = H), t(1, m); + } + a(x, "checkbox_checked_binding"); + function E(H) { + (b = H), t(2, b); + } + a(E, "checkbox_checked_binding_1"); + function _(H) { + (g = H), t(3, g); + } + a(_, "checkbox_checked_binding_2"); + function I(H) { + (D = H), t(4, D); + } + a(I, "checkbox_checked_binding_3"); + function J(H) { + (p = H), t(0, p); + } + a(J, "option0_checked_binding"); + function z(H) { + (w = H), t(6, w); + } + a(z, "radio_group_binding"); + function U(H) { + (w = H), t(6, w); + } + a(U, "radio_group_binding_1"); + function N(H) { + (w = H), t(6, w); + } + a(N, "radio_group_binding_2"); + function ne(H) { + (w = H), t(6, w); + } + a(ne, "radio_group_binding_3"); + function le(H) { + (F = H), t(5, F); } return ( - h(te, "option1_checked_binding"), - (r.$$set = (P) => { - "options" in P && t(7, (d = P.options)); + a(le, "option1_checked_binding"), + (i.$$set = (H) => { + "options" in H && t(7, (d = H.options)); }), - (r.$$.update = () => { - r.$$.dirty & 255 && (p ? (t(7, (d.duplicates = []), d), m && d.duplicates.push("key"), F && d.duplicates.push("doi"), g && d.duplicates.push("citation"), D && d.duplicates.push("abstract")) : t(7, (d.duplicates = void 0), d), t(7, (d.merge = b ? B : void 0), d)); + (i.$$.update = () => { + if (i.$$.dirty & 255) e: p ? (t(7, (d.duplicates = []), d), m && d.duplicates.push("key"), b && d.duplicates.push("doi"), g && d.duplicates.push("citation"), D && d.duplicates.push("abstract")) : t(7, (d.duplicates = void 0), d), t(7, (d.merge = F ? w : void 0), d); }), - [p, m, F, g, D, b, B, d, k, C, L, Q, V, z, G, T, j, te] + [p, m, b, g, D, F, w, d, x, E, _, I, J, z, U, N, ne, le] ); } - h(yS, "instance"); - var Ih = - ((_class108 = class _class extends se { + a(H4, "instance"); + var Rh = + ((_class107 = class _class extends ie { constructor(e) { - super(), le(this, e, yS, bS, oe, { options: 7 }); + super(), oe(this, e, H4, z4, se, { options: 7 }); } }), - h(_class108, "DuplicateOptions"), - _class108), - s1 = Ih; - function ES(r) { - var e, t, i, n, s, o; + (() => { + a(_class107, "DuplicateOptions"); + })(), + _class107), + N1 = Rh; + function W4(i) { + var e, t, r, n, s, o; return { c() { - (e = O("strong")), (e.textContent = "There's a problem with the bibtex"), (t = O("br")), (i = Y("\n Unknown error: ")), (n = Y(r[0])), (s = O("br")), (o = Y("\n This is probably a bug.")); + (e = R("strong")), (e.textContent = "There's a problem with the bibtex"), (t = R("br")), (r = j("\n Unknown error: ")), (n = j(i[0])), (s = R("br")), (o = j("\n This is probably a bug.")); }, - m(l, u) { - E(l, e, u), E(l, t, u), E(l, i, u), E(l, n, u), E(l, s, u), E(l, o, u); + m(u, l) { + C(u, e, l), C(u, t, l), C(u, r, l), C(u, n, l), C(u, s, l), C(u, o, l); }, - p(l, u) { - u & 1 && qe(n, l[0]); + p(u, l) { + l & 1 && We(n, u[0]); }, - d(l) { - l && y(e), l && y(t), l && y(i), l && y(n), l && y(s), l && y(o); + d(u) { + u && y(e), u && y(t), u && y(r), u && y(n), u && y(s), u && y(o); }, }; } - h(ES, "create_else_block_1"); - function CS(r) { + a(W4, "create_else_block_1"); + function j4(i) { var e, t, - i, - n = r[0].name + "", + r, + n = i[0].name + "", s, o, - l = r[0].line + "", - u, - a, - c = r[0].column + "", + u = i[0].line + "", + l, + h, + c = i[0].column + "", f, d, p, m; - function F(b, B) { - return b[0].hint ? vS : BS; + function b(F, w) { + return F[0].hint ? G4 : U4; } - h(F, "select_block_type_1"); - var g = F(r, -1), - D = g(r); + a(b, "select_block_type_1"); + var g = b(i, -1), + D = g(i); return { c() { - (e = O("strong")), (e.textContent = "There's a problem with the bibtex"), (t = O("br")), (i = $()), (s = Y(n)), (o = Y(" on line ")), (u = Y(l)), (a = Y(" column ")), (f = Y(c)), (d = O("br")), (p = $()), D.c(), (m = Ht()); + (e = R("strong")), (e.textContent = "There's a problem with the bibtex"), (t = R("br")), (r = q()), (s = j(n)), (o = j(" on line ")), (l = j(u)), (h = j(" column ")), (f = j(c)), (d = R("br")), (p = q()), D.c(), (m = It()); }, - m(b, B) { - E(b, e, B), E(b, t, B), E(b, i, B), E(b, s, B), E(b, o, B), E(b, u, B), E(b, a, B), E(b, f, B), E(b, d, B), E(b, p, B), D.m(b, B), E(b, m, B); + m(F, w) { + C(F, e, w), C(F, t, w), C(F, r, w), C(F, s, w), C(F, o, w), C(F, l, w), C(F, h, w), C(F, f, w), C(F, d, w), C(F, p, w), D.m(F, w), C(F, m, w); }, - p(b, B) { - B & 1 && n !== (n = b[0].name + "") && qe(s, n), B & 1 && l !== (l = b[0].line + "") && qe(u, l), B & 1 && c !== (c = b[0].column + "") && qe(f, c), g === (g = F(b, B)) && D ? D.p(b, B) : (D.d(1), (D = g(b)), D && (D.c(), D.m(m.parentNode, m))); + p(F, w) { + w & 1 && n !== (n = F[0].name + "") && We(s, n), w & 1 && u !== (u = F[0].line + "") && We(l, u), w & 1 && c !== (c = F[0].column + "") && We(f, c), g === (g = b(F, w)) && D ? D.p(F, w) : (D.d(1), (D = g(F)), D && (D.c(), D.m(m.parentNode, m))); }, - d(b) { - b && y(e), b && y(t), b && y(i), b && y(s), b && y(o), b && y(u), b && y(a), b && y(f), b && y(d), b && y(p), D.d(b), b && y(m); + d(F) { + F && y(e), F && y(t), F && y(r), F && y(s), F && y(o), F && y(l), F && y(h), F && y(f), F && y(d), F && y(p), D.d(F), F && y(m); }, }; } - h(CS, "create_if_block"); - function BS(r) { + a(j4, "create_if_block"); + function U4(i) { var e, - t = JSON.stringify(r[0].char) + "", - i, + t = JSON.stringify(i[0].char) + "", + r, n, - s = r[0].node.type + "", + s = i[0].node.type + "", o, - l; + u; return { c() { - (e = Y("Unexpected ")), (i = Y(t)), (n = Y(" in ")), (o = Y(s)), (l = Y(".")); + (e = j("Unexpected ")), (r = j(t)), (n = j(" in ")), (o = j(s)), (u = j(".")); }, - m(u, a) { - E(u, e, a), E(u, i, a), E(u, n, a), E(u, o, a), E(u, l, a); + m(l, h) { + C(l, e, h), C(l, r, h), C(l, n, h), C(l, o, h), C(l, u, h); }, - p(u, a) { - a & 1 && t !== (t = JSON.stringify(u[0].char) + "") && qe(i, t), a & 1 && s !== (s = u[0].node.type + "") && qe(o, s); + p(l, h) { + h & 1 && t !== (t = JSON.stringify(l[0].char) + "") && We(r, t), h & 1 && s !== (s = l[0].node.type + "") && We(o, s); }, - d(u) { - u && y(e), u && y(i), u && y(n), u && y(o), u && y(l); + d(l) { + l && y(e), l && y(r), l && y(n), l && y(o), l && y(u); }, }; } - h(BS, "create_else_block"); - function vS(r) { - var e = r[0].hint + "", + a(U4, "create_else_block"); + function G4(i) { + var e = i[0].hint + "", t; return { c() { - t = Y(e); + t = j(e); }, - m(i, n) { - E(i, t, n); + m(r, n) { + C(r, t, n); }, - p(i, n) { - n & 1 && e !== (e = i[0].hint + "") && qe(t, e); + p(r, n) { + n & 1 && e !== (e = r[0].hint + "") && We(t, e); }, - d(i) { - i && y(t); + d(r) { + r && y(t); }, }; } - h(vS, "create_if_block_1"); - function xS(r) { - var e, t, i, n, s, o, l; - function u(f, d) { - return f[0] instanceof at ? CS : ES; + a(G4, "create_if_block_1"); + function Y4(i) { + var e, t, r, n, s, o, u; + function l(f, d) { + return f[0] instanceof st ? j4 : W4; } - h(u, "select_block_type"); - var a = u(r, -1), - c = a(r); + a(l, "select_block_type"); + var h = l(i, -1), + c = h(i); return { c() { - (e = O("div")), - (t = _t("svg")), - (i = _t("circle")), - (n = _t("line")), - (s = _t("line")), - (o = $()), - (l = O("div")), + (e = R("div")), + (t = St("svg")), + (r = St("circle")), + (n = St("line")), + (s = St("line")), + (o = q()), + (u = R("div")), c.c(), - v(i, "cx", "12"), - v(i, "cy", "12"), - v(i, "r", "10"), - v(i, "class", "svelte-176xcb"), - v(n, "x1", "12"), - v(n, "y1", "8"), - v(n, "x2", "12"), - v(n, "y2", "12"), - v(n, "class", "svelte-176xcb"), - v(s, "x1", "12"), - v(s, "y1", "16"), - v(s, "x2", "12.01"), - v(s, "y2", "16"), - v(s, "class", "svelte-176xcb"), - v(t, "xmlns", "http://www.w3.org/2000/svg"), - v(t, "width", "24"), - v(t, "height", "24"), - v(t, "viewBox", "0 0 24 24"), - v(t, "fill", "none"), - v(t, "stroke", "currentColor"), - v(t, "stroke-width", "2"), - v(t, "stroke-linecap", "round"), - v(t, "stroke-linejoin", "round"), - v(t, "class", "svelte-176xcb"), - v(l, "class", "text"), - v(e, "class", "container svelte-176xcb"); + A(r, "cx", "12"), + A(r, "cy", "12"), + A(r, "r", "10"), + A(r, "class", "svelte-176xcb"), + A(n, "x1", "12"), + A(n, "y1", "8"), + A(n, "x2", "12"), + A(n, "y2", "12"), + A(n, "class", "svelte-176xcb"), + A(s, "x1", "12"), + A(s, "y1", "16"), + A(s, "x2", "12.01"), + A(s, "y2", "16"), + A(s, "class", "svelte-176xcb"), + A(t, "xmlns", "http://www.w3.org/2000/svg"), + A(t, "width", "24"), + A(t, "height", "24"), + A(t, "viewBox", "0 0 24 24"), + A(t, "fill", "none"), + A(t, "stroke", "currentColor"), + A(t, "stroke-width", "2"), + A(t, "stroke-linecap", "round"), + A(t, "stroke-linejoin", "round"), + A(t, "class", "svelte-176xcb"), + A(u, "class", "text"), + A(e, "class", "container svelte-176xcb"); }, m(f, d) { - E(f, e, d), q(e, t), q(t, i), q(t, n), q(t, s), q(e, o), q(e, l), c.m(l, null); + C(f, e, d), V(e, t), V(t, r), V(t, n), V(t, s), V(e, o), V(e, u), c.m(u, null); }, p(f, param) { var _param = _sliced_to_array(param, 1), d = _param[0]; - a === (a = u(f, d)) && c ? c.p(f, d) : (c.d(1), (c = a(f)), c && (c.c(), c.m(l, null))); + h === (h = l(f, d)) && c ? c.p(f, d) : (c.d(1), (c = h(f)), c && (c.c(), c.m(u, null))); }, - i: Se, - o: Se, + i: ke, + o: ke, d(f) { f && y(e), c.d(); }, }; } - h(xS, "create_fragment"); - function AS(r, e, t) { - var i = e.error; + a(Y4, "create_fragment"); + function K4(i, e, t) { + var r = e.error; return ( - (r.$$set = (n) => { - "error" in n && t(0, (i = n.error)); + (i.$$set = (n) => { + "error" in n && t(0, (r = n.error)); }), - [i] + [r] ); } - h(AS, "instance"); - var $h = - ((_class109 = class _class extends se { + a(K4, "instance"); + var Mh = + ((_class108 = class _class extends ie { constructor(e) { - super(), le(this, e, AS, xS, oe, { error: 0 }); + super(), oe(this, e, K4, Y4, se, { error: 0 }); } }), - h(_class109, "FeedbackError"), - _class109), - o1 = $h; - function l1(r, e, t) { - var i = r.slice(); - return (i[4] = e[t]), i; - } - h(l1, "get_each_context"); - function u1(r, e, t) { - var i = r.slice(); - return (i[7] = e[t]), i; - } - h(u1, "get_each_context_1"); - function kS(r) { + (() => { + a(_class108, "FeedbackError"); + })(), + _class108), + V1 = Mh; + function z1(i, e, t) { + var r = i.slice(); + return (r[4] = e[t]), r; + } + a(z1, "get_each_context"); + function H1(i, e, t) { + var r = i.slice(); + return (r[7] = e[t]), r; + } + a(H1, "get_each_context_1"); + function X4(i) { var e, - t = r[2], - i = []; - for (var n = 0; n < t.length; n += 1) i[n] = a1(u1(r, t, n)); + t = i[2], + r = []; + for (var n = 0; n < t.length; n += 1) r[n] = W1(H1(i, t, n)); return { c() { - e = O("ul"); - for (var n = 0; n < i.length; n += 1) i[n].c(); + e = R("ul"); + for (var n = 0; n < r.length; n += 1) r[n].c(); }, m(n, s) { - E(n, e, s); - for (var o = 0; o < i.length; o += 1) i[o] && i[o].m(e, null); + C(n, e, s); + for (var o = 0; o < r.length; o += 1) r[o].m(e, null); }, p(n, s) { if (s & 4) { t = n[2]; var o; for (o = 0; o < t.length; o += 1) { - var l = u1(n, t, o); - i[o] ? i[o].p(l, s) : ((i[o] = a1(l)), i[o].c(), i[o].m(e, null)); + var u = H1(n, t, o); + r[o] ? r[o].p(u, s) : ((r[o] = W1(u)), r[o].c(), r[o].m(e, null)); } - for (; o < i.length; o += 1) i[o].d(1); - i.length = t.length; + for (; o < r.length; o += 1) r[o].d(1); + r.length = t.length; } }, d(n) { - n && y(e), Hr(i, n); + n && y(e), Nr(r, n); }, }; } - h(kS, "create_if_block_2"); - function a1(r) { + a(X4, "create_if_block_2"); + function W1(i) { var e, t, - i = r[7].message + "", + r = i[7].message + "", n; return { c() { - (e = O("li")), (t = Y("$")), (n = Y(i)); + (e = R("li")), (t = j("$")), (n = j(r)); }, m(s, o) { - E(s, e, o), q(e, t), q(e, n); + C(s, e, o), V(e, t), V(e, n); }, - p: Se, + p: ke, d(s) { s && y(e); }, }; } - h(a1, "create_each_block_1"); - function h1(r) { + a(W1, "create_each_block_1"); + function j1(i) { var e; function t(s, o) { - return s[3].length === 0 ? wS : SS; + return s[3].length === 0 ? J4 : Q4; } - h(t, "select_block_type"); - var n = t(r, -1)(r); + a(t, "select_block_type"); + var n = t(i, -1)(i); return { c() { - n.c(), (e = Ht()); + n.c(), (e = It()); }, m(s, o) { - n.m(s, o), E(s, e, o); + n.m(s, o), C(s, e, o); }, p(s, o) { n.p(s, o); @@ -24826,1503 +24199,1520 @@ function _ts_generator(thisArg, body) { }, }; } - h(h1, "create_if_block"); - function SS(r) { + a(j1, "create_if_block"); + function Q4(i) { var e, t, - i, - n = r[3], + r, + n = i[3], s = []; - for (var o = 0; o < n.length; o += 1) s[o] = c1(l1(r, n, o)); + for (var o = 0; o < n.length; o += 1) s[o] = U1(z1(i, n, o)); return { c() { - (e = O("strong")), (e.textContent = "".concat(r[3].length, " merged:")), (t = $()), (i = O("ul")); + (e = R("strong")), (e.textContent = "".concat(i[3].length, " merged:")), (t = q()), (r = R("ul")); for (var o = 0; o < s.length; o += 1) s[o].c(); - v(e, "class", "svelte-yy7yvg"); + A(e, "class", "svelte-yy7yvg"); }, - m(o, l) { - E(o, e, l), E(o, t, l), E(o, i, l); - for (var u = 0; u < s.length; u += 1) s[u] && s[u].m(i, null); + m(o, u) { + C(o, e, u), C(o, t, u), C(o, r, u); + for (var l = 0; l < s.length; l += 1) s[l].m(r, null); }, - p(o, l) { - if (l & 8) { + p(o, u) { + if (u & 8) { n = o[3]; - var u; - for (u = 0; u < n.length; u += 1) { - var a = l1(o, n, u); - s[u] ? s[u].p(a, l) : ((s[u] = c1(a)), s[u].c(), s[u].m(i, null)); + var l; + for (l = 0; l < n.length; l += 1) { + var h = z1(o, n, l); + s[l] ? s[l].p(h, u) : ((s[l] = U1(h)), s[l].c(), s[l].m(r, null)); } - for (; u < s.length; u += 1) s[u].d(1); + for (; l < s.length; l += 1) s[l].d(1); s.length = n.length; } }, d(o) { - o && y(e), o && y(t), o && y(i), Hr(s, o); + o && y(e), o && y(t), o && y(r), Nr(s, o); }, }; } - h(SS, "create_else_block"); - function wS(r) { + a(Q4, "create_else_block"); + function J4(i) { var e; return { c() { - e = Y("No duplicates"); + e = j("No duplicates"); }, - m(t, i) { - E(t, e, i); + m(t, r) { + C(t, e, r); }, - p: Se, + p: ke, d(t) { t && y(e); }, }; } - h(wS, "create_if_block_1"); - function c1(r) { + a(J4, "create_if_block_1"); + function U1(i) { var e, - t = r[4].message + "", - i; + t = i[4].message + "", + r; return { c() { - (e = O("li")), (i = Y(t)); + (e = R("li")), (r = j(t)); }, m(n, s) { - E(n, e, s), q(e, i); + C(n, e, s), V(e, r); }, - p: Se, + p: ke, d(n) { n && y(e); }, }; } - h(c1, "create_each_block"); - function QS(r) { + a(U1, "create_each_block"); + function Z4(i) { var e, t, - i, + r, n, s, o, - l, u, - a, + l, + h, c, - f = r[1].count + "", + f = i[1].count + "", d, p, m, - F = r[2].length > 0 && kS(r), - g = r[0].merge && h1(r); + b = i[2].length > 0 && X4(i), + g = i[0].merge && j1(i); return { c() { - (e = O("div")), - (t = _t("svg")), - (i = _t("circle")), - (n = _t("line")), - (s = _t("line")), - (o = $()), - (l = O("div")), - (u = O("strong")), - (u.textContent = "Successful!"), - (a = O("br")), - (c = Y("\n Tidied ")), - (d = Y(f)), - (p = Y(" entries.\n\n ")), - F && F.c(), - (m = $()), + (e = R("div")), + (t = St("svg")), + (r = St("circle")), + (n = St("line")), + (s = St("line")), + (o = q()), + (u = R("div")), + (l = R("strong")), + (l.textContent = "Successful!"), + (h = R("br")), + (c = j("\n Tidied ")), + (d = j(f)), + (p = j(" entries.\n\n ")), + b && b.c(), + (m = q()), g && g.c(), - v(i, "cx", "12"), - v(i, "cy", "12"), - v(i, "r", "10"), - v(i, "class", "svelte-yy7yvg"), - v(n, "x1", "12"), - v(n, "y1", "16"), - v(n, "x2", "12"), - v(n, "y2", "12"), - v(n, "class", "svelte-yy7yvg"), - v(s, "x1", "12"), - v(s, "y1", "8"), - v(s, "x2", "12.01"), - v(s, "y2", "8"), - v(s, "class", "svelte-yy7yvg"), - v(t, "xmlns", "http://www.w3.org/2000/svg"), - v(t, "width", "24"), - v(t, "height", "24"), - v(t, "viewBox", "0 0 24 24"), - v(t, "fill", "none"), - v(t, "stroke", "currentColor"), - v(t, "stroke-width", "2"), - v(t, "stroke-linecap", "round"), - v(t, "stroke-linejoin", "round"), - v(t, "class", "feather feather-info svelte-yy7yvg"), - v(u, "class", "svelte-yy7yvg"), - v(l, "class", "text"), - v(e, "class", "container svelte-yy7yvg"); + A(r, "cx", "12"), + A(r, "cy", "12"), + A(r, "r", "10"), + A(r, "class", "svelte-yy7yvg"), + A(n, "x1", "12"), + A(n, "y1", "16"), + A(n, "x2", "12"), + A(n, "y2", "12"), + A(n, "class", "svelte-yy7yvg"), + A(s, "x1", "12"), + A(s, "y1", "8"), + A(s, "x2", "12.01"), + A(s, "y2", "8"), + A(s, "class", "svelte-yy7yvg"), + A(t, "xmlns", "http://www.w3.org/2000/svg"), + A(t, "width", "24"), + A(t, "height", "24"), + A(t, "viewBox", "0 0 24 24"), + A(t, "fill", "none"), + A(t, "stroke", "currentColor"), + A(t, "stroke-width", "2"), + A(t, "stroke-linecap", "round"), + A(t, "stroke-linejoin", "round"), + A(t, "class", "feather feather-info svelte-yy7yvg"), + A(l, "class", "svelte-yy7yvg"), + A(u, "class", "text"), + A(e, "class", "container svelte-yy7yvg"); }, - m(D, b) { - E(D, e, b), q(e, t), q(t, i), q(t, n), q(t, s), q(e, o), q(e, l), q(l, u), q(l, a), q(l, c), q(l, d), q(l, p), F && F.m(l, null), q(l, m), g && g.m(l, null); + m(D, F) { + C(D, e, F), V(e, t), V(t, r), V(t, n), V(t, s), V(e, o), V(e, u), V(u, l), V(u, h), V(u, c), V(u, d), V(u, p), b && b.m(u, null), V(u, m), g && g.m(u, null); }, p(D, param) { var _param = _sliced_to_array(param, 1), - b = _param[0]; - b & 2 && f !== (f = D[1].count + "") && qe(d, f), D[2].length > 0 && F.p(D, b), D[0].merge ? (g ? g.p(D, b) : ((g = h1(D)), g.c(), g.m(l, null))) : g && (g.d(1), (g = null)); + F = _param[0]; + F & 2 && f !== (f = D[1].count + "") && We(d, f), D[2].length > 0 && b.p(D, F), D[0].merge ? (g ? g.p(D, F) : ((g = j1(D)), g.c(), g.m(u, null))) : g && (g.d(1), (g = null)); }, - i: Se, - o: Se, + i: ke, + o: ke, d(D) { - D && y(e), F && F.d(), g && g.d(); + D && y(e), b && b.d(), g && g.d(); }, }; } - h(QS, "create_fragment"); - function _S(r, e, t) { - var i = e.options, + a(Z4, "create_fragment"); + function e3(i, e, t) { + var r = e.options, n = e.result, - s = n.warnings.filter((l) => l.code !== "DUPLICATE_ENTRY"), - o = n.warnings.filter((l) => l.code === "DUPLICATE_ENTRY"); + s = n.warnings.filter((u) => u.code !== "DUPLICATE_ENTRY"), + o = n.warnings.filter((u) => u.code === "DUPLICATE_ENTRY"); return ( - (r.$$set = (l) => { - "options" in l && t(0, (i = l.options)), "result" in l && t(1, (n = l.result)); + (i.$$set = (u) => { + "options" in u && t(0, (r = u.options)), "result" in u && t(1, (n = u.result)); }), - [i, n, s, o] + [r, n, s, o] ); } - h(_S, "instance"); - var qh = - ((_class110 = class _class extends se { + a(e3, "instance"); + var $h = + ((_class109 = class _class extends ie { constructor(e) { - super(), le(this, e, _S, QS, oe, { options: 0, result: 1 }); + super(), oe(this, e, e3, Z4, se, { options: 0, result: 1 }); } }), - h(_class110, "FeedbackSuccess"), - _class110), - f1 = qh; - function US(r) { + (() => { + a(_class109, "FeedbackSuccess"); + })(), + _class109), + G1 = $h; + function t3(i) { var e, t; return ( - (e = new o1({ props: { error: r[1].error } })), + (e = new V1({ props: { error: i[1].error } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, n) { + p(r, n) { var s = {}; - n & 2 && (s.error = i[1].error), e.$set(s); + n & 2 && (s.error = r[1].error), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(US, "create_else_block"); - function LS(r) { + a(t3, "create_else_block"); + function i3(i) { var e, t; return ( - (e = new f1({ props: { options: r[0], result: r[1].result } })), + (e = new G1({ props: { options: i[0], result: i[1].result } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, n) { + p(r, n) { var s = {}; - n & 1 && (s.options = i[0]), n & 2 && (s.result = i[1].result), e.$set(s); + n & 1 && (s.options = r[0]), n & 2 && (s.result = r[1].result), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(LS, "create_if_block"); - function OS(r) { + a(i3, "create_if_block"); + function r3(i) { var e, t, - i, + r, n, - s = [LS, US], + s = [i3, t3], o = []; - function l(u, a) { - return u[1].status === "success" ? 0 : 1; + function u(l, h) { + return l[1].status === "success" ? 0 : 1; } return ( - h(l, "select_block_type"), - (t = l(r, -1)), - (i = o[t] = s[t](r)), + a(u, "select_block_type"), + (t = u(i, -1)), + (r = o[t] = s[t](i)), { c() { - (e = O("div")), i.c(), v(e, "role", "alert"), v(e, "class", "svelte-1pqmac"); + (e = R("div")), r.c(), A(e, "role", "alert"), A(e, "class", "svelte-1pqmac"); }, - m(u, a) { - E(u, e, a), o[t].m(e, null), (n = !0); + m(l, h) { + C(l, e, h), o[t].m(e, null), (n = !0); }, - p(u, param) { + p(l, param) { var _param = _sliced_to_array(param, 1), - a = _param[0]; + h = _param[0]; var c = t; - (t = l(u, a)), + (t = u(l, h)), t === c - ? o[t].p(u, a) - : (jt(), - w(o[c], 1, 1, () => { + ? o[t].p(l, h) + : (Nt(), + B(o[c], 1, 1, () => { o[c] = null; }), - Yt(), - (i = o[t]), - i ? i.p(u, a) : ((i = o[t] = s[t](u)), i.c()), - S(i, 1), - i.m(e, null)); + Vt(), + (r = o[t]), + r ? r.p(l, h) : ((r = o[t] = s[t](l)), r.c()), + S(r, 1), + r.m(e, null)); }, - i(u) { - n || (S(i), (n = !0)); + i(l) { + n || (S(r), (n = !0)); }, - o(u) { - w(i), (n = !1); + o(l) { + B(r), (n = !1); }, - d(u) { - u && y(e), o[t].d(); + d(l) { + l && y(e), o[t].d(); }, } ); } - h(OS, "create_fragment"); - function TS(r, e, t) { - var i = e.options, + a(r3, "create_fragment"); + function n3(i, e, t) { + var r = e.options, n = e.status; return ( - (r.$$set = (s) => { - "options" in s && t(0, (i = s.options)), "status" in s && t(1, (n = s.status)); + (i.$$set = (s) => { + "options" in s && t(0, (r = s.options)), "status" in s && t(1, (n = s.status)); }), - [i, n] + [r, n] ); } - h(TS, "instance"); - var Vh = - ((_class111 = class _class extends se { + a(n3, "instance"); + var Ph = + ((_class110 = class _class extends ie { constructor(e) { - super(), le(this, e, TS, OS, oe, { options: 0, status: 1 }); + super(), oe(this, e, n3, r3, se, { options: 0, status: 1 }); } }), - h(_class111, "Feedback"), - _class111), - d1 = Vh; - function RS(r) { - var e, t, i, n; - function s(l) { - r[3](l); + (() => { + a(_class110, "Feedback"); + })(), + _class110), + Y1 = Ph; + function s3(i) { + var e, t, r, n; + function s(u) { + i[3](u); } - h(s, "radio_group_binding"); + a(s, "radio_group_binding"); var o = { name: "indent", value: "tabs" }; return ( - r[0] !== void 0 && (o.group = r[0]), - (e = new gi({ props: o })), - J.push(() => K(e, "group", s)), + i[0] !== void 0 && (o.group = i[0]), + (e = new ai({ props: o })), + Y.push(() => X(e, "group", s)), { c() { - M(e.$$.fragment), (i = Y("\n Indent with tabs")); + P(e.$$.fragment), (r = j("\n Indent with tabs")); }, - m(l, u) { - N(e, l, u), E(l, i, u), (n = !0); + m(u, l) { + $(e, u, l), C(u, r, l), (n = !0); }, - p(l, u) { - var a = {}; - !t && u & 1 && ((t = !0), (a.group = l[0]), X(() => (t = !1))), e.$set(a); + p(u, l) { + var h = {}; + !t && l & 1 && ((t = !0), (h.group = u[0]), K(() => (t = !1))), e.$set(h); }, - i(l) { - n || (S(e.$$.fragment, l), (n = !0)); + i(u) { + n || (S(e.$$.fragment, u), (n = !0)); }, - o(l) { - w(e.$$.fragment, l), (n = !1); + o(u) { + B(e.$$.fragment, u), (n = !1); }, - d(l) { - R(e, l), l && y(i); + d(u) { + M(e, u), u && y(r); }, } ); } - h(RS, "create_default_slot_3"); - function NS(r) { - var e, t, i, n; - function s(l) { - r[4](l); + a(s3, "create_default_slot_3"); + function o3(i) { + var e, t, r, n; + function s(u) { + i[4](u); } - h(s, "radio_group_binding_1"); + a(s, "radio_group_binding_1"); var o = { name: "indent", value: "spaces" }; return ( - r[0] !== void 0 && (o.group = r[0]), - (e = new gi({ props: o })), - J.push(() => K(e, "group", s)), + i[0] !== void 0 && (o.group = i[0]), + (e = new ai({ props: o })), + Y.push(() => X(e, "group", s)), { c() { - M(e.$$.fragment), (i = Y("\n Indent with spaces")); + P(e.$$.fragment), (r = j("\n Indent with spaces")); }, - m(l, u) { - N(e, l, u), E(l, i, u), (n = !0); + m(u, l) { + $(e, u, l), C(u, r, l), (n = !0); }, - p(l, u) { - var a = {}; - !t && u & 1 && ((t = !0), (a.group = l[0]), X(() => (t = !1))), e.$set(a); + p(u, l) { + var h = {}; + !t && l & 1 && ((t = !0), (h.group = u[0]), K(() => (t = !1))), e.$set(h); }, - i(l) { - n || (S(e.$$.fragment, l), (n = !0)); + i(u) { + n || (S(e.$$.fragment, u), (n = !0)); }, - o(l) { - w(e.$$.fragment, l), (n = !1); + o(u) { + B(e.$$.fragment, u), (n = !1); }, - d(l) { - R(e, l), l && y(i); + d(u) { + M(e, u), u && y(r); }, } ); } - h(NS, "create_default_slot_2"); - function p1(r) { + a(o3, "create_default_slot_2"); + function K1(i) { var e, t; return ( - (e = new qo({ props: { $$slots: { default: [MS] }, $$scope: { ctx: r } } })), + (e = new $o({ props: { $$slots: { default: [u3] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, n) { + p(r, n) { var s = {}; - n & 66 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 66 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(p1, "create_if_block"); - function MS(r) { - var e, t, i, n, s; + a(K1, "create_if_block"); + function u3(i) { + var e, t, r, n, s; return { c() { - (e = O("label")), (t = Y("Spaces: ")), (i = O("input")), v(i, "name", "spaces"), v(i, "type", "number"); + (e = R("label")), (t = j("Spaces: ")), (r = R("input")), A(r, "name", "spaces"), A(r, "type", "number"); }, - m(o, l) { - E(o, e, l), q(e, t), q(e, i), Ee(i, r[1]), n || ((s = ye(i, "input", r[5])), (n = !0)); + m(o, u) { + C(o, e, u), V(e, t), V(e, r), Fe(r, i[1]), n || ((s = be(r, "input", i[5])), (n = !0)); }, - p(o, l) { - l & 2 && Bt(i.value) !== o[1] && Ee(i, o[1]); + p(o, u) { + u & 2 && bt(r.value) !== o[1] && Fe(r, o[1]); }, d(o) { o && y(e), (n = !1), s(); }, }; } - h(MS, "create_default_slot_1"); - function PS(r) { - var e, t, i, n, s, o; - (e = new Ze({ props: { title: "Indent fields with tabs", $$slots: { default: [RS] }, $$scope: { ctx: r } } })), (i = new Ze({ props: { title: "Indent fields with spaces", $$slots: { default: [NS] }, $$scope: { ctx: r } } })); - var l = r[0] === "spaces" && p1(r); + a(u3, "create_default_slot_1"); + function l3(i) { + var e, t, r, n, s, o; + (e = new Xe({ props: { title: "Indent fields with tabs", $$slots: { default: [s3] }, $$scope: { ctx: i } } })), (r = new Xe({ props: { title: "Indent fields with spaces", $$slots: { default: [o3] }, $$scope: { ctx: i } } })); + var u = i[0] === "spaces" && K1(i); return { c() { - M(e.$$.fragment), (t = $()), M(i.$$.fragment), (n = $()), l && l.c(), (s = Ht()); + P(e.$$.fragment), (t = q()), P(r.$$.fragment), (n = q()), u && u.c(), (s = It()); }, - m(u, a) { - N(e, u, a), E(u, t, a), N(i, u, a), E(u, n, a), l && l.m(u, a), E(u, s, a), (o = !0); + m(l, h) { + $(e, l, h), C(l, t, h), $(r, l, h), C(l, n, h), u && u.m(l, h), C(l, s, h), (o = !0); }, - p(u, a) { + p(l, h) { var c = {}; - a & 65 && (c.$$scope = { dirty: a, ctx: u }), e.$set(c); + h & 65 && (c.$$scope = { dirty: h, ctx: l }), e.$set(c); var f = {}; - a & 65 && (f.$$scope = { dirty: a, ctx: u }), - i.$set(f), - u[0] === "spaces" - ? l - ? (l.p(u, a), a & 1 && S(l, 1)) - : ((l = p1(u)), l.c(), S(l, 1), l.m(s.parentNode, s)) - : l && - (jt(), - w(l, 1, 1, () => { - l = null; + h & 65 && (f.$$scope = { dirty: h, ctx: l }), + r.$set(f), + l[0] === "spaces" + ? u + ? (u.p(l, h), h & 1 && S(u, 1)) + : ((u = K1(l)), u.c(), S(u, 1), u.m(s.parentNode, s)) + : u && + (Nt(), + B(u, 1, 1, () => { + u = null; }), - Yt()); + Vt()); }, - i(u) { - o || (S(e.$$.fragment, u), S(i.$$.fragment, u), S(l), (o = !0)); + i(l) { + o || (S(e.$$.fragment, l), S(r.$$.fragment, l), S(u), (o = !0)); }, - o(u) { - w(e.$$.fragment, u), w(i.$$.fragment, u), w(l), (o = !1); + o(l) { + B(e.$$.fragment, l), B(r.$$.fragment, l), B(u), (o = !1); }, - d(u) { - R(e, u), u && y(t), R(i, u), u && y(n), l && l.d(u), u && y(s); + d(l) { + M(e, l), l && y(t), M(r, l), l && y(n), u && u.d(l), l && y(s); }, }; } - h(PS, "create_default_slot"); - function IS(r) { + a(l3, "create_default_slot"); + function a3(i) { var e, t; return ( - (e = new Ke({ props: { title: "Indent", open: !0, $$slots: { default: [PS] }, $$scope: { ctx: r } } })), + (e = new Ke({ props: { title: "Indent", open: !0, $$slots: { default: [l3] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, param) { + p(r, param) { var _param = _sliced_to_array(param, 1), n = _param[0]; var s = {}; - n & 67 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 67 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(IS, "create_fragment"); - function $S(r, e, t) { - var i = e.options, - n = i.tab ? "tabs" : "spaces", - s = i.space; - function o(a) { - (n = a), t(0, n); + a(a3, "create_fragment"); + function h3(i, e, t) { + var r = e.options, + n = r.tab ? "tabs" : "spaces", + s = r.space; + function o(h) { + (n = h), t(0, n); } - h(o, "radio_group_binding"); - function l(a) { - (n = a), t(0, n); + a(o, "radio_group_binding"); + function u(h) { + (n = h), t(0, n); } - h(l, "radio_group_binding_1"); - function u() { - (s = Bt(this.value)), t(1, s); + a(u, "radio_group_binding_1"); + function l() { + (s = bt(this.value)), t(1, s); } return ( - h(u, "input_input_handler"), - (r.$$set = (a) => { - "options" in a && t(2, (i = a.options)); + a(l, "input_input_handler"), + (i.$$set = (h) => { + "options" in h && t(2, (r = h.options)); }), - (r.$$.update = () => { - r.$$.dirty & 3 && (t(2, (i.space = s), i), t(2, (i.tab = n === "tabs"), i)); + (i.$$.update = () => { + if (i.$$.dirty & 3) e: t(2, (r.space = s), r), t(2, (r.tab = n === "tabs"), r); }), - [n, s, i, o, l, u] + [n, s, r, o, u, l] ); } - h($S, "instance"); - var Wh = - ((_class112 = class _class extends se { + a(h3, "instance"); + var Lh = + ((_class111 = class _class extends ie { constructor(e) { - super(), le(this, e, $S, IS, oe, { options: 2 }); + super(), oe(this, e, h3, a3, se, { options: 2 }); } }), - h(_class112, "IndentOptions"), - _class112), - m1 = Wh; - function qS(r) { - var e, t, i, n, s, o, l, u, a; + (() => { + a(_class111, "IndentOptions"); + })(), + _class111), + X1 = Lh; + function c3(i) { + var e, t, r, n, s, o, u, l, h; return { c() { - (e = O("label")), - (t = Y("Fields to sort by:\n ")), - (i = O("textarea")), - (n = $()), - (s = O("p")), + (e = R("label")), + (t = j("Fields to sort by:\n ")), + (r = R("textarea")), + (n = q()), + (s = R("p")), (s.innerHTML = "Space delimited, e.g: <code>key type publisher author</code>. For\n descending order, prefix the field name with a dash, e.g.\n <code>-year author</code>."), - (o = $()), - (l = O("p")), - (l.innerHTML = "In addition to field names, you can use <code>key</code> to sort by\n citation key,\n <code>type</code> to sort by entry type (@article, @misc, etc), and\n <code>special</code> to sort special entries (@string, @preamble, @xdata, and\n @set) to the top."), - v(i, "name", "sortList"), - v(i, "spellcheck", "false"); + (o = q()), + (u = R("p")), + (u.innerHTML = "In addition to field names, you can use <code>key</code> to sort by\n citation key,\n <code>type</code> to sort by entry type (@article, @misc, etc), and\n <code>special</code> to sort special entries (@string, @preamble, @xdata, and\n @set) to the top."), + A(r, "name", "sortList"), + A(r, "spellcheck", "false"); }, m(c, f) { - E(c, e, f), q(e, t), q(e, i), Ee(i, r[3]), E(c, n, f), E(c, s, f), E(c, o, f), E(c, l, f), u || ((a = ye(i, "input", r[5])), (u = !0)); + C(c, e, f), V(e, t), V(e, r), Fe(r, i[3]), C(c, n, f), C(c, s, f), C(c, o, f), C(c, u, f), l || ((h = be(r, "input", i[5])), (l = !0)); }, p(c, f) { - f & 8 && Ee(i, c[3]); + f & 8 && Fe(r, c[3]); }, d(c) { - c && y(e), c && y(n), c && y(s), c && y(o), c && y(l), (u = !1), a(); + c && y(e), c && y(n), c && y(s), c && y(o), c && y(u), (l = !1), h(); }, }; } - h(qS, "create_default_slot_2"); - function VS(r) { - var e, t, i, n, s, o, l; + a(c3, "create_default_slot_2"); + function f3(i) { + var e, t, r, n, s, o, u; return { c() { - (e = O("label")), (t = Y("Field order:\n ")), (i = O("textarea")), (n = $()), (s = O("p")), (s.innerHTML = "Space delimited, e.g: <code>title author year</code>"), v(i, "name", "sortFieldList"), v(i, "spellcheck", "false"); + (e = R("label")), (t = j("Field order:\n ")), (r = R("textarea")), (n = q()), (s = R("p")), (s.innerHTML = "Space delimited, e.g: <code>title author year</code>"), A(r, "name", "sortFieldList"), A(r, "spellcheck", "false"); }, - m(u, a) { - E(u, e, a), q(e, t), q(e, i), Ee(i, r[1]), E(u, n, a), E(u, s, a), o || ((l = ye(i, "input", r[7])), (o = !0)); + m(l, h) { + C(l, e, h), V(e, t), V(e, r), Fe(r, i[1]), C(l, n, h), C(l, s, h), o || ((u = be(r, "input", i[7])), (o = !0)); }, - p(u, a) { - a & 2 && Ee(i, u[1]); + p(l, h) { + h & 2 && Fe(r, l[1]); }, - d(u) { - u && y(e), u && y(n), u && y(s), (o = !1), l(); + d(l) { + l && y(e), l && y(n), l && y(s), (o = !1), u(); }, }; } - h(VS, "create_default_slot_1"); - function WS(r) { - var e, t, i, n, s, o; - function l(f) { - r[6](f); + a(f3, "create_default_slot_1"); + function d3(i) { + var e, t, r, n, s, o; + function u(f) { + i[6](f); } - h(l, "option0_checked_binding"); - var u = { option: "sort", $$slots: { default: [qS] }, $$scope: { ctx: r } }; - r[2] !== void 0 && (u.checked = r[2]), (e = new me({ props: u })), J.push(() => K(e, "checked", l)); - function a(f) { - r[8](f); + a(u, "option0_checked_binding"); + var l = { option: "sort", $$slots: { default: [c3] }, $$scope: { ctx: i } }; + i[2] !== void 0 && (l.checked = i[2]), (e = new me({ props: l })), Y.push(() => X(e, "checked", u)); + function h(f) { + i[8](f); } - h(a, "option1_checked_binding"); - var c = { option: "sortFields", $$slots: { default: [VS] }, $$scope: { ctx: r } }; + a(h, "option1_checked_binding"); + var c = { option: "sortFields", $$slots: { default: [f3] }, $$scope: { ctx: i } }; return ( - r[0] !== void 0 && (c.checked = r[0]), + i[0] !== void 0 && (c.checked = i[0]), (n = new me({ props: c })), - J.push(() => K(n, "checked", a)), + Y.push(() => X(n, "checked", h)), { c() { - M(e.$$.fragment), (i = $()), M(n.$$.fragment); + P(e.$$.fragment), (r = q()), P(n.$$.fragment); }, m(f, d) { - N(e, f, d), E(f, i, d), N(n, f, d), (o = !0); + $(e, f, d), C(f, r, d), $(n, f, d), (o = !0); }, p(f, d) { var p = {}; - d & 2056 && (p.$$scope = { dirty: d, ctx: f }), !t && d & 4 && ((t = !0), (p.checked = f[2]), X(() => (t = !1))), e.$set(p); + d & 2056 && (p.$$scope = { dirty: d, ctx: f }), !t && d & 4 && ((t = !0), (p.checked = f[2]), K(() => (t = !1))), e.$set(p); var m = {}; - d & 2050 && (m.$$scope = { dirty: d, ctx: f }), !s && d & 1 && ((s = !0), (m.checked = f[0]), X(() => (s = !1))), n.$set(m); + d & 2050 && (m.$$scope = { dirty: d, ctx: f }), !s && d & 1 && ((s = !0), (m.checked = f[0]), K(() => (s = !1))), n.$set(m); }, i(f) { o || (S(e.$$.fragment, f), S(n.$$.fragment, f), (o = !0)); }, o(f) { - w(e.$$.fragment, f), w(n.$$.fragment, f), (o = !1); + B(e.$$.fragment, f), B(n.$$.fragment, f), (o = !1); }, d(f) { - R(e, f), f && y(i), R(n, f); + M(e, f), f && y(r), M(n, f); }, } ); } - h(WS, "create_default_slot"); - function zS(r) { + a(d3, "create_default_slot"); + function p3(i) { var e, t; return ( - (e = new Ke({ props: { title: "Sorting", open: !0, $$slots: { default: [WS] }, $$scope: { ctx: r } } })), + (e = new Ke({ props: { title: "Sorting", open: !0, $$slots: { default: [d3] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, param) { + p(r, param) { var _param = _sliced_to_array(param, 1), n = _param[0]; var s = {}; - n & 2063 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 2063 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(zS, "create_fragment"); - function HS(r, e, t) { - var i, n; + a(p3, "create_fragment"); + function m3(i, e, t) { + var r, n; var s = e.options, o = s.sortFields !== void 0 && s.sortFields.length > 0, - l = ((i = s.sortFields) !== null && i !== void 0 ? i : Us).join(" "), - u = s.sort !== void 0 && s.sort.length > 0, - a = ((n = s.sort) !== null && n !== void 0 ? n : Qu).join(" "); + u = ((r = s.sortFields) !== null && r !== void 0 ? r : ys).join(" "), + l = s.sort !== void 0 && s.sort.length > 0, + h = ((n = s.sort) !== null && n !== void 0 ? n : El).join(" "); function c() { - (a = this.value), t(3, a); + (h = this.value), t(3, h); } - h(c, "textarea_input_handler"); + a(c, "textarea_input_handler"); function f(m) { - (u = m), t(2, u); + (l = m), t(2, l); } - h(f, "option0_checked_binding"); + a(f, "option0_checked_binding"); function d() { - (l = this.value), t(1, l); + (u = this.value), t(1, u); } - h(d, "textarea_input_handler_1"); + a(d, "textarea_input_handler_1"); function p(m) { (o = m), t(0, o); } return ( - h(p, "option1_checked_binding"), - (r.$$set = (m) => { + a(p, "option1_checked_binding"), + (i.$$set = (m) => { "options" in m && t(4, (s = m.options)); }), - (r.$$.update = () => { - r.$$.dirty & 15 && (t(4, (s.sortFields = o && l.length > 0 ? l.split(/[\n\t ,]+/) : void 0), s), t(4, (s.sort = u && a.length > 0 ? a.split(/[\n\t ,]+/) : void 0), s)); + (i.$$.update = () => { + if (i.$$.dirty & 15) e: t(4, (s.sortFields = o && u.length > 0 ? u.split(/[\n\t ,]+/) : void 0), s), t(4, (s.sort = l && h.length > 0 ? h.split(/[\n\t ,]+/) : void 0), s); }), - [o, l, u, a, s, c, f, d, p] + [o, u, l, h, s, c, f, d, p] ); } - h(HS, "instance"); - var zh = - ((_class113 = class _class extends se { + a(m3, "instance"); + var qh = + ((_class112 = class _class extends ie { constructor(e) { - super(), le(this, e, HS, zS, oe, { options: 4 }); + super(), oe(this, e, m3, p3, se, { options: 4 }); } }), - h(_class113, "SortingOptions"), - _class113), - g1 = zh; - function jS(r) { - var e, t, i, n, s, o, l; + (() => { + a(_class112, "SortingOptions"); + })(), + _class112), + Q1 = qh; + function g3(i) { + var e, t, r, n, s, o, u; return { c() { - (e = O("label")), (t = Y("Fields to enclose in double braces:\n ")), (i = O("textarea")), (n = $()), (s = O("p")), (s.innerHTML = "Space delimited, e.g: <code>title journal</code>."), v(i, "name", "enclosingBracesList"), v(i, "spellcheck", "false"); + (e = R("label")), (t = j("Fields to enclose in double braces:\n ")), (r = R("textarea")), (n = q()), (s = R("p")), (s.innerHTML = "Space delimited, e.g: <code>title journal</code>."), A(r, "name", "enclosingBracesList"), A(r, "spellcheck", "false"); }, - m(u, a) { - E(u, e, a), q(e, t), q(e, i), Ee(i, r[12]), E(u, n, a), E(u, s, a), o || ((l = ye(i, "input", r[17])), (o = !0)); + m(l, h) { + C(l, e, h), V(e, t), V(e, r), Fe(r, i[12]), C(l, n, h), C(l, s, h), o || ((u = be(r, "input", i[17])), (o = !0)); }, - p(u, a) { - a[0] & 4096 && Ee(i, u[12]); + p(l, h) { + h[0] & 4096 && Fe(r, l[12]); }, - d(u) { - u && y(e), u && y(n), u && y(s), (o = !1), l(); + d(l) { + l && y(e), l && y(n), l && y(s), (o = !1), u(); }, }; } - h(jS, "create_default_slot_3"); - function YS(r) { - var e, t, i, n, s, o, l; + a(g3, "create_default_slot_3"); + function D3(i) { + var e, t, r, n, s, o, u; return { c() { - (e = O("label")), (t = Y("Remove braces from values of these fields:\n ")), (i = O("textarea")), (n = $()), (s = O("p")), (s.innerHTML = "Space delimited, e.g: <code>title journal</code>."), v(i, "name", "removeBracesList"), v(i, "spellcheck", "false"); + (e = R("label")), (t = j("Remove braces from values of these fields:\n ")), (r = R("textarea")), (n = q()), (s = R("p")), (s.innerHTML = "Space delimited, e.g: <code>title journal</code>."), A(r, "name", "removeBracesList"), A(r, "spellcheck", "false"); }, - m(u, a) { - E(u, e, a), q(e, t), q(e, i), Ee(i, r[14]), E(u, n, a), E(u, s, a), o || ((l = ye(i, "input", r[19])), (o = !0)); + m(l, h) { + C(l, e, h), V(e, t), V(e, r), Fe(r, i[14]), C(l, n, h), C(l, s, h), o || ((u = be(r, "input", i[19])), (o = !0)); }, - p(u, a) { - a[0] & 16384 && Ee(i, u[14]); + p(l, h) { + h[0] & 16384 && Fe(r, l[14]); }, - d(u) { - u && y(e), u && y(n), u && y(s), (o = !1), l(); + d(l) { + l && y(e), l && y(n), l && y(s), (o = !1), u(); }, }; } - h(YS, "create_default_slot_2"); - function JS(r) { - var e, t, i, n, s, o, l; + a(D3, "create_default_slot_2"); + function b3(i) { + var e, t, r, n, s, o, u; return { c() { - (e = O("label")), (t = Y("Maximum number of authors:\n ")), (i = O("input")), (n = $()), (s = O("p")), (s.textContent = 'Author lists longer than this will be truncated to "and others".'), v(i, "name", "maxAuthorsNum"), v(i, "type", "number"); + (e = R("label")), (t = j("Maximum number of authors:\n ")), (r = R("input")), (n = q()), (s = R("p")), (s.textContent = 'Author lists longer than this will be truncated to "and others".'), A(r, "name", "maxAuthorsNum"), A(r, "type", "number"); }, - m(u, a) { - E(u, e, a), q(e, t), q(e, i), Ee(i, r[10]), E(u, n, a), E(u, s, a), o || ((l = ye(i, "input", r[29])), (o = !0)); + m(l, h) { + C(l, e, h), V(e, t), V(e, r), Fe(r, i[10]), C(l, n, h), C(l, s, h), o || ((u = be(r, "input", i[29])), (o = !0)); }, - p(u, a) { - a[0] & 1024 && Bt(i.value) !== u[10] && Ee(i, u[10]); + p(l, h) { + h[0] & 1024 && bt(r.value) !== l[10] && Fe(r, l[10]); }, - d(u) { - u && y(e), u && y(n), u && y(s), (o = !1), l(); + d(l) { + l && y(e), l && y(n), l && y(s), (o = !1), u(); }, }; } - h(JS, "create_default_slot_1"); - function GS(r) { - var e, t, i, n, s, o, l, u, a, c, f, d, p, m, F, g, D, b, B, k, C, L, Q, V, z, G, T, j, te, P, _, ee, he, ve, xe, ae, be, we; - function Ye(A) { - r[16](A); - } - h(Ye, "option0_checked_binding"); - var et = { option: "curly" }; - r[0] !== void 0 && (et.checked = r[0]), (i = new me({ props: et })), J.push(() => K(i, "checked", Ye)); - function Ft(A) { - r[18](A); - } - h(Ft, "option1_checked_binding"); - var qt = { option: "enclosingBraces", $$slots: { default: [jS] }, $$scope: { ctx: r } }; - r[11] !== void 0 && (qt.checked = r[11]), (o = new me({ props: qt })), J.push(() => K(o, "checked", Ft)); - function Ii(A) { - r[20](A); - } - h(Ii, "option2_checked_binding"); - var ke = { option: "removeBraces", $$slots: { default: [YS] }, $$scope: { ctx: r } }; - r[13] !== void 0 && (ke.checked = r[13]), (a = new me({ props: ke })), J.push(() => K(a, "checked", Ii)); - function ie(A) { - r[21](A); - } - h(ie, "option3_checked_binding"); - var Oe = { option: "stripEnclosingBraces" }; - r[1] !== void 0 && (Oe.checked = r[1]), (d = new me({ props: Oe })), J.push(() => K(d, "checked", ie)); - function $i(A) { - r[22](A); - } - h($i, "option4_checked_binding"); - var ce = { option: "numeric" }; - r[2] !== void 0 && (ce.checked = r[2]), (F = new me({ props: ce })), J.push(() => K(F, "checked", $i)); - function On(A) { - r[23](A); - } - h(On, "option5_checked_binding"); - var Sr = { option: "months" }; - r[3] !== void 0 && (Sr.checked = r[3]), (b = new me({ props: Sr })), J.push(() => K(b, "checked", On)); - function Tn(A) { - r[24](A); - } - h(Tn, "option6_checked_binding"); - var wr = { option: "dropAllCaps" }; - r[4] !== void 0 && (wr.checked = r[4]), (C = new me({ props: wr })), J.push(() => K(C, "checked", Tn)); - function Rn(A) { - r[25](A); - } - h(Rn, "option7_checked_binding"); - var Gh = { option: "escape" }; - r[5] !== void 0 && (Gh.checked = r[5]), (V = new me({ props: Gh })), J.push(() => K(V, "checked", Rn)); - function B1(A) { - r[26](A); - } - h(B1, "option8_checked_binding"); - var Xh = { option: "encodeUrls" }; - r[6] !== void 0 && (Xh.checked = r[6]), (T = new me({ props: Xh })), J.push(() => K(T, "checked", B1)); - function v1(A) { - r[27](A); - } - h(v1, "option9_checked_binding"); - var Kh = { option: "removeEmptyFields" }; - r[7] !== void 0 && (Kh.checked = r[7]), (P = new me({ props: Kh })), J.push(() => K(P, "checked", v1)); - function x1(A) { - r[28](A); - } - h(x1, "option10_checked_binding"); - var Zh = { option: "removeDuplicateFields" }; - r[8] !== void 0 && (Zh.checked = r[8]), (he = new me({ props: Zh })), J.push(() => K(he, "checked", x1)); - function A1(A) { - r[30](A); - } - h(A1, "option11_checked_binding"); - var ec = { option: "maxAuthors", $$slots: { default: [JS] }, $$scope: { ctx: r } }; + a(b3, "create_default_slot_1"); + function F3(i) { + var e, t, r, n, s, o, u, l, h, c, f, d, p, m, b, g, D, F, w, x, E, _, I, J, z, U, N, ne, le, H, T, Z, ge, De, ce, ae, _e, Me; + function pt(v) { + i[16](v); + } + a(pt, "option0_checked_binding"); + var $t = { option: "curly" }; + i[0] !== void 0 && ($t.checked = i[0]), (r = new me({ props: $t })), Y.push(() => X(r, "checked", pt)); + function Ti(v) { + i[18](v); + } + a(Ti, "option1_checked_binding"); + var Ri = { option: "enclosingBraces", $$slots: { default: [g3] }, $$scope: { ctx: i } }; + i[11] !== void 0 && (Ri.checked = i[11]), (o = new me({ props: Ri })), Y.push(() => X(o, "checked", Ti)); + function Mi(v) { + i[20](v); + } + a(Mi, "option2_checked_binding"); + var ve = { option: "removeBraces", $$slots: { default: [D3] }, $$scope: { ctx: i } }; + i[13] !== void 0 && (ve.checked = i[13]), (h = new me({ props: ve })), Y.push(() => X(h, "checked", Mi)); + function ee(v) { + i[21](v); + } + a(ee, "option3_checked_binding"); + var Le = { option: "stripEnclosingBraces" }; + i[1] !== void 0 && (Le.checked = i[1]), (d = new me({ props: Le })), Y.push(() => X(d, "checked", ee)); + function $i(v) { + i[22](v); + } + a($i, "option4_checked_binding"); + var fe = { option: "numeric" }; + i[2] !== void 0 && (fe.checked = i[2]), (b = new me({ props: fe })), Y.push(() => X(b, "checked", $i)); + function Cn(v) { + i[23](v); + } + a(Cn, "option5_checked_binding"); + var vr = { option: "months" }; + i[3] !== void 0 && (vr.checked = i[3]), (F = new me({ props: vr })), Y.push(() => X(F, "checked", Cn)); + function An(v) { + i[24](v); + } + a(An, "option6_checked_binding"); + var kr = { option: "dropAllCaps" }; + i[4] !== void 0 && (kr.checked = i[4]), (E = new me({ props: kr })), Y.push(() => X(E, "checked", An)); + function En(v) { + i[25](v); + } + a(En, "option7_checked_binding"); + var Hh = { option: "escape" }; + i[5] !== void 0 && (Hh.checked = i[5]), (J = new me({ props: Hh })), Y.push(() => X(J, "checked", En)); + function nb(v) { + i[26](v); + } + a(nb, "option8_checked_binding"); + var Wh = { option: "encodeUrls" }; + i[6] !== void 0 && (Wh.checked = i[6]), (N = new me({ props: Wh })), Y.push(() => X(N, "checked", nb)); + function sb(v) { + i[27](v); + } + a(sb, "option9_checked_binding"); + var jh = { option: "removeEmptyFields" }; + i[7] !== void 0 && (jh.checked = i[7]), (H = new me({ props: jh })), Y.push(() => X(H, "checked", sb)); + function ob(v) { + i[28](v); + } + a(ob, "option10_checked_binding"); + var Uh = { option: "removeDuplicateFields" }; + i[8] !== void 0 && (Uh.checked = i[8]), (ge = new me({ props: Uh })), Y.push(() => X(ge, "checked", ob)); + function ub(v) { + i[30](v); + } + a(ub, "option11_checked_binding"); + var Gh = { option: "maxAuthors", $$slots: { default: [b3] }, $$scope: { ctx: i } }; return ( - r[9] !== void 0 && (ec.checked = r[9]), - (ae = new me({ props: ec })), - J.push(() => K(ae, "checked", A1)), + i[9] !== void 0 && (Gh.checked = i[9]), + (ae = new me({ props: Gh })), + Y.push(() => X(ae, "checked", ub)), { c() { - (e = O("div")), - (t = $()), - M(i.$$.fragment), - (s = $()), - M(o.$$.fragment), - (u = $()), - M(a.$$.fragment), - (f = $()), - M(d.$$.fragment), - (m = $()), - M(F.$$.fragment), - (D = $()), - M(b.$$.fragment), - (k = $()), - M(C.$$.fragment), - (Q = $()), - M(V.$$.fragment), - (G = $()), - M(T.$$.fragment), - (te = $()), - M(P.$$.fragment), - (ee = $()), - M(he.$$.fragment), - (xe = $()), - M(ae.$$.fragment), - v(e, "id", "valueOptions"); + (e = R("div")), + (t = q()), + P(r.$$.fragment), + (s = q()), + P(o.$$.fragment), + (l = q()), + P(h.$$.fragment), + (f = q()), + P(d.$$.fragment), + (m = q()), + P(b.$$.fragment), + (D = q()), + P(F.$$.fragment), + (x = q()), + P(E.$$.fragment), + (I = q()), + P(J.$$.fragment), + (U = q()), + P(N.$$.fragment), + (le = q()), + P(H.$$.fragment), + (Z = q()), + P(ge.$$.fragment), + (ce = q()), + P(ae.$$.fragment), + A(e, "id", "valueOptions"); }, - m(A, re) { - E(A, e, re), E(A, t, re), N(i, A, re), E(A, s, re), N(o, A, re), E(A, u, re), N(a, A, re), E(A, f, re), N(d, A, re), E(A, m, re), N(F, A, re), E(A, D, re), N(b, A, re), E(A, k, re), N(C, A, re), E(A, Q, re), N(V, A, re), E(A, G, re), N(T, A, re), E(A, te, re), N(P, A, re), E(A, ee, re), N(he, A, re), E(A, xe, re), N(ae, A, re), (we = !0); + m(v, te) { + C(v, e, te), C(v, t, te), $(r, v, te), C(v, s, te), $(o, v, te), C(v, l, te), $(h, v, te), C(v, f, te), $(d, v, te), C(v, m, te), $(b, v, te), C(v, D, te), $(F, v, te), C(v, x, te), $(E, v, te), C(v, I, te), $(J, v, te), C(v, U, te), $(N, v, te), C(v, le, te), $(H, v, te), C(v, Z, te), $(ge, v, te), C(v, ce, te), $(ae, v, te), (Me = !0); }, - p(A, re) { + p(v, te) { + var Yh = {}; + !n && te[0] & 1 && ((n = !0), (Yh.checked = v[0]), K(() => (n = !1))), r.$set(Yh); + var Po = {}; + (te[0] & 4096) | (te[1] & 16384) && (Po.$$scope = { dirty: te, ctx: v }), !u && te[0] & 2048 && ((u = !0), (Po.checked = v[11]), K(() => (u = !1))), o.$set(Po); + var Lo = {}; + (te[0] & 16384) | (te[1] & 16384) && (Lo.$$scope = { dirty: te, ctx: v }), !c && te[0] & 8192 && ((c = !0), (Lo.checked = v[13]), K(() => (c = !1))), h.$set(Lo); + var Kh = {}; + !p && te[0] & 2 && ((p = !0), (Kh.checked = v[1]), K(() => (p = !1))), d.$set(Kh); + var Xh = {}; + !g && te[0] & 4 && ((g = !0), (Xh.checked = v[2]), K(() => (g = !1))), b.$set(Xh); + var Qh = {}; + !w && te[0] & 8 && ((w = !0), (Qh.checked = v[3]), K(() => (w = !1))), F.$set(Qh); + var Jh = {}; + !_ && te[0] & 16 && ((_ = !0), (Jh.checked = v[4]), K(() => (_ = !1))), E.$set(Jh); + var Zh = {}; + !z && te[0] & 32 && ((z = !0), (Zh.checked = v[5]), K(() => (z = !1))), J.$set(Zh); + var ec = {}; + !ne && te[0] & 64 && ((ne = !0), (ec.checked = v[6]), K(() => (ne = !1))), N.$set(ec); var tc = {}; - !n && re[0] & 1 && ((n = !0), (tc.checked = A[0]), X(() => (n = !1))), i.$set(tc); - var Vo = {}; - (re[0] & 4096) | (re[1] & 16384) && (Vo.$$scope = { dirty: re, ctx: A }), !l && re[0] & 2048 && ((l = !0), (Vo.checked = A[11]), X(() => (l = !1))), o.$set(Vo); - var Wo = {}; - (re[0] & 16384) | (re[1] & 16384) && (Wo.$$scope = { dirty: re, ctx: A }), !c && re[0] & 8192 && ((c = !0), (Wo.checked = A[13]), X(() => (c = !1))), a.$set(Wo); + !T && te[0] & 128 && ((T = !0), (tc.checked = v[7]), K(() => (T = !1))), H.$set(tc); var ic = {}; - !p && re[0] & 2 && ((p = !0), (ic.checked = A[1]), X(() => (p = !1))), d.$set(ic); - var rc = {}; - !g && re[0] & 4 && ((g = !0), (rc.checked = A[2]), X(() => (g = !1))), F.$set(rc); - var nc = {}; - !B && re[0] & 8 && ((B = !0), (nc.checked = A[3]), X(() => (B = !1))), b.$set(nc); - var sc = {}; - !L && re[0] & 16 && ((L = !0), (sc.checked = A[4]), X(() => (L = !1))), C.$set(sc); - var oc = {}; - !z && re[0] & 32 && ((z = !0), (oc.checked = A[5]), X(() => (z = !1))), V.$set(oc); - var lc = {}; - !j && re[0] & 64 && ((j = !0), (lc.checked = A[6]), X(() => (j = !1))), T.$set(lc); - var uc = {}; - !_ && re[0] & 128 && ((_ = !0), (uc.checked = A[7]), X(() => (_ = !1))), P.$set(uc); - var ac = {}; - !ve && re[0] & 256 && ((ve = !0), (ac.checked = A[8]), X(() => (ve = !1))), he.$set(ac); - var zo = {}; - (re[0] & 1024) | (re[1] & 16384) && (zo.$$scope = { dirty: re, ctx: A }), !be && re[0] & 512 && ((be = !0), (zo.checked = A[9]), X(() => (be = !1))), ae.$set(zo); + !De && te[0] & 256 && ((De = !0), (ic.checked = v[8]), K(() => (De = !1))), ge.$set(ic); + var qo = {}; + (te[0] & 1024) | (te[1] & 16384) && (qo.$$scope = { dirty: te, ctx: v }), !_e && te[0] & 512 && ((_e = !0), (qo.checked = v[9]), K(() => (_e = !1))), ae.$set(qo); }, - i(A) { - we || (S(i.$$.fragment, A), S(o.$$.fragment, A), S(a.$$.fragment, A), S(d.$$.fragment, A), S(F.$$.fragment, A), S(b.$$.fragment, A), S(C.$$.fragment, A), S(V.$$.fragment, A), S(T.$$.fragment, A), S(P.$$.fragment, A), S(he.$$.fragment, A), S(ae.$$.fragment, A), (we = !0)); + i(v) { + Me || (S(r.$$.fragment, v), S(o.$$.fragment, v), S(h.$$.fragment, v), S(d.$$.fragment, v), S(b.$$.fragment, v), S(F.$$.fragment, v), S(E.$$.fragment, v), S(J.$$.fragment, v), S(N.$$.fragment, v), S(H.$$.fragment, v), S(ge.$$.fragment, v), S(ae.$$.fragment, v), (Me = !0)); }, - o(A) { - w(i.$$.fragment, A), w(o.$$.fragment, A), w(a.$$.fragment, A), w(d.$$.fragment, A), w(F.$$.fragment, A), w(b.$$.fragment, A), w(C.$$.fragment, A), w(V.$$.fragment, A), w(T.$$.fragment, A), w(P.$$.fragment, A), w(he.$$.fragment, A), w(ae.$$.fragment, A), (we = !1); + o(v) { + B(r.$$.fragment, v), B(o.$$.fragment, v), B(h.$$.fragment, v), B(d.$$.fragment, v), B(b.$$.fragment, v), B(F.$$.fragment, v), B(E.$$.fragment, v), B(J.$$.fragment, v), B(N.$$.fragment, v), B(H.$$.fragment, v), B(ge.$$.fragment, v), B(ae.$$.fragment, v), (Me = !1); }, - d(A) { - A && y(e), A && y(t), R(i, A), A && y(s), R(o, A), A && y(u), R(a, A), A && y(f), R(d, A), A && y(m), R(F, A), A && y(D), R(b, A), A && y(k), R(C, A), A && y(Q), R(V, A), A && y(G), R(T, A), A && y(te), R(P, A), A && y(ee), R(he, A), A && y(xe), R(ae, A); + d(v) { + v && y(e), v && y(t), M(r, v), v && y(s), M(o, v), v && y(l), M(h, v), v && y(f), M(d, v), v && y(m), M(b, v), v && y(D), M(F, v), v && y(x), M(E, v), v && y(I), M(J, v), v && y(U), M(N, v), v && y(le), M(H, v), v && y(Z), M(ge, v), v && y(ce), M(ae, v); }, } ); } - h(GS, "create_default_slot"); - function XS(r) { + a(F3, "create_default_slot"); + function y3(i) { var e, t; return ( - (e = new Ke({ props: { open: !0, title: "Values", $$slots: { default: [GS] }, $$scope: { ctx: r } } })), + (e = new Ke({ props: { open: !0, title: "Values", $$slots: { default: [F3] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, n) { + p(r, n) { var s = {}; - (n[0] & 32767) | (n[1] & 16384) && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + (n[0] & 32767) | (n[1] & 16384) && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(XS, "create_fragment"); - function KS(r, e, t) { - var i, n, s, o, l, u, a, c, f, d, p, m, F, g; + a(y3, "create_fragment"); + function C3(i, e, t) { + var r, n, s, o, u, l, h, c, f, d, p, m, b, g; var D = e.options, - b = (i = D.curly) !== null && i !== void 0 ? i : !1, - B = (n = D.stripEnclosingBraces) !== null && n !== void 0 ? n : !1, - k = (s = D.numeric) !== null && s !== void 0 ? s : !1, - C = (o = D.months) !== null && o !== void 0 ? o : !1, - L = (l = D.dropAllCaps) !== null && l !== void 0 ? l : !1, - Q = (u = D.escape) !== null && u !== void 0 ? u : !1, - V = (a = D.encodeUrls) !== null && a !== void 0 ? a : !1, + F = (r = D.curly) !== null && r !== void 0 ? r : !1, + w = (n = D.stripEnclosingBraces) !== null && n !== void 0 ? n : !1, + x = (s = D.numeric) !== null && s !== void 0 ? s : !1, + E = (o = D.months) !== null && o !== void 0 ? o : !1, + _ = (u = D.dropAllCaps) !== null && u !== void 0 ? u : !1, + I = (l = D.escape) !== null && l !== void 0 ? l : !1, + J = (h = D.encodeUrls) !== null && h !== void 0 ? h : !1, z = (c = D.removeEmptyFields) !== null && c !== void 0 ? c : !1, - G = (f = D.removeDuplicateFields) !== null && f !== void 0 ? f : !1, - T = D.maxAuthors !== void 0, - j = (d = D.maxAuthors) !== null && d !== void 0 ? d : 3, - te = D.enclosingBraces !== void 0 && D.enclosingBraces.length > 0, - P = (m = (p = D.enclosingBraces) === null || p === void 0 ? void 0 : p.join(" ")) !== null && m !== void 0 ? m : "title", - _ = D.removeBraces !== void 0 && D.removeBraces.length > 0, - ee = (g = (F = D.enclosingBraces) === null || F === void 0 ? void 0 : F.join(" ")) !== null && g !== void 0 ? g : "title"; - function he(ce) { - (b = ce), t(0, b); - } - h(he, "option0_checked_binding"); - function ve() { - (P = this.value), t(12, P); - } - h(ve, "textarea_input_handler"); - function xe(ce) { - (te = ce), t(11, te); - } - h(xe, "option1_checked_binding"); + U = (f = D.removeDuplicateFields) !== null && f !== void 0 ? f : !1, + N = D.maxAuthors !== void 0, + ne = (d = D.maxAuthors) !== null && d !== void 0 ? d : 3, + le = D.enclosingBraces !== void 0 && D.enclosingBraces.length > 0, + H = (m = (p = D.enclosingBraces) === null || p === void 0 ? void 0 : p.join(" ")) !== null && m !== void 0 ? m : "title", + T = D.removeBraces !== void 0 && D.removeBraces.length > 0, + Z = (g = (b = D.enclosingBraces) === null || b === void 0 ? void 0 : b.join(" ")) !== null && g !== void 0 ? g : "title"; + function ge(fe) { + (F = fe), t(0, F); + } + a(ge, "option0_checked_binding"); + function De() { + (H = this.value), t(12, H); + } + a(De, "textarea_input_handler"); + function ce(fe) { + (le = fe), t(11, le); + } + a(ce, "option1_checked_binding"); function ae() { - (ee = this.value), t(14, ee); + (Z = this.value), t(14, Z); } - h(ae, "textarea_input_handler_1"); - function be(ce) { - (_ = ce), t(13, _); + a(ae, "textarea_input_handler_1"); + function _e(fe) { + (T = fe), t(13, T); } - h(be, "option2_checked_binding"); - function we(ce) { - (B = ce), t(1, B); + a(_e, "option2_checked_binding"); + function Me(fe) { + (w = fe), t(1, w); } - h(we, "option3_checked_binding"); - function Ye(ce) { - (k = ce), t(2, k); + a(Me, "option3_checked_binding"); + function pt(fe) { + (x = fe), t(2, x); } - h(Ye, "option4_checked_binding"); - function et(ce) { - (C = ce), t(3, C); + a(pt, "option4_checked_binding"); + function $t(fe) { + (E = fe), t(3, E); } - h(et, "option5_checked_binding"); - function Ft(ce) { - (L = ce), t(4, L); + a($t, "option5_checked_binding"); + function Ti(fe) { + (_ = fe), t(4, _); } - h(Ft, "option6_checked_binding"); - function qt(ce) { - (Q = ce), t(5, Q); + a(Ti, "option6_checked_binding"); + function Ri(fe) { + (I = fe), t(5, I); } - h(qt, "option7_checked_binding"); - function Ii(ce) { - (V = ce), t(6, V); + a(Ri, "option7_checked_binding"); + function Mi(fe) { + (J = fe), t(6, J); } - h(Ii, "option8_checked_binding"); - function ke(ce) { - (z = ce), t(7, z); + a(Mi, "option8_checked_binding"); + function ve(fe) { + (z = fe), t(7, z); } - h(ke, "option9_checked_binding"); - function ie(ce) { - (G = ce), t(8, G); + a(ve, "option9_checked_binding"); + function ee(fe) { + (U = fe), t(8, U); } - h(ie, "option10_checked_binding"); - function Oe() { - (j = Bt(this.value)), t(10, j); + a(ee, "option10_checked_binding"); + function Le() { + (ne = bt(this.value)), t(10, ne); } - h(Oe, "input_input_handler"); - function $i(ce) { - (T = ce), t(9, T); + a(Le, "input_input_handler"); + function $i(fe) { + (N = fe), t(9, N); } return ( - h($i, "option11_checked_binding"), - (r.$$set = (ce) => { - "options" in ce && t(15, (D = ce.options)); + a($i, "option11_checked_binding"), + (i.$$set = (fe) => { + "options" in fe && t(15, (D = fe.options)); }), - (r.$$.update = () => { - r.$$.dirty[0] & 32767 && - (t(15, (D.curly = b), D), - t(15, (D.stripEnclosingBraces = B), D), - t(15, (D.numeric = k), D), - t(15, (D.months = C), D), - t(15, (D.dropAllCaps = L), D), - t(15, (D.escape = Q), D), - t(15, (D.encodeUrls = V), D), - t(15, (D.removeEmptyFields = z), D), - t(15, (D.removeDuplicateFields = G), D), - t(15, (D.maxAuthors = T ? j : void 0), D), - t(15, (D.enclosingBraces = te && P.length > 0 ? P.split(/[\n\t ,]+/) : void 0), D), - t(15, (D.removeBraces = _ && ee.length > 0 ? ee.split(/[\n\t ,]+/) : void 0), D)); + (i.$$.update = () => { + if (i.$$.dirty[0] & 32767) + e: t(15, (D.curly = F), D), + t(15, (D.stripEnclosingBraces = w), D), + t(15, (D.numeric = x), D), + t(15, (D.months = E), D), + t(15, (D.dropAllCaps = _), D), + t(15, (D.escape = I), D), + t(15, (D.encodeUrls = J), D), + t(15, (D.removeEmptyFields = z), D), + t(15, (D.removeDuplicateFields = U), D), + t(15, (D.maxAuthors = N ? ne : void 0), D), + t(15, (D.enclosingBraces = le && H.length > 0 ? H.split(/[\n\t ,]+/) : void 0), D), + t(15, (D.removeBraces = T && Z.length > 0 ? Z.split(/[\n\t ,]+/) : void 0), D); }), - [b, B, k, C, L, Q, V, z, G, T, j, te, P, _, ee, D, he, ve, xe, ae, be, we, Ye, et, Ft, qt, Ii, ke, ie, Oe, $i] + [F, w, x, E, _, I, J, z, U, N, ne, le, H, T, Z, D, ge, De, ce, ae, _e, Me, pt, $t, Ti, Ri, Mi, ve, ee, Le, $i] ); } - h(KS, "instance"); - var Hh = - ((_class114 = class _class extends se { + a(C3, "instance"); + var Ih = + ((_class113 = class _class extends ie { constructor(e) { - super(), le(this, e, KS, XS, oe, { options: 15 }, null, [-1, -1]); + super(), oe(this, e, C3, y3, se, { options: 15 }, null, [-1, -1]); } }), - h(_class114, "ValueOptions"), - _class114), - D1 = Hh; - function ew(r) { - var e, t, i, n, s; + (() => { + a(_class113, "ValueOptions"); + })(), + _class113), + J1 = Ih; + function E3(i) { + var e, t, r, n, s; return { c() { - (e = O("label")), (t = Y("Column:\n ")), (i = O("input")), v(i, "name", "alignnum"), v(i, "type", "number"); + (e = R("label")), (t = j("Column:\n ")), (r = R("input")), A(r, "name", "alignnum"), A(r, "type", "number"); }, - m(o, l) { - E(o, e, l), q(e, t), q(e, i), Ee(i, r[2]), n || ((s = ye(i, "input", r[5])), (n = !0)); + m(o, u) { + C(o, e, u), V(e, t), V(e, r), Fe(r, i[2]), n || ((s = be(r, "input", i[5])), (n = !0)); }, - p(o, l) { - l & 4 && Bt(i.value) !== o[2] && Ee(i, o[2]); + p(o, u) { + u & 4 && bt(r.value) !== o[2] && Fe(r, o[2]); }, d(o) { o && y(e), (n = !1), s(); }, }; } - h(ew, "create_default_slot_2"); - function tw(r) { - var e, t, i, n, s; + a(E3, "create_default_slot_2"); + function v3(i) { + var e, t, r, n, s; return { c() { - (e = O("label")), (t = Y("Column:\n ")), (i = O("input")), v(i, "name", "wrapnum"), v(i, "type", "number"); + (e = R("label")), (t = j("Column:\n ")), (r = R("input")), A(r, "name", "wrapnum"), A(r, "type", "number"); }, - m(o, l) { - E(o, e, l), q(e, t), q(e, i), Ee(i, r[4]), n || ((s = ye(i, "input", r[7])), (n = !0)); + m(o, u) { + C(o, e, u), V(e, t), V(e, r), Fe(r, i[4]), n || ((s = be(r, "input", i[7])), (n = !0)); }, - p(o, l) { - l & 16 && Bt(i.value) !== o[4] && Ee(i, o[4]); + p(o, u) { + u & 16 && bt(r.value) !== o[4] && Fe(r, o[4]); }, d(o) { o && y(e), (n = !1), s(); }, }; } - h(tw, "create_default_slot_1"); - function iw(r) { - var e, t, i, n, s, o, l, u, a; + a(v3, "create_default_slot_1"); + function k3(i) { + var e, t, r, n, s, o, u, l, h; function c(g) { - r[6](g); + i[6](g); } - h(c, "option0_checked_binding"); - var f = { option: "align", $$slots: { default: [ew] }, $$scope: { ctx: r } }; - r[1] !== void 0 && (f.checked = r[1]), (e = new me({ props: f })), J.push(() => K(e, "checked", c)); + a(c, "option0_checked_binding"); + var f = { option: "align", $$slots: { default: [E3] }, $$scope: { ctx: i } }; + i[1] !== void 0 && (f.checked = i[1]), (e = new me({ props: f })), Y.push(() => X(e, "checked", c)); function d(g) { - r[8](g); + i[8](g); } - h(d, "option1_checked_binding"); - var p = { option: "wrap", $$slots: { default: [tw] }, $$scope: { ctx: r } }; - r[3] !== void 0 && (p.checked = r[3]), (n = new me({ props: p })), J.push(() => K(n, "checked", d)); + a(d, "option1_checked_binding"); + var p = { option: "wrap", $$slots: { default: [v3] }, $$scope: { ctx: i } }; + i[3] !== void 0 && (p.checked = i[3]), (n = new me({ props: p })), Y.push(() => X(n, "checked", d)); function m(g) { - r[9](g); + i[9](g); } - h(m, "option2_checked_binding"); - var F = { option: "blankLines" }; + a(m, "option2_checked_binding"); + var b = { option: "blankLines" }; return ( - r[0].blankLines !== void 0 && (F.checked = r[0].blankLines), - (l = new me({ props: F })), - J.push(() => K(l, "checked", m)), + i[0].blankLines !== void 0 && (b.checked = i[0].blankLines), + (u = new me({ props: b })), + Y.push(() => X(u, "checked", m)), { c() { - M(e.$$.fragment), (i = $()), M(n.$$.fragment), (o = $()), M(l.$$.fragment); + P(e.$$.fragment), (r = q()), P(n.$$.fragment), (o = q()), P(u.$$.fragment); }, m(g, D) { - N(e, g, D), E(g, i, D), N(n, g, D), E(g, o, D), N(l, g, D), (a = !0); + $(e, g, D), C(g, r, D), $(n, g, D), C(g, o, D), $(u, g, D), (h = !0); }, p(g, D) { - var b = {}; - D & 2052 && (b.$$scope = { dirty: D, ctx: g }), !t && D & 2 && ((t = !0), (b.checked = g[1]), X(() => (t = !1))), e.$set(b); - var B = {}; - D & 2064 && (B.$$scope = { dirty: D, ctx: g }), !s && D & 8 && ((s = !0), (B.checked = g[3]), X(() => (s = !1))), n.$set(B); - var k = {}; - !u && D & 1 && ((u = !0), (k.checked = g[0].blankLines), X(() => (u = !1))), l.$set(k); + var F = {}; + D & 2052 && (F.$$scope = { dirty: D, ctx: g }), !t && D & 2 && ((t = !0), (F.checked = g[1]), K(() => (t = !1))), e.$set(F); + var w = {}; + D & 2064 && (w.$$scope = { dirty: D, ctx: g }), !s && D & 8 && ((s = !0), (w.checked = g[3]), K(() => (s = !1))), n.$set(w); + var x = {}; + !l && D & 1 && ((l = !0), (x.checked = g[0].blankLines), K(() => (l = !1))), u.$set(x); }, i(g) { - a || (S(e.$$.fragment, g), S(n.$$.fragment, g), S(l.$$.fragment, g), (a = !0)); + h || (S(e.$$.fragment, g), S(n.$$.fragment, g), S(u.$$.fragment, g), (h = !0)); }, o(g) { - w(e.$$.fragment, g), w(n.$$.fragment, g), w(l.$$.fragment, g), (a = !1); + B(e.$$.fragment, g), B(n.$$.fragment, g), B(u.$$.fragment, g), (h = !1); }, d(g) { - R(e, g), g && y(i), R(n, g), g && y(o), R(l, g); + M(e, g), g && y(r), M(n, g), g && y(o), M(u, g); }, } ); } - h(iw, "create_default_slot"); - function rw(r) { + a(k3, "create_default_slot"); + function w3(i) { var e, t; return ( - (e = new Ke({ props: { title: "Whitespace", open: !0, $$slots: { default: [iw] }, $$scope: { ctx: r } } })), + (e = new Ke({ props: { title: "Whitespace", open: !0, $$slots: { default: [k3] }, $$scope: { ctx: i } } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, param) { + p(r, param) { var _param = _sliced_to_array(param, 1), n = _param[0]; var s = {}; - n & 2079 && (s.$$scope = { dirty: n, ctx: i }), e.$set(s); + n & 2079 && (s.$$scope = { dirty: n, ctx: r }), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(rw, "create_fragment"); - function nw(r, e, t) { - var i; + a(w3, "create_fragment"); + function x3(i, e, t) { + var r; var n = e.options, s = n.align > 1, o = s ? n.align : 13, - l = n.wrap !== void 0, - u = (i = n.wrap) !== null && i !== void 0 ? i : 80; - function a() { - (o = Bt(this.value)), t(2, o); + u = n.wrap !== void 0, + l = (r = n.wrap) !== null && r !== void 0 ? r : 80; + function h() { + (o = bt(this.value)), t(2, o); } - h(a, "input_input_handler"); + a(h, "input_input_handler"); function c(m) { (s = m), t(1, s); } - h(c, "option0_checked_binding"); + a(c, "option0_checked_binding"); function f() { - (u = Bt(this.value)), t(4, u); + (l = bt(this.value)), t(4, l); } - h(f, "input_input_handler_1"); + a(f, "input_input_handler_1"); function d(m) { - (l = m), t(3, l); + (u = m), t(3, u); } - h(d, "option1_checked_binding"); + a(d, "option1_checked_binding"); function p(m) { - r.$$.not_equal(n.blankLines, m) && ((n.blankLines = m), t(0, n), t(1, s), t(2, o), t(3, l), t(4, u)); + i.$$.not_equal(n.blankLines, m) && ((n.blankLines = m), t(0, n), t(1, s), t(2, o), t(3, u), t(4, l)); } return ( - h(p, "option2_checked_binding"), - (r.$$set = (m) => { + a(p, "option2_checked_binding"), + (i.$$set = (m) => { "options" in m && t(0, (n = m.options)); }), - (r.$$.update = () => { - r.$$.dirty & 30 && (t(0, (n.align = s ? o : 1), n), t(0, (n.wrap = l ? u : void 0), n)); + (i.$$.update = () => { + if (i.$$.dirty & 30) e: t(0, (n.align = s ? o : 1), n), t(0, (n.wrap = u ? l : void 0), n); }), - [n, s, o, l, u, a, c, f, d, p] + [n, s, o, u, l, h, c, f, d, p] ); } - h(nw, "instance"); - var jh = - ((_class115 = class _class extends se { + a(x3, "instance"); + var Nh = + ((_class114 = class _class extends ie { constructor(e) { - super(), le(this, e, nw, rw, oe, { options: 0 }); + super(), oe(this, e, x3, w3, se, { options: 0 }); } }), - h(_class115, "WhitespaceOptions"), - _class115), - F1 = jh; - function b1(r) { + (() => { + a(_class114, "WhitespaceOptions"); + })(), + _class114), + Z1 = Nh; + function eb(i) { var e, t; return ( - (e = new d1({ props: { options: r[0], status: r[1] } })), + (e = new Y1({ props: { options: i[0], status: i[1] } })), { c() { - M(e.$$.fragment); + P(e.$$.fragment); }, - m(i, n) { - N(e, i, n), (t = !0); + m(r, n) { + $(e, r, n), (t = !0); }, - p(i, n) { + p(r, n) { var s = {}; - n & 1 && (s.options = i[0]), n & 2 && (s.status = i[1]), e.$set(s); + n & 1 && (s.options = r[0]), n & 2 && (s.status = r[1]), e.$set(s); }, - i(i) { - t || (S(e.$$.fragment, i), (t = !0)); + i(r) { + t || (S(e.$$.fragment, r), (t = !0)); }, - o(i) { - w(e.$$.fragment, i), (t = !1); + o(r) { + B(e.$$.fragment, r), (t = !1); }, - d(i) { - R(e, i); + d(r) { + M(e, r); }, } ); } - h(b1, "create_if_block"); - function sw(r) { - var e, t, i, n, s, o, l, u, a, c, f, d, p, m, F, g, D, b, B, k, C, L, Q, V, z, G, T, j, te, P, _; - function ee(ie) { - r[4](ie); - } - h(ee, "indentoptions_options_binding"); - var he = {}; - r[0] !== void 0 && (he.options = r[0]), (s = new m1({ props: he })), J.push(() => K(s, "options", ee)); - function ve(ie) { - r[5](ie); - } - h(ve, "whitespaceoptions_options_binding"); - var xe = {}; - r[0] !== void 0 && (xe.options = r[0]), (u = new F1({ props: xe })), J.push(() => K(u, "options", ve)); - function ae(ie) { - r[6](ie); - } - h(ae, "valueoptions_options_binding"); - var be = {}; - r[0] !== void 0 && (be.options = r[0]), (f = new D1({ props: be })), J.push(() => K(f, "options", ae)); - function we(ie) { - r[7](ie); - } - h(we, "sortingoptions_options_binding"); - var Ye = {}; - r[0] !== void 0 && (Ye.options = r[0]), (m = new g1({ props: Ye })), J.push(() => K(m, "options", we)); - function et(ie) { - r[8](ie); - } - h(et, "duplicateoptions_options_binding"); - var Ft = {}; - r[0] !== void 0 && (Ft.options = r[0]), (D = new s1({ props: Ft })), J.push(() => K(D, "options", et)); - function qt(ie) { - r[9](ie); - } - h(qt, "cleanupoptions_options_binding"); - var Ii = {}; - r[0] !== void 0 && (Ii.options = r[0]), (k = new ZF({ props: Ii })), J.push(() => K(k, "options", qt)), (Q = new n1({ props: { options: r[0] } })); - var ke = r[1] && b1(r); + a(eb, "create_if_block"); + function S3(i) { + var e, t, r, n, s, o, u, l, h, c, f, d, p, m, b, g, D, F, w, x, E, _, I, J, z, U, N, ne, le, H, T; + function Z(ee) { + i[4](ee); + } + a(Z, "indentoptions_options_binding"); + var ge = {}; + i[0] !== void 0 && (ge.options = i[0]), (s = new X1({ props: ge })), Y.push(() => X(s, "options", Z)); + function De(ee) { + i[5](ee); + } + a(De, "whitespaceoptions_options_binding"); + var ce = {}; + i[0] !== void 0 && (ce.options = i[0]), (l = new Z1({ props: ce })), Y.push(() => X(l, "options", De)); + function ae(ee) { + i[6](ee); + } + a(ae, "valueoptions_options_binding"); + var _e = {}; + i[0] !== void 0 && (_e.options = i[0]), (f = new J1({ props: _e })), Y.push(() => X(f, "options", ae)); + function Me(ee) { + i[7](ee); + } + a(Me, "sortingoptions_options_binding"); + var pt = {}; + i[0] !== void 0 && (pt.options = i[0]), (m = new Q1({ props: pt })), Y.push(() => X(m, "options", Me)); + function $t(ee) { + i[8](ee); + } + a($t, "duplicateoptions_options_binding"); + var Ti = {}; + i[0] !== void 0 && (Ti.options = i[0]), (D = new N1({ props: Ti })), Y.push(() => X(D, "options", $t)); + function Ri(ee) { + i[9](ee); + } + a(Ri, "cleanupoptions_options_binding"); + var Mi = {}; + i[0] !== void 0 && (Mi.options = i[0]), (x = new M1({ props: Mi })), Y.push(() => X(x, "options", Ri)), (I = new I1({ props: { options: i[0] } })); + var ve = i[1] && eb(i); return { c() { - (e = O("aside")), - (t = O("form")), - (i = O("header")), - (i.innerHTML = '<h1 class="svelte-kvjsp8">BibTeX Tidy</h1> \n <p>This tool tidies bibtex files by fixing inconsistent whitespace,\n removing duplicates, removing unwanted fields, and sorting entries.</p> \n <p><a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy">Github</a> \n <a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy/issues">Report a bug</a></p>'), - (n = $()), - M(s.$$.fragment), - (l = $()), - M(u.$$.fragment), - (c = $()), - M(f.$$.fragment), - (p = $()), - M(m.$$.fragment), - (g = $()), - M(D.$$.fragment), - (B = $()), - M(k.$$.fragment), - (L = $()), - M(Q.$$.fragment), - (V = $()), - (z = O("div")), - ke && ke.c(), - (G = $()), - (T = O("button")), - (j = Y("Tidy")), - v(i, "class", "intro svelte-kvjsp8"), - v(t, "class", "svelte-kvjsp8"), - v(T, "id", "tidy"), - (T.disabled = r[2]), - v(T, "class", "svelte-kvjsp8"), - v(z, "class", "run svelte-kvjsp8"), - v(e, "id", "sidebar"), - v(e, "class", "svelte-kvjsp8"); + (e = R("aside")), + (t = R("form")), + (r = R("header")), + (r.innerHTML = '<h1 class="svelte-kvjsp8">BibTeX Tidy</h1> \n <p>This tool tidies bibtex files by fixing inconsistent whitespace,\n removing duplicates, removing unwanted fields, and sorting entries.</p> \n <p><a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy">Github</a> \n <a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy/issues">Report a bug</a></p>'), + (n = q()), + P(s.$$.fragment), + (u = q()), + P(l.$$.fragment), + (c = q()), + P(f.$$.fragment), + (p = q()), + P(m.$$.fragment), + (g = q()), + P(D.$$.fragment), + (w = q()), + P(x.$$.fragment), + (_ = q()), + P(I.$$.fragment), + (J = q()), + (z = R("div")), + ve && ve.c(), + (U = q()), + (N = R("button")), + (ne = j("Tidy")), + A(r, "class", "intro svelte-kvjsp8"), + A(t, "class", "svelte-kvjsp8"), + A(N, "id", "tidy"), + (N.disabled = i[2]), + A(N, "class", "svelte-kvjsp8"), + A(z, "class", "run svelte-kvjsp8"), + A(e, "id", "sidebar"), + A(e, "class", "svelte-kvjsp8"); }, - m(ie, Oe) { - E(ie, e, Oe), q(e, t), q(t, i), q(t, n), N(s, t, null), q(t, l), N(u, t, null), q(t, c), N(f, t, null), q(t, p), N(m, t, null), q(t, g), N(D, t, null), q(t, B), N(k, t, null), q(t, L), N(Q, t, null), q(e, V), q(e, z), ke && ke.m(z, null), q(z, G), q(z, T), q(T, j), (te = !0), P || ((_ = [ye(t, "submit", ow), ye(T, "click", r[10])]), (P = !0)); + m(ee, Le) { + C(ee, e, Le), V(e, t), V(t, r), V(t, n), $(s, t, null), V(t, u), $(l, t, null), V(t, c), $(f, t, null), V(t, p), $(m, t, null), V(t, g), $(D, t, null), V(t, w), $(x, t, null), V(t, _), $(I, t, null), V(e, J), V(e, z), ve && ve.m(z, null), V(z, U), V(z, N), V(N, ne), (le = !0), H || ((T = [be(t, "submit", B3), be(N, "click", i[10])]), (H = !0)); }, - p(ie, param) { + p(ee, param) { var _param = _sliced_to_array(param, 1), - Oe = _param[0]; + Le = _param[0]; var $i = {}; - !o && Oe & 1 && ((o = !0), ($i.options = ie[0]), X(() => (o = !1))), s.$set($i); - var ce = {}; - !a && Oe & 1 && ((a = !0), (ce.options = ie[0]), X(() => (a = !1))), u.$set(ce); - var On = {}; - !d && Oe & 1 && ((d = !0), (On.options = ie[0]), X(() => (d = !1))), f.$set(On); - var Sr = {}; - !F && Oe & 1 && ((F = !0), (Sr.options = ie[0]), X(() => (F = !1))), m.$set(Sr); - var Tn = {}; - !b && Oe & 1 && ((b = !0), (Tn.options = ie[0]), X(() => (b = !1))), D.$set(Tn); - var wr = {}; - !C && Oe & 1 && ((C = !0), (wr.options = ie[0]), X(() => (C = !1))), k.$set(wr); - var Rn = {}; - Oe & 1 && (Rn.options = ie[0]), - Q.$set(Rn), - ie[1] - ? ke - ? (ke.p(ie, Oe), Oe & 2 && S(ke, 1)) - : ((ke = b1(ie)), ke.c(), S(ke, 1), ke.m(z, G)) - : ke && - (jt(), - w(ke, 1, 1, () => { - ke = null; + !o && Le & 1 && ((o = !0), ($i.options = ee[0]), K(() => (o = !1))), s.$set($i); + var fe = {}; + !h && Le & 1 && ((h = !0), (fe.options = ee[0]), K(() => (h = !1))), l.$set(fe); + var Cn = {}; + !d && Le & 1 && ((d = !0), (Cn.options = ee[0]), K(() => (d = !1))), f.$set(Cn); + var vr = {}; + !b && Le & 1 && ((b = !0), (vr.options = ee[0]), K(() => (b = !1))), m.$set(vr); + var An = {}; + !F && Le & 1 && ((F = !0), (An.options = ee[0]), K(() => (F = !1))), D.$set(An); + var kr = {}; + !E && Le & 1 && ((E = !0), (kr.options = ee[0]), K(() => (E = !1))), x.$set(kr); + var En = {}; + Le & 1 && (En.options = ee[0]), + I.$set(En), + ee[1] + ? ve + ? (ve.p(ee, Le), Le & 2 && S(ve, 1)) + : ((ve = eb(ee)), ve.c(), S(ve, 1), ve.m(z, U)) + : ve && + (Nt(), + B(ve, 1, 1, () => { + ve = null; }), - Yt()), - (!te || Oe & 4) && (T.disabled = ie[2]); + Vt()), + (!le || Le & 4) && (N.disabled = ee[2]); }, - i(ie) { - te || (S(s.$$.fragment, ie), S(u.$$.fragment, ie), S(f.$$.fragment, ie), S(m.$$.fragment, ie), S(D.$$.fragment, ie), S(k.$$.fragment, ie), S(Q.$$.fragment, ie), S(ke), (te = !0)); + i(ee) { + le || (S(s.$$.fragment, ee), S(l.$$.fragment, ee), S(f.$$.fragment, ee), S(m.$$.fragment, ee), S(D.$$.fragment, ee), S(x.$$.fragment, ee), S(I.$$.fragment, ee), S(ve), (le = !0)); }, - o(ie) { - w(s.$$.fragment, ie), w(u.$$.fragment, ie), w(f.$$.fragment, ie), w(m.$$.fragment, ie), w(D.$$.fragment, ie), w(k.$$.fragment, ie), w(Q.$$.fragment, ie), w(ke), (te = !1); + o(ee) { + B(s.$$.fragment, ee), B(l.$$.fragment, ee), B(f.$$.fragment, ee), B(m.$$.fragment, ee), B(D.$$.fragment, ee), B(x.$$.fragment, ee), B(I.$$.fragment, ee), B(ve), (le = !1); }, - d(ie) { - ie && y(e), R(s), R(u), R(f), R(m), R(D), R(k), R(Q), ke && ke.d(), (P = !1), Qt(_); + d(ee) { + ee && y(e), M(s), M(l), M(f), M(m), M(D), M(x), M(I), ve && ve.d(), (H = !1), xt(T); }, }; } - h(sw, "create_fragment"); - var ow = h(() => !1, "submit_handler"); - function lw(r, e, t) { - var i = e.status, + a(S3, "create_fragment"); + var B3 = a(() => !1, "submit_handler"); + function _3(i, e, t) { + var r = e.status, n = e.running, s = e.options, - o = Ei(); - function l(m) { + o = pi(); + function u(m) { (s = m), t(0, s); } - h(l, "indentoptions_options_binding"); - function u(m) { + a(u, "indentoptions_options_binding"); + function l(m) { (s = m), t(0, s); } - h(u, "whitespaceoptions_options_binding"); - function a(m) { + a(l, "whitespaceoptions_options_binding"); + function h(m) { (s = m), t(0, s); } - h(a, "valueoptions_options_binding"); + a(h, "valueoptions_options_binding"); function c(m) { (s = m), t(0, s); } - h(c, "sortingoptions_options_binding"); + a(c, "sortingoptions_options_binding"); function f(m) { (s = m), t(0, s); } - h(f, "duplicateoptions_options_binding"); + a(f, "duplicateoptions_options_binding"); function d(m) { (s = m), t(0, s); } - h(d, "cleanupoptions_options_binding"); - var p = h(() => o("tidy"), "click_handler"); + a(d, "cleanupoptions_options_binding"); + var p = a(() => o("tidy"), "click_handler"); return ( - (r.$$set = (m) => { - "status" in m && t(1, (i = m.status)), "running" in m && t(2, (n = m.running)), "options" in m && t(0, (s = m.options)); + (i.$$set = (m) => { + "status" in m && t(1, (r = m.status)), "running" in m && t(2, (n = m.running)), "options" in m && t(0, (s = m.options)); }), - [s, i, n, o, l, u, a, c, f, d, p] + [s, r, n, o, u, l, h, c, f, d, p] ); } - h(lw, "instance"); - var Yh = - ((_class116 = class _class extends se { + a(_3, "instance"); + var Vh = + ((_class115 = class _class extends ie { constructor(e) { - super(), le(this, e, lw, sw, oe, { status: 1, running: 2, options: 0 }); + super(), oe(this, e, _3, S3, se, { status: 1, running: 2, options: 0 }); } }), - h(_class116, "Sidebar"), - _class116), - y1 = Yh; - var E1 = + (() => { + a(_class115, "Sidebar"); + })(), + _class115), + tb = Vh; + var ib = 'Click Tidy to clean up the entries below \n@Book{sweig42,\n Author = { Stefa{n} Sweig },\n title = { The impossible book },\n publisher = { Dead Poet Society},\n year = 1942,\n month = mar\n}\n@article{steward03,\n author = {Martha Steward},\n title = {Cooking behind bars}, publisher = "Culinary Expert Series",\n year = {2003}\n}\n@Book{impossible,\n Author = { Stefan Sweig },\n title = { The impossible book },\n publisher = { Dead Poet Society},\n year = 1942,\n month = mar\n}\n'; - function uw(r) { - var e, t, i, n, s, o; - function l(f) { - r[6](f); - } - h(l, "editor_bibtex_binding"); - var u = { error: r[4] }; - r[2] !== void 0 && (u.bibtex = r[2]), (e = new GF({ props: u })), J.push(() => K(e, "bibtex", l)); - function a(f) { - r[7](f); - } - h(a, "sidebar_options_binding"); - var c = { status: r[3], running: r[1] }; + function O3(i) { + var e, t, r, n, s, o; + function u(f) { + i[6](f); + } + a(u, "editor_bibtex_binding"); + var l = { error: i[4] }; + i[2] !== void 0 && (l.bibtex = i[2]), (e = new O1({ props: l })), Y.push(() => X(e, "bibtex", u)); + function h(f) { + i[7](f); + } + a(h, "sidebar_options_binding"); + var c = { status: i[3], running: i[1] }; return ( - r[0] !== void 0 && (c.options = r[0]), - (n = new y1({ props: c })), - J.push(() => K(n, "options", a)), - n.$on("tidy", r[5]), + i[0] !== void 0 && (c.options = i[0]), + (n = new tb({ props: c })), + Y.push(() => X(n, "options", h)), + n.$on("tidy", i[5]), { c() { - M(e.$$.fragment), (i = $()), M(n.$$.fragment); + P(e.$$.fragment), (r = q()), P(n.$$.fragment); }, m(f, d) { - N(e, f, d), E(f, i, d), N(n, f, d), (o = !0); + $(e, f, d), C(f, r, d), $(n, f, d), (o = !0); }, p(f, param) { var _param = _sliced_to_array(param, 1), d = _param[0]; var p = {}; - d & 16 && (p.error = f[4]), !t && d & 4 && ((t = !0), (p.bibtex = f[2]), X(() => (t = !1))), e.$set(p); + d & 16 && (p.error = f[4]), !t && d & 4 && ((t = !0), (p.bibtex = f[2]), K(() => (t = !1))), e.$set(p); var m = {}; - d & 8 && (m.status = f[3]), d & 2 && (m.running = f[1]), !s && d & 1 && ((s = !0), (m.options = f[0]), X(() => (s = !1))), n.$set(m); + d & 8 && (m.status = f[3]), d & 2 && (m.running = f[1]), !s && d & 1 && ((s = !0), (m.options = f[0]), K(() => (s = !1))), n.$set(m); }, i(f) { o || (S(e.$$.fragment, f), S(n.$$.fragment, f), (o = !0)); }, o(f) { - w(e.$$.fragment, f), w(n.$$.fragment, f), (o = !1); + B(e.$$.fragment, f), B(n.$$.fragment, f), (o = !1); }, d(f) { - R(e, f), f && y(i), R(n, f); + M(e, f), f && y(r), M(n, f); }, } ); } - h(uw, "create_fragment"); - function aw(r, e, t) { - var i; - var n = Gr({ tab: !0, align: 13, curly: !0, numeric: !0, escape: !1, duplicates: ["key"], sortFields: !0, removeDuplicateFields: !1 }), + a(O3, "create_fragment"); + function T3(i, e, t) { + var r; + var n = Wr({ tab: !0, align: 13, curly: !0, numeric: !0, escape: !1, duplicates: ["key"], sortFields: !0, removeDuplicateFields: !1 }), s = !1, - o = E1, - l = (i = f()) !== null && i !== void 0 ? i : n, - u, - a; + o = ib, + u = (r = f()) !== null && r !== void 0 ? r : n, + l, + h; function c() { t(1, (s = !0)), - t(3, (u = void 0)), - t(4, (a = void 0)), + t(3, (l = void 0)), + t(4, (h = void 0)), setTimeout(() => { try { - var _$m = P0(o, l); - t(2, (o = _$m.bibtex)), t(3, (u = { status: "success", result: _$m })); + var _$m = v0(o, u); + t(2, (o = _$m.bibtex)), t(3, (l = { status: "success", result: _$m })); } catch (m) { - console.error("bibtex parse problem:", m), t(3, (u = { status: "error", error: m })), m instanceof at && t(4, (a = m)); + console.error("bibtex parse problem:", m), t(3, (l = { status: "error", error: m })), m instanceof st && t(4, (h = m)); } finally { t(1, (s = !1)); } }, 100); } - h(c, "handleTidy"); + a(c, "handleTidy"); function f() { var m = window.location.search, g = new URLSearchParams(m).get("opt"); if (g) try { - return Gr(JSON.parse(g)); + return Wr(JSON.parse(g)); } catch (e) { console.error("Error parsing options in URL"); return; } } - h(f, "getOptionsFromURL"), + a(f, "getOptionsFromURL"), window.addEventListener("popstate", () => { var m; - t(0, (l = (m = f()) !== null && m !== void 0 ? m : n)); + t(0, (u = (m = f()) !== null && m !== void 0 ? m : n)); }); function d(m) { (o = m), t(2, o); } - h(d, "editor_bibtex_binding"); + a(d, "editor_bibtex_binding"); function p(m) { - (l = m), t(0, l); + (u = m), t(0, u); } return ( - h(p, "sidebar_options_binding"), - (r.$$.update = () => { - if (r.$$.dirty & 1) { - var m = JSON.stringify(l), - F = new URLSearchParams([["opt", m]]); - window.history.pushState(l, "", "index.html?".concat(F.toString())); - } + a(p, "sidebar_options_binding"), + (i.$$.update = () => { + if (i.$$.dirty & 1) + e: { + var m = JSON.stringify(u), + b = new URLSearchParams([["opt", m]]); + window.history.pushState(u, "", "index.html?".concat(b.toString())); + } }), - [l, s, o, u, a, c, d, p] + [u, s, o, l, h, c, d, p] ); } - h(aw, "instance"); - var Jh = - ((_class117 = class _class extends se { + a(T3, "instance"); + var zh = + ((_class116 = class _class extends ie { constructor(e) { - super(), le(this, e, aw, uw, oe, {}); + super(), oe(this, e, T3, O3, se, {}); } }), - h(_class117, "App"), - _class117), - C1 = Jh; - new C1({ target: document.body }); + (() => { + a(_class116, "App"); + })(), + _class116), + rb = zh; + new rb({ target: document.body }); })();