diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c8f93561..9b9898b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - Inspect View: display tool error messages in transcript when tool errors occur. - Inspect View: display any completed samples even if the task fails because of an error - Inspect View: don't display the 'input' column heading if there isn't an input +- Inspect View: allow filtering samples by compound expressions including multiple scorers. - Open AI: Handle additional bad request status codes (mapping them to appropriate `StopReason`) - Open AI: Use new `max_completion_tokens` option for o1 full. - Web Browser: raise error when both `error` and `web_at` fields are present in response. diff --git a/src/inspect_ai/_view/www/App.css b/src/inspect_ai/_view/www/App.css index a5e573537..3f9499f36 100644 --- a/src/inspect_ai/_view/www/App.css +++ b/src/inspect_ai/_view/www/App.css @@ -9,6 +9,12 @@ --inspect-input-border: var(--bs-light-border-subtle); --inspect-diff-add-color: #dafbe1; --inspect-diff-remove-color: #ffebe9; + --inspect-inactive-selection-background: var(--vscode-editor-inactiveSelectionBackground, #d9d9d9); + --inspect-active-selection-background: var(--vscode-editor-selectionBackground, #d7d4f0); + --inspect-focus-border-color: #86b7fe; + --inspect-focus-border-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25); + --inspect-focus-border-gray-color: #808080; + --inspect-focus-border-gray-shadow: 0 0 0 0.25rem rgba(48, 48, 48, 0.25); } body:not([class^="vscode-"]) button { @@ -650,6 +656,30 @@ table.table.table-sm td { height: auto !important; } +[data-tooltip] { + position: relative; +} +[data-tooltip]:hover::after { + content: attr(data-tooltip); + position: absolute; + line-height: 1.25; + background: var(--bs-light); + color: var(--bs-body-color); + opacity: 1; + padding: 4px 8px; + border-radius: 4px; + border: 1px solid var(--bs-border-color); + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.25); + white-space: pre-wrap; + width: max-content; + max-width: 400px; + z-index: 1000; +} +[data-tooltip][data-tooltip-position="bottom-left"]:hover::after { + right: 0%; + top: 100%; +} + /* ANSI Coloring */ .ansi-display { font-family: monospace; @@ -725,7 +755,7 @@ pre[class*="language-"].tool-output { background: none !important; border: none !important; box-shadow: none !important; - border-radius: var(--bs-border-radius) !important; + border-radius: var(--bs-border-radius) !important; } /* lightbox styles */ diff --git a/src/inspect_ai/_view/www/dist/assets/index.css b/src/inspect_ai/_view/www/dist/assets/index.css index d417527e4..cdb9d34fe 100644 --- a/src/inspect_ai/_view/www/dist/assets/index.css +++ b/src/inspect_ai/_view/www/dist/assets/index.css @@ -14282,6 +14282,12 @@ pre[class*="language-"] { --inspect-input-border: var(--bs-light-border-subtle); --inspect-diff-add-color: #dafbe1; --inspect-diff-remove-color: #ffebe9; + --inspect-inactive-selection-background: var(--vscode-editor-inactiveSelectionBackground, #d9d9d9); + --inspect-active-selection-background: var(--vscode-editor-selectionBackground, #d7d4f0); + --inspect-focus-border-color: #86b7fe; + --inspect-focus-border-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25); + --inspect-focus-border-gray-color: #808080; + --inspect-focus-border-gray-shadow: 0 0 0 0.25rem rgba(48, 48, 48, 0.25); } body:not([class^="vscode-"]) button { @@ -14923,6 +14929,30 @@ table.table.table-sm td { height: auto !important; } +[data-tooltip] { + position: relative; +} +[data-tooltip]:hover::after { + content: attr(data-tooltip); + position: absolute; + line-height: 1.25; + background: var(--bs-light); + color: var(--bs-body-color); + opacity: 1; + padding: 4px 8px; + border-radius: 4px; + border: 1px solid var(--bs-border-color); + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.25); + white-space: pre-wrap; + width: max-content; + max-width: 400px; + z-index: 1000; +} +[data-tooltip][data-tooltip-position="bottom-left"]:hover::after { + right: 0%; + top: 100%; +} + /* ANSI Coloring */ .ansi-display { font-family: monospace; @@ -14998,7 +15028,7 @@ pre[class*="language-"].tool-output { background: none !important; border: none !important; box-shadow: none !important; - border-radius: var(--bs-border-radius) !important; + border-radius: var(--bs-border-radius) !important; } /* lightbox styles */ diff --git a/src/inspect_ai/_view/www/dist/assets/index.js b/src/inspect_ai/_view/www/dist/assets/index.js index d9c622d83..3ab67d79b 100644 --- a/src/inspect_ai/_view/www/dist/assets/index.js +++ b/src/inspect_ai/_view/www/dist/assets/index.js @@ -44,7 +44,7 @@ var require_assets = __commonJS({ fetch(link2.href, fetchOpts); } })(); - var n$2, l$1, u$1, i$2, r$2, o$1, e$3, f$1, c$2, s$1, a$1, p$1 = {}, v$1 = [], y$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, d$1 = Array.isArray; + var n$2, l$1, u$1, i$3, r$2, o$1, e$3, f$1, c$2, s$1, a$1, p$1 = {}, v$1 = [], y$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, d$1 = Array.isArray; function w$1(n2, l2) { for (var u2 in l2) n2[u2] = l2[u2]; return n2; @@ -71,10 +71,10 @@ var require_assets = __commonJS({ function x$1(n2, l2) { this.props = n2, this.context = l2; } - function C$1(n2, l2) { - if (null == l2) return n2.__ ? C$1(n2.__, n2.__i + 1) : null; + function C$2(n2, l2) { + if (null == l2) return n2.__ ? C$2(n2.__, n2.__i + 1) : null; for (var u2; l2 < n2.__k.length; l2++) if (null != (u2 = n2.__k[l2]) && null != u2.__e) return u2.__e; - return "function" == typeof n2.type ? C$1(n2) : null; + return "function" == typeof n2.type ? C$2(n2) : null; } function S(n2) { var l2, u2; @@ -87,11 +87,11 @@ var require_assets = __commonJS({ } } function M(n2) { - (!n2.__d && (n2.__d = true) && i$2.push(n2) && !P$1.__r++ || r$2 !== l$1.debounceRendering) && ((r$2 = l$1.debounceRendering) || o$1)(P$1); + (!n2.__d && (n2.__d = true) && i$3.push(n2) && !P$1.__r++ || r$2 !== l$1.debounceRendering) && ((r$2 = l$1.debounceRendering) || o$1)(P$1); } function P$1() { var n2, u2, t2, r2, o2, f2, c2, s2; - for (i$2.sort(e$3); n2 = i$2.shift(); ) n2.__d && (u2 = i$2.length, r2 = void 0, f2 = (o2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((r2 = w$1({}, o2)).__v = o2.__v + 1, l$1.vnode && l$1.vnode(r2), j$1(t2.__P, r2, o2, t2.__n, t2.__P.namespaceURI, 32 & o2.__u ? [f2] : null, c2, null == f2 ? C$1(o2) : f2, !!(32 & o2.__u), s2), r2.__v = o2.__v, r2.__.__k[r2.__i] = r2, z$1(c2, r2, s2), r2.__e != f2 && S(r2)), i$2.length > u2 && i$2.sort(e$3)); + for (i$3.sort(e$3); n2 = i$3.shift(); ) n2.__d && (u2 = i$3.length, r2 = void 0, f2 = (o2 = (t2 = n2).__v).__e, c2 = [], s2 = [], t2.__P && ((r2 = w$1({}, o2)).__v = o2.__v + 1, l$1.vnode && l$1.vnode(r2), j$1(t2.__P, r2, o2, t2.__n, t2.__P.namespaceURI, 32 & o2.__u ? [f2] : null, c2, null == f2 ? C$2(o2) : f2, !!(32 & o2.__u), s2), r2.__v = o2.__v, r2.__.__k[r2.__i] = r2, z$1(c2, r2, s2), r2.__e != f2 && S(r2)), i$3.length > u2 && i$3.sort(e$3)); P$1.__r = 0; } function $(n2, l2, u2, t2, i2, r2, o2, e2, f2, c2, s2) { @@ -102,7 +102,7 @@ var require_assets = __commonJS({ function I(n2, l2, u2, t2) { var i2, r2, o2, e2, f2, c2 = l2.length, s2 = u2.length, a2 = s2, h2 = 0; for (n2.__k = [], i2 = 0; i2 < c2; i2++) null != (r2 = l2[i2]) && "boolean" != typeof r2 && "function" != typeof r2 ? (e2 = i2 + h2, (r2 = n2.__k[i2] = "string" == typeof r2 || "number" == typeof r2 || "bigint" == typeof r2 || r2.constructor == String ? m$2(null, r2, null, null, null) : d$1(r2) ? m$2(k$1, { children: r2 }, null, null, null) : void 0 === r2.constructor && r2.__b > 0 ? m$2(r2.type, r2.props, r2.key, r2.ref ? r2.ref : null, r2.__v) : r2).__ = n2, r2.__b = n2.__b + 1, o2 = null, -1 !== (f2 = r2.__i = T$1(r2, u2, e2, a2)) && (a2--, (o2 = u2[f2]) && (o2.__u |= 2)), null == o2 || null === o2.__v ? (-1 == f2 && h2--, "function" != typeof r2.type && (r2.__u |= 4)) : f2 !== e2 && (f2 == e2 - 1 ? h2-- : f2 == e2 + 1 ? h2++ : (f2 > e2 ? h2-- : h2++, r2.__u |= 4))) : r2 = n2.__k[i2] = null; - if (a2) for (i2 = 0; i2 < s2; i2++) null != (o2 = u2[i2]) && 0 == (2 & o2.__u) && (o2.__e == t2 && (t2 = C$1(o2)), q$1(o2, o2)); + if (a2) for (i2 = 0; i2 < s2; i2++) null != (o2 = u2[i2]) && 0 == (2 & o2.__u) && (o2.__e == t2 && (t2 = C$2(o2)), q$1(o2, o2)); return t2; } function H(n2, l2, u2) { @@ -111,7 +111,7 @@ var require_assets = __commonJS({ for (t2 = n2.__k, i2 = 0; t2 && i2 < t2.length; i2++) t2[i2] && (t2[i2].__ = n2, l2 = H(t2[i2], l2, u2)); return l2; } - n2.__e != l2 && (l2 && n2.type && !u2.contains(l2) && (l2 = C$1(n2)), u2.insertBefore(n2.__e, l2 || null), l2 = n2.__e); + n2.__e != l2 && (l2 && n2.type && !u2.contains(l2) && (l2 = C$2(n2)), u2.insertBefore(n2.__e, l2 || null), l2 = n2.__e); do { l2 = l2 && l2.nextSibling; } while (null != l2 && 8 === l2.nodeType); @@ -234,7 +234,7 @@ var require_assets = __commonJS({ } for (a2 in k2) w2 = k2[a2], "children" == a2 ? y2 = w2 : "dangerouslySetInnerHTML" == a2 ? h2 = w2 : "value" == a2 ? g2 = w2 : "checked" == a2 ? m2 = w2 : c2 && "function" != typeof w2 || b2[a2] === w2 || F(u2, a2, w2, b2[a2], o2); if (h2) c2 || v2 && (h2.__html === v2.__html || h2.__html === u2.innerHTML) || (u2.innerHTML = h2.__html), t2.__k = []; - else if (v2 && (u2.innerHTML = ""), $(u2, d$1(y2) ? y2 : [y2], t2, i2, r2, "foreignObject" === x2 ? "http://www.w3.org/1999/xhtml" : o2, e2, f2, e2 ? e2[0] : i2.__k && C$1(i2, 0), c2, s2), null != e2) for (a2 = e2.length; a2--; ) _(e2[a2]); + else if (v2 && (u2.innerHTML = ""), $(u2, d$1(y2) ? y2 : [y2], t2, i2, r2, "foreignObject" === x2 ? "http://www.w3.org/1999/xhtml" : o2, e2, f2, e2 ? e2[0] : i2.__k && C$2(i2, 0), c2, s2), null != e2) for (a2 = e2.length; a2--; ) _(e2[a2]); c2 || (a2 = "value", "progress" === x2 && null == g2 ? u2.removeAttribute("value") : void 0 !== g2 && (g2 !== u2[a2] || "progress" === x2 && !g2 || "option" === x2 && g2 !== b2[a2]) && F(u2, a2, g2, b2[a2], o2), a2 = "checked", void 0 !== m2 && m2 !== u2[a2] && F(u2, a2, m2, b2[a2], o2)); } return u2; @@ -281,7 +281,7 @@ var require_assets = __commonJS({ u2 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = w$1({}, this.state), "function" == typeof n2 && (n2 = n2(w$1({}, u2), this.props)), n2 && w$1(u2, n2), null != n2 && this.__v && (l2 && this._sb.push(l2), M(this)); }, x$1.prototype.forceUpdate = function(n2) { this.__v && (this.__e = true, n2 && this.__h.push(n2), M(this)); - }, x$1.prototype.render = k$1, i$2 = [], o$1 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e$3 = function(n2, l2) { + }, x$1.prototype.render = k$1, i$3 = [], o$1 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e$3 = function(n2, l2) { return n2.__v.__b - l2.__v.__b; }, P$1.__r = 0, f$1 = /(PointerCapture)$|Capture$/i, c$2 = 0, s$1 = O(false), a$1 = O(true); var n$1 = function(t2, s2, r2, e2) { @@ -292,10 +292,10 @@ var require_assets = __commonJS({ 3 === p2 ? e2[0] = a2 : 4 === p2 ? e2[1] = Object.assign(e2[1] || {}, a2) : 5 === p2 ? (e2[1] = e2[1] || {})[s2[++h2]] = a2 : 6 === p2 ? e2[1][s2[++h2]] += a2 + "" : p2 ? (u2 = t2.apply(a2, n$1(t2, a2, r2, ["", null])), e2.push(u2), a2[0] ? s2[0] |= 2 : (s2[h2 - 2] = 0, s2[h2] = u2)) : e2.push(a2); } return e2; - }, t$2 = /* @__PURE__ */ new Map(); + }, t$3 = /* @__PURE__ */ new Map(); function e$2(s2) { - var r2 = t$2.get(this); - return r2 || (r2 = /* @__PURE__ */ new Map(), t$2.set(this, r2)), (r2 = n$1(this, r2.get(s2) || (r2.set(s2, r2 = function(n2) { + var r2 = t$3.get(this); + return r2 || (r2 = /* @__PURE__ */ new Map(), t$3.set(this, r2)), (r2 = n$1(this, r2.get(s2) || (r2.set(s2, r2 = function(n2) { for (var t2, s3, r3 = 1, e2 = "", u2 = "", h2 = [0], p2 = function(n3) { 1 === r3 && (n3 || (e2 = e2.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? h2.push(0, n3, e2) : 3 === r3 && (n3 || e2) ? (h2.push(3, n3, e2), r3 = 2) : 2 === r3 && "..." === e2 && n3 ? h2.push(4, n3, 0) : 2 === r3 && e2 && !n3 ? h2.push(5, 0, true, e2) : r3 >= 5 && ((e2 || !n3 && 5 === r3) && (h2.push(r3, 0, e2, s3), r3 = 6), n3 && (h2.push(r3, n3, 0, s3), r3 = 6)), e2 = ""; }, a2 = 0; a2 < n2.length; a2++) { @@ -497,9 +497,9 @@ var require_assets = __commonJS({ * @param {string} language * @returns {void} */ - setLanguage: function(element, language) { + setLanguage: function(element, language2) { element.className = element.className.replace(RegExp(lang, "gi"), ""); - element.classList.add("language-" + language); + element.classList.add("language-" + language2); }, /** * Returns the script element that is currently executing. @@ -692,10 +692,10 @@ var require_assets = __commonJS({ * @returns {Grammar} The new grammar object. * @public */ - insertBefore: function(inside, before, insert2, root2) { + insertBefore: function(inside2, before, insert2, root2) { root2 = root2 || /** @type {any} */ _2.languages; - var grammar = root2[inside]; + var grammar = root2[inside2]; var ret = {}; for (var token2 in grammar) { if (grammar.hasOwnProperty(token2)) { @@ -711,10 +711,10 @@ var require_assets = __commonJS({ } } } - var old = root2[inside]; - root2[inside] = ret; + var old = root2[inside2]; + root2[inside2] = ret; _2.languages.DFS(_2.languages, function(key2, value) { - if (value === old && key2 != inside) { + if (value === old && key2 != inside2) { this[key2] = ret; } }); @@ -813,17 +813,17 @@ var require_assets = __commonJS({ * @public */ highlightElement: function(element, async, callback) { - var language = _2.util.getLanguage(element); - var grammar = _2.languages[language]; - _2.util.setLanguage(element, language); + var language2 = _2.util.getLanguage(element); + var grammar = _2.languages[language2]; + _2.util.setLanguage(element, language2); var parent = element.parentElement; if (parent && parent.nodeName.toLowerCase() === "pre") { - _2.util.setLanguage(parent, language); + _2.util.setLanguage(parent, language2); } var code2 = element.textContent; var env = { element, - language, + language: language2, grammar, code: code2 }; @@ -884,11 +884,11 @@ var require_assets = __commonJS({ * @example * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript'); */ - highlight: function(text2, grammar, language) { + highlight: function(text2, grammar, language2) { var env = { code: text2, grammar, - language + language: language2 }; _2.hooks.run("before-tokenize", env); if (!env.grammar) { @@ -954,10 +954,10 @@ var require_assets = __commonJS({ * @param {HookCallback} callback The callback function which is given environment variables. * @public */ - add: function(name, callback) { + add: function(name2, callback) { var hooks = _2.hooks.all; - hooks[name] = hooks[name] || []; - hooks[name].push(callback); + hooks[name2] = hooks[name2] || []; + hooks[name2].push(callback); }, /** * Runs a hook invoking all registered callbacks with the given environment variables. @@ -968,8 +968,8 @@ var require_assets = __commonJS({ * @param {Object} env The environment variables of the hook passed to all callbacks registered. * @public */ - run: function(name, env) { - var callbacks = _2.hooks.all[name]; + run: function(name2, env) { + var callbacks = _2.hooks.all[name2]; if (!callbacks || !callbacks.length) { return; } @@ -981,30 +981,30 @@ var require_assets = __commonJS({ Token: Token2 }; _self2.Prism = _2; - function Token2(type, content, alias, matchedStr) { + function Token2(type, content2, alias, matchedStr) { this.type = type; - this.content = content; + this.content = content2; this.alias = alias; this.length = (matchedStr || "").length | 0; } - Token2.stringify = function stringify2(o2, language) { + Token2.stringify = function stringify2(o2, language2) { if (typeof o2 == "string") { return o2; } if (Array.isArray(o2)) { var s2 = ""; o2.forEach(function(e2) { - s2 += stringify2(e2, language); + s2 += stringify2(e2, language2); }); return s2; } var env = { type: o2.type, - content: stringify2(o2.content, language), + content: stringify2(o2.content, language2), tag: "span", classes: ["token", o2.type], attributes: {}, - language + language: language2 }; var aliases = o2.alias; if (aliases) { @@ -1016,8 +1016,8 @@ var require_assets = __commonJS({ } _2.hooks.run("wrap", env); var attributes = ""; - for (var name in env.attributes) { - attributes += " " + name + '="' + (env.attributes[name] || "").replace(/"/g, """) + '"'; + for (var name2 in env.attributes) { + attributes += " " + name2 + '="' + (env.attributes[name2] || "").replace(/"/g, """) + '"'; } return "<" + env.tag + ' class="' + env.classes.join(" ") + '"' + attributes + ">" + env.content + ""; }; @@ -1043,7 +1043,7 @@ var require_assets = __commonJS({ return; } var patternObj = patterns[j2]; - var inside = patternObj.inside; + var inside2 = patternObj.inside; var lookbehind = !!patternObj.lookbehind; var greedy = !!patternObj.greedy; var alias = patternObj.alias; @@ -1056,11 +1056,11 @@ var require_assets = __commonJS({ if (rematch && pos2 >= rematch.reach) { break; } - var str = currentNode.value; + var str2 = currentNode.value; if (tokenList.length > text2.length) { return; } - if (str instanceof Token2) { + if (str2 instanceof Token2) { continue; } var removeCount = 1; @@ -1088,19 +1088,19 @@ var require_assets = __commonJS({ p2 += k2.value.length; } removeCount--; - str = text2.slice(pos2, p2); + str2 = text2.slice(pos2, p2); match.index -= pos2; } else { - match = matchPattern(pattern, 0, str, lookbehind); + match = matchPattern(pattern, 0, str2, lookbehind); if (!match) { continue; } } var from = match.index; var matchStr = match[0]; - var before = str.slice(0, from); - var after = str.slice(from + matchStr.length); - var reach = pos2 + str.length; + var before = str2.slice(0, from); + var after = str2.slice(from + matchStr.length); + var reach = pos2 + str2.length; if (rematch && reach > rematch.reach) { rematch.reach = reach; } @@ -1110,7 +1110,7 @@ var require_assets = __commonJS({ pos2 += before.length; } removeRange(tokenList, removeFrom, removeCount); - var wrapped = new Token2(token2, inside ? _2.tokenize(matchStr, inside) : matchStr, alias, matchStr); + var wrapped = new Token2(token2, inside2 ? _2.tokenize(matchStr, inside2) : matchStr, alias, matchStr); currentNode = addAfter(tokenList, removeFrom, wrapped); if (after) { addAfter(tokenList, currentNode, after); @@ -1318,13 +1318,13 @@ var require_assets = __commonJS({ inside: Prism2.languages[lang] }; includedCdataInside["cdata"] = /^$/i; - var inside = { + var inside2 = { "included-cdata": { pattern: //i, inside: includedCdataInside } }; - inside["language-" + lang] = { + inside2["language-" + lang] = { pattern: /[\s\S]+/, inside: Prism2.languages[lang] }; @@ -1335,7 +1335,7 @@ var require_assets = __commonJS({ }), "i"), lookbehind: true, greedy: true, - inside + inside: inside2 }; Prism2.languages.insertBefore("markup", "cdata", def); } @@ -1391,11 +1391,11 @@ var require_assets = __commonJS({ Prism2.languages.atom = Prism2.languages.xml; Prism2.languages.rss = Prism2.languages.xml; (function(Prism3) { - var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; + var string2 = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; Prism3.languages.css = { "comment": /\/\*[\s\S]*?\*\//, "atrule": { - pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + string.source + ")*?" + /(?:;|(?=\s*\{))/.source), + pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + string2.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { "rule": /^@[\w-]+/, "selector-function-argument": { @@ -1412,23 +1412,23 @@ var require_assets = __commonJS({ }, "url": { // https://drafts.csswg.org/css-values-3/#urls - pattern: RegExp("\\burl\\((?:" + string.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), + pattern: RegExp("\\burl\\((?:" + string2.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: true, inside: { "function": /^url/i, "punctuation": /^\(|\)$/, "string": { - pattern: RegExp("^" + string.source + "$"), + pattern: RegExp("^" + string2.source + "$"), alias: "url" } } }, "selector": { - pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + string.source + ")*(?=\\s*\\{)"), + pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + string2.source + ")*(?=\\s*\\{)"), lookbehind: true }, "string": { - pattern: string, + pattern: string2, greedy: true }, "property": { @@ -1696,16 +1696,16 @@ var require_assets = __commonJS({ var code2 = pre.appendChild(document.createElement("CODE")); code2.textContent = LOADING_MESSAGE; var src = pre.getAttribute("data-src"); - var language = env.language; - if (language === "none") { + var language2 = env.language; + if (language2 === "none") { var extension = (/\.(\w+)$/.exec(src) || [, "none"])[1]; - language = EXTENSIONS[extension] || extension; + language2 = EXTENSIONS[extension] || extension; } - Prism2.util.setLanguage(code2, language); - Prism2.util.setLanguage(pre, language); + Prism2.util.setLanguage(code2, language2); + Prism2.util.setLanguage(pre, language2); var autoloader = Prism2.plugins.autoloader; if (autoloader) { - autoloader.loadLanguages(language); + autoloader.loadLanguages(language2); } loadFile( src, @@ -1799,7 +1799,7 @@ var require_assets = __commonJS({ var listen_default = /* @__PURE__ */ __webpack_require__2.n(listen); var src_select = __webpack_require__2(817); var select_default = /* @__PURE__ */ __webpack_require__2.n(src_select); - function command(type) { + function command2(type) { try { return document.execCommand(type); } catch (err2) { @@ -1808,7 +1808,7 @@ var require_assets = __commonJS({ } var ClipboardActionCut = function ClipboardActionCut2(target) { var selectedText = select_default()(target); - command("cut"); + command2("cut"); return selectedText; }; var actions_cut = ClipboardActionCut; @@ -1831,7 +1831,7 @@ var require_assets = __commonJS({ var fakeElement = createFakeElement(value); options.container.appendChild(fakeElement); var selectedText = select_default()(fakeElement); - command("copy"); + command2("copy"); fakeElement.remove(); return selectedText; }; @@ -1846,7 +1846,7 @@ var require_assets = __commonJS({ selectedText = fakeCopyAction(target.value, options); } else { selectedText = select_default()(target); - command("copy"); + command2("copy"); } return selectedText; }; @@ -2307,26 +2307,26 @@ var require_assets = __commonJS({ function E() { } E.prototype = { - on: function(name, callback, ctx) { + on: function(name2, callback, ctx) { var e2 = this.e || (this.e = {}); - (e2[name] || (e2[name] = [])).push({ + (e2[name2] || (e2[name2] = [])).push({ fn: callback, ctx }); return this; }, - once: function(name, callback, ctx) { + once: function(name2, callback, ctx) { var self2 = this; function listener() { - self2.off(name, listener); + self2.off(name2, listener); callback.apply(ctx, arguments); } listener._ = callback; - return this.on(name, listener, ctx); + return this.on(name2, listener, ctx); }, - emit: function(name) { + emit: function(name2) { var data = [].slice.call(arguments, 1); - var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); + var evtArr = ((this.e || (this.e = {}))[name2] || []).slice(); var i2 = 0; var len = evtArr.length; for (i2; i2 < len; i2++) { @@ -2334,9 +2334,9 @@ var require_assets = __commonJS({ } return this; }, - off: function(name, callback) { + off: function(name2, callback) { var e2 = this.e || (this.e = {}); - var evts = e2[name]; + var evts = e2[name2]; var liveEvents = []; if (evts && callback) { for (var i2 = 0, len = evts.length; i2 < len; i2++) { @@ -2344,7 +2344,7 @@ var require_assets = __commonJS({ liveEvents.push(evts[i2]); } } - liveEvents.length ? e2[name] = liveEvents : delete e2[name]; + liveEvents.length ? e2[name2] = liveEvents : delete e2[name2]; return this; } }; @@ -2409,12 +2409,12 @@ var require_assets = __commonJS({ })(clipboard); var clipboardExports = clipboard.exports; const ClipboardJS = /* @__PURE__ */ getDefaultExportFromCjs(clipboardExports); - var top = "top"; + var top$1 = "top"; var bottom = "bottom"; var right = "right"; var left = "left"; var auto = "auto"; - var basePlacements = [top, bottom, right, left]; + var basePlacements = [top$1, bottom, right, left]; var start = "start"; var end = "end"; var clippingParents = "clippingParents"; @@ -2467,20 +2467,20 @@ var require_assets = __commonJS({ } function applyStyles(_ref) { var state = _ref.state; - Object.keys(state.elements).forEach(function(name) { - var style2 = state.styles[name] || {}; - var attributes = state.attributes[name] || {}; - var element = state.elements[name]; + Object.keys(state.elements).forEach(function(name2) { + var style2 = state.styles[name2] || {}; + var attributes = state.attributes[name2] || {}; + var element = state.elements[name2]; if (!isHTMLElement(element) || !getNodeName(element)) { return; } Object.assign(element.style, style2); - Object.keys(attributes).forEach(function(name2) { - var value = attributes[name2]; + Object.keys(attributes).forEach(function(name3) { + var value = attributes[name3]; if (value === false) { - element.removeAttribute(name2); + element.removeAttribute(name3); } else { - element.setAttribute(name2, value === true ? "" : value); + element.setAttribute(name3, value === true ? "" : value); } }); }); @@ -2505,10 +2505,10 @@ var require_assets = __commonJS({ Object.assign(state.elements.arrow.style, initialStyles.arrow); } return function() { - Object.keys(state.elements).forEach(function(name) { - var element = state.elements[name]; - var attributes = state.attributes[name] || {}; - var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + Object.keys(state.elements).forEach(function(name2) { + var element = state.elements[name2]; + var attributes = state.attributes[name2] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name2) ? state.styles[name2] : initialStyles[name2]); var style2 = styleProperties.reduce(function(style3, property) { style3[property] = ""; return style3; @@ -2597,7 +2597,7 @@ var require_assets = __commonJS({ height }; } - function contains(parent, child) { + function contains$1(parent, child) { var rootNode = child.getRootNode && child.getRootNode(); if (parent.contains(child)) { return true; @@ -2715,7 +2715,7 @@ var require_assets = __commonJS({ }; function arrow(_ref) { var _state$modifiersData$; - var state = _ref.state, name = _ref.name, options = _ref.options; + var state = _ref.state, name2 = _ref.name, options = _ref.options; var arrowElement = state.elements.arrow; var popperOffsets2 = state.modifiersData.popperOffsets; var basePlacement = getBasePlacement(state.placement); @@ -2727,7 +2727,7 @@ var require_assets = __commonJS({ } var paddingObject = toPaddingObject(options.padding, state); var arrowRect = getLayoutRect(arrowElement); - var minProp = axis === "y" ? top : left; + var minProp = axis === "y" ? top$1 : left; var maxProp = axis === "y" ? bottom : right; var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; @@ -2739,7 +2739,7 @@ var require_assets = __commonJS({ var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; var offset2 = within(min2, center, max2); var axisProp = axis; - state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + state.modifiersData[name2] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); } function effect$1(_ref2) { var state = _ref2.state, options = _ref2.options; @@ -2753,7 +2753,7 @@ var require_assets = __commonJS({ return; } } - if (!contains(state.elements.popper, arrowElement)) { + if (!contains$1(state.elements.popper, arrowElement)) { return; } state.elements.arrow = arrowElement; @@ -2800,7 +2800,7 @@ var require_assets = __commonJS({ var hasX = offsets.hasOwnProperty("x"); var hasY = offsets.hasOwnProperty("y"); var sideX = left; - var sideY = top; + var sideY = top$1; var win = window; if (adaptive) { var offsetParent = getOffsetParent(popper2); @@ -2814,7 +2814,7 @@ var require_assets = __commonJS({ } } offsetParent = offsetParent; - if (placement === top || (placement === left || placement === right) && variation === end) { + if (placement === top$1 || (placement === left || placement === right) && variation === end) { sideY = bottom; var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : ( // $FlowFixMe[prop-missing] @@ -2823,7 +2823,7 @@ var require_assets = __commonJS({ y2 -= offsetY - popperRect.height; y2 *= gpuAcceleration ? 1 : -1; } - if (placement === left || (placement === top || placement === bottom) && variation === end) { + if (placement === left || (placement === top$1 || placement === bottom) && variation === end) { sideX = right; var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : ( // $FlowFixMe[prop-missing] @@ -3059,7 +3059,7 @@ var require_assets = __commonJS({ return []; } return clippingParents2.filter(function(clippingParent) { - return isElement$1(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body"; + return isElement$1(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body"; }); } function getClippingRect(element, boundary, rootBoundary, strategy) { @@ -3088,7 +3088,7 @@ var require_assets = __commonJS({ var commonY = reference2.y + reference2.height / 2 - element.height / 2; var offsets; switch (basePlacement) { - case top: + case top$1: offsets = { x: commonX, y: reference2.y - element.height @@ -3162,7 +3162,7 @@ var require_assets = __commonJS({ var offset2 = offsetData[placement]; Object.keys(overflowOffsets).forEach(function(key2) { var multiply = [right, bottom].indexOf(key2) >= 0 ? 1 : -1; - var axis = [top, bottom].indexOf(key2) >= 0 ? "y" : "x"; + var axis = [top$1, bottom].indexOf(key2) >= 0 ? "y" : "x"; overflowOffsets[key2] += offset2[axis] * multiply; }); } @@ -3204,8 +3204,8 @@ var require_assets = __commonJS({ return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; } function flip(_ref) { - var state = _ref.state, options = _ref.options, name = _ref.name; - if (state.modifiersData[name]._skip) { + var state = _ref.state, options = _ref.options, name2 = _ref.name; + if (state.modifiersData[name2]._skip) { return; } var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; @@ -3232,7 +3232,7 @@ var require_assets = __commonJS({ var placement = placements2[i2]; var _basePlacement = getBasePlacement(placement); var isStartVariation = getVariation(placement) === start; - var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var isVertical = [top$1, bottom].indexOf(_basePlacement) >= 0; var len = isVertical ? "width" : "height"; var overflow = detectOverflow(state, { placement, @@ -3241,7 +3241,7 @@ var require_assets = __commonJS({ altBoundary, padding }); - var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top$1; if (referenceRect[len] > popperRect[len]) { mainVariationSide = getOppositePlacement(mainVariationSide); } @@ -3284,7 +3284,7 @@ var require_assets = __commonJS({ } } if (state.placement !== firstFittingPlacement) { - state.modifiersData[name]._skip = true; + state.modifiersData[name2]._skip = true; state.placement = firstFittingPlacement; state.reset = true; } @@ -3314,12 +3314,12 @@ var require_assets = __commonJS({ }; } function isAnySideFullyClipped(overflow) { - return [top, right, bottom, left].some(function(side) { + return [top$1, right, bottom, left].some(function(side) { return overflow[side] >= 0; }); } function hide(_ref) { - var state = _ref.state, name = _ref.name; + var state = _ref.state, name2 = _ref.name; var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var preventedOffsets = state.modifiersData.preventOverflow; @@ -3333,7 +3333,7 @@ var require_assets = __commonJS({ var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); - state.modifiersData[name] = { + state.modifiersData[name2] = { referenceClippingOffsets, popperEscapeOffsets, isReferenceHidden, @@ -3353,7 +3353,7 @@ var require_assets = __commonJS({ }; function distanceAndSkiddingToXY(placement, rects, offset2) { var basePlacement = getBasePlacement(placement); - var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var invertDistance = [left, top$1].indexOf(basePlacement) >= 0 ? -1 : 1; var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { placement })) : offset2, skidding = _ref[0], distance = _ref[1]; @@ -3368,7 +3368,7 @@ var require_assets = __commonJS({ }; } function offset(_ref2) { - var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var state = _ref2.state, options = _ref2.options, name2 = _ref2.name; var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; var data = placements.reduce(function(acc, placement) { acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); @@ -3379,7 +3379,7 @@ var require_assets = __commonJS({ state.modifiersData.popperOffsets.x += x2; state.modifiersData.popperOffsets.y += y2; } - state.modifiersData[name] = data; + state.modifiersData[name2] = data; } const offset$1 = { name: "offset", @@ -3389,8 +3389,8 @@ var require_assets = __commonJS({ fn: offset }; function popperOffsets(_ref) { - var state = _ref.state, name = _ref.name; - state.modifiersData[name] = computeOffsets({ + var state = _ref.state, name2 = _ref.name; + state.modifiersData[name2] = computeOffsets({ reference: state.rects.reference, element: state.rects.popper, strategy: "absolute", @@ -3408,7 +3408,7 @@ var require_assets = __commonJS({ return axis === "x" ? "y" : "x"; } function preventOverflow(_ref) { - var state = _ref.state, options = _ref.options, name = _ref.name; + var state = _ref.state, options = _ref.options, name2 = _ref.name; var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; var overflow = detectOverflow(state, { boundary, @@ -3444,7 +3444,7 @@ var require_assets = __commonJS({ } if (checkMainAxis) { var _offsetModifierState$; - var mainSide = mainAxis === "y" ? top : left; + var mainSide = mainAxis === "y" ? top$1 : left; var altSide = mainAxis === "y" ? bottom : right; var len = mainAxis === "y" ? "height" : "width"; var offset2 = popperOffsets2[mainAxis]; @@ -3463,25 +3463,25 @@ var require_assets = __commonJS({ var arrowPaddingMax = arrowPaddingObject[altSide]; var arrowLen = within(0, referenceRect[len], arrowRect[len]); var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; - var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var maxOffset2 = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; - var tetherMax = offset2 + maxOffset - offsetModifierValue; + var tetherMax = offset2 + maxOffset2 - offsetModifierValue; var preventedOffset = within(tether ? min$1(min2, tetherMin) : min2, offset2, tether ? max$2(max2, tetherMax) : max2); popperOffsets2[mainAxis] = preventedOffset; data[mainAxis] = preventedOffset - offset2; } if (checkAltAxis) { var _offsetModifierState$2; - var _mainSide = mainAxis === "x" ? top : left; + var _mainSide = mainAxis === "x" ? top$1 : left; var _altSide = mainAxis === "x" ? bottom : right; var _offset = popperOffsets2[altAxis]; var _len = altAxis === "y" ? "height" : "width"; var _min = _offset + overflow[_mainSide]; var _max = _offset - overflow[_altSide]; - var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var isOriginSide = [top$1, left].indexOf(basePlacement) !== -1; var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; @@ -3489,7 +3489,7 @@ var require_assets = __commonJS({ popperOffsets2[altAxis] = _preventedOffset; data[altAxis] = _preventedOffset - _offset; } - state.modifiersData[name] = data; + state.modifiersData[name2] = data; } const preventOverflow$1 = { name: "preventOverflow", @@ -3553,11 +3553,11 @@ var require_assets = __commonJS({ height: rect.height }; } - function order(modifiers) { + function order(modifiers2) { var map2 = /* @__PURE__ */ new Map(); var visited = /* @__PURE__ */ new Set(); var result = []; - modifiers.forEach(function(modifier) { + modifiers2.forEach(function(modifier) { map2.set(modifier.name, modifier); }); function sort(modifier) { @@ -3573,15 +3573,15 @@ var require_assets = __commonJS({ }); result.push(modifier); } - modifiers.forEach(function(modifier) { + modifiers2.forEach(function(modifier) { if (!visited.has(modifier.name)) { sort(modifier); } }); return result; } - function orderModifiers(modifiers) { - var orderedModifiers = order(modifiers); + function orderModifiers(modifiers2) { + var orderedModifiers = order(modifiers2); return modifierPhases.reduce(function(acc, phase) { return acc.concat(orderedModifiers.filter(function(modifier) { return modifier.phase === phase; @@ -3602,8 +3602,8 @@ var require_assets = __commonJS({ return pending; }; } - function mergeByName(modifiers) { - var merged = modifiers.reduce(function(merged2, current) { + function mergeByName(modifiers2) { + var merged = modifiers2.reduce(function(merged2, current) { var existing = merged2[current.name]; merged2[current.name] = existing ? Object.assign({}, existing, current, { options: Object.assign({}, existing.options, current.options), @@ -3696,12 +3696,12 @@ var require_assets = __commonJS({ index = -1; continue; } - var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name2 = _state$orderedModifie.name; if (typeof fn === "function") { state = fn({ state, options: _options, - name, + name: name2, instance }) || state; } @@ -3730,11 +3730,11 @@ var require_assets = __commonJS({ }); function runModifierEffects() { state.orderedModifiers.forEach(function(_ref) { - var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect2 = _ref.effect; + var name2 = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect2 = _ref.effect; if (typeof effect2 === "function") { var cleanupFn = effect2({ state, - name, + name: name2, instance, options: options2 }); @@ -3798,7 +3798,7 @@ var require_assets = __commonJS({ reference: reference$1, right, start, - top, + top: top$1, variationPlacements, viewport, write @@ -3976,12 +3976,12 @@ var require_assets = __commonJS({ onDOMContentLoaded(() => { const $2 = getjQuery(); if ($2) { - const name = plugin.NAME; - const JQUERY_NO_CONFLICT = $2.fn[name]; - $2.fn[name] = plugin.jQueryInterface; - $2.fn[name].Constructor = plugin; - $2.fn[name].noConflict = () => { - $2.fn[name] = JQUERY_NO_CONFLICT; + const name2 = plugin.NAME; + const JQUERY_NO_CONFLICT = $2.fn[name2]; + $2.fn[name2] = plugin.jQueryInterface; + $2.fn[name2].Constructor = plugin; + $2.fn[name2].noConflict = () => { + $2.fn[name2] = JQUERY_NO_CONFLICT; return plugin.jQueryInterface; }; } @@ -4106,8 +4106,8 @@ var require_assets = __commonJS({ callable = wrapFunction(callable); } const events = getElementEvents(element); - const handlers = events[typeEvent] || (events[typeEvent] = {}); - const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); + const handlers2 = events[typeEvent] || (events[typeEvent] = {}); + const previousFunction = findHandler(handlers2, callable, isDelegated ? handler : null); if (previousFunction) { previousFunction.oneOff = previousFunction.oneOff && oneOff; return; @@ -4118,7 +4118,7 @@ var require_assets = __commonJS({ fn.callable = callable; fn.oneOff = oneOff; fn.uidEvent = uid; - handlers[uid] = fn; + handlers2[uid] = fn; element.addEventListener(typeEvent, fn, isDelegated); } function removeHandler(element, events, typeEvent, handler, delegationSelector) { @@ -4210,8 +4210,8 @@ var require_assets = __commonJS({ return evt; } }; - function hydrateObj(obj, meta = {}) { - for (const [key2, value] of Object.entries(meta)) { + function hydrateObj(obj, meta2 = {}) { + for (const [key2, value] of Object.entries(meta2)) { try { obj[key2] = value; } catch (_unused) { @@ -4329,8 +4329,8 @@ var require_assets = __commonJS({ dispose() { Data.remove(this._element, this.constructor.DATA_KEY); EventHandler.off(this._element, this.constructor.EVENT_KEY); - for (const propertyName of Object.getOwnPropertyNames(this)) { - this[propertyName] = null; + for (const propertyName2 of Object.getOwnPropertyNames(this)) { + this[propertyName2] = null; } } _queueCallback(callback, element, isAnimated = true) { @@ -4358,8 +4358,8 @@ var require_assets = __commonJS({ static get EVENT_KEY() { return `.${this.DATA_KEY}`; } - static eventName(name) { - return `${name}${this.EVENT_KEY}`; + static eventName(name2) { + return `${name2}${this.EVENT_KEY}`; } } const getSelector = (element) => { @@ -4438,15 +4438,15 @@ var require_assets = __commonJS({ }; const enableDismissTrigger = (component, method = "hide") => { const clickEvent = `click.dismiss${component.EVENT_KEY}`; - const name = component.NAME; - EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function(event) { + const name2 = component.NAME; + EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name2}"]`, function(event) { if (["A", "AREA"].includes(this.tagName)) { event.preventDefault(); } if (isDisabled(this)) { return; } - const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`); + const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name2}`); const instance = component.getOrCreateInstance(target); instance[method](); }); @@ -6295,11 +6295,11 @@ var require_assets = __commonJS({ hasContent() { return this.getContent().length > 0; } - changeContent(content) { - this._checkContent(content); + changeContent(content2) { + this._checkContent(content2); this._config.content = { ...this._config.content, - ...content + ...content2 }; return this; } @@ -6322,32 +6322,32 @@ var require_assets = __commonJS({ this._checkContent(config2.content); } _checkContent(arg) { - for (const [selector, content] of Object.entries(arg)) { + for (const [selector, content2] of Object.entries(arg)) { super._typeCheckConfig({ selector, - entry: content + entry: content2 }, DefaultContentType); } } - _setContent(template2, content, selector) { + _setContent(template2, content2, selector) { const templateElement = SelectorEngine.findOne(selector, template2); if (!templateElement) { return; } - content = this._resolvePossibleFunction(content); - if (!content) { + content2 = this._resolvePossibleFunction(content2); + if (!content2) { templateElement.remove(); return; } - if (isElement(content)) { - this._putElementInTemplate(getElement(content), templateElement); + if (isElement(content2)) { + this._putElementInTemplate(getElement(content2), templateElement); return; } if (this._config.html) { - templateElement.innerHTML = this._maybeSanitize(content); + templateElement.innerHTML = this._maybeSanitize(content2); return; } - templateElement.textContent = content; + templateElement.textContent = content2; } _maybeSanitize(arg) { return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; @@ -6575,8 +6575,8 @@ var require_assets = __commonJS({ } return this.tip; } - _createTipElement(content) { - const tip = this._getTemplateFactory(content).toHtml(); + _createTipElement(content2) { + const tip = this._getTemplateFactory(content2).toHtml(); if (!tip) { return null; } @@ -6589,22 +6589,22 @@ var require_assets = __commonJS({ } return tip; } - setContent(content) { - this._newContent = content; + setContent(content2) { + this._newContent = content2; if (this._isShown()) { this._disposePopper(); this.show(); } } - _getTemplateFactory(content) { + _getTemplateFactory(content2) { if (this._templateFactory) { - this._templateFactory.changeContent(content); + this._templateFactory.changeContent(content2); } else { this._templateFactory = new TemplateFactory({ ...this._config, // the `content` var has to be after `this._config` // to override config.content in case of popover - content, + content: content2, extraClass: this._resolvePossibleFunction(this._config.customClass) }); } @@ -7457,7 +7457,7 @@ var require_assets = __commonJS({ } enableDismissTrigger(Toast); defineJQueryPlugin(Toast); - var t$1, r$1, u, i$1, o = 0, f = [], c$1 = l$1, e$1 = c$1.__b, a = c$1.__r, v = c$1.diffed, l = c$1.__c, m = c$1.unmount, s = c$1.__; + var t$2, r$1, u, i$2, o = 0, f = [], c$1 = l$1, e$1 = c$1.__b, a = c$1.__r, v = c$1.diffed, l = c$1.__c, m = c$1.unmount, s = c$1.__; function d(n2, t2) { c$1.__h && c$1.__h(r$1, n2, o || t2), o = 0; var u2 = r$1.__H || (r$1.__H = { __: [], __h: [] }); @@ -7467,7 +7467,7 @@ var require_assets = __commonJS({ return o = 1, p(D, n2); } function p(n2, u2, i2) { - var o2 = d(t$1++, 2); + var o2 = d(t$2++, 2); if (o2.t = n2, !o2.__c && (o2.__ = [D(void 0, u2), function(n3) { var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3); t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({})); @@ -7501,8 +7501,8 @@ var require_assets = __commonJS({ return o2.__N || o2.__; } function y(n2, u2) { - var i2 = d(t$1++, 3); - !c$1.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r$1.__H.__h.push(i2)); + var i2 = d(t$2++, 3); + !c$1.__s && C$1(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r$1.__H.__h.push(i2)); } function A(n2) { return o = 5, T(function() { @@ -7510,8 +7510,8 @@ var require_assets = __commonJS({ }, []); } function T(n2, r2) { - var u2 = d(t$1++, 7); - return C(u2.__H, r2) && (u2.__ = n2(), u2.__H = r2, u2.__h = n2), u2.__; + var u2 = d(t$2++, 7); + return C$1(u2.__H, r2) && (u2.__ = n2(), u2.__H = r2, u2.__h = n2), u2.__; } function q(n2, t2) { return o = 8, T(function() { @@ -7530,15 +7530,15 @@ var require_assets = __commonJS({ }, c$1.__ = function(n2, t2) { n2 && t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), s && s(n2, t2); }, c$1.__r = function(n2) { - a && a(n2), t$1 = 0; + a && a(n2), t$2 = 0; var i2 = (r$1 = n2.__c).__H; i2 && (u === r$1 ? (i2.__h = [], r$1.__h = [], i2.__.forEach(function(n3) { n3.__N && (n3.__ = n3.__N), n3.i = n3.__N = void 0; - })) : (i2.__h.forEach(z), i2.__h.forEach(B), i2.__h = [], t$1 = 0)), u = r$1; + })) : (i2.__h.forEach(z), i2.__h.forEach(B), i2.__h = [], t$2 = 0)), u = r$1; }, c$1.diffed = function(n2) { v && v(n2); var t2 = n2.__c; - t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i$1 === c$1.requestAnimationFrame || ((i$1 = c$1.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n3) { + t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i$2 === c$1.requestAnimationFrame || ((i$2 = c$1.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n3) { n3.i && (n3.__H = n3.i), n3.i = void 0; })), u = r$1 = null; }, c$1.__c = function(n2, t2) { @@ -7579,7 +7579,7 @@ var require_assets = __commonJS({ var t2 = r$1; n2.__c = n2.__(), r$1 = t2; } - function C(n2, t2) { + function C$1(n2, t2) { return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) { return t3 !== n2[r2]; }); @@ -7599,11 +7599,11 @@ var require_assets = __commonJS({ if (typeof inp === "string") { return inp; } else { - const content = inp.content; - if (typeof content === "string") { - return content; + const content2 = inp.content; + if (typeof content2 === "string") { + return content2; } else { - const result = content.map((con) => { + const result = content2.map((con) => { if (con.type === "text") { return con.text; } else { @@ -7616,9 +7616,9 @@ var require_assets = __commonJS({ }); } }; - const formatDataset = (name, samples, epochs) => { + const formatDataset = (name2, samples, epochs) => { const perEpochSamples = epochs > 0 ? samples / epochs : samples; - return `${name ? "— " : ""}${perEpochSamples + " "}${epochs > 1 ? `x ${epochs} ` : ""}${samples === 1 ? "sample" : "samples"}`; + return `${name2 ? "— " : ""}${perEpochSamples + " "}${epochs > 1 ? `x ${epochs} ` : ""}${samples === 1 ? "sample" : "samples"}`; }; const formatTime$1 = (seconds) => { if (seconds < 60) { @@ -7631,40 +7631,40 @@ var require_assets = __commonJS({ )} min ${seconds % 60} sec`; } }; - function formatPrettyDecimal(num) { - const numDecimalPlaces = num.toString().includes(".") ? num.toString().split(".")[1].length : 0; + function formatPrettyDecimal(num2) { + const numDecimalPlaces = num2.toString().includes(".") ? num2.toString().split(".")[1].length : 0; if (numDecimalPlaces === 0) { - return num.toFixed(1); + return num2.toFixed(1); } else if (numDecimalPlaces > 3) { - return num.toFixed(3); + return num2.toFixed(3); } else { - return num.toString(); + return num2.toString(); } } - function formatDecimalNoTrailingZeroes(num) { - if (typeof num !== "number") { - return num; + function formatDecimalNoTrailingZeroes(num2) { + if (typeof num2 !== "number") { + return num2; } - if (num.toString().includes(".")) { - const decimal = num.toString().split(".")[1]; + if (num2.toString().includes(".")) { + const decimal = num2.toString().split(".")[1]; const trimmed = decimal.replace(/\.?0+$/, ""); - return num.toFixed(trimmed.length); + return num2.toFixed(trimmed.length); } else { - return num.toFixed(0); + return num2.toFixed(0); } } - function toTitleCase(str) { - return str.split(" ").map((w2) => w2[0].toUpperCase() + w2.substr(1).toLowerCase()).join(" "); + function toTitleCase(str2) { + return str2.split(" ").map((w2) => w2[0].toUpperCase() + w2.substr(1).toLowerCase()).join(" "); } - function formatNoDecimal(num) { - if (typeof num !== "number") { - return num; + function formatNoDecimal(num2) { + if (typeof num2 !== "number") { + return num2; } - const rounded = Math.round(num); + const rounded = Math.round(num2); return rounded.toFixed(0); } - function formatNumber(num) { - return num.toLocaleString(navigator.language, { + function formatNumber(num2) { + return num2.toLocaleString(navigator.language, { minimumFractionDigits: 0, maximumFractionDigits: 5 }); @@ -8316,9 +8316,9 @@ var require_assets = __commonJS({ rowGap: "1em" }} > - ${scores.map((score) => { - const name = score.name; - const reducer = score.reducer; + ${scores.map((score2) => { + const name2 = score2.name; + const reducer = score2.reducer; return m$1`
- ${name} + ${name2}
${reducer ? m$1`
- ${Object.keys(score.metrics).map((key2) => { - const metric = score.metrics[key2]; + ${Object.keys(score2.metrics).map((key2) => { + const metric = score2.metrics[key2]; return m$1`
@@ -8617,7 +8617,7 @@ var require_assets = __commonJS({ const computeTabContentsId = (id, index) => { return `${id}-contents-${index}`; }; - const ToolButton = ({ name, classes, icon, onclick, ...rest }) => { + const ToolButton = ({ name: name2, classes, icon, onclick, ...rest }) => { const attr = { type: "button", class: `btn btn-tools ${classes || ""}`, @@ -8625,7 +8625,7 @@ var require_assets = __commonJS({ ...rest }; const iconEl = icon ? m$1`` : ""; - return g("button", attr, m$1`${iconEl}${name}`); + return g("button", attr, m$1`${iconEl}${name2}`); }; const ghCommitUrl = (origin, commit) => { const baseUrl = origin.replace(/\.git$/, ""); @@ -8692,10 +8692,10 @@ var require_assets = __commonJS({
`; }; - var e, t, r = { + var e, t$1, r = { exports: {} }; - e = r, t = function(e2, t2) { + e = r, t$1 = function(e2, t2) { Object.defineProperty(t2, "__esModule", { value: true }), t2.ANSIOutput = t2.ANSIColor = t2.ANSIFont = t2.ANSIStyle = void 0; @@ -9352,7 +9352,7 @@ var require_assets = __commonJS({ const t3 = Math.max(Math.min(255, e3), 0).toString(16); return 2 === t3.length ? t3 : "0" + t3; }; - }(0, r.exports), void 0 !== t && (e.exports = t); + }(0, r.exports), void 0 !== t$1 && (e.exports = t$1); var n = r.exports; const ANSIDisplay = ({ output, style: style2 }) => { const ansiOutput = new n.ANSIOutput(); @@ -9508,12 +9508,12 @@ var require_assets = __commonJS({ } return cache; } - function decode$1(string, exclude) { + function decode$1(string2, exclude) { if (typeof exclude !== "string") { exclude = decode$1.defaultChars; } const cache = getDecodeCache(exclude); - return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) { + return string2.replace(/(%[a-f0-9]{2})+/gi, function(seq) { let result = ""; for (let i2 = 0, l2 = seq.length; i2 < l2; i2 += 3) { const b1 = parseInt(seq.slice(i2 + 1, i2 + 3), 16); @@ -9591,7 +9591,7 @@ var require_assets = __commonJS({ } return cache; } - function encode$1(string, exclude, keepEscaped) { + function encode$1(string2, exclude, keepEscaped) { if (typeof exclude !== "string") { keepEscaped = exclude; exclude = encode$1.defaultChars; @@ -9601,11 +9601,11 @@ var require_assets = __commonJS({ } const cache = getEncodeCache(exclude); let result = ""; - for (let i2 = 0, l2 = string.length; i2 < l2; i2++) { - const code2 = string.charCodeAt(i2); + for (let i2 = 0, l2 = string2.length; i2 < l2; i2++) { + const code2 = string2.charCodeAt(i2); if (keepEscaped && code2 === 37 && i2 + 2 < l2) { - if (/^[0-9a-f]{2}$/i.test(string.slice(i2 + 1, i2 + 3))) { - result += string.slice(i2, i2 + 3); + if (/^[0-9a-f]{2}$/i.test(string2.slice(i2 + 1, i2 + 3))) { + result += string2.slice(i2, i2 + 3); i2 += 2; continue; } @@ -9616,9 +9616,9 @@ var require_assets = __commonJS({ } if (code2 >= 55296 && code2 <= 57343) { if (code2 >= 55296 && code2 <= 56319 && i2 + 1 < l2) { - const nextCode = string.charCodeAt(i2 + 1); + const nextCode = string2.charCodeAt(i2 + 1); if (nextCode >= 56320 && nextCode <= 57343) { - result += encodeURIComponent(string[i2] + string[i2 + 1]); + result += encodeURIComponent(string2[i2] + string2[i2 + 1]); i2++; continue; } @@ -9626,7 +9626,7 @@ var require_assets = __commonJS({ result += "%EF%BF%BD"; continue; } - result += encodeURIComponent(string[i2]); + result += encodeURIComponent(string2[i2]); } return result; } @@ -9857,7 +9857,7 @@ var require_assets = __commonJS({ // prettier-ignore "Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((c2) => c2.charCodeAt(0)) ); - var _a$1; + var _a$2; const decodeMap = /* @__PURE__ */ new Map([ [0, 65533], // C1 Unicode control character reference replacements @@ -9889,9 +9889,9 @@ var require_assets = __commonJS({ [158, 382], [159, 376] ]); - const fromCodePoint$1 = ( + const fromCodePoint$2 = ( // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins - (_a$1 = String.fromCodePoint) !== null && _a$1 !== void 0 ? _a$1 : function(codePoint) { + (_a$2 = String.fromCodePoint) !== null && _a$2 !== void 0 ? _a$2 : function(codePoint) { let output = ""; if (codePoint > 65535) { codePoint -= 65536; @@ -9989,28 +9989,28 @@ var require_assets = __commonJS({ * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ - write(str, offset2) { + write(str2, offset2) { switch (this.state) { case EntityDecoderState.EntityStart: { - if (str.charCodeAt(offset2) === CharCodes.NUM) { + if (str2.charCodeAt(offset2) === CharCodes.NUM) { this.state = EntityDecoderState.NumericStart; this.consumed += 1; - return this.stateNumericStart(str, offset2 + 1); + return this.stateNumericStart(str2, offset2 + 1); } this.state = EntityDecoderState.NamedEntity; - return this.stateNamedEntity(str, offset2); + return this.stateNamedEntity(str2, offset2); } case EntityDecoderState.NumericStart: { - return this.stateNumericStart(str, offset2); + return this.stateNumericStart(str2, offset2); } case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(str, offset2); + return this.stateNumericDecimal(str2, offset2); } case EntityDecoderState.NumericHex: { - return this.stateNumericHex(str, offset2); + return this.stateNumericHex(str2, offset2); } case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(str, offset2); + return this.stateNamedEntity(str2, offset2); } } } @@ -10023,22 +10023,22 @@ var require_assets = __commonJS({ * @param offset The current offset. * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ - stateNumericStart(str, offset2) { - if (offset2 >= str.length) { + stateNumericStart(str2, offset2) { + if (offset2 >= str2.length) { return -1; } - if ((str.charCodeAt(offset2) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + if ((str2.charCodeAt(offset2) | TO_LOWER_BIT) === CharCodes.LOWER_X) { this.state = EntityDecoderState.NumericHex; this.consumed += 1; - return this.stateNumericHex(str, offset2 + 1); + return this.stateNumericHex(str2, offset2 + 1); } this.state = EntityDecoderState.NumericDecimal; - return this.stateNumericDecimal(str, offset2); + return this.stateNumericDecimal(str2, offset2); } - addToNumericResult(str, start2, end2, base2) { + addToNumericResult(str2, start2, end2, base2) { if (start2 !== end2) { const digitCount = end2 - start2; - this.result = this.result * Math.pow(base2, digitCount) + parseInt(str.substr(start2, digitCount), base2); + this.result = this.result * Math.pow(base2, digitCount) + parseInt(str2.substr(start2, digitCount), base2); this.consumed += digitCount; } } @@ -10051,18 +10051,18 @@ var require_assets = __commonJS({ * @param offset The current offset. * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ - stateNumericHex(str, offset2) { + stateNumericHex(str2, offset2) { const startIdx = offset2; - while (offset2 < str.length) { - const char = str.charCodeAt(offset2); + while (offset2 < str2.length) { + const char = str2.charCodeAt(offset2); if (isNumber(char) || isHexadecimalCharacter(char)) { offset2 += 1; } else { - this.addToNumericResult(str, startIdx, offset2, 16); + this.addToNumericResult(str2, startIdx, offset2, 16); return this.emitNumericEntity(char, 3); } } - this.addToNumericResult(str, startIdx, offset2, 16); + this.addToNumericResult(str2, startIdx, offset2, 16); return -1; } /** @@ -10074,18 +10074,18 @@ var require_assets = __commonJS({ * @param offset The current offset. * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ - stateNumericDecimal(str, offset2) { + stateNumericDecimal(str2, offset2) { const startIdx = offset2; - while (offset2 < str.length) { - const char = str.charCodeAt(offset2); + while (offset2 < str2.length) { + const char = str2.charCodeAt(offset2); if (isNumber(char)) { offset2 += 1; } else { - this.addToNumericResult(str, startIdx, offset2, 10); + this.addToNumericResult(str2, startIdx, offset2, 10); return this.emitNumericEntity(char, 2); } } - this.addToNumericResult(str, startIdx, offset2, 10); + this.addToNumericResult(str2, startIdx, offset2, 10); return -1; } /** @@ -10130,12 +10130,12 @@ var require_assets = __commonJS({ * @param offset The current offset. * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ - stateNamedEntity(str, offset2) { + stateNamedEntity(str2, offset2) { const { decodeTree } = this; let current = decodeTree[this.treeIndex]; let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; - for (; offset2 < str.length; offset2++, this.excess++) { - const char = str.charCodeAt(offset2); + for (; offset2 < str2.length; offset2++, this.excess++) { + const char = str2.charCodeAt(offset2); this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); if (this.treeIndex < 0) { return this.result === 0 || // If we are parsing an attribute @@ -10219,15 +10219,15 @@ var require_assets = __commonJS({ } function getDecoder(decodeTree) { let ret = ""; - const decoder = new EntityDecoder(decodeTree, (str) => ret += fromCodePoint$1(str)); - return function decodeWithTrie(str, decodeMode) { + const decoder = new EntityDecoder(decodeTree, (str2) => ret += fromCodePoint$2(str2)); + return function decodeWithTrie(str2, decodeMode) { let lastIndex = 0; let offset2 = 0; - while ((offset2 = str.indexOf("&", offset2)) >= 0) { - ret += str.slice(lastIndex, offset2); + while ((offset2 = str2.indexOf("&", offset2)) >= 0) { + ret += str2.slice(lastIndex, offset2); decoder.startEntity(decodeMode); const len = decoder.write( - str, + str2, // Skip the "&" offset2 + 1 ); @@ -10238,7 +10238,7 @@ var require_assets = __commonJS({ lastIndex = offset2 + len; offset2 = len === 0 ? lastIndex + 1 : lastIndex; } - const result = ret + str.slice(lastIndex); + const result = ret + str2.slice(lastIndex); ret = ""; return result; }; @@ -10270,8 +10270,8 @@ var require_assets = __commonJS({ } const htmlDecoder = getDecoder(htmlDecodeTree); getDecoder(xmlDecodeTree); - function decodeHTML(str, mode = DecodingMode.Legacy) { - return htmlDecoder(str, mode); + function decodeHTML(str2, mode = DecodingMode.Legacy) { + return htmlDecoder(str2, mode); } function _class$1(obj) { return Object.prototype.toString.call(obj); @@ -10328,7 +10328,7 @@ var require_assets = __commonJS({ } return true; } - function fromCodePoint(c2) { + function fromCodePoint$1(c2) { if (c2 > 65535) { c2 -= 65536; const surrogate1 = 55296 + (c2 >> 10); @@ -10341,11 +10341,11 @@ var require_assets = __commonJS({ const ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi; const UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + "|" + ENTITY_RE.source, "gi"); const DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i; - function replaceEntityPattern(match, name) { - if (name.charCodeAt(0) === 35 && DIGITAL_ENTITY_TEST_RE.test(name)) { - const code2 = name[1].toLowerCase() === "x" ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10); + function replaceEntityPattern(match, name2) { + if (name2.charCodeAt(0) === 35 && DIGITAL_ENTITY_TEST_RE.test(name2)) { + const code2 = name2[1].toLowerCase() === "x" ? parseInt(name2.slice(2), 16) : parseInt(name2.slice(1), 10); if (isValidEntityCode(code2)) { - return fromCodePoint(code2); + return fromCodePoint$1(code2); } return match; } @@ -10355,17 +10355,17 @@ var require_assets = __commonJS({ } return match; } - function unescapeMd(str) { - if (str.indexOf("\\") < 0) { - return str; + function unescapeMd(str2) { + if (str2.indexOf("\\") < 0) { + return str2; } - return str.replace(UNESCAPE_MD_RE, "$1"); + return str2.replace(UNESCAPE_MD_RE, "$1"); } - function unescapeAll(str) { - if (str.indexOf("\\") < 0 && str.indexOf("&") < 0) { - return str; + function unescapeAll(str2) { + if (str2.indexOf("\\") < 0 && str2.indexOf("&") < 0) { + return str2; } - return str.replace(UNESCAPE_ALL_RE, function(match, escaped, entity2) { + return str2.replace(UNESCAPE_ALL_RE, function(match, escaped, entity2) { if (escaped) { return escaped; } @@ -10383,15 +10383,15 @@ var require_assets = __commonJS({ function replaceUnsafeChar(ch3) { return HTML_REPLACEMENTS[ch3]; } - function escapeHtml(str) { - if (HTML_ESCAPE_TEST_RE.test(str)) { - return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar); + function escapeHtml(str2) { + if (HTML_ESCAPE_TEST_RE.test(str2)) { + return str2.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar); } - return str; + return str2; } const REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g; - function escapeRE$1(str) { - return str.replace(REGEXP_ESCAPE_RE, "\\$&"); + function escapeRE$1(str2) { + return str2.replace(REGEXP_ESCAPE_RE, "\\$&"); } function isSpace(code2) { switch (code2) { @@ -10463,12 +10463,12 @@ var require_assets = __commonJS({ return false; } } - function normalizeReference(str) { - str = str.trim().replace(/\s+/g, " "); + function normalizeReference(str2) { + str2 = str2.trim().replace(/\s+/g, " "); if ("ẞ".toLowerCase() === "Ṿ") { - str = str.replace(/ẞ/g, "ß"); + str2 = str2.replace(/ẞ/g, "ß"); } - return str.toLowerCase().toUpperCase(); + return str2.toLowerCase().toUpperCase(); } const lib$1 = { mdurl, ucmicro }; const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ @@ -10477,7 +10477,7 @@ var require_assets = __commonJS({ assign: assign$1, escapeHtml, escapeRE: escapeRE$1, - fromCodePoint, + fromCodePoint: fromCodePoint$1, has, isMdAsciiPunct, isPunctChar, @@ -10523,7 +10523,7 @@ var require_assets = __commonJS({ state.pos = oldPos; return labelEnd; } - function parseLinkDestination(str, start2, max2) { + function parseLinkDestination(str2, start2, max2) { let code2; let pos2 = start2; const result = { @@ -10531,10 +10531,10 @@ var require_assets = __commonJS({ pos: 0, str: "" }; - if (str.charCodeAt(pos2) === 60) { + if (str2.charCodeAt(pos2) === 60) { pos2++; while (pos2 < max2) { - code2 = str.charCodeAt(pos2); + code2 = str2.charCodeAt(pos2); if (code2 === 10) { return result; } @@ -10543,7 +10543,7 @@ var require_assets = __commonJS({ } if (code2 === 62) { result.pos = pos2 + 1; - result.str = unescapeAll(str.slice(start2 + 1, pos2)); + result.str = unescapeAll(str2.slice(start2 + 1, pos2)); result.ok = true; return result; } @@ -10557,7 +10557,7 @@ var require_assets = __commonJS({ } let level = 0; while (pos2 < max2) { - code2 = str.charCodeAt(pos2); + code2 = str2.charCodeAt(pos2); if (code2 === 32) { break; } @@ -10565,7 +10565,7 @@ var require_assets = __commonJS({ break; } if (code2 === 92 && pos2 + 1 < max2) { - if (str.charCodeAt(pos2 + 1) === 32) { + if (str2.charCodeAt(pos2 + 1) === 32) { break; } pos2 += 2; @@ -10591,12 +10591,12 @@ var require_assets = __commonJS({ if (level !== 0) { return result; } - result.str = unescapeAll(str.slice(start2, pos2)); + result.str = unescapeAll(str2.slice(start2, pos2)); result.pos = pos2; result.ok = true; return result; } - function parseLinkTitle(str, start2, max2, prev_state) { + function parseLinkTitle(str2, start2, max2, prev_state) { let code2; let pos2 = start2; const state = { @@ -10618,7 +10618,7 @@ var require_assets = __commonJS({ if (pos2 >= max2) { return state; } - let marker = str.charCodeAt(pos2); + let marker = str2.charCodeAt(pos2); if (marker !== 34 && marker !== 39 && marker !== 40) { return state; } @@ -10630,10 +10630,10 @@ var require_assets = __commonJS({ state.marker = marker; } while (pos2 < max2) { - code2 = str.charCodeAt(pos2); + code2 = str2.charCodeAt(pos2); if (code2 === state.marker) { state.pos = pos2 + 1; - state.str += unescapeAll(str.slice(start2, pos2)); + state.str += unescapeAll(str2.slice(start2, pos2)); state.ok = true; return state; } else if (code2 === 40 && state.marker === 41) { @@ -10644,7 +10644,7 @@ var require_assets = __commonJS({ pos2++; } state.can_continue = true; - state.str += unescapeAll(str.slice(start2, pos2)); + state.str += unescapeAll(str2.slice(start2, pos2)); return state; } const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ @@ -10668,9 +10668,9 @@ var require_assets = __commonJS({ let langName = ""; let langAttrs = ""; if (info) { - const arr = info.split(/(\s+)/g); - langName = arr[0]; - langAttrs = arr.slice(2).join(""); + const arr2 = info.split(/(\s+)/g); + langName = arr2[0]; + langAttrs = arr2.slice(2).join(""); } let highlighted; if (options.highlight) { @@ -10752,10 +10752,10 @@ var require_assets = __commonJS({ needLf = true; if (token2.nesting === 1) { if (idx + 1 < tokens.length) { - const nextToken = tokens[idx + 1]; - if (nextToken.type === "inline" || nextToken.hidden) { + const nextToken2 = tokens[idx + 1]; + if (nextToken2.type === "inline" || nextToken2.hidden) { needLf = false; - } else if (nextToken.nesting === -1 && nextToken.tag === token2.tag) { + } else if (nextToken2.nesting === -1 && nextToken2.tag === token2.tag) { needLf = false; } } @@ -10818,9 +10818,9 @@ var require_assets = __commonJS({ this.__rules__ = []; this.__cache__ = null; } - Ruler.prototype.__find__ = function(name) { + Ruler.prototype.__find__ = function(name2) { for (let i2 = 0; i2 < this.__rules__.length; i2++) { - if (this.__rules__[i2].name === name) { + if (this.__rules__[i2].name === name2) { return i2; } } @@ -10853,11 +10853,11 @@ var require_assets = __commonJS({ }); }); }; - Ruler.prototype.at = function(name, fn, options) { - const index = this.__find__(name); + Ruler.prototype.at = function(name2, fn, options) { + const index = this.__find__(name2); const opt = options || {}; if (index === -1) { - throw new Error("Parser rule not found: " + name); + throw new Error("Parser rule not found: " + name2); } this.__rules__[index].fn = fn; this.__rules__[index].alt = opt.alt || []; @@ -10906,16 +10906,16 @@ var require_assets = __commonJS({ list2 = [list2]; } const result = []; - list2.forEach(function(name) { - const idx = this.__find__(name); + list2.forEach(function(name2) { + const idx = this.__find__(name2); if (idx < 0) { if (ignoreInvalid) { return; } - throw new Error("Rules manager: invalid rule name " + name); + throw new Error("Rules manager: invalid rule name " + name2); } this.__rules__[idx].enabled = true; - result.push(name); + result.push(name2); }, this); this.__cache__ = null; return result; @@ -10934,16 +10934,16 @@ var require_assets = __commonJS({ list2 = [list2]; } const result = []; - list2.forEach(function(name) { - const idx = this.__find__(name); + list2.forEach(function(name2) { + const idx = this.__find__(name2); if (idx < 0) { if (ignoreInvalid) { return; } - throw new Error("Rules manager: invalid rule name " + name); + throw new Error("Rules manager: invalid rule name " + name2); } this.__rules__[idx].enabled = false; - result.push(name); + result.push(name2); }, this); this.__cache__ = null; return result; @@ -10969,13 +10969,13 @@ var require_assets = __commonJS({ this.block = false; this.hidden = false; } - Token.prototype.attrIndex = function attrIndex(name) { + Token.prototype.attrIndex = function attrIndex(name2) { if (!this.attrs) { return -1; } const attrs = this.attrs; for (let i2 = 0, len = attrs.length; i2 < len; i2++) { - if (attrs[i2][0] === name) { + if (attrs[i2][0] === name2) { return i2; } } @@ -10988,27 +10988,27 @@ var require_assets = __commonJS({ this.attrs = [attrData]; } }; - Token.prototype.attrSet = function attrSet(name, value) { - const idx = this.attrIndex(name); - const attrData = [name, value]; + Token.prototype.attrSet = function attrSet(name2, value) { + const idx = this.attrIndex(name2); + const attrData = [name2, value]; if (idx < 0) { this.attrPush(attrData); } else { this.attrs[idx] = attrData; } }; - Token.prototype.attrGet = function attrGet(name) { - const idx = this.attrIndex(name); + Token.prototype.attrGet = function attrGet(name2) { + const idx = this.attrIndex(name2); let value = null; if (idx >= 0) { value = this.attrs[idx][1]; } return value; }; - Token.prototype.attrJoin = function attrJoin(name, value) { - const idx = this.attrIndex(name); + Token.prototype.attrJoin = function attrJoin(name2, value) { + const idx = this.attrIndex(name2); if (idx < 0) { - this.attrPush([name, value]); + this.attrPush([name2, value]); } else { this.attrs[idx][1] = this.attrs[idx][1] + " " + value; } @@ -11024,10 +11024,10 @@ var require_assets = __commonJS({ const NEWLINES_RE = /\r\n?|\n/g; const NULL_RE = /\0/g; function normalize(state) { - let str; - str = state.src.replace(NEWLINES_RE, "\n"); - str = str.replace(NULL_RE, "�"); - state.src = str; + let str2; + str2 = state.src.replace(NEWLINES_RE, "\n"); + str2 = str2.replace(NULL_RE, "�"); + state.src = str2; } function block(state) { let token2; @@ -11050,11 +11050,11 @@ var require_assets = __commonJS({ } } } - function isLinkOpen$1(str) { - return /^\s]/i.test(str); + function isLinkOpen$1(str2) { + return /^\s]/i.test(str2); } - function isLinkClose$1(str) { - return /^<\/a\s*>/i.test(str); + function isLinkClose$1(str2) { + return /^<\/a\s*>/i.test(str2); } function linkify$1(state) { const blockTokens = state.tokens; @@ -11153,8 +11153,8 @@ var require_assets = __commonJS({ r: "®", tm: "™" }; - function replaceFn(match, name) { - return SCOPED_ABBR[name.toLowerCase()]; + function replaceFn(match, name2) { + return SCOPED_ABBR[name2.toLowerCase()]; } function replace_scoped(inlineTokens) { let inside_autolink = 0; @@ -11188,7 +11188,7 @@ var require_assets = __commonJS({ } } } - function replace(state) { + function replace$1(state) { let blkIdx; if (!state.md.options.typographer) { return; @@ -11208,8 +11208,8 @@ var require_assets = __commonJS({ const QUOTE_TEST_RE = /['"]/; const QUOTE_RE = /['"]/g; const APOSTROPHE = "’"; - function replaceAt(str, index, ch3) { - return str.slice(0, index) + ch3 + str.slice(index + 1); + function replaceAt(str2, index, ch3) { + return str2.slice(0, index) + ch3 + str2.slice(index + 1); } function process_inlines(tokens, state) { let j2; @@ -11386,7 +11386,7 @@ var require_assets = __commonJS({ ["block", block], ["inline", inline], ["linkify", linkify$1], - ["replacements", replace], + ["replacements", replace$1], ["smartquotes", smartquotes], // `text_join` finds `text_special` tokens (for escape sequences) // and joins them with the rest of the text @@ -11565,30 +11565,30 @@ var require_assets = __commonJS({ const max2 = state.eMarks[line2]; return state.src.slice(pos2, max2); } - function escapedSplit(str) { + function escapedSplit(str2) { const result = []; - const max2 = str.length; + const max2 = str2.length; let pos2 = 0; - let ch3 = str.charCodeAt(pos2); + let ch3 = str2.charCodeAt(pos2); let isEscaped = false; let lastPos = 0; let current = ""; while (pos2 < max2) { if (ch3 === 124) { if (!isEscaped) { - result.push(current + str.substring(lastPos, pos2)); + result.push(current + str2.substring(lastPos, pos2)); current = ""; lastPos = pos2 + 1; } else { - current += str.substring(lastPos, pos2 - 1); + current += str2.substring(lastPos, pos2 - 1); lastPos = pos2; } } isEscaped = ch3 === 92; pos2++; - ch3 = str.charCodeAt(pos2); + ch3 = str2.charCodeAt(pos2); } - result.push(current + str.substring(lastPos)); + result.push(current + str2.substring(lastPos)); return result; } function table(state, startLine, endLine, silent) { @@ -11747,7 +11747,7 @@ var require_assets = __commonJS({ state.line = nextLine; return true; } - function code(state, startLine, endLine) { + function code$1(state, startLine, endLine) { if (state.sCount[startLine] - state.blkIndent < 4) { return false; } @@ -12257,11 +12257,11 @@ var require_assets = __commonJS({ const max3 = state.eMarks[nextLine2]; return state.src.slice(pos3, max3 + 1); } - let str = state.src.slice(pos2, max2 + 1); - max2 = str.length; + let str2 = state.src.slice(pos2, max2 + 1); + max2 = str2.length; let labelEnd = -1; for (pos2 = 1; pos2 < max2; pos2++) { - const ch3 = str.charCodeAt(pos2); + const ch3 = str2.charCodeAt(pos2); if (ch3 === 91) { return false; } else if (ch3 === 93) { @@ -12270,32 +12270,32 @@ var require_assets = __commonJS({ } else if (ch3 === 10) { const lineContent = getNextLine(nextLine); if (lineContent !== null) { - str += lineContent; - max2 = str.length; + str2 += lineContent; + max2 = str2.length; nextLine++; } } else if (ch3 === 92) { pos2++; - if (pos2 < max2 && str.charCodeAt(pos2) === 10) { + if (pos2 < max2 && str2.charCodeAt(pos2) === 10) { const lineContent = getNextLine(nextLine); if (lineContent !== null) { - str += lineContent; - max2 = str.length; + str2 += lineContent; + max2 = str2.length; nextLine++; } } } } - if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 58) { + if (labelEnd < 0 || str2.charCodeAt(labelEnd + 1) !== 58) { return false; } for (pos2 = labelEnd + 2; pos2 < max2; pos2++) { - const ch3 = str.charCodeAt(pos2); + const ch3 = str2.charCodeAt(pos2); if (ch3 === 10) { const lineContent = getNextLine(nextLine); if (lineContent !== null) { - str += lineContent; - max2 = str.length; + str2 += lineContent; + max2 = str2.length; nextLine++; } } else if (isSpace(ch3)) ; @@ -12303,7 +12303,7 @@ var require_assets = __commonJS({ break; } } - const destRes = state.md.helpers.parseLinkDestination(str, pos2, max2); + const destRes = state.md.helpers.parseLinkDestination(str2, pos2, max2); if (!destRes.ok) { return false; } @@ -12316,12 +12316,12 @@ var require_assets = __commonJS({ const destEndLineNo = nextLine; const start2 = pos2; for (; pos2 < max2; pos2++) { - const ch3 = str.charCodeAt(pos2); + const ch3 = str2.charCodeAt(pos2); if (ch3 === 10) { const lineContent = getNextLine(nextLine); if (lineContent !== null) { - str += lineContent; - max2 = str.length; + str2 += lineContent; + max2 = str2.length; nextLine++; } } else if (isSpace(ch3)) ; @@ -12329,15 +12329,15 @@ var require_assets = __commonJS({ break; } } - let titleRes = state.md.helpers.parseLinkTitle(str, pos2, max2); + let titleRes = state.md.helpers.parseLinkTitle(str2, pos2, max2); while (titleRes.can_continue) { const lineContent = getNextLine(nextLine); if (lineContent === null) break; - str += lineContent; + str2 += lineContent; pos2 = max2; - max2 = str.length; + max2 = str2.length; nextLine++; - titleRes = state.md.helpers.parseLinkTitle(str, pos2, max2, titleRes); + titleRes = state.md.helpers.parseLinkTitle(str2, pos2, max2, titleRes); } let title; if (pos2 < max2 && start2 !== pos2 && titleRes.ok) { @@ -12349,19 +12349,19 @@ var require_assets = __commonJS({ nextLine = destEndLineNo; } while (pos2 < max2) { - const ch3 = str.charCodeAt(pos2); + const ch3 = str2.charCodeAt(pos2); if (!isSpace(ch3)) { break; } pos2++; } - if (pos2 < max2 && str.charCodeAt(pos2) !== 10) { + if (pos2 < max2 && str2.charCodeAt(pos2) !== 10) { if (title) { title = ""; pos2 = destEndPos; nextLine = destEndLineNo; while (pos2 < max2) { - const ch3 = str.charCodeAt(pos2); + const ch3 = str2.charCodeAt(pos2); if (!isSpace(ch3)) { break; } @@ -12369,10 +12369,10 @@ var require_assets = __commonJS({ } } } - if (pos2 < max2 && str.charCodeAt(pos2) !== 10) { + if (pos2 < max2 && str2.charCodeAt(pos2) !== 10) { return false; } - const label = normalizeReference(str.slice(1, labelEnd)); + const label = normalizeReference(str2.slice(1, labelEnd)); if (!label) { return false; } @@ -12460,11 +12460,11 @@ var require_assets = __commonJS({ const attribute = "(?:\\s+" + attr_name + "(?:\\s*=\\s*" + attr_value + ")?)"; const open_tag = "<[A-Za-z][A-Za-z0-9\\-]*" + attribute + "*\\s*\\/?>"; const close_tag = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>"; - const comment = ""; + const comment$1 = ""; const processing = "<[?][\\s\\S]*?[?]>"; const declaration = "]*>"; const cdata = ""; - const HTML_TAG_RE = new RegExp("^(?:" + open_tag + "|" + close_tag + "|" + comment + "|" + processing + "|" + declaration + "|" + cdata + ")"); + const HTML_TAG_RE = new RegExp("^(?:" + open_tag + "|" + close_tag + "|" + comment$1 + "|" + processing + "|" + declaration + "|" + cdata + ")"); const HTML_OPEN_CLOSE_TAG_RE = new RegExp("^(?:" + open_tag + "|" + close_tag + ")"); const HTML_SEQUENCES = [ [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true], @@ -12523,7 +12523,7 @@ var require_assets = __commonJS({ token2.content = state.getLines(startLine, nextLine, state.blkIndent, true); return true; } - function heading(state, startLine, endLine, silent) { + function heading$1(state, startLine, endLine, silent) { let pos2 = state.bMarks[startLine] + state.tShift[startLine]; let max2 = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { @@ -12608,13 +12608,13 @@ var require_assets = __commonJS({ if (!level) { return false; } - const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); + const content2 = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); state.line = nextLine + 1; const token_o = state.push("heading_open", "h" + String(level), 1); token_o.markup = String.fromCharCode(marker); token_o.map = [startLine, state.line]; const token_i = state.push("inline", "", 0); - token_i.content = content; + token_i.content = content2; token_i.map = [startLine, state.line - 1]; token_i.children = []; const token_c = state.push("heading_close", "h" + String(level), -1); @@ -12645,12 +12645,12 @@ var require_assets = __commonJS({ break; } } - const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); + const content2 = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); state.line = nextLine; const token_o = state.push("paragraph_open", "p", 1); token_o.map = [startLine, state.line]; const token_i = state.push("inline", "", 0); - token_i.content = content; + token_i.content = content2; token_i.map = [startLine, state.line]; token_i.children = []; state.push("paragraph_close", "p", -1); @@ -12661,14 +12661,14 @@ var require_assets = __commonJS({ // First 2 params - rule name & source. Secondary array - list of rules, // which can be terminated by this one. ["table", table, ["paragraph", "reference"]], - ["code", code], + ["code", code$1], ["fence", fence, ["paragraph", "reference", "blockquote", "list"]], ["blockquote", blockquote, ["paragraph", "reference", "blockquote", "list"]], ["hr", hr, ["paragraph", "reference", "blockquote", "list"]], ["list", list, ["paragraph", "reference", "blockquote"]], ["reference", reference], ["html_block", html_block, ["paragraph", "reference", "blockquote"]], - ["heading", heading, ["paragraph", "reference", "blockquote"]], + ["heading", heading$1, ["paragraph", "reference", "blockquote"]], ["lheading", lheading], ["paragraph", paragraph] ]; @@ -13283,7 +13283,7 @@ var require_assets = __commonJS({ return true; } function image(state, silent) { - let code2, content, label, pos2, ref, res, title, start2; + let code2, content2, label, pos2, ref, res, title, start2; let href = ""; const oldPos = state.pos; const max2 = state.posMax; @@ -13372,10 +13372,10 @@ var require_assets = __commonJS({ title = ref.title; } if (!silent) { - content = state.src.slice(labelStart, labelEnd); + content2 = state.src.slice(labelStart, labelEnd); const tokens = []; state.md.inline.parse( - content, + content2, state.md, state.env, tokens @@ -13384,7 +13384,7 @@ var require_assets = __commonJS({ const attrs = [["src", href], ["alt", ""]]; token2.attrs = attrs; token2.children = tokens; - token2.content = content; + token2.content = content2; if (title) { attrs.push(["title", title]); } @@ -13449,11 +13449,11 @@ var require_assets = __commonJS({ } return false; } - function isLinkOpen(str) { - return /^\s]/i.test(str); + function isLinkOpen(str2) { + return /^\s]/i.test(str2); } - function isLinkClose(str) { - return /^<\/a\s*>/i.test(str); + function isLinkClose(str2) { + return /^<\/a\s*>/i.test(str2); } function isLetter(ch3) { const lc = ch3 | 32; @@ -13499,7 +13499,7 @@ var require_assets = __commonJS({ if (!silent) { const code2 = match[1][0].toLowerCase() === "x" ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10); const token2 = state.push("text_special", "", 0); - token2.content = isValidEntityCode(code2) ? fromCodePoint(code2) : fromCodePoint(65533); + token2.content = isValidEntityCode(code2) ? fromCodePoint$1(code2) : fromCodePoint$1(65533); token2.markup = match[0]; token2.info = "entity"; } @@ -13702,8 +13702,8 @@ var require_assets = __commonJS({ state.pushPending(); } }; - ParserInline.prototype.parse = function(str, md, env, outTokens) { - const state = new this.State(str, md, env, outTokens); + ParserInline.prototype.parse = function(str2, md, env, outTokens) { + const state = new this.State(str2, md, env, outTokens); this.tokenize(state); const rules = this.ruler2.getRules(""); const len = rules.length; @@ -13779,8 +13779,8 @@ var require_assets = __commonJS({ function isFunction(obj) { return _class(obj) === "[object Function]"; } - function escapeRE(str) { - return str.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&"); + function escapeRE(str2) { + return str2.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&"); } const defaultOptions = { fuzzyLink: true, @@ -13887,38 +13887,38 @@ var require_assets = __commonJS({ re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), "i"); const aliases = []; self2.__compiled__ = {}; - function schemaError(name, val) { - throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val); + function schemaError(name2, val) { + throw new Error('(LinkifyIt) Invalid schema "' + name2 + '": ' + val); } - Object.keys(self2.__schemas__).forEach(function(name) { - const val = self2.__schemas__[name]; + Object.keys(self2.__schemas__).forEach(function(name2) { + const val = self2.__schemas__[name2]; if (val === null) { return; } const compiled = { validate: null, link: null }; - self2.__compiled__[name] = compiled; + self2.__compiled__[name2] = compiled; if (isObject(val)) { if (isRegExp(val.validate)) { compiled.validate = createValidator(val.validate); } else if (isFunction(val.validate)) { compiled.validate = val.validate; } else { - schemaError(name, val); + schemaError(name2, val); } if (isFunction(val.normalize)) { compiled.normalize = val.normalize; } else if (!val.normalize) { compiled.normalize = createNormalizer(); } else { - schemaError(name, val); + schemaError(name2, val); } return; } if (isString(val)) { - aliases.push(name); + aliases.push(name2); return; } - schemaError(name, val); + schemaError(name2, val); }); aliases.forEach(function(alias) { if (!self2.__compiled__[self2.__schemas__[alias]]) { @@ -13928,8 +13928,8 @@ var require_assets = __commonJS({ self2.__compiled__[alias].normalize = self2.__compiled__[self2.__schemas__[alias]].normalize; }); self2.__compiled__[""] = { validate: null, normalize: createNormalizer() }; - const slist = Object.keys(self2.__compiled__).filter(function(name) { - return name.length > 0 && self2.__compiled__[name]; + const slist = Object.keys(self2.__compiled__).filter(function(name2) { + return name2.length > 0 && self2.__compiled__[name2]; }).map(escapeRE).join("|"); self2.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + re.src_ZPCc + "))(" + slist + ")", "i"); self2.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + re.src_ZPCc + "))(" + slist + ")", "ig"); @@ -13940,19 +13940,19 @@ var require_assets = __commonJS({ ); resetScanCache(self2); } - function Match$1(self2, shift) { + function Match$1(self2, shift2) { const start2 = self2.__index__; const end2 = self2.__last_index__; const text2 = self2.__text_cache__.slice(start2, end2); this.schema = self2.__schema__.toLowerCase(); - this.index = start2 + shift; - this.lastIndex = end2 + shift; + this.index = start2 + shift2; + this.lastIndex = end2 + shift2; this.raw = text2; this.text = text2; this.url = text2; } - function createMatch(self2, shift) { - const match = new Match$1(self2, shift); + function createMatch(self2, shift2) { + const match = new Match$1(self2, shift2); self2.__compiled__[match.schema].normalize(match, self2); return match; } @@ -13978,7 +13978,7 @@ var require_assets = __commonJS({ this.re = {}; compile(this); } - LinkifyIt.prototype.add = function add(schema, definition) { + LinkifyIt.prototype.add = function add2(schema, definition) { this.__schemas__[schema] = definition; compile(this); return this; @@ -13993,7 +13993,7 @@ var require_assets = __commonJS({ if (!text2.length) { return false; } - let m2, ml, me, len, shift, next, re, tld_pos, at_pos; + let m2, ml, me, len, shift2, next, re, tld_pos, at_pos; if (this.re.schema_test.test(text2)) { re = this.re.schema_search; re.lastIndex = 0; @@ -14012,10 +14012,10 @@ var require_assets = __commonJS({ if (tld_pos >= 0) { if (this.__index__ < 0 || tld_pos < this.__index__) { if ((ml = text2.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) { - shift = ml.index + ml[1].length; - if (this.__index__ < 0 || shift < this.__index__) { + shift2 = ml.index + ml[1].length; + if (this.__index__ < 0 || shift2 < this.__index__) { this.__schema__ = ""; - this.__index__ = shift; + this.__index__ = shift2; this.__last_index__ = ml.index + ml[0].length; } } @@ -14026,11 +14026,11 @@ var require_assets = __commonJS({ at_pos = text2.indexOf("@"); if (at_pos >= 0) { if ((me = text2.match(this.re.email_fuzzy)) !== null) { - shift = me.index + me[1].length; + shift2 = me.index + me[1].length; next = me.index + me[0].length; - if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) { + if (this.__index__ < 0 || shift2 < this.__index__ || shift2 === this.__index__ && next > this.__last_index__) { this.__schema__ = "mailto:"; - this.__index__ = shift; + this.__index__ = shift2; this.__last_index__ = next; } } @@ -14049,16 +14049,16 @@ var require_assets = __commonJS({ }; LinkifyIt.prototype.match = function match(text2) { const result = []; - let shift = 0; + let shift2 = 0; if (this.__index__ >= 0 && this.__text_cache__ === text2) { - result.push(createMatch(this, shift)); - shift = this.__last_index__; + result.push(createMatch(this, shift2)); + shift2 = this.__last_index__; } - let tail = shift ? text2.slice(shift) : text2; + let tail = shift2 ? text2.slice(shift2) : text2; while (this.test(tail)) { - result.push(createMatch(this, shift)); + result.push(createMatch(this, shift2)); tail = tail.slice(this.__last_index__); - shift += this.__last_index__; + shift2 += this.__last_index__; } if (result.length) { return result; @@ -14086,8 +14086,8 @@ var require_assets = __commonJS({ compile(this); return this; } - this.__tlds__ = this.__tlds__.concat(list2).sort().filter(function(el, idx, arr) { - return el !== arr[idx - 1]; + this.__tlds__ = this.__tlds__.concat(list2).sort().filter(function(el, idx, arr2) { + return el !== arr2[idx - 1]; }).reverse(); compile(this); return this; @@ -14103,7 +14103,7 @@ var require_assets = __commonJS({ LinkifyIt.prototype.onCompile = function onCompile() { }; const maxInt = 2147483647; - const base = 36; + const base$1 = 36; const tMin = 1; const tMax = 26; const skew = 38; @@ -14119,7 +14119,7 @@ var require_assets = __commonJS({ "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }; - const baseMinusTMin = base - tMin; + const baseMinusTMin = base$1 - tMin; const floor = Math.floor; const stringFromCharCode = String.fromCharCode; function error(type) { @@ -14145,14 +14145,14 @@ var require_assets = __commonJS({ const encoded = map(labels, callback).join("."); return result + encoded; } - function ucs2decode(string) { + function ucs2decode(string2) { const output = []; let counter = 0; - const length = string.length; + const length = string2.length; while (counter < length) { - const value = string.charCodeAt(counter++); + const value = string2.charCodeAt(counter++); if (value >= 55296 && value <= 56319 && counter < length) { - const extra = string.charCodeAt(counter++); + const extra = string2.charCodeAt(counter++); if ((extra & 64512) == 56320) { output.push(((value & 1023) << 10) + (extra & 1023) + 65536); } else { @@ -14176,7 +14176,7 @@ var require_assets = __commonJS({ if (codePoint >= 97 && codePoint < 123) { return codePoint - 97; } - return base; + return base$1; }; const digitToBasic = function(digit, flag) { return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); @@ -14185,7 +14185,7 @@ var require_assets = __commonJS({ let k2 = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); - for (; delta > baseMinusTMin * tMax >> 1; k2 += base) { + for (; delta > baseMinusTMin * tMax >> 1; k2 += base$1) { delta = floor(delta / baseMinusTMin); } return floor(k2 + (baseMinusTMin + 1) * delta / (delta + skew)); @@ -14208,12 +14208,12 @@ var require_assets = __commonJS({ } for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { const oldi = i2; - for (let w2 = 1, k2 = base; ; k2 += base) { + for (let w2 = 1, k2 = base$1; ; k2 += base$1) { if (index >= inputLength) { error("invalid-input"); } const digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base) { + if (digit >= base$1) { error("invalid-input"); } if (digit > floor((maxInt - i2) / w2)) { @@ -14224,7 +14224,7 @@ var require_assets = __commonJS({ if (digit < t2) { break; } - const baseMinusT = base - t2; + const baseMinusT = base$1 - t2; if (w2 > floor(maxInt / baseMinusT)) { error("overflow"); } @@ -14277,13 +14277,13 @@ var require_assets = __commonJS({ } if (currentValue === n2) { let q2 = delta; - for (let k2 = base; ; k2 += base) { + for (let k2 = base$1; ; k2 += base$1) { const t2 = k2 <= bias ? tMin : k2 >= bias + tMax ? tMax : k2 - bias; if (q2 < t2) { break; } const qMinusT = q2 - t2; - const baseMinusT = base - t2; + const baseMinusT = base$1 - t2; output.push( stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0)) ); @@ -14301,13 +14301,13 @@ var require_assets = __commonJS({ return output.join(""); }; const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + return mapDomain(input, function(string2) { + return regexPunycode.test(string2) ? decode(string2.slice(4).toLowerCase()) : string2; }); }; const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) ? "xn--" + encode(string) : string; + return mapDomain(input, function(string2) { + return regexNonASCII.test(string2) ? "xn--" + encode(string2) : string2; }); }; const punycode = { @@ -14509,8 +14509,8 @@ var require_assets = __commonJS({ const BAD_PROTO_RE = /^(vbscript|javascript|file|data):/; const GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/; function validateLink(url) { - const str = url.trim().toLowerCase(); - return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true; + const str2 = url.trim().toLowerCase(); + return BAD_PROTO_RE.test(str2) ? GOOD_DATA_RE.test(str2) : true; } const RECODE_HOSTNAME_FOR = ["http:", "https:", "mailto:"]; function normalizeLink(url) { @@ -14583,12 +14583,12 @@ var require_assets = __commonJS({ self2.set(presets.options); } if (presets.components) { - Object.keys(presets.components).forEach(function(name) { - if (presets.components[name].rules) { - self2[name].ruler.enableOnly(presets.components[name].rules); + Object.keys(presets.components).forEach(function(name2) { + if (presets.components[name2].rules) { + self2[name2].ruler.enableOnly(presets.components[name2].rules); } - if (presets.components[name].rules2) { - self2[name].ruler2.enableOnly(presets.components[name].rules2); + if (presets.components[name2].rules2) { + self2[name2].ruler2.enableOnly(presets.components[name2].rules2); } }); } @@ -14603,8 +14603,8 @@ var require_assets = __commonJS({ result = result.concat(this[chain].ruler.enable(list2, true)); }, this); result = result.concat(this.inline.ruler2.enable(list2, true)); - const missed = list2.filter(function(name) { - return result.indexOf(name) < 0; + const missed = list2.filter(function(name2) { + return result.indexOf(name2) < 0; }); if (missed.length && !ignoreInvalid) { throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + missed); @@ -14620,8 +14620,8 @@ var require_assets = __commonJS({ result = result.concat(this[chain].ruler.disable(list2, true)); }, this); result = result.concat(this.inline.ruler2.disable(list2, true)); - const missed = list2.filter(function(name) { - return result.indexOf(name) < 0; + const missed = list2.filter(function(name2) { + return result.indexOf(name2) < 0; }); if (missed.length && !ignoreInvalid) { throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + missed); @@ -14701,8 +14701,8 @@ var require_assets = __commonJS({ txt = txt.replaceAll("(close:767A125E)", "]"); return txt; }; - const escape$1 = (content) => { - return content.replace(/[<>&'"]/g, function(c2) { + const escape$1 = (content2) => { + return content2.replace(/[<>&'"]/g, function(c2) { switch (c2) { case "<": return "<"; @@ -14717,7 +14717,7 @@ var require_assets = __commonJS({ } }); }; - function unescapeCodeHtmlEntities(str) { + function unescapeCodeHtmlEntities(str2) { const htmlEntities = { "<": "<", ">": ">", @@ -14725,10 +14725,10 @@ var require_assets = __commonJS({ "\": "\\", """: '"' }; - return str.replace( + return str2.replace( /(]*>)([\s\S]*?)(<\/code>)/gi, - function(match, starttag, content, endtag) { - return starttag + content.replace( + function(match, starttag, content2, endtag) { + return starttag + content2.replace( /&(?:amp|lt|gt|quot|#39|#x2F|#x5C|#96);/g, function(entity2) { return htmlEntities[entity2] || entity2; @@ -14741,11 +14741,11 @@ var require_assets = __commonJS({ (function(module2) { (function() { const createBuffer = (val) => new TextEncoder().encode(val); - function MurmurHashV2(str, seed) { - if (typeof str === "string") str = createBuffer(str); - let l2 = str.length, h2 = seed ^ l2, i2 = 0, k2; + function MurmurHashV2(str2, seed) { + if (typeof str2 === "string") str2 = createBuffer(str2); + let l2 = str2.length, h2 = seed ^ l2, i2 = 0, k2; while (l2 >= 4) { - k2 = str[i2] & 255 | (str[++i2] & 255) << 8 | (str[++i2] & 255) << 16 | (str[++i2] & 255) << 24; + k2 = str2[i2] & 255 | (str2[++i2] & 255) << 8 | (str2[++i2] & 255) << 16 | (str2[++i2] & 255) << 24; k2 = (k2 & 65535) * 1540483477 + (((k2 >>> 16) * 1540483477 & 65535) << 16); k2 ^= k2 >>> 24; k2 = (k2 & 65535) * 1540483477 + (((k2 >>> 16) * 1540483477 & 65535) << 16); @@ -14755,11 +14755,11 @@ var require_assets = __commonJS({ } switch (l2) { case 3: - h2 ^= (str[i2 + 2] & 255) << 16; + h2 ^= (str2[i2 + 2] & 255) << 16; case 2: - h2 ^= (str[i2 + 1] & 255) << 8; + h2 ^= (str2[i2 + 1] & 255) << 8; case 1: - h2 ^= str[i2] & 255; + h2 ^= str2[i2] & 255; h2 = (h2 & 65535) * 1540483477 + (((h2 >>> 16) * 1540483477 & 65535) << 16); } h2 ^= h2 >>> 13; @@ -15100,9 +15100,9 @@ var require_assets = __commonJS({ "punctuation", "number" ]; - var inside = insideString.variable[1].inside; + var inside2 = insideString.variable[1].inside; for (var i2 = 0; i2 < toBeCopied.length; i2++) { - inside[toBeCopied[i2]] = Prism2.languages.bash[toBeCopied[i2]]; + inside2[toBeCopied[i2]] = Prism2.languages.bash[toBeCopied[i2]]; } Prism2.languages.sh = Prism2.languages.bash; Prism2.languages.shell = Prism2.languages.bash; @@ -15502,19 +15502,19 @@ var require_assets = __commonJS({ }; const MessageContent = ({ contents }) => { if (Array.isArray(contents)) { - return contents.map((content, index) => { - if (typeof content === "string") { + return contents.map((content2, index) => { + if (typeof content2 === "string") { return messageRenderers["text"].render({ - text: content, + text: content2, index: index === contents.length - 1 }); } else { - if (content) { - const renderer = messageRenderers[content.type]; + if (content2) { + const renderer = messageRenderers[content2.type]; if (renderer) { - return renderer.render(content, index === contents.length - 1); + return renderer.render(content2, index === contents.length - 1); } else { - console.error(`Unknown message content type '${content.type}'`); + console.error(`Unknown message content type '${content2.type}'`); } } } @@ -15525,25 +15525,25 @@ var require_assets = __commonJS({ }; const messageRenderers = { text: { - render: (content, isLast) => { + render: (content2, isLast) => { return m$1`<${MarkdownDiv} - markdown=${content.text} + markdown=${content2.text} class=${isLast ? "no-last-para-padding" : ""} />`; } }, image: { - render: (content) => { - if (content.image.startsWith("data:")) { + render: (content2) => { + if (content2.image.startsWith("data:")) { return m$1``; } else { - return m$1`${content.image}`; + return m$1`${content2.image}`; } } }, @@ -15568,8 +15568,8 @@ var require_assets = __commonJS({ } }, tool: { - render: (content) => { - return m$1`<${ToolOutput} output=${content.content} />`; + render: (content2) => { + return m$1`<${ToolOutput} output=${content2.content} />`; } } }; @@ -15670,14 +15670,14 @@ var require_assets = __commonJS({ `; return result; }; - const normalizeContent = (content) => { - if (typeof content === "string") { + const normalizeContent = (content2) => { + if (typeof content2 === "string") { return { type: "text", - text: content + text: content2 }; } else { - return content; + return content2; } }; const ChatMessage = ({ @@ -15785,29 +15785,29 @@ var require_assets = __commonJS({ if (!toolMessage) { return void 0; } - const content = toolMessage.error !== null && toolMessage.error ? toolMessage.error.message : toolMessage.content; - if (typeof content === "string") { + const content2 = toolMessage.error !== null && toolMessage.error ? toolMessage.error.message : toolMessage.content; + if (typeof content2 === "string") { return [ { type: "tool", - content + content: content2 } ]; } else { - return content.map((con) => { - if (typeof content === "string") { + return content2.map((con) => { + if (typeof content2 === "string") { return { type: "tool", - content + content: content2 }; } else if (con.type === "text") { return { - content, + content: content2, type: "tool" }; } else if (con.type === "image") { return { - content, + content: content2, type: "tool" }; } @@ -15839,9 +15839,9 @@ var require_assets = __commonJS({ `; }; - const navPills = children2.map((nav, idx) => { + const navPills = children2.map((nav2, idx) => { var _a2; - const title = typeof nav === "object" ? ((_a2 = nav["props"]) == null ? void 0 : _a2.title) || `Tab ${idx}` : `Tab ${idx}`; + const title = typeof nav2 === "object" ? ((_a2 = nav2["props"]) == null ? void 0 : _a2.title) || `Tab ${idx}` : `Tab ${idx}`; return m$1`<${NavPill} title=${title} activeItem=${activeItem} @@ -15976,12 +15976,12 @@ var require_assets = __commonJS({ canRender: (entry) => { const isArray = Array.isArray(entry.value); if (isArray) { - const types = new Set( + const types2 = new Set( entry.value.map((entry2) => { return typeof entry2; }) ); - return types.size === 1; + return types2.size === 1; } else { return false; } @@ -16202,13 +16202,13 @@ ${entry.value} { + const ScorerDetailView = ({ name: name2, scores, params }) => { if (scores.length > 1) { params["scores"] = scores; } return m$1`<${DetailStep} icon=${ApplicationIcons.scorer} - name=${name} + name=${name2} params=${params} style=${planItemStyle} />`; @@ -16247,11 +16247,11 @@ ${entry.value}`; }; - const DetailStep = ({ icon, name, params, style: style2 }) => { + const DetailStep = ({ icon, name: name2, params, style: style2 }) => { const iconHtml = icon ? m$1`` : ""; return m$1`
- ${iconHtml} ${name} + ${iconHtml} ${name2}
` }); if (scores) { - const scorers = scores.reduce((accum, score) => { - if (!accum[score.scorer]) { - accum[score.scorer] = { - scores: [score.name], - params: score.params + const scorers = scores.reduce((accum, score2) => { + if (!accum[score2.scorer]) { + accum[score2.scorer] = { + scores: [score2.name], + params: score2.params }; } else { - accum[score.scorer].scores.push(score.name); + accum[score2.scorer].scores.push(score2.name); } return accum; }, {}); @@ -16740,9 +16740,9 @@ ${entry.value} { - return m$1`
${score.name}
-
${score.rendered()}
`; + const rows = scores.map((score2) => { + return m$1`
${score2.name}
+
${score2.rendered()}
`; }); return m$1`
- ${navs.map((nav, index) => { + ${navs.map((nav2, index) => { return m$1`<${EventNav} active=${index === 0} - id=${nav.id} - target=${nav.target} - title=${nav.title} + id=${nav2.id} + target=${nav2.target} + title=${nav2.title} selectedNav=${selectedNav} setSelectedNav=${setSelectedNav} />`; @@ -17928,7 +17928,7 @@ ${entry.value} { disposer = dispose2; - element === document ? code2() : insert(element, code2(), element.firstChild ? null : void 0, init); + element === document ? code2() : insert$1(element, code2(), element.firstChild ? null : void 0, init); }, options.owner); return () => { disposer(); @@ -17944,26 +17944,26 @@ ${entry.value} fn(element, arg)); } - function insert(parent, accessor, marker, initial) { + function insert$1(parent, accessor, marker, initial) { if (marker !== void 0 && !initial) initial = []; if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker); createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial); @@ -18135,9 +18135,9 @@ ${entry.value}= 0; i2--) { const el = current[i2]; if (node !== el) { - const isParent = el.parentNode === parent; - if (!inserted && !i2) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker); - else isParent && el.remove(); + const isParent2 = el.parentNode === parent; + if (!inserted && !i2) isParent2 ? parent.replaceChild(node, el) : parent.insertBefore(node, marker); + else isParent2 && el.remove(); } else inserted = true; } } else parent.insertBefore(node, marker); @@ -18206,9 +18206,9 @@ ${entry.value} 0) { - return `Function(${name})`; + const name2 = val.name; + if (typeof name2 == "string" && name2.length > 0) { + return `Function(${name2})`; } else { return "Function"; } @@ -18529,13 +18529,13 @@ ${val.stack}`; function getBase64Code(charCode) { return base64codes[charCode - 43]; } - function base64_decode(str) { - let missingOctets = str.endsWith("==") ? 2 : str.endsWith("=") ? 1 : 0; - let n2 = str.length; + function base64_decode(str2) { + let missingOctets = str2.endsWith("==") ? 2 : str2.endsWith("=") ? 1 : 0; + let n2 = str2.length; let result = new Uint8Array(3 * (n2 / 4)); let buffer2; for (let i2 = 0, j2 = 0; i2 < n2; i2 += 4, j2 += 3) { - buffer2 = getBase64Code(str.charCodeAt(i2)) << 18 | getBase64Code(str.charCodeAt(i2 + 1)) << 12 | getBase64Code(str.charCodeAt(i2 + 2)) << 6 | getBase64Code(str.charCodeAt(i2 + 3)); + buffer2 = getBase64Code(str2.charCodeAt(i2)) << 18 | getBase64Code(str2.charCodeAt(i2 + 1)) << 12 | getBase64Code(str2.charCodeAt(i2 + 2)) << 6 | getBase64Code(str2.charCodeAt(i2 + 3)); result[j2] = buffer2 >> 16; result[j2 + 1] = buffer2 >> 8 & 255; result[j2 + 2] = buffer2 & 255; @@ -18994,11 +18994,11 @@ ${val.stack}`; return performance.now() * this.speed; } async initializeDriver() { - const meta = await this.driver.init(); - this.cols = this.cols ?? meta.cols ?? 80; - this.rows = this.rows ?? meta.rows ?? 24; - this.duration = this.duration ?? meta.duration; - this.markers = this.normalizeMarkers(meta.markers) ?? this.markers ?? []; + const meta2 = await this.driver.init(); + this.cols = this.cols ?? meta2.cols ?? 80; + this.rows = this.rows ?? meta2.rows ?? 24; + this.duration = this.duration ?? meta2.duration; + this.markers = this.normalizeMarkers(meta2.markers) ?? this.markers ?? []; if (this.cols === 0) { this.cols = 80; } @@ -19006,19 +19006,19 @@ ${val.stack}`; this.rows = 24; } this.initializeVt(this.cols, this.rows); - const poster = meta.poster !== void 0 ? this.renderPoster(meta.poster) : void 0; + const poster = meta2.poster !== void 0 ? this.renderPoster(meta2.poster) : void 0; this.dispatchEvent("init", { cols: this.cols, rows: this.rows, duration: this.duration, markers: this.markers, - theme: meta.theme, + theme: meta2.theme, poster }); } resetVt(cols, rows) { let init = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0; - let theme = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0; + let theme2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0; this.cols = cols; this.rows = rows; this.cursor = void 0; @@ -19029,7 +19029,7 @@ ${val.stack}`; this.dispatchEvent("reset", { cols, rows, - theme + theme: theme2 }); } initializeVt(cols, rows) { @@ -19083,7 +19083,7 @@ ${val.stack}`; } } const $RAW = Symbol("store-raw"), $NODE = Symbol("store-node"), $NAME = Symbol("store-name"); - function wrap$1(value, name) { + function wrap$1(value, name2) { let p2 = value[$PROXY]; if (!p2) { Object.defineProperty(value, $PROXY, { @@ -19108,7 +19108,7 @@ ${val.stack}`; let proto; return obj != null && typeof obj === "object" && (obj[$PROXY] || !(proto = Object.getPrototypeOf(obj)) || proto === Object.prototype || Array.isArray(obj)); } - function unwrap(item, set = /* @__PURE__ */ new Set()) { + function unwrap$1(item, set = /* @__PURE__ */ new Set()) { let result, unwrapped, v2, prop; if (result = item != null && item[$RAW]) return result; if (!isWrappable(item) || set.has(item)) return item; @@ -19117,7 +19117,7 @@ ${val.stack}`; else set.add(item); for (let i2 = 0, l2 = item.length; i2 < l2; i2++) { v2 = item[i2]; - if ((unwrapped = unwrap(v2, set)) !== v2) item[i2] = unwrapped; + if ((unwrapped = unwrap$1(v2, set)) !== v2) item[i2] = unwrapped; } } else { if (Object.isFrozen(item)) item = Object.assign({}, item); @@ -19127,7 +19127,7 @@ ${val.stack}`; prop = keys[i2]; if (desc[prop].get) continue; v2 = item[prop]; - if ((unwrapped = unwrap(v2, set)) !== v2) item[prop] = unwrapped; + if ((unwrapped = unwrap$1(v2, set)) !== v2) item[prop] = unwrapped; } } return item; @@ -19219,7 +19219,7 @@ ${val.stack}`; } function updateArray(current, next) { if (typeof next === "function") next = next(current); - next = unwrap(next); + next = unwrap$1(next); if (Array.isArray(next)) { if (current === next) return; let i2 = 0, len = next.length; @@ -19268,13 +19268,13 @@ ${val.stack}`; if (value === prev) return; } if (part === void 0 && value == void 0) return; - value = unwrap(value); + value = unwrap$1(value); if (part === void 0 || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) { mergeStoreNode(prev, value); } else setProperty(current, part, value); } function createStore(...[store, options]) { - const unwrappedStore = unwrap(store || {}); + const unwrappedStore = unwrap$1(store || {}); const isArray = Array.isArray(unwrappedStore); const wrappedStore = wrap$1(unwrappedStore); function setStore(...args) { @@ -19359,7 +19359,7 @@ ${val.stack}`; const { merge, key: key2 = "id" - } = options, v2 = unwrap(value); + } = options, v2 = unwrap$1(value); return (state) => { if (!isWrappable(state) || !isWrappable(v2)) return v2; const res = applyState(v2, { @@ -19383,7 +19383,7 @@ ${val.stack}`; const className$1 = createMemo(() => buildClassName(props.pen, codePoint(), props.extraClass)); return (() => { const _el$ = _tmpl$$9.cloneNode(true); - insert(_el$, text2); + insert$1(_el$, text2); createRenderEffect((_p$) => { const _v$ = className$1(), _v$2 = style$1(); _v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$); @@ -19453,7 +19453,7 @@ ${val.stack}`; return style2; } const _tmpl$$8 = /* @__PURE__ */ template(``); - var Line = (props) => { + var Line$1 = (props) => { const segments = () => { if (typeof props.cursor === "number") { const segs = []; @@ -19501,7 +19501,7 @@ ${val.stack}`; }; return (() => { const _el$ = _tmpl$$8.cloneNode(true); - insert(_el$, createComponent(Index, { + insert$1(_el$, createComponent(Index, { get each() { return segments(); }, @@ -19535,11 +19535,11 @@ ${val.stack}`; const _el$ = _tmpl$$7.cloneNode(true); const _ref$ = props.ref; typeof _ref$ === "function" ? use(_ref$, _el$) : props.ref = _el$; - insert(_el$, createComponent(For, { + insert$1(_el$, createComponent(For, { get each() { return props.lines; }, - children: (line2, i2) => createComponent(Line, { + children: (line2, i2) => createComponent(Line$1, { get segments() { return line2.segments; }, @@ -19645,14 +19645,14 @@ ${val.stack}`; const _el$ = _tmpl$5.cloneNode(true), _el$5 = _el$.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$12 = _el$5.nextSibling; const _ref$ = props.ref; typeof _ref$ === "function" ? use(_ref$, _el$) : props.ref = _el$; - insert(_el$, createComponent(Show, { + insert$1(_el$, createComponent(Show, { get when() { return props.isPausable; }, get children() { const _el$2 = _tmpl$3.cloneNode(true); addEventListener(_el$2, "click", e2(props.onPlayClick)); - insert(_el$2, createComponent(Switch, { + insert$1(_el$2, createComponent(Switch, { get children() { return [createComponent(Match, { get when() { @@ -19674,9 +19674,9 @@ ${val.stack}`; return _el$2; } }), _el$5); - insert(_el$6, currentTime); - insert(_el$7, remainingTime); - insert(_el$, createComponent(Show, { + insert$1(_el$6, currentTime); + insert$1(_el$7, remainingTime); + insert$1(_el$, createComponent(Show, { get when() { return typeof props.progress === "number" || props.isSeekable; }, @@ -19684,7 +19684,7 @@ ${val.stack}`; const _el$8 = _tmpl$4.cloneNode(true), _el$9 = _el$8.firstChild, _el$10 = _el$9.firstChild, _el$11 = _el$10.nextSibling; _el$9.$$mousemove = onMove; _el$9.$$mousedown = onMouseDown; - insert(_el$9, createComponent(For, { + insert$1(_el$9, createComponent(For, { get each() { return markers(); }, @@ -19694,7 +19694,7 @@ ${val.stack}`; e3._marker = true; }; addEventListener(_el$13, "click", seekToMarker(i2())); - insert(_el$15, () => markerText(m2)); + insert$1(_el$15, () => markerText(m2)); createRenderEffect((_p$) => { const _v$ = markerPosition(m2), _v$2 = !!isPastMarker(m2); _v$ !== _p$._v$ && _el$13.style.setProperty("left", _p$._v$ = _v$); @@ -19734,7 +19734,7 @@ ${val.stack}`; }; return (() => { const _el$ = _tmpl$$3.cloneNode(true), _el$2 = _el$.firstChild; - insert(_el$2, () => props.message); + insert$1(_el$2, () => props.message); createRenderEffect((_$p) => style(_el$2, style$1(), _$p)); return _el$; })(); @@ -19860,7 +19860,7 @@ ${val.stack}`; cols, rows, duration: duration2, - theme: theme2, + theme: theme3, poster, markers: markers2 } = _ref; @@ -19870,7 +19870,7 @@ ${val.stack}`; rows }); setDuration(duration2); - setOriginalTheme(theme2); + setOriginalTheme(theme3); setMarkers(markers2); setPoster(poster); }); @@ -19932,14 +19932,14 @@ ${val.stack}`; let { cols, rows, - theme: theme2 + theme: theme3 } = _ref4; batch(() => { resize({ cols, rows }); - setOriginalTheme(theme2); + setOriginalTheme(theme3); updateTerminal(); }); }); @@ -20153,16 +20153,16 @@ ${val.stack}`; } setUserActive(show); }; - const theme = createMemo(() => { - const name = props.theme || "auto/asciinema"; - if (name.slice(0, 5) === "auto/") { + const theme2 = createMemo(() => { + const name2 = props.theme || "auto/asciinema"; + if (name2.slice(0, 5) === "auto/") { return { - name: name.slice(5), + name: name2.slice(5), colors: originalTheme() }; } else { return { - name + name: name2 }; } }); @@ -20184,7 +20184,7 @@ ${val.stack}`; style2["width"] = `${size.width}px`; style2["height"] = `${size.height}px`; } - const themeColors = theme().colors; + const themeColors = theme2().colors; if (themeColors !== void 0) { style2["--term-color-foreground"] = themeColors.foreground; style2["--term-color-background"] = themeColors.background; @@ -20194,7 +20194,7 @@ ${val.stack}`; } return style2; }; - const playerClass = () => `ap-player asciinema-player-theme-${theme().name}`; + const playerClass = () => `ap-player asciinema-player-theme-${theme2().name}`; const terminalScale = () => { var _a2; return (_a2 = terminalElementSize()) == null ? void 0 : _a2.scale; @@ -20211,7 +20211,7 @@ ${val.stack}`; typeof _ref$2 === "function" ? use(_ref$2, _el$2) : playerRef = _el$2; _el$2.$$mousemove = () => onUserActive(true); _el$2.addEventListener("mouseleave", playerOnMouseLeave); - insert(_el$2, createComponent(Terminal, { + insert$1(_el$2, createComponent(Terminal, { get cols() { return terminalCols(); }, @@ -20244,7 +20244,7 @@ ${val.stack}`; typeof _ref$3 === "function" ? _ref$3(r$) : terminalRef = r$; } }), null); - insert(_el$2, createComponent(Show, { + insert$1(_el$2, createComponent(Show, { get when() { return props.controls !== false; }, @@ -20282,7 +20282,7 @@ ${val.stack}`; }); } }), null); - insert(_el$2, createComponent(Switch, { + insert$1(_el$2, createComponent(Switch, { get children() { return [createComponent(Match, { get when() { @@ -20324,7 +20324,7 @@ ${val.stack}`; })]; } }), null); - insert(_el$2, createComponent(Show, { + insert$1(_el$2, createComponent(Show, { get when() { return isHelpVisible(); }, @@ -20662,12 +20662,12 @@ ${val.stack}`; idleTimeLimit: header.idle_time_limit }; } - function parseTheme(theme) { + function parseTheme(theme2) { const colorRegex = /^#[0-9A-Fa-f]{6}$/; const paletteRegex = /^(#[0-9A-Fa-f]{6}:){7,}#[0-9A-Fa-f]{6}$/; - const fg = theme == null ? void 0 : theme.fg; - const bg = theme == null ? void 0 : theme.bg; - const palette = theme == null ? void 0 : theme.palette; + const fg = theme2 == null ? void 0 : theme2.fg; + const bg = theme2 == null ? void 0 : theme2.bg; + const palette = theme2 == null ? void 0 : theme2.palette; if (colorRegex.test(fg) && colorRegex.test(bg) && paletteRegex.test(palette)) { return { foreground: fg, @@ -20721,13 +20721,13 @@ ${events} let playCount = 0; async function init() { const { - parser, + parser: parser2, minFrameTime, inputOffset, dumpFilename, encoding = "utf-8" } = src; - const recording2 = prepare(await parser(await doFetch(src), { + const recording2 = prepare(await parser2(await doFetch(src), { encoding }), logger, { idleTimeLimit, @@ -21103,18 +21103,18 @@ ${events} } function timeLimiter(idleTimeLimit, startAt, output) { let prevT = 0; - let shift = 0; + let shift2 = 0; return function(e2) { const delay = e2[0] - prevT; const delta = delay - idleTimeLimit; prevT = e2[0]; if (delta > 0) { - shift += delta; + shift2 += delta; if (e2[0] < startAt) { output.offset += delta; } } - return [e2[0] - shift, e2[1], e2[2]]; + return [e2[0] - shift2, e2[1], e2[2]]; }; } function markerWrapper() { @@ -21500,10 +21500,10 @@ ${events} }; } function min(numbers) { - return numbers.reduce((prev, cur) => cur < prev ? cur : prev); + return numbers.reduce((prev, cur2) => cur2 < prev ? cur2 : prev); } function max$1(numbers) { - return numbers.reduce((prev, cur) => cur > prev ? cur : prev); + return numbers.reduce((prev, cur2) => cur2 > prev ? cur2 : prev); } function exponentialDelay(attempt) { return Math.min(500 * Math.pow(2, attempt), 5e3); @@ -21541,19 +21541,19 @@ ${events} socket.onmessage = handleJsonMessage; handleJsonMessage(event); } else { - const arr = new Uint8Array(event.data); - if (arr[0] == 65 && arr[1] == 76 && arr[2] == 105 && arr[3] == 83) { - if (arr[4] == 1) { + const arr2 = new Uint8Array(event.data); + if (arr2[0] == 65 && arr2[1] == 76 && arr2[2] == 105 && arr2[3] == 83) { + if (arr2[4] == 1) { logger.info("activating ALiS v1 handler"); socket.onmessage = handleStreamMessage; } else { - logger.warn(`unsupported ALiS version (${arr[4]})`); + logger.warn(`unsupported ALiS version (${arr2[4]})`); socket.close(); } } else { logger.info("activating raw text handler"); initBuffer(); - const text2 = utfDecoder.decode(arr); + const text2 = utfDecoder.decode(arr2); const size = sizeFromResizeSeq(text2) ?? sizeFromScriptStartMessage(text2); if (size !== void 0) { const [cols, rows] = size; @@ -21601,9 +21601,9 @@ ${events} offset2 += 4; const themeFormat = view.getUint8(offset2); offset2 += 1; - let theme; + let theme2; if (themeFormat === 1) { - theme = parseTheme2(new Uint8Array(buffer2, offset2, THEME_LEN)); + theme2 = parseTheme2(new Uint8Array(buffer2, offset2, THEME_LEN)); offset2 += THEME_LEN; } const initLen = view.getUint32(offset2, true); @@ -21613,7 +21613,7 @@ ${events} init = utfDecoder.decode(new Uint8Array(buffer2, offset2, initLen)); offset2 += initLen; } - handleResetMessage(cols, rows, time, init, theme); + handleResetMessage(cols, rows, time, init, theme2); } else if (type === 111) { const time = view.getFloat32(1, true); const len = view.getUint32(5, true); @@ -21630,12 +21630,12 @@ ${events} logger.debug(`unknown frame type: ${type}`); } } - function parseTheme2(arr) { - const foreground = hexColor(arr[0], arr[1], arr[2]); - const background = hexColor(arr[3], arr[4], arr[5]); + function parseTheme2(arr2) { + const foreground = hexColor(arr2[0], arr2[1], arr2[2]); + const background = hexColor(arr2[3], arr2[4], arr2[5]); const palette = []; for (let i2 = 0; i2 < 16; i2++) { - palette.push(hexColor(arr[i2 * 3 + 6], arr[i2 * 3 + 7], arr[i2 * 3 + 8])); + palette.push(hexColor(arr2[i2 * 3 + 6], arr2[i2 * 3 + 7], arr2[i2 * 3 + 8])); } return { foreground, @@ -21652,11 +21652,11 @@ ${events} function handleRawTextMessage(event) { buf.pushText(utfDecoder.decode(event.data)); } - function handleResetMessage(cols, rows, time, init, theme) { + function handleResetMessage(cols, rows, time, init, theme2) { logger.debug(`stream reset (${cols}x${rows} @${time})`); setState("playing"); initBuffer(time); - reset(cols, rows, init, theme); + reset(cols, rows, init, theme2); clock2 = new Clock(); wasOnline = true; if (typeof time === "number") { @@ -21952,8 +21952,8 @@ ${events} pause: () => core.pause(), seek: (pos2) => core.seek(pos2) }; - player.addEventListener = (name, callback) => { - return core.addEventListener(name, callback.bind(player)); + player.addEventListener = (name2, callback) => { + return core.addEventListener(name2, callback.bind(player)); }; return player; } @@ -22047,7 +22047,7 @@ ${events} speed, autoPlay, loop, - theme, + theme: theme2, idleTimeLimit = 2, style: style2 }) => { @@ -22064,7 +22064,7 @@ ${events} cols, autoPlay, loop, - theme, + theme: theme2, speed, idleTimeLimit, fit @@ -22541,17 +22541,17 @@ ${events} return this.selfOptions; } // eslint-disable-next-line @typescript-eslint/no-explicit-any - pipe(name, pipeArg) { + pipe(name2, pipeArg) { let pipe = pipeArg; - if (typeof name === "string") { + if (typeof name2 === "string") { if (typeof pipe === "undefined") { - return this.pipes[name]; + return this.pipes[name2]; } else { - this.pipes[name] = pipe; + this.pipes[name2] = pipe; } } - if (name && name.name) { - pipe = name; + if (name2 && name2.name) { + pipe = name2; if (pipe.processor === this) { return pipe; } @@ -22588,8 +22588,8 @@ ${events} } } class Pipe { - constructor(name) { - this.name = name; + constructor(name2) { + this.name = name2; this.filters = []; } process(input) { @@ -22693,10 +22693,10 @@ ${events} this.exiting = true; return this; } - push(child, name) { + push(child, name2) { child.parent = this; - if (typeof name !== "undefined") { - child.childName = name; + if (typeof name2 !== "undefined") { + child.childName = name2; } child.root = this.root || this; child.options = child.options || this.options; @@ -22733,9 +22733,9 @@ ${events} return cloneRegExp(arg); } const cloned = {}; - for (const name in arg) { - if (Object.prototype.hasOwnProperty.call(arg, name)) { - cloned[name] = clone(arg[name]); + for (const name2 in arg) { + if (Object.prototype.hasOwnProperty.call(arg, name2)) { + cloned[name2] = clone(arg[name2]); } } return cloned; @@ -22903,29 +22903,29 @@ ${events} } const left2 = context.left; const right2 = context.right; - let name; + let name2; let child; const propertyFilter = context.options.propertyFilter; - for (name in left2) { - if (!Object.prototype.hasOwnProperty.call(left2, name)) { + for (name2 in left2) { + if (!Object.prototype.hasOwnProperty.call(left2, name2)) { continue; } - if (propertyFilter && !propertyFilter(name, context)) { + if (propertyFilter && !propertyFilter(name2, context)) { continue; } - child = new DiffContext(left2[name], right2[name]); - context.push(child, name); + child = new DiffContext(left2[name2], right2[name2]); + context.push(child, name2); } - for (name in right2) { - if (!Object.prototype.hasOwnProperty.call(right2, name)) { + for (name2 in right2) { + if (!Object.prototype.hasOwnProperty.call(right2, name2)) { continue; } - if (propertyFilter && !propertyFilter(name, context)) { + if (propertyFilter && !propertyFilter(name2, context)) { continue; } - if (typeof left2[name] === "undefined") { - child = new DiffContext(void 0, right2[name]); - context.push(child, name); + if (typeof left2[name2] === "undefined") { + child = new DiffContext(void 0, right2[name2]); + context.push(child, name2); } } if (!context.children || context.children.length === 0) { @@ -22944,11 +22944,11 @@ ${events} return; } const objectDelta = nestedDelta; - let name; + let name2; let child; - for (name in objectDelta) { - child = new PatchContext(context.left[name], objectDelta[name]); - context.push(child, name); + for (name2 in objectDelta) { + child = new PatchContext(context.left[name2], objectDelta[name2]); + context.push(child, name2); } context.exit(); }; @@ -22985,11 +22985,11 @@ ${events} return; } const objectDelta = context.delta; - let name; + let name2; let child; - for (name in objectDelta) { - child = new ReverseContext(objectDelta[name]); - context.push(child, name); + for (name2 in objectDelta) { + child = new ReverseContext(objectDelta[name2]); + context.push(child, name2); } context.exit(); }; @@ -23237,12 +23237,12 @@ ${events} context.setResult(result).exit(); }; diffFilter$2.filterName = "arrays"; - const compare = { + const compare$1 = { numerically(a2, b2) { return a2 - b2; }, - numericallyBy(name) { - return (a2, b2) => a2[name] - b2[name]; + numericallyBy(name2) { + return (a2, b2) => a2[name2] - b2[name2]; } }; const patchFilter$1 = function nestedPatchFilter(context) { @@ -23285,7 +23285,7 @@ ${events} } } } - toRemove = toRemove.sort(compare.numerically); + toRemove = toRemove.sort(compare$1.numerically); for (index = toRemove.length - 1; index >= 0; index--) { index1 = toRemove[index]; const indexDiff = delta[`_${index1}`]; @@ -23297,7 +23297,7 @@ ${events} }); } } - toInsert = toInsert.sort(compare.numericallyBy("index")); + toInsert = toInsert.sort(compare$1.numericallyBy("index")); const toInsertLength = toInsert.length; for (index = 0; index < toInsertLength; index++) { const insertion = toInsert[index]; @@ -23357,14 +23357,14 @@ ${events} return; } const arrayDelta = nestedDelta; - let name; + let name2; let child; - for (name in arrayDelta) { - if (name === "_t") { + for (name2 in arrayDelta) { + if (name2 === "_t") { continue; } - child = new ReverseContext(arrayDelta[name]); - context.push(child, name); + child = new ReverseContext(arrayDelta[name2]); + context.push(child, name2); } context.exit(); }; @@ -23418,12 +23418,12 @@ ${events} }; for (let index = 0; index < length; index++) { child = context.children[index]; - let name = child.newName; - if (typeof name === "undefined") { - name = reverseArrayDeltaIndex(arrayDelta, child.childName, child.result); + let name2 = child.newName; + if (typeof name2 === "undefined") { + name2 = reverseArrayDeltaIndex(arrayDelta, child.childName, child.result); } - if (delta[name] !== child.result) { - delta[name] = child.result; + if (delta[name2] !== child.result) { + delta[name2] = child.result; } } context.setResult(delta).exit(); @@ -23588,11 +23588,11 @@ ${events} } return defaultInstance$1.diff(left2, right2); } - const trimUnderscore = (str) => { - if (str.substring(0, 1) === "_") { - return str.slice(1); + const trimUnderscore = (str2) => { + if (str2.substring(0, 1) === "_") { + return str2.slice(1); } - return str; + return str2; }; const arrayKeyToSortNumber = (key2) => { if (key2 === "_t") { @@ -23670,24 +23670,24 @@ ${events} const keys = Object.keys(delta); const arrayKeys = delta._t === "a"; const moveDestinations = {}; - let name; + let name2; if (typeof left2 !== "undefined") { - for (name in left2) { - if (Object.prototype.hasOwnProperty.call(left2, name)) { - if (typeof delta[name] === "undefined" && (!arrayKeys || typeof delta[`_${name}`] === "undefined")) { - keys.push(name); + for (name2 in left2) { + if (Object.prototype.hasOwnProperty.call(left2, name2)) { + if (typeof delta[name2] === "undefined" && (!arrayKeys || typeof delta[`_${name2}`] === "undefined")) { + keys.push(name2); } } } } - for (name in delta) { - if (Object.prototype.hasOwnProperty.call(delta, name)) { - const value = delta[name]; + for (name2 in delta) { + if (Object.prototype.hasOwnProperty.call(delta, name2)) { + const value = delta[name2]; if (Array.isArray(value) && value[2] === 3) { const movedDelta = value; moveDestinations[`${movedDelta[1]}`] = { - key: name, - value: left2 && left2[parseInt(name.substring(1), 10)] + key: name2, + value: left2 && left2[parseInt(name2.substring(1), 10)] }; if (this.includeMoveDestinations !== false) { if (typeof left2 === "undefined" && typeof delta[movedDelta[1]] === "undefined") { @@ -23909,9 +23909,9 @@ ${events} }; eachByQuery(node, ".jsondiffpatch-arrow", ({ parentNode, children: children2, style: style2 }) => { const arrowParent = parentNode; - const svg = children2[0]; - const path = svg.children[1]; - svg.style.display = "none"; + const svg2 = children2[0]; + const path = svg2.children[1]; + svg2.style.display = "none"; const destination = getElementText(arrowParent.querySelector(".jsondiffpatch-moved-destination")); const container = arrowParent.parentNode; let destinationElem; @@ -23925,11 +23925,11 @@ ${events} } try { const distance = destinationElem.offsetTop - arrowParent.offsetTop; - svg.setAttribute("height", `${Math.abs(distance) + 6}`); + svg2.setAttribute("height", `${Math.abs(distance) + 6}`); style2.top = `${-8 + (distance > 0 ? 0 : distance)}px`; const curve = distance > 0 ? `M30,0 Q-10,${Math.round(distance / 2)} 26,${distance - 4}` : `M30,${-distance} Q-10,${Math.round(-distance / 2)} 26,4`; path.setAttribute("d", curve); - svg.style.display = ""; + svg2.style.display = ""; } catch (err2) { } }); @@ -24314,17 +24314,17 @@ ${events} }; const ModelTokenTable = ({ model_usage, style: style2 }) => { return m$1` - <${TokenTable} style=${style2}> + <${TokenTable$1} style=${style2}> <${TokenHeader}/> ${Object.keys(model_usage).map((key2) => { return m$1`<${TokenRow} model=${key2} usage=${model_usage[key2]} />`; })} - + `; }; - const TokenTable = ({ style: style2, children: children2 }) => { + const TokenTable$1 = ({ style: style2, children: children2 }) => { return m$1` { - const { input, target, answer, limit, id, score } = gridColumns(sampleDescriptor); + const { input, target, answer, limit, id, score: score2 } = gridColumns(sampleDescriptor); return { gridGap: "10px", - gridTemplateColumns: `${id} ${input} ${target} ${answer} ${limit} ${score}`, + gridTemplateColumns: `${id} ${input} ${target} ${answer} ${limit} ${score2}`, paddingLeft: "1rem", paddingRight: "1rem" }; @@ -26086,7 +26087,7 @@ ${events} const answer = (sampleDescriptor == null ? void 0 : sampleDescriptor.messageShape.normalized.answer) > 0 ? Math.max(0.15, sampleDescriptor.messageShape.normalized.answer) : 0; const limit = (sampleDescriptor == null ? void 0 : sampleDescriptor.messageShape.normalized.limit) > 0 ? Math.max(0.15, sampleDescriptor.messageShape.normalized.limit) : 0; const id = Math.max(2, Math.min(10, sampleDescriptor == null ? void 0 : sampleDescriptor.messageShape.raw.id)); - const score = Math.max( + const score2 = Math.max( 3, Math.min(10, sampleDescriptor == null ? void 0 : sampleDescriptor.messageShape.raw.score) ); @@ -26103,7 +26104,7 @@ ${events} answer: frSize(answer), limit: frSize(limit), id: `${id}rem`, - score: `${score}rem` + score: `${score2}rem` }; }; const SamplesTab = ({ @@ -26568,8 +26569,8 @@ self.onmessage = function (e) { } return root; }; - function internalize(holder, name, reviver) { - const value = holder[name]; + function internalize(holder, name2, reviver) { + const value = holder[name2]; if (value != null && typeof value === "object") { if (Array.isArray(value)) { for (let i2 = 0; i2 < value.length; i2++) { @@ -26602,7 +26603,7 @@ self.onmessage = function (e) { } } } - return reviver.call(holder, name, value); + return reviver.call(holder, name2, value); } let lexState; let buffer; @@ -26732,15 +26733,15 @@ self.onmessage = function (e) { return newToken("punctuator", read()); case "n": read(); - literal("ull"); + literal$1("ull"); return newToken("null", null); case "t": read(); - literal("rue"); + literal$1("rue"); return newToken("boolean", true); case "f": read(); - literal("alse"); + literal$1("alse"); return newToken("boolean", false); case "-": case "+": @@ -26771,11 +26772,11 @@ self.onmessage = function (e) { return; case "I": read(); - literal("nfinity"); + literal$1("nfinity"); return newToken("numeric", Infinity); case "N": read(); - literal("aN"); + literal$1("aN"); return newToken("numeric", NaN); case '"': case "'": @@ -26869,11 +26870,11 @@ self.onmessage = function (e) { return; case "I": read(); - literal("nfinity"); + literal$1("nfinity"); return newToken("numeric", sign * Infinity); case "N": read(); - literal("aN"); + literal$1("aN"); return newToken("numeric", NaN); } throw invalidChar(read()); @@ -27106,7 +27107,7 @@ self.onmessage = function (e) { column }; } - function literal(s2) { + function literal$1(s2) { for (const c2 of s2) { const p2 = peek(); if (p2 !== c2) { @@ -27863,15 +27864,15 @@ self.onmessage = function (e) { } return { b: b2, r: r2 }; }; - var _a = freb(fleb, 2), fl = _a.b, revfl = _a.r; + var _a$1 = freb(fleb, 2), fl = _a$1.b, revfl = _a$1.r; fl[28] = 258, revfl[258] = 28; var _b = freb(fdeb, 0), fd = _b.b; var rev = new u16(32768); - for (var i = 0; i < 32768; ++i) { - var x = (i & 43690) >> 1 | (i & 21845) << 1; + for (var i$1 = 0; i$1 < 32768; ++i$1) { + var x = (i$1 & 43690) >> 1 | (i$1 & 21845) << 1; x = (x & 52428) >> 2 | (x & 13107) << 2; x = (x & 61680) >> 4 | (x & 3855) << 4; - rev[i] = ((x & 65280) >> 8 | (x & 255) << 8) >> 1; + rev[i$1] = ((x & 65280) >> 8 | (x & 255) << 8) >> 1; } var hMap = function(cd, mb, r2) { var s2 = cd.length; @@ -27910,17 +27911,17 @@ self.onmessage = function (e) { return co; }; var flt = new u8(288); - for (var i = 0; i < 144; ++i) - flt[i] = 8; - for (var i = 144; i < 256; ++i) - flt[i] = 9; - for (var i = 256; i < 280; ++i) - flt[i] = 7; - for (var i = 280; i < 288; ++i) - flt[i] = 8; + for (var i$1 = 0; i$1 < 144; ++i$1) + flt[i$1] = 8; + for (var i$1 = 144; i$1 < 256; ++i$1) + flt[i$1] = 9; + for (var i$1 = 256; i$1 < 280; ++i$1) + flt[i$1] = 7; + for (var i$1 = 280; i$1 < 288; ++i$1) + flt[i$1] = 8; var fdt = new u8(32); - for (var i = 0; i < 32; ++i) - fdt[i] = 5; + for (var i$1 = 0; i$1 < 32; ++i$1) + fdt[i$1] = 5; var flrm = /* @__PURE__ */ hMap(flt, 9, 1); var fdrm = /* @__PURE__ */ hMap(fdt, 5, 1); var max = function(a2) { @@ -28076,10 +28077,10 @@ self.onmessage = function (e) { lpos = pos2, lm = null; break; } else { - var add = sym - 254; + var add2 = sym - 254; if (sym > 264) { var i2 = sym - 257, b2 = fleb[i2]; - add = bits(dat, pos2, (1 << b2) - 1) + fl[i2]; + add2 = bits(dat, pos2, (1 << b2) - 1) + fl[i2]; pos2 += b2; } var d2 = dm[bits16(dat, pos2) & dms], dsym = d2 >> 4; @@ -28098,13 +28099,13 @@ self.onmessage = function (e) { } if (resize) cbuf(bt + 131072); - var end2 = bt + add; + var end2 = bt + add2; if (bt < dt) { - var shift = dl - dt, dend = Math.min(dt, end2); - if (shift + bt < 0) + var shift2 = dl - dt, dend = Math.min(dt, end2); + if (shift2 + bt < 0) err(3); for (; bt < dend; ++bt) - buf[bt] = dict[shift + bt]; + buf[bt] = dict[shift2 + bt]; } for (; bt < end2; ++bt) buf[bt] = buf[bt - dt]; @@ -29225,493 +29226,23284 @@ self.onmessage = function (e) { order: sort === kSampleAscVal || sort === kEpochAscVal || sort === kScoreAscVal ? "asc" : "desc" }; }; - const SampleFilter = ({ descriptor, filter, filterChanged }) => { - var _a2; - const updateCategoryValue = (e2) => { - const val = e2.currentTarget.value; - if (val === "all") { - filterChanged({}); + class Text { + /** + Get the line description around the given position. + */ + lineAt(pos2) { + if (pos2 < 0 || pos2 > this.length) + throw new RangeError(`Invalid position ${pos2} in document of length ${this.length}`); + return this.lineInner(pos2, false, 1, 0); + } + /** + Get the description for the given (1-based) line number. + */ + line(n2) { + if (n2 < 1 || n2 > this.lines) + throw new RangeError(`Invalid line number ${n2} in ${this.lines}-line document`); + return this.lineInner(n2, true, 1, 0); + } + /** + Replace a range of the text with the given content. + */ + replace(from, to, text2) { + [from, to] = clip(this, from, to); + let parts = []; + this.decompose( + 0, + from, + parts, + 2 + /* Open.To */ + ); + if (text2.length) + text2.decompose( + 0, + text2.length, + parts, + 1 | 2 + /* Open.To */ + ); + this.decompose( + to, + this.length, + parts, + 1 + /* Open.From */ + ); + return TextNode.from(parts, this.length - (to - from) + text2.length); + } + /** + Append another document to this one. + */ + append(other) { + return this.replace(this.length, this.length, other); + } + /** + Retrieve the text between the given points. + */ + slice(from, to = this.length) { + [from, to] = clip(this, from, to); + let parts = []; + this.decompose(from, to, parts, 0); + return TextNode.from(parts, to - from); + } + /** + Test whether this text is equal to another instance. + */ + eq(other) { + if (other == this) + return true; + if (other.length != this.length || other.lines != this.lines) + return false; + let start2 = this.scanIdentical(other, 1), end2 = this.length - this.scanIdentical(other, -1); + let a2 = new RawTextCursor(this), b2 = new RawTextCursor(other); + for (let skip = start2, pos2 = start2; ; ) { + a2.next(skip); + b2.next(skip); + skip = 0; + if (a2.lineBreak != b2.lineBreak || a2.done != b2.done || a2.value != b2.value) + return false; + pos2 += a2.value.length; + if (a2.done || pos2 >= end2) + return true; + } + } + /** + Iterate over the text. When `dir` is `-1`, iteration happens + from end to start. This will return lines and the breaks between + them as separate strings. + */ + iter(dir = 1) { + return new RawTextCursor(this, dir); + } + /** + Iterate over a range of the text. When `from` > `to`, the + iterator will run in reverse. + */ + iterRange(from, to = this.length) { + return new PartialTextCursor(this, from, to); + } + /** + Return a cursor that iterates over the given range of lines, + _without_ returning the line breaks between, and yielding empty + strings for empty lines. + + When `from` and `to` are given, they should be 1-based line numbers. + */ + iterLines(from, to) { + let inner; + if (from == null) { + inner = this.iter(); } else { - filterChanged({ - value: val, - type: kScoreTypeCategorical - }); + if (to == null) + to = this.lines + 1; + let start2 = this.line(from).from; + inner = this.iterRange(start2, Math.max(start2, to == this.lines + 1 ? this.length : to <= 1 ? 0 : this.line(to - 1).to)); } - }; - switch ((_a2 = descriptor == null ? void 0 : descriptor.selectedScoreDescriptor) == null ? void 0 : _a2.scoreType) { - case kScoreTypePassFail: { - const options = [{ text: "All", value: "all" }]; - options.push( - ...descriptor.selectedScoreDescriptor.categories.map((cat) => { - return { text: cat.text, value: cat.val }; - }) - ); - return m$1`<${SelectFilter} - value=${filter.value || "all"} - options=${options} - onChange=${updateCategoryValue} - />`; + return new LineCursor(inner); + } + /** + Return the document as a string, using newline characters to + separate lines. + */ + toString() { + return this.sliceString(0); + } + /** + Convert the document to an array of lines (which can be + deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)). + */ + toJSON() { + let lines = []; + this.flatten(lines); + return lines; + } + /** + @internal + */ + constructor() { + } + /** + Create a `Text` instance for the given array of lines. + */ + static of(text2) { + if (text2.length == 0) + throw new RangeError("A document must have at least one line"); + if (text2.length == 1 && !text2[0]) + return Text.empty; + return text2.length <= 32 ? new TextLeaf(text2) : TextNode.from(TextLeaf.split(text2, [])); + } + } + class TextLeaf extends Text { + constructor(text2, length = textLength(text2)) { + super(); + this.text = text2; + this.length = length; + } + get lines() { + return this.text.length; + } + get children() { + return null; + } + lineInner(target, isLine, line2, offset2) { + for (let i2 = 0; ; i2++) { + let string2 = this.text[i2], end2 = offset2 + string2.length; + if ((isLine ? line2 : end2) >= target) + return new Line(offset2, end2, line2, string2); + offset2 = end2 + 1; + line2++; } - case kScoreTypeCategorical: { - const options = [{ text: "All", value: "all" }]; - options.push( - ...descriptor.selectedScoreDescriptor.categories.map((cat) => { - return { text: cat, value: cat }; - }) - ); - return m$1`<${SelectFilter} - value=${filter.value || "all"} - options=${options} - onChange=${updateCategoryValue} - />`; + } + decompose(from, to, target, open) { + let text2 = from <= 0 && to >= this.length ? this : new TextLeaf(sliceText(this.text, from, to), Math.min(to, this.length) - Math.max(0, from)); + if (open & 1) { + let prev = target.pop(); + let joined = appendText(text2.text, prev.text.slice(), 0, text2.length); + if (joined.length <= 32) { + target.push(new TextLeaf(joined, prev.length + text2.length)); + } else { + let mid = joined.length >> 1; + target.push(new TextLeaf(joined.slice(0, mid)), new TextLeaf(joined.slice(mid))); + } + } else { + target.push(text2); } - case kScoreTypeNumeric: { - return m$1` - { - filterChanged({ - value: e2.currentTarget.value, - type: kScoreTypeNumeric - }); - }} - /> - `; + } + replace(from, to, text2) { + if (!(text2 instanceof TextLeaf)) + return super.replace(from, to, text2); + [from, to] = clip(this, from, to); + let lines = appendText(this.text, appendText(text2.text, sliceText(this.text, 0, from)), to); + let newLen = this.length + text2.length - (to - from); + if (lines.length <= 32) + return new TextLeaf(lines, newLen); + return TextNode.from(TextLeaf.split(lines, []), newLen); + } + sliceString(from, to = this.length, lineSep = "\n") { + [from, to] = clip(this, from, to); + let result = ""; + for (let pos2 = 0, i2 = 0; pos2 <= to && i2 < this.text.length; i2++) { + let line2 = this.text[i2], end2 = pos2 + line2.length; + if (pos2 > from && i2) + result += lineSep; + if (from < end2 && to > pos2) + result += line2.slice(Math.max(0, from - pos2), to - pos2); + pos2 = end2 + 1; } - case kScoreTypeObject: { - if (!descriptor.selectedScoreDescriptor.categories) { - return ""; + return result; + } + flatten(target) { + for (let line2 of this.text) + target.push(line2); + } + scanIdentical() { + return 0; + } + static split(text2, target) { + let part = [], len = -1; + for (let line2 of text2) { + part.push(line2); + len += line2.length + 1; + if (part.length == 32) { + target.push(new TextLeaf(part, len)); + part = []; + len = -1; } - const options = [{ text: "All", value: "all" }]; - options.push( - ...descriptor.selectedScoreDescriptor.categories.map((cat) => { - return { text: cat.text, value: cat.value }; - }) - ); - return m$1`<${SelectFilter} - value=${filter.value || "all"} - options=${options} - onChange=${updateCategoryValue} - />`; } - default: { - return void 0; + if (len > -1) + target.push(new TextLeaf(part, len)); + return target; + } + } + class TextNode extends Text { + constructor(children2, length) { + super(); + this.children = children2; + this.length = length; + this.lines = 0; + for (let child of children2) + this.lines += child.lines; + } + lineInner(target, isLine, line2, offset2) { + for (let i2 = 0; ; i2++) { + let child = this.children[i2], end2 = offset2 + child.length, endLine = line2 + child.lines - 1; + if ((isLine ? endLine : end2) >= target) + return child.lineInner(target, isLine, line2, offset2); + offset2 = end2 + 1; + line2 = endLine + 1; + } + } + decompose(from, to, target, open) { + for (let i2 = 0, pos2 = 0; pos2 <= to && i2 < this.children.length; i2++) { + let child = this.children[i2], end2 = pos2 + child.length; + if (from <= end2 && to >= pos2) { + let childOpen = open & ((pos2 <= from ? 1 : 0) | (end2 >= to ? 2 : 0)); + if (pos2 >= from && end2 <= to && !childOpen) + target.push(child); + else + child.decompose(from - pos2, to - pos2, target, childOpen); + } + pos2 = end2 + 1; + } + } + replace(from, to, text2) { + [from, to] = clip(this, from, to); + if (text2.lines < this.lines) + for (let i2 = 0, pos2 = 0; i2 < this.children.length; i2++) { + let child = this.children[i2], end2 = pos2 + child.length; + if (from >= pos2 && to <= end2) { + let updated = child.replace(from - pos2, to - pos2, text2); + let totalLines = this.lines - child.lines + updated.lines; + if (updated.lines < totalLines >> 5 - 1 && updated.lines > totalLines >> 5 + 1) { + let copy = this.children.slice(); + copy[i2] = updated; + return new TextNode(copy, this.length - (to - from) + text2.length); + } + return super.replace(pos2, end2, updated); + } + pos2 = end2 + 1; + } + return super.replace(from, to, text2); + } + sliceString(from, to = this.length, lineSep = "\n") { + [from, to] = clip(this, from, to); + let result = ""; + for (let i2 = 0, pos2 = 0; i2 < this.children.length && pos2 <= to; i2++) { + let child = this.children[i2], end2 = pos2 + child.length; + if (pos2 > from && i2) + result += lineSep; + if (from < end2 && to > pos2) + result += child.sliceString(from - pos2, to - pos2, lineSep); + pos2 = end2 + 1; } + return result; } - }; - const SelectFilter = ({ value, options, onChange }) => { - return m$1` -
- Scores: - -
- `; - }; - const SelectScorer = ({ scores, score, setScore }) => { - const scorers = scores.reduce((accum, scorer) => { - if (!accum.find((sc) => { - return scorer.scorer === sc.scorer; - })) { - accum.push(scorer); + flatten(target) { + for (let child of this.children) + child.flatten(target); + } + scanIdentical(other, dir) { + if (!(other instanceof TextNode)) + return 0; + let length = 0; + let [iA, iB, eA, eB] = dir > 0 ? [0, 0, this.children.length, other.children.length] : [this.children.length - 1, other.children.length - 1, -1, -1]; + for (; ; iA += dir, iB += dir) { + if (iA == eA || iB == eB) + return length; + let chA = this.children[iA], chB = other.children[iB]; + if (chA != chB) + return length + chA.scanIdentical(chB, dir); + length += chA.length + 1; + } + } + static from(children2, length = children2.reduce((l2, ch3) => l2 + ch3.length + 1, -1)) { + let lines = 0; + for (let ch3 of children2) + lines += ch3.lines; + if (lines < 32) { + let flat = []; + for (let ch3 of children2) + ch3.flatten(flat); + return new TextLeaf(flat, length); + } + let chunk = Math.max( + 32, + lines >> 5 + /* Tree.BranchShift */ + ), maxChunk = chunk << 1, minChunk = chunk >> 1; + let chunked = [], currentLines = 0, currentLen = -1, currentChunk = []; + function add2(child) { + let last; + if (child.lines > maxChunk && child instanceof TextNode) { + for (let node of child.children) + add2(node); + } else if (child.lines > minChunk && (currentLines > minChunk || !currentLines)) { + flush(); + chunked.push(child); + } else if (child instanceof TextLeaf && currentLines && (last = currentChunk[currentChunk.length - 1]) instanceof TextLeaf && child.lines + last.lines <= 32) { + currentLines += child.lines; + currentLen += child.length + 1; + currentChunk[currentChunk.length - 1] = new TextLeaf(last.text.concat(child.text), last.length + 1 + child.length); + } else { + if (currentLines + child.lines > chunk) + flush(); + currentLines += child.lines; + currentLen += child.length + 1; + currentChunk.push(child); + } } - return accum; - }, []); - if (scorers.length === 1) { - return m$1` -
- Score: - <${ScoreSelector} - scores=${scores} - selectedIndex=${scoreIndex(score, scores)} - selectedIndexChanged=${(index) => { - setScore(scores[index]); - }} - /> -
- `; - } else { - const scorerScores = scores.filter((sc) => { - return sc.scorer === score.scorer; - }); - const selectors = [ - m$1`<${ScorerSelector} - scorers=${scorers} - selectedIndex=${scorerIndex(score, scorers)} - selectedIndexChanged=${(index) => { - setScore(scorers[index]); - }} - />` - ]; - if (scorerScores.length > 1) { - selectors.push( - m$1`<${ScoreSelector} - style=${{ marginLeft: "1em" }} - scores=${scorerScores} - selectedIndex=${scoreIndex(score, scorerScores)} - selectedIndexChanged=${(index) => { - setScore(scorerScores[index]); - }} - />` - ); + function flush() { + if (currentLines == 0) + return; + chunked.push(currentChunk.length == 1 ? currentChunk[0] : TextNode.from(currentChunk, currentLen)); + currentLen = -1; + currentLines = currentChunk.length = 0; + } + for (let child of children2) + add2(child); + flush(); + return chunked.length == 1 ? chunked[0] : new TextNode(chunked, length); + } + } + Text.empty = /* @__PURE__ */ new TextLeaf([""], 0); + function textLength(text2) { + let length = -1; + for (let line2 of text2) + length += line2.length + 1; + return length; + } + function appendText(text2, target, from = 0, to = 1e9) { + for (let pos2 = 0, i2 = 0, first = true; i2 < text2.length && pos2 <= to; i2++) { + let line2 = text2[i2], end2 = pos2 + line2.length; + if (end2 >= from) { + if (end2 > to) + line2 = line2.slice(0, to - pos2); + if (pos2 < from) + line2 = line2.slice(from - pos2); + if (first) { + target[target.length - 1] += line2; + first = false; + } else + target.push(line2); } - return m$1` -
- Scorer: - ${selectors} -
- `; + pos2 = end2 + 1; } - }; - const ScoreSelector = ({ - scores, - selectedIndex, - selectedIndexChanged, - style: style2 - }) => { - return m$1``; - }; - const ScorerSelector = ({ scorers, selectedIndex, selectedIndexChanged }) => { - return m$1``; - }; - const scoreIndex = (score, scores) => scores.findIndex((sc) => { - return sc.name === score.name && sc.scorer === score.scorer; - }); - const scorerIndex = (score, scores) => scores.findIndex((sc) => { - return sc.scorer === score.scorer; - }); - const SampleTools = (props) => { - const { - epoch, - setEpoch, - filter, - filterChanged, - sort, - setSort, - epochs, - sampleDescriptor, - score, - setScore, - scores - } = props; - const hasEpochs = epochs > 1; - const tools = []; - if (scores.length > 1) { - tools.push( - m$1`<${SelectScorer} - scores=${scores} - score=${score} - setScore=${setScore} - />` - ); + return target; + } + function sliceText(text2, from, to) { + return appendText(text2, [""], from, to); + } + class RawTextCursor { + constructor(text2, dir = 1) { + this.dir = dir; + this.done = false; + this.lineBreak = false; + this.value = ""; + this.nodes = [text2]; + this.offsets = [dir > 0 ? 1 : (text2 instanceof TextLeaf ? text2.text.length : text2.children.length) << 1]; + } + nextInner(skip, dir) { + this.done = this.lineBreak = false; + for (; ; ) { + let last = this.nodes.length - 1; + let top2 = this.nodes[last], offsetValue = this.offsets[last], offset2 = offsetValue >> 1; + let size = top2 instanceof TextLeaf ? top2.text.length : top2.children.length; + if (offset2 == (dir > 0 ? size : 0)) { + if (last == 0) { + this.done = true; + this.value = ""; + return this; + } + if (dir > 0) + this.offsets[last - 1]++; + this.nodes.pop(); + this.offsets.pop(); + } else if ((offsetValue & 1) == (dir > 0 ? 0 : 1)) { + this.offsets[last] += dir; + if (skip == 0) { + this.lineBreak = true; + this.value = "\n"; + return this; + } + skip--; + } else if (top2 instanceof TextLeaf) { + let next = top2.text[offset2 + (dir < 0 ? -1 : 0)]; + this.offsets[last] += dir; + if (next.length > Math.max(0, skip)) { + this.value = skip == 0 ? next : dir > 0 ? next.slice(skip) : next.slice(0, next.length - skip); + return this; + } + skip -= next.length; + } else { + let next = top2.children[offset2 + (dir < 0 ? -1 : 0)]; + if (skip > next.length) { + skip -= next.length; + this.offsets[last] += dir; + } else { + if (dir < 0) + this.offsets[last]--; + this.nodes.push(next); + this.offsets.push(dir > 0 ? 1 : (next instanceof TextLeaf ? next.text.length : next.children.length) << 1); + } + } + } } - if (hasEpochs) { - tools.push( - m$1`<${EpochFilter} - epoch=${epoch} - setEpoch="${setEpoch}" - epochs=${epochs} - />` - ); + next(skip = 0) { + if (skip < 0) { + this.nextInner(-skip, -this.dir); + skip = this.value.length; + } + return this.nextInner(skip, this.dir); } - tools.push( - m$1`<${SampleFilter} - filter=${filter} - filterChanged=${filterChanged} - descriptor=${sampleDescriptor} - />` - ); - tools.push( - m$1`<${SortFilter} - sampleDescriptor=${sampleDescriptor} - sort=${sort} - setSort=${setSort} - epochs=${hasEpochs} - />` - ); - return tools; - }; - const CopyButton = ({ value }) => { - return m$1``; - }; - const LabeledValue = ({ - label, - style: style2, - valueStyle, - layout = "column", - children: children2 - }) => { - const flexDirection = layout === "column" ? "column" : "row"; - return m$1`
-
- ${label} -
-
${children2}
-
`; - }; - const SecondaryBar = ({ - evalSpec, - evalPlan, - evalResults, - evalStats, - samples, - status, - style: style2 - }) => { - if (!evalSpec || status !== "success") { - return ""; } - const staticColStyle = { - flexShrink: "0" + } + if (typeof Symbol != "undefined") { + Text.prototype[Symbol.iterator] = function() { + return this.iter(); }; - const epochs = evalSpec.config.epochs || 1; - const hyperparameters = { - ...evalPlan == null ? void 0 : evalPlan.config, - ...evalSpec.task_args + RawTextCursor.prototype[Symbol.iterator] = PartialTextCursor.prototype[Symbol.iterator] = LineCursor.prototype[Symbol.iterator] = function() { + return this; }; - const hasConfig = Object.keys(hyperparameters).length > 0; - const values = []; - values.push({ - size: "minmax(12%, auto)", - value: m$1`<${LabeledValue} label="Dataset" style=${staticColStyle}> - <${DatasetSummary} - dataset=${evalSpec.dataset} - samples=${samples} - epochs=${epochs} /> - -` - }); - const label = (evalResults == null ? void 0 : evalResults.scores.length) > 1 ? "Scorers" : "Scorer"; - values.push({ - size: "minmax(12%, auto)", - value: m$1`<${LabeledValue} label="${label}" style=${staticColStyle} style=${{ justifySelf: hasConfig ? "left" : "center" }}> - <${ScorerSummary} - scorers=${evalResults == null ? void 0 : evalResults.scores} /> - ` - }); - if (hasConfig) { - values.push({ - size: "minmax(12%, auto)", - value: m$1`<${LabeledValue} label="Config" style=${{ justifySelf: "right" }}> - <${ParamSummary} params=${hyperparameters}/> - ` - }); - } - const totalDuration = formatDuration( - new Date(evalStats.started_at), - new Date(evalStats.completed_at) - ); - values.push({ - size: "minmax(12%, auto)", - value: m$1` - <${LabeledValue} label="Duration" style=${{ justifySelf: "right" }}> - ${totalDuration} - ` - }); - return m$1` - <${ExpandablePanel} style=${{ margin: "0", ...style2 }} collapse=${true} lines=${4}> -
{ - return val.size; - }).join(" ")}` - }} - > - ${values.map((val) => { - return val.value; - })} -
- - `; - }; - const DatasetSummary = ({ dataset, samples, epochs, style: style2 }) => { - if (!dataset) { - return ""; - } - return m$1` -
- ${dataset.name}${(samples == null ? void 0 : samples.length) ? m$1`${formatDataset(dataset.name, samples.length, epochs)}` : ""} -
- `; - }; - const ScorerSummary = ({ scorers }) => { - if (!scorers) { - return ""; + } + class Line { + /** + @internal + */ + constructor(from, to, number2, text2) { + this.from = from; + this.to = to; + this.number = number2; + this.text = text2; } - const uniqScorers = /* @__PURE__ */ new Set(); - scorers.forEach((scorer) => { - uniqScorers.add(scorer.name); - }); - return Array.from(uniqScorers).join(", "); - }; - const ParamSummary = ({ params }) => { - if (!params) { - return ""; + /** + The length of the line (not including any line break after it). + */ + get length() { + return this.to - this.from; } - const paraValues = Object.keys(params).map((key2) => { - const val = params[key2]; - if (Array.isArray(val) || typeof val === "object") { - return `${key2}: ${JSON.stringify(val)}`; + } + function clip(text2, from, to) { + from = Math.max(0, Math.min(text2.length, from)); + return [from, Math.max(from, Math.min(text2.length, to))]; + } + let extend = /* @__PURE__ */ "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((s2) => s2 ? parseInt(s2, 36) : 1); + for (let i2 = 1; i2 < extend.length; i2++) + extend[i2] += extend[i2 - 1]; + function isExtendingChar(code2) { + for (let i2 = 1; i2 < extend.length; i2 += 2) + if (extend[i2] > code2) + return extend[i2 - 1] <= code2; + return false; + } + function isRegionalIndicator(code2) { + return code2 >= 127462 && code2 <= 127487; + } + const ZWJ = 8205; + function findClusterBreak(str2, pos2, forward = true, includeExtending = true) { + return (forward ? nextClusterBreak : prevClusterBreak)(str2, pos2, includeExtending); + } + function nextClusterBreak(str2, pos2, includeExtending) { + if (pos2 == str2.length) + return pos2; + if (pos2 && surrogateLow(str2.charCodeAt(pos2)) && surrogateHigh(str2.charCodeAt(pos2 - 1))) + pos2--; + let prev = codePointAt(str2, pos2); + pos2 += codePointSize(prev); + while (pos2 < str2.length) { + let next = codePointAt(str2, pos2); + if (prev == ZWJ || next == ZWJ || includeExtending && isExtendingChar(next)) { + pos2 += codePointSize(next); + prev = next; + } else if (isRegionalIndicator(next)) { + let countBefore = 0, i2 = pos2 - 2; + while (i2 >= 0 && isRegionalIndicator(codePointAt(str2, i2))) { + countBefore++; + i2 -= 2; + } + if (countBefore % 2 == 0) + break; + else + pos2 += 2; } else { - return `${key2}: ${val}`; + break; } - }); - if (paraValues.length > 0) { - return m$1`${paraValues.join(", ")}`; - } else { - return ""; } - }; - const Navbar = ({ - file, - evalSpec, - evalPlan, - evalResults, - evalStats, - samples, - showToggle, - offcanvas, - status - }) => { - const toggleOffCanClass = offcanvas ? "" : " d-md-none"; - const logFileName = file ? filename(file) : ""; - const task = evalSpec == null ? void 0 : evalSpec.task; - const model = evalSpec == null ? void 0 : evalSpec.model; - const results = evalResults; - const created = evalSpec == null ? void 0 : evalSpec.created; - let statusPanel; - if (status === "success") { - statusPanel = m$1`<${ResultsPanel} results="${results}" />`; - } else if (status === "cancelled") { - statusPanel = m$1`<${CancelledPanel} - sampleCount=${(samples == null ? void 0 : samples.length) || 0} - />`; - } else if (status === "started") { - statusPanel = m$1`<${RunningPanel} sampleCount=${(samples == null ? void 0 : samples.length) || 0} />`; - } else if (status === "error") { - statusPanel = m$1`<${ErroredPanel} sampleCount=${(samples == null ? void 0 : samples.length) || 0} />`; + return pos2; + } + function prevClusterBreak(str2, pos2, includeExtending) { + while (pos2 > 0) { + let found = nextClusterBreak(str2, pos2 - 2, includeExtending); + if (found < pos2) + return found; + pos2--; + } + return 0; + } + function surrogateLow(ch3) { + return ch3 >= 56320 && ch3 < 57344; + } + function surrogateHigh(ch3) { + return ch3 >= 55296 && ch3 < 56320; + } + function codePointAt(str2, pos2) { + let code0 = str2.charCodeAt(pos2); + if (!surrogateHigh(code0) || pos2 + 1 == str2.length) + return code0; + let code1 = str2.charCodeAt(pos2 + 1); + if (!surrogateLow(code1)) + return code0; + return (code0 - 55296 << 10) + (code1 - 56320) + 65536; + } + function fromCodePoint(code2) { + if (code2 <= 65535) + return String.fromCharCode(code2); + code2 -= 65536; + return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320); + } + function codePointSize(code2) { + return code2 < 65536 ? 1 : 2; + } + const DefaultSplit = /\r\n?|\n/; + var MapMode = /* @__PURE__ */ function(MapMode2) { + MapMode2[MapMode2["Simple"] = 0] = "Simple"; + MapMode2[MapMode2["TrackDel"] = 1] = "TrackDel"; + MapMode2[MapMode2["TrackBefore"] = 2] = "TrackBefore"; + MapMode2[MapMode2["TrackAfter"] = 3] = "TrackAfter"; + return MapMode2; + }(MapMode || (MapMode = {})); + class ChangeDesc { + // Sections are encoded as pairs of integers. The first is the + // length in the current document, and the second is -1 for + // unaffected sections, and the length of the replacement content + // otherwise. So an insertion would be (0, n>0), a deletion (n>0, + // 0), and a replacement two positive numbers. + /** + @internal + */ + constructor(sections) { + this.sections = sections; } - const navbarContents = logFileName ? m$1`