var e, t, n, r, i, o, a, s, u, c, l, f, h, d, v, p, m, g, y, b, k, w, x, j, S, C, _, $, O, A, M, E, P, N, T, I, R, D, z, L, B, q, F, V, H, W, J, U, K, G, Q, Y, Z, X, ee, te, ne, re, ie, oe, ae, se, ue, ce, le, fe, he, de, ve, pe, me, ge, ye, be, ke, we, xe, je, Se, Ce, _e, $e, Oe, Ae, Me, Ee, Pe, Ne, Te, Ie, Re, De, ze, Le, Be, qe, Fe, Ve, He, We, Je, Ue, Ke, Ge, Qe, Ye, Ze, Xe, et, tt, nt, rt, it, ot, at, st, ut, ct, lt, ft, ht, dt, vt, pt, mt, gt, yt, bt, kt, wt, xt, jt, St, Ct, _t, $t, Ot, At, Mt, Et, Pt, Nt, Tt, It, Rt, Dt, zt, Lt, Bt, qt, Ft, Vt, Ht, Wt, Jt, Ut, Kt, Gt, Qt, Yt, Zt, Xt, en, tn, nn, rn, on, an, sn, un, cn, ln, fn, hn, dn, vn, pn, mn, gn, yn, bn, kn, wn, xn, jn, Sn, Cn, _n, $n, On, An, Mn, En, Pn, Nn, Tn, In, Rn, Dn, zn, Ln, Bn, qn, Fn, Vn, Hn, Wn, Jn, Un, Kn, Gn, Qn, Yn, Zn, Xn, er, tr, nr, rr, ir, or, ar, sr, ur, cr, lr, fr, hr, dr, vr, pr, mr, gr, yr, br, kr, wr, xr, jr, Sr, Cr, _r, $r, Or, Ar, Mr, Er, Pr, Nr, Tr, Ir, Rr, Dr, zr, Lr, Br, qr, Fr, Vr, Hr, Wr, Jr, Ur, Kr, Gr, Qr, Yr, Zr, Xr, ei, ti, ni, ri, ii, oi, ai, si, ui, ci, li, fi, hi; function di(e22) { var t2 = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; return (di = function(e23) { if (e23 === null || (n2 = e23, Function.toString.call(n2).indexOf("[native code]") === -1)) return e23; var n2; if (typeof e23 != "function") throw new TypeError("Super expression must either be null or a function"); if (t2 !== void 0) { if (t2.has(e23)) return t2.get(e23); t2.set(e23, r2); } function r2() { return vi(e23, arguments, Pi(this).constructor); } return r2.prototype = Object.create(e23.prototype, { constructor: { value: r2, enumerable: false, writable: true, configurable: true } }), $i(r2, e23); })(e22); } function vi(e22, t2, n2) { return (vi = Ei() ? Reflect.construct.bind() : function(e23, t3, n3) { var r2 = [null]; r2.push.apply(r2, t3); var i2 = new (Function.bind.apply(e23, r2))(); return n3 && $i(i2, n3.prototype), i2; }).apply(null, arguments); } function pi(e22, t2) { return t2 || (t2 = e22.slice(0)), Object.freeze(Object.defineProperties(e22, { raw: { value: Object.freeze(t2) } })); } function mi() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ mi = function() { return e22; }; var e22 = {}, t2 = Object.prototype, n2 = t2.hasOwnProperty, r2 = typeof Symbol == "function" ? Symbol : {}, i2 = r2.iterator || "@@iterator", o2 = r2.asyncIterator || "@@asyncIterator", a2 = r2.toStringTag || "@@toStringTag"; function s2(e23, t3, n3) { return Object.defineProperty(e23, t3, { value: n3, enumerable: true, configurable: true, writable: true }), e23[t3]; } try { s2({}, ""); } catch (e23) { s2 = function(e24, t3, n3) { return e24[t3] = n3; }; } function u2(e23, t3, n3, r3) { var i3 = t3 && t3.prototype instanceof f2 ? t3 : f2, o3 = Object.create(i3.prototype), a3 = new j2(r3 || []); return o3._invoke = function(e24, t4, n4) { var r4 = "suspendedStart"; return function(i4, o4) { if (r4 === "executing") throw new Error("Generator is already running"); if (r4 === "completed") { if (i4 === "throw") throw o4; return C2(); } for (n4.method = i4, n4.arg = o4; ; ) { var a4 = n4.delegate; if (a4) { var s3 = k2(a4, n4); if (s3) { if (s3 === l2) continue; return s3; } } if (n4.method === "next") n4.sent = n4._sent = n4.arg; else if (n4.method === "throw") { if (r4 === "suspendedStart") throw r4 = "completed", n4.arg; n4.dispatchException(n4.arg); } else n4.method === "return" && n4.abrupt("return", n4.arg); r4 = "executing"; var u3 = c2(e24, t4, n4); if (u3.type === "normal") { if (r4 = n4.done ? "completed" : "suspendedYield", u3.arg === l2) continue; return { value: u3.arg, done: n4.done }; } u3.type === "throw" && (r4 = "completed", n4.method = "throw", n4.arg = u3.arg); } }; }(e23, n3, a3), o3; } function c2(e23, t3, n3) { try { return { type: "normal", arg: e23.call(t3, n3) }; } catch (e24) { return { type: "throw", arg: e24 }; } } e22.wrap = u2; var l2 = {}; function f2() { } function h2() { } function d2() { } var v2 = {}; s2(v2, i2, function() { return this; }); var p2 = Object.getPrototypeOf, m2 = p2 && p2(p2(S2([]))); m2 && m2 !== t2 && n2.call(m2, i2) && (v2 = m2); var g2 = d2.prototype = f2.prototype = Object.create(v2); function y2(e23) { ["next", "throw", "return"].forEach(function(t3) { s2(e23, t3, function(e24) { return this._invoke(t3, e24); }); }); } function b2(e23, t3) { function r3(i4, o3, a3, s3) { var u3 = c2(e23[i4], e23, o3); if (u3.type !== "throw") { var l3 = u3.arg, f3 = l3.value; return f3 && Li(f3) == "object" && n2.call(f3, "__await") ? t3.resolve(f3.__await).then(function(e24) { r3("next", e24, a3, s3); }, function(e24) { r3("throw", e24, a3, s3); }) : t3.resolve(f3).then(function(e24) { l3.value = e24, a3(l3); }, function(e24) { return r3("throw", e24, a3, s3); }); } s3(u3.arg); } var i3; this._invoke = function(e24, n3) { function o3() { return new t3(function(t4, i4) { r3(e24, n3, t4, i4); }); } return i3 = i3 ? i3.then(o3, o3) : o3(); }; } function k2(e23, t3) { var n3 = e23.iterator[t3.method]; if (n3 === void 0) { if (t3.delegate = null, t3.method === "throw") { if (e23.iterator.return && (t3.method = "return", t3.arg = void 0, k2(e23, t3), t3.method === "throw")) return l2; t3.method = "throw", t3.arg = new TypeError("The iterator does not provide a 'throw' method"); } return l2; } var r3 = c2(n3, e23.iterator, t3.arg); if (r3.type === "throw") return t3.method = "throw", t3.arg = r3.arg, t3.delegate = null, l2; var i3 = r3.arg; return i3 ? i3.done ? (t3[e23.resultName] = i3.value, t3.next = e23.nextLoc, t3.method !== "return" && (t3.method = "next", t3.arg = void 0), t3.delegate = null, l2) : i3 : (t3.method = "throw", t3.arg = new TypeError("iterator result is not an object"), t3.delegate = null, l2); } function w2(e23) { var t3 = { tryLoc: e23[0] }; 1 in e23 && (t3.catchLoc = e23[1]), 2 in e23 && (t3.finallyLoc = e23[2], t3.afterLoc = e23[3]), this.tryEntries.push(t3); } function x2(e23) { var t3 = e23.completion || {}; t3.type = "normal", delete t3.arg, e23.completion = t3; } function j2(e23) { this.tryEntries = [{ tryLoc: "root" }], e23.forEach(w2, this), this.reset(true); } function S2(e23) { if (e23) { var t3 = e23[i2]; if (t3) return t3.call(e23); if (typeof e23.next == "function") return e23; if (!isNaN(e23.length)) { var r3 = -1, o3 = function t4() { for (; ++r3 < e23.length; ) if (n2.call(e23, r3)) return t4.value = e23[r3], t4.done = false, t4; return t4.value = void 0, t4.done = true, t4; }; return o3.next = o3; } } return { next: C2 }; } function C2() { return { value: void 0, done: true }; } return h2.prototype = d2, s2(g2, "constructor", d2), s2(d2, "constructor", h2), h2.displayName = s2(d2, a2, "GeneratorFunction"), e22.isGeneratorFunction = function(e23) { var t3 = typeof e23 == "function" && e23.constructor; return !!t3 && (t3 === h2 || (t3.displayName || t3.name) === "GeneratorFunction"); }, e22.mark = function(e23) { return Object.setPrototypeOf ? Object.setPrototypeOf(e23, d2) : (e23.__proto__ = d2, s2(e23, a2, "GeneratorFunction")), e23.prototype = Object.create(g2), e23; }, e22.awrap = function(e23) { return { __await: e23 }; }, y2(b2.prototype), s2(b2.prototype, o2, function() { return this; }), e22.AsyncIterator = b2, e22.async = function(t3, n3, r3, i3, o3) { o3 === void 0 && (o3 = Promise); var a3 = new b2(u2(t3, n3, r3, i3), o3); return e22.isGeneratorFunction(n3) ? a3 : a3.next().then(function(e23) { return e23.done ? e23.value : a3.next(); }); }, y2(g2), s2(g2, a2, "Generator"), s2(g2, i2, function() { return this; }), s2(g2, "toString", function() { return "[object Generator]"; }), e22.keys = function(e23) { var t3 = []; for (var n3 in e23) t3.push(n3); return t3.reverse(), function n4() { for (; t3.length; ) { var r3 = t3.pop(); if (r3 in e23) return n4.value = r3, n4.done = false, n4; } return n4.done = true, n4; }; }, e22.values = S2, j2.prototype = { constructor: j2, reset: function(e23) { if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = false, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(x2), !e23) for (var t3 in this) t3.charAt(0) === "t" && n2.call(this, t3) && !isNaN(+t3.slice(1)) && (this[t3] = void 0); }, stop: function() { this.done = true; var e23 = this.tryEntries[0].completion; if (e23.type === "throw") throw e23.arg; return this.rval; }, dispatchException: function(e23) { if (this.done) throw e23; var t3 = this; function r3(n3, r4) { return a3.type = "throw", a3.arg = e23, t3.next = n3, r4 && (t3.method = "next", t3.arg = void 0), !!r4; } for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { var o3 = this.tryEntries[i3], a3 = o3.completion; if (o3.tryLoc === "root") return r3("end"); if (o3.tryLoc <= this.prev) { var s3 = n2.call(o3, "catchLoc"), u3 = n2.call(o3, "finallyLoc"); if (s3 && u3) { if (this.prev < o3.catchLoc) return r3(o3.catchLoc, true); if (this.prev < o3.finallyLoc) return r3(o3.finallyLoc); } else if (s3) { if (this.prev < o3.catchLoc) return r3(o3.catchLoc, true); } else { if (!u3) throw new Error("try statement without catch or finally"); if (this.prev < o3.finallyLoc) return r3(o3.finallyLoc); } } } }, abrupt: function(e23, t3) { for (var r3 = this.tryEntries.length - 1; r3 >= 0; --r3) { var i3 = this.tryEntries[r3]; if (i3.tryLoc <= this.prev && n2.call(i3, "finallyLoc") && this.prev < i3.finallyLoc) { var o3 = i3; break; } } o3 && (e23 === "break" || e23 === "continue") && o3.tryLoc <= t3 && t3 <= o3.finallyLoc && (o3 = null); var a3 = o3 ? o3.completion : {}; return a3.type = e23, a3.arg = t3, o3 ? (this.method = "next", this.next = o3.finallyLoc, l2) : this.complete(a3); }, complete: function(e23, t3) { if (e23.type === "throw") throw e23.arg; return e23.type === "break" || e23.type === "continue" ? this.next = e23.arg : e23.type === "return" ? (this.rval = this.arg = e23.arg, this.method = "return", this.next = "end") : e23.type === "normal" && t3 && (this.next = t3), l2; }, finish: function(e23) { for (var t3 = this.tryEntries.length - 1; t3 >= 0; --t3) { var n3 = this.tryEntries[t3]; if (n3.finallyLoc === e23) return this.complete(n3.completion, n3.afterLoc), x2(n3), l2; } }, catch: function(e23) { for (var t3 = this.tryEntries.length - 1; t3 >= 0; --t3) { var n3 = this.tryEntries[t3]; if (n3.tryLoc === e23) { var r3 = n3.completion; if (r3.type === "throw") { var i3 = r3.arg; x2(n3); } return i3; } } throw new Error("illegal catch attempt"); }, delegateYield: function(e23, t3, n3) { return this.delegate = { iterator: S2(e23), resultName: t3, nextLoc: n3 }, this.method === "next" && (this.arg = void 0), l2; } }, e22; } function gi(e22, t2, n2, r2, i2, o2, a2) { try { var s2 = e22[o2](a2), u2 = s2.value; } catch (e23) { return void n2(e23); } s2.done ? t2(u2) : Promise.resolve(u2).then(r2, i2); } function yi(e22) { return function() { var t2 = this, n2 = arguments; return new Promise(function(r2, i2) { var o2 = e22.apply(t2, n2); function a2(e23) { gi(o2, r2, i2, a2, s2, "next", e23); } function s2(e23) { gi(o2, r2, i2, a2, s2, "throw", e23); } a2(void 0); }); }; } function bi(e22, t2) { var n2 = typeof Symbol != "undefined" && e22[Symbol.iterator] || e22["@@iterator"]; if (!n2) { if (Array.isArray(e22) || (n2 = Ti(e22)) || t2 && e22 && typeof e22.length == "number") { n2 && (e22 = n2); var r2 = 0, i2 = function() { }; return { s: i2, n: function() { return r2 >= e22.length ? { done: true } : { done: false, value: e22[r2++] }; }, e: function(e23) { throw e23; }, f: i2 }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o2, a2 = true, s2 = false; return { s: function() { n2 = n2.call(e22); }, n: function() { var e23 = n2.next(); return a2 = e23.done, e23; }, e: function(e23) { s2 = true, o2 = e23; }, f: function() { try { a2 || n2.return == null || n2.return(); } finally { if (s2) throw o2; } } }; } function ki(e22, t2) { return function(e23) { if (Array.isArray(e23)) return e23; }(e22) || function(e23, t3) { var n2 = e23 == null ? null : typeof Symbol != "undefined" && e23[Symbol.iterator] || e23["@@iterator"]; if (n2 == null) return; var r2, i2, o2 = [], a2 = true, s2 = false; try { for (n2 = n2.call(e23); !(a2 = (r2 = n2.next()).done) && (o2.push(r2.value), !t3 || o2.length !== t3); a2 = true) ; } catch (e24) { s2 = true, i2 = e24; } finally { try { a2 || n2.return == null || n2.return(); } finally { if (s2) throw i2; } } return o2; }(e22, t2) || Ti(e22, t2) || function() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }(); } function wi(e22, t2) { var n2 = Object.keys(e22); if (Object.getOwnPropertySymbols) { var r2 = Object.getOwnPropertySymbols(e22); t2 && (r2 = r2.filter(function(t3) { return Object.getOwnPropertyDescriptor(e22, t3).enumerable; })), n2.push.apply(n2, r2); } return n2; } function xi(e22) { for (var t2 = 1; t2 < arguments.length; t2++) { var n2 = arguments[t2] != null ? arguments[t2] : {}; t2 % 2 ? wi(Object(n2), true).forEach(function(t3) { ji(e22, t3, n2[t3]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e22, Object.getOwnPropertyDescriptors(n2)) : wi(Object(n2)).forEach(function(t3) { Object.defineProperty(e22, t3, Object.getOwnPropertyDescriptor(n2, t3)); }); } return e22; } function ji(e22, t2, n2) { return t2 in e22 ? Object.defineProperty(e22, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e22[t2] = n2, e22; } function Si() { return (Si = typeof Reflect != "undefined" && Reflect.get ? Reflect.get.bind() : function(e22, t2, n2) { var r2 = Ci(e22, t2); if (r2) { var i2 = Object.getOwnPropertyDescriptor(r2, t2); return i2.get ? i2.get.call(arguments.length < 3 ? e22 : n2) : i2.value; } }).apply(this, arguments); } function Ci(e22, t2) { for (; !Object.prototype.hasOwnProperty.call(e22, t2) && (e22 = Pi(e22)) !== null; ) ; return e22; } function _i(e22, t2) { if (typeof t2 != "function" && t2 !== null) throw new TypeError("Super expression must either be null or a function"); e22.prototype = Object.create(t2 && t2.prototype, { constructor: { value: e22, writable: true, configurable: true } }), Object.defineProperty(e22, "prototype", { writable: false }), t2 && $i(e22, t2); } function $i(e22, t2) { return ($i = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e23, t3) { return e23.__proto__ = t3, e23; })(e22, t2); } function Oi(e22) { var t2 = Ei(); return function() { var n2, r2 = Pi(e22); if (t2) { var i2 = Pi(this).constructor; n2 = Reflect.construct(r2, arguments, i2); } else n2 = r2.apply(this, arguments); return Ai(this, n2); }; } function Ai(e22, t2) { if (t2 && (Li(t2) === "object" || typeof t2 == "function")) return t2; if (t2 !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); return Mi(e22); } function Mi(e22) { if (e22 === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e22; } function Ei() { if (typeof Reflect == "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy == "function") return true; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), true; } catch (e22) { return false; } } function Pi(e22) { return (Pi = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e23) { return e23.__proto__ || Object.getPrototypeOf(e23); })(e22); } function Ni(e22) { return function(e23) { if (Array.isArray(e23)) return Ii(e23); }(e22) || function(e23) { if (typeof Symbol != "undefined" && e23[Symbol.iterator] != null || e23["@@iterator"] != null) return Array.from(e23); }(e22) || Ti(e22) || function() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }(); } function Ti(e22, t2) { if (e22) { if (typeof e22 == "string") return Ii(e22, t2); var n2 = Object.prototype.toString.call(e22).slice(8, -1); return n2 === "Object" && e22.constructor && (n2 = e22.constructor.name), n2 === "Map" || n2 === "Set" ? Array.from(e22) : n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? Ii(e22, t2) : void 0; } } function Ii(e22, t2) { (t2 == null || t2 > e22.length) && (t2 = e22.length); for (var n2 = 0, r2 = new Array(t2); n2 < t2; n2++) r2[n2] = e22[n2]; return r2; } function Ri(e22, t2) { if (!(e22 instanceof t2)) throw new TypeError("Cannot call a class as a function"); } function Di(e22, t2) { for (var n2 = 0; n2 < t2.length; n2++) { var r2 = t2[n2]; r2.enumerable = r2.enumerable || false, r2.configurable = true, "value" in r2 && (r2.writable = true), Object.defineProperty(e22, r2.key, r2); } } function zi(e22, t2, n2) { return t2 && Di(e22.prototype, t2), n2 && Di(e22, n2), Object.defineProperty(e22, "prototype", { writable: false }), e22; } function Li(e22) { return (Li = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e23) { return typeof e23; } : function(e23) { return e23 && typeof Symbol == "function" && e23.constructor === Symbol && e23 !== Symbol.prototype ? "symbol" : typeof e23; })(e22); } function Bi() { } var qi = function(e22) { return e22; }; function Fi(e22, t2) { for (var n2 in t2) e22[n2] = t2[n2]; return e22; } function Vi(e22) { return e22(); } function Hi() { return /* @__PURE__ */ Object.create(null); } function Wi(e22) { e22.forEach(Vi); } function Ji(e22) { return typeof e22 == "function"; } function Ui(e22, t2) { return e22 != e22 ? t2 == t2 : e22 !== t2 || e22 && Li(e22) === "object" || typeof e22 == "function"; } function Ki(e22, t2) { return e22 != e22 ? t2 == t2 : e22 !== t2; } function Gi(e22, t2, n2, r2) { if (e22) { var i2 = Qi(e22, t2, n2, r2); return e22[0](i2); } } function Qi(e22, t2, n2, r2) { return e22[1] && r2 ? Fi(n2.ctx.slice(), e22[1](r2(t2))) : n2.ctx; } function Yi(e22, t2, n2, r2) { if (e22[2] && r2) { var i2 = e22[2](r2(n2)); if (t2.dirty === void 0) return i2; if (Li(i2) === "object") { for (var o2 = [], a2 = Math.max(t2.dirty.length, i2.length), s2 = 0; s2 < a2; s2 += 1) o2[s2] = t2.dirty[s2] | i2[s2]; return o2; } return t2.dirty | i2; } return t2.dirty; } function Zi(e22, t2, n2, r2, i2, o2) { if (i2) { var a2 = Qi(t2, n2, r2, o2); e22.p(a2, i2); } } function Xi(e22) { if (e22.ctx.length > 32) { for (var t2 = [], n2 = e22.ctx.length / 32, r2 = 0; r2 < n2; r2++) t2[r2] = -1; return t2; } return -1; } function eo(e22) { return e22 == null ? "" : e22; } function to(e22) { return e22 && Ji(e22.destroy) ? e22.destroy : Bi; } var no, ro = typeof window != "undefined", io = ro ? function() { return window.performance.now(); } : function() { return Date.now(); }, oo = ro ? function(e22) { return requestAnimationFrame(e22); } : Bi, ao = /* @__PURE__ */ new Set(); function so(e22) { ao.forEach(function(t2) { t2.c(e22) || (ao.delete(t2), t2.f()); }), ao.size !== 0 && oo(so); } function uo(e22, t2) { e22.appendChild(t2); } function co(e22, t2, n2) { var r2 = lo(e22); if (!r2.getElementById(t2)) { var i2 = go("style"); i2.id = t2, i2.textContent = n2, ho(r2, i2); } } function lo(e22) { if (!e22) return document; var t2 = e22.getRootNode ? e22.getRootNode() : e22.ownerDocument; return t2 && t2.host ? t2 : e22.ownerDocument; } function fo(e22) { var t2 = go("style"); return ho(lo(e22), t2), t2.sheet; } function ho(e22, t2) { uo(e22.head || e22, t2); } function vo(e22, t2, n2) { e22.insertBefore(t2, n2 || null); } function po(e22) { e22.parentNode.removeChild(e22); } function mo(e22, t2) { for (var n2 = 0; n2 < e22.length; n2 += 1) e22[n2] && e22[n2].d(t2); } function go(e22) { return document.createElement(e22); } function yo(e22) { return document.createElementNS("http://www.w3.org/2000/svg", e22); } function bo(e22) { return document.createTextNode(e22); } function ko() { return bo(" "); } function wo() { return bo(""); } function xo(e22, t2, n2, r2) { return e22.addEventListener(t2, n2, r2), function() { return e22.removeEventListener(t2, n2, r2); }; } function jo(e22) { return function(t2) { return t2.stopPropagation(), e22.call(this, t2); }; } function So(e22, t2, n2) { n2 == null ? e22.removeAttribute(t2) : e22.getAttribute(t2) !== n2 && e22.setAttribute(t2, n2); } function Co(e22, t2) { var n2 = Object.getOwnPropertyDescriptors(e22.__proto__); for (var r2 in t2) t2[r2] == null ? e22.removeAttribute(r2) : r2 === "style" ? e22.style.cssText = t2[r2] : r2 === "__value" ? e22.value = e22[r2] = t2[r2] : n2[r2] && n2[r2].set ? e22[r2] = t2[r2] : So(e22, r2, t2[r2]); } function _o(e22, t2) { for (var n2 in t2) So(e22, n2, t2[n2]); } function $o(e22, t2, n2) { t2 in e22 ? e22[t2] = typeof e22[t2] == "boolean" && n2 === "" || n2 : So(e22, t2, n2); } function Oo(e22) { return Array.from(e22.childNodes); } function Ao(e22, t2) { t2 = "" + t2, e22.wholeText !== t2 && (e22.data = t2); } function Mo(e22, t2) { e22.value = t2 == null ? "" : t2; } function Eo(e22, t2, n2, r2) { n2 === null ? e22.style.removeProperty(t2) : e22.style.setProperty(t2, n2, r2 ? "important" : ""); } function Po(e22, t2) { for (var n2 = 0; n2 < e22.options.length; n2 += 1) { var r2 = e22.options[n2]; if (r2.__value === t2) return void (r2.selected = true); } e22.selectedIndex = -1; } function No() { if (no === void 0) { no = false; try { typeof window != "undefined" && window.parent && window.parent.document; } catch (e22) { no = true; } } return no; } function To(e22, t2, n2) { e22.classList[n2 ? "add" : "remove"](t2); } function Io(e22, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r2 = n2.bubbles, i2 = r2 !== void 0 && r2, o2 = n2.cancelable, a2 = o2 !== void 0 && o2, s2 = document.createEvent("CustomEvent"); return s2.initCustomEvent(e22, i2, a2, t2), s2; } var Ro, Do = function() { function e22() { var t2 = arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; Ri(this, e22), this.is_svg = false, this.is_svg = t2, this.e = this.n = null; } return zi(e22, [{ key: "c", value: function(e23) { this.h(e23); } }, { key: "m", value: function(e23, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; this.e || (this.is_svg ? this.e = yo(t2.nodeName) : this.e = go(t2.nodeName), this.t = t2, this.c(e23)), this.i(n2); } }, { key: "h", value: function(e23) { this.e.innerHTML = e23, this.n = Array.from(this.e.childNodes); } }, { key: "i", value: function(e23) { for (var t2 = 0; t2 < this.n.length; t2 += 1) vo(this.t, this.n[t2], e23); } }, { key: "p", value: function(e23) { this.d(), this.h(e23), this.i(this.a); } }, { key: "d", value: function() { this.n.forEach(po); } }]), e22; }(), zo = /* @__PURE__ */ new Map(), Lo = 0; function Bo(e22) { for (var t2 = 5381, n2 = e22.length; n2--; ) t2 = (t2 << 5) - t2 ^ e22.charCodeAt(n2); return t2 >>> 0; } function qo(e22, t2) { var n2 = { stylesheet: fo(t2), rules: {} }; return zo.set(e22, n2), n2; } function Fo(e22, t2, n2, r2, i2, o2, a2) { for (var s2 = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : 0, u2 = 16.666 / r2, c2 = "{\n", l2 = 0; l2 <= 1; l2 += u2) { var f2 = t2 + (n2 - t2) * o2(l2); c2 += 100 * l2 + "%{".concat(a2(f2, 1 - f2), "}\n"); } var h2 = c2 + "100% {".concat(a2(n2, 1 - n2), "}\n}"), d2 = "__svelte_".concat(Bo(h2), "_").concat(s2), v2 = lo(e22), p2 = zo.get(v2) || qo(v2, e22), m2 = p2.stylesheet, g2 = p2.rules; g2[d2] || (g2[d2] = true, m2.insertRule("@keyframes ".concat(d2, " ").concat(h2), m2.cssRules.length)); var y2 = e22.style.animation || ""; return e22.style.animation = "".concat(y2 ? "".concat(y2, ", ") : "").concat(d2, " ").concat(r2, "ms linear ").concat(i2, "ms 1 both"), Lo += 1, d2; } function Vo(e22, t2) { var n2 = (e22.style.animation || "").split(", "), r2 = n2.filter(t2 ? function(e23) { return e23.indexOf(t2) < 0; } : function(e23) { return e23.indexOf("__svelte") === -1; }), i2 = n2.length - r2.length; i2 && (e22.style.animation = r2.join(", "), (Lo -= i2) || oo(function() { Lo || (zo.forEach(function(e23) { for (var t3 = e23.stylesheet, n3 = t3.cssRules.length; n3--; ) t3.deleteRule(n3); e23.rules = {}; }), zo.clear()); })); } function Ho(e22) { Ro = e22; } function Wo() { if (!Ro) throw new Error("Function called outside component initialization"); return Ro; } function Jo(e22) { Wo().$$.before_update.push(e22); } function Uo(e22) { Wo().$$.on_mount.push(e22); } function Ko(e22) { Wo().$$.on_destroy.push(e22); } function Go() { var e22 = Wo(); return function(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i2 = r2.cancelable, o2 = i2 !== void 0 && i2, a2 = e22.$$.callbacks[t2]; if (a2) { var s2 = Io(t2, n2, { cancelable: o2 }); return a2.slice().forEach(function(t3) { t3.call(e22, s2); }), !s2.defaultPrevented; } return true; }; } function Qo(e22, t2) { return Wo().$$.context.set(e22, t2), t2; } function Yo(e22) { return Wo().$$.context.get(e22); } var Zo = [], Xo = [], ea = [], ta = [], na = Promise.resolve(), ra = false; function ia() { ra || (ra = true, na.then(fa)); } function oa() { return ia(), na; } function aa(e22) { ea.push(e22); } function sa(e22) { ta.push(e22); } var ua, ca = /* @__PURE__ */ new Set(), la = 0; function fa() { var e22 = Ro; do { for (; la < Zo.length; ) { var t2 = Zo[la]; la++, Ho(t2), ha(t2.$$); } for (Ho(null), Zo.length = 0, la = 0; Xo.length; ) Xo.pop()(); for (var n2 = 0; n2 < ea.length; n2 += 1) { var r2 = ea[n2]; ca.has(r2) || (ca.add(r2), r2()); } ea.length = 0; } while (Zo.length); for (; ta.length; ) ta.pop()(); ra = false, ca.clear(), Ho(e22); } function ha(e22) { if (e22.fragment !== null) { e22.update(), Wi(e22.before_update); var t2 = e22.dirty; e22.dirty = [-1], e22.fragment && e22.fragment.p(e22.ctx, t2), e22.after_update.forEach(aa); } } function da(e22, t2, n2) { e22.dispatchEvent(Io("".concat(t2 ? "intro" : "outro").concat(n2))); } var va, pa = /* @__PURE__ */ new Set(); function ma() { va = { r: 0, c: [], p: va }; } function ga() { va.r || Wi(va.c), va = va.p; } function ya(e22, t2) { e22 && e22.i && (pa.delete(e22), e22.i(t2)); } function ba(e22, t2, n2, r2) { if (e22 && e22.o) { if (pa.has(e22)) return; pa.add(e22), va.c.push(function() { pa.delete(e22), r2 && (n2 && e22.d(1), r2()); }), e22.o(t2); } } var ka = { duration: 0 }; function wa(e22, t2, n2, r2) { var i2 = t2(e22, n2), o2 = r2 ? 0 : 1, a2 = null, s2 = null, u2 = null; function c2() { u2 && Vo(e22, u2); } function l2(e23, t3) { var n3 = e23.b - o2; return t3 *= Math.abs(n3), { a: o2, b: e23.b, d: n3, duration: t3, start: e23.start, end: e23.start + t3, group: e23.group }; } function f2(t3) { var n3, r3 = i2 || ka, f3 = r3.delay, h2 = f3 === void 0 ? 0 : f3, d2 = r3.duration, v2 = d2 === void 0 ? 300 : d2, p2 = r3.easing, m2 = p2 === void 0 ? qi : p2, g2 = r3.tick, y2 = g2 === void 0 ? Bi : g2, b2 = r3.css, k2 = { start: io() + h2, b: t3 }; t3 || (k2.group = va, va.r += 1), a2 || s2 ? s2 = k2 : (b2 && (c2(), u2 = Fo(e22, o2, t3, v2, h2, m2, b2)), t3 && y2(0, 1), a2 = l2(k2, v2), aa(function() { return da(e22, t3, "start"); }), n3 = function(t4) { if (s2 && t4 > s2.start && (a2 = l2(s2, v2), s2 = null, da(e22, a2.b, "start"), b2 && (c2(), u2 = Fo(e22, o2, a2.b, a2.duration, 0, m2, i2.css))), a2) { if (t4 >= a2.end) y2(o2 = a2.b, 1 - o2), da(e22, a2.b, "end"), s2 || (a2.b ? c2() : --a2.group.r || Wi(a2.group.c)), a2 = null; else if (t4 >= a2.start) { var n4 = t4 - a2.start; o2 = a2.a + a2.d * m2(n4 / a2.duration), y2(o2, 1 - o2); } } return !(!a2 && !s2); }, ao.size === 0 && oo(so), new Promise(function(e23) { ao.add({ c: n3, f: e23 }); })); } return { run: function(e23) { Ji(i2) ? (ua || (ua = Promise.resolve()).then(function() { ua = null; }), ua).then(function() { i2 = i2(), f2(e23); }) : f2(e23); }, end: function() { c2(), a2 = s2 = null; } }; } var xa = typeof window != "undefined" ? window : typeof globalThis != "undefined" ? globalThis : global; function ja(e22, t2) { e22.d(1), t2.delete(e22.key); } function Sa(e22, t2) { ba(e22, 1, 1, function() { t2.delete(e22.key); }); } function Ca(e22, t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2) { for (var h2 = e22.length, d2 = o2.length, v2 = h2, p2 = {}; v2--; ) p2[e22[v2].key] = v2; var m2 = [], g2 = /* @__PURE__ */ new Map(), y2 = /* @__PURE__ */ new Map(); for (v2 = d2; v2--; ) { var b2 = f2(i2, o2, v2), k2 = n2(b2), w2 = a2.get(k2); w2 ? r2 && w2.p(b2, t2) : (w2 = c2(k2, b2)).c(), g2.set(k2, m2[v2] = w2), k2 in p2 && y2.set(k2, Math.abs(v2 - p2[k2])); } var x2 = /* @__PURE__ */ new Set(), j2 = /* @__PURE__ */ new Set(); function S2(e23) { ya(e23, 1), e23.m(s2, l2), a2.set(e23.key, e23), l2 = e23.first, d2--; } for (; h2 && d2; ) { var C2 = m2[d2 - 1], _2 = e22[h2 - 1], $2 = C2.key, O2 = _2.key; C2 === _2 ? (l2 = C2.first, h2--, d2--) : g2.has(O2) ? !a2.has($2) || x2.has($2) ? S2(C2) : j2.has(O2) ? h2-- : y2.get($2) > y2.get(O2) ? (j2.add($2), S2(C2)) : (x2.add(O2), h2--) : (u2(_2, a2), h2--); } for (; h2--; ) { var A2 = e22[h2]; g2.has(A2.key) || u2(A2, a2); } for (; d2; ) S2(m2[d2 - 1]); return m2; } function _a(e22, t2) { for (var n2 = {}, r2 = {}, i2 = { $$scope: 1 }, o2 = e22.length; o2--; ) { var a2 = e22[o2], s2 = t2[o2]; if (s2) { for (var u2 in a2) u2 in s2 || (r2[u2] = 1); for (var c2 in s2) i2[c2] || (n2[c2] = s2[c2], i2[c2] = 1); e22[o2] = s2; } else for (var l2 in a2) i2[l2] = 1; } for (var f2 in r2) f2 in n2 || (n2[f2] = void 0); return n2; } function $a(e22) { return Li(e22) === "object" && e22 !== null ? e22 : {}; } function Oa(e22, t2, n2) { var r2 = e22.$$.props[t2]; r2 !== void 0 && (e22.$$.bound[r2] = n2, n2(e22.$$.ctx[r2])); } function Aa(e22) { e22 && e22.c(); } function Ma(e22, t2, n2, r2) { var i2 = e22.$$, o2 = i2.fragment, a2 = i2.on_mount, s2 = i2.on_destroy, u2 = i2.after_update; o2 && o2.m(t2, n2), r2 || aa(function() { var t3 = a2.map(Vi).filter(Ji); s2 ? s2.push.apply(s2, Ni(t3)) : Wi(t3), e22.$$.on_mount = []; }), u2.forEach(aa); } function Ea(e22, t2) { var n2 = e22.$$; n2.fragment !== null && (Wi(n2.on_destroy), n2.fragment && n2.fragment.d(t2), n2.on_destroy = n2.fragment = null, n2.ctx = []); } function Pa(e22, t2) { e22.$$.dirty[0] === -1 && (Zo.push(e22), ia(), e22.$$.dirty.fill(0)), e22.$$.dirty[t2 / 31 | 0] |= 1 << t2 % 31; } function Na(e22, t2, n2, r2, i2, o2, a2) { var s2 = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [-1], u2 = Ro; Ho(e22); var c2 = e22.$$ = { fragment: null, ctx: null, props: o2, update: Bi, not_equal: i2, bound: Hi(), on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(t2.context || (u2 ? u2.$$.context : [])), callbacks: Hi(), dirty: s2, skip_bound: false, root: t2.target || u2.$$.root }; a2 && a2(c2.root); var l2 = false; if (c2.ctx = n2 ? n2(e22, t2.props || {}, function(t3, n3) { var r3 = !(arguments.length <= 2) && arguments.length - 2 ? arguments.length <= 2 ? void 0 : arguments[2] : n3; return c2.ctx && i2(c2.ctx[t3], c2.ctx[t3] = r3) && (!c2.skip_bound && c2.bound[t3] && c2.bound[t3](r3), l2 && Pa(e22, t3)), n3; }) : [], c2.update(), l2 = true, Wi(c2.before_update), c2.fragment = !!r2 && r2(c2.ctx), t2.target) { if (t2.hydrate) { var f2 = Oo(t2.target); c2.fragment && c2.fragment.l(f2), f2.forEach(po); } else c2.fragment && c2.fragment.c(); t2.intro && ya(e22.$$.fragment), Ma(e22, t2.target, t2.anchor, t2.customElement), fa(); } Ho(u2); } var Ta = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "$destroy", value: function() { Ea(this, 1), this.$destroy = Bi; } }, { key: "$on", value: function(e23, t2) { var n2 = this.$$.callbacks[e23] || (this.$$.callbacks[e23] = []); return n2.push(t2), function() { var e24 = n2.indexOf(t2); e24 !== -1 && n2.splice(e24, 1); }; } }, { key: "$set", value: function(e23) { var t2; this.$$set && (t2 = e23, Object.keys(t2).length !== 0) && (this.$$.skip_bound = true, this.$$set(e23), this.$$.skip_bound = false); } }]), e22; }(), Ia = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { if (Ri(this, n2), !e23 || !e23.target && !e23.$$inline) throw new Error("'target' is a required option"); return t2.call(this); } return zi(n2, [{ key: "$destroy", value: function() { Si(Pi(n2.prototype), "$destroy", this).call(this), this.$destroy = function() { console.warn("Component was already destroyed"); }; } }, { key: "$capture_state", value: function() { } }, { key: "$inject_state", value: function() { } }]), n2; }(), Ra = function(e22) { _i(n2, Ia); var t2 = Oi(n2); function n2(e23) { return Ri(this, n2), t2.call(this, e23); } return zi(n2); }(); function Da(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !!La("debug"); if (t2) { var n2 = Ba(e22); return function() { for (var t3, r2 = arguments.length, i2 = new Array(r2), o2 = 0; o2 < r2; o2++) i2[o2] = arguments[o2]; (t3 = console).log.apply(t3, ["%c".concat(e22), "color:".concat(n2)].concat(i2)); }; } return za; } function za() { } function La(e22) { try { if (typeof window != "undefined" && window.localStorage !== void 0) return window.localStorage[e22]; } catch (e23) { } } function Ba(e22) { for (var t2 = 0, n2 = 0; n2 < e22.length; n2++) t2 = (t2 << 5) - t2 + e22.charCodeAt(n2), t2 |= 0; return qa[Math.abs(t2) % qa.length]; } var qa = ["#0000CC", "#0099FF", "#009400", "#8dd200", "#CCCC00", "#CC9933", "#ae04e7", "#ff35d7", "#FF3333", "#FF6600", "#FF9933", "#FFCC33"]; function Fa(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n2 = t2.delay, r2 = n2 === void 0 ? 0 : n2, i2 = t2.duration, o2 = i2 === void 0 ? 400 : i2, a2 = t2.easing, s2 = a2 === void 0 ? qi : a2, u2 = +getComputedStyle(e22).opacity; return { delay: r2, duration: o2, easing: s2, css: function(e23) { return "opacity: ".concat(e23 * u2); } }; } var Va = xa.window; function Ha(e22) { co(e22, "svelte-g4wg3a", ".svelte-g4wg3a{box-sizing:border-box}.bg.svelte-g4wg3a{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}.wrap.svelte-g4wg3a{position:relative;margin:2rem;max-height:100%}.window.svelte-g4wg3a{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-g4wg3a{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-g4wg3a{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-g4wg3a:before,.close.svelte-g4wg3a:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-g4wg3a:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-g4wg3a:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-g4wg3a:hover{background:black}.close.svelte-g4wg3a:hover:before,.close.svelte-g4wg3a:hover:after{height:2px;background:white}.close.svelte-g4wg3a:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-g4wg3a:active{transform:scale(0.9)}.close.svelte-g4wg3a:hover,.close.svelte-g4wg3a:focus,.close.svelte-g4wg3a:active{outline:none}"); } function Wa(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2 = e22[1].closeButton && Ja(e22), b2 = e22[2]; return b2 && (a2 = new b2({})), { c: function() { t2 = go("div"), n2 = go("div"), r2 = go("div"), y2 && y2.c(), i2 = ko(), o2 = go("div"), a2 && Aa(a2.$$.fragment), So(o2, "class", s2 = eo(e22[1].classContent) + " svelte-g4wg3a"), So(o2, "style", e22[9]), To(o2, "content", !e22[0]), So(r2, "class", u2 = eo(e22[1].classWindow) + " svelte-g4wg3a"), So(r2, "role", "dialog"), So(r2, "aria-modal", "true"), So(r2, "aria-label", c2 = e22[1].ariaLabelledBy ? null : e22[1].ariaLabel || null), So(r2, "aria-labelledby", l2 = e22[1].ariaLabelledBy || null), So(r2, "style", e22[8]), To(r2, "window", !e22[0]), So(n2, "class", h2 = eo(e22[1].classWindowWrap) + " svelte-g4wg3a"), So(n2, "style", e22[7]), To(n2, "wrap", !e22[0]), So(t2, "class", d2 = eo(e22[1].classBg) + " svelte-g4wg3a"), So(t2, "style", e22[6]), To(t2, "bg", !e22[0]); }, m: function(s3, u3) { vo(s3, t2, u3), uo(t2, n2), uo(n2, r2), y2 && y2.m(r2, null), uo(r2, i2), uo(r2, o2), a2 && Ma(a2, o2, null), e22[49](r2), e22[50](n2), e22[51](t2), p2 = true, m2 || (g2 = [xo(r2, "introstart", function() { Ji(e22[13]) && e22[13].apply(this, arguments); }), xo(r2, "outrostart", function() { Ji(e22[14]) && e22[14].apply(this, arguments); }), xo(r2, "introend", function() { Ji(e22[15]) && e22[15].apply(this, arguments); }), xo(r2, "outroend", function() { Ji(e22[16]) && e22[16].apply(this, arguments); }), xo(t2, "mousedown", e22[20]), xo(t2, "mouseup", e22[21])], m2 = true); }, p: function(f3, v3) { if ((e22 = f3)[1].closeButton ? y2 ? (y2.p(e22, v3), 2 & v3[0] && ya(y2, 1)) : ((y2 = Ja(e22)).c(), ya(y2, 1), y2.m(r2, i2)) : y2 && (ma(), ba(y2, 1, 1, function() { y2 = null; }), ga()), b2 !== (b2 = e22[2])) { if (a2) { ma(); var m3 = a2; ba(m3.$$.fragment, 1, 0, function() { Ea(m3, 1); }), ga(); } b2 ? (Aa((a2 = new b2({})).$$.fragment), ya(a2.$$.fragment, 1), Ma(a2, o2, null)) : a2 = null; } (!p2 || 2 & v3[0] && s2 !== (s2 = eo(e22[1].classContent) + " svelte-g4wg3a")) && So(o2, "class", s2), (!p2 || 512 & v3[0]) && So(o2, "style", e22[9]), 3 & v3[0] && To(o2, "content", !e22[0]), (!p2 || 2 & v3[0] && u2 !== (u2 = eo(e22[1].classWindow) + " svelte-g4wg3a")) && So(r2, "class", u2), (!p2 || 2 & v3[0] && c2 !== (c2 = e22[1].ariaLabelledBy ? null : e22[1].ariaLabel || null)) && So(r2, "aria-label", c2), (!p2 || 2 & v3[0] && l2 !== (l2 = e22[1].ariaLabelledBy || null)) && So(r2, "aria-labelledby", l2), (!p2 || 256 & v3[0]) && So(r2, "style", e22[8]), 3 & v3[0] && To(r2, "window", !e22[0]), (!p2 || 2 & v3[0] && h2 !== (h2 = eo(e22[1].classWindowWrap) + " svelte-g4wg3a")) && So(n2, "class", h2), (!p2 || 128 & v3[0]) && So(n2, "style", e22[7]), 3 & v3[0] && To(n2, "wrap", !e22[0]), (!p2 || 2 & v3[0] && d2 !== (d2 = eo(e22[1].classBg) + " svelte-g4wg3a")) && So(t2, "class", d2), (!p2 || 64 & v3[0]) && So(t2, "style", e22[6]), 3 & v3[0] && To(t2, "bg", !e22[0]); }, i: function(n3) { p2 || (ya(y2), a2 && ya(a2.$$.fragment, n3), aa(function() { f2 || (f2 = wa(r2, e22[12], e22[1].transitionWindowProps, true)), f2.run(1); }), aa(function() { v2 || (v2 = wa(t2, e22[11], e22[1].transitionBgProps, true)), v2.run(1); }), p2 = true); }, o: function(n3) { ba(y2), a2 && ba(a2.$$.fragment, n3), f2 || (f2 = wa(r2, e22[12], e22[1].transitionWindowProps, false)), f2.run(0), v2 || (v2 = wa(t2, e22[11], e22[1].transitionBgProps, false)), v2.run(0), p2 = false; }, d: function(n3) { n3 && po(t2), y2 && y2.d(), a2 && Ea(a2), e22[49](null), n3 && f2 && f2.end(), e22[50](null), e22[51](null), n3 && v2 && v2.end(), m2 = false, Wi(g2); } }; } function Ja(e22) { var t2, n2, r2, i2, o2, a2 = [Ka, Ua], s2 = []; function u2(e23, n3) { return 2 & n3[0] && (t2 = null), t2 == null && (t2 = !!e23[17](e23[1].closeButton)), t2 ? 0 : 1; } return n2 = u2(e22, [-1, -1, -1]), r2 = s2[n2] = a2[n2](e22), { c: function() { r2.c(), i2 = wo(); }, m: function(e23, t3) { s2[n2].m(e23, t3), vo(e23, i2, t3), o2 = true; }, p: function(e23, t3) { var o3 = n2; (n2 = u2(e23, t3)) === o3 ? s2[n2].p(e23, t3) : (ma(), ba(s2[o3], 1, 1, function() { s2[o3] = null; }), ga(), (r2 = s2[n2]) ? r2.p(e23, t3) : (r2 = s2[n2] = a2[n2](e23)).c(), ya(r2, 1), r2.m(i2.parentNode, i2)); }, i: function(e23) { o2 || (ya(r2), o2 = true); }, o: function(e23) { ba(r2), o2 = false; }, d: function(e23) { s2[n2].d(e23), e23 && po(i2); } }; } function Ua(e22) { var t2, n2, r2, i2; return { c: function() { So(t2 = go("button"), "class", n2 = eo(e22[1].classCloseButton) + " svelte-g4wg3a"), So(t2, "aria-label", "Close modal"), So(t2, "style", e22[10]), So(t2, "type", "button"), To(t2, "close", !e22[0]); }, m: function(n3, o2) { vo(n3, t2, o2), r2 || (i2 = xo(t2, "click", e22[18]), r2 = true); }, p: function(e23, r3) { 2 & r3[0] && n2 !== (n2 = eo(e23[1].classCloseButton) + " svelte-g4wg3a") && So(t2, "class", n2), 1024 & r3[0] && So(t2, "style", e23[10]), 3 & r3[0] && To(t2, "close", !e23[0]); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2), r2 = false, i2(); } }; } function Ka(e22) { var t2, n2, r2, i2 = e22[1].closeButton; function o2(e23) { return { props: { onClose: e23[18] } }; } return i2 && (t2 = new i2(o2(e22))), { c: function() { t2 && Aa(t2.$$.fragment), n2 = wo(); }, m: function(e23, i3) { t2 && Ma(t2, e23, i3), vo(e23, n2, i3), r2 = true; }, p: function(e23, r3) { if (i2 !== (i2 = e23[1].closeButton)) { if (t2) { ma(); var a2 = t2; ba(a2.$$.fragment, 1, 0, function() { Ea(a2, 1); }), ga(); } i2 ? (Aa((t2 = new i2(o2(e23))).$$.fragment), ya(t2.$$.fragment, 1), Ma(t2, n2.parentNode, n2)) : t2 = null; } }, i: function(e23) { r2 || (t2 && ya(t2.$$.fragment, e23), r2 = true); }, o: function(e23) { t2 && ba(t2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(n2), t2 && Ea(t2, e23); } }; } function Ga(e22) { var t2, n2, r2, i2, o2 = e22[2] && Wa(e22), a2 = e22[48].default, s2 = Gi(a2, e22, e22[47], null); return { c: function() { o2 && o2.c(), t2 = ko(), s2 && s2.c(); }, m: function(a3, u2) { o2 && o2.m(a3, u2), vo(a3, t2, u2), s2 && s2.m(a3, u2), n2 = true, r2 || (i2 = xo(Va, "keydown", e22[19]), r2 = true); }, p: function(e23, r3) { e23[2] ? o2 ? (o2.p(e23, r3), 4 & r3[0] && ya(o2, 1)) : ((o2 = Wa(e23)).c(), ya(o2, 1), o2.m(t2.parentNode, t2)) : o2 && (ma(), ba(o2, 1, 1, function() { o2 = null; }), ga()), s2 && s2.p && (!n2 || 65536 & r3[1]) && Zi(s2, a2, e23, e23[47], n2 ? Yi(a2, e23[47], r3, null) : Xi(e23[47]), null); }, i: function(e23) { n2 || (ya(o2), ya(s2, e23), n2 = true); }, o: function(e23) { ba(o2), ba(s2, e23), n2 = false; }, d: function(e23) { o2 && o2.d(e23), e23 && po(t2), s2 && s2.d(e23), r2 = false, i2(); } }; } function Qa(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return function(n2) { return new e22(xi(xi({}, n2), {}, { props: xi(xi({}, t2), n2.props) })); }; } function Ya(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2 = t2.$$slots, b2 = y2 === void 0 ? {} : y2, k2 = t2.$$scope, w2 = Go(), x2 = Qo, j2 = t2.isTabbable, S2 = j2 === void 0 ? function(e23) { return e23.tabIndex >= 0 && !e23.hidden && !e23.disabled && e23.style.display !== "none" && e23.type !== "hidden" && Boolean(e23.offsetWidth || e23.offsetHeight || e23.getClientRects().length); } : j2, C2 = t2.show, _2 = C2 === void 0 ? null : C2, $2 = t2.key, O2 = $2 === void 0 ? "simple-modal" : $2, A2 = t2.ariaLabel, M2 = A2 === void 0 ? null : A2, E2 = t2.ariaLabelledBy, P2 = E2 === void 0 ? null : E2, N2 = t2.closeButton, T2 = N2 === void 0 || N2, I2 = t2.closeOnEsc, R2 = I2 === void 0 || I2, D2 = t2.closeOnOuterClick, z2 = D2 === void 0 || D2, L2 = t2.styleBg, B2 = L2 === void 0 ? {} : L2, q2 = t2.styleWindowWrap, F2 = q2 === void 0 ? {} : q2, V2 = t2.styleWindow, H2 = V2 === void 0 ? {} : V2, W2 = t2.styleContent, J2 = W2 === void 0 ? {} : W2, U2 = t2.styleCloseButton, K2 = U2 === void 0 ? {} : U2, G2 = t2.classBg, Q2 = G2 === void 0 ? null : G2, Y2 = t2.classWindowWrap, Z2 = Y2 === void 0 ? null : Y2, X2 = t2.classWindow, ee2 = X2 === void 0 ? null : X2, te2 = t2.classContent, ne2 = te2 === void 0 ? null : te2, re2 = t2.classCloseButton, ie2 = re2 === void 0 ? null : re2, oe2 = t2.unstyled, ae2 = oe2 !== void 0 && oe2, se2 = t2.setContext, ue2 = se2 === void 0 ? x2 : se2, ce2 = t2.transitionBg, le2 = ce2 === void 0 ? Fa : ce2, fe2 = t2.transitionBgProps, he2 = fe2 === void 0 ? { duration: 250 } : fe2, de2 = t2.transitionWindow, ve2 = de2 === void 0 ? le2 : de2, pe2 = t2.transitionWindowProps, me2 = pe2 === void 0 ? he2 : pe2, ge2 = t2.disableFocusTrap, ye2 = ge2 !== void 0 && ge2, be2 = { ariaLabel: M2, ariaLabelledBy: P2, closeButton: T2, closeOnEsc: R2, closeOnOuterClick: z2, styleBg: B2, styleWindowWrap: F2, styleWindow: H2, styleContent: J2, styleCloseButton: K2, classBg: Q2, classWindowWrap: Z2, classWindow: ee2, classContent: ne2, classCloseButton: ie2, transitionBg: le2, transitionBgProps: he2, transitionWindow: ve2, transitionWindowProps: me2, disableFocusTrap: ye2, isTabbable: S2, unstyled: ae2 }, ke2 = xi({}, be2), we2 = null, xe2 = function(e23) { return e23 ? Object.keys(e23).reduce(function(t3, n3) { return "".concat(t3, "; ").concat(function(e24) { return e24.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase(); }(n3), ": ").concat(e23[n3]); }, "") : ""; }, je2 = function(e23) { return !!(e23 && e23.constructor && e23.call && e23.apply); }, Se2 = function() { n2(6, s2 = xe2(Object.assign({}, { width: window.innerWidth, height: window.innerHeight }, ke2.styleBg))), n2(7, u2 = xe2(ke2.styleWindowWrap)), n2(8, c2 = xe2(ke2.styleWindow)), n2(9, l2 = xe2(ke2.styleContent)), n2(10, f2 = xe2(ke2.styleCloseButton)), n2(11, h2 = ke2.transitionBg), n2(12, d2 = ke2.transitionWindow); }, Ce2 = function() { }, _e2 = Ce2, $e2 = Ce2, Oe2 = Ce2, Ae2 = Ce2, Me2 = function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i3 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; n2(2, we2 = Qa(e23, t3)), n2(1, ke2 = xi(xi({}, be2), r3)), Se2(), Pe2(), n2(13, _e2 = function(e24) { i3.onOpen && i3.onOpen(e24), w2("open"), w2("opening"); }), n2(14, $e2 = function(e24) { i3.onClose && i3.onClose(e24), w2("close"), w2("closing"); }), n2(15, Oe2 = function(e24) { i3.onOpened && i3.onOpened(e24), w2("opened"); }), n2(16, Ae2 = function(e24) { i3.onClosed && i3.onClosed(e24), w2("closed"); }); }, Ee2 = function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; we2 && (n2(14, $e2 = e23.onClose || $e2), n2(16, Ae2 = e23.onClosed || Ae2), n2(2, we2 = null), Ne2()); }, Pe2 = function() { a2 = window.scrollY, v2 = document.body.style.position, p2 = document.body.style.overflow, m2 = document.body.style.width, document.body.style.position = "fixed", document.body.style.top = "-".concat(a2, "px"), document.body.style.overflow = "hidden", document.body.style.width = "100%"; }, Ne2 = function() { document.body.style.position = v2 || "", document.body.style.top = "", document.body.style.overflow = p2 || "", document.body.style.width = m2 || "", window.scrollTo(0, a2); }; ue2(O2, { open: Me2, close: Ee2 }); var Te2 = false; return Ko(function() { Te2 && Ee2(); }), Uo(function() { n2(46, Te2 = true); }), e22.$$set = function(e23) { "isTabbable" in e23 && n2(22, S2 = e23.isTabbable), "show" in e23 && n2(23, _2 = e23.show), "key" in e23 && n2(24, O2 = e23.key), "ariaLabel" in e23 && n2(25, M2 = e23.ariaLabel), "ariaLabelledBy" in e23 && n2(26, P2 = e23.ariaLabelledBy), "closeButton" in e23 && n2(27, T2 = e23.closeButton), "closeOnEsc" in e23 && n2(28, R2 = e23.closeOnEsc), "closeOnOuterClick" in e23 && n2(29, z2 = e23.closeOnOuterClick), "styleBg" in e23 && n2(30, B2 = e23.styleBg), "styleWindowWrap" in e23 && n2(31, F2 = e23.styleWindowWrap), "styleWindow" in e23 && n2(32, H2 = e23.styleWindow), "styleContent" in e23 && n2(33, J2 = e23.styleContent), "styleCloseButton" in e23 && n2(34, K2 = e23.styleCloseButton), "classBg" in e23 && n2(35, Q2 = e23.classBg), "classWindowWrap" in e23 && n2(36, Z2 = e23.classWindowWrap), "classWindow" in e23 && n2(37, ee2 = e23.classWindow), "classContent" in e23 && n2(38, ne2 = e23.classContent), "classCloseButton" in e23 && n2(39, ie2 = e23.classCloseButton), "unstyled" in e23 && n2(0, ae2 = e23.unstyled), "setContext" in e23 && n2(40, ue2 = e23.setContext), "transitionBg" in e23 && n2(41, le2 = e23.transitionBg), "transitionBgProps" in e23 && n2(42, he2 = e23.transitionBgProps), "transitionWindow" in e23 && n2(43, ve2 = e23.transitionWindow), "transitionWindowProps" in e23 && n2(44, me2 = e23.transitionWindowProps), "disableFocusTrap" in e23 && n2(45, ye2 = e23.disableFocusTrap), "$$scope" in e23 && n2(47, k2 = e23.$$scope); }, e22.$$.update = function() { 8388608 & e22.$$.dirty[0] | 32768 & e22.$$.dirty[1] && Te2 && (je2(_2) ? Me2(_2) : Ee2()); }, [ae2, ke2, we2, r2, i2, o2, s2, u2, c2, l2, f2, h2, d2, _e2, $e2, Oe2, Ae2, je2, Ee2, function(e23) { if (ke2.closeOnEsc && we2 && e23.key === "Escape" && (e23.preventDefault(), Ee2()), we2 && e23.key === "Tab" && !ke2.disableFocusTrap) { var t3 = o2.querySelectorAll("*"), n3 = Array.from(t3).filter(ke2.isTabbable).sort(function(e24, t4) { return e24.tabIndex - t4.tabIndex; }), r3 = n3.indexOf(document.activeElement); r3 === -1 && e23.shiftKey && (r3 = 0), r3 += n3.length + (e23.shiftKey ? -1 : 1), n3[r3 %= n3.length].focus(), e23.preventDefault(); } }, function(e23) { !ke2.closeOnOuterClick || e23.target !== r2 && e23.target !== i2 || (g2 = e23.target); }, function(e23) { ke2.closeOnOuterClick && e23.target === g2 && (e23.preventDefault(), Ee2()); }, S2, _2, O2, M2, P2, T2, R2, z2, B2, F2, H2, J2, K2, Q2, Z2, ee2, ne2, ie2, ue2, le2, he2, ve2, me2, ye2, Te2, k2, b2, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(5, o2 = e23); }); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(4, i2 = e23); }); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(3, r2 = e23); }); }]; } var Za = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, Ya, Ga, Ui, { isTabbable: 22, show: 23, key: 24, ariaLabel: 25, ariaLabelledBy: 26, closeButton: 27, closeOnEsc: 28, closeOnOuterClick: 29, styleBg: 30, styleWindowWrap: 31, styleWindow: 32, styleContent: 33, styleCloseButton: 34, classBg: 35, classWindowWrap: 36, classWindow: 37, classContent: 38, classCloseButton: 39, unstyled: 0, setContext: 40, transitionBg: 41, transitionBgProps: 42, transitionWindow: 43, transitionWindowProps: 44, disableFocusTrap: 45 }, Ha, [-1, -1, -1]), r2; } return zi(n2); }(), Xa = [{ start: 0, end: 100 }], es = { closeButton: false, classBg: "jse-modal-bg", classWindow: "jse-modal-window", classWindowWrap: "jse-modal-window-wrap", classContent: "jse-modal-content" }, ts = xi(xi({}, es), {}, { classWindow: "jse-modal-window jse-modal-window-sort" }), ns = xi(xi({}, es), {}, { classWindow: "jse-modal-window jse-modal-window-transform" }), rs = "Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value", is = "Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)", os = "NO", as = "SELF", ss = "NEXT_INSIDE", us = 0; function cs() { return ++us; } function ls(e22) { return e22 && e22.__esModule && Object.prototype.hasOwnProperty.call(e22, "default") ? e22.default : e22; } var fs = { exports: {} }; !function(e22) { function t2(e23) { return (t2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e24) { return typeof e24; } : function(e24) { return e24 && typeof Symbol == "function" && e24.constructor === Symbol && e24 !== Symbol.prototype ? "symbol" : typeof e24; })(e23); } function n2(e23, t3) { return JSON.stringify(e23) === JSON.stringify(t3); } function r2(e23, t3) { return e23 === t3; } function i2(e23) { return e23.slice(0, e23.length - 1); } function o2(e23) { return e23[e23.length - 1]; } function a2(e23, t3) { var n3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : r2; if (e23.length < t3.length) return false; for (var i3 = 0; i3 < t3.length; i3++) if (!n3(e23[i3], t3[i3])) return false; return true; } function s2(e23) { return t2(e23) === "object" && e23 !== null; } function u2(e23, t3) { var n3 = Object.keys(e23); if (Object.getOwnPropertySymbols) { var r3 = Object.getOwnPropertySymbols(e23); t3 && (r3 = r3.filter(function(t4) { return Object.getOwnPropertyDescriptor(e23, t4).enumerable; })), n3.push.apply(n3, r3); } return n3; } function c2(e23) { for (var t3 = 1; t3 < arguments.length; t3++) { var n3 = arguments[t3] != null ? arguments[t3] : {}; t3 % 2 ? u2(Object(n3), true).forEach(function(t4) { l2(e23, t4, n3[t4]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e23, Object.getOwnPropertyDescriptors(n3)) : u2(Object(n3)).forEach(function(t4) { Object.defineProperty(e23, t4, Object.getOwnPropertyDescriptor(n3, t4)); }); } return e23; } function l2(e23, t3, n3) { return t3 in e23 ? Object.defineProperty(e23, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e23[t3] = n3, e23; } function f2(e23) { return (f2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e24) { return typeof e24; } : function(e24) { return e24 && typeof Symbol == "function" && e24.constructor === Symbol && e24 !== Symbol.prototype ? "symbol" : typeof e24; })(e23); } function h2(e23) { if (Array.isArray(e23)) { var t3 = e23.slice(); return Object.getOwnPropertySymbols(e23).forEach(function(n4) { t3[n4] = e23[n4]; }), t3; } if (f2(e23) === "object") { var n3 = c2({}, e23); return Object.getOwnPropertySymbols(e23).forEach(function(t4) { n3[t4] = e23[t4]; }), n3; } return e23; } function d2(e23, t3, n3) { if (e23[t3] === n3) return e23; var r3 = h2(e23); return r3[t3] = n3, r3; } function v2(e23, t3) { for (var n3 = e23, r3 = 0; r3 < t3.length; ) n3 = s2(n3) ? n3[t3[r3]] : void 0, r3++; return n3; } function p2(e23, t3, n3) { var r3 = arguments.length > 3 && arguments[3] !== void 0 && arguments[3]; if (t3.length === 0) return n3; var i3 = t3[0], o3 = p2(e23 ? e23[i3] : void 0, t3.slice(1), n3, r3); if (!s2(e23)) { if (r3) { var a3 = typeof i3 == "number" ? [] : {}; return a3[i3] = o3, a3; } throw new Error("Path does not exist"); } return d2(e23, i3, o3); } function m2(e23, t3, n3) { if (t3.length === 0) return n3(e23); if (!s2(e23)) throw new Error("Path doesn't exist"); var r3 = t3[0]; return d2(e23, r3, m2(e23[r3], t3.slice(1), n3)); } function g2(e23, t3) { if (t3.length === 0) return e23; if (!s2(e23)) throw new Error("Path does not exist"); if (t3.length === 1) { var n3 = t3[0]; if (n3 in e23) { var r3 = h2(e23); return Array.isArray(r3) ? r3.splice(n3, 1) : delete r3[n3], r3; } return e23; } var i3 = t3[0]; return d2(e23, i3, g2(e23[i3], t3.slice(1))); } function y2(e23, t3, n3) { var r3 = t3.slice(0, t3.length - 1), i3 = t3[t3.length - 1]; return m2(e23, r3, function(e24) { if (!Array.isArray(e24)) throw new TypeError("Array expected at path " + JSON.stringify(r3)); var t4 = h2(e24); return t4.splice(i3, 0, n3), t4; }); } function b2(e23, t3) { return e23 !== void 0 && (t3.length === 0 || b2(e23[t3[0]], t3.slice(1))); } function k2(e23) { var t3 = e23.split("/"); return t3.shift(), t3.map(function(e24) { return e24.replace(/~1/g, "/").replace(/~0/g, "~"); }); } function w2(e23) { return e23.map(x2).join(""); } function x2(e23) { return "/" + String(e23).replace(/~/g, "~0").replace(/\//g, "~1"); } function j2(e23, t3) { return e23 + x2(t3); } function S2(e23, t3) { return e23.startsWith(t3) && (e23.length === t3.length || e23[t3.length] === "/"); } function C2(e23, t3, n3) { for (var r3 = e23, i3 = 0; i3 < t3.length; i3++) { T2(t3[i3]); var o3 = t3[i3]; if (n3 && n3.before) { var a3 = n3.before(r3, o3); a3 !== void 0 && (a3.json !== void 0 && (r3 = a3.json), a3.operation !== void 0 && (o3 = a3.operation)); } var s3 = r3, u3 = I2(r3, o3.path); if (o3.op === "add") r3 = O2(r3, u3, o3.value); else if (o3.op === "remove") r3 = $2(r3, u3); else if (o3.op === "replace") r3 = _2(r3, u3, o3.value); else if (o3.op === "copy") r3 = A2(r3, u3, R2(o3.from)); else if (o3.op === "move") r3 = M2(r3, u3, R2(o3.from)); else { if (o3.op !== "test") throw new Error("Unknown JSONPatch operation " + JSON.stringify(o3.op)); E2(r3, u3, o3.value); } if (n3 && n3.after) { var c3 = n3.after(r3, o3, s3); c3 !== void 0 && (r3 = c3); } } return r3; } function _2(e23, t3, n3) { return p2(e23, t3, n3); } function $2(e23, t3) { return g2(e23, t3); } function O2(e23, t3, n3) { return P2(e23, t3) ? y2(e23, t3, n3) : p2(e23, t3, n3); } function A2(e23, t3, n3) { var r3 = v2(e23, n3); return P2(e23, t3) ? y2(e23, t3, r3) : p2(e23, t3, v2(e23, n3)); } function M2(e23, t3, n3) { var r3 = v2(e23, n3), i3 = g2(e23, n3); return P2(i3, t3) ? y2(i3, t3, r3) : p2(i3, t3, r3); } function E2(e23, t3, r3) { if (r3 === void 0) throw new Error('Test failed: no value provided (path: "'.concat(w2(t3), '")')); if (!b2(e23, t3)) throw new Error('Test failed: path not found (path: "'.concat(w2(t3), '")')); if (!n2(v2(e23, t3), r3)) throw new Error('Test failed, value differs (path: "'.concat(w2(t3), '")')); } function P2(e23, t3) { if (t3.length === 0) return false; var n3 = v2(e23, i2(t3)); return Array.isArray(n3); } function N2(e23, t3) { if (o2(t3) !== "-") return t3; var n3 = i2(t3), r3 = v2(e23, n3); return n3.concat(r3.length); } function T2(e23) { if (!["add", "remove", "replace", "copy", "move", "test"].includes(e23.op)) throw new Error("Unknown JSONPatch op " + JSON.stringify(e23.op)); if (typeof e23.path != "string") throw new Error('Required property "path" missing or not a string in operation ' + JSON.stringify(e23)); if ((e23.op === "copy" || e23.op === "move") && typeof e23.from != "string") throw new Error('Required property "from" missing or not a string in operation ' + JSON.stringify(e23)); } function I2(e23, t3) { return N2(e23, k2(t3)); } function R2(e23) { return k2(e23); } function D2(e23, t3, n3) { var r3 = []; return C2(e23, t3, { before: function(e24, t4) { var i3, o3, a3 = I2(e24, t4.path); if (t4.op === "add") i3 = B2(e24, a3, t4.value); else if (t4.op === "remove") i3 = L2(e24, a3); else if (t4.op === "replace") i3 = z2(e24, a3); else if (t4.op === "copy") i3 = q2(e24, a3, t4.value); else if (t4.op === "move") i3 = F2(e24, a3, R2(t4.from)); else { if (t4.op !== "test") throw new Error("Unknown JSONPatch operation " + JSON.stringify(t4.op)); i3 = []; } if (n3 && n3.before) { var s3 = n3.before(e24, t4, i3); s3 && s3.revertOperations && (i3 = s3.revertOperations), s3 && s3.json && (o3 = s3.json); } if (r3 = i3.concat(r3), o3 !== void 0) return { json: o3 }; } }), r3; } function z2(e23, t3) { return [{ op: "replace", path: w2(t3), value: v2(e23, t3) }]; } function L2(e23, t3) { return [{ op: "add", path: w2(t3), value: v2(e23, t3) }]; } function B2(e23, t3, n3) { return P2(e23, t3) || !b2(e23, t3) ? [{ op: "remove", path: w2(t3) }] : z2(e23, t3); } function q2(e23, t3, n3) { return B2(e23, t3); } function F2(e23, t3, n3) { if (t3.length < n3.length && a2(n3, t3)) return [{ op: "replace", path: w2(t3), value: e23 }]; var r3 = [{ op: "move", from: w2(t3), path: w2(n3) }]; return !P2(e23, t3) && b2(e23, t3) && (r3 = r3.concat(L2(e23, t3))), r3; } function V2(e23) { return !!e23 && typeof e23.op == "string"; } function H2(e23) { return !!e23 && e23.op === "add"; } function W2(e23) { return !!e23 && e23.op === "remove"; } function J2(e23) { return !!e23 && e23.op === "replace"; } function U2(e23) { return !!e23 && e23.op === "copy"; } function K2(e23) { return !!e23 && e23.op === "move"; } function G2(e23) { return !!e23 && e23.op === "test"; } e22.appendToJSONPointer = j2, e22.compileJSONPointer = w2, e22.compileJSONPointerProp = x2, e22.deleteIn = g2, e22.existsIn = b2, e22.getIn = v2, e22.immutableJSONPatch = C2, e22.insertAt = y2, e22.isJSONPatchAdd = H2, e22.isJSONPatchCopy = U2, e22.isJSONPatchMove = K2, e22.isJSONPatchOperation = V2, e22.isJSONPatchRemove = W2, e22.isJSONPatchReplace = J2, e22.isJSONPatchTest = G2, e22.parseFrom = R2, e22.parseJSONPointer = k2, e22.parsePath = I2, e22.revertJSONPatch = D2, e22.setIn = p2, e22.startsWithJSONPointer = S2, e22.updateIn = m2, Object.defineProperty(e22, "__esModule", { value: true }); }(fs.exports); var hs = {}, ds = { b: "\b", f: "\f", n: "\n", r: "\r", t: " ", '"': '"', "/": "/", "\\": "\\" }, vs = "a".charCodeAt(); hs.parse = function(e22, t2, n2) { var r2 = {}, i2 = 0, o2 = 0, a2 = 0, s2 = n2 && n2.bigint && typeof BigInt != "undefined"; return { data: u2("", true), pointers: r2 }; function u2(t3, n3) { var r3; c2(), m2(t3, "value"); var i3 = h2(); switch (i3) { case "t": f2("rue"), r3 = true; break; case "f": f2("alse"), r3 = false; break; case "n": f2("ull"), r3 = null; break; case '"': r3 = l2(); break; case "[": r3 = function(e23) { c2(); var t4 = [], n4 = 0; if (h2() == "]") return t4; d2(); for (; ; ) { var r4 = e23 + "/" + n4; t4.push(u2(r4)), c2(); var i4 = h2(); if (i4 == "]") break; i4 != "," && k2(), c2(), n4++; } return t4; }(t3); break; case "{": r3 = function(e23) { c2(); var t4 = {}; if (h2() == "}") return t4; d2(); for (; ; ) { var n4 = y2(); h2() != '"' && k2(); var r4 = l2(), i4 = e23 + "/" + _s(r4); g2(i4, "key", n4), m2(i4, "keyEnd"), c2(), h2() != ":" && k2(), c2(), t4[r4] = u2(i4), c2(); var o3 = h2(); if (o3 == "}") break; o3 != "," && k2(), c2(); } return t4; }(t3); break; default: d2(), "-0123456789".indexOf(i3) >= 0 ? r3 = function() { var t4 = "", n4 = true; e22[a2] == "-" && (t4 += h2()); t4 += e22[a2] == "0" ? h2() : p2(), e22[a2] == "." && (t4 += h2() + p2(), n4 = false); e22[a2] != "e" && e22[a2] != "E" || (t4 += h2(), e22[a2] != "+" && e22[a2] != "-" || (t4 += h2()), t4 += p2(), n4 = false); var r4 = +t4; return s2 && n4 && (r4 > Number.MAX_SAFE_INTEGER || r4 < Number.MIN_SAFE_INTEGER) ? BigInt(t4) : r4; }() : b2(); } return m2(t3, "valueEnd"), c2(), n3 && a2 < e22.length && b2(), r3; } function c2() { e: for (; a2 < e22.length; ) { switch (e22[a2]) { case " ": o2++; break; case " ": o2 += 4; break; case "\r": o2 = 0; break; case "\n": o2 = 0, i2++; break; default: break e; } a2++; } } function l2() { for (var e23, t3 = ""; (e23 = h2()) != '"'; ) e23 == "\\" ? (e23 = h2()) in ds ? t3 += ds[e23] : e23 == "u" ? t3 += v2() : k2() : t3 += e23; return t3; } function f2(e23) { for (var t3 = 0; t3 < e23.length; t3++) h2() !== e23[t3] && k2(); } function h2() { w2(); var t3 = e22[a2]; return a2++, o2++, t3; } function d2() { a2--, o2--; } function v2() { for (var e23 = 4, t3 = 0; e23--; ) { t3 <<= 4; var n3 = h2().toLowerCase(); n3 >= "a" && n3 <= "f" ? t3 += n3.charCodeAt() - vs + 10 : n3 >= "0" && n3 <= "9" ? t3 += +n3 : k2(); } return String.fromCharCode(t3); } function p2() { for (var t3 = ""; e22[a2] >= "0" && e22[a2] <= "9"; ) t3 += h2(); if (t3.length) return t3; w2(), b2(); } function m2(e23, t3) { g2(e23, t3, y2()); } function g2(e23, t3, n3) { r2[e23] = r2[e23] || {}, r2[e23][t3] = n3; } function y2() { return { line: i2, column: o2, pos: a2 }; } function b2() { throw new SyntaxError("Unexpected token " + e22[a2] + " in JSON at position " + a2); } function k2() { d2(), b2(); } function w2() { if (a2 >= e22.length) throw new SyntaxError("Unexpected end of JSON input"); } }, hs.stringify = function(e22, t2, n2) { if (ms(e22)) { var r2, i2, o2 = 0, a2 = Li(n2) == "object" ? n2.space : n2; switch (Li(a2)) { case "number": var s2 = a2 > 10 ? 10 : a2 < 0 ? 0 : Math.floor(a2); a2 = s2 && y2(s2, " "), r2 = s2, i2 = s2; break; case "string": a2 = a2.slice(0, 10), r2 = 0, i2 = 0; for (var u2 = 0; u2 < a2.length; u2++) { switch (a2[u2]) { case " ": i2++; break; case " ": i2 += 4; break; case "\r": i2 = 0; break; case "\n": i2 = 0, o2++; break; default: throw new Error("whitespace characters not allowed in JSON"); } r2++; } break; default: a2 = void 0; } var c2 = "", l2 = {}, f2 = 0, h2 = 0, d2 = 0, v2 = n2 && n2.es6 && typeof Map == "function"; return function e23(t3, n3, r3) { switch (g2(r3, "value"), Li(t3)) { case "number": case "bigint": case "boolean": p2("" + t3); break; case "string": p2(js(t3)); break; case "object": t3 === null ? p2("null") : typeof t3.toJSON == "function" ? p2(js(t3.toJSON())) : Array.isArray(t3) ? i3() : v2 ? t3.constructor.BYTES_PER_ELEMENT ? i3() : t3 instanceof Map ? s3() : t3 instanceof Set ? s3(true) : o3() : o3(); } function i3() { if (t3.length) { p2("["); for (var i4 = n3 + 1, o4 = 0; o4 < t3.length; o4++) { o4 && p2(","), m2(i4); var a3 = ms(t3[o4]) ? t3[o4] : null; e23(a3, i4, r3 + "/" + o4); } m2(n3), p2("]"); } else p2("[]"); } function o3() { var i4 = Object.keys(t3); if (i4.length) { p2("{"); for (var o4 = n3 + 1, s4 = 0; s4 < i4.length; s4++) { var u3 = i4[s4], c3 = t3[u3]; if (ms(c3)) { s4 && p2(","); var l3 = r3 + "/" + _s(u3); m2(o4), g2(l3, "key"), p2(js(u3)), g2(l3, "keyEnd"), p2(":"), a2 && p2(" "), e23(c3, o4, l3); } } m2(n3), p2("}"); } else p2("{}"); } function s3(i4) { if (t3.size) { p2("{"); for (var o4 = n3 + 1, s4 = true, u3 = t3.entries(), c3 = u3.next(); !c3.done; ) { var l3 = c3.value, f3 = l3[0], h3 = !!i4 || l3[1]; if (ms(h3)) { s4 || p2(","), s4 = false; var d3 = r3 + "/" + _s(f3); m2(o4), g2(d3, "key"), p2(js(f3)), g2(d3, "keyEnd"), p2(":"), a2 && p2(" "), e23(h3, o4, d3); } c3 = u3.next(); } m2(n3), p2("}"); } else p2("{}"); } g2(r3, "valueEnd"); }(e22, 0, ""), { json: c2, pointers: l2 }; } function p2(e23) { h2 += e23.length, d2 += e23.length, c2 += e23; } function m2(e23) { if (a2) { for (c2 += "\n" + y2(e23, a2), f2++, h2 = 0; e23--; ) o2 ? (f2 += o2, h2 = i2) : h2 += i2, d2 += r2; d2 += 1; } } function g2(e23, t3) { l2[e23] = l2[e23] || {}, l2[e23][t3] = { line: f2, column: h2, pos: d2 }; } function y2(e23, t3) { return Array(e23 + 1).join(t3); } }; var ps = ["number", "bigint", "boolean", "string", "object"]; function ms(e22) { return ps.indexOf(Li(e22)) >= 0; } var gs = /"|\\/g, ys = /[\b]/g, bs = /\f/g, ks = /\n/g, ws = /\r/g, xs = /\t/g; function js(e22) { return '"' + (e22 = e22.replace(gs, "\\$&").replace(bs, "\\f").replace(ys, "\\b").replace(ks, "\\n").replace(ws, "\\r").replace(xs, "\\t")) + '"'; } var Ss = /~/g, Cs = /\//g; function _s(e22) { return e22.replace(Ss, "~0").replace(Cs, "~1"); } var Os = function() { function e22(t3, n3) { if (!(this instanceof e22)) throw new SyntaxError("Constructor must be called with the new operator"); this.message = t3 + " (char " + n3 + ")", this.char = n3, this.stack = new Error().stack; } (e22.prototype = new Error()).constructor = Error; var t2 = { "'": true, "\u2018": true, "\u2019": true, "`": true, "\xB4": true }, n2 = { '"': true, "\u201C": true, "\u201D": true }; function r2(e23) { return i2.test(e23); } var i2 = /^[a-zA-Z_]$/, o2 = /^[0-9a-fA-F]$/; function a2(e23) { return s2.test(e23); } var s2 = /^[0-9]$/; function u2(e23) { return e23 === " " || e23 === " " || e23 === "\n" || e23 === "\r"; } function c2(e23) { return e23 === "\xA0" || "\u2000" <= e23 && e23 <= "\u200A" || e23 === "\u202F" || e23 === "\u205F" || e23 === "\u3000"; } function l2(e23) { return t2[e23] === true; } function f2(e23) { return n2[e23] === true; } function h2(e23) { return t2[e23] === true ? "'" : n2[e23] === true ? '"' : e23; } function d2(e23, t3) { return (t3 = e23.lastIndexOf(t3)) !== -1 ? e23.substring(0, t3) + e23.substring(t3 + 1) : e23; } function v2(e23, t3) { var n3 = e23.length; if (!u2(e23[n3 - 1])) return e23 + t3; for (; u2(e23[n3 - 1]); ) n3--; return e23.substring(0, n3) + t3 + e23.substring(n3); } var p2 = 0, m2 = 1, g2 = 2, y2 = 3, b2 = 4, k2 = 5, w2 = 6, x2 = { "": true, "{": true, "}": true, "[": true, "]": true, ":": true, ",": true, "(": true, ")": true, ";": true, "+": true }, j2 = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: "\n", r: "\r", t: " " }, S2 = { "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t" }, C2 = { null: "null", true: "true", false: "false" }, _2 = { None: "null", True: "true", False: "false" }, $2 = "", O2 = "", A2 = 0, M2 = "", E2 = "", P2 = w2; function N2() { A2++, M2 = $2.charAt(A2); } function T2() { N2(), M2 === "\\" && N2(); } function I2() { return P2 === p2 && (E2 === "[" || E2 === "{") || P2 === g2 || P2 === m2 || P2 === y2; } function R2() { O2 += E2, P2 = w2, E2 = "", x2[M2] ? (P2 = p2, E2 = M2, N2()) : function() { if (a2(M2) || M2 === "-") { if (P2 = m2, M2 === "-") { if (E2 += M2, N2(), !a2(M2)) throw new e22("Invalid number, digit expected", A2); } else M2 === "0" && (E2 += M2, N2()); for (; a2(M2); ) E2 += M2, N2(); if (M2 === ".") { if (E2 += M2, N2(), !a2(M2)) throw new e22("Invalid number, digit expected", A2); for (; a2(M2); ) E2 += M2, N2(); } if (M2 === "e" || M2 === "E") { if (E2 += M2, N2(), M2 !== "+" && M2 !== "-" || (E2 += M2, N2()), !a2(M2)) throw new e22("Invalid number, digit expected", A2); for (; a2(M2); ) E2 += M2, N2(); } } else M2 === "\\" && $2.charAt(A2 + 1) === '"' ? (N2(), z2(T2)) : z2(N2); }(), P2 === b2 && (E2 = function(e23) { for (var t3 = "", n3 = 0; n3 < e23.length; n3++) { var r3 = e23[n3]; t3 += c2(r3) ? " " : r3; } return t3; }(E2), R2()), P2 === k2 && (P2 = w2, E2 = "", R2()); } function D2() { E2 === "," && (E2 = "", P2 = w2, R2()); } function z2(i3) { if (t2[s3 = M2] === true || n2[s3] === true) { var s3 = h2(M2), d3 = l2(M2) ? l2 : f2; for (E2 += '"', P2 = g2, i3(); M2 !== "" && !d3(M2); ) if (M2 === "\\") if (i3(), j2[M2] !== void 0) E2 += "\\" + M2, i3(); else if (M2 === "u") { E2 += "\\u", i3(); for (var v3 = 0; v3 < 4; v3++) { if (p3 = M2, !o2.test(p3)) throw new e22("Invalid unicode character", A2 - E2.length); E2 += M2, i3(); } } else { if (M2 !== "'") throw new e22('Invalid escape character "\\' + M2 + '"', A2); E2 += "'", i3(); } else S2[M2] ? E2 += S2[M2] : E2 += M2 === '"' ? '\\"' : M2, i3(); if (h2(M2) !== s3) throw new e22("End of string expected", A2 - E2.length); return E2 += '"', void i3(); } var p3; !function() { if (r2(M2)) for (P2 = y2; r2(M2) || a2(M2) || M2 === "$"; ) E2 += M2, N2(); else !function() { if (u2(M2) || c2(M2)) for (P2 = b2; u2(M2) || c2(M2); ) E2 += M2, N2(); else !function() { if (M2 !== "/" || $2[A2 + 1] !== "*") if (M2 !== "/" || $2[A2 + 1] !== "/") !function() { for (P2 = w2; M2 !== ""; ) E2 += M2, N2(); throw new e22('Syntax error in part "' + E2 + '"', A2 - E2.length); }(); else for (P2 = k2; M2 !== "" && M2 !== "\n"; ) E2 += M2, N2(); else { for (P2 = k2; M2 !== "" && (M2 !== "*" || M2 === "*" && $2[A2 + 1] !== "/"); ) E2 += M2, N2(); M2 === "*" && $2[A2 + 1] === "/" && (E2 += M2, N2(), E2 += M2, N2()); } }(); }(); }(); } function L2() { if (P2 !== p2 || E2 !== "{") !function() { if (P2 !== p2 || E2 !== "[") !function() { if (P2 !== g2) (P2 !== m2 ? function() { if (P2 !== y2) !function() { throw new e22(E2 === "" ? "Unexpected end of json string" : "Value expected", A2 - E2.length); }(); else if (C2[E2]) R2(); else { if (_2[E2]) return E2 = _2[E2], R2(); var t4 = E2, n3 = O2.length; if (E2 = "", R2(), P2 === p2 && E2 === "(") return E2 = "", R2(), L2(), P2 === p2 && E2 === ")" && (E2 = "", R2(), P2 === p2 && E2 === ";" && (E2 = "", R2())); for (O2 = function(e23, t5, n4) { return e23.substring(0, n4) + t5 + e23.substring(n4); }(O2, '"'.concat(t4), n3); P2 === y2 || P2 === m2; ) R2(); O2 += '"'; } } : R2)(); else for (R2(); P2 === p2 && E2 === "+"; ) { var t3; E2 = "", R2(), P2 === g2 && (t3 = O2.lastIndexOf('"'), O2 = O2.substring(0, t3) + E2.substring(1), E2 = "", R2()); } }(); else if (R2(), P2 !== p2 || E2 !== "]") { for (; ; ) if (L2(), P2 === p2 && E2 === ",") { if (R2(), P2 === p2 && E2 === "]") { O2 = d2(O2, ","); break; } if (E2 === "") { O2 = d2(O2, ","); break; } } else { if (!I2()) break; O2 = v2(O2, ","); } P2 === p2 && E2 === "]" ? R2() : O2 = v2(O2, "]"); } else R2(); }(); else if (R2(), P2 !== p2 || E2 !== "}") { for (; ; ) { if (P2 !== y2 && P2 !== m2 || (P2 = g2, E2 = '"'.concat(E2, '"')), P2 !== g2) throw new e22("Object key expected", A2 - E2.length); if (R2(), P2 === p2 && E2 === ":") R2(); else { if (!I2()) throw new e22("Colon expected", A2 - E2.length); O2 = v2(O2, ":"); } if (L2(), P2 === p2 && E2 === ",") { if (R2(), P2 === p2 && E2 === "}") { O2 = d2(O2, ","); break; } if (E2 === "") { O2 = d2(O2, ","); break; } } else { if (P2 !== g2 && P2 !== m2 && P2 !== y2) break; O2 = v2(O2, ","); } } P2 === p2 && E2 === "}" ? R2() : O2 = v2(O2, "}"); } else R2(); } return function(t3) { O2 = "", A2 = 0, M2 = ($2 = t3).charAt(0), E2 = "", P2 = w2, R2(); var n3 = P2; if (L2(), D2(), E2 === "") return O2; if (n3 === P2 && I2()) { for (var r3 = ""; n3 === P2 && I2(); ) r3 += O2 = v2(O2, ","), O2 = "", L2(), D2(); return "[\n".concat(r3).concat(O2, "\n]"); } throw new e22("Unexpected characters", A2 - E2.length); }; }(); function As(e22) { return Li(e22) === "object" && e22 !== null && !Array.isArray(e22); } function Ms(e22) { return Li(e22) === "object" && e22 !== null; } function Es(e22) { var t2 = window.document.createElement("div"); return t2.style.color = e22, t2.style.color.split(/\s+/).join("").toLowerCase() || null; } function Ps(e22) { return e22 === null ? "null" : e22 === void 0 ? "undefined" : typeof e22 == "number" ? "number" : typeof e22 == "string" ? "string" : typeof e22 == "boolean" ? "boolean" : e22 instanceof RegExp ? "regexp" : Array.isArray(e22) ? "array" : "object"; } var Ns = /^https?:\/\/\S+$/; function Ts(e22) { return typeof e22 == "string" && Ns.test(e22); } function Is(e22) { if (e22 === "") return ""; if (e22 === "null") return null; if (e22 === "true") return true; if (e22 === "false") return false; var t2 = Number(e22); return isNaN(t2) || isNaN(parseFloat(e22)) ? e22 : t2; } var Rs = (typeof global == "undefined" ? "undefined" : Li(global)) == "object" && global && global.Object === Object && global, Ds = (typeof self == "undefined" ? "undefined" : Li(self)) == "object" && self && self.Object === Object && self, zs = Rs || Ds || Function("return this")(), Ls = zs.Symbol, Bs = Object.prototype, qs = Bs.hasOwnProperty, Fs = Bs.toString, Vs = Ls ? Ls.toStringTag : void 0; var Hs = Object.prototype.toString; var Ws = Ls ? Ls.toStringTag : void 0; function Js(e22) { return e22 == null ? e22 === void 0 ? "[object Undefined]" : "[object Null]" : Ws && Ws in Object(e22) ? function(e23) { var t2 = qs.call(e23, Vs), n2 = e23[Vs]; try { e23[Vs] = void 0; var r2 = true; } catch (e24) { } var i2 = Fs.call(e23); return r2 && (t2 ? e23[Vs] = n2 : delete e23[Vs]), i2; }(e22) : function(e23) { return Hs.call(e23); }(e22); } function Us(e22) { return e22 != null && Li(e22) == "object"; } function Ks(e22) { return Li(e22) == "symbol" || Us(e22) && Js(e22) == "[object Symbol]"; } function Gs(e22) { return typeof e22 == "number" ? e22 : Ks(e22) ? NaN : +e22; } function Qs(e22, t2) { for (var n2 = -1, r2 = e22 == null ? 0 : e22.length, i2 = Array(r2); ++n2 < r2; ) i2[n2] = t2(e22[n2], n2, e22); return i2; } var Ys = Array.isArray, Zs = Ls ? Ls.prototype : void 0, Xs = Zs ? Zs.toString : void 0; function eu(e22) { if (typeof e22 == "string") return e22; if (Ys(e22)) return Qs(e22, eu) + ""; if (Ks(e22)) return Xs ? Xs.call(e22) : ""; var t2 = e22 + ""; return t2 == "0" && 1 / e22 == -Infinity ? "-0" : t2; } function tu(e22, t2) { return function(n2, r2) { var i2; if (n2 === void 0 && r2 === void 0) return t2; if (n2 !== void 0 && (i2 = n2), r2 !== void 0) { if (i2 === void 0) return r2; typeof n2 == "string" || typeof r2 == "string" ? (n2 = eu(n2), r2 = eu(r2)) : (n2 = Gs(n2), r2 = Gs(r2)), i2 = e22(n2, r2); } return i2; }; } var nu = tu(function(e22, t2) { return e22 + t2; }, 0), ru = /\s/; function iu(e22) { for (var t2 = e22.length; t2-- && ru.test(e22.charAt(t2)); ) ; return t2; } var ou = /^\s+/; function au(e22) { return e22 ? e22.slice(0, iu(e22) + 1).replace(ou, "") : e22; } function su(e22) { var t2 = Li(e22); return e22 != null && (t2 == "object" || t2 == "function"); } var uu = /^[-+]0x[0-9a-f]+$/i, cu = /^0b[01]+$/i, lu = /^0o[0-7]+$/i, fu = parseInt; function hu(e22) { if (typeof e22 == "number") return e22; if (Ks(e22)) return NaN; if (su(e22)) { var t2 = typeof e22.valueOf == "function" ? e22.valueOf() : e22; e22 = su(t2) ? t2 + "" : t2; } if (typeof e22 != "string") return e22 === 0 ? e22 : +e22; e22 = au(e22); var n2 = cu.test(e22); return n2 || lu.test(e22) ? fu(e22.slice(2), n2 ? 2 : 8) : uu.test(e22) ? NaN : +e22; } function du(e22) { return e22 ? (e22 = hu(e22)) === Infinity || e22 === -Infinity ? 17976931348623157e292 * (e22 < 0 ? -1 : 1) : e22 == e22 ? e22 : 0 : e22 === 0 ? e22 : 0; } function vu(e22) { var t2 = du(e22), n2 = t2 % 1; return t2 == t2 ? n2 ? t2 - n2 : t2 : 0; } function pu(e22, t2) { if (typeof t2 != "function") throw new TypeError("Expected a function"); return e22 = vu(e22), function() { if (--e22 < 1) return t2.apply(this, arguments); }; } function mu(e22) { return e22; } function gu(e22) { if (!su(e22)) return false; var t2 = Js(e22); return t2 == "[object Function]" || t2 == "[object GeneratorFunction]" || t2 == "[object AsyncFunction]" || t2 == "[object Proxy]"; } var yu, bu = zs["__core-js_shared__"], ku = (yu = /[^.]+$/.exec(bu && bu.keys && bu.keys.IE_PROTO || "")) ? "Symbol(src)_1." + yu : ""; var wu = Function.prototype.toString; function xu(e22) { if (e22 != null) { try { return wu.call(e22); } catch (e23) { } try { return e22 + ""; } catch (e23) { } } return ""; } var ju = /^\[object .+?Constructor\]$/, Su = Function.prototype, Cu = Object.prototype, _u = Su.toString, $u = Cu.hasOwnProperty, Ou = RegExp("^" + _u.call($u).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); function Au(e22) { return !(!su(e22) || function(e23) { return !!ku && ku in e23; }(e22)) && (gu(e22) ? Ou : ju).test(xu(e22)); } function Mu(e22, t2) { var n2 = function(e23, t3) { return e23 == null ? void 0 : e23[t3]; }(e22, t2); return Au(n2) ? n2 : void 0; } var Eu = Mu(zs, "WeakMap"), Pu = Eu && new Eu(), Nu = Pu ? function(e22, t2) { return Pu.set(e22, t2), e22; } : mu, Tu = Object.create, Iu = function() { function e22() { } return function(t2) { if (!su(t2)) return {}; if (Tu) return Tu(t2); e22.prototype = t2; var n2 = new e22(); return e22.prototype = void 0, n2; }; }(); function Ru(e22) { return function() { var t2 = arguments; switch (t2.length) { case 0: return new e22(); case 1: return new e22(t2[0]); case 2: return new e22(t2[0], t2[1]); case 3: return new e22(t2[0], t2[1], t2[2]); case 4: return new e22(t2[0], t2[1], t2[2], t2[3]); case 5: return new e22(t2[0], t2[1], t2[2], t2[3], t2[4]); case 6: return new e22(t2[0], t2[1], t2[2], t2[3], t2[4], t2[5]); case 7: return new e22(t2[0], t2[1], t2[2], t2[3], t2[4], t2[5], t2[6]); } var n2 = Iu(e22.prototype), r2 = e22.apply(n2, t2); return su(r2) ? r2 : n2; }; } function Du(e22, t2, n2) { switch (n2.length) { case 0: return e22.call(t2); case 1: return e22.call(t2, n2[0]); case 2: return e22.call(t2, n2[0], n2[1]); case 3: return e22.call(t2, n2[0], n2[1], n2[2]); } return e22.apply(t2, n2); } var zu = Math.max; function Lu(e22, t2, n2, r2) { for (var i2 = -1, o2 = e22.length, a2 = n2.length, s2 = -1, u2 = t2.length, c2 = zu(o2 - a2, 0), l2 = Array(u2 + c2), f2 = !r2; ++s2 < u2; ) l2[s2] = t2[s2]; for (; ++i2 < a2; ) (f2 || i2 < o2) && (l2[n2[i2]] = e22[i2]); for (; c2--; ) l2[s2++] = e22[i2++]; return l2; } var Bu = Math.max; function qu(e22, t2, n2, r2) { for (var i2 = -1, o2 = e22.length, a2 = -1, s2 = n2.length, u2 = -1, c2 = t2.length, l2 = Bu(o2 - s2, 0), f2 = Array(l2 + c2), h2 = !r2; ++i2 < l2; ) f2[i2] = e22[i2]; for (var d2 = i2; ++u2 < c2; ) f2[d2 + u2] = t2[u2]; for (; ++a2 < s2; ) (h2 || i2 < o2) && (f2[d2 + n2[a2]] = e22[i2++]); return f2; } function Fu(e22, t2) { for (var n2 = e22.length, r2 = 0; n2--; ) e22[n2] === t2 && ++r2; return r2; } function Vu() { } function Hu(e22) { this.__wrapped__ = e22, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = false, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = []; } function Wu() { } Hu.prototype = Iu(Vu.prototype), Hu.prototype.constructor = Hu; var Ju = Pu ? function(e22) { return Pu.get(e22); } : Wu, Uu = {}, Ku = Object.prototype.hasOwnProperty; function Gu(e22) { for (var t2 = e22.name + "", n2 = Uu[t2], r2 = Ku.call(Uu, t2) ? n2.length : 0; r2--; ) { var i2 = n2[r2], o2 = i2.func; if (o2 == null || o2 == e22) return i2.name; } return t2; } function Qu(e22, t2) { this.__wrapped__ = e22, this.__actions__ = [], this.__chain__ = !!t2, this.__index__ = 0, this.__values__ = void 0; } function Yu(e22, t2) { var n2 = -1, r2 = e22.length; for (t2 || (t2 = Array(r2)); ++n2 < r2; ) t2[n2] = e22[n2]; return t2; } function Zu(e22) { if (e22 instanceof Hu) return e22.clone(); var t2 = new Qu(e22.__wrapped__, e22.__chain__); return t2.__actions__ = Yu(e22.__actions__), t2.__index__ = e22.__index__, t2.__values__ = e22.__values__, t2; } Qu.prototype = Iu(Vu.prototype), Qu.prototype.constructor = Qu; var Xu = Object.prototype.hasOwnProperty; function ec(e22) { if (Us(e22) && !Ys(e22) && !(e22 instanceof Hu)) { if (e22 instanceof Qu) return e22; if (Xu.call(e22, "__wrapped__")) return Zu(e22); } return new Qu(e22); } function tc(e22) { var t2 = Gu(e22), n2 = ec[t2]; if (typeof n2 != "function" || !(t2 in Hu.prototype)) return false; if (e22 === n2) return true; var r2 = Ju(n2); return !!r2 && e22 === r2[0]; } ec.prototype = Vu.prototype, ec.prototype.constructor = ec; var nc = Date.now; function rc(e22) { var t2 = 0, n2 = 0; return function() { var r2 = nc(), i2 = 16 - (r2 - n2); if (n2 = r2, i2 > 0) { if (++t2 >= 800) return arguments[0]; } else t2 = 0; return e22.apply(void 0, arguments); }; } var ic = rc(Nu), oc = /\{\n\/\* \[wrapped with (.+)\] \*/, ac = /,? & /; var sc = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; function uc(e22) { return function() { return e22; }; } var cc = function() { try { var e22 = Mu(Object, "defineProperty"); return e22({}, "", {}), e22; } catch (e23) { } }(), lc = rc(cc ? function(e22, t2) { return cc(e22, "toString", { configurable: true, enumerable: false, value: uc(t2), writable: true }); } : mu); function fc(e22, t2) { for (var n2 = -1, r2 = e22 == null ? 0 : e22.length; ++n2 < r2 && t2(e22[n2], n2, e22) !== false; ) ; return e22; } function hc(e22, t2, n2, r2) { for (var i2 = e22.length, o2 = n2 + (r2 ? 1 : -1); r2 ? o2-- : ++o2 < i2; ) if (t2(e22[o2], o2, e22)) return o2; return -1; } function dc(e22) { return e22 != e22; } function vc(e22, t2, n2) { return t2 == t2 ? function(e23, t3, n3) { for (var r2 = n3 - 1, i2 = e23.length; ++r2 < i2; ) if (e23[r2] === t3) return r2; return -1; }(e22, t2, n2) : hc(e22, dc, n2); } function pc(e22, t2) { return !!(e22 == null ? 0 : e22.length) && vc(e22, t2, 0) > -1; } var mc = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]]; function gc(e22, t2, n2) { var r2 = t2 + ""; return lc(e22, function(e23, t3) { var n3 = t3.length; if (!n3) return e23; var r3 = n3 - 1; return t3[r3] = (n3 > 1 ? "& " : "") + t3[r3], t3 = t3.join(n3 > 2 ? ", " : " "), e23.replace(sc, "{\n/* [wrapped with " + t3 + "] */\n"); }(r2, function(e23, t3) { return fc(mc, function(n3) { var r3 = "_." + n3[0]; t3 & n3[1] && !pc(e23, r3) && e23.push(r3); }), e23.sort(); }(function(e23) { var t3 = e23.match(oc); return t3 ? t3[1].split(ac) : []; }(r2), n2))); } function yc(e22, t2, n2, r2, i2, o2, a2, s2, u2, c2) { var l2 = 8 & t2; t2 |= l2 ? 32 : 64, 4 & (t2 &= ~(l2 ? 64 : 32)) || (t2 &= -4); var f2 = [e22, t2, i2, l2 ? o2 : void 0, l2 ? a2 : void 0, l2 ? void 0 : o2, l2 ? void 0 : a2, s2, u2, c2], h2 = n2.apply(void 0, f2); return tc(e22) && ic(h2, f2), h2.placeholder = r2, gc(h2, e22, t2); } function bc(e22) { return e22.placeholder; } var kc = /^(?:0|[1-9]\d*)$/; function wc(e22, t2) { var n2 = Li(e22); return !!(t2 = t2 == null ? 9007199254740991 : t2) && (n2 == "number" || n2 != "symbol" && kc.test(e22)) && e22 > -1 && e22 % 1 == 0 && e22 < t2; } var xc = Math.min; function jc(e22, t2) { for (var n2 = e22.length, r2 = xc(t2.length, n2), i2 = Yu(e22); r2--; ) { var o2 = t2[r2]; e22[r2] = wc(o2, n2) ? i2[o2] : void 0; } return e22; } function Sc(e22, t2) { for (var n2 = -1, r2 = e22.length, i2 = 0, o2 = []; ++n2 < r2; ) { var a2 = e22[n2]; a2 !== t2 && a2 !== "__lodash_placeholder__" || (e22[n2] = "__lodash_placeholder__", o2[i2++] = n2); } return o2; } function Cc(e22, t2, n2, r2, i2, o2, a2, s2, u2, c2) { var l2 = 128 & t2, f2 = 1 & t2, h2 = 2 & t2, d2 = 24 & t2, v2 = 512 & t2, p2 = h2 ? void 0 : Ru(e22); return function m2() { for (var g2 = arguments.length, y2 = Array(g2), b2 = g2; b2--; ) y2[b2] = arguments[b2]; if (d2) var k2 = bc(m2), w2 = Fu(y2, k2); if (r2 && (y2 = Lu(y2, r2, i2, d2)), o2 && (y2 = qu(y2, o2, a2, d2)), g2 -= w2, d2 && g2 < c2) { var x2 = Sc(y2, k2); return yc(e22, t2, Cc, m2.placeholder, n2, y2, x2, s2, u2, c2 - g2); } var j2 = f2 ? n2 : this, S2 = h2 ? j2[e22] : e22; return g2 = y2.length, s2 ? y2 = jc(y2, s2) : v2 && g2 > 1 && y2.reverse(), l2 && u2 < g2 && (y2.length = u2), this && this !== zs && this instanceof m2 && (S2 = p2 || Ru(S2)), S2.apply(j2, y2); }; } var _c = Math.min; var $c = Math.max; function Oc(e22, t2, n2, r2, i2, o2, a2, s2) { var u2 = 2 & t2; if (!u2 && typeof e22 != "function") throw new TypeError("Expected a function"); var c2 = r2 ? r2.length : 0; if (c2 || (t2 &= -97, r2 = i2 = void 0), a2 = a2 === void 0 ? a2 : $c(vu(a2), 0), s2 = s2 === void 0 ? s2 : vu(s2), c2 -= i2 ? i2.length : 0, 64 & t2) { var l2 = r2, f2 = i2; r2 = i2 = void 0; } var h2 = u2 ? void 0 : Ju(e22), d2 = [e22, t2, n2, r2, i2, l2, f2, o2, a2, s2]; if (h2 && function(e23, t3) { var n3 = e23[1], r3 = t3[1], i3 = n3 | r3, o3 = i3 < 131, a3 = r3 == 128 && n3 == 8 || r3 == 128 && n3 == 256 && e23[7].length <= t3[8] || r3 == 384 && t3[7].length <= t3[8] && n3 == 8; if (!o3 && !a3) return e23; 1 & r3 && (e23[2] = t3[2], i3 |= 1 & n3 ? 0 : 4); var s3 = t3[3]; if (s3) { var u3 = e23[3]; e23[3] = u3 ? Lu(u3, s3, t3[4]) : s3, e23[4] = u3 ? Sc(e23[3], "__lodash_placeholder__") : t3[4]; } (s3 = t3[5]) && (u3 = e23[5], e23[5] = u3 ? qu(u3, s3, t3[6]) : s3, e23[6] = u3 ? Sc(e23[5], "__lodash_placeholder__") : t3[6]), (s3 = t3[7]) && (e23[7] = s3), 128 & r3 && (e23[8] = e23[8] == null ? t3[8] : _c(e23[8], t3[8])), e23[9] == null && (e23[9] = t3[9]), e23[0] = t3[0], e23[1] = i3; }(d2, h2), e22 = d2[0], t2 = d2[1], n2 = d2[2], r2 = d2[3], i2 = d2[4], !(s2 = d2[9] = d2[9] === void 0 ? u2 ? 0 : e22.length : $c(d2[9] - c2, 0)) && 24 & t2 && (t2 &= -25), t2 && t2 != 1) v2 = t2 == 8 || t2 == 16 ? function(e23, t3, n3) { var r3 = Ru(e23); return function i3() { for (var o3 = arguments.length, a3 = Array(o3), s3 = o3, u3 = bc(i3); s3--; ) a3[s3] = arguments[s3]; var c3 = o3 < 3 && a3[0] !== u3 && a3[o3 - 1] !== u3 ? [] : Sc(a3, u3); return (o3 -= c3.length) < n3 ? yc(e23, t3, Cc, i3.placeholder, void 0, a3, c3, void 0, void 0, n3 - o3) : Du(this && this !== zs && this instanceof i3 ? r3 : e23, this, a3); }; }(e22, t2, s2) : t2 != 32 && t2 != 33 || i2.length ? Cc.apply(void 0, d2) : function(e23, t3, n3, r3) { var i3 = 1 & t3, o3 = Ru(e23); return function t4() { for (var a3 = -1, s3 = arguments.length, u3 = -1, c3 = r3.length, l3 = Array(c3 + s3), f3 = this && this !== zs && this instanceof t4 ? o3 : e23; ++u3 < c3; ) l3[u3] = r3[u3]; for (; s3--; ) l3[u3++] = arguments[++a3]; return Du(f3, i3 ? n3 : this, l3); }; }(e22, t2, n2, r2); else var v2 = function(e23, t3, n3) { var r3 = 1 & t3, i3 = Ru(e23); return function t4() { return (this && this !== zs && this instanceof t4 ? i3 : e23).apply(r3 ? n3 : this, arguments); }; }(e22, t2, n2); return gc((h2 ? Nu : ic)(v2, d2), e22, t2); } function Ac(e22, t2, n2) { return t2 = n2 ? void 0 : t2, Oc(e22, 128, void 0, void 0, void 0, void 0, t2 = e22 && t2 == null ? e22.length : t2); } function Mc(e22, t2, n2) { t2 == "__proto__" && cc ? cc(e22, t2, { configurable: true, enumerable: true, value: n2, writable: true }) : e22[t2] = n2; } function Ec(e22, t2) { return e22 === t2 || e22 != e22 && t2 != t2; } var Pc = Object.prototype.hasOwnProperty; function Nc(e22, t2, n2) { var r2 = e22[t2]; Pc.call(e22, t2) && Ec(r2, n2) && (n2 !== void 0 || t2 in e22) || Mc(e22, t2, n2); } function Tc(e22, t2, n2, r2) { var i2 = !n2; n2 || (n2 = {}); for (var o2 = -1, a2 = t2.length; ++o2 < a2; ) { var s2 = t2[o2], u2 = r2 ? r2(n2[s2], e22[s2], s2, n2, e22) : void 0; u2 === void 0 && (u2 = e22[s2]), i2 ? Mc(n2, s2, u2) : Nc(n2, s2, u2); } return n2; } var Ic = Math.max; function Rc(e22, t2, n2) { return t2 = Ic(t2 === void 0 ? e22.length - 1 : t2, 0), function() { for (var r2 = arguments, i2 = -1, o2 = Ic(r2.length - t2, 0), a2 = Array(o2); ++i2 < o2; ) a2[i2] = r2[t2 + i2]; i2 = -1; for (var s2 = Array(t2 + 1); ++i2 < t2; ) s2[i2] = r2[i2]; return s2[t2] = n2(a2), Du(e22, this, s2); }; } function Dc(e22, t2) { return lc(Rc(e22, t2, mu), e22 + ""); } function zc(e22) { return typeof e22 == "number" && e22 > -1 && e22 % 1 == 0 && e22 <= 9007199254740991; } function Lc(e22) { return e22 != null && zc(e22.length) && !gu(e22); } function Bc(e22, t2, n2) { if (!su(n2)) return false; var r2 = Li(t2); return !!(r2 == "number" ? Lc(n2) && wc(t2, n2.length) : r2 == "string" && t2 in n2) && Ec(n2[t2], e22); } function qc(e22) { return Dc(function(t2, n2) { var r2 = -1, i2 = n2.length, o2 = i2 > 1 ? n2[i2 - 1] : void 0, a2 = i2 > 2 ? n2[2] : void 0; for (o2 = e22.length > 3 && typeof o2 == "function" ? (i2--, o2) : void 0, a2 && Bc(n2[0], n2[1], a2) && (o2 = i2 < 3 ? void 0 : o2, i2 = 1), t2 = Object(t2); ++r2 < i2; ) { var s2 = n2[r2]; s2 && e22(t2, s2, r2, o2); } return t2; }); } var Fc = Object.prototype; function Vc(e22) { var t2 = e22 && e22.constructor; return e22 === (typeof t2 == "function" && t2.prototype || Fc); } function Hc(e22, t2) { for (var n2 = -1, r2 = Array(e22); ++n2 < e22; ) r2[n2] = t2(n2); return r2; } function Wc(e22) { return Us(e22) && Js(e22) == "[object Arguments]"; } var Jc = Object.prototype, Uc = Jc.hasOwnProperty, Kc = Jc.propertyIsEnumerable, Gc = Wc(function() { return arguments; }()) ? Wc : function(e22) { return Us(e22) && Uc.call(e22, "callee") && !Kc.call(e22, "callee"); }; function Qc() { return false; } var Yc = (typeof exports == "undefined" ? "undefined" : Li(exports)) == "object" && exports && !exports.nodeType && exports, Zc = Yc && (typeof module == "undefined" ? "undefined" : Li(module)) == "object" && module && !module.nodeType && module, Xc = Zc && Zc.exports === Yc ? zs.Buffer : void 0, el = (Xc ? Xc.isBuffer : void 0) || Qc, tl = {}; function nl(e22) { return function(t2) { return e22(t2); }; } tl["[object Float32Array]"] = tl["[object Float64Array]"] = tl["[object Int8Array]"] = tl["[object Int16Array]"] = tl["[object Int32Array]"] = tl["[object Uint8Array]"] = tl["[object Uint8ClampedArray]"] = tl["[object Uint16Array]"] = tl["[object Uint32Array]"] = true, tl["[object Arguments]"] = tl["[object Array]"] = tl["[object ArrayBuffer]"] = tl["[object Boolean]"] = tl["[object DataView]"] = tl["[object Date]"] = tl["[object Error]"] = tl["[object Function]"] = tl["[object Map]"] = tl["[object Number]"] = tl["[object Object]"] = tl["[object RegExp]"] = tl["[object Set]"] = tl["[object String]"] = tl["[object WeakMap]"] = false; var rl = (typeof exports == "undefined" ? "undefined" : Li(exports)) == "object" && exports && !exports.nodeType && exports, il = rl && (typeof module == "undefined" ? "undefined" : Li(module)) == "object" && module && !module.nodeType && module, ol = il && il.exports === rl && Rs.process, al = function() { try { var e22 = il && il.require && il.require("util").types; return e22 || ol && ol.binding && ol.binding("util"); } catch (e23) { } }(), sl = al && al.isTypedArray, ul = sl ? nl(sl) : function(e22) { return Us(e22) && zc(e22.length) && !!tl[Js(e22)]; }, cl = Object.prototype.hasOwnProperty; function ll(e22, t2) { var n2 = Ys(e22), r2 = !n2 && Gc(e22), i2 = !n2 && !r2 && el(e22), o2 = !n2 && !r2 && !i2 && ul(e22), a2 = n2 || r2 || i2 || o2, s2 = a2 ? Hc(e22.length, String) : [], u2 = s2.length; for (var c2 in e22) !t2 && !cl.call(e22, c2) || a2 && (c2 == "length" || i2 && (c2 == "offset" || c2 == "parent") || o2 && (c2 == "buffer" || c2 == "byteLength" || c2 == "byteOffset") || wc(c2, u2)) || s2.push(c2); return s2; } function fl(e22, t2) { return function(n2) { return e22(t2(n2)); }; } var hl = fl(Object.keys, Object), dl = Object.prototype.hasOwnProperty; function vl(e22) { if (!Vc(e22)) return hl(e22); var t2 = []; for (var n2 in Object(e22)) dl.call(e22, n2) && n2 != "constructor" && t2.push(n2); return t2; } function pl(e22) { return Lc(e22) ? ll(e22) : vl(e22); } var ml = Object.prototype.hasOwnProperty, gl = qc(function(e22, t2) { if (Vc(t2) || Lc(t2)) Tc(t2, pl(t2), e22); else for (var n2 in t2) ml.call(t2, n2) && Nc(e22, n2, t2[n2]); }); var yl = Object.prototype.hasOwnProperty; function bl(e22) { if (!su(e22)) return function(e23) { var t3 = []; if (e23 != null) for (var n3 in Object(e23)) t3.push(n3); return t3; }(e22); var t2 = Vc(e22), n2 = []; for (var r2 in e22) (r2 != "constructor" || !t2 && yl.call(e22, r2)) && n2.push(r2); return n2; } function kl(e22) { return Lc(e22) ? ll(e22, true) : bl(e22); } var wl = qc(function(e22, t2) { Tc(t2, kl(t2), e22); }), xl = qc(function(e22, t2, n2, r2) { Tc(t2, kl(t2), e22, r2); }), jl = qc(function(e22, t2, n2, r2) { Tc(t2, pl(t2), e22, r2); }), Sl = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Cl = /^\w*$/; function _l(e22, t2) { if (Ys(e22)) return false; var n2 = Li(e22); return !(n2 != "number" && n2 != "symbol" && n2 != "boolean" && e22 != null && !Ks(e22)) || (Cl.test(e22) || !Sl.test(e22) || t2 != null && e22 in Object(t2)); } var $l = Mu(Object, "create"); var Ol = Object.prototype.hasOwnProperty; var Al = Object.prototype.hasOwnProperty; function Ml(e22) { var t2 = -1, n2 = e22 == null ? 0 : e22.length; for (this.clear(); ++t2 < n2; ) { var r2 = e22[t2]; this.set(r2[0], r2[1]); } } function El(e22, t2) { for (var n2 = e22.length; n2--; ) if (Ec(e22[n2][0], t2)) return n2; return -1; } Ml.prototype.clear = function() { this.__data__ = $l ? $l(null) : {}, this.size = 0; }, Ml.prototype.delete = function(e22) { var t2 = this.has(e22) && delete this.__data__[e22]; return this.size -= t2 ? 1 : 0, t2; }, Ml.prototype.get = function(e22) { var t2 = this.__data__; if ($l) { var n2 = t2[e22]; return n2 === "__lodash_hash_undefined__" ? void 0 : n2; } return Ol.call(t2, e22) ? t2[e22] : void 0; }, Ml.prototype.has = function(e22) { var t2 = this.__data__; return $l ? t2[e22] !== void 0 : Al.call(t2, e22); }, Ml.prototype.set = function(e22, t2) { var n2 = this.__data__; return this.size += this.has(e22) ? 0 : 1, n2[e22] = $l && t2 === void 0 ? "__lodash_hash_undefined__" : t2, this; }; var Pl = Array.prototype.splice; function Nl(e22) { var t2 = -1, n2 = e22 == null ? 0 : e22.length; for (this.clear(); ++t2 < n2; ) { var r2 = e22[t2]; this.set(r2[0], r2[1]); } } Nl.prototype.clear = function() { this.__data__ = [], this.size = 0; }, Nl.prototype.delete = function(e22) { var t2 = this.__data__, n2 = El(t2, e22); return !(n2 < 0) && (n2 == t2.length - 1 ? t2.pop() : Pl.call(t2, n2, 1), --this.size, true); }, Nl.prototype.get = function(e22) { var t2 = this.__data__, n2 = El(t2, e22); return n2 < 0 ? void 0 : t2[n2][1]; }, Nl.prototype.has = function(e22) { return El(this.__data__, e22) > -1; }, Nl.prototype.set = function(e22, t2) { var n2 = this.__data__, r2 = El(n2, e22); return r2 < 0 ? (++this.size, n2.push([e22, t2])) : n2[r2][1] = t2, this; }; var Tl = Mu(zs, "Map"); function Il(e22, t2) { var n2, r2, i2 = e22.__data__; return ((r2 = Li(n2 = t2)) == "string" || r2 == "number" || r2 == "symbol" || r2 == "boolean" ? n2 !== "__proto__" : n2 === null) ? i2[typeof t2 == "string" ? "string" : "hash"] : i2.map; } function Rl(e22) { var t2 = -1, n2 = e22 == null ? 0 : e22.length; for (this.clear(); ++t2 < n2; ) { var r2 = e22[t2]; this.set(r2[0], r2[1]); } } Rl.prototype.clear = function() { this.size = 0, this.__data__ = { hash: new Ml(), map: new (Tl || Nl)(), string: new Ml() }; }, Rl.prototype.delete = function(e22) { var t2 = Il(this, e22).delete(e22); return this.size -= t2 ? 1 : 0, t2; }, Rl.prototype.get = function(e22) { return Il(this, e22).get(e22); }, Rl.prototype.has = function(e22) { return Il(this, e22).has(e22); }, Rl.prototype.set = function(e22, t2) { var n2 = Il(this, e22), r2 = n2.size; return n2.set(e22, t2), this.size += n2.size == r2 ? 0 : 1, this; }; function Dl(e22, t2) { if (typeof e22 != "function" || t2 != null && typeof t2 != "function") throw new TypeError("Expected a function"); var n2 = function n3() { var r2 = arguments, i2 = t2 ? t2.apply(this, r2) : r2[0], o2 = n3.cache; if (o2.has(i2)) return o2.get(i2); var a2 = e22.apply(this, r2); return n3.cache = o2.set(i2, a2) || o2, a2; }; return n2.cache = new (Dl.Cache || Rl)(), n2; } Dl.Cache = Rl; var zl = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ll = /\\(\\)?/g, Bl = function(e22) { var t2 = Dl(e22, function(e23) { return n2.size === 500 && n2.clear(), e23; }), n2 = t2.cache; return t2; }(function(e22) { var t2 = []; return e22.charCodeAt(0) === 46 && t2.push(""), e22.replace(zl, function(e23, n2, r2, i2) { t2.push(r2 ? i2.replace(Ll, "$1") : n2 || e23); }), t2; }); function ql(e22) { return e22 == null ? "" : eu(e22); } function Fl(e22, t2) { return Ys(e22) ? e22 : _l(e22, t2) ? [e22] : Bl(ql(e22)); } function Vl(e22) { if (typeof e22 == "string" || Ks(e22)) return e22; var t2 = e22 + ""; return t2 == "0" && 1 / e22 == -Infinity ? "-0" : t2; } function Hl(e22, t2) { for (var n2 = 0, r2 = (t2 = Fl(t2, e22)).length; e22 != null && n2 < r2; ) e22 = e22[Vl(t2[n2++])]; return n2 && n2 == r2 ? e22 : void 0; } function Wl(e22, t2, n2) { var r2 = e22 == null ? void 0 : Hl(e22, t2); return r2 === void 0 ? n2 : r2; } function Jl(e22, t2) { for (var n2 = -1, r2 = t2.length, i2 = Array(r2), o2 = e22 == null; ++n2 < r2; ) i2[n2] = o2 ? void 0 : Wl(e22, t2[n2]); return i2; } function Ul(e22, t2) { for (var n2 = -1, r2 = t2.length, i2 = e22.length; ++n2 < r2; ) e22[i2 + n2] = t2[n2]; return e22; } var Kl = Ls ? Ls.isConcatSpreadable : void 0; function Gl(e22) { return Ys(e22) || Gc(e22) || !!(Kl && e22 && e22[Kl]); } function Ql(e22, t2, n2, r2, i2) { var o2 = -1, a2 = e22.length; for (n2 || (n2 = Gl), i2 || (i2 = []); ++o2 < a2; ) { var s2 = e22[o2]; t2 > 0 && n2(s2) ? t2 > 1 ? Ql(s2, t2 - 1, n2, r2, i2) : Ul(i2, s2) : r2 || (i2[i2.length] = s2); } return i2; } function Yl(e22) { return (e22 == null ? 0 : e22.length) ? Ql(e22, 1) : []; } function Zl(e22) { return lc(Rc(e22, void 0, Yl), e22 + ""); } var Xl = Zl(Jl), ef = fl(Object.getPrototypeOf, Object), tf = Function.prototype, nf = Object.prototype, rf = tf.toString, of = nf.hasOwnProperty, af = rf.call(Object); function sf(e22) { if (!Us(e22) || Js(e22) != "[object Object]") return false; var t2 = ef(e22); if (t2 === null) return true; var n2 = of.call(t2, "constructor") && t2.constructor; return typeof n2 == "function" && n2 instanceof n2 && rf.call(n2) == af; } function uf(e22) { if (!Us(e22)) return false; var t2 = Js(e22); return t2 == "[object Error]" || t2 == "[object DOMException]" || typeof e22.message == "string" && typeof e22.name == "string" && !sf(e22); } var cf = Dc(function(e22, t2) { try { return Du(e22, void 0, t2); } catch (e23) { return uf(e23) ? e23 : new Error(e23); } }); function lf(e22, t2) { var n2; if (typeof t2 != "function") throw new TypeError("Expected a function"); return e22 = vu(e22), function() { return --e22 > 0 && (n2 = t2.apply(this, arguments)), e22 <= 1 && (t2 = void 0), n2; }; } var ff = Dc(function(e22, t2, n2) { var r2 = 1; if (n2.length) { var i2 = Sc(n2, bc(ff)); r2 |= 32; } return Oc(e22, r2, t2, n2, i2); }); ff.placeholder = {}; var hf = Zl(function(e22, t2) { return fc(t2, function(t3) { t3 = Vl(t3), Mc(e22, t3, ff(e22[t3], e22)); }), e22; }), df = Dc(function(e22, t2, n2) { var r2 = 3; if (n2.length) { var i2 = Sc(n2, bc(df)); r2 |= 32; } return Oc(t2, r2, e22, n2, i2); }); function vf(e22, t2, n2) { var r2 = -1, i2 = e22.length; t2 < 0 && (t2 = -t2 > i2 ? 0 : i2 + t2), (n2 = n2 > i2 ? i2 : n2) < 0 && (n2 += i2), i2 = t2 > n2 ? 0 : n2 - t2 >>> 0, t2 >>>= 0; for (var o2 = Array(i2); ++r2 < i2; ) o2[r2] = e22[r2 + t2]; return o2; } function pf(e22, t2, n2) { var r2 = e22.length; return n2 = n2 === void 0 ? r2 : n2, !t2 && n2 >= r2 ? e22 : vf(e22, t2, n2); } df.placeholder = {}; var mf = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"); function gf(e22) { return mf.test(e22); } var yf = "[\\ud800-\\udfff]", bf = "[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", kf = "\\ud83c[\\udffb-\\udfff]", wf = "[^\\ud800-\\udfff]", xf = "(?:\\ud83c[\\udde6-\\uddff]){2}", jf = "[\\ud800-\\udbff][\\udc00-\\udfff]", Sf = "(?:" + bf + "|" + kf + ")?", Cf = "[\\ufe0e\\ufe0f]?" + Sf + ("(?:\\u200d(?:" + [wf, xf, jf].join("|") + ")[\\ufe0e\\ufe0f]?" + Sf + ")*"), _f = "(?:" + [wf + bf + "?", bf, xf, jf, yf].join("|") + ")", $f = RegExp(kf + "(?=" + kf + ")|" + _f + Cf, "g"); function Of(e22) { return gf(e22) ? function(e23) { return e23.match($f) || []; }(e22) : function(e23) { return e23.split(""); }(e22); } function Af(e22) { return function(t2) { var n2 = gf(t2 = ql(t2)) ? Of(t2) : void 0, r2 = n2 ? n2[0] : t2.charAt(0), i2 = n2 ? pf(n2, 1).join("") : t2.slice(1); return r2[e22]() + i2; }; } var Mf = Af("toUpperCase"); function Ef(e22) { return Mf(ql(e22).toLowerCase()); } function Pf(e22, t2, n2, r2) { var i2 = -1, o2 = e22 == null ? 0 : e22.length; for (r2 && o2 && (n2 = e22[++i2]); ++i2 < o2; ) n2 = t2(n2, e22[i2], i2, e22); return n2; } function Nf(e22) { return function(t2) { return e22 == null ? void 0 : e22[t2]; }; } var Tf = Nf({ "\xC0": "A", "\xC1": "A", "\xC2": "A", "\xC3": "A", "\xC4": "A", "\xC5": "A", "\xE0": "a", "\xE1": "a", "\xE2": "a", "\xE3": "a", "\xE4": "a", "\xE5": "a", "\xC7": "C", "\xE7": "c", "\xD0": "D", "\xF0": "d", "\xC8": "E", "\xC9": "E", "\xCA": "E", "\xCB": "E", "\xE8": "e", "\xE9": "e", "\xEA": "e", "\xEB": "e", "\xCC": "I", "\xCD": "I", "\xCE": "I", "\xCF": "I", "\xEC": "i", "\xED": "i", "\xEE": "i", "\xEF": "i", "\xD1": "N", "\xF1": "n", "\xD2": "O", "\xD3": "O", "\xD4": "O", "\xD5": "O", "\xD6": "O", "\xD8": "O", "\xF2": "o", "\xF3": "o", "\xF4": "o", "\xF5": "o", "\xF6": "o", "\xF8": "o", "\xD9": "U", "\xDA": "U", "\xDB": "U", "\xDC": "U", "\xF9": "u", "\xFA": "u", "\xFB": "u", "\xFC": "u", "\xDD": "Y", "\xFD": "y", "\xFF": "y", "\xC6": "Ae", "\xE6": "ae", "\xDE": "Th", "\xFE": "th", "\xDF": "ss", "\u0100": "A", "\u0102": "A", "\u0104": "A", "\u0101": "a", "\u0103": "a", "\u0105": "a", "\u0106": "C", "\u0108": "C", "\u010A": "C", "\u010C": "C", "\u0107": "c", "\u0109": "c", "\u010B": "c", "\u010D": "c", "\u010E": "D", "\u0110": "D", "\u010F": "d", "\u0111": "d", "\u0112": "E", "\u0114": "E", "\u0116": "E", "\u0118": "E", "\u011A": "E", "\u0113": "e", "\u0115": "e", "\u0117": "e", "\u0119": "e", "\u011B": "e", "\u011C": "G", "\u011E": "G", "\u0120": "G", "\u0122": "G", "\u011D": "g", "\u011F": "g", "\u0121": "g", "\u0123": "g", "\u0124": "H", "\u0126": "H", "\u0125": "h", "\u0127": "h", "\u0128": "I", "\u012A": "I", "\u012C": "I", "\u012E": "I", "\u0130": "I", "\u0129": "i", "\u012B": "i", "\u012D": "i", "\u012F": "i", "\u0131": "i", "\u0134": "J", "\u0135": "j", "\u0136": "K", "\u0137": "k", "\u0138": "k", "\u0139": "L", "\u013B": "L", "\u013D": "L", "\u013F": "L", "\u0141": "L", "\u013A": "l", "\u013C": "l", "\u013E": "l", "\u0140": "l", "\u0142": "l", "\u0143": "N", "\u0145": "N", "\u0147": "N", "\u014A": "N", "\u0144": "n", "\u0146": "n", "\u0148": "n", "\u014B": "n", "\u014C": "O", "\u014E": "O", "\u0150": "O", "\u014D": "o", "\u014F": "o", "\u0151": "o", "\u0154": "R", "\u0156": "R", "\u0158": "R", "\u0155": "r", "\u0157": "r", "\u0159": "r", "\u015A": "S", "\u015C": "S", "\u015E": "S", "\u0160": "S", "\u015B": "s", "\u015D": "s", "\u015F": "s", "\u0161": "s", "\u0162": "T", "\u0164": "T", "\u0166": "T", "\u0163": "t", "\u0165": "t", "\u0167": "t", "\u0168": "U", "\u016A": "U", "\u016C": "U", "\u016E": "U", "\u0170": "U", "\u0172": "U", "\u0169": "u", "\u016B": "u", "\u016D": "u", "\u016F": "u", "\u0171": "u", "\u0173": "u", "\u0174": "W", "\u0175": "w", "\u0176": "Y", "\u0177": "y", "\u0178": "Y", "\u0179": "Z", "\u017B": "Z", "\u017D": "Z", "\u017A": "z", "\u017C": "z", "\u017E": "z", "\u0132": "IJ", "\u0133": "ij", "\u0152": "Oe", "\u0153": "oe", "\u0149": "'n", "\u017F": "s" }), If = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Rf = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"); function Df(e22) { return (e22 = ql(e22)) && e22.replace(If, Tf).replace(Rf, ""); } var zf = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; var Lf = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; var Bf = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", qf = "[" + Bf + "]", Ff = "\\d+", Vf = "[\\u2700-\\u27bf]", Hf = "[a-z\\xdf-\\xf6\\xf8-\\xff]", Wf = "[^\\ud800-\\udfff" + Bf + Ff + "\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]", Jf = "(?:\\ud83c[\\udde6-\\uddff]){2}", Uf = "[\\ud800-\\udbff][\\udc00-\\udfff]", Kf = "[A-Z\\xc0-\\xd6\\xd8-\\xde]", Gf = "(?:" + Hf + "|" + Wf + ")", Qf = "(?:" + Kf + "|" + Wf + ")", Yf = "(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?", Zf = "[\\ufe0e\\ufe0f]?" + Yf + ("(?:\\u200d(?:" + ["[^\\ud800-\\udfff]", Jf, Uf].join("|") + ")[\\ufe0e\\ufe0f]?" + Yf + ")*"), Xf = "(?:" + [Vf, Jf, Uf].join("|") + ")" + Zf, eh = RegExp([Kf + "?" + Hf + "+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=" + [qf, Kf, "$"].join("|") + ")", Qf + "+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=" + [qf, Kf + Gf, "$"].join("|") + ")", Kf + "?" + Gf + "+(?:['\u2019](?:d|ll|m|re|s|t|ve))?", Kf + "+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?", "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ff, Xf].join("|"), "g"); function th(e22, t2, n2) { return e22 = ql(e22), (t2 = n2 ? void 0 : t2) === void 0 ? function(e23) { return Lf.test(e23); }(e22) ? function(e23) { return e23.match(eh) || []; }(e22) : function(e23) { return e23.match(zf) || []; }(e22) : e22.match(t2) || []; } var nh = RegExp("['\u2019]", "g"); function rh(e22) { return function(t2) { return Pf(th(Df(t2).replace(nh, "")), e22, ""); }; } var ih = rh(function(e22, t2, n2) { return t2 = t2.toLowerCase(), e22 + (n2 ? Ef(t2) : t2); }); function oh() { if (!arguments.length) return []; var e22 = arguments[0]; return Ys(e22) ? e22 : [e22]; } var ah = zs.isFinite, sh = Math.min; function uh(e22) { var t2 = Math[e22]; return function(e23, n2) { if (e23 = hu(e23), (n2 = n2 == null ? 0 : sh(vu(n2), 292)) && ah(e23)) { var r2 = (ql(e23) + "e").split("e"); return +((r2 = (ql(t2(r2[0] + "e" + (+r2[1] + n2))) + "e").split("e"))[0] + "e" + (+r2[1] - n2)); } return t2(e23); }; } var ch = uh("ceil"); function lh(e22) { var t2 = ec(e22); return t2.__chain__ = true, t2; } var fh = Math.ceil, hh = Math.max; function dh(e22, t2, n2) { t2 = (n2 ? Bc(e22, t2, n2) : t2 === void 0) ? 1 : hh(vu(t2), 0); var r2 = e22 == null ? 0 : e22.length; if (!r2 || t2 < 1) return []; for (var i2 = 0, o2 = 0, a2 = Array(fh(r2 / t2)); i2 < r2; ) a2[o2++] = vf(e22, i2, i2 += t2); return a2; } function vh(e22, t2, n2) { return e22 == e22 && (n2 !== void 0 && (e22 = e22 <= n2 ? e22 : n2), t2 !== void 0 && (e22 = e22 >= t2 ? e22 : t2)), e22; } function ph(e22, t2, n2) { return n2 === void 0 && (n2 = t2, t2 = void 0), n2 !== void 0 && (n2 = (n2 = hu(n2)) == n2 ? n2 : 0), t2 !== void 0 && (t2 = (t2 = hu(t2)) == t2 ? t2 : 0), vh(hu(e22), t2, n2); } function mh(e22) { var t2 = this.__data__ = new Nl(e22); this.size = t2.size; } function gh(e22, t2) { return e22 && Tc(t2, pl(t2), e22); } mh.prototype.clear = function() { this.__data__ = new Nl(), this.size = 0; }, mh.prototype.delete = function(e22) { var t2 = this.__data__, n2 = t2.delete(e22); return this.size = t2.size, n2; }, mh.prototype.get = function(e22) { return this.__data__.get(e22); }, mh.prototype.has = function(e22) { return this.__data__.has(e22); }, mh.prototype.set = function(e22, t2) { var n2 = this.__data__; if (n2 instanceof Nl) { var r2 = n2.__data__; if (!Tl || r2.length < 199) return r2.push([e22, t2]), this.size = ++n2.size, this; n2 = this.__data__ = new Rl(r2); } return n2.set(e22, t2), this.size = n2.size, this; }; var yh = (typeof exports == "undefined" ? "undefined" : Li(exports)) == "object" && exports && !exports.nodeType && exports, bh = yh && (typeof module == "undefined" ? "undefined" : Li(module)) == "object" && module && !module.nodeType && module, kh = bh && bh.exports === yh ? zs.Buffer : void 0, wh = kh ? kh.allocUnsafe : void 0; function xh(e22, t2) { if (t2) return e22.slice(); var n2 = e22.length, r2 = wh ? wh(n2) : new e22.constructor(n2); return e22.copy(r2), r2; } function jh(e22, t2) { for (var n2 = -1, r2 = e22 == null ? 0 : e22.length, i2 = 0, o2 = []; ++n2 < r2; ) { var a2 = e22[n2]; t2(a2, n2, e22) && (o2[i2++] = a2); } return o2; } function Sh() { return []; } var Ch = Object.prototype.propertyIsEnumerable, _h = Object.getOwnPropertySymbols, $h = _h ? function(e22) { return e22 == null ? [] : (e22 = Object(e22), jh(_h(e22), function(t2) { return Ch.call(e22, t2); })); } : Sh; var Oh = Object.getOwnPropertySymbols ? function(e22) { for (var t2 = []; e22; ) Ul(t2, $h(e22)), e22 = ef(e22); return t2; } : Sh; function Ah(e22, t2, n2) { var r2 = t2(e22); return Ys(e22) ? r2 : Ul(r2, n2(e22)); } function Mh(e22) { return Ah(e22, pl, $h); } function Eh(e22) { return Ah(e22, kl, Oh); } var Ph = Mu(zs, "DataView"), Nh = Mu(zs, "Promise"), Th = Mu(zs, "Set"), Ih = xu(Ph), Rh = xu(Tl), Dh = xu(Nh), zh = xu(Th), Lh = xu(Eu), Bh = Js; (Ph && Bh(new Ph(new ArrayBuffer(1))) != "[object DataView]" || Tl && Bh(new Tl()) != "[object Map]" || Nh && Bh(Nh.resolve()) != "[object Promise]" || Th && Bh(new Th()) != "[object Set]" || Eu && Bh(new Eu()) != "[object WeakMap]") && (Bh = function(e22) { var t2 = Js(e22), n2 = t2 == "[object Object]" ? e22.constructor : void 0, r2 = n2 ? xu(n2) : ""; if (r2) switch (r2) { case Ih: return "[object DataView]"; case Rh: return "[object Map]"; case Dh: return "[object Promise]"; case zh: return "[object Set]"; case Lh: return "[object WeakMap]"; } return t2; }); var qh = Bh, Fh = Object.prototype.hasOwnProperty; var Vh = zs.Uint8Array; function Hh(e22) { var t2 = new e22.constructor(e22.byteLength); return new Vh(t2).set(new Vh(e22)), t2; } var Wh = /\w*$/; var Jh = Ls ? Ls.prototype : void 0, Uh = Jh ? Jh.valueOf : void 0; function Kh(e22, t2) { var n2 = t2 ? Hh(e22.buffer) : e22.buffer; return new e22.constructor(n2, e22.byteOffset, e22.length); } function Gh(e22, t2, n2) { var r2, i2 = e22.constructor; switch (t2) { case "[object ArrayBuffer]": return Hh(e22); case "[object Boolean]": case "[object Date]": return new i2(+e22); case "[object DataView]": return function(e23, t3) { var n3 = t3 ? Hh(e23.buffer) : e23.buffer; return new e23.constructor(n3, e23.byteOffset, e23.byteLength); }(e22, n2); case "[object Float32Array]": case "[object Float64Array]": case "[object Int8Array]": case "[object Int16Array]": case "[object Int32Array]": case "[object Uint8Array]": case "[object Uint8ClampedArray]": case "[object Uint16Array]": case "[object Uint32Array]": return Kh(e22, n2); case "[object Map]": return new i2(); case "[object Number]": case "[object String]": return new i2(e22); case "[object RegExp]": return function(e23) { var t3 = new e23.constructor(e23.source, Wh.exec(e23)); return t3.lastIndex = e23.lastIndex, t3; }(e22); case "[object Set]": return new i2(); case "[object Symbol]": return r2 = e22, Uh ? Object(Uh.call(r2)) : {}; } } function Qh(e22) { return typeof e22.constructor != "function" || Vc(e22) ? {} : Iu(ef(e22)); } var Yh = al && al.isMap, Zh = Yh ? nl(Yh) : function(e22) { return Us(e22) && qh(e22) == "[object Map]"; }; var Xh = al && al.isSet, ed = Xh ? nl(Xh) : function(e22) { return Us(e22) && qh(e22) == "[object Set]"; }, td = {}; function nd(e22, t2, n2, r2, i2, o2) { var a2, s2 = 1 & t2, u2 = 2 & t2, c2 = 4 & t2; if (n2 && (a2 = i2 ? n2(e22, r2, i2, o2) : n2(e22)), a2 !== void 0) return a2; if (!su(e22)) return e22; var l2 = Ys(e22); if (l2) { if (a2 = function(e23) { var t3 = e23.length, n3 = new e23.constructor(t3); return t3 && typeof e23[0] == "string" && Fh.call(e23, "index") && (n3.index = e23.index, n3.input = e23.input), n3; }(e22), !s2) return Yu(e22, a2); } else { var f2 = qh(e22), h2 = f2 == "[object Function]" || f2 == "[object GeneratorFunction]"; if (el(e22)) return xh(e22, s2); if (f2 == "[object Object]" || f2 == "[object Arguments]" || h2 && !i2) { if (a2 = u2 || h2 ? {} : Qh(e22), !s2) return u2 ? function(e23, t3) { return Tc(e23, Oh(e23), t3); }(e22, function(e23, t3) { return e23 && Tc(t3, kl(t3), e23); }(a2, e22)) : function(e23, t3) { return Tc(e23, $h(e23), t3); }(e22, gh(a2, e22)); } else { if (!td[f2]) return i2 ? e22 : {}; a2 = Gh(e22, f2, s2); } } o2 || (o2 = new mh()); var d2 = o2.get(e22); if (d2) return d2; o2.set(e22, a2), ed(e22) ? e22.forEach(function(r3) { a2.add(nd(r3, t2, n2, r3, e22, o2)); }) : Zh(e22) && e22.forEach(function(r3, i3) { a2.set(i3, nd(r3, t2, n2, i3, e22, o2)); }); var v2 = l2 ? void 0 : (c2 ? u2 ? Eh : Mh : u2 ? kl : pl)(e22); return fc(v2 || e22, function(r3, i3) { v2 && (r3 = e22[i3 = r3]), Nc(a2, i3, nd(r3, t2, n2, i3, e22, o2)); }), a2; } td["[object Arguments]"] = td["[object Array]"] = td["[object ArrayBuffer]"] = td["[object DataView]"] = td["[object Boolean]"] = td["[object Date]"] = td["[object Float32Array]"] = td["[object Float64Array]"] = td["[object Int8Array]"] = td["[object Int16Array]"] = td["[object Int32Array]"] = td["[object Map]"] = td["[object Number]"] = td["[object Object]"] = td["[object RegExp]"] = td["[object Set]"] = td["[object String]"] = td["[object Symbol]"] = td["[object Uint8Array]"] = td["[object Uint8ClampedArray]"] = td["[object Uint16Array]"] = td["[object Uint32Array]"] = true, td["[object Error]"] = td["[object Function]"] = td["[object WeakMap]"] = false; function rd(e22) { return nd(e22, 4); } function id(e22) { return nd(e22, 5); } function od(e22, t2) { return nd(e22, 5, t2 = typeof t2 == "function" ? t2 : void 0); } function ad(e22, t2) { return nd(e22, 4, t2 = typeof t2 == "function" ? t2 : void 0); } function sd() { return new Qu(this.value(), this.__chain__); } function ud(e22) { for (var t2 = -1, n2 = e22 == null ? 0 : e22.length, r2 = 0, i2 = []; ++t2 < n2; ) { var o2 = e22[t2]; o2 && (i2[r2++] = o2); } return i2; } function cd() { var e22 = arguments.length; if (!e22) return []; for (var t2 = Array(e22 - 1), n2 = arguments[0], r2 = e22; r2--; ) t2[r2 - 1] = arguments[r2]; return Ul(Ys(n2) ? Yu(n2) : [n2], Ql(t2, 1)); } function ld(e22) { var t2 = -1, n2 = e22 == null ? 0 : e22.length; for (this.__data__ = new Rl(); ++t2 < n2; ) this.add(e22[t2]); } function fd(e22, t2) { for (var n2 = -1, r2 = e22 == null ? 0 : e22.length; ++n2 < r2; ) if (t2(e22[n2], n2, e22)) return true; return false; } function hd(e22, t2) { return e22.has(t2); } ld.prototype.add = ld.prototype.push = function(e22) { return this.__data__.set(e22, "__lodash_hash_undefined__"), this; }, ld.prototype.has = function(e22) { return this.__data__.has(e22); }; function dd(e22, t2, n2, r2, i2, o2) { var a2 = 1 & n2, s2 = e22.length, u2 = t2.length; if (s2 != u2 && !(a2 && u2 > s2)) return false; var c2 = o2.get(e22), l2 = o2.get(t2); if (c2 && l2) return c2 == t2 && l2 == e22; var f2 = -1, h2 = true, d2 = 2 & n2 ? new ld() : void 0; for (o2.set(e22, t2), o2.set(t2, e22); ++f2 < s2; ) { var v2 = e22[f2], p2 = t2[f2]; if (r2) var m2 = a2 ? r2(p2, v2, f2, t2, e22, o2) : r2(v2, p2, f2, e22, t2, o2); if (m2 !== void 0) { if (m2) continue; h2 = false; break; } if (d2) { if (!fd(t2, function(e23, t3) { if (!hd(d2, t3) && (v2 === e23 || i2(v2, e23, n2, r2, o2))) return d2.push(t3); })) { h2 = false; break; } } else if (v2 !== p2 && !i2(v2, p2, n2, r2, o2)) { h2 = false; break; } } return o2.delete(e22), o2.delete(t2), h2; } function vd(e22) { var t2 = -1, n2 = Array(e22.size); return e22.forEach(function(e23, r2) { n2[++t2] = [r2, e23]; }), n2; } function pd(e22) { var t2 = -1, n2 = Array(e22.size); return e22.forEach(function(e23) { n2[++t2] = e23; }), n2; } var md = Ls ? Ls.prototype : void 0, gd = md ? md.valueOf : void 0; var yd = Object.prototype.hasOwnProperty; var bd = "[object Object]", kd = Object.prototype.hasOwnProperty; function wd(e22, t2, n2, r2, i2, o2) { var a2 = Ys(e22), s2 = Ys(t2), u2 = a2 ? "[object Array]" : qh(e22), c2 = s2 ? "[object Array]" : qh(t2), l2 = (u2 = u2 == "[object Arguments]" ? bd : u2) == bd, f2 = (c2 = c2 == "[object Arguments]" ? bd : c2) == bd, h2 = u2 == c2; if (h2 && el(e22)) { if (!el(t2)) return false; a2 = true, l2 = false; } if (h2 && !l2) return o2 || (o2 = new mh()), a2 || ul(e22) ? dd(e22, t2, n2, r2, i2, o2) : function(e23, t3, n3, r3, i3, o3, a3) { switch (n3) { case "[object DataView]": if (e23.byteLength != t3.byteLength || e23.byteOffset != t3.byteOffset) return false; e23 = e23.buffer, t3 = t3.buffer; case "[object ArrayBuffer]": return !(e23.byteLength != t3.byteLength || !o3(new Vh(e23), new Vh(t3))); case "[object Boolean]": case "[object Date]": case "[object Number]": return Ec(+e23, +t3); case "[object Error]": return e23.name == t3.name && e23.message == t3.message; case "[object RegExp]": case "[object String]": return e23 == t3 + ""; case "[object Map]": var s3 = vd; case "[object Set]": var u3 = 1 & r3; if (s3 || (s3 = pd), e23.size != t3.size && !u3) return false; var c3 = a3.get(e23); if (c3) return c3 == t3; r3 |= 2, a3.set(e23, t3); var l3 = dd(s3(e23), s3(t3), r3, i3, o3, a3); return a3.delete(e23), l3; case "[object Symbol]": if (gd) return gd.call(e23) == gd.call(t3); } return false; }(e22, t2, u2, n2, r2, i2, o2); if (!(1 & n2)) { var d2 = l2 && kd.call(e22, "__wrapped__"), v2 = f2 && kd.call(t2, "__wrapped__"); if (d2 || v2) { var p2 = d2 ? e22.value() : e22, m2 = v2 ? t2.value() : t2; return o2 || (o2 = new mh()), i2(p2, m2, n2, r2, o2); } } return !!h2 && (o2 || (o2 = new mh()), function(e23, t3, n3, r3, i3, o3) { var a3 = 1 & n3, s3 = Mh(e23), u3 = s3.length; if (u3 != Mh(t3).length && !a3) return false; for (var c3 = u3; c3--; ) { var l3 = s3[c3]; if (!(a3 ? l3 in t3 : yd.call(t3, l3))) return false; } var f3 = o3.get(e23), h3 = o3.get(t3); if (f3 && h3) return f3 == t3 && h3 == e23; var d3 = true; o3.set(e23, t3), o3.set(t3, e23); for (var v3 = a3; ++c3 < u3; ) { var p3 = e23[l3 = s3[c3]], m3 = t3[l3]; if (r3) var g2 = a3 ? r3(m3, p3, l3, t3, e23, o3) : r3(p3, m3, l3, e23, t3, o3); if (!(g2 === void 0 ? p3 === m3 || i3(p3, m3, n3, r3, o3) : g2)) { d3 = false; break; } v3 || (v3 = l3 == "constructor"); } if (d3 && !v3) { var y2 = e23.constructor, b2 = t3.constructor; y2 == b2 || !("constructor" in e23) || !("constructor" in t3) || typeof y2 == "function" && y2 instanceof y2 && typeof b2 == "function" && b2 instanceof b2 || (d3 = false); } return o3.delete(e23), o3.delete(t3), d3; }(e22, t2, n2, r2, i2, o2)); } function xd(e22, t2, n2, r2, i2) { return e22 === t2 || (e22 == null || t2 == null || !Us(e22) && !Us(t2) ? e22 != e22 && t2 != t2 : wd(e22, t2, n2, r2, xd, i2)); } function jd(e22, t2, n2, r2) { var i2 = n2.length, o2 = i2, a2 = !r2; if (e22 == null) return !o2; for (e22 = Object(e22); i2--; ) { var s2 = n2[i2]; if (a2 && s2[2] ? s2[1] !== e22[s2[0]] : !(s2[0] in e22)) return false; } for (; ++i2 < o2; ) { var u2 = (s2 = n2[i2])[0], c2 = e22[u2], l2 = s2[1]; if (a2 && s2[2]) { if (c2 === void 0 && !(u2 in e22)) return false; } else { var f2 = new mh(); if (r2) var h2 = r2(c2, l2, u2, e22, t2, f2); if (!(h2 === void 0 ? xd(l2, c2, 3, r2, f2) : h2)) return false; } } return true; } function Sd(e22) { return e22 == e22 && !su(e22); } function Cd(e22) { for (var t2 = pl(e22), n2 = t2.length; n2--; ) { var r2 = t2[n2], i2 = e22[r2]; t2[n2] = [r2, i2, Sd(i2)]; } return t2; } function _d(e22, t2) { return function(n2) { return n2 != null && (n2[e22] === t2 && (t2 !== void 0 || e22 in Object(n2))); }; } function $d(e22) { var t2 = Cd(e22); return t2.length == 1 && t2[0][2] ? _d(t2[0][0], t2[0][1]) : function(n2) { return n2 === e22 || jd(n2, e22, t2); }; } function Od(e22, t2) { return e22 != null && t2 in Object(e22); } function Ad(e22, t2, n2) { for (var r2 = -1, i2 = (t2 = Fl(t2, e22)).length, o2 = false; ++r2 < i2; ) { var a2 = Vl(t2[r2]); if (!(o2 = e22 != null && n2(e22, a2))) break; e22 = e22[a2]; } return o2 || ++r2 != i2 ? o2 : !!(i2 = e22 == null ? 0 : e22.length) && zc(i2) && wc(a2, i2) && (Ys(e22) || Gc(e22)); } function Md(e22, t2) { return e22 != null && Ad(e22, t2, Od); } function Ed(e22, t2) { return _l(e22) && Sd(t2) ? _d(Vl(e22), t2) : function(n2) { var r2 = Wl(n2, e22); return r2 === void 0 && r2 === t2 ? Md(n2, e22) : xd(t2, r2, 3); }; } function Pd(e22) { return function(t2) { return t2 == null ? void 0 : t2[e22]; }; } function Nd(e22) { return _l(e22) ? Pd(Vl(e22)) : function(e23) { return function(t2) { return Hl(t2, e23); }; }(e22); } function Td(e22) { return typeof e22 == "function" ? e22 : e22 == null ? mu : Li(e22) == "object" ? Ys(e22) ? Ed(e22[0], e22[1]) : $d(e22) : Nd(e22); } function Id(e22) { var t2 = e22 == null ? 0 : e22.length, n2 = Td; return e22 = t2 ? Qs(e22, function(e23) { if (typeof e23[1] != "function") throw new TypeError("Expected a function"); return [n2(e23[0]), e23[1]]; }) : [], Dc(function(n3) { for (var r2 = -1; ++r2 < t2; ) { var i2 = e22[r2]; if (Du(i2[0], this, n3)) return Du(i2[1], this, n3); } }); } function Rd(e22, t2, n2) { var r2 = n2.length; if (e22 == null) return !r2; for (e22 = Object(e22); r2--; ) { var i2 = n2[r2], o2 = t2[i2], a2 = e22[i2]; if (a2 === void 0 && !(i2 in e22) || !o2(a2)) return false; } return true; } function Dd(e22) { return function(e23) { var t2 = pl(e23); return function(n2) { return Rd(n2, e23, t2); }; }(nd(e22, 1)); } function zd(e22, t2) { return t2 == null || Rd(e22, t2, pl(t2)); } function Ld(e22, t2, n2, r2) { for (var i2 = -1, o2 = e22 == null ? 0 : e22.length; ++i2 < o2; ) { var a2 = e22[i2]; t2(r2, a2, n2(a2), e22); } return r2; } function Bd(e22) { return function(t2, n2, r2) { for (var i2 = -1, o2 = Object(t2), a2 = r2(t2), s2 = a2.length; s2--; ) { var u2 = a2[e22 ? s2 : ++i2]; if (n2(o2[u2], u2, o2) === false) break; } return t2; }; } var qd = Bd(); function Fd(e22, t2) { return e22 && qd(e22, t2, pl); } function Vd(e22, t2) { return function(n2, r2) { if (n2 == null) return n2; if (!Lc(n2)) return e22(n2, r2); for (var i2 = n2.length, o2 = t2 ? i2 : -1, a2 = Object(n2); (t2 ? o2-- : ++o2 < i2) && r2(a2[o2], o2, a2) !== false; ) ; return n2; }; } var Hd = Vd(Fd); function Wd(e22, t2, n2, r2) { return Hd(e22, function(e23, i2, o2) { t2(r2, e23, n2(e23), o2); }), r2; } function Jd(e22, t2) { return function(n2, r2) { var i2 = Ys(n2) ? Ld : Wd, o2 = t2 ? t2() : {}; return i2(n2, e22, Td(r2), o2); }; } var Ud = Object.prototype.hasOwnProperty, Kd = Jd(function(e22, t2, n2) { Ud.call(e22, n2) ? ++e22[n2] : Mc(e22, n2, 1); }); function Gd(e22, t2) { var n2 = Iu(e22); return t2 == null ? n2 : gh(n2, t2); } function Qd(e22, t2, n2) { var r2 = Oc(e22, 8, void 0, void 0, void 0, void 0, void 0, t2 = n2 ? void 0 : t2); return r2.placeholder = Qd.placeholder, r2; } Qd.placeholder = {}; function Yd(e22, t2, n2) { var r2 = Oc(e22, 16, void 0, void 0, void 0, void 0, void 0, t2 = n2 ? void 0 : t2); return r2.placeholder = Yd.placeholder, r2; } Yd.placeholder = {}; var Zd = function() { return zs.Date.now(); }, Xd = Math.max, ev = Math.min; function tv(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2 = 0, l2 = false, f2 = false, h2 = true; if (typeof e22 != "function") throw new TypeError("Expected a function"); function d2(t3) { var n3 = r2, o3 = i2; return r2 = i2 = void 0, c2 = t3, a2 = e22.apply(o3, n3); } function v2(e23) { return c2 = e23, s2 = setTimeout(m2, t2), l2 ? d2(e23) : a2; } function p2(e23) { var n3 = e23 - u2; return u2 === void 0 || n3 >= t2 || n3 < 0 || f2 && e23 - c2 >= o2; } function m2() { var e23 = Zd(); if (p2(e23)) return g2(e23); s2 = setTimeout(m2, function(e24) { var n3 = t2 - (e24 - u2); return f2 ? ev(n3, o2 - (e24 - c2)) : n3; }(e23)); } function g2(e23) { return s2 = void 0, h2 && r2 ? d2(e23) : (r2 = i2 = void 0, a2); } function y2() { var e23 = Zd(), n3 = p2(e23); if (r2 = arguments, i2 = this, u2 = e23, n3) { if (s2 === void 0) return v2(u2); if (f2) return clearTimeout(s2), s2 = setTimeout(m2, t2), d2(u2); } return s2 === void 0 && (s2 = setTimeout(m2, t2)), a2; } return t2 = hu(t2) || 0, su(n2) && (l2 = !!n2.leading, o2 = (f2 = "maxWait" in n2) ? Xd(hu(n2.maxWait) || 0, t2) : o2, h2 = "trailing" in n2 ? !!n2.trailing : h2), y2.cancel = function() { s2 !== void 0 && clearTimeout(s2), c2 = 0, r2 = u2 = i2 = s2 = void 0; }, y2.flush = function() { return s2 === void 0 ? a2 : g2(Zd()); }, y2; } function nv(e22, t2) { return e22 == null || e22 != e22 ? t2 : e22; } var rv = Object.prototype, iv = rv.hasOwnProperty, ov = Dc(function(e22, t2) { e22 = Object(e22); var n2 = -1, r2 = t2.length, i2 = r2 > 2 ? t2[2] : void 0; for (i2 && Bc(t2[0], t2[1], i2) && (r2 = 1); ++n2 < r2; ) for (var o2 = t2[n2], a2 = kl(o2), s2 = -1, u2 = a2.length; ++s2 < u2; ) { var c2 = a2[s2], l2 = e22[c2]; (l2 === void 0 || Ec(l2, rv[c2]) && !iv.call(e22, c2)) && (e22[c2] = o2[c2]); } return e22; }); function av(e22, t2, n2) { (n2 !== void 0 && !Ec(e22[t2], n2) || n2 === void 0 && !(t2 in e22)) && Mc(e22, t2, n2); } function sv(e22) { return Us(e22) && Lc(e22); } function uv(e22, t2) { if ((t2 !== "constructor" || typeof e22[t2] != "function") && t2 != "__proto__") return e22[t2]; } function cv(e22) { return Tc(e22, kl(e22)); } function lv(e22, t2, n2, r2, i2) { e22 !== t2 && qd(t2, function(o2, a2) { if (i2 || (i2 = new mh()), su(o2)) !function(e23, t3, n3, r3, i3, o3, a3) { var s3 = uv(e23, n3), u2 = uv(t3, n3), c2 = a3.get(u2); if (c2) av(e23, n3, c2); else { var l2 = o3 ? o3(s3, u2, n3 + "", e23, t3, a3) : void 0, f2 = l2 === void 0; if (f2) { var h2 = Ys(u2), d2 = !h2 && el(u2), v2 = !h2 && !d2 && ul(u2); l2 = u2, h2 || d2 || v2 ? Ys(s3) ? l2 = s3 : sv(s3) ? l2 = Yu(s3) : d2 ? (f2 = false, l2 = xh(u2, true)) : v2 ? (f2 = false, l2 = Kh(u2, true)) : l2 = [] : sf(u2) || Gc(u2) ? (l2 = s3, Gc(s3) ? l2 = cv(s3) : su(s3) && !gu(s3) || (l2 = Qh(u2))) : f2 = false; } f2 && (a3.set(u2, l2), i3(l2, u2, r3, o3, a3), a3.delete(u2)), av(e23, n3, l2); } }(e22, t2, a2, n2, lv, r2, i2); else { var s2 = r2 ? r2(uv(e22, a2), o2, a2 + "", e22, t2, i2) : void 0; s2 === void 0 && (s2 = o2), av(e22, a2, s2); } }, kl); } function fv(e22, t2, n2, r2, i2, o2) { return su(e22) && su(t2) && (o2.set(t2, e22), lv(e22, t2, void 0, fv, o2), o2.delete(t2)), e22; } var hv = qc(function(e22, t2, n2, r2) { lv(e22, t2, n2, r2); }), dv = Dc(function(e22) { return e22.push(void 0, fv), Du(hv, void 0, e22); }); function vv(e22, t2, n2) { if (typeof e22 != "function") throw new TypeError("Expected a function"); return setTimeout(function() { e22.apply(void 0, n2); }, t2); } var pv = Dc(function(e22, t2) { return vv(e22, 1, t2); }), mv = Dc(function(e22, t2, n2) { return vv(e22, hu(t2) || 0, n2); }); function gv(e22, t2, n2) { for (var r2 = -1, i2 = e22 == null ? 0 : e22.length; ++r2 < i2; ) if (n2(t2, e22[r2])) return true; return false; } function yv(e22, t2, n2, r2) { var i2 = -1, o2 = pc, a2 = true, s2 = e22.length, u2 = [], c2 = t2.length; if (!s2) return u2; n2 && (t2 = Qs(t2, nl(n2))), r2 ? (o2 = gv, a2 = false) : t2.length >= 200 && (o2 = hd, a2 = false, t2 = new ld(t2)); e: for (; ++i2 < s2; ) { var l2 = e22[i2], f2 = n2 == null ? l2 : n2(l2); if (l2 = r2 || l2 !== 0 ? l2 : 0, a2 && f2 == f2) { for (var h2 = c2; h2--; ) if (t2[h2] === f2) continue e; u2.push(l2); } else o2(t2, f2, r2) || u2.push(l2); } return u2; } var bv = Dc(function(e22, t2) { return sv(e22) ? yv(e22, Ql(t2, 1, sv, true)) : []; }); function kv(e22) { var t2 = e22 == null ? 0 : e22.length; return t2 ? e22[t2 - 1] : void 0; } var wv = Dc(function(e22, t2) { var n2 = kv(t2); return sv(n2) && (n2 = void 0), sv(e22) ? yv(e22, Ql(t2, 1, sv, true), Td(n2)) : []; }), xv = Dc(function(e22, t2) { var n2 = kv(t2); return sv(n2) && (n2 = void 0), sv(e22) ? yv(e22, Ql(t2, 1, sv, true), void 0, n2) : []; }), jv = tu(function(e22, t2) { return e22 / t2; }, 1); function Sv(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; return r2 ? vf(e22, (t2 = n2 || t2 === void 0 ? 1 : vu(t2)) < 0 ? 0 : t2, r2) : []; } function Cv(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; return r2 ? vf(e22, 0, (t2 = r2 - (t2 = n2 || t2 === void 0 ? 1 : vu(t2))) < 0 ? 0 : t2) : []; } function _v(e22, t2, n2, r2) { for (var i2 = e22.length, o2 = r2 ? i2 : -1; (r2 ? o2-- : ++o2 < i2) && t2(e22[o2], o2, e22); ) ; return n2 ? vf(e22, r2 ? 0 : o2, r2 ? o2 + 1 : i2) : vf(e22, r2 ? o2 + 1 : 0, r2 ? i2 : o2); } function $v(e22, t2) { return e22 && e22.length ? _v(e22, Td(t2), true, true) : []; } function Ov(e22, t2) { return e22 && e22.length ? _v(e22, Td(t2), true) : []; } function Av(e22) { return typeof e22 == "function" ? e22 : mu; } function Mv(e22, t2) { return (Ys(e22) ? fc : Hd)(e22, Av(t2)); } function Ev(e22, t2) { for (var n2 = e22 == null ? 0 : e22.length; n2-- && t2(e22[n2], n2, e22) !== false; ) ; return e22; } var Pv = Bd(true); function Nv(e22, t2) { return e22 && Pv(e22, t2, pl); } var Tv = Vd(Nv, true); function Iv(e22, t2) { return (Ys(e22) ? Ev : Tv)(e22, Av(t2)); } function Rv(e22, t2, n2) { e22 = ql(e22), t2 = eu(t2); var r2 = e22.length, i2 = n2 = n2 === void 0 ? r2 : vh(vu(n2), 0, r2); return (n2 -= t2.length) >= 0 && e22.slice(n2, i2) == t2; } function Dv(e22) { return function(t2) { var n2 = qh(t2); return n2 == "[object Map]" ? vd(t2) : n2 == "[object Set]" ? function(e23) { var t3 = -1, n3 = Array(e23.size); return e23.forEach(function(e24) { n3[++t3] = [e24, e24]; }), n3; }(t2) : function(e23, t3) { return Qs(t3, function(t4) { return [t4, e23[t4]]; }); }(t2, e22(t2)); }; } var zv = Dv(pl), Lv = Dv(kl), Bv = Nf({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }), qv = /[&<>"']/g, Fv = RegExp(qv.source); function Vv(e22) { return (e22 = ql(e22)) && Fv.test(e22) ? e22.replace(qv, Bv) : e22; } var Hv = /[\\^$.*+?()[\]{}|]/g, Wv = RegExp(Hv.source); function Jv(e22) { return (e22 = ql(e22)) && Wv.test(e22) ? e22.replace(Hv, "\\$&") : e22; } function Uv(e22, t2) { for (var n2 = -1, r2 = e22 == null ? 0 : e22.length; ++n2 < r2; ) if (!t2(e22[n2], n2, e22)) return false; return true; } function Kv(e22, t2) { var n2 = true; return Hd(e22, function(e23, r2, i2) { return n2 = !!t2(e23, r2, i2); }), n2; } function Gv(e22, t2, n2) { var r2 = Ys(e22) ? Uv : Kv; return n2 && Bc(e22, t2, n2) && (t2 = void 0), r2(e22, Td(t2)); } function Qv(e22) { return e22 ? vh(vu(e22), 0, 4294967295) : 0; } function Yv(e22, t2, n2, r2) { var i2 = e22 == null ? 0 : e22.length; return i2 ? (n2 && typeof n2 != "number" && Bc(e22, t2, n2) && (n2 = 0, r2 = i2), function(e23, t3, n3, r3) { var i3 = e23.length; for ((n3 = vu(n3)) < 0 && (n3 = -n3 > i3 ? 0 : i3 + n3), (r3 = r3 === void 0 || r3 > i3 ? i3 : vu(r3)) < 0 && (r3 += i3), r3 = n3 > r3 ? 0 : Qv(r3); n3 < r3; ) e23[n3++] = t3; return e23; }(e22, t2, n2, r2)) : []; } function Zv(e22, t2) { var n2 = []; return Hd(e22, function(e23, r2, i2) { t2(e23, r2, i2) && n2.push(e23); }), n2; } function Xv(e22, t2) { return (Ys(e22) ? jh : Zv)(e22, Td(t2)); } function ep(e22) { return function(t2, n2, r2) { var i2 = Object(t2); if (!Lc(t2)) { var o2 = Td(n2); t2 = pl(t2), n2 = function(e23) { return o2(i2[e23], e23, i2); }; } var a2 = e22(t2, n2, r2); return a2 > -1 ? i2[o2 ? t2[a2] : a2] : void 0; }; } var tp = Math.max; function np(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; if (!r2) return -1; var i2 = n2 == null ? 0 : vu(n2); return i2 < 0 && (i2 = tp(r2 + i2, 0)), hc(e22, Td(t2), i2); } var rp = ep(np); function ip(e22, t2, n2) { var r2; return n2(e22, function(e23, n3, i2) { if (t2(e23, n3, i2)) return r2 = n3, false; }), r2; } function op(e22, t2) { return ip(e22, Td(t2), Fd); } var ap = Math.max, sp = Math.min; function up(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; if (!r2) return -1; var i2 = r2 - 1; return n2 !== void 0 && (i2 = vu(n2), i2 = n2 < 0 ? ap(r2 + i2, 0) : sp(i2, r2 - 1)), hc(e22, Td(t2), i2, true); } var cp = ep(up); function lp(e22, t2) { return ip(e22, Td(t2), Nv); } function fp(e22) { return e22 && e22.length ? e22[0] : void 0; } function hp(e22, t2) { var n2 = -1, r2 = Lc(e22) ? Array(e22.length) : []; return Hd(e22, function(e23, i2, o2) { r2[++n2] = t2(e23, i2, o2); }), r2; } function dp(e22, t2) { return (Ys(e22) ? Qs : hp)(e22, Td(t2)); } function vp(e22, t2) { return Ql(dp(e22, t2), 1); } function pp(e22, t2) { return Ql(dp(e22, t2), Infinity); } function mp(e22, t2, n2) { return n2 = n2 === void 0 ? 1 : vu(n2), Ql(dp(e22, t2), n2); } function gp(e22) { return (e22 == null ? 0 : e22.length) ? Ql(e22, Infinity) : []; } function yp(e22, t2) { return (e22 == null ? 0 : e22.length) ? Ql(e22, t2 = t2 === void 0 ? 1 : vu(t2)) : []; } function bp(e22) { return Oc(e22, 512); } var kp = uh("floor"); function wp(e22) { return Zl(function(t2) { var n2 = t2.length, r2 = n2, i2 = Qu.prototype.thru; for (e22 && t2.reverse(); r2--; ) { var o2 = t2[r2]; if (typeof o2 != "function") throw new TypeError("Expected a function"); if (i2 && !a2 && Gu(o2) == "wrapper") var a2 = new Qu([], true); } for (r2 = a2 ? r2 : n2; ++r2 < n2; ) { var s2 = Gu(o2 = t2[r2]), u2 = s2 == "wrapper" ? Ju(o2) : void 0; a2 = u2 && tc(u2[0]) && u2[1] == 424 && !u2[4].length && u2[9] == 1 ? a2[Gu(u2[0])].apply(a2, u2[3]) : o2.length == 1 && tc(o2) ? a2[s2]() : a2.thru(o2); } return function() { var e23 = arguments, r3 = e23[0]; if (a2 && e23.length == 1 && Ys(r3)) return a2.plant(r3).value(); for (var i3 = 0, o3 = n2 ? t2[i3].apply(this, e23) : r3; ++i3 < n2; ) o3 = t2[i3].call(this, o3); return o3; }; }); } var xp = wp(), jp = wp(true); function Sp(e22, t2) { return e22 == null ? e22 : qd(e22, Av(t2), kl); } function Cp(e22, t2) { return e22 == null ? e22 : Pv(e22, Av(t2), kl); } function _p(e22, t2) { return e22 && Fd(e22, Av(t2)); } function $p(e22, t2) { return e22 && Nv(e22, Av(t2)); } function Op(e22) { for (var t2 = -1, n2 = e22 == null ? 0 : e22.length, r2 = {}; ++t2 < n2; ) { var i2 = e22[t2]; r2[i2[0]] = i2[1]; } return r2; } function Ap(e22, t2) { return jh(t2, function(t3) { return gu(e22[t3]); }); } function Mp(e22) { return e22 == null ? [] : Ap(e22, pl(e22)); } function Ep(e22) { return e22 == null ? [] : Ap(e22, kl(e22)); } var Pp = Object.prototype.hasOwnProperty, Np = Jd(function(e22, t2, n2) { Pp.call(e22, n2) ? e22[n2].push(t2) : Mc(e22, n2, [t2]); }); function Tp(e22, t2) { return e22 > t2; } function Ip(e22) { return function(t2, n2) { return typeof t2 == "string" && typeof n2 == "string" || (t2 = hu(t2), n2 = hu(n2)), e22(t2, n2); }; } var Rp = Ip(Tp), Dp = Ip(function(e22, t2) { return e22 >= t2; }), zp = Object.prototype.hasOwnProperty; function Lp(e22, t2) { return e22 != null && zp.call(e22, t2); } function Bp(e22, t2) { return e22 != null && Ad(e22, t2, Lp); } var qp = Math.max, Fp = Math.min; function Vp(e22, t2, n2) { return t2 = du(t2), n2 === void 0 ? (n2 = t2, t2 = 0) : n2 = du(n2), function(e23, t3, n3) { return e23 >= Fp(t3, n3) && e23 < qp(t3, n3); }(e22 = hu(e22), t2, n2); } function Hp(e22) { return typeof e22 == "string" || !Ys(e22) && Us(e22) && Js(e22) == "[object String]"; } function Wp(e22, t2) { return Qs(t2, function(t3) { return e22[t3]; }); } function Jp(e22) { return e22 == null ? [] : Wp(e22, pl(e22)); } var Up = Math.max; function Kp(e22, t2, n2, r2) { e22 = Lc(e22) ? e22 : Jp(e22), n2 = n2 && !r2 ? vu(n2) : 0; var i2 = e22.length; return n2 < 0 && (n2 = Up(i2 + n2, 0)), Hp(e22) ? n2 <= i2 && e22.indexOf(t2, n2) > -1 : !!i2 && vc(e22, t2, n2) > -1; } var Gp = Math.max; function Qp(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; if (!r2) return -1; var i2 = n2 == null ? 0 : vu(n2); return i2 < 0 && (i2 = Gp(r2 + i2, 0)), vc(e22, t2, i2); } function Yp(e22) { return (e22 == null ? 0 : e22.length) ? vf(e22, 0, -1) : []; } var Zp = Math.min; function Xp(e22, t2, n2) { for (var r2 = n2 ? gv : pc, i2 = e22[0].length, o2 = e22.length, a2 = o2, s2 = Array(o2), u2 = 1 / 0, c2 = []; a2--; ) { var l2 = e22[a2]; a2 && t2 && (l2 = Qs(l2, nl(t2))), u2 = Zp(l2.length, u2), s2[a2] = !n2 && (t2 || i2 >= 120 && l2.length >= 120) ? new ld(a2 && l2) : void 0; } l2 = e22[0]; var f2 = -1, h2 = s2[0]; e: for (; ++f2 < i2 && c2.length < u2; ) { var d2 = l2[f2], v2 = t2 ? t2(d2) : d2; if (d2 = n2 || d2 !== 0 ? d2 : 0, !(h2 ? hd(h2, v2) : r2(c2, v2, n2))) { for (a2 = o2; --a2; ) { var p2 = s2[a2]; if (!(p2 ? hd(p2, v2) : r2(e22[a2], v2, n2))) continue e; } h2 && h2.push(v2), c2.push(d2); } } return c2; } function em(e22) { return sv(e22) ? e22 : []; } var tm = Dc(function(e22) { var t2 = Qs(e22, em); return t2.length && t2[0] === e22[0] ? Xp(t2) : []; }), nm = Dc(function(e22) { var t2 = kv(e22), n2 = Qs(e22, em); return t2 === kv(n2) ? t2 = void 0 : n2.pop(), n2.length && n2[0] === e22[0] ? Xp(n2, Td(t2)) : []; }), rm = Dc(function(e22) { var t2 = kv(e22), n2 = Qs(e22, em); return (t2 = typeof t2 == "function" ? t2 : void 0) && n2.pop(), n2.length && n2[0] === e22[0] ? Xp(n2, void 0, t2) : []; }); function im(e22, t2) { return function(n2, r2) { return function(e23, t3, n3, r3) { return Fd(e23, function(e24, i2, o2) { t3(r3, n3(e24), i2, o2); }), r3; }(n2, e22, t2(r2), {}); }; } var om = Object.prototype.toString, am = im(function(e22, t2, n2) { t2 != null && typeof t2.toString != "function" && (t2 = om.call(t2)), e22[t2] = n2; }, uc(mu)), sm = Object.prototype, um = sm.hasOwnProperty, cm = sm.toString, lm = im(function(e22, t2, n2) { t2 != null && typeof t2.toString != "function" && (t2 = cm.call(t2)), um.call(e22, t2) ? e22[t2].push(n2) : e22[t2] = [n2]; }, Td); function fm(e22, t2) { return t2.length < 2 ? e22 : Hl(e22, vf(t2, 0, -1)); } function hm(e22, t2, n2) { var r2 = (e22 = fm(e22, t2 = Fl(t2, e22))) == null ? e22 : e22[Vl(kv(t2))]; return r2 == null ? void 0 : Du(r2, e22, n2); } var dm = Dc(hm), vm = Dc(function(e22, t2, n2) { var r2 = -1, i2 = typeof t2 == "function", o2 = Lc(e22) ? Array(e22.length) : []; return Hd(e22, function(e23) { o2[++r2] = i2 ? Du(t2, e23, n2) : hm(e23, t2, n2); }), o2; }); var pm = al && al.isArrayBuffer, mm = pm ? nl(pm) : function(e22) { return Us(e22) && Js(e22) == "[object ArrayBuffer]"; }; function gm(e22) { return e22 === true || e22 === false || Us(e22) && Js(e22) == "[object Boolean]"; } var ym = al && al.isDate, bm = ym ? nl(ym) : function(e22) { return Us(e22) && Js(e22) == "[object Date]"; }; function km(e22) { return Us(e22) && e22.nodeType === 1 && !sf(e22); } var wm = Object.prototype.hasOwnProperty; function xm(e22) { if (e22 == null) return true; if (Lc(e22) && (Ys(e22) || typeof e22 == "string" || typeof e22.splice == "function" || el(e22) || ul(e22) || Gc(e22))) return !e22.length; var t2 = qh(e22); if (t2 == "[object Map]" || t2 == "[object Set]") return !e22.size; if (Vc(e22)) return !vl(e22).length; for (var n2 in e22) if (wm.call(e22, n2)) return false; return true; } function jm(e22, t2) { return xd(e22, t2); } function Sm(e22, t2, n2) { var r2 = (n2 = typeof n2 == "function" ? n2 : void 0) ? n2(e22, t2) : void 0; return r2 === void 0 ? xd(e22, t2, void 0, n2) : !!r2; } var Cm = zs.isFinite; function _m(e22) { return typeof e22 == "number" && Cm(e22); } function $m(e22) { return typeof e22 == "number" && e22 == vu(e22); } function Om(e22, t2) { return e22 === t2 || jd(e22, t2, Cd(t2)); } function Am(e22, t2, n2) { return n2 = typeof n2 == "function" ? n2 : void 0, jd(e22, t2, Cd(t2), n2); } function Mm(e22) { return typeof e22 == "number" || Us(e22) && Js(e22) == "[object Number]"; } function Em(e22) { return Mm(e22) && e22 != +e22; } var Pm = bu ? gu : Qc; function Nm(e22) { if (Pm(e22)) throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill."); return Au(e22); } function Tm(e22) { return e22 == null; } function Im(e22) { return e22 === null; } var Rm = al && al.isRegExp, Dm = Rm ? nl(Rm) : function(e22) { return Us(e22) && Js(e22) == "[object RegExp]"; }; function zm(e22) { return $m(e22) && e22 >= -9007199254740991 && e22 <= 9007199254740991; } function Lm(e22) { return e22 === void 0; } function Bm(e22) { return Us(e22) && qh(e22) == "[object WeakMap]"; } function qm(e22) { return Us(e22) && Js(e22) == "[object WeakSet]"; } function Fm(e22) { return Td(typeof e22 == "function" ? e22 : nd(e22, 1)); } var Vm = Array.prototype.join; function Hm(e22, t2) { return e22 == null ? "" : Vm.call(e22, t2); } var Wm = rh(function(e22, t2, n2) { return e22 + (n2 ? "-" : "") + t2.toLowerCase(); }), Jm = Jd(function(e22, t2, n2) { Mc(e22, n2, t2); }); var Um = Math.max, Km = Math.min; function Gm(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; if (!r2) return -1; var i2 = r2; return n2 !== void 0 && (i2 = (i2 = vu(n2)) < 0 ? Um(r2 + i2, 0) : Km(i2, r2 - 1)), t2 == t2 ? function(e23, t3, n3) { for (var r3 = n3 + 1; r3--; ) if (e23[r3] === t3) return r3; return r3; }(e22, t2, i2) : hc(e22, dc, i2, true); } var Qm = rh(function(e22, t2, n2) { return e22 + (n2 ? " " : "") + t2.toLowerCase(); }), Ym = Af("toLowerCase"); function Zm(e22, t2) { return e22 < t2; } var Xm = Ip(Zm), eg = Ip(function(e22, t2) { return e22 <= t2; }); function tg(e22, t2) { var n2 = {}; return t2 = Td(t2), Fd(e22, function(e23, r2, i2) { Mc(n2, t2(e23, r2, i2), e23); }), n2; } function ng(e22, t2) { var n2 = {}; return t2 = Td(t2), Fd(e22, function(e23, r2, i2) { Mc(n2, r2, t2(e23, r2, i2)); }), n2; } function rg(e22) { return $d(nd(e22, 1)); } function ig(e22, t2) { return Ed(e22, nd(t2, 1)); } function og(e22, t2, n2) { for (var r2 = -1, i2 = e22.length; ++r2 < i2; ) { var o2 = e22[r2], a2 = t2(o2); if (a2 != null && (s2 === void 0 ? a2 == a2 && !Ks(a2) : n2(a2, s2))) var s2 = a2, u2 = o2; } return u2; } function ag(e22) { return e22 && e22.length ? og(e22, mu, Tp) : void 0; } function sg(e22, t2) { return e22 && e22.length ? og(e22, Td(t2), Tp) : void 0; } function ug(e22, t2) { for (var n2, r2 = -1, i2 = e22.length; ++r2 < i2; ) { var o2 = t2(e22[r2]); o2 !== void 0 && (n2 = n2 === void 0 ? o2 : n2 + o2); } return n2; } function cg(e22, t2) { var n2 = e22 == null ? 0 : e22.length; return n2 ? ug(e22, t2) / n2 : NaN; } function lg(e22) { return cg(e22, mu); } function fg(e22, t2) { return cg(e22, Td(t2)); } var hg = qc(function(e22, t2, n2) { lv(e22, t2, n2); }), dg = Dc(function(e22, t2) { return function(n2) { return hm(n2, e22, t2); }; }), vg = Dc(function(e22, t2) { return function(n2) { return hm(e22, n2, t2); }; }); function pg(e22) { return e22 && e22.length ? og(e22, mu, Zm) : void 0; } function mg(e22, t2) { return e22 && e22.length ? og(e22, Td(t2), Zm) : void 0; } function gg(e22, t2, n2) { var r2 = pl(t2), i2 = Ap(t2, r2), o2 = !(su(n2) && "chain" in n2 && !n2.chain), a2 = gu(e22); return fc(i2, function(n3) { var r3 = t2[n3]; e22[n3] = r3, a2 && (e22.prototype[n3] = function() { var t3 = this.__chain__; if (o2 || t3) { var n4 = e22(this.__wrapped__), i3 = n4.__actions__ = Yu(this.__actions__); return i3.push({ func: r3, args: arguments, thisArg: e22 }), n4.__chain__ = t3, n4; } return r3.apply(e22, Ul([this.value()], arguments)); }); }), e22; } var yg = tu(function(e22, t2) { return e22 * t2; }, 1); function bg(e22) { if (typeof e22 != "function") throw new TypeError("Expected a function"); return function() { var t2 = arguments; switch (t2.length) { case 0: return !e22.call(this); case 1: return !e22.call(this, t2[0]); case 2: return !e22.call(this, t2[0], t2[1]); case 3: return !e22.call(this, t2[0], t2[1], t2[2]); } return !e22.apply(this, t2); }; } var kg = Ls ? Ls.iterator : void 0; function wg(e22) { if (!e22) return []; if (Lc(e22)) return Hp(e22) ? Of(e22) : Yu(e22); if (kg && e22[kg]) return function(e23) { for (var t3, n2 = []; !(t3 = e23.next()).done; ) n2.push(t3.value); return n2; }(e22[kg]()); var t2 = qh(e22); return (t2 == "[object Map]" ? vd : t2 == "[object Set]" ? pd : Jp)(e22); } function xg() { this.__values__ === void 0 && (this.__values__ = wg(this.value())); var e22 = this.__index__ >= this.__values__.length; return { done: e22, value: e22 ? void 0 : this.__values__[this.__index__++] }; } function jg(e22, t2) { var n2 = e22.length; if (n2) return wc(t2 += t2 < 0 ? n2 : 0, n2) ? e22[t2] : void 0; } function Sg(e22, t2) { return e22 && e22.length ? jg(e22, vu(t2)) : void 0; } function Cg(e22) { return e22 = vu(e22), Dc(function(t2) { return jg(t2, e22); }); } function _g(e22, t2) { return (e22 = fm(e22, t2 = Fl(t2, e22))) == null || delete e22[Vl(kv(t2))]; } function $g(e22) { return sf(e22) ? void 0 : e22; } var Og = Zl(function(e22, t2) { var n2 = {}; if (e22 == null) return n2; var r2 = false; t2 = Qs(t2, function(t3) { return t3 = Fl(t3, e22), r2 || (r2 = t3.length > 1), t3; }), Tc(e22, Eh(e22), n2), r2 && (n2 = nd(n2, 7, $g)); for (var i2 = t2.length; i2--; ) _g(n2, t2[i2]); return n2; }); function Ag(e22, t2, n2, r2) { if (!su(e22)) return e22; for (var i2 = -1, o2 = (t2 = Fl(t2, e22)).length, a2 = o2 - 1, s2 = e22; s2 != null && ++i2 < o2; ) { var u2 = Vl(t2[i2]), c2 = n2; if (u2 === "__proto__" || u2 === "constructor" || u2 === "prototype") return e22; if (i2 != a2) { var l2 = s2[u2]; (c2 = r2 ? r2(l2, u2, s2) : void 0) === void 0 && (c2 = su(l2) ? l2 : wc(t2[i2 + 1]) ? [] : {}); } Nc(s2, u2, c2), s2 = s2[u2]; } return e22; } function Mg(e22, t2, n2) { for (var r2 = -1, i2 = t2.length, o2 = {}; ++r2 < i2; ) { var a2 = t2[r2], s2 = Hl(e22, a2); n2(s2, a2) && Ag(o2, Fl(a2, e22), s2); } return o2; } function Eg(e22, t2) { if (e22 == null) return {}; var n2 = Qs(Eh(e22), function(e23) { return [e23]; }); return t2 = Td(t2), Mg(e22, n2, function(e23, n3) { return t2(e23, n3[0]); }); } function Pg(e22, t2) { return Eg(e22, bg(Td(t2))); } function Ng(e22) { return lf(2, e22); } function Tg(e22, t2) { if (e22 !== t2) { var n2 = e22 !== void 0, r2 = e22 === null, i2 = e22 == e22, o2 = Ks(e22), a2 = t2 !== void 0, s2 = t2 === null, u2 = t2 == t2, c2 = Ks(t2); if (!s2 && !c2 && !o2 && e22 > t2 || o2 && a2 && u2 && !s2 && !c2 || r2 && a2 && u2 || !n2 && u2 || !i2) return 1; if (!r2 && !o2 && !c2 && e22 < t2 || c2 && n2 && i2 && !r2 && !o2 || s2 && n2 && i2 || !a2 && i2 || !u2) return -1; } return 0; } function Ig(e22, t2, n2) { t2 = t2.length ? Qs(t2, function(e23) { return Ys(e23) ? function(t3) { return Hl(t3, e23.length === 1 ? e23[0] : e23); } : e23; }) : [mu]; var r2 = -1; return t2 = Qs(t2, nl(Td)), function(e23, t3) { var n3 = e23.length; for (e23.sort(t3); n3--; ) e23[n3] = e23[n3].value; return e23; }(hp(e22, function(e23, n3, i2) { return { criteria: Qs(t2, function(t3) { return t3(e23); }), index: ++r2, value: e23 }; }), function(e23, t3) { return function(e24, t4, n3) { for (var r3 = -1, i2 = e24.criteria, o2 = t4.criteria, a2 = i2.length, s2 = n3.length; ++r3 < a2; ) { var u2 = Tg(i2[r3], o2[r3]); if (u2) return r3 >= s2 ? u2 : u2 * (n3[r3] == "desc" ? -1 : 1); } return e24.index - t4.index; }(e23, t3, n2); }); } function Rg(e22, t2, n2, r2) { return e22 == null ? [] : (Ys(t2) || (t2 = t2 == null ? [] : [t2]), Ys(n2 = r2 ? void 0 : n2) || (n2 = n2 == null ? [] : [n2]), Ig(e22, t2, n2)); } function Dg(e22) { return Zl(function(t2) { return t2 = Qs(t2, nl(Td)), Dc(function(n2) { var r2 = this; return e22(t2, function(e23) { return Du(e23, r2, n2); }); }); }); } var zg = Dg(Qs), Lg = Dc, Bg = Math.min, qg = Lg(function(e22, t2) { var n2 = (t2 = t2.length == 1 && Ys(t2[0]) ? Qs(t2[0], nl(Td)) : Qs(Ql(t2, 1), nl(Td))).length; return Dc(function(r2) { for (var i2 = -1, o2 = Bg(r2.length, n2); ++i2 < o2; ) r2[i2] = t2[i2].call(this, r2[i2]); return Du(e22, this, r2); }); }), Fg = Dg(Uv), Vg = Dg(fd), Hg = Math.floor; function Wg(e22, t2) { var n2 = ""; if (!e22 || t2 < 1 || t2 > 9007199254740991) return n2; do { t2 % 2 && (n2 += e22), (t2 = Hg(t2 / 2)) && (e22 += e22); } while (t2); return n2; } var Jg = Pd("length"), Ug = "[\\ud800-\\udfff]", Kg = "[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", Gg = "\\ud83c[\\udffb-\\udfff]", Qg = "[^\\ud800-\\udfff]", Yg = "(?:\\ud83c[\\udde6-\\uddff]){2}", Zg = "[\\ud800-\\udbff][\\udc00-\\udfff]", Xg = "(?:" + Kg + "|" + Gg + ")?", ey = "[\\ufe0e\\ufe0f]?" + Xg + ("(?:\\u200d(?:" + [Qg, Yg, Zg].join("|") + ")[\\ufe0e\\ufe0f]?" + Xg + ")*"), ty = "(?:" + [Qg + Kg + "?", Kg, Yg, Zg, Ug].join("|") + ")", ny = RegExp(Gg + "(?=" + Gg + ")|" + ty + ey, "g"); function ry(e22) { return gf(e22) ? function(e23) { for (var t2 = ny.lastIndex = 0; ny.test(e23); ) ++t2; return t2; }(e22) : Jg(e22); } var iy = Math.ceil; function oy(e22, t2) { var n2 = (t2 = t2 === void 0 ? " " : eu(t2)).length; if (n2 < 2) return n2 ? Wg(t2, e22) : t2; var r2 = Wg(t2, iy(e22 / ry(t2))); return gf(t2) ? pf(Of(r2), 0, e22).join("") : r2.slice(0, e22); } var ay = Math.ceil, sy = Math.floor; function uy(e22, t2, n2) { e22 = ql(e22); var r2 = (t2 = vu(t2)) ? ry(e22) : 0; if (!t2 || r2 >= t2) return e22; var i2 = (t2 - r2) / 2; return oy(sy(i2), n2) + e22 + oy(ay(i2), n2); } function cy(e22, t2, n2) { e22 = ql(e22); var r2 = (t2 = vu(t2)) ? ry(e22) : 0; return t2 && r2 < t2 ? e22 + oy(t2 - r2, n2) : e22; } function ly(e22, t2, n2) { e22 = ql(e22); var r2 = (t2 = vu(t2)) ? ry(e22) : 0; return t2 && r2 < t2 ? oy(t2 - r2, n2) + e22 : e22; } var fy = /^\s+/, hy = zs.parseInt; function dy(e22, t2, n2) { return n2 || t2 == null ? t2 = 0 : t2 && (t2 = +t2), hy(ql(e22).replace(fy, ""), t2 || 0); } var vy = Dc(function(e22, t2) { return Oc(e22, 32, void 0, t2, Sc(t2, bc(vy))); }); vy.placeholder = {}; var py = Dc(function(e22, t2) { return Oc(e22, 64, void 0, t2, Sc(t2, bc(py))); }); py.placeholder = {}; var my = Jd(function(e22, t2, n2) { e22[n2 ? 0 : 1].push(t2); }, function() { return [[], []]; }); var gy = Zl(function(e22, t2) { return e22 == null ? {} : function(e23, t3) { return Mg(e23, t3, function(t4, n2) { return Md(e23, n2); }); }(e22, t2); }); function yy(e22) { for (var t2, n2 = this; n2 instanceof Vu; ) { var r2 = Zu(n2); r2.__index__ = 0, r2.__values__ = void 0, t2 ? i2.__wrapped__ = r2 : t2 = r2; var i2 = r2; n2 = n2.__wrapped__; } return i2.__wrapped__ = e22, t2; } function by(e22) { return function(t2) { return e22 == null ? void 0 : Hl(e22, t2); }; } function ky(e22, t2, n2, r2) { for (var i2 = n2 - 1, o2 = e22.length; ++i2 < o2; ) if (r2(e22[i2], t2)) return i2; return -1; } var wy = Array.prototype.splice; function xy(e22, t2, n2, r2) { var i2 = r2 ? ky : vc, o2 = -1, a2 = t2.length, s2 = e22; for (e22 === t2 && (t2 = Yu(t2)), n2 && (s2 = Qs(e22, nl(n2))); ++o2 < a2; ) for (var u2 = 0, c2 = t2[o2], l2 = n2 ? n2(c2) : c2; (u2 = i2(s2, l2, u2, r2)) > -1; ) s2 !== e22 && wy.call(s2, u2, 1), wy.call(e22, u2, 1); return e22; } function jy(e22, t2) { return e22 && e22.length && t2 && t2.length ? xy(e22, t2) : e22; } var Sy = Dc(jy); function Cy(e22, t2, n2) { return e22 && e22.length && t2 && t2.length ? xy(e22, t2, Td(n2)) : e22; } function _y(e22, t2, n2) { return e22 && e22.length && t2 && t2.length ? xy(e22, t2, void 0, n2) : e22; } var $y = Array.prototype.splice; function Oy(e22, t2) { for (var n2 = e22 ? t2.length : 0, r2 = n2 - 1; n2--; ) { var i2 = t2[n2]; if (n2 == r2 || i2 !== o2) { var o2 = i2; wc(i2) ? $y.call(e22, i2, 1) : _g(e22, i2); } } return e22; } var Ay = Zl(function(e22, t2) { var n2 = e22 == null ? 0 : e22.length, r2 = Jl(e22, t2); return Oy(e22, Qs(t2, function(e23) { return wc(e23, n2) ? +e23 : e23; }).sort(Tg)), r2; }), My = Math.floor, Ey = Math.random; function Py(e22, t2) { return e22 + My(Ey() * (t2 - e22 + 1)); } var Ny = parseFloat, Ty = Math.min, Iy = Math.random; function Ry(e22, t2, n2) { if (n2 && typeof n2 != "boolean" && Bc(e22, t2, n2) && (t2 = n2 = void 0), n2 === void 0 && (typeof t2 == "boolean" ? (n2 = t2, t2 = void 0) : typeof e22 == "boolean" && (n2 = e22, e22 = void 0)), e22 === void 0 && t2 === void 0 ? (e22 = 0, t2 = 1) : (e22 = du(e22), t2 === void 0 ? (t2 = e22, e22 = 0) : t2 = du(t2)), e22 > t2) { var r2 = e22; e22 = t2, t2 = r2; } if (n2 || e22 % 1 || t2 % 1) { var i2 = Iy(); return Ty(e22 + i2 * (t2 - e22 + Ny("1e-" + ((i2 + "").length - 1))), t2); } return Py(e22, t2); } var Dy = Math.ceil, zy = Math.max; function Ly(e22) { return function(t2, n2, r2) { return r2 && typeof r2 != "number" && Bc(t2, n2, r2) && (n2 = r2 = void 0), t2 = du(t2), n2 === void 0 ? (n2 = t2, t2 = 0) : n2 = du(n2), function(e23, t3, n3, r3) { for (var i2 = -1, o2 = zy(Dy((t3 - e23) / (n3 || 1)), 0), a2 = Array(o2); o2--; ) a2[r3 ? o2 : ++i2] = e23, e23 += n3; return a2; }(t2, n2, r2 = r2 === void 0 ? t2 < n2 ? 1 : -1 : du(r2), e22); }; } var By = Ly(), qy = Ly(true), Fy = Zl(function(e22, t2) { return Oc(e22, 256, void 0, void 0, void 0, t2); }); function Vy(e22, t2, n2, r2, i2) { return i2(e22, function(e23, i3, o2) { n2 = r2 ? (r2 = false, e23) : t2(n2, e23, i3, o2); }), n2; } function Hy(e22, t2, n2) { var r2 = Ys(e22) ? Pf : Vy, i2 = arguments.length < 3; return r2(e22, Td(t2), n2, i2, Hd); } function Wy(e22, t2, n2, r2) { var i2 = e22 == null ? 0 : e22.length; for (r2 && i2 && (n2 = e22[--i2]); i2--; ) n2 = t2(n2, e22[i2], i2, e22); return n2; } function Jy(e22, t2, n2) { var r2 = Ys(e22) ? Wy : Vy, i2 = arguments.length < 3; return r2(e22, Td(t2), n2, i2, Tv); } function Uy(e22, t2) { return (Ys(e22) ? jh : Zv)(e22, bg(Td(t2))); } function Ky(e22, t2) { var n2 = []; if (!e22 || !e22.length) return n2; var r2 = -1, i2 = [], o2 = e22.length; for (t2 = Td(t2); ++r2 < o2; ) { var a2 = e22[r2]; t2(a2, r2, e22) && (n2.push(a2), i2.push(r2)); } return Oy(e22, i2), n2; } function Gy(e22, t2, n2) { return t2 = (n2 ? Bc(e22, t2, n2) : t2 === void 0) ? 1 : vu(t2), Wg(ql(e22), t2); } function Qy() { var e22 = arguments, t2 = ql(e22[0]); return e22.length < 3 ? t2 : t2.replace(e22[1], e22[2]); } function Yy(e22, t2) { if (typeof e22 != "function") throw new TypeError("Expected a function"); return Dc(e22, t2 = t2 === void 0 ? t2 : vu(t2)); } function Zy(e22, t2, n2) { var r2 = -1, i2 = (t2 = Fl(t2, e22)).length; for (i2 || (i2 = 1, e22 = void 0); ++r2 < i2; ) { var o2 = e22 == null ? void 0 : e22[Vl(t2[r2])]; o2 === void 0 && (r2 = i2, o2 = n2), e22 = gu(o2) ? o2.call(e22) : o2; } return e22; } var Xy = Array.prototype.reverse; function eb(e22) { return e22 == null ? e22 : Xy.call(e22); } var tb = uh("round"); function nb(e22) { var t2 = e22.length; return t2 ? e22[Py(0, t2 - 1)] : void 0; } function rb(e22) { return nb(Jp(e22)); } function ib(e22) { return (Ys(e22) ? nb : rb)(e22); } function ob(e22, t2) { var n2 = -1, r2 = e22.length, i2 = r2 - 1; for (t2 = t2 === void 0 ? r2 : t2; ++n2 < t2; ) { var o2 = Py(n2, i2), a2 = e22[o2]; e22[o2] = e22[n2], e22[n2] = a2; } return e22.length = t2, e22; } function ab(e22, t2) { return ob(Yu(e22), vh(t2, 0, e22.length)); } function sb(e22, t2) { var n2 = Jp(e22); return ob(n2, vh(t2, 0, n2.length)); } function ub(e22, t2, n2) { return t2 = (n2 ? Bc(e22, t2, n2) : t2 === void 0) ? 1 : vu(t2), (Ys(e22) ? ab : sb)(e22, t2); } function cb(e22, t2, n2) { return e22 == null ? e22 : Ag(e22, t2, n2); } function lb(e22, t2, n2, r2) { return r2 = typeof r2 == "function" ? r2 : void 0, e22 == null ? e22 : Ag(e22, t2, n2, r2); } function fb(e22) { return ob(Yu(e22)); } function hb(e22) { return ob(Jp(e22)); } function db(e22) { return (Ys(e22) ? fb : hb)(e22); } function vb(e22) { if (e22 == null) return 0; if (Lc(e22)) return Hp(e22) ? ry(e22) : e22.length; var t2 = qh(e22); return t2 == "[object Map]" || t2 == "[object Set]" ? e22.size : vl(e22).length; } function pb(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; return r2 ? (n2 && typeof n2 != "number" && Bc(e22, t2, n2) ? (t2 = 0, n2 = r2) : (t2 = t2 == null ? 0 : vu(t2), n2 = n2 === void 0 ? r2 : vu(n2)), vf(e22, t2, n2)) : []; } var mb = rh(function(e22, t2, n2) { return e22 + (n2 ? "_" : "") + t2.toLowerCase(); }); function gb(e22, t2) { var n2; return Hd(e22, function(e23, r2, i2) { return !(n2 = t2(e23, r2, i2)); }), !!n2; } function yb(e22, t2, n2) { var r2 = Ys(e22) ? fd : gb; return n2 && Bc(e22, t2, n2) && (t2 = void 0), r2(e22, Td(t2)); } var bb = Dc(function(e22, t2) { if (e22 == null) return []; var n2 = t2.length; return n2 > 1 && Bc(e22, t2[0], t2[1]) ? t2 = [] : n2 > 2 && Bc(t2[0], t2[1], t2[2]) && (t2 = [t2[0]]), Ig(e22, Ql(t2, 1), []); }), kb = Math.floor, wb = Math.min; function xb(e22, t2, n2, r2) { var i2 = 0, o2 = e22 == null ? 0 : e22.length; if (o2 === 0) return 0; for (var a2 = (t2 = n2(t2)) != t2, s2 = t2 === null, u2 = Ks(t2), c2 = t2 === void 0; i2 < o2; ) { var l2 = kb((i2 + o2) / 2), f2 = n2(e22[l2]), h2 = f2 !== void 0, d2 = f2 === null, v2 = f2 == f2, p2 = Ks(f2); if (a2) var m2 = r2 || v2; else m2 = c2 ? v2 && (r2 || h2) : s2 ? v2 && h2 && (r2 || !d2) : u2 ? v2 && h2 && !d2 && (r2 || !p2) : !d2 && !p2 && (r2 ? f2 <= t2 : f2 < t2); m2 ? i2 = l2 + 1 : o2 = l2; } return wb(o2, 4294967294); } function jb(e22, t2, n2) { var r2 = 0, i2 = e22 == null ? r2 : e22.length; if (typeof t2 == "number" && t2 == t2 && i2 <= 2147483647) { for (; r2 < i2; ) { var o2 = r2 + i2 >>> 1, a2 = e22[o2]; a2 !== null && !Ks(a2) && (n2 ? a2 <= t2 : a2 < t2) ? r2 = o2 + 1 : i2 = o2; } return i2; } return xb(e22, t2, mu, n2); } function Sb(e22, t2) { return jb(e22, t2); } function Cb(e22, t2, n2) { return xb(e22, t2, Td(n2)); } function _b(e22, t2) { var n2 = e22 == null ? 0 : e22.length; if (n2) { var r2 = jb(e22, t2); if (r2 < n2 && Ec(e22[r2], t2)) return r2; } return -1; } function $b(e22, t2) { return jb(e22, t2, true); } function Ob(e22, t2, n2) { return xb(e22, t2, Td(n2), true); } function Ab(e22, t2) { if (e22 == null ? 0 : e22.length) { var n2 = jb(e22, t2, true) - 1; if (Ec(e22[n2], t2)) return n2; } return -1; } function Mb(e22, t2) { for (var n2 = -1, r2 = e22.length, i2 = 0, o2 = []; ++n2 < r2; ) { var a2 = e22[n2], s2 = t2 ? t2(a2) : a2; if (!n2 || !Ec(s2, u2)) { var u2 = s2; o2[i2++] = a2 === 0 ? 0 : a2; } } return o2; } function Eb(e22) { return e22 && e22.length ? Mb(e22) : []; } function Pb(e22, t2) { return e22 && e22.length ? Mb(e22, Td(t2)) : []; } function Nb(e22, t2, n2) { return n2 && typeof n2 != "number" && Bc(e22, t2, n2) && (t2 = n2 = void 0), (n2 = n2 === void 0 ? 4294967295 : n2 >>> 0) ? (e22 = ql(e22)) && (typeof t2 == "string" || t2 != null && !Dm(t2)) && !(t2 = eu(t2)) && gf(e22) ? pf(Of(e22), 0, n2) : e22.split(t2, n2) : []; } var Tb = Math.max; function Ib(e22, t2) { if (typeof e22 != "function") throw new TypeError("Expected a function"); return t2 = t2 == null ? 0 : Tb(vu(t2), 0), Dc(function(n2) { var r2 = n2[t2], i2 = pf(n2, 0, t2); return r2 && Ul(i2, r2), Du(e22, this, i2); }); } var Rb = rh(function(e22, t2, n2) { return e22 + (n2 ? " " : "") + Mf(t2); }); function Db(e22, t2, n2) { return e22 = ql(e22), n2 = n2 == null ? 0 : vh(vu(n2), 0, e22.length), t2 = eu(t2), e22.slice(n2, n2 + t2.length) == t2; } function zb() { return {}; } function Lb() { return ""; } function Bb() { return true; } var qb = tu(function(e22, t2) { return e22 - t2; }, 0); function Fb(e22) { return e22 && e22.length ? ug(e22, mu) : 0; } function Vb(e22, t2) { return e22 && e22.length ? ug(e22, Td(t2)) : 0; } function Hb(e22) { var t2 = e22 == null ? 0 : e22.length; return t2 ? vf(e22, 1, t2) : []; } function Wb(e22, t2, n2) { return e22 && e22.length ? vf(e22, 0, (t2 = n2 || t2 === void 0 ? 1 : vu(t2)) < 0 ? 0 : t2) : []; } function Jb(e22, t2, n2) { var r2 = e22 == null ? 0 : e22.length; return r2 ? vf(e22, (t2 = r2 - (t2 = n2 || t2 === void 0 ? 1 : vu(t2))) < 0 ? 0 : t2, r2) : []; } function Ub(e22, t2) { return e22 && e22.length ? _v(e22, Td(t2), false, true) : []; } function Kb(e22, t2) { return e22 && e22.length ? _v(e22, Td(t2)) : []; } function Gb(e22, t2) { return t2(e22), e22; } var Qb = Object.prototype, Yb = Qb.hasOwnProperty; function Zb(e22, t2, n2, r2) { return e22 === void 0 || Ec(e22, Qb[n2]) && !Yb.call(r2, n2) ? t2 : e22; } var Xb = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }; function ek(e22) { return "\\" + Xb[e22]; } var tk = /<%=([\s\S]+?)%>/g, nk = { escape: /<%-([\s\S]+?)%>/g, evaluate: /<%([\s\S]+?)%>/g, interpolate: tk, variable: "", imports: { _: { escape: Vv } } }, rk = /\b__p \+= '';/g, ik = /\b(__p \+=) '' \+/g, ok = /(__e\(.*?\)|\b__t\)) \+\n'';/g, ak = /[()=,{}\[\]\/\s]/, sk = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, uk = /($^)/, ck = /['\n\r\u2028\u2029\\]/g, lk = Object.prototype.hasOwnProperty; function fk(e22, t2, n2) { var r2 = nk.imports._.templateSettings || nk; n2 && Bc(e22, t2, n2) && (t2 = void 0), e22 = ql(e22), t2 = xl({}, t2, r2, Zb); var i2, o2, a2 = xl({}, t2.imports, r2.imports, Zb), s2 = pl(a2), u2 = Wp(a2, s2), c2 = 0, l2 = t2.interpolate || uk, f2 = "__p += '", h2 = RegExp((t2.escape || uk).source + "|" + l2.source + "|" + (l2 === tk ? sk : uk).source + "|" + (t2.evaluate || uk).source + "|$", "g"), d2 = lk.call(t2, "sourceURL") ? "//# sourceURL=" + (t2.sourceURL + "").replace(/\s/g, " ") + "\n" : ""; e22.replace(h2, function(t3, n3, r3, a3, s3, u3) { return r3 || (r3 = a3), f2 += e22.slice(c2, u3).replace(ck, ek), n3 && (i2 = true, f2 += "' +\n__e(" + n3 + ") +\n'"), s3 && (o2 = true, f2 += "';\n" + s3 + ";\n__p += '"), r3 && (f2 += "' +\n((__t = (" + r3 + ")) == null ? '' : __t) +\n'"), c2 = u3 + t3.length, t3; }), f2 += "';\n"; var v2 = lk.call(t2, "variable") && t2.variable; if (v2) { if (ak.test(v2)) throw new Error("Invalid `variable` option passed into `_.template`"); } else f2 = "with (obj) {\n" + f2 + "\n}\n"; f2 = (o2 ? f2.replace(rk, "") : f2).replace(ik, "$1").replace(ok, "$1;"), f2 = "function(" + (v2 || "obj") + ") {\n" + (v2 ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (i2 ? ", __e = _.escape" : "") + (o2 ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + f2 + "return __p\n}"; var p2 = cf(function() { return Function(s2, d2 + "return " + f2).apply(void 0, u2); }); if (p2.source = f2, uf(p2)) throw p2; return p2; } function hk(e22, t2, n2) { var r2 = true, i2 = true; if (typeof e22 != "function") throw new TypeError("Expected a function"); return su(n2) && (r2 = "leading" in n2 ? !!n2.leading : r2, i2 = "trailing" in n2 ? !!n2.trailing : i2), tv(e22, t2, { leading: r2, maxWait: t2, trailing: i2 }); } function dk(e22, t2) { return t2(e22); } var vk = Math.min; function pk(e22, t2) { if ((e22 = vu(e22)) < 1 || e22 > 9007199254740991) return []; var n2 = 4294967295, r2 = vk(e22, 4294967295); e22 -= 4294967295; for (var i2 = Hc(r2, t2 = Av(t2)); ++n2 < e22; ) t2(n2); return i2; } function mk() { return this; } function gk(e22, t2) { var n2 = e22; return n2 instanceof Hu && (n2 = n2.value()), Pf(t2, function(e23, t3) { return t3.func.apply(t3.thisArg, Ul([e23], t3.args)); }, n2); } function yk() { return gk(this.__wrapped__, this.__actions__); } function bk(e22) { return ql(e22).toLowerCase(); } function kk(e22) { return Ys(e22) ? Qs(e22, Vl) : Ks(e22) ? [e22] : Yu(Bl(ql(e22))); } function wk(e22) { return e22 ? vh(vu(e22), -9007199254740991, 9007199254740991) : e22 === 0 ? e22 : 0; } function xk(e22) { return ql(e22).toUpperCase(); } function jk(e22, t2, n2) { var r2 = Ys(e22), i2 = r2 || el(e22) || ul(e22); if (t2 = Td(t2), n2 == null) { var o2 = e22 && e22.constructor; n2 = i2 ? r2 ? new o2() : [] : su(e22) && gu(o2) ? Iu(ef(e22)) : {}; } return (i2 ? fc : Fd)(e22, function(e23, r3, i3) { return t2(n2, e23, r3, i3); }), n2; } function Sk(e22, t2) { for (var n2 = e22.length; n2-- && vc(t2, e22[n2], 0) > -1; ) ; return n2; } function Ck(e22, t2) { for (var n2 = -1, r2 = e22.length; ++n2 < r2 && vc(t2, e22[n2], 0) > -1; ) ; return n2; } function _k(e22, t2, n2) { if ((e22 = ql(e22)) && (n2 || t2 === void 0)) return au(e22); if (!e22 || !(t2 = eu(t2))) return e22; var r2 = Of(e22), i2 = Of(t2); return pf(r2, Ck(r2, i2), Sk(r2, i2) + 1).join(""); } function $k(e22, t2, n2) { if ((e22 = ql(e22)) && (n2 || t2 === void 0)) return e22.slice(0, iu(e22) + 1); if (!e22 || !(t2 = eu(t2))) return e22; var r2 = Of(e22); return pf(r2, 0, Sk(r2, Of(t2)) + 1).join(""); } var Ok = /^\s+/; function Ak(e22, t2, n2) { if ((e22 = ql(e22)) && (n2 || t2 === void 0)) return e22.replace(Ok, ""); if (!e22 || !(t2 = eu(t2))) return e22; var r2 = Of(e22); return pf(r2, Ck(r2, Of(t2))).join(""); } var Mk = /\w*$/; function Ek(e22, t2) { var n2 = 30, r2 = "..."; if (su(t2)) { var i2 = "separator" in t2 ? t2.separator : i2; n2 = "length" in t2 ? vu(t2.length) : n2, r2 = "omission" in t2 ? eu(t2.omission) : r2; } var o2 = (e22 = ql(e22)).length; if (gf(e22)) { var a2 = Of(e22); o2 = a2.length; } if (n2 >= o2) return e22; var s2 = n2 - ry(r2); if (s2 < 1) return r2; var u2 = a2 ? pf(a2, 0, s2).join("") : e22.slice(0, s2); if (i2 === void 0) return u2 + r2; if (a2 && (s2 += u2.length - s2), Dm(i2)) { if (e22.slice(s2).search(i2)) { var c2, l2 = u2; for (i2.global || (i2 = RegExp(i2.source, ql(Mk.exec(i2)) + "g")), i2.lastIndex = 0; c2 = i2.exec(l2); ) var f2 = c2.index; u2 = u2.slice(0, f2 === void 0 ? s2 : f2); } } else if (e22.indexOf(eu(i2), s2) != s2) { var h2 = u2.lastIndexOf(i2); h2 > -1 && (u2 = u2.slice(0, h2)); } return u2 + r2; } function Pk(e22) { return Ac(e22, 1); } var Nk = Nf({ "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }), Tk = /&(?:amp|lt|gt|quot|#39);/g, Ik = RegExp(Tk.source); function Rk(e22) { return (e22 = ql(e22)) && Ik.test(e22) ? e22.replace(Tk, Nk) : e22; } var Dk = Th && 1 / pd(new Th([, -0]))[1] == 1 / 0 ? function(e22) { return new Th(e22); } : Wu; function zk(e22, t2, n2) { var r2 = -1, i2 = pc, o2 = e22.length, a2 = true, s2 = [], u2 = s2; if (n2) a2 = false, i2 = gv; else if (o2 >= 200) { var c2 = t2 ? null : Dk(e22); if (c2) return pd(c2); a2 = false, i2 = hd, u2 = new ld(); } else u2 = t2 ? [] : s2; e: for (; ++r2 < o2; ) { var l2 = e22[r2], f2 = t2 ? t2(l2) : l2; if (l2 = n2 || l2 !== 0 ? l2 : 0, a2 && f2 == f2) { for (var h2 = u2.length; h2--; ) if (u2[h2] === f2) continue e; t2 && u2.push(f2), s2.push(l2); } else i2(u2, f2, n2) || (u2 !== s2 && u2.push(f2), s2.push(l2)); } return s2; } var Lk = Dc(function(e22) { return zk(Ql(e22, 1, sv, true)); }), Bk = Dc(function(e22) { var t2 = kv(e22); return sv(t2) && (t2 = void 0), zk(Ql(e22, 1, sv, true), Td(t2)); }), qk = Dc(function(e22) { var t2 = kv(e22); return t2 = typeof t2 == "function" ? t2 : void 0, zk(Ql(e22, 1, sv, true), void 0, t2); }); function Fk(e22) { return e22 && e22.length ? zk(e22) : []; } function Vk(e22, t2) { return e22 && e22.length ? zk(e22, Td(t2)) : []; } function Hk(e22, t2) { return t2 = typeof t2 == "function" ? t2 : void 0, e22 && e22.length ? zk(e22, void 0, t2) : []; } var Wk = 0; function Jk(e22) { var t2 = ++Wk; return ql(e22) + t2; } function Uk(e22, t2) { return e22 == null || _g(e22, t2); } var Kk = Math.max; function Gk(e22) { if (!e22 || !e22.length) return []; var t2 = 0; return e22 = jh(e22, function(e23) { if (sv(e23)) return t2 = Kk(e23.length, t2), true; }), Hc(t2, function(t3) { return Qs(e22, Pd(t3)); }); } function Qk(e22, t2) { if (!e22 || !e22.length) return []; var n2 = Gk(e22); return t2 == null ? n2 : Qs(n2, function(e23) { return Du(t2, void 0, e23); }); } function Yk(e22, t2, n2, r2) { return Ag(e22, t2, n2(Hl(e22, t2)), r2); } function Zk(e22, t2, n2) { return e22 == null ? e22 : Yk(e22, t2, Av(n2)); } function Xk(e22, t2, n2, r2) { return r2 = typeof r2 == "function" ? r2 : void 0, e22 == null ? e22 : Yk(e22, t2, Av(n2), r2); } var ew = rh(function(e22, t2, n2) { return e22 + (n2 ? " " : "") + t2.toUpperCase(); }); function tw(e22) { return e22 == null ? [] : Wp(e22, kl(e22)); } var nw = Dc(function(e22, t2) { return sv(e22) ? yv(e22, t2) : []; }); function rw(e22, t2) { return vy(Av(t2), e22); } var iw = Zl(function(e22) { var t2 = e22.length, n2 = t2 ? e22[0] : 0, r2 = this.__wrapped__, i2 = function(t3) { return Jl(t3, e22); }; return !(t2 > 1 || this.__actions__.length) && r2 instanceof Hu && wc(n2) ? ((r2 = r2.slice(n2, +n2 + (t2 ? 1 : 0))).__actions__.push({ func: dk, args: [i2], thisArg: void 0 }), new Qu(r2, this.__chain__).thru(function(e23) { return t2 && !e23.length && e23.push(void 0), e23; })) : this.thru(i2); }); function ow() { return lh(this); } function aw() { var e22 = this.__wrapped__; if (e22 instanceof Hu) { var t2 = e22; return this.__actions__.length && (t2 = new Hu(this)), (t2 = t2.reverse()).__actions__.push({ func: dk, args: [eb], thisArg: void 0 }), new Qu(t2, this.__chain__); } return this.thru(eb); } function sw(e22, t2, n2) { var r2 = e22.length; if (r2 < 2) return r2 ? zk(e22[0]) : []; for (var i2 = -1, o2 = Array(r2); ++i2 < r2; ) for (var a2 = e22[i2], s2 = -1; ++s2 < r2; ) s2 != i2 && (o2[i2] = yv(o2[i2] || a2, e22[s2], t2, n2)); return zk(Ql(o2, 1), t2, n2); } var uw = Dc(function(e22) { return sw(jh(e22, sv)); }), cw = Dc(function(e22) { var t2 = kv(e22); return sv(t2) && (t2 = void 0), sw(jh(e22, sv), Td(t2)); }), lw = Dc(function(e22) { var t2 = kv(e22); return t2 = typeof t2 == "function" ? t2 : void 0, sw(jh(e22, sv), void 0, t2); }), fw = Dc(Gk); function hw(e22, t2, n2) { for (var r2 = -1, i2 = e22.length, o2 = t2.length, a2 = {}; ++r2 < i2; ) { var s2 = r2 < o2 ? t2[r2] : void 0; n2(a2, e22[r2], s2); } return a2; } function dw(e22, t2) { return hw(e22 || [], t2 || [], Nc); } function vw(e22, t2) { return hw(e22 || [], t2 || [], Ag); } var pw = Dc(function(e22) { var t2 = e22.length, n2 = t2 > 1 ? e22[t2 - 1] : void 0; return n2 = typeof n2 == "function" ? (e22.pop(), n2) : void 0, Qk(e22, n2); }), mw = { chunk: dh, compact: ud, concat: cd, difference: bv, differenceBy: wv, differenceWith: xv, drop: Sv, dropRight: Cv, dropRightWhile: $v, dropWhile: Ov, fill: Yv, findIndex: np, findLastIndex: up, first: fp, flatten: Yl, flattenDeep: gp, flattenDepth: yp, fromPairs: Op, head: fp, indexOf: Qp, initial: Yp, intersection: tm, intersectionBy: nm, intersectionWith: rm, join: Hm, last: kv, lastIndexOf: Gm, nth: Sg, pull: Sy, pullAll: jy, pullAllBy: Cy, pullAllWith: _y, pullAt: Ay, remove: Ky, reverse: eb, slice: pb, sortedIndex: Sb, sortedIndexBy: Cb, sortedIndexOf: _b, sortedLastIndex: $b, sortedLastIndexBy: Ob, sortedLastIndexOf: Ab, sortedUniq: Eb, sortedUniqBy: Pb, tail: Hb, take: Wb, takeRight: Jb, takeRightWhile: Ub, takeWhile: Kb, union: Lk, unionBy: Bk, unionWith: qk, uniq: Fk, uniqBy: Vk, uniqWith: Hk, unzip: Gk, unzipWith: Qk, without: nw, xor: uw, xorBy: cw, xorWith: lw, zip: fw, zipObject: dw, zipObjectDeep: vw, zipWith: pw }, gw = { countBy: Kd, each: Mv, eachRight: Iv, every: Gv, filter: Xv, find: rp, findLast: cp, flatMap: vp, flatMapDeep: pp, flatMapDepth: mp, forEach: Mv, forEachRight: Iv, groupBy: Np, includes: Kp, invokeMap: vm, keyBy: Jm, map: dp, orderBy: Rg, partition: my, reduce: Hy, reduceRight: Jy, reject: Uy, sample: ib, sampleSize: ub, shuffle: db, size: vb, some: yb, sortBy: bb }, yw = Zd, bw = { after: pu, ary: Ac, before: lf, bind: ff, bindKey: df, curry: Qd, curryRight: Yd, debounce: tv, defer: pv, delay: mv, flip: bp, memoize: Dl, negate: bg, once: Ng, overArgs: qg, partial: vy, partialRight: py, rearg: Fy, rest: Yy, spread: Ib, throttle: hk, unary: Pk, wrap: rw }, kw = { castArray: oh, clone: rd, cloneDeep: id, cloneDeepWith: od, cloneWith: ad, conformsTo: zd, eq: Ec, gt: Rp, gte: Dp, isArguments: Gc, isArray: Ys, isArrayBuffer: mm, isArrayLike: Lc, isArrayLikeObject: sv, isBoolean: gm, isBuffer: el, isDate: bm, isElement: km, isEmpty: xm, isEqual: jm, isEqualWith: Sm, isError: uf, isFinite: _m, isFunction: gu, isInteger: $m, isLength: zc, isMap: Zh, isMatch: Om, isMatchWith: Am, isNaN: Em, isNative: Nm, isNil: Tm, isNull: Im, isNumber: Mm, isObject: su, isObjectLike: Us, isPlainObject: sf, isRegExp: Dm, isSafeInteger: zm, isSet: ed, isString: Hp, isSymbol: Ks, isTypedArray: ul, isUndefined: Lm, isWeakMap: Bm, isWeakSet: qm, lt: Xm, lte: eg, toArray: wg, toFinite: du, toInteger: vu, toLength: Qv, toNumber: hu, toPlainObject: cv, toSafeInteger: wk, toString: ql }, ww = { add: nu, ceil: ch, divide: jv, floor: kp, max: ag, maxBy: sg, mean: lg, meanBy: fg, min: pg, minBy: mg, multiply: yg, round: tb, subtract: qb, sum: Fb, sumBy: Vb }, xw = ph, jw = Vp, Sw = Ry, Cw = { assign: gl, assignIn: wl, assignInWith: xl, assignWith: jl, at: Xl, create: Gd, defaults: ov, defaultsDeep: dv, entries: zv, entriesIn: Lv, extend: wl, extendWith: xl, findKey: op, findLastKey: lp, forIn: Sp, forInRight: Cp, forOwn: _p, forOwnRight: $p, functions: Mp, functionsIn: Ep, get: Wl, has: Bp, hasIn: Md, invert: am, invertBy: lm, invoke: dm, keys: pl, keysIn: kl, mapKeys: tg, mapValues: ng, merge: hg, mergeWith: hv, omit: Og, omitBy: Pg, pick: gy, pickBy: Eg, result: Zy, set: cb, setWith: lb, toPairs: zv, toPairsIn: Lv, transform: jk, unset: Uk, update: Zk, updateWith: Xk, values: Jp, valuesIn: tw }, _w = { at: iw, chain: lh, commit: sd, lodash: ec, next: xg, plant: yy, reverse: aw, tap: Gb, thru: dk, toIterator: mk, toJSON: yk, value: yk, valueOf: yk, wrapperChain: ow }, $w = { camelCase: ih, capitalize: Ef, deburr: Df, endsWith: Rv, escape: Vv, escapeRegExp: Jv, kebabCase: Wm, lowerCase: Qm, lowerFirst: Ym, pad: uy, padEnd: cy, padStart: ly, parseInt: dy, repeat: Gy, replace: Qy, snakeCase: mb, split: Nb, startCase: Rb, startsWith: Db, template: fk, templateSettings: nk, toLower: bk, toUpper: xk, trim: _k, trimEnd: $k, trimStart: Ak, truncate: Ek, unescape: Rk, upperCase: ew, upperFirst: Mf, words: th }, Ow = { attempt: cf, bindAll: hf, cond: Id, conforms: Dd, constant: uc, defaultTo: nv, flow: xp, flowRight: jp, identity: mu, iteratee: Fm, matches: rg, matchesProperty: ig, method: dg, methodOf: vg, mixin: gg, noop: Wu, nthArg: Cg, over: zg, overEvery: Fg, overSome: Vg, property: Nd, propertyOf: by, range: By, rangeRight: qy, stubArray: Sh, stubFalse: Qc, stubObject: zb, stubString: Lb, stubTrue: Bb, times: pk, toPath: kk, uniqueId: Jk }; var Aw = Math.max, Mw = Math.min; var Ew = Math.min; /** * @license * Lodash (Custom Build) * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ var Pw, Nw = Array.prototype, Tw = Object.prototype.hasOwnProperty, Iw = Ls ? Ls.iterator : void 0, Rw = Math.max, Dw = Math.min, zw = function(e22) { return function(t2, n2, r2) { if (r2 == null) { var i2 = su(n2), o2 = i2 && pl(n2), a2 = o2 && o2.length && Ap(n2, o2); (a2 ? a2.length : i2) || (r2 = n2, n2 = t2, t2 = this); } return e22(t2, n2, r2); }; }(gg); ec.after = bw.after, ec.ary = bw.ary, ec.assign = Cw.assign, ec.assignIn = Cw.assignIn, ec.assignInWith = Cw.assignInWith, ec.assignWith = Cw.assignWith, ec.at = Cw.at, ec.before = bw.before, ec.bind = bw.bind, ec.bindAll = Ow.bindAll, ec.bindKey = bw.bindKey, ec.castArray = kw.castArray, ec.chain = _w.chain, ec.chunk = mw.chunk, ec.compact = mw.compact, ec.concat = mw.concat, ec.cond = Ow.cond, ec.conforms = Ow.conforms, ec.constant = Ow.constant, ec.countBy = gw.countBy, ec.create = Cw.create, ec.curry = bw.curry, ec.curryRight = bw.curryRight, ec.debounce = bw.debounce, ec.defaults = Cw.defaults, ec.defaultsDeep = Cw.defaultsDeep, ec.defer = bw.defer, ec.delay = bw.delay, ec.difference = mw.difference, ec.differenceBy = mw.differenceBy, ec.differenceWith = mw.differenceWith, ec.drop = mw.drop, ec.dropRight = mw.dropRight, ec.dropRightWhile = mw.dropRightWhile, ec.dropWhile = mw.dropWhile, ec.fill = mw.fill, ec.filter = gw.filter, ec.flatMap = gw.flatMap, ec.flatMapDeep = gw.flatMapDeep, ec.flatMapDepth = gw.flatMapDepth, ec.flatten = mw.flatten, ec.flattenDeep = mw.flattenDeep, ec.flattenDepth = mw.flattenDepth, ec.flip = bw.flip, ec.flow = Ow.flow, ec.flowRight = Ow.flowRight, ec.fromPairs = mw.fromPairs, ec.functions = Cw.functions, ec.functionsIn = Cw.functionsIn, ec.groupBy = gw.groupBy, ec.initial = mw.initial, ec.intersection = mw.intersection, ec.intersectionBy = mw.intersectionBy, ec.intersectionWith = mw.intersectionWith, ec.invert = Cw.invert, ec.invertBy = Cw.invertBy, ec.invokeMap = gw.invokeMap, ec.iteratee = Ow.iteratee, ec.keyBy = gw.keyBy, ec.keys = pl, ec.keysIn = Cw.keysIn, ec.map = gw.map, ec.mapKeys = Cw.mapKeys, ec.mapValues = Cw.mapValues, ec.matches = Ow.matches, ec.matchesProperty = Ow.matchesProperty, ec.memoize = bw.memoize, ec.merge = Cw.merge, ec.mergeWith = Cw.mergeWith, ec.method = Ow.method, ec.methodOf = Ow.methodOf, ec.mixin = zw, ec.negate = bg, ec.nthArg = Ow.nthArg, ec.omit = Cw.omit, ec.omitBy = Cw.omitBy, ec.once = bw.once, ec.orderBy = gw.orderBy, ec.over = Ow.over, ec.overArgs = bw.overArgs, ec.overEvery = Ow.overEvery, ec.overSome = Ow.overSome, ec.partial = bw.partial, ec.partialRight = bw.partialRight, ec.partition = gw.partition, ec.pick = Cw.pick, ec.pickBy = Cw.pickBy, ec.property = Ow.property, ec.propertyOf = Ow.propertyOf, ec.pull = mw.pull, ec.pullAll = mw.pullAll, ec.pullAllBy = mw.pullAllBy, ec.pullAllWith = mw.pullAllWith, ec.pullAt = mw.pullAt, ec.range = Ow.range, ec.rangeRight = Ow.rangeRight, ec.rearg = bw.rearg, ec.reject = gw.reject, ec.remove = mw.remove, ec.rest = bw.rest, ec.reverse = mw.reverse, ec.sampleSize = gw.sampleSize, ec.set = Cw.set, ec.setWith = Cw.setWith, ec.shuffle = gw.shuffle, ec.slice = mw.slice, ec.sortBy = gw.sortBy, ec.sortedUniq = mw.sortedUniq, ec.sortedUniqBy = mw.sortedUniqBy, ec.split = $w.split, ec.spread = bw.spread, ec.tail = mw.tail, ec.take = mw.take, ec.takeRight = mw.takeRight, ec.takeRightWhile = mw.takeRightWhile, ec.takeWhile = mw.takeWhile, ec.tap = _w.tap, ec.throttle = bw.throttle, ec.thru = dk, ec.toArray = kw.toArray, ec.toPairs = Cw.toPairs, ec.toPairsIn = Cw.toPairsIn, ec.toPath = Ow.toPath, ec.toPlainObject = kw.toPlainObject, ec.transform = Cw.transform, ec.unary = bw.unary, ec.union = mw.union, ec.unionBy = mw.unionBy, ec.unionWith = mw.unionWith, ec.uniq = mw.uniq, ec.uniqBy = mw.uniqBy, ec.uniqWith = mw.uniqWith, ec.unset = Cw.unset, ec.unzip = mw.unzip, ec.unzipWith = mw.unzipWith, ec.update = Cw.update, ec.updateWith = Cw.updateWith, ec.values = Cw.values, ec.valuesIn = Cw.valuesIn, ec.without = mw.without, ec.words = $w.words, ec.wrap = bw.wrap, ec.xor = mw.xor, ec.xorBy = mw.xorBy, ec.xorWith = mw.xorWith, ec.zip = mw.zip, ec.zipObject = mw.zipObject, ec.zipObjectDeep = mw.zipObjectDeep, ec.zipWith = mw.zipWith, ec.entries = Cw.toPairs, ec.entriesIn = Cw.toPairsIn, ec.extend = Cw.assignIn, ec.extendWith = Cw.assignInWith, zw(ec, ec), ec.add = ww.add, ec.attempt = Ow.attempt, ec.camelCase = $w.camelCase, ec.capitalize = $w.capitalize, ec.ceil = ww.ceil, ec.clamp = xw, ec.clone = kw.clone, ec.cloneDeep = kw.cloneDeep, ec.cloneDeepWith = kw.cloneDeepWith, ec.cloneWith = kw.cloneWith, ec.conformsTo = kw.conformsTo, ec.deburr = $w.deburr, ec.defaultTo = Ow.defaultTo, ec.divide = ww.divide, ec.endsWith = $w.endsWith, ec.eq = kw.eq, ec.escape = $w.escape, ec.escapeRegExp = $w.escapeRegExp, ec.every = gw.every, ec.find = gw.find, ec.findIndex = mw.findIndex, ec.findKey = Cw.findKey, ec.findLast = gw.findLast, ec.findLastIndex = mw.findLastIndex, ec.findLastKey = Cw.findLastKey, ec.floor = ww.floor, ec.forEach = gw.forEach, ec.forEachRight = gw.forEachRight, ec.forIn = Cw.forIn, ec.forInRight = Cw.forInRight, ec.forOwn = Cw.forOwn, ec.forOwnRight = Cw.forOwnRight, ec.get = Cw.get, ec.gt = kw.gt, ec.gte = kw.gte, ec.has = Cw.has, ec.hasIn = Cw.hasIn, ec.head = mw.head, ec.identity = mu, ec.includes = gw.includes, ec.indexOf = mw.indexOf, ec.inRange = jw, ec.invoke = Cw.invoke, ec.isArguments = kw.isArguments, ec.isArray = Ys, ec.isArrayBuffer = kw.isArrayBuffer, ec.isArrayLike = kw.isArrayLike, ec.isArrayLikeObject = kw.isArrayLikeObject, ec.isBoolean = kw.isBoolean, ec.isBuffer = kw.isBuffer, ec.isDate = kw.isDate, ec.isElement = kw.isElement, ec.isEmpty = kw.isEmpty, ec.isEqual = kw.isEqual, ec.isEqualWith = kw.isEqualWith, ec.isError = kw.isError, ec.isFinite = kw.isFinite, ec.isFunction = kw.isFunction, ec.isInteger = kw.isInteger, ec.isLength = kw.isLength, ec.isMap = kw.isMap, ec.isMatch = kw.isMatch, ec.isMatchWith = kw.isMatchWith, ec.isNaN = kw.isNaN, ec.isNative = kw.isNative, ec.isNil = kw.isNil, ec.isNull = kw.isNull, ec.isNumber = kw.isNumber, ec.isObject = su, ec.isObjectLike = kw.isObjectLike, ec.isPlainObject = kw.isPlainObject, ec.isRegExp = kw.isRegExp, ec.isSafeInteger = kw.isSafeInteger, ec.isSet = kw.isSet, ec.isString = kw.isString, ec.isSymbol = kw.isSymbol, ec.isTypedArray = kw.isTypedArray, ec.isUndefined = kw.isUndefined, ec.isWeakMap = kw.isWeakMap, ec.isWeakSet = kw.isWeakSet, ec.join = mw.join, ec.kebabCase = $w.kebabCase, ec.last = kv, ec.lastIndexOf = mw.lastIndexOf, ec.lowerCase = $w.lowerCase, ec.lowerFirst = $w.lowerFirst, ec.lt = kw.lt, ec.lte = kw.lte, ec.max = ww.max, ec.maxBy = ww.maxBy, ec.mean = ww.mean, ec.meanBy = ww.meanBy, ec.min = ww.min, ec.minBy = ww.minBy, ec.stubArray = Ow.stubArray, ec.stubFalse = Ow.stubFalse, ec.stubObject = Ow.stubObject, ec.stubString = Ow.stubString, ec.stubTrue = Ow.stubTrue, ec.multiply = ww.multiply, ec.nth = mw.nth, ec.noop = Ow.noop, ec.now = yw, ec.pad = $w.pad, ec.padEnd = $w.padEnd, ec.padStart = $w.padStart, ec.parseInt = $w.parseInt, ec.random = Sw, ec.reduce = gw.reduce, ec.reduceRight = gw.reduceRight, ec.repeat = $w.repeat, ec.replace = $w.replace, ec.result = Cw.result, ec.round = ww.round, ec.sample = gw.sample, ec.size = gw.size, ec.snakeCase = $w.snakeCase, ec.some = gw.some, ec.sortedIndex = mw.sortedIndex, ec.sortedIndexBy = mw.sortedIndexBy, ec.sortedIndexOf = mw.sortedIndexOf, ec.sortedLastIndex = mw.sortedLastIndex, ec.sortedLastIndexBy = mw.sortedLastIndexBy, ec.sortedLastIndexOf = mw.sortedLastIndexOf, ec.startCase = $w.startCase, ec.startsWith = $w.startsWith, ec.subtract = ww.subtract, ec.sum = ww.sum, ec.sumBy = ww.sumBy, ec.template = $w.template, ec.times = Ow.times, ec.toFinite = kw.toFinite, ec.toInteger = vu, ec.toLength = kw.toLength, ec.toLower = $w.toLower, ec.toNumber = kw.toNumber, ec.toSafeInteger = kw.toSafeInteger, ec.toString = kw.toString, ec.toUpper = $w.toUpper, ec.trim = $w.trim, ec.trimEnd = $w.trimEnd, ec.trimStart = $w.trimStart, ec.truncate = $w.truncate, ec.unescape = $w.unescape, ec.uniqueId = Ow.uniqueId, ec.upperCase = $w.upperCase, ec.upperFirst = $w.upperFirst, ec.each = gw.forEach, ec.eachRight = gw.forEachRight, ec.first = mw.head, zw(ec, (Pw = {}, Fd(ec, function(e22, t2) { Tw.call(ec.prototype, t2) || (Pw[t2] = e22); }), Pw), { chain: false }), ec.VERSION = "4.17.21", (ec.templateSettings = $w.templateSettings).imports._ = ec, fc(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e22) { ec[e22].placeholder = ec; }), fc(["drop", "take"], function(e22, t2) { Hu.prototype[e22] = function(n2) { n2 = n2 === void 0 ? 1 : Rw(vu(n2), 0); var r2 = this.__filtered__ && !t2 ? new Hu(this) : this.clone(); return r2.__filtered__ ? r2.__takeCount__ = Dw(n2, r2.__takeCount__) : r2.__views__.push({ size: Dw(n2, 4294967295), type: e22 + (r2.__dir__ < 0 ? "Right" : "") }), r2; }, Hu.prototype[e22 + "Right"] = function(t3) { return this.reverse()[e22](t3).reverse(); }; }), fc(["filter", "map", "takeWhile"], function(e22, t2) { var n2 = t2 + 1, r2 = n2 == 1 || n2 == 3; Hu.prototype[e22] = function(e23) { var t3 = this.clone(); return t3.__iteratees__.push({ iteratee: Td(e23), type: n2 }), t3.__filtered__ = t3.__filtered__ || r2, t3; }; }), fc(["head", "last"], function(e22, t2) { var n2 = "take" + (t2 ? "Right" : ""); Hu.prototype[e22] = function() { return this[n2](1).value()[0]; }; }), fc(["initial", "tail"], function(e22, t2) { var n2 = "drop" + (t2 ? "" : "Right"); Hu.prototype[e22] = function() { return this.__filtered__ ? new Hu(this) : this[n2](1); }; }), Hu.prototype.compact = function() { return this.filter(mu); }, Hu.prototype.find = function(e22) { return this.filter(e22).head(); }, Hu.prototype.findLast = function(e22) { return this.reverse().find(e22); }, Hu.prototype.invokeMap = Dc(function(e22, t2) { return typeof e22 == "function" ? new Hu(this) : this.map(function(n2) { return hm(n2, e22, t2); }); }), Hu.prototype.reject = function(e22) { return this.filter(bg(Td(e22))); }, Hu.prototype.slice = function(e22, t2) { e22 = vu(e22); var n2 = this; return n2.__filtered__ && (e22 > 0 || t2 < 0) ? new Hu(n2) : (e22 < 0 ? n2 = n2.takeRight(-e22) : e22 && (n2 = n2.drop(e22)), t2 !== void 0 && (n2 = (t2 = vu(t2)) < 0 ? n2.dropRight(-t2) : n2.take(t2 - e22)), n2); }, Hu.prototype.takeRightWhile = function(e22) { return this.reverse().takeWhile(e22).reverse(); }, Hu.prototype.toArray = function() { return this.take(4294967295); }, Fd(Hu.prototype, function(e22, t2) { var n2 = /^(?:filter|find|map|reject)|While$/.test(t2), r2 = /^(?:head|last)$/.test(t2), i2 = ec[r2 ? "take" + (t2 == "last" ? "Right" : "") : t2], o2 = r2 || /^find/.test(t2); i2 && (ec.prototype[t2] = function() { var t3 = this.__wrapped__, a2 = r2 ? [1] : arguments, s2 = t3 instanceof Hu, u2 = a2[0], c2 = s2 || Ys(t3), l2 = function(e23) { var t4 = i2.apply(ec, Ul([e23], a2)); return r2 && f2 ? t4[0] : t4; }; c2 && n2 && typeof u2 == "function" && u2.length != 1 && (s2 = c2 = false); var f2 = this.__chain__, h2 = !!this.__actions__.length, d2 = o2 && !f2, v2 = s2 && !h2; if (!o2 && c2) { t3 = v2 ? t3 : new Hu(this); var p2 = e22.apply(t3, a2); return p2.__actions__.push({ func: dk, args: [l2], thisArg: void 0 }), new Qu(p2, f2); } return d2 && v2 ? e22.apply(this, a2) : (p2 = this.thru(l2), d2 ? r2 ? p2.value()[0] : p2.value() : p2); }); }), fc(["pop", "push", "shift", "sort", "splice", "unshift"], function(e22) { var t2 = Nw[e22], n2 = /^(?:push|sort|unshift)$/.test(e22) ? "tap" : "thru", r2 = /^(?:pop|shift)$/.test(e22); ec.prototype[e22] = function() { var e23 = arguments; if (r2 && !this.__chain__) { var i2 = this.value(); return t2.apply(Ys(i2) ? i2 : [], e23); } return this[n2](function(n3) { return t2.apply(Ys(n3) ? n3 : [], e23); }); }; }), Fd(Hu.prototype, function(e22, t2) { var n2 = ec[t2]; if (n2) { var r2 = n2.name + ""; Tw.call(Uu, r2) || (Uu[r2] = []), Uu[r2].push({ name: t2, func: n2 }); } }), Uu[Cc(void 0, 2).name] = [{ name: "wrapper", func: void 0 }], Hu.prototype.clone = function() { var e22 = new Hu(this.__wrapped__); return e22.__actions__ = Yu(this.__actions__), e22.__dir__ = this.__dir__, e22.__filtered__ = this.__filtered__, e22.__iteratees__ = Yu(this.__iteratees__), e22.__takeCount__ = this.__takeCount__, e22.__views__ = Yu(this.__views__), e22; }, Hu.prototype.reverse = function() { if (this.__filtered__) { var e22 = new Hu(this); e22.__dir__ = -1, e22.__filtered__ = true; } else (e22 = this.clone()).__dir__ *= -1; return e22; }, Hu.prototype.value = function() { var e22 = this.__wrapped__.value(), t2 = this.__dir__, n2 = Ys(e22), r2 = t2 < 0, i2 = n2 ? e22.length : 0, o2 = function(e23, t3, n3) { for (var r3 = -1, i3 = n3.length; ++r3 < i3; ) { var o3 = n3[r3], a3 = o3.size; switch (o3.type) { case "drop": e23 += a3; break; case "dropRight": t3 -= a3; break; case "take": t3 = Mw(t3, e23 + a3); break; case "takeRight": e23 = Aw(e23, t3 - a3); } } return { start: e23, end: t3 }; }(0, i2, this.__views__), a2 = o2.start, s2 = o2.end, u2 = s2 - a2, c2 = r2 ? s2 : a2 - 1, l2 = this.__iteratees__, f2 = l2.length, h2 = 0, d2 = Ew(u2, this.__takeCount__); if (!n2 || !r2 && i2 == u2 && d2 == u2) return gk(e22, this.__actions__); var v2 = []; e: for (; u2-- && h2 < d2; ) { for (var p2 = -1, m2 = e22[c2 += t2]; ++p2 < f2; ) { var g2 = l2[p2], y2 = g2.iteratee, b2 = g2.type, k2 = y2(m2); if (b2 == 2) m2 = k2; else if (!k2) { if (b2 == 1) continue e; break e; } } v2[h2++] = m2; } return v2; }, ec.prototype.at = _w.at, ec.prototype.chain = _w.wrapperChain, ec.prototype.commit = _w.commit, ec.prototype.next = _w.next, ec.prototype.plant = _w.plant, ec.prototype.reverse = _w.reverse, ec.prototype.toJSON = ec.prototype.valueOf = ec.prototype.value = _w.value, ec.prototype.first = ec.prototype.head, Iw && (ec.prototype[Iw] = _w.toIterator); var Lw = Object.freeze({ __proto__: null, add: nu, after: pu, ary: Ac, assign: gl, assignIn: wl, assignInWith: xl, assignWith: jl, at: Xl, attempt: cf, before: lf, bind: ff, bindAll: hf, bindKey: df, camelCase: ih, capitalize: Ef, castArray: oh, ceil: ch, chain: lh, chunk: dh, clamp: ph, clone: rd, cloneDeep: id, cloneDeepWith: od, cloneWith: ad, commit: sd, compact: ud, concat: cd, cond: Id, conforms: Dd, conformsTo: zd, constant: uc, countBy: Kd, create: Gd, curry: Qd, curryRight: Yd, debounce: tv, deburr: Df, defaultTo: nv, defaults: ov, defaultsDeep: dv, defer: pv, delay: mv, difference: bv, differenceBy: wv, differenceWith: xv, divide: jv, drop: Sv, dropRight: Cv, dropRightWhile: $v, dropWhile: Ov, each: Mv, eachRight: Iv, endsWith: Rv, entries: zv, entriesIn: Lv, eq: Ec, escape: Vv, escapeRegExp: Jv, every: Gv, extend: wl, extendWith: xl, fill: Yv, filter: Xv, find: rp, findIndex: np, findKey: op, findLast: cp, findLastIndex: up, findLastKey: lp, first: fp, flatMap: vp, flatMapDeep: pp, flatMapDepth: mp, flatten: Yl, flattenDeep: gp, flattenDepth: yp, flip: bp, floor: kp, flow: xp, flowRight: jp, forEach: Mv, forEachRight: Iv, forIn: Sp, forInRight: Cp, forOwn: _p, forOwnRight: $p, fromPairs: Op, functions: Mp, functionsIn: Ep, get: Wl, groupBy: Np, gt: Rp, gte: Dp, has: Bp, hasIn: Md, head: fp, identity: mu, inRange: Vp, includes: Kp, indexOf: Qp, initial: Yp, intersection: tm, intersectionBy: nm, intersectionWith: rm, invert: am, invertBy: lm, invoke: dm, invokeMap: vm, isArguments: Gc, isArray: Ys, isArrayBuffer: mm, isArrayLike: Lc, isArrayLikeObject: sv, isBoolean: gm, isBuffer: el, isDate: bm, isElement: km, isEmpty: xm, isEqual: jm, isEqualWith: Sm, isError: uf, isFinite: _m, isFunction: gu, isInteger: $m, isLength: zc, isMap: Zh, isMatch: Om, isMatchWith: Am, isNaN: Em, isNative: Nm, isNil: Tm, isNull: Im, isNumber: Mm, isObject: su, isObjectLike: Us, isPlainObject: sf, isRegExp: Dm, isSafeInteger: zm, isSet: ed, isString: Hp, isSymbol: Ks, isTypedArray: ul, isUndefined: Lm, isWeakMap: Bm, isWeakSet: qm, iteratee: Fm, join: Hm, kebabCase: Wm, keyBy: Jm, keys: pl, keysIn: kl, last: kv, lastIndexOf: Gm, lodash: ec, lowerCase: Qm, lowerFirst: Ym, lt: Xm, lte: eg, map: dp, mapKeys: tg, mapValues: ng, matches: rg, matchesProperty: ig, max: ag, maxBy: sg, mean: lg, meanBy: fg, memoize: Dl, merge: hg, mergeWith: hv, method: dg, methodOf: vg, min: pg, minBy: mg, mixin: gg, multiply: yg, negate: bg, next: xg, noop: Wu, now: Zd, nth: Sg, nthArg: Cg, omit: Og, omitBy: Pg, once: Ng, orderBy: Rg, over: zg, overArgs: qg, overEvery: Fg, overSome: Vg, pad: uy, padEnd: cy, padStart: ly, parseInt: dy, partial: vy, partialRight: py, partition: my, pick: gy, pickBy: Eg, plant: yy, property: Nd, propertyOf: by, pull: Sy, pullAll: jy, pullAllBy: Cy, pullAllWith: _y, pullAt: Ay, random: Ry, range: By, rangeRight: qy, rearg: Fy, reduce: Hy, reduceRight: Jy, reject: Uy, remove: Ky, repeat: Gy, replace: Qy, rest: Yy, result: Zy, reverse: eb, round: tb, sample: ib, sampleSize: ub, set: cb, setWith: lb, shuffle: db, size: vb, slice: pb, snakeCase: mb, some: yb, sortBy: bb, sortedIndex: Sb, sortedIndexBy: Cb, sortedIndexOf: _b, sortedLastIndex: $b, sortedLastIndexBy: Ob, sortedLastIndexOf: Ab, sortedUniq: Eb, sortedUniqBy: Pb, split: Nb, spread: Ib, startCase: Rb, startsWith: Db, stubArray: Sh, stubFalse: Qc, stubObject: zb, stubString: Lb, stubTrue: Bb, subtract: qb, sum: Fb, sumBy: Vb, tail: Hb, take: Wb, takeRight: Jb, takeRightWhile: Ub, takeWhile: Kb, tap: Gb, template: fk, templateSettings: nk, throttle: hk, thru: dk, times: pk, toArray: wg, toFinite: du, toInteger: vu, toIterator: mk, toJSON: yk, toLength: Qv, toLower: bk, toNumber: hu, toPairs: zv, toPairsIn: Lv, toPath: kk, toPlainObject: cv, toSafeInteger: wk, toString: ql, toUpper: xk, transform: jk, trim: _k, trimEnd: $k, trimStart: Ak, truncate: Ek, unary: Pk, unescape: Rk, union: Lk, unionBy: Bk, unionWith: qk, uniq: Fk, uniqBy: Vk, uniqWith: Hk, uniqueId: Jk, unset: Uk, unzip: Gk, unzipWith: Qk, update: Zk, updateWith: Xk, upperCase: ew, upperFirst: Mf, value: yk, valueOf: yk, values: Jp, valuesIn: tw, without: nw, words: th, wrap: rw, wrapperAt: iw, wrapperChain: ow, wrapperCommit: sd, wrapperLodash: ec, wrapperNext: xg, wrapperPlant: yy, wrapperReverse: aw, wrapperToIterator: mk, wrapperValue: yk, xor: uw, xorBy: cw, xorWith: lw, zip: fw, zipObject: dw, zipObjectDeep: vw, zipWith: pw, default: ec }), Bw = []; function qw(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n2 = {}; if (!Array.isArray(e22)) throw new TypeError("Array expected"); function r2(e23, i3) { (!Array.isArray(e23) && !As(e23) || t2 && i3.length > 0) && (n2[fs.exports.compileJSONPointer(i3)] = true), As(e23) && Object.keys(e23).forEach(function(t3) { r2(e23[t3], i3.concat(t3)); }); } for (var i2 = Math.min(e22.length, 1e4), o2 = 0; o2 < i2; o2++) { var a2 = e22[o2]; r2(a2, Bw); } var s2 = Object.keys(n2).sort(); return s2.map(fs.exports.parseJSONPointer); } function Fw(e22, t2, n2) { if (!(t2 <= e22)) for (var r2 = e22; r2 < t2; r2++) n2(r2); } function Vw(e22, t2) { return e22.length > t2 ? e22.slice(0, t2) : e22; } function Hw(e22) { return xi({}, e22); } function Ww(e22) { return Object.values(e22); } function Jw(e22, t2, n2, r2) { var i2 = e22.slice(0), o2 = i2.splice(t2, n2); return i2.splice.apply(i2, [t2 + r2, 0].concat(Ni(o2))), i2; } function Uw(e22) { return parseInt(e22, 10); } function Kw(e22) { return As(e22); } function Gw(e22) { return Array.isArray(e22); } function Qw(e22) { try { return JSON.parse(e22); } catch (t2) { return JSON.parse(Os(e22)); } } function Yw(e22) { try { return Qw(e22); } catch (e23) { return; } } function Zw(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : JSON.parse; e22 = e22.replace(ex, ""); try { return t2(e22); } catch (e23) { } try { return t2("[" + e22 + "]"); } catch (e23) { } try { return t2("{" + e22 + "}"); } catch (e23) { } throw new Error("Failed to parse partial JSON"); } function Xw(e22) { e22 = e22.replace(ex, ""); try { return Os(e22); } catch (e23) { } try { var t2 = Os("[" + e22 + "]"); return t2.substring(1, t2.length - 1); } catch (e23) { } try { var n2 = Os("{" + e22 + "}"); return n2.substring(1, n2.length - 1); } catch (e23) { } throw new Error("Failed to repair partial JSON"); } var ex = /,\s*$/; function tx(e22, t2) { var n2 = lx.exec(t2); if (n2) { var r2 = Uw(n2[2]), i2 = function(e23, t3) { for (var n3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, r3 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : e23.length, i3 = 0, o3 = n3; o3 < r3; o3++) e23.charAt(o3) === t3 && i3++; return i3; }(e22, "\n", 0, r2), o2 = r2 - e22.lastIndexOf("\n", r2) - 1; return { position: r2, line: i2, column: o2, message: t2.replace(lx, function() { return "line ".concat(i2 + 1, " column ").concat(o2 + 1); }) }; } var a2 = fx.exec(t2), s2 = a2 ? Uw(a2[1]) : null, u2 = s2 !== null ? s2 - 1 : null, c2 = hx.exec(t2), l2 = c2 ? Uw(c2[1]) : null, f2 = l2 !== null ? l2 - 1 : null; return { position: u2 !== null && f2 !== null ? function(e23, t3, n3) { var r3 = e23.indexOf("\n"), i3 = 1; for (; i3 < t3 && r3 !== -1; ) r3 = e23.indexOf("\n", r3 + 1), i3++; return r3 !== -1 ? r3 + n3 + 1 : null; }(e22, u2, f2) : null, line: u2, column: f2, message: t2.replace(/^JSON.parse: /, "").replace(/ of the JSON data$/, "") }; } function nx(e22) { return As(e22) ? e22.json !== void 0 ? e22.text !== void 0 ? 'Content must contain either a property "json" or a property "text" but not both' : null : e22.text === void 0 ? 'Content must contain either a property "json" or a property "text"' : typeof e22.text != "string" ? 'Content "text" property must be string' : null : "Content must be an object"; } function rx(e22) { return typeof e22.text == "string"; } function ix(e22, t2) { return ox(e22, t2) > t2; } function ox(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1 / 0; if (rx(e22)) return e22.text.length; var n2 = e22.json, r2 = 0; function i2(e23) { if (Array.isArray(e23)) { if ((r2 += e23.length - 1 + 2) > t2) return r2; for (var n3 = 0; n3 < e23.length; n3++) { if (i2(e23[n3]), r2 > t2) return r2; } } else if (As(e23)) { var o2 = Object.keys(e23); r2 += 2 + o2.length + (o2.length - 1); for (var a2 = 0; a2 < o2.length; a2++) { var s2 = o2[a2], u2 = e23[s2]; r2 += s2.length + 2, i2(u2); } } else r2 += typeof e23 == "string" ? e23.length + 2 : String(e23).length; } return i2(n2), r2; } var ax, sx, ux, cx, lx = /(position|char) (\d+)/, fx = /line (\d+)/, hx = /column (\d+)/; function dx(e22) { var t2 = e22.escapeControlCharacters, n2 = e22.escapeUnicodeCharacters; return t2 ? n2 ? vx : px : n2 ? mx : gx; } !function(e22) { e22.text = "text", e22.tree = "tree"; }(ax || (ax = {})), function(e22) { e22.after = "after", e22.inside = "inside", e22.key = "key", e22.value = "value", e22.multi = "multi"; }(sx || (sx = {})), function(e22) { e22.after = "after", e22.key = "key", e22.value = "value", e22.inside = "inside"; }(ux || (ux = {})), function(e22) { e22.key = "key", e22.value = "value"; }(cx || (cx = {})); var vx = { escapeValue: function(e22) { return yx(xx(String(e22))); }, unescapeValue: function(e22) { return jx(bx(e22)); } }, px = { escapeValue: function(e22) { return xx(String(e22)); }, unescapeValue: function(e22) { return jx(e22); } }, mx = { escapeValue: function(e22) { return yx(String(e22)); }, unescapeValue: function(e22) { return bx(e22); } }, gx = { escapeValue: function(e22) { return String(e22); }, unescapeValue: function(e22) { return e22; } }; function yx(e22) { return e22.replace(/[^\x20-\x7F]/g, function(e23) { return e23 === "\b" || e23 === "\f" || e23 === "\n" || e23 === "\r" || e23 === " " ? e23 : "\\u" + ("000" + e23.codePointAt(0).toString(16)).slice(-4); }); } function bx(e22) { return e22.replace(/\\u[a-fA-F0-9]{4}/g, function(e23) { try { return JSON.parse('"' + e23 + '"'); } catch (t2) { return e23; } }); } var kx = { "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t" }, wx = { "\\b": "\b", "\\f": "\f", "\\n": "\n", "\\r": "\r", "\\t": " " }; function xx(e22) { return e22.replace(/[\b\f\n\r\t]/g, function(e23) { return kx[e23] || e23; }); } function jx(e22) { return e22.replace(/\\[bfnrt]/g, function(e23) { return wx[e23] || e23; }); } function Sx(e22) { return typeof e22 != "string" ? String(e22) : e22.endsWith("\n") ? e22 + "\n" : e22; } function Cx(e22, t2) { return $x(e22, function(e23) { return e23.nodeName.toUpperCase() === t2.toUpperCase(); }); } function _x(e22, t2, n2) { return $x(e22, function(e23) { return function(e24, t3, n3) { return typeof e24.getAttribute == "function" && e24.getAttribute(t3) === n3; }(e23, t2, n2); }); } function $x(e22, t2) { return !!Ox(e22, t2); } function Ox(e22, t2) { for (var n2 = e22; n2 && !t2(n2); ) n2 = n2.parentNode; return n2 || void 0; } function Ax(e22) { if (e22.firstChild != null) { var t2 = document.createRange(), n2 = window.getSelection(); t2.setStart(e22, 1), t2.collapse(true), n2.removeAllRanges(), n2.addRange(t2); } else e22.focus(); } function Mx(e22) { return e22 && e22.ownerDocument && e22.ownerDocument.defaultView; } function Ex(e22) { return $x(Mx(e22).document.activeElement, function(t2) { return t2 === e22; }); } function Px(e22, t2) { return Ox(e22, function(e23) { return e23.nodeName === t2; }); } function Nx(e22) { return _x(e22, "data-type", "selectable-key") ? sx.key : _x(e22, "data-type", "selectable-value") ? sx.value : _x(e22, "data-type", "insert-selection-area-inside") ? sx.inside : _x(e22, "data-type", "insert-selection-area-after") ? sx.after : sx.multi; } function Tx(e22) { return encodeURIComponent(fs.exports.compileJSONPointer(e22)); } function Ix(e22) { var t2, n2 = Ox(e22, function(e23) { return e23.hasAttribute("data-path"); }); return n2 ? (t2 = n2.getAttribute("data-path"), fs.exports.parseJSONPointer(decodeURIComponent(t2))) : null; } function Rx(e22) { var t2 = e22.allElements, n2 = e22.currentElement, r2 = e22.direction, i2 = e22.hasPrio, o2 = i2 === void 0 ? function() { return true; } : i2, a2 = e22.margin, s2 = a2 === void 0 ? 10 : a2, u2 = dp(t2.filter(function(e23) { var t3 = e23.getBoundingClientRect(); return t3.width > 0 && t3.height > 0; }), l2), c2 = l2(n2); function l2(e23) { var t3 = e23.getBoundingClientRect(); return { x: t3.left + t3.width / 2, y: t3.top + t3.height / 2, rect: t3, element: e23 }; } function f2(e23, t3) { var n3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, r3 = e23.x - t3.x, i3 = (e23.y - t3.y) * n3; return Math.sqrt(r3 * r3 + i3 * i3); } var h2 = function(e23) { return f2(e23, c2); }; if (r2 === "Left" || r2 === "Right") { var d2 = r2 === "Left" ? u2.filter(function(e23) { return t3 = c2, e23.rect.left + s2 < t3.rect.left; var t3; }) : u2.filter(function(e23) { return t3 = c2, e23.rect.right > t3.rect.right + s2; var t3; }), v2 = mg(d2.filter(function(e23) { return t3 = e23, n3 = c2, Math.abs(t3.y - n3.y) < s2; var t3, n3; }), h2) || mg(d2, function(e23) { return f2(e23, c2, 10); }); return v2 == null ? void 0 : v2.element; } if (r2 === "Up" || r2 === "Down") { var p2 = r2 === "Up" ? u2.filter(function(e23) { return t3 = c2, e23.y + s2 < t3.y; var t3; }) : u2.filter(function(e23) { return t3 = c2, e23.y > t3.y + s2; var t3; }), m2 = mg(p2.filter(function(e23) { return o2(e23.element); }), h2) || mg(p2, h2); return m2 == null ? void 0 : m2.element; } } var Dx = typeof navigator != "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0; function zx(e22) { var t2 = []; e22.ctrlKey && t2.push("Ctrl"), e22.metaKey && t2.push("Command"), e22.altKey && t2.push(Dx ? "Option" : "Alt"), e22.shiftKey && t2.push("Shift"); var n2 = function(e23) { return Bx[e23] || ""; }(e22.which); return Lx[n2] || t2.push(n2), t2.join("+"); } var Lx = { Ctrl: true, Command: true, Alt: true, Option: true, Shift: true }, Bx = { 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", 19: "Pause_Break", 20: "Caps_Lock", 27: "Escape", 33: "Page_Up", 34: "Page_Down", 35: "End", 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 45: "Insert", 46: "Delete", 48: "0", 49: "1", 50: "2", 51: "3", 52: "4", 53: "5", 54: "6", 55: "7", 56: "8", 57: "9", 65: "A", 66: "B", 67: "C", 68: "D", 69: "E", 70: "F", 71: "G", 72: "H", 73: "I", 74: "J", 75: "K", 76: "L", 77: "M", 78: "N", 79: "O", 80: "P", 81: "Q", 82: "R", 83: "S", 84: "T", 85: "U", 86: "V", 87: "W", 88: "X", 89: "Y", 90: "Z", 91: "Left_Window_Key", 92: "Right_Window_Key", 93: "Select_Key", 96: "Numpad_0", 97: "Numpad_1", 98: "Numpad_2", 99: "Numpad_3", 100: "Numpad_4", 101: "Numpad_5", 102: "Numpad_6", 103: "Numpad_7", 104: "Numpad_8", 105: "Numpad_9", 106: "Numpad_*", 107: "Numpad_+", 109: "Numpad_-", 110: "Numpad_.", 111: "Numpad_/", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Num_Lock", 145: "Scroll_Lock", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'" }, qx = xa.window; function Fx(e22) { co(e22, "svelte-p9zniz", ".jse-absolute-popup.svelte-p9zniz.svelte-p9zniz{position:relative;left:0;top:0;width:0;height:0;z-index:1001}.jse-absolute-popup.svelte-p9zniz .jse-hidden-input.svelte-p9zniz{position:absolute;left:0;top:0;width:0;height:0;padding:0;margin:0;border:none;outline:none;overflow:hidden}.jse-absolute-popup.svelte-p9zniz .jse-absolute-popup-content.svelte-p9zniz{position:absolute}"); } function Vx(e22) { var t2, n2, r2, i2, o2, a2, s2 = [e22[0].props], u2 = e22[0].component; function c2(e23) { for (var t3 = {}, n3 = 0; n3 < s2.length; n3 += 1) t3 = Fi(t3, s2[n3]); return { props: t3 }; } return u2 && (i2 = new u2(c2())), { c: function() { t2 = go("div"), n2 = go("input"), r2 = ko(), i2 && Aa(i2.$$.fragment), So(n2, "class", "jse-hidden-input svelte-p9zniz"), So(t2, "class", "jse-absolute-popup-content svelte-p9zniz"), So(t2, "style", o2 = Jx(e22[1], e22[0].options)); }, m: function(o3, s3) { vo(o3, t2, s3), uo(t2, n2), e22[7](n2), uo(t2, r2), i2 && Ma(i2, t2, null), a2 = true; }, p: function(e23, n3) { var r3 = 1 & n3 ? _a(s2, [$a(e23[0].props)]) : {}; if (u2 !== (u2 = e23[0].component)) { if (i2) { ma(); var l2 = i2; ba(l2.$$.fragment, 1, 0, function() { Ea(l2, 1); }), ga(); } u2 ? (Aa((i2 = new u2(c2())).$$.fragment), ya(i2.$$.fragment, 1), Ma(i2, t2, null)) : i2 = null; } else u2 && i2.$set(r3); (!a2 || 3 & n3 && o2 !== (o2 = Jx(e23[1], e23[0].options))) && So(t2, "style", o2); }, i: function(e23) { a2 || (i2 && ya(i2.$$.fragment, e23), a2 = true); }, o: function(e23) { i2 && ba(i2.$$.fragment, e23), a2 = false; }, d: function(n3) { n3 && po(t2), e22[7](null), i2 && Ea(i2); } }; } function Hx(e22) { var t2, n2, r2, i2, o2 = e22[1] && Vx(e22); return { c: function() { t2 = go("div"), o2 && o2.c(), So(t2, "class", "jse-absolute-popup svelte-p9zniz"); }, m: function(a2, s2) { vo(a2, t2, s2), o2 && o2.m(t2, null), e22[8](t2), n2 = true, r2 || (i2 = [xo(qx, "mousedown", e22[3], true), xo(qx, "keydown", e22[4], true), xo(qx, "wheel", e22[5], true), xo(t2, "mousedown", Wx), xo(t2, "keydown", e22[4])], r2 = true); }, p: function(e23, n3) { var r3 = ki(n3, 1)[0]; e23[1] ? o2 ? (o2.p(e23, r3), 2 & r3 && ya(o2, 1)) : ((o2 = Vx(e23)).c(), ya(o2, 1), o2.m(t2, null)) : o2 && (ma(), ba(o2, 1, 1, function() { o2 = null; }), ga()); }, i: function(e23) { n2 || (ya(o2), n2 = true); }, o: function(e23) { ba(o2), n2 = false; }, d: function(n3) { n3 && po(t2), o2 && o2.d(), e22[8](null), r2 = false, Wi(i2); } }; } function Wx(e22) { e22.stopPropagation(); } function Jx(e22, t2) { var n2 = e22.getBoundingClientRect(), r2 = function() { if (t2.anchor) { var e23 = t2.anchor, n3 = t2.width, r3 = n3 === void 0 ? 0 : n3, i3 = t2.height, o3 = i3 === void 0 ? 0 : i3, a3 = t2.offsetTop, s3 = a3 === void 0 ? 0 : a3, u2 = t2.offsetLeft, c2 = u2 === void 0 ? 0 : u2, l2 = t2.position, f2 = e23.getBoundingClientRect(), h2 = f2.left, d2 = f2.top, v2 = f2.bottom, p2 = f2.right, m2 = l2 === "top" || d2 + o3 > window.innerHeight && d2 > o3, g2 = l2 === "left" || h2 + r3 > window.innerWidth && h2 > r3; return { left: g2 ? p2 - c2 : h2 + c2, top: m2 ? d2 - s3 : v2 + s3, positionAbove: m2, positionLeft: g2 }; } if (typeof t2.left == "number" && typeof t2.top == "number") { var y2 = t2.left, b2 = t2.top, k2 = t2.width, w2 = k2 === void 0 ? 0 : k2, x2 = t2.height, j2 = x2 === void 0 ? 0 : x2; return { left: y2, top: b2, positionAbove: b2 + j2 > window.innerHeight && b2 > j2, positionLeft: y2 + w2 > window.innerWidth && y2 > w2 }; } throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"'); }(), i2 = r2.left, o2 = r2.top, a2 = r2.positionAbove, s2 = r2.positionLeft; return (a2 ? "bottom: ".concat(n2.top - o2, "px;") : "top: ".concat(o2 - n2.top, "px;")) + (s2 ? "right: ".concat(n2.left - i2, "px;") : "left: ".concat(i2 - n2.left, "px;")); } function Ux(e22, t2, n2) { var r2, i2, o2 = t2.popup, a2 = t2.closeAbsolutePopup; function s2(e23) { o2.options && o2.options.closeOnOuterClick && !$x(e23.target, function(e24) { return e24 === r2; }) && a2(o2.id); } return Uo(function() { i2 && i2.focus(); }), e22.$$set = function(e23) { "popup" in e23 && n2(0, o2 = e23.popup), "closeAbsolutePopup" in e23 && n2(6, a2 = e23.closeAbsolutePopup); }, [o2, r2, i2, function(e23) { s2(e23); }, function(e23) { zx(e23) === "Escape" && a2(o2.id); }, function(e23) { s2(e23); }, a2, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(2, i2 = e23); }); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(1, r2 = e23); }); }]; } var Kx = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, Ux, Hx, Ui, { popup: 0, closeAbsolutePopup: 6 }, Fx), r2; } return zi(n2); }(); function Gx(e22, t2, n2) { var r2 = e22.slice(); return r2[6] = t2[n2], r2; } function Qx(e22) { var t2, n2; return t2 = new Kx({ props: { popup: e22[6], closeAbsolutePopup: e22[1] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 1 & n3 && (r2.popup = e23[6]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function Yx(e22) { for (var t2, n2, r2 = e22[0], i2 = [], o2 = 0; o2 < r2.length; o2 += 1) i2[o2] = Qx(Gx(e22, r2, o2)); var a2 = function(e23) { return ba(i2[e23], 1, 1, function() { i2[e23] = null; }); }, s2 = e22[3].default, u2 = Gi(s2, e22, e22[2], null); return { c: function() { for (var e23 = 0; e23 < i2.length; e23 += 1) i2[e23].c(); t2 = ko(), u2 && u2.c(); }, m: function(e23, r3) { for (var o3 = 0; o3 < i2.length; o3 += 1) i2[o3].m(e23, r3); vo(e23, t2, r3), u2 && u2.m(e23, r3), n2 = true; }, p: function(e23, o3) { var c2 = ki(o3, 1)[0]; if (3 & c2) { var l2; for (r2 = e23[0], l2 = 0; l2 < r2.length; l2 += 1) { var f2 = Gx(e23, r2, l2); i2[l2] ? (i2[l2].p(f2, c2), ya(i2[l2], 1)) : (i2[l2] = Qx(f2), i2[l2].c(), ya(i2[l2], 1), i2[l2].m(t2.parentNode, t2)); } for (ma(), l2 = r2.length; l2 < i2.length; l2 += 1) a2(l2); ga(); } u2 && u2.p && (!n2 || 4 & c2) && Zi(u2, s2, e23, e23[2], n2 ? Yi(s2, e23[2], c2, null) : Xi(e23[2]), null); }, i: function(e23) { if (!n2) { for (var t3 = 0; t3 < r2.length; t3 += 1) ya(i2[t3]); ya(u2, e23), n2 = true; } }, o: function(e23) { i2 = i2.filter(Boolean); for (var t3 = 0; t3 < i2.length; t3 += 1) ba(i2[t3]); ba(u2, e23), n2 = false; }, d: function(e23) { mo(i2, e23), e23 && po(t2), u2 && u2.d(e23); } }; } function Zx(e22, t2, n2) { var r2 = t2.$$slots, i2 = r2 === void 0 ? {} : r2, o2 = t2.$$scope, a2 = Da("jsoneditor:AbsolutePopup"), s2 = []; function u2(e23) { var t3 = s2.findIndex(function(t4) { return t4.id === e23; }); if (t3 !== -1) { var r3 = s2[t3]; r3.options.onClose && r3.options.onClose(), n2(0, s2 = s2.filter(function(t4) { return t4.id !== e23; })); } } return Qo("absolute-popup", { openAbsolutePopup: function(e23, t3, r3) { a2("open...", t3, r3); var i3 = { id: cs(), component: e23, props: t3 || {}, options: r3 || {} }; return n2(0, s2 = [].concat(Ni(s2), [i3])), i3.id; }, closeAbsolutePopup: u2 }), e22.$$set = function(e23) { "$$scope" in e23 && n2(2, o2 = e23.$$scope); }, e22.$$.update = function() { 1 & e22.$$.dirty && a2("popups", s2); }, [s2, u2, o2, i2]; } var Xx = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, Zx, Yx, Ki, {}), r2; } return zi(n2); }(), ej = { prefix: "fas", iconName: "angle-down", icon: [384, 512, [8964], "f107", "M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z"] }, tj = { prefix: "fas", iconName: "angle-right", icon: [256, 512, [8250], "f105", "M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"] }, nj = { prefix: "fas", iconName: "arrow-down", icon: [384, 512, [8595], "f063", "M374.6 310.6l-160 160C208.4 476.9 200.2 480 192 480s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 370.8V64c0-17.69 14.33-31.1 31.1-31.1S224 46.31 224 64v306.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0S387.1 298.1 374.6 310.6z"] }, rj = { prefix: "fas", iconName: "arrow-down-short-wide", icon: [576, 512, ["sort-amount-desc", "sort-amount-down-alt"], "f884", "M320 224H416c17.67 0 32-14.33 32-32s-14.33-32-32-32h-95.1c-17.67 0-32 14.33-32 32S302.3 224 320 224zM320 352H480c17.67 0 32-14.33 32-32s-14.33-32-32-32h-159.1c-17.67 0-32 14.33-32 32S302.3 352 320 352zM320 96h32c17.67 0 31.1-14.33 31.1-32s-14.33-32-31.1-32h-32c-17.67 0-32 14.33-32 32S302.3 96 320 96zM544 416h-223.1c-17.67 0-32 14.33-32 32s14.33 32 32 32H544c17.67 0 32-14.33 32-32S561.7 416 544 416zM192.4 330.7L160 366.1V64.03C160 46.33 145.7 32 128 32S96 46.33 96 64.03v302L63.6 330.7c-6.312-6.883-14.94-10.38-23.61-10.38c-7.719 0-15.47 2.781-21.61 8.414c-13.03 11.95-13.9 32.22-1.969 45.27l87.1 96.09c12.12 13.26 35.06 13.26 47.19 0l87.1-96.09c11.94-13.05 11.06-33.31-1.969-45.27C224.6 316.8 204.4 317.7 192.4 330.7z"] }, ij = { prefix: "fas", iconName: "arrow-rotate-left", icon: [512, 512, [8634, "arrow-left-rotate", "arrow-rotate-back", "arrow-rotate-backward", "undo"], "f0e2", "M480 256c0 123.4-100.5 223.9-223.9 223.9c-48.86 0-95.19-15.58-134.2-44.86c-14.14-10.59-17-30.66-6.391-44.81c10.61-14.09 30.69-16.97 44.8-6.375c27.84 20.91 61 31.94 95.89 31.94C344.3 415.8 416 344.1 416 256s-71.67-159.8-159.8-159.8C205.9 96.22 158.6 120.3 128.6 160H192c17.67 0 32 14.31 32 32S209.7 224 192 224H48c-17.67 0-32-14.31-32-32V48c0-17.69 14.33-32 32-32s32 14.31 32 32v70.23C122.1 64.58 186.1 32.11 256.1 32.11C379.5 32.11 480 132.6 480 256z"] }, oj = { prefix: "fas", iconName: "arrow-rotate-right", icon: [512, 512, [8635, "arrow-right-rotate", "arrow-rotate-forward", "redo"], "f01e", "M496 48V192c0 17.69-14.31 32-32 32H320c-17.69 0-32-14.31-32-32s14.31-32 32-32h63.39c-29.97-39.7-77.25-63.78-127.6-63.78C167.7 96.22 96 167.9 96 256s71.69 159.8 159.8 159.8c34.88 0 68.03-11.03 95.88-31.94c14.22-10.53 34.22-7.75 44.81 6.375c10.59 14.16 7.75 34.22-6.375 44.81c-39.03 29.28-85.36 44.86-134.2 44.86C132.5 479.9 32 379.4 32 256s100.5-223.9 223.9-223.9c69.15 0 134 32.47 176.1 86.12V48c0-17.69 14.31-32 32-32S496 30.31 496 48z"] }, aj = { prefix: "fas", iconName: "caret-down", icon: [320, 512, [], "f0d7", "M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"] }, sj = { prefix: "fas", iconName: "caret-right", icon: [256, 512, [], "f0da", "M118.6 105.4l128 127.1C252.9 239.6 256 247.8 256 255.1s-3.125 16.38-9.375 22.63l-128 127.1c-9.156 9.156-22.91 11.9-34.88 6.943S64 396.9 64 383.1V128c0-12.94 7.781-24.62 19.75-29.58S109.5 96.23 118.6 105.4z"] }, uj = { prefix: "fas", iconName: "check", icon: [448, 512, [10004, 10003], "f00c", "M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z"] }, cj = { prefix: "fas", iconName: "chevron-down", icon: [448, 512, [], "f078", "M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"] }, lj = { prefix: "fas", iconName: "chevron-up", icon: [448, 512, [], "f077", "M416 352c-8.188 0-16.38-3.125-22.62-9.375L224 173.3l-169.4 169.4c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25C432.4 348.9 424.2 352 416 352z"] }, fj = { prefix: "fas", iconName: "circle-notch", icon: [512, 512, [], "f1ce", "M222.7 32.15C227.7 49.08 218.1 66.9 201.1 71.94C121.8 95.55 64 169.1 64 255.1C64 362 149.1 447.1 256 447.1C362 447.1 448 362 448 255.1C448 169.1 390.2 95.55 310.9 71.94C293.9 66.9 284.3 49.08 289.3 32.15C294.4 15.21 312.2 5.562 329.1 10.6C434.9 42.07 512 139.1 512 255.1C512 397.4 397.4 511.1 256 511.1C114.6 511.1 0 397.4 0 255.1C0 139.1 77.15 42.07 182.9 10.6C199.8 5.562 217.6 15.21 222.7 32.15V32.15z"] }, hj = { prefix: "fas", iconName: "clone", icon: [512, 512, [], "f24d", "M0 224C0 188.7 28.65 160 64 160H128V288C128 341 170.1 384 224 384H352V448C352 483.3 323.3 512 288 512H64C28.65 512 0 483.3 0 448V224zM224 352C188.7 352 160 323.3 160 288V64C160 28.65 188.7 0 224 0H448C483.3 0 512 28.65 512 64V288C512 323.3 483.3 352 448 352H224z"] }, dj = { prefix: "fas", iconName: "code", icon: [640, 512, [], "f121", "M414.8 40.79L286.8 488.8C281.9 505.8 264.2 515.6 247.2 510.8C230.2 505.9 220.4 488.2 225.2 471.2L353.2 23.21C358.1 6.216 375.8-3.624 392.8 1.232C409.8 6.087 419.6 23.8 414.8 40.79H414.8zM518.6 121.4L630.6 233.4C643.1 245.9 643.1 266.1 630.6 278.6L518.6 390.6C506.1 403.1 485.9 403.1 473.4 390.6C460.9 378.1 460.9 357.9 473.4 345.4L562.7 256L473.4 166.6C460.9 154.1 460.9 133.9 473.4 121.4C485.9 108.9 506.1 108.9 518.6 121.4V121.4zM166.6 166.6L77.25 256L166.6 345.4C179.1 357.9 179.1 378.1 166.6 390.6C154.1 403.1 133.9 403.1 121.4 390.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4L121.4 121.4C133.9 108.9 154.1 108.9 166.6 121.4C179.1 133.9 179.1 154.1 166.6 166.6V166.6z"] }, vj = { prefix: "fas", iconName: "copy", icon: [512, 512, [], "f0c5", "M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"] }, pj = { prefix: "fas", iconName: "crop-simple", icon: [512, 512, ["crop-alt"], "f565", "M128 384H352V448H128C92.65 448 64 419.3 64 384V128H32C14.33 128 0 113.7 0 96C0 78.33 14.33 64 32 64H64V32C64 14.33 78.33 0 96 0C113.7 0 128 14.33 128 32V384zM384 128H160V64H384C419.3 64 448 92.65 448 128V384H480C497.7 384 512 398.3 512 416C512 433.7 497.7 448 480 448H448V480C448 497.7 433.7 512 416 512C398.3 512 384 497.7 384 480V128z"] }, mj = { prefix: "fas", iconName: "ellipsis-vertical", icon: [128, 512, ["ellipsis-v"], "f142", "M64 360C94.93 360 120 385.1 120 416C120 446.9 94.93 472 64 472C33.07 472 8 446.9 8 416C8 385.1 33.07 360 64 360zM64 200C94.93 200 120 225.1 120 256C120 286.9 94.93 312 64 312C33.07 312 8 286.9 8 256C8 225.1 33.07 200 64 200zM64 152C33.07 152 8 126.9 8 96C8 65.07 33.07 40 64 40C94.93 40 120 65.07 120 96C120 126.9 94.93 152 64 152z"] }, gj = { prefix: "fas", iconName: "filter", icon: [512, 512, [], "f0b0", "M3.853 54.87C10.47 40.9 24.54 32 40 32H472C487.5 32 501.5 40.9 508.1 54.87C514.8 68.84 512.7 85.37 502.1 97.33L320 320.9V448C320 460.1 313.2 471.2 302.3 476.6C291.5 482 278.5 480.9 268.8 473.6L204.8 425.6C196.7 419.6 192 410.1 192 400V320.9L9.042 97.33C-.745 85.37-2.765 68.84 3.854 54.87L3.853 54.87z"] }, yj = { prefix: "fas", iconName: "gear", icon: [512, 512, [9881, "cog"], "f013", "M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"] }, bj = { prefix: "fas", iconName: "magnifying-glass", icon: [512, 512, [128269, "search"], "f002", "M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"] }, kj = { prefix: "fas", iconName: "paste", icon: [512, 512, ["file-clipboard"], "f0ea", "M320 96V80C320 53.49 298.5 32 272 32H215.4C204.3 12.89 183.6 0 160 0S115.7 12.89 104.6 32H48C21.49 32 0 53.49 0 80v320C0 426.5 21.49 448 48 448l144 .0013L192 176C192 131.8 227.8 96 272 96H320zM160 88C146.8 88 136 77.25 136 64S146.8 40 160 40S184 50.75 184 64S173.3 88 160 88zM416 128v96h96L416 128zM384 224L384 128h-112C245.5 128 224 149.5 224 176v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48V256h-95.99C398.4 256 384 241.6 384 224z"] }, wj = { prefix: "fas", iconName: "pen", icon: [512, 512, [128394], "f304", "M362.7 19.32C387.7-5.678 428.3-5.678 453.3 19.32L492.7 58.75C517.7 83.74 517.7 124.3 492.7 149.3L444.3 197.7L314.3 67.72L362.7 19.32zM421.7 220.3L188.5 453.4C178.1 463.8 165.2 471.5 151.1 475.6L30.77 511C22.35 513.5 13.24 511.2 7.03 504.1C.8198 498.8-1.502 489.7 .976 481.2L36.37 360.9C40.53 346.8 48.16 333.9 58.57 323.5L291.7 90.34L421.7 220.3z"] }, xj = { prefix: "fas", iconName: "scissors", icon: [512, 512, [9986, 9988, 9984, "cut"], "f0c4", "M396.8 51.2C425.1 22.92 470.9 22.92 499.2 51.2C506.3 58.27 506.3 69.73 499.2 76.8L216.5 359.5C221.3 372.1 224 385.7 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 287.1 112 287.1C126.3 287.1 139.9 290.7 152.5 295.5L191.1 255.1L152.5 216.5C139.9 221.3 126.3 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 126.3 221.3 139.9 216.5 152.5L255.1 191.1L396.8 51.2zM160 111.1C160 85.49 138.5 63.1 112 63.1C85.49 63.1 64 85.49 64 111.1C64 138.5 85.49 159.1 112 159.1C138.5 159.1 160 138.5 160 111.1zM112 448C138.5 448 160 426.5 160 400C160 373.5 138.5 352 112 352C85.49 352 64 373.5 64 400C64 426.5 85.49 448 112 448zM278.6 342.6L342.6 278.6L499.2 435.2C506.3 442.3 506.3 453.7 499.2 460.8C470.9 489.1 425.1 489.1 396.8 460.8L278.6 342.6z"] }, jj = { prefix: "fas", iconName: "square-caret-down", icon: [448, 512, ["caret-square-down"], "f150", "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.34 28.65 64 64 64h320c35.35 0 64-28.66 64-64V96C448 60.65 419.3 32 384 32zM345.6 232.3l-104 112C237 349.2 230.7 352 224 352s-13.03-2.781-17.59-7.656l-104-112c-6.5-7-8.219-17.19-4.407-25.94C101.8 197.7 110.5 192 120 192h208c9.531 0 18.19 5.656 21.1 14.41C353.8 215.2 352.1 225.3 345.6 232.3z"] }, Sj = { prefix: "fas", iconName: "square-caret-up", icon: [448, 512, ["caret-square-up"], "f151", "M384 32H64C28.65 32 0 60.65 0 96v320c0 35.34 28.65 64 64 64h320c35.35 0 64-28.66 64-64V96C448 60.65 419.3 32 384 32zM349.1 305.6C346.2 314.3 337.5 320 328 320h-208c-9.531 0-18.19-5.656-22-14.41C94.19 296.8 95.91 286.7 102.4 279.7l104-112c9.125-9.75 26.06-9.75 35.19 0l104 112C352.1 286.7 353.8 296.8 349.1 305.6z"] }, Cj = { prefix: "fas", iconName: "triangle-exclamation", icon: [512, 512, [9888, "exclamation-triangle", "warning"], "f071", "M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"] }, _j = { prefix: "fas", iconName: "wrench", icon: [512, 512, [128295], "f0ad", "M507.6 122.8c-2.904-12.09-18.25-16.13-27.04-7.338l-76.55 76.56l-83.1-.0002l0-83.1l76.55-76.56c8.791-8.789 4.75-24.14-7.336-27.04c-23.69-5.693-49.34-6.111-75.92 .2484c-61.45 14.7-109.4 66.9-119.2 129.3C189.8 160.8 192.3 186.7 200.1 210.1l-178.1 178.1c-28.12 28.12-28.12 73.69 0 101.8C35.16 504.1 53.56 512 71.1 512s36.84-7.031 50.91-21.09l178.1-178.1c23.46 7.736 49.31 10.24 76.17 6.004c62.41-9.84 114.6-57.8 129.3-119.2C513.7 172.1 513.3 146.5 507.6 122.8zM80 456c-13.25 0-24-10.75-24-24c0-13.26 10.75-24 24-24s24 10.74 24 24C104 445.3 93.25 456 80 456z"] }, $j = { prefix: "fas", iconName: "xmark", icon: [320, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"] }; /*! * Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2022 Fonticons, Inc. */ function Oj(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e3; if (e22 < 0.9 * t2) return e22.toFixed() + " B"; var n2 = e22 / t2; if (n2 < 0.9 * t2) return n2.toFixed(1) + " KB"; var r2 = n2 / t2; if (r2 < 0.9 * t2) return r2.toFixed(1) + " MB"; var i2 = r2 / t2; if (i2 < 0.9 * t2) return i2.toFixed(1) + " GB"; var o2 = i2 / t2; return o2.toFixed(1) + " TB"; } var Aj = Da("jsoneditor:FocusTracker"); function Mj(e22) { var t2, n2 = e22.onMount, r2 = e22.onDestroy, i2 = e22.getWindow, o2 = e22.hasFocus, a2 = e22.onFocus, s2 = e22.onBlur, u2 = false; function c2() { var e23 = o2(); e23 && (clearTimeout(t2), u2 || (Aj("focus"), a2(), u2 = e23)); } function l2() { u2 && (clearTimeout(t2), t2 = setTimeout(function() { Aj("blur"), u2 = false, s2(); })); } n2(function() { Aj("mount FocusTracker"); var e23 = i2(); e23 && (e23.addEventListener("focusin", c2, true), e23.addEventListener("focusout", l2, true)); }), r2(function() { Aj("destroy FocusTracker"); var e23 = i2(); e23 && (e23.removeEventListener("focusin", c2, true), e23.removeEventListener("focusout", l2, true)); }); } function Ej(e22) { for (var t2, n2, r2 = [{ id: n2 = "path-" + e22[0] }, e22[1]], i2 = {}, o2 = 0; o2 < r2.length; o2 += 1) i2 = Fi(i2, r2[o2]); return { c: function() { _o(t2 = yo("path"), i2); }, m: function(e23, n3) { vo(e23, t2, n3); }, p: function(e23, o3) { var a2 = ki(o3, 1)[0]; _o(t2, i2 = _a(r2, [1 & a2 && n2 !== (n2 = "path-" + e23[0]) && { id: n2 }, 2 & a2 && e23[1]])); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function Pj(e22, t2, n2) { var r2 = t2.id, i2 = t2.data, o2 = i2 === void 0 ? {} : i2; return e22.$$set = function(e23) { "id" in e23 && n2(0, r2 = e23.id), "data" in e23 && n2(1, o2 = e23.data); }, [r2, o2]; } var Nj = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, Pj, Ej, Ui, { id: 0, data: 1 }), r2; } return zi(n2); }(); function Tj(e22) { for (var t2, n2, r2 = [{ id: n2 = "polygon-" + e22[0] }, e22[1]], i2 = {}, o2 = 0; o2 < r2.length; o2 += 1) i2 = Fi(i2, r2[o2]); return { c: function() { _o(t2 = yo("polygon"), i2); }, m: function(e23, n3) { vo(e23, t2, n3); }, p: function(e23, o3) { var a2 = ki(o3, 1)[0]; _o(t2, i2 = _a(r2, [1 & a2 && n2 !== (n2 = "polygon-" + e23[0]) && { id: n2 }, 2 & a2 && e23[1]])); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function Ij(e22, t2, n2) { var r2 = t2.id, i2 = t2.data, o2 = i2 === void 0 ? {} : i2; return e22.$$set = function(e23) { "id" in e23 && n2(0, r2 = e23.id), "data" in e23 && n2(1, o2 = e23.data); }, [r2, o2]; } var Rj = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, Ij, Tj, Ui, { id: 0, data: 1 }), r2; } return zi(n2); }(); function Dj(e22) { var t2; return { c: function() { t2 = yo("g"); }, m: function(n2, r2) { vo(n2, t2, r2), t2.innerHTML = e22[0]; }, p: function(e23, n2) { 1 & ki(n2, 1)[0] && (t2.innerHTML = e23[0]); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function zj(e22, t2, n2) { var r2, i2 = 870711; var o2 = t2.data; function a2(e23) { if (!e23 || !e23.raw) return null; var t3 = e23.raw, n3 = {}; return t3 = (t3 = t3.replace(/\s(?:xml:)?id=["']?([^"')\s]+)/g, function(e24, t4) { var r3 = "fa-".concat((i2 += 1).toString(16)); return n3[t4] = r3, ' id="'.concat(r3, '"'); })).replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g, function(e24, t4, r3, i3) { var o3 = t4 || i3; return o3 && n3[o3] ? "#".concat(n3[o3]) : e24; }); } return e22.$$set = function(e23) { "data" in e23 && n2(1, o2 = e23.data); }, e22.$$.update = function() { 2 & e22.$$.dirty && n2(0, r2 = a2(o2)); }, [r2, o2]; } var Lj = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, zj, Dj, Ui, { data: 1 }), r2; } return zi(n2); }(); function Bj(e22) { co(e22, "svelte-1dof0an", ".fa-icon.svelte-1dof0an{display:inline-block;fill:currentColor}.fa-flip-horizontal.svelte-1dof0an{transform:scale(-1, 1)}.fa-flip-vertical.svelte-1dof0an{transform:scale(1, -1)}.fa-spin.svelte-1dof0an{animation:svelte-1dof0an-fa-spin 1s 0s infinite linear}.fa-inverse.svelte-1dof0an{color:#fff}.fa-pulse.svelte-1dof0an{animation:svelte-1dof0an-fa-spin 1s infinite steps(8)}@keyframes svelte-1dof0an-fa-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}"); } function qj(e22) { var t2, n2, r2, i2, o2 = e22[13].default, a2 = Gi(o2, e22, e22[12], null); return { c: function() { t2 = yo("svg"), a2 && a2.c(), So(t2, "version", "1.1"), So(t2, "class", n2 = "fa-icon " + e22[0] + " svelte-1dof0an"), So(t2, "x", e22[8]), So(t2, "y", e22[9]), So(t2, "width", e22[1]), So(t2, "height", e22[2]), So(t2, "aria-label", e22[11]), So(t2, "role", r2 = e22[11] ? "img" : "presentation"), So(t2, "viewBox", e22[3]), So(t2, "style", e22[10]), To(t2, "fa-spin", e22[4]), To(t2, "fa-pulse", e22[6]), To(t2, "fa-inverse", e22[5]), To(t2, "fa-flip-horizontal", e22[7] === "horizontal"), To(t2, "fa-flip-vertical", e22[7] === "vertical"); }, m: function(e23, n3) { vo(e23, t2, n3), a2 && a2.m(t2, null), i2 = true; }, p: function(e23, s2) { var u2 = ki(s2, 1)[0]; a2 && a2.p && (!i2 || 4096 & u2) && Zi(a2, o2, e23, e23[12], i2 ? Yi(o2, e23[12], u2, null) : Xi(e23[12]), null), (!i2 || 1 & u2 && n2 !== (n2 = "fa-icon " + e23[0] + " svelte-1dof0an")) && So(t2, "class", n2), (!i2 || 256 & u2) && So(t2, "x", e23[8]), (!i2 || 512 & u2) && So(t2, "y", e23[9]), (!i2 || 2 & u2) && So(t2, "width", e23[1]), (!i2 || 4 & u2) && So(t2, "height", e23[2]), (!i2 || 2048 & u2) && So(t2, "aria-label", e23[11]), (!i2 || 2048 & u2 && r2 !== (r2 = e23[11] ? "img" : "presentation")) && So(t2, "role", r2), (!i2 || 8 & u2) && So(t2, "viewBox", e23[3]), (!i2 || 1024 & u2) && So(t2, "style", e23[10]), 17 & u2 && To(t2, "fa-spin", e23[4]), 65 & u2 && To(t2, "fa-pulse", e23[6]), 33 & u2 && To(t2, "fa-inverse", e23[5]), 129 & u2 && To(t2, "fa-flip-horizontal", e23[7] === "horizontal"), 129 & u2 && To(t2, "fa-flip-vertical", e23[7] === "vertical"); }, i: function(e23) { i2 || (ya(a2, e23), i2 = true); }, o: function(e23) { ba(a2, e23), i2 = false; }, d: function(e23) { e23 && po(t2), a2 && a2.d(e23); } }; } function Fj(e22, t2, n2) { var r2 = t2.$$slots, i2 = r2 === void 0 ? {} : r2, o2 = t2.$$scope, a2 = t2.class, s2 = t2.width, u2 = t2.height, c2 = t2.box, l2 = t2.spin, f2 = l2 !== void 0 && l2, h2 = t2.inverse, d2 = h2 !== void 0 && h2, v2 = t2.pulse, p2 = v2 !== void 0 && v2, m2 = t2.flip, g2 = m2 === void 0 ? null : m2, y2 = t2.x, b2 = y2 === void 0 ? void 0 : y2, k2 = t2.y, w2 = k2 === void 0 ? void 0 : k2, x2 = t2.style, j2 = x2 === void 0 ? void 0 : x2, S2 = t2.label, C2 = S2 === void 0 ? void 0 : S2; return e22.$$set = function(e23) { "class" in e23 && n2(0, a2 = e23.class), "width" in e23 && n2(1, s2 = e23.width), "height" in e23 && n2(2, u2 = e23.height), "box" in e23 && n2(3, c2 = e23.box), "spin" in e23 && n2(4, f2 = e23.spin), "inverse" in e23 && n2(5, d2 = e23.inverse), "pulse" in e23 && n2(6, p2 = e23.pulse), "flip" in e23 && n2(7, g2 = e23.flip), "x" in e23 && n2(8, b2 = e23.x), "y" in e23 && n2(9, w2 = e23.y), "style" in e23 && n2(10, j2 = e23.style), "label" in e23 && n2(11, C2 = e23.label), "$$scope" in e23 && n2(12, o2 = e23.$$scope); }, [a2, s2, u2, c2, f2, d2, p2, g2, b2, w2, j2, C2, o2, i2]; } var Vj = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, Fj, qj, Ui, { class: 0, width: 1, height: 2, box: 3, spin: 4, inverse: 5, pulse: 6, flip: 7, x: 8, y: 9, style: 10, label: 11 }, Bj), r2; } return zi(n2); }(); function Hj(e22, t2, n2) { var r2 = e22.slice(); return r2[24] = t2[n2], r2[26] = n2, r2; } function Wj(e22, t2, n2) { var r2 = e22.slice(); return r2[27] = t2[n2], r2[26] = n2, r2; } function Jj(e22) { var t2, n2, r2, i2, o2 = e22[6].paths && Uj(e22), a2 = e22[6].polygons && Gj(e22), s2 = e22[6].raw && Yj(e22); return { c: function() { o2 && o2.c(), t2 = ko(), a2 && a2.c(), n2 = ko(), s2 && s2.c(), r2 = wo(); }, m: function(e23, u2) { o2 && o2.m(e23, u2), vo(e23, t2, u2), a2 && a2.m(e23, u2), vo(e23, n2, u2), s2 && s2.m(e23, u2), vo(e23, r2, u2), i2 = true; }, p: function(e23, i3) { e23[6].paths ? o2 ? (o2.p(e23, i3), 64 & i3 && ya(o2, 1)) : ((o2 = Uj(e23)).c(), ya(o2, 1), o2.m(t2.parentNode, t2)) : o2 && (ma(), ba(o2, 1, 1, function() { o2 = null; }), ga()), e23[6].polygons ? a2 ? (a2.p(e23, i3), 64 & i3 && ya(a2, 1)) : ((a2 = Gj(e23)).c(), ya(a2, 1), a2.m(n2.parentNode, n2)) : a2 && (ma(), ba(a2, 1, 1, function() { a2 = null; }), ga()), e23[6].raw ? s2 ? (s2.p(e23, i3), 64 & i3 && ya(s2, 1)) : ((s2 = Yj(e23)).c(), ya(s2, 1), s2.m(r2.parentNode, r2)) : s2 && (ma(), ba(s2, 1, 1, function() { s2 = null; }), ga()); }, i: function(e23) { i2 || (ya(o2), ya(a2), ya(s2), i2 = true); }, o: function(e23) { ba(o2), ba(a2), ba(s2), i2 = false; }, d: function(e23) { o2 && o2.d(e23), e23 && po(t2), a2 && a2.d(e23), e23 && po(n2), s2 && s2.d(e23), e23 && po(r2); } }; } function Uj(e22) { for (var t2, n2, r2 = e22[6].paths, i2 = [], o2 = 0; o2 < r2.length; o2 += 1) i2[o2] = Kj(Wj(e22, r2, o2)); var a2 = function(e23) { return ba(i2[e23], 1, 1, function() { i2[e23] = null; }); }; return { c: function() { for (var e23 = 0; e23 < i2.length; e23 += 1) i2[e23].c(); t2 = wo(); }, m: function(e23, r3) { for (var o3 = 0; o3 < i2.length; o3 += 1) i2[o3].m(e23, r3); vo(e23, t2, r3), n2 = true; }, p: function(e23, n3) { if (64 & n3) { var o3; for (r2 = e23[6].paths, o3 = 0; o3 < r2.length; o3 += 1) { var s2 = Wj(e23, r2, o3); i2[o3] ? (i2[o3].p(s2, n3), ya(i2[o3], 1)) : (i2[o3] = Kj(s2), i2[o3].c(), ya(i2[o3], 1), i2[o3].m(t2.parentNode, t2)); } for (ma(), o3 = r2.length; o3 < i2.length; o3 += 1) a2(o3); ga(); } }, i: function(e23) { if (!n2) { for (var t3 = 0; t3 < r2.length; t3 += 1) ya(i2[t3]); n2 = true; } }, o: function(e23) { i2 = i2.filter(Boolean); for (var t3 = 0; t3 < i2.length; t3 += 1) ba(i2[t3]); n2 = false; }, d: function(e23) { mo(i2, e23), e23 && po(t2); } }; } function Kj(e22) { var t2, n2; return t2 = new Nj({ props: { id: e22[26], data: e22[27] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 64 & n3 && (r2.data = e23[27]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function Gj(e22) { for (var t2, n2, r2 = e22[6].polygons, i2 = [], o2 = 0; o2 < r2.length; o2 += 1) i2[o2] = Qj(Hj(e22, r2, o2)); var a2 = function(e23) { return ba(i2[e23], 1, 1, function() { i2[e23] = null; }); }; return { c: function() { for (var e23 = 0; e23 < i2.length; e23 += 1) i2[e23].c(); t2 = wo(); }, m: function(e23, r3) { for (var o3 = 0; o3 < i2.length; o3 += 1) i2[o3].m(e23, r3); vo(e23, t2, r3), n2 = true; }, p: function(e23, n3) { if (64 & n3) { var o3; for (r2 = e23[6].polygons, o3 = 0; o3 < r2.length; o3 += 1) { var s2 = Hj(e23, r2, o3); i2[o3] ? (i2[o3].p(s2, n3), ya(i2[o3], 1)) : (i2[o3] = Qj(s2), i2[o3].c(), ya(i2[o3], 1), i2[o3].m(t2.parentNode, t2)); } for (ma(), o3 = r2.length; o3 < i2.length; o3 += 1) a2(o3); ga(); } }, i: function(e23) { if (!n2) { for (var t3 = 0; t3 < r2.length; t3 += 1) ya(i2[t3]); n2 = true; } }, o: function(e23) { i2 = i2.filter(Boolean); for (var t3 = 0; t3 < i2.length; t3 += 1) ba(i2[t3]); n2 = false; }, d: function(e23) { mo(i2, e23), e23 && po(t2); } }; } function Qj(e22) { var t2, n2; return t2 = new Rj({ props: { id: e22[26], data: e22[24] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 64 & n3 && (r2.data = e23[24]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function Yj(e22) { var t2, n2, r2; function i2(t3) { e22[15](t3); } var o2 = {}; return e22[6] !== void 0 && (o2.data = e22[6]), t2 = new Lj({ props: o2 }), Xo.push(function() { return Oa(t2, "data", i2); }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, n3) { Ma(t2, e23, n3), r2 = true; }, p: function(e23, r3) { var i3 = {}; !n2 && 64 & r3 && (n2 = true, i3.data = e23[6], sa(function() { return n2 = false; })), t2.$set(i3); }, i: function(e23) { r2 || (ya(t2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), r2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function Zj(e22) { var t2, n2 = e22[14].default, r2 = Gi(n2, e22, e22[16], null), i2 = r2 || function(e23) { var t3, n3, r3 = e23[6] && Jj(e23); return { c: function() { r3 && r3.c(), t3 = wo(); }, m: function(e24, i3) { r3 && r3.m(e24, i3), vo(e24, t3, i3), n3 = true; }, p: function(e24, n4) { e24[6] ? r3 ? (r3.p(e24, n4), 64 & n4 && ya(r3, 1)) : ((r3 = Jj(e24)).c(), ya(r3, 1), r3.m(t3.parentNode, t3)) : r3 && (ma(), ba(r3, 1, 1, function() { r3 = null; }), ga()); }, i: function(e24) { n3 || (ya(r3), n3 = true); }, o: function(e24) { ba(r3), n3 = false; }, d: function(e24) { r3 && r3.d(e24), e24 && po(t3); } }; }(e22); return { c: function() { i2 && i2.c(); }, m: function(e23, n3) { i2 && i2.m(e23, n3), t2 = true; }, p: function(e23, o2) { r2 ? r2.p && (!t2 || 65536 & o2) && Zi(r2, n2, e23, e23[16], t2 ? Yi(n2, e23[16], o2, null) : Xi(e23[16]), null) : i2 && i2.p && (!t2 || 64 & o2) && i2.p(e23, t2 ? o2 : -1); }, i: function(e23) { t2 || (ya(i2, e23), t2 = true); }, o: function(e23) { ba(i2, e23), t2 = false; }, d: function(e23) { i2 && i2.d(e23); } }; } function Xj(e22) { var t2, n2; return t2 = new Vj({ props: { label: e22[5], width: e22[7], height: e22[8], box: e22[10], style: e22[9], spin: e22[1], flip: e22[4], inverse: e22[2], pulse: e22[3], class: e22[0], $$slots: { default: [Zj] }, $$scope: { ctx: e22 } } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = ki(n3, 1)[0], i2 = {}; 32 & r2 && (i2.label = e23[5]), 128 & r2 && (i2.width = e23[7]), 256 & r2 && (i2.height = e23[8]), 1024 & r2 && (i2.box = e23[10]), 512 & r2 && (i2.style = e23[9]), 2 & r2 && (i2.spin = e23[1]), 16 & r2 && (i2.flip = e23[4]), 4 & r2 && (i2.inverse = e23[2]), 8 & r2 && (i2.pulse = e23[3]), 1 & r2 && (i2.class = e23[0]), 65600 & r2 && (i2.$$scope = { dirty: r2, ctx: e23 }), t2.$set(i2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function eS(e22, t2, n2) { var r2, i2, o2, a2, s2 = t2.$$slots, u2 = s2 === void 0 ? {} : s2, c2 = t2.$$scope, l2 = t2.class, f2 = l2 === void 0 ? "" : l2, h2 = t2.data, d2 = t2.scale, v2 = d2 === void 0 ? 1 : d2, p2 = t2.spin, m2 = p2 !== void 0 && p2, g2 = t2.inverse, y2 = g2 !== void 0 && g2, b2 = t2.pulse, k2 = b2 !== void 0 && b2, w2 = t2.flip, x2 = w2 === void 0 ? null : w2, j2 = t2.label, S2 = j2 === void 0 ? null : j2, C2 = null, _2 = t2.style, $2 = _2 === void 0 ? null : _2; function O2() { var e23 = 1; return v2 !== void 0 && (e23 = Number(v2)), isNaN(e23) || e23 <= 0 ? (console.warn('Invalid prop: prop "scale" should be a number over 0.'), 1) : 1 * e23; } function A2() { return C2 ? Math.max(C2.width, C2.height) / 16 : 1; } return e22.$$set = function(e23) { "class" in e23 && n2(0, f2 = e23.class), "data" in e23 && n2(11, h2 = e23.data), "scale" in e23 && n2(12, v2 = e23.scale), "spin" in e23 && n2(1, m2 = e23.spin), "inverse" in e23 && n2(2, y2 = e23.inverse), "pulse" in e23 && n2(3, k2 = e23.pulse), "flip" in e23 && n2(4, x2 = e23.flip), "label" in e23 && n2(5, S2 = e23.label), "style" in e23 && n2(13, $2 = e23.style), "$$scope" in e23 && n2(16, c2 = e23.$$scope); }, e22.$$.update = function() { 14336 & e22.$$.dirty && (!function() { if (h2 !== void 0) { var e23 = function(e24) { if ("iconName" in e24 && "icon" in e24) { var t4 = {}, n3 = e24.icon, r3 = e24.iconName, i3 = { width: n3[0], height: n3[1], paths: [{ d: n3[4] }] }; return t4[r3] = i3, t4; } return e24; }(h2), t3 = e23[ki(Object.keys(e23), 1)[0]]; t3.paths || (t3.paths = []), t3.d && t3.paths.push({ d: t3.d }), t3.polygons || (t3.polygons = []), t3.points && t3.polygons.push({ points: t3.points }), n2(6, C2 = t3); } }(), n2(7, r2 = C2 ? C2.width / A2() * O2() : 0), n2(8, i2 = C2 ? C2.height / A2() * O2() : 0), n2(9, o2 = function() { var e23 = ""; $2 !== null && (e23 += $2); var t3 = O2(); if (t3 === 1) { if (e23.length === 0) return; return e23; } return e23 === "" || e23.endsWith(";") || (e23 += "; "), "".concat(e23, "font-size: ").concat(t3, "em"); }()), n2(10, a2 = C2 ? "0 0 ".concat(C2.width, " ").concat(C2.height) : "0 0 ".concat(r2, " ").concat(i2))); }, [f2, m2, y2, k2, x2, S2, C2, r2, i2, o2, a2, h2, v2, $2, u2, function(e23) { n2(6, C2 = e23); }, c2]; } var tS = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, eS, Xj, Ui, { class: 0, data: 11, scale: 12, spin: 1, inverse: 2, pulse: 3, flip: 4, label: 5, style: 13 }), r2; } return zi(n2); }(); function nS(e22) { co(e22, "svelte-kvi5ls", ".jse-message.svelte-kvi5ls.svelte-kvi5ls{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:center}.jse-message.jse-success.svelte-kvi5ls.svelte-kvi5ls{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-kvi5ls .jse-text.svelte-kvi5ls{flex:1;min-width:60%}.jse-message.svelte-kvi5ls .jse-text.jse-clickable.svelte-kvi5ls{cursor:pointer}.jse-message.svelte-kvi5ls .jse-text.jse-clickable.svelte-kvi5ls:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-kvi5ls.svelte-kvi5ls{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-kvi5ls.svelte-kvi5ls{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-kvi5ls.svelte-kvi5ls{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-kvi5ls .jse-actions.svelte-kvi5ls{display:flex;gap:var(--jse-padding)}.jse-message.svelte-kvi5ls .jse-actions button.jse-action.svelte-kvi5ls{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-kvi5ls .jse-actions button.jse-action.svelte-kvi5ls:hover{background:var(--jse-message-action-background-highlight)}"); } function rS(e22, t2, n2) { var r2 = e22.slice(); return r2[8] = t2[n2], r2; } function iS(e22) { var t2, n2; return t2 = new tS({ props: { data: e22[1] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 2 & n3 && (r2.data = e23[1]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function oS(e22) { var t2, n2; return t2 = new tS({ props: { data: e22[8].icon } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 8 & n3 && (r2.data = e23[8].icon), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function aS(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2 = e22[8].text + "", f2 = e22[8].icon && oS(e22); function h2() { return e22[6](e22[8]); } function d2() { return e22[7](e22[8]); } return { c: function() { t2 = go("button"), f2 && f2.c(), n2 = ko(), r2 = bo(l2), i2 = ko(), So(t2, "type", "button"), So(t2, "class", "jse-button jse-action jse-primary svelte-kvi5ls"), So(t2, "title", o2 = e22[8].title), t2.disabled = a2 = e22[8].disabled; }, m: function(e23, o3) { vo(e23, t2, o3), f2 && f2.m(t2, null), uo(t2, n2), uo(t2, r2), uo(t2, i2), s2 = true, u2 || (c2 = [xo(t2, "click", h2), xo(t2, "mousedown", d2)], u2 = true); }, p: function(i3, u3) { (e22 = i3)[8].icon ? f2 ? (f2.p(e22, u3), 8 & u3 && ya(f2, 1)) : ((f2 = oS(e22)).c(), ya(f2, 1), f2.m(t2, n2)) : f2 && (ma(), ba(f2, 1, 1, function() { f2 = null; }), ga()), (!s2 || 8 & u3) && l2 !== (l2 = e22[8].text + "") && Ao(r2, l2), (!s2 || 8 & u3 && o2 !== (o2 = e22[8].title)) && So(t2, "title", o2), (!s2 || 8 & u3 && a2 !== (a2 = e22[8].disabled)) && (t2.disabled = a2); }, i: function(e23) { s2 || (ya(f2), s2 = true); }, o: function(e23) { ba(f2), s2 = false; }, d: function(e23) { e23 && po(t2), f2 && f2.d(), u2 = false, Wi(c2); } }; } function sS(e22) { for (var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2 = e22[1] && iS(e22), h2 = e22[3], d2 = [], v2 = 0; v2 < h2.length; v2 += 1) d2[v2] = aS(rS(e22, h2, v2)); var p2 = function(e23) { return ba(d2[e23], 1, 1, function() { d2[e23] = null; }); }; return { c: function() { t2 = go("div"), n2 = go("div"), f2 && f2.c(), r2 = ko(), i2 = bo(e22[2]), o2 = ko(), a2 = go("div"); for (var u3 = 0; u3 < d2.length; u3 += 1) d2[u3].c(); So(n2, "class", "jse-text svelte-kvi5ls"), To(n2, "jse-clickable", e22[4] !== null), So(a2, "class", "jse-actions svelte-kvi5ls"), So(t2, "class", s2 = "jse-message jse-" + e22[0] + " svelte-kvi5ls"); }, m: function(s3, h3) { vo(s3, t2, h3), uo(t2, n2), f2 && f2.m(n2, null), uo(n2, r2), uo(n2, i2), uo(t2, o2), uo(t2, a2); for (var v3 = 0; v3 < d2.length; v3 += 1) d2[v3].m(a2, null); u2 = true, c2 || (l2 = xo(n2, "click", e22[5]), c2 = true); }, p: function(e23, o3) { var c3 = ki(o3, 1)[0]; if (e23[1] ? f2 ? (f2.p(e23, c3), 2 & c3 && ya(f2, 1)) : ((f2 = iS(e23)).c(), ya(f2, 1), f2.m(n2, r2)) : f2 && (ma(), ba(f2, 1, 1, function() { f2 = null; }), ga()), (!u2 || 4 & c3) && Ao(i2, e23[2]), 16 & c3 && To(n2, "jse-clickable", e23[4] !== null), 8 & c3) { var l3; for (h2 = e23[3], l3 = 0; l3 < h2.length; l3 += 1) { var v3 = rS(e23, h2, l3); d2[l3] ? (d2[l3].p(v3, c3), ya(d2[l3], 1)) : (d2[l3] = aS(v3), d2[l3].c(), ya(d2[l3], 1), d2[l3].m(a2, null)); } for (ma(), l3 = h2.length; l3 < d2.length; l3 += 1) p2(l3); ga(); } (!u2 || 1 & c3 && s2 !== (s2 = "jse-message jse-" + e23[0] + " svelte-kvi5ls")) && So(t2, "class", s2); }, i: function(e23) { if (!u2) { ya(f2); for (var t3 = 0; t3 < h2.length; t3 += 1) ya(d2[t3]); u2 = true; } }, o: function(e23) { ba(f2), d2 = d2.filter(Boolean); for (var t3 = 0; t3 < d2.length; t3 += 1) ba(d2[t3]); u2 = false; }, d: function(e23) { e23 && po(t2), f2 && f2.d(), mo(d2, e23), c2 = false, l2(); } }; } function uS(e22, t2, n2) { var r2 = t2.type, i2 = r2 === void 0 ? "success" : r2, o2 = t2.icon, a2 = o2 === void 0 ? void 0 : o2, s2 = t2.message, u2 = s2 === void 0 ? void 0 : s2, c2 = t2.actions, l2 = c2 === void 0 ? [] : c2, f2 = t2.onClick, h2 = f2 === void 0 ? void 0 : f2; return e22.$$set = function(e23) { "type" in e23 && n2(0, i2 = e23.type), "icon" in e23 && n2(1, a2 = e23.icon), "message" in e23 && n2(2, u2 = e23.message), "actions" in e23 && n2(3, l2 = e23.actions), "onClick" in e23 && n2(4, h2 = e23.onClick); }, [i2, a2, u2, l2, h2, function() { h2 && h2(); }, function(e23) { e23.onClick && e23.onClick(); }, function(e23) { e23.onMouseDown && e23.onMouseDown(); }]; } var cS = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, uS, sS, Ki, { type: 0, icon: 1, message: 2, actions: 3, onClick: 4 }, nS), r2; } return zi(n2); }(); function lS(e22) { return e22.map(fS).join(""); } function fS(e22) { return vS.test(e22) ? "[" + e22 + "]" : dS.test(e22) ? "." + e22 : "[" + JSON.stringify(e22) + "]"; } function hS(e22) { return e22.map(function(e23) { return vS.test(e23) ? "?.[".concat(e23, "]") : dS.test(e23) ? "?.".concat(e23) : "?.[".concat(JSON.stringify(e23), "]"); }).join(""); } var dS = /^[A-z$_][A-z$_\d]*$/i, vS = /^\d+$/; function pS(e22) { co(e22, "svelte-1oe8e8r", ".jse-validation-errors-overview.svelte-1oe8e8r.svelte-1oe8e8r{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-message-warning-background);color:var(--jse-message-warning-color);overflow:auto;max-height:25%}.jse-validation-errors-overview.svelte-1oe8e8r table.svelte-1oe8e8r{border-collapse:collapse;width:100%}.jse-validation-errors-overview.svelte-1oe8e8r table tr.svelte-1oe8e8r{cursor:pointer}.jse-validation-errors-overview.svelte-1oe8e8r table tr.svelte-1oe8e8r:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.svelte-1oe8e8r{padding:4px var(--jse-padding);vertical-align:middle}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-icon.svelte-1oe8e8r{width:36px;box-sizing:border-box}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action.svelte-1oe8e8r{width:36px;box-sizing:border-box;padding:0}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action button.jse-validation-errors-collapse.svelte-1oe8e8r{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:36px;height:26px;cursor:pointer}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action button.jse-validation-errors-collapse.svelte-1oe8e8r:hover{background-color:rgba(255, 255, 255, 0.2)}.jse-validation-errors-overview.svelte-1oe8e8r table tr td div.jse-validation-errors-expand.svelte-1oe8e8r{display:inline-block;position:relative;top:3px}"); } function mS(e22, t2, n2) { var r2 = e22.slice(); return r2[6] = t2[n2], r2[8] = n2, r2; } function gS(e22) { var t2, n2, r2, i2, o2 = [bS, yS], a2 = []; function s2(e23, t3) { return e23[2] || e23[0].length === 1 ? 0 : 1; } return n2 = s2(e22), r2 = a2[n2] = o2[n2](e22), { c: function() { t2 = go("div"), r2.c(), So(t2, "class", "jse-validation-errors-overview svelte-1oe8e8r"); }, m: function(e23, r3) { vo(e23, t2, r3), a2[n2].m(t2, null), i2 = true; }, p: function(e23, i3) { var u2 = n2; (n2 = s2(e23)) === u2 ? a2[n2].p(e23, i3) : (ma(), ba(a2[u2], 1, 1, function() { a2[u2] = null; }), ga(), (r2 = a2[n2]) ? r2.p(e23, i3) : (r2 = a2[n2] = o2[n2](e23)).c(), ya(r2, 1), r2.m(t2, null)); }, i: function(e23) { i2 || (ya(r2), i2 = true); }, o: function(e23) { ba(r2), i2 = false; }, d: function(e23) { e23 && po(t2), a2[n2].d(); } }; } function yS(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2 = e22[0].length + ""; return o2 = new tS({ props: { data: Cj } }), f2 = new tS({ props: { data: tj } }), { c: function() { t2 = go("table"), n2 = go("tbody"), r2 = go("tr"), i2 = go("td"), Aa(o2.$$.fragment), a2 = ko(), s2 = go("td"), u2 = bo(p2), c2 = bo(" validation errors\n "), l2 = go("div"), Aa(f2.$$.fragment), So(i2, "class", "jse-validation-error-icon svelte-1oe8e8r"), So(l2, "class", "jse-validation-errors-expand svelte-1oe8e8r"), So(s2, "class", "svelte-1oe8e8r"), So(r2, "class", "jse-validation-error svelte-1oe8e8r"), So(t2, "class", "svelte-1oe8e8r"); }, m: function(p3, m2) { vo(p3, t2, m2), uo(t2, n2), uo(n2, r2), uo(r2, i2), Ma(o2, i2, null), uo(r2, a2), uo(r2, s2), uo(s2, u2), uo(s2, c2), uo(s2, l2), Ma(f2, l2, null), h2 = true, d2 || (v2 = xo(r2, "click", e22[4]), d2 = true); }, p: function(e23, t3) { (!h2 || 1 & t3) && p2 !== (p2 = e23[0].length + "") && Ao(u2, p2); }, i: function(e23) { h2 || (ya(o2.$$.fragment, e23), ya(f2.$$.fragment, e23), h2 = true); }, o: function(e23) { ba(o2.$$.fragment, e23), ba(f2.$$.fragment, e23), h2 = false; }, d: function(e23) { e23 && po(t2), Ea(o2), Ea(f2), d2 = false, v2(); } }; } function bS(e22) { for (var t2, n2, r2, i2 = e22[0], o2 = [], a2 = 0; a2 < i2.length; a2 += 1) o2[a2] = wS(mS(e22, i2, a2)); var s2 = function(e23) { return ba(o2[e23], 1, 1, function() { o2[e23] = null; }); }; return { c: function() { t2 = go("table"), n2 = go("tbody"); for (var e23 = 0; e23 < o2.length; e23 += 1) o2[e23].c(); So(t2, "class", "svelte-1oe8e8r"); }, m: function(e23, i3) { vo(e23, t2, i3), uo(t2, n2); for (var a3 = 0; a3 < o2.length; a3 += 1) o2[a3].m(n2, null); r2 = true; }, p: function(e23, t3) { if (11 & t3) { var r3; for (i2 = e23[0], r3 = 0; r3 < i2.length; r3 += 1) { var a3 = mS(e23, i2, r3); o2[r3] ? (o2[r3].p(a3, t3), ya(o2[r3], 1)) : (o2[r3] = wS(a3), o2[r3].c(), ya(o2[r3], 1), o2[r3].m(n2, null)); } for (ma(), r3 = i2.length; r3 < o2.length; r3 += 1) s2(r3); ga(); } }, i: function(e23) { if (!r2) { for (var t3 = 0; t3 < i2.length; t3 += 1) ya(o2[t3]); r2 = true; } }, o: function(e23) { o2 = o2.filter(Boolean); for (var t3 = 0; t3 < o2.length; t3 += 1) ba(o2[t3]); r2 = false; }, d: function(e23) { e23 && po(t2), mo(o2, e23); } }; } function kS(e22) { var t2, n2, r2, i2, o2; return n2 = new tS({ props: { data: ej } }), { c: function() { t2 = go("button"), Aa(n2.$$.fragment), So(t2, "type", "button"), So(t2, "class", "jse-validation-errors-collapse svelte-1oe8e8r"), So(t2, "title", "Collapse validation errors"); }, m: function(a2, s2) { vo(a2, t2, s2), Ma(n2, t2, null), r2 = true, i2 || (o2 = xo(t2, "click", jo(e22[3])), i2 = true); }, p: Bi, i: function(e23) { r2 || (ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), i2 = false, o2(); } }; } function wS(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2 = lS(e22[6].path) + "", g2 = e22[6].message + ""; r2 = new tS({ props: { data: Cj } }); var y2 = e22[8] === 0 && e22[0].length > 1 && kS(e22); function b2() { return e22[5](e22[6]); } return { c: function() { t2 = go("tr"), n2 = go("td"), Aa(r2.$$.fragment), i2 = ko(), o2 = go("td"), a2 = bo(m2), s2 = ko(), u2 = go("td"), c2 = bo(g2), l2 = ko(), f2 = go("td"), y2 && y2.c(), h2 = ko(), So(n2, "class", "jse-validation-error-icon svelte-1oe8e8r"), So(o2, "class", "svelte-1oe8e8r"), So(u2, "class", "svelte-1oe8e8r"), So(f2, "class", "jse-validation-error-action svelte-1oe8e8r"), So(t2, "class", "jse-validation-error svelte-1oe8e8r"); }, m: function(e23, m3) { vo(e23, t2, m3), uo(t2, n2), Ma(r2, n2, null), uo(t2, i2), uo(t2, o2), uo(o2, a2), uo(t2, s2), uo(t2, u2), uo(u2, c2), uo(t2, l2), uo(t2, f2), y2 && y2.m(f2, null), uo(t2, h2), d2 = true, v2 || (p2 = xo(t2, "click", b2), v2 = true); }, p: function(t3, n3) { e22 = t3, (!d2 || 1 & n3) && m2 !== (m2 = lS(e22[6].path) + "") && Ao(a2, m2), (!d2 || 1 & n3) && g2 !== (g2 = e22[6].message + "") && Ao(c2, g2), e22[8] === 0 && e22[0].length > 1 ? y2 ? (y2.p(e22, n3), 1 & n3 && ya(y2, 1)) : ((y2 = kS(e22)).c(), ya(y2, 1), y2.m(f2, null)) : y2 && (ma(), ba(y2, 1, 1, function() { y2 = null; }), ga()); }, i: function(e23) { d2 || (ya(r2.$$.fragment, e23), ya(y2), d2 = true); }, o: function(e23) { ba(r2.$$.fragment, e23), ba(y2), d2 = false; }, d: function(e23) { e23 && po(t2), Ea(r2), y2 && y2.d(), v2 = false, p2(); } }; } function xS(e22) { var t2, n2, r2 = !xm(e22[0]), i2 = r2 && gS(e22); return { c: function() { i2 && i2.c(), t2 = wo(); }, m: function(e23, r3) { i2 && i2.m(e23, r3), vo(e23, t2, r3), n2 = true; }, p: function(e23, n3) { var o2 = ki(n3, 1)[0]; 1 & o2 && (r2 = !xm(e23[0])), r2 ? i2 ? (i2.p(e23, o2), 1 & o2 && ya(i2, 1)) : ((i2 = gS(e23)).c(), ya(i2, 1), i2.m(t2.parentNode, t2)) : i2 && (ma(), ba(i2, 1, 1, function() { i2 = null; }), ga()); }, i: function(e23) { n2 || (ya(i2), n2 = true); }, o: function(e23) { ba(i2), n2 = false; }, d: function(e23) { i2 && i2.d(e23), e23 && po(t2); } }; } function jS(e22, t2, n2) { var r2 = t2.validationErrors, i2 = t2.selectError, o2 = true; return e22.$$set = function(e23) { "validationErrors" in e23 && n2(0, r2 = e23.validationErrors), "selectError" in e23 && n2(1, i2 = e23.selectError); }, [r2, i2, o2, function() { n2(2, o2 = false); }, function() { n2(2, o2 = true); }, function(e23) { setTimeout(function() { return i2(e23); }); }]; } var SS = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, jS, xS, Ki, { validationErrors: 0, selectError: 1 }, pS), r2; } return zi(n2); }(), CS = { prefix: "fas", iconName: "jsoneditor-expand", icon: [512, 512, [], null, "M 0,448 V 512 h 512 v -64 z M 0,0 V 64 H 512 V 0 Z M 256,96 128,224 h 256 z M 256,416 384,288 H 128 Z"] }, _S = { prefix: "fas", iconName: "jsoneditor-collapse", icon: [512, 512, [], null, "m 0,224 v 64 h 512 v -64 z M 256,192 384,64 H 128 Z M 256,320 128,448 h 256 z"] }, $S = { prefix: "fas", iconName: "jsoneditor-format", icon: [512, 512, [], null, "M 0,32 v 64 h 416 v -64 z M 160,160 v 64 h 352 v -64 z M 160,288 v 64 h 288 v -64 z M 0,416 v 64 h 320 v -64 z"] }, OS = { prefix: "fas", iconName: "jsoneditor-compact", icon: [512, 512, [], null, "M 0,32 v 64 h 512 v -64 z M 0,160 v 64 h 512 v -64 z M 0,288 v 64 h 352 v -64 z"] }; function AS(e22) { co(e22, "svelte-v4jelk", ".jse-menu.svelte-v4jelk.svelte-v4jelk{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-v4jelk .jse-button.svelte-v4jelk{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-v4jelk .jse-button.svelte-v4jelk:hover,.jse-menu.svelte-v4jelk .jse-button.svelte-v4jelk:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-v4jelk .jse-button.svelte-v4jelk:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-v4jelk .jse-button.jse-group-button.svelte-v4jelk{border:1px solid var(--jse-menu-color);padding:0;margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:40px}.jse-menu.svelte-v4jelk .jse-button.jse-group-button.svelte-v4jelk:not(.jse-last){border-right:none}.jse-menu.svelte-v4jelk .jse-button.jse-group-button.jse-first.svelte-v4jelk{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-v4jelk .jse-button.jse-group-button.jse-last.svelte-v4jelk{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-v4jelk .jse-button.jse-group-button.svelte-v4jelk:hover,.jse-menu.svelte-v4jelk .jse-button.jse-group-button.svelte-v4jelk:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-v4jelk .jse-button.jse-group-button.jse-selected.svelte-v4jelk{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-v4jelk .jse-space.svelte-v4jelk{flex:1}.jse-menu.svelte-v4jelk .jse-separator.svelte-v4jelk{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}"); } var MS = function(e22) { return {}; }, ES = function(e22) { return {}; }; function PS(e22, t2, n2) { var r2 = e22.slice(); return r2[3] = t2[n2], r2; } var NS = function(e22) { return {}; }, TS = function(e22) { return {}; }; function IS(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2 = e22[3].icon && zS(e22), l2 = e22[3].text && LS(e22); return { c: function() { t2 = go("button"), c2 && c2.c(), n2 = ko(), l2 && l2.c(), So(t2, "type", "button"), So(t2, "class", r2 = "jse-button " + e22[3].className + " svelte-v4jelk"), So(t2, "title", i2 = e22[3].title), t2.disabled = o2 = e22[3].disabled || false; }, m: function(r3, i3) { vo(r3, t2, i3), c2 && c2.m(t2, null), uo(t2, n2), l2 && l2.m(t2, null), a2 = true, s2 || (u2 = xo(t2, "click", function() { Ji(e22[3].onClick) && e22[3].onClick.apply(this, arguments); }), s2 = true); }, p: function(s3, u3) { (e22 = s3)[3].icon ? c2 ? (c2.p(e22, u3), 1 & u3 && ya(c2, 1)) : ((c2 = zS(e22)).c(), ya(c2, 1), c2.m(t2, n2)) : c2 && (ma(), ba(c2, 1, 1, function() { c2 = null; }), ga()), e22[3].text ? l2 ? l2.p(e22, u3) : ((l2 = LS(e22)).c(), l2.m(t2, null)) : l2 && (l2.d(1), l2 = null), (!a2 || 1 & u3 && r2 !== (r2 = "jse-button " + e22[3].className + " svelte-v4jelk")) && So(t2, "class", r2), (!a2 || 1 & u3 && i2 !== (i2 = e22[3].title)) && So(t2, "title", i2), (!a2 || 1 & u3 && o2 !== (o2 = e22[3].disabled || false)) && (t2.disabled = o2); }, i: function(e23) { a2 || (ya(c2), a2 = true); }, o: function(e23) { ba(c2), a2 = false; }, d: function(e23) { e23 && po(t2), c2 && c2.d(), l2 && l2.d(), s2 = false, u2(); } }; } function RS(e22) { var t2; return { c: function() { So(t2 = go("div"), "class", "jse-space svelte-v4jelk"); }, m: function(e23, n2) { vo(e23, t2, n2); }, p: Bi, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function DS(e22) { var t2; return { c: function() { So(t2 = go("div"), "class", "jse-separator svelte-v4jelk"); }, m: function(e23, n2) { vo(e23, t2, n2); }, p: Bi, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function zS(e22) { var t2, n2; return t2 = new tS({ props: { data: e22[3].icon } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 1 & n3 && (r2.data = e23[3].icon), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function LS(e22) { var t2, n2 = e22[3].text + ""; return { c: function() { t2 = bo(n2); }, m: function(e23, n3) { vo(e23, t2, n3); }, p: function(e23, r2) { 1 & r2 && n2 !== (n2 = e23[3].text + "") && Ao(t2, n2); }, d: function(e23) { e23 && po(t2); } }; } function BS(e22) { var t2, n2, r2, i2, o2 = [DS, RS, IS], a2 = []; function s2(e23, t3) { return e23[3].separator === true ? 0 : e23[3].space === true ? 1 : 2; } return t2 = s2(e22), n2 = a2[t2] = o2[t2](e22), { c: function() { n2.c(), r2 = wo(); }, m: function(e23, n3) { a2[t2].m(e23, n3), vo(e23, r2, n3), i2 = true; }, p: function(e23, i3) { var u2 = t2; (t2 = s2(e23)) === u2 ? a2[t2].p(e23, i3) : (ma(), ba(a2[u2], 1, 1, function() { a2[u2] = null; }), ga(), (n2 = a2[t2]) ? n2.p(e23, i3) : (n2 = a2[t2] = o2[t2](e23)).c(), ya(n2, 1), n2.m(r2.parentNode, r2)); }, i: function(e23) { i2 || (ya(n2), i2 = true); }, o: function(e23) { ba(n2), i2 = false; }, d: function(e23) { a2[t2].d(e23), e23 && po(r2); } }; } function qS(e22) { for (var t2, n2, r2, i2, o2 = e22[2].left, a2 = Gi(o2, e22, e22[1], TS), s2 = e22[0], u2 = [], c2 = 0; c2 < s2.length; c2 += 1) u2[c2] = BS(PS(e22, s2, c2)); var l2 = function(e23) { return ba(u2[e23], 1, 1, function() { u2[e23] = null; }); }, f2 = e22[2].right, h2 = Gi(f2, e22, e22[1], ES); return { c: function() { t2 = go("div"), a2 && a2.c(), n2 = ko(); for (var e23 = 0; e23 < u2.length; e23 += 1) u2[e23].c(); r2 = ko(), h2 && h2.c(), So(t2, "class", "jse-menu svelte-v4jelk"); }, m: function(e23, o3) { vo(e23, t2, o3), a2 && a2.m(t2, null), uo(t2, n2); for (var s3 = 0; s3 < u2.length; s3 += 1) u2[s3].m(t2, null); uo(t2, r2), h2 && h2.m(t2, null), i2 = true; }, p: function(e23, n3) { var c3 = ki(n3, 1)[0]; if (a2 && a2.p && (!i2 || 2 & c3) && Zi(a2, o2, e23, e23[1], i2 ? Yi(o2, e23[1], c3, NS) : Xi(e23[1]), TS), 1 & c3) { var d2; for (s2 = e23[0], d2 = 0; d2 < s2.length; d2 += 1) { var v2 = PS(e23, s2, d2); u2[d2] ? (u2[d2].p(v2, c3), ya(u2[d2], 1)) : (u2[d2] = BS(v2), u2[d2].c(), ya(u2[d2], 1), u2[d2].m(t2, r2)); } for (ma(), d2 = s2.length; d2 < u2.length; d2 += 1) l2(d2); ga(); } h2 && h2.p && (!i2 || 2 & c3) && Zi(h2, f2, e23, e23[1], i2 ? Yi(f2, e23[1], c3, MS) : Xi(e23[1]), ES); }, i: function(e23) { if (!i2) { ya(a2, e23); for (var t3 = 0; t3 < s2.length; t3 += 1) ya(u2[t3]); ya(h2, e23), i2 = true; } }, o: function(e23) { ba(a2, e23), u2 = u2.filter(Boolean); for (var t3 = 0; t3 < u2.length; t3 += 1) ba(u2[t3]); ba(h2, e23), i2 = false; }, d: function(e23) { e23 && po(t2), a2 && a2.d(e23), mo(u2, e23), h2 && h2.d(e23); } }; } function FS(e22, t2, n2) { var r2 = t2.$$slots, i2 = r2 === void 0 ? {} : r2, o2 = t2.$$scope, a2 = t2.items, s2 = a2 === void 0 ? [] : a2; return e22.$$set = function(e23) { "items" in e23 && n2(0, s2 = e23.items), "$$scope" in e23 && n2(1, o2 = e23.$$scope); }, [s2, o2, i2]; } var VS = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, FS, qS, Ki, { items: 0 }, AS), r2; } return zi(n2); }(); function HS(e22) { var t2, n2; return t2 = new VS({ props: { items: e22[0] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 1 & ki(n3, 1)[0] && (r2.items = e23[0]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function WS(e22, t2, n2) { var r2, i2, o2 = t2.readOnly, a2 = o2 !== void 0 && o2, s2 = t2.onFormat, u2 = t2.onCompact, c2 = t2.onSort, l2 = t2.onTransform, f2 = t2.onToggleSearch, h2 = t2.onUndo, d2 = t2.onRedo, v2 = t2.canUndo, p2 = t2.canRedo, m2 = t2.canFormat, g2 = t2.canCompact, y2 = t2.canSort, b2 = t2.canTransform, k2 = t2.onRenderMenu, w2 = k2 === void 0 ? Wu : k2; return e22.$$set = function(e23) { "readOnly" in e23 && n2(1, a2 = e23.readOnly), "onFormat" in e23 && n2(2, s2 = e23.onFormat), "onCompact" in e23 && n2(3, u2 = e23.onCompact), "onSort" in e23 && n2(4, c2 = e23.onSort), "onTransform" in e23 && n2(5, l2 = e23.onTransform), "onToggleSearch" in e23 && n2(6, f2 = e23.onToggleSearch), "onUndo" in e23 && n2(7, h2 = e23.onUndo), "onRedo" in e23 && n2(8, d2 = e23.onRedo), "canUndo" in e23 && n2(9, v2 = e23.canUndo), "canRedo" in e23 && n2(10, p2 = e23.canRedo), "canFormat" in e23 && n2(11, m2 = e23.canFormat), "canCompact" in e23 && n2(12, g2 = e23.canCompact), "canSort" in e23 && n2(13, y2 = e23.canSort), "canTransform" in e23 && n2(14, b2 = e23.canTransform), "onRenderMenu" in e23 && n2(15, w2 = e23.onRenderMenu); }, e22.$$.update = function() { 32766 & e22.$$.dirty && n2(16, r2 = a2 ? [{ space: true }] : [{ icon: $S, title: "Format JSON: add proper indentation and new lines (Ctrl+I)", className: "jse-format", onClick: s2, disabled: a2 || !m2 }, { icon: OS, title: "Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)", className: "jse-compact", onClick: u2, disabled: a2 || !g2 }, { separator: true }, { icon: rj, title: "Sort", className: "jse-sort", onClick: c2, disabled: a2 || !y2 }, { icon: gj, title: "Transform contents (filter, sort, project)", className: "jse-transform", onClick: l2, disabled: a2 || !b2 }, { icon: bj, title: "Search (Ctrl+F)", className: "jse-search", onClick: f2 }, { separator: true }, { icon: ij, title: "Undo (Ctrl+Z)", className: "jse-undo", onClick: h2, disabled: !v2 }, { icon: oj, title: "Redo (Ctrl+Shift+Z)", className: "jse-redo", onClick: d2, disabled: !p2 }, { space: true }]), 98304 & e22.$$.dirty && n2(0, i2 = w2("text", r2) || r2); }, [i2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2, b2, w2, r2]; } var JS = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, WS, HS, Ki, { readOnly: 1, onFormat: 2, onCompact: 3, onSort: 4, onTransform: 5, onToggleSearch: 6, onUndo: 7, onRedo: 8, canUndo: 9, canRedo: 10, canFormat: 11, canCompact: 12, canSort: 13, canTransform: 14, onRenderMenu: 15 }), r2; } return zi(n2); }(), US = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "lineAt", value: function(e23) { if (e23 < 0 || e23 > this.length) throw new RangeError("Invalid position ".concat(e23, " in document of length ").concat(this.length)); return this.lineInner(e23, false, 1, 0); } }, { key: "line", value: function(e23) { if (e23 < 1 || e23 > this.lines) throw new RangeError("Invalid line number ".concat(e23, " in ").concat(this.lines, "-line document")); return this.lineInner(e23, true, 1, 0); } }, { key: "replace", value: function(e23, t2, n2) { var r2 = []; return this.decompose(0, e23, r2, 2), n2.length && n2.decompose(0, n2.length, r2, 3), this.decompose(t2, this.length, r2, 1), GS.from(r2, this.length - (t2 - e23) + n2.length); } }, { key: "append", value: function(e23) { return this.replace(this.length, this.length, e23); } }, { key: "slice", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, n2 = []; return this.decompose(e23, t2, n2, 0), GS.from(n2, t2 - e23); } }, { key: "eq", value: function(e23) { if (e23 == this) return true; if (e23.length != this.length || e23.lines != this.lines) return false; for (var t2 = this.scanIdentical(e23, 1), n2 = this.length - this.scanIdentical(e23, -1), r2 = new XS(this), i2 = new XS(e23), o2 = t2, a2 = t2; ; ) { if (r2.next(o2), i2.next(o2), o2 = 0, r2.lineBreak != i2.lineBreak || r2.done != i2.done || r2.value != i2.value) return false; if (a2 += r2.value.length, r2.done || a2 >= n2) return true; } } }, { key: "iter", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1; return new XS(this, e23); } }, { key: "iterRange", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length; return new eC(this, e23, t2); } }, { key: "iterLines", value: function(e23, t2) { var n2; if (e23 == null) n2 = this.iter(); else { t2 == null && (t2 = this.lines + 1); var r2 = this.line(e23).from; n2 = this.iterRange(r2, Math.max(r2, t2 == this.lines + 1 ? this.length : t2 <= 1 ? 0 : this.line(t2 - 1).to)); } return new tC(n2); } }, { key: "toString", value: function() { return this.sliceString(0); } }, { key: "toJSON", value: function() { var e23 = []; return this.flatten(e23), e23; } }], [{ key: "of", value: function(t2) { if (t2.length == 0) throw new RangeError("A document must have at least one line"); return t2.length != 1 || t2[0] ? t2.length <= 32 ? new KS(t2) : GS.from(KS.split(t2, [])) : e22.empty; } }]), e22; }(), KS = function(e22) { _i(n2, US); var t2 = Oi(n2); function n2(e23) { var r2, i2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : QS(e23); return Ri(this, n2), (r2 = t2.call(this)).text = e23, r2.length = i2, r2; } return zi(n2, [{ key: "lines", get: function() { return this.text.length; } }, { key: "children", get: function() { return null; } }, { key: "lineInner", value: function(e23, t3, n3, r2) { for (var i2 = 0; ; i2++) { var o2 = this.text[i2], a2 = r2 + o2.length; if ((t3 ? n3 : a2) >= e23) return new nC(r2, a2, n3, o2); r2 = a2 + 1, n3++; } } }, { key: "decompose", value: function(e23, t3, r2, i2) { var o2 = e23 <= 0 && t3 >= this.length ? this : new n2(ZS(this.text, e23, t3), Math.min(t3, this.length) - Math.max(0, e23)); if (1 & i2) { var a2 = r2.pop(), s2 = YS(o2.text, a2.text.slice(), 0, o2.length); if (s2.length <= 32) r2.push(new n2(s2, a2.length + o2.length)); else { var u2 = s2.length >> 1; r2.push(new n2(s2.slice(0, u2)), new n2(s2.slice(u2))); } } else r2.push(o2); } }, { key: "replace", value: function(e23, t3, r2) { if (!(r2 instanceof n2)) return Si(Pi(n2.prototype), "replace", this).call(this, e23, t3, r2); var i2 = YS(this.text, YS(r2.text, ZS(this.text, 0, e23)), t3), o2 = this.length + r2.length - (t3 - e23); return i2.length <= 32 ? new n2(i2, o2) : GS.from(n2.split(i2, []), o2); } }, { key: "sliceString", value: function(e23) { for (var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, n3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n", r2 = "", i2 = 0, o2 = 0; i2 <= t3 && o2 < this.text.length; o2++) { var a2 = this.text[o2], s2 = i2 + a2.length; i2 > e23 && o2 && (r2 += n3), e23 < s2 && t3 > i2 && (r2 += a2.slice(Math.max(0, e23 - i2), t3 - i2)), i2 = s2 + 1; } return r2; } }, { key: "flatten", value: function(e23) { var t3, n3 = bi(this.text); try { for (n3.s(); !(t3 = n3.n()).done; ) { var r2 = t3.value; e23.push(r2); } } catch (e24) { n3.e(e24); } finally { n3.f(); } } }, { key: "scanIdentical", value: function() { return 0; } }], [{ key: "split", value: function(e23, t3) { var r2, i2 = [], o2 = -1, a2 = bi(e23); try { for (a2.s(); !(r2 = a2.n()).done; ) { var s2 = r2.value; i2.push(s2), o2 += s2.length + 1, i2.length == 32 && (t3.push(new n2(i2, o2)), i2 = [], o2 = -1); } } catch (e24) { a2.e(e24); } finally { a2.f(); } return o2 > -1 && t3.push(new n2(i2, o2)), t3; } }]), n2; }(), GS = function(e22) { _i(n2, US); var t2 = Oi(n2); function n2(e23, r2) { var i2; Ri(this, n2), (i2 = t2.call(this)).children = e23, i2.length = r2, i2.lines = 0; var o2, a2 = bi(e23); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; i2.lines += s2.lines; } } catch (e24) { a2.e(e24); } finally { a2.f(); } return i2; } return zi(n2, [{ key: "lineInner", value: function(e23, t3, n3, r2) { for (var i2 = 0; ; i2++) { var o2 = this.children[i2], a2 = r2 + o2.length, s2 = n3 + o2.lines - 1; if ((t3 ? s2 : a2) >= e23) return o2.lineInner(e23, t3, n3, r2); r2 = a2 + 1, n3 = s2 + 1; } } }, { key: "decompose", value: function(e23, t3, n3, r2) { for (var i2 = 0, o2 = 0; o2 <= t3 && i2 < this.children.length; i2++) { var a2 = this.children[i2], s2 = o2 + a2.length; if (e23 <= s2 && t3 >= o2) { var u2 = r2 & ((o2 <= e23 ? 1 : 0) | (s2 >= t3 ? 2 : 0)); o2 >= e23 && s2 <= t3 && !u2 ? n3.push(a2) : a2.decompose(e23 - o2, t3 - o2, n3, u2); } o2 = s2 + 1; } } }, { key: "replace", value: function(e23, t3, r2) { if (r2.lines < this.lines) for (var i2 = 0, o2 = 0; i2 < this.children.length; i2++) { var a2 = this.children[i2], s2 = o2 + a2.length; if (e23 >= o2 && t3 <= s2) { var u2 = a2.replace(e23 - o2, t3 - o2, r2), c2 = this.lines - a2.lines + u2.lines; if (u2.lines < c2 >> 4 && u2.lines > c2 >> 6) { var l2 = this.children.slice(); return l2[i2] = u2, new n2(l2, this.length - (t3 - e23) + r2.length); } return Si(Pi(n2.prototype), "replace", this).call(this, o2, s2, u2); } o2 = s2 + 1; } return Si(Pi(n2.prototype), "replace", this).call(this, e23, t3, r2); } }, { key: "sliceString", value: function(e23) { for (var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, n3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n", r2 = "", i2 = 0, o2 = 0; i2 < this.children.length && o2 <= t3; i2++) { var a2 = this.children[i2], s2 = o2 + a2.length; o2 > e23 && i2 && (r2 += n3), e23 < s2 && t3 > o2 && (r2 += a2.sliceString(e23 - o2, t3 - o2, n3)), o2 = s2 + 1; } return r2; } }, { key: "flatten", value: function(e23) { var t3, n3 = bi(this.children); try { for (n3.s(); !(t3 = n3.n()).done; ) { t3.value.flatten(e23); } } catch (e24) { n3.e(e24); } finally { n3.f(); } } }, { key: "scanIdentical", value: function(e23, t3) { if (!(e23 instanceof n2)) return 0; for (var r2 = 0, i2 = ki(t3 > 0 ? [0, 0, this.children.length, e23.children.length] : [this.children.length - 1, e23.children.length - 1, -1, -1], 4), o2 = i2[0], a2 = i2[1], s2 = i2[2], u2 = i2[3]; ; o2 += t3, a2 += t3) { if (o2 == s2 || a2 == u2) return r2; var c2 = this.children[o2], l2 = e23.children[a2]; if (c2 != l2) return r2 + c2.scanIdentical(l2, t3); r2 += c2.length + 1; } } }], [{ key: "from", value: function(e23) { var t3, r2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23.reduce(function(e24, t4) { return e24 + t4.length + 1; }, -1), i2 = 0, o2 = bi(e23); try { for (o2.s(); !(t3 = o2.n()).done; ) { var a2 = t3.value; i2 += a2.lines; } } catch (e24) { o2.e(e24); } finally { o2.f(); } if (i2 < 32) { var s2, u2 = [], c2 = bi(e23); try { for (c2.s(); !(s2 = c2.n()).done; ) { var l2 = s2.value; l2.flatten(u2); } } catch (e24) { c2.e(e24); } finally { c2.f(); } return new KS(u2, r2); } var f2 = Math.max(32, i2 >> 5), h2 = f2 << 1, d2 = f2 >> 1, v2 = [], p2 = 0, m2 = -1, g2 = []; function y2(e24) { var t4; if (e24.lines > h2 && e24 instanceof n2) { var r3, i3 = bi(e24.children); try { for (i3.s(); !(r3 = i3.n()).done; ) { y2(r3.value); } } catch (e25) { i3.e(e25); } finally { i3.f(); } } else e24.lines > d2 && (p2 > d2 || !p2) ? (b2(), v2.push(e24)) : e24 instanceof KS && p2 && (t4 = g2[g2.length - 1]) instanceof KS && e24.lines + t4.lines <= 32 ? (p2 += e24.lines, m2 += e24.length + 1, g2[g2.length - 1] = new KS(t4.text.concat(e24.text), t4.length + 1 + e24.length)) : (p2 + e24.lines > f2 && b2(), p2 += e24.lines, m2 += e24.length + 1, g2.push(e24)); } function b2() { p2 != 0 && (v2.push(g2.length == 1 ? g2[0] : n2.from(g2, m2)), m2 = -1, p2 = g2.length = 0); } var k2, w2 = bi(e23); try { for (w2.s(); !(k2 = w2.n()).done; ) { var x2 = k2.value; y2(x2); } } catch (e24) { w2.e(e24); } finally { w2.f(); } return b2(), v2.length == 1 ? v2[0] : new n2(v2, r2); } }]), n2; }(); function QS(e22) { var t2, n2 = -1, r2 = bi(e22); try { for (r2.s(); !(t2 = r2.n()).done; ) { n2 += t2.value.length + 1; } } catch (e23) { r2.e(e23); } finally { r2.f(); } return n2; } function YS(e22, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, r2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1e9, i2 = 0, o2 = 0, a2 = true; o2 < e22.length && i2 <= r2; o2++) { var s2 = e22[o2], u2 = i2 + s2.length; u2 >= n2 && (u2 > r2 && (s2 = s2.slice(0, r2 - i2)), i2 < n2 && (s2 = s2.slice(n2 - i2)), a2 ? (t2[t2.length - 1] += s2, a2 = false) : t2.push(s2)), i2 = u2 + 1; } return t2; } function ZS(e22, t2, n2) { return YS(e22, [""], t2, n2); } US.empty = new KS([""], 0); var XS = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; Ri(this, e22), this.dir = n2, this.done = false, this.lineBreak = false, this.value = "", this.nodes = [t2], this.offsets = [n2 > 0 ? 1 : (t2 instanceof KS ? t2.text.length : t2.children.length) << 1]; } return zi(e22, [{ key: "nextInner", value: function(e23, t2) { for (this.done = this.lineBreak = false; ; ) { var n2 = this.nodes.length - 1, r2 = this.nodes[n2], i2 = this.offsets[n2], o2 = i2 >> 1, a2 = r2 instanceof KS ? r2.text.length : r2.children.length; if (o2 == (t2 > 0 ? a2 : 0)) { if (n2 == 0) return this.done = true, this.value = "", this; t2 > 0 && this.offsets[n2 - 1]++, this.nodes.pop(), this.offsets.pop(); } else if ((1 & i2) == (t2 > 0 ? 0 : 1)) { if (this.offsets[n2] += t2, e23 == 0) return this.lineBreak = true, this.value = "\n", this; e23--; } else if (r2 instanceof KS) { var s2 = r2.text[o2 + (t2 < 0 ? -1 : 0)]; if (this.offsets[n2] += t2, s2.length > Math.max(0, e23)) return this.value = e23 == 0 ? s2 : t2 > 0 ? s2.slice(e23) : s2.slice(0, s2.length - e23), this; e23 -= s2.length; } else { var u2 = r2.children[o2 + (t2 < 0 ? -1 : 0)]; e23 > u2.length ? (e23 -= u2.length, this.offsets[n2] += t2) : (t2 < 0 && this.offsets[n2]--, this.nodes.push(u2), this.offsets.push(t2 > 0 ? 1 : (u2 instanceof KS ? u2.text.length : u2.children.length) << 1)); } } } }, { key: "next", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return e23 < 0 && (this.nextInner(-e23, -this.dir), e23 = this.value.length), this.nextInner(e23, this.dir); } }]), e22; }(), eC = function() { function e22(t2, n2, r2) { Ri(this, e22), this.value = "", this.done = false, this.cursor = new XS(t2, n2 > r2 ? -1 : 1), this.pos = n2 > r2 ? t2.length : 0, this.from = Math.min(n2, r2), this.to = Math.max(n2, r2); } return zi(e22, [{ key: "nextInner", value: function(e23, t2) { if (t2 < 0 ? this.pos <= this.from : this.pos >= this.to) return this.value = "", this.done = true, this; e23 += Math.max(0, t2 < 0 ? this.pos - this.to : this.from - this.pos); var n2 = t2 < 0 ? this.pos - this.from : this.to - this.pos; e23 > n2 && (e23 = n2), n2 -= e23; var r2 = this.cursor.next(e23).value; return this.pos += (r2.length + e23) * t2, this.value = r2.length <= n2 ? r2 : t2 < 0 ? r2.slice(r2.length - n2) : r2.slice(0, n2), this.done = !this.value, this; } }, { key: "next", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return e23 < 0 ? e23 = Math.max(e23, this.from - this.pos) : e23 > 0 && (e23 = Math.min(e23, this.to - this.pos)), this.nextInner(e23, this.cursor.dir); } }, { key: "lineBreak", get: function() { return this.cursor.lineBreak && this.value != ""; } }]), e22; }(), tC = function() { function e22(t2) { Ri(this, e22), this.inner = t2, this.afterBreak = true, this.value = "", this.done = false; } return zi(e22, [{ key: "next", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t2 = this.inner.next(e23), n2 = t2.done, r2 = t2.lineBreak, i2 = t2.value; return n2 ? (this.done = true, this.value = "") : r2 ? this.afterBreak ? this.value = "" : (this.afterBreak = true, this.next()) : (this.value = i2, this.afterBreak = false), this; } }, { key: "lineBreak", get: function() { return false; } }]), e22; }(); typeof Symbol != "undefined" && (US.prototype[Symbol.iterator] = function() { return this.iter(); }, XS.prototype[Symbol.iterator] = eC.prototype[Symbol.iterator] = tC.prototype[Symbol.iterator] = function() { return this; }); for (var nC = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.from = t2, this.to = n2, this.number = r2, this.text = i2; } return zi(e22, [{ key: "length", get: function() { return this.to - this.from; } }]), e22; }(), rC = "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(function(e22) { return e22 ? parseInt(e22, 36) : 1; }), iC = 1; iC < rC.length; iC++) rC[iC] += rC[iC - 1]; function oC(e22) { for (var t2 = 1; t2 < rC.length; t2 += 2) if (rC[t2] > e22) return rC[t2 - 1] <= e22; return false; } function aC(e22) { return e22 >= 127462 && e22 <= 127487; } function sC(e22, t2) { var n2 = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], r2 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3]; return (n2 ? uC : cC)(e22, t2, r2); } function uC(e22, t2, n2) { if (t2 == e22.length) return t2; t2 && lC(e22.charCodeAt(t2)) && fC(e22.charCodeAt(t2 - 1)) && t2--; var r2 = hC(e22, t2); for (t2 += vC(r2); t2 < e22.length; ) { var i2 = hC(e22, t2); if (r2 == 8205 || i2 == 8205 || n2 && oC(i2)) t2 += vC(i2), r2 = i2; else { if (!aC(i2)) break; for (var o2 = 0, a2 = t2 - 2; a2 >= 0 && aC(hC(e22, a2)); ) o2++, a2 -= 2; if (o2 % 2 == 0) break; t2 += 2; } } return t2; } function cC(e22, t2, n2) { for (; t2 > 0; ) { var r2 = uC(e22, t2 - 2, n2); if (r2 < t2) return r2; t2--; } return 0; } function lC(e22) { return e22 >= 56320 && e22 < 57344; } function fC(e22) { return e22 >= 55296 && e22 < 56320; } function hC(e22, t2) { var n2 = e22.charCodeAt(t2); if (!fC(n2) || t2 + 1 == e22.length) return n2; var r2 = e22.charCodeAt(t2 + 1); return lC(r2) ? r2 - 56320 + (n2 - 55296 << 10) + 65536 : n2; } function dC(e22) { return e22 <= 65535 ? String.fromCharCode(e22) : (e22 -= 65536, String.fromCharCode(55296 + (e22 >> 10), 56320 + (1023 & e22))); } function vC(e22) { return e22 < 65536 ? 1 : 2; } var pC = /\r\n?|\n/, mC = function(e22) { return e22[e22.Simple = 0] = "Simple", e22[e22.TrackDel = 1] = "TrackDel", e22[e22.TrackBefore = 2] = "TrackBefore", e22[e22.TrackAfter = 3] = "TrackAfter", e22; }(mC || (mC = {})), gC = function() { function e22(t2) { Ri(this, e22), this.sections = t2; } return zi(e22, [{ key: "length", get: function() { for (var e23 = 0, t2 = 0; t2 < this.sections.length; t2 += 2) e23 += this.sections[t2]; return e23; } }, { key: "newLength", get: function() { for (var e23 = 0, t2 = 0; t2 < this.sections.length; t2 += 2) { var n2 = this.sections[t2 + 1]; e23 += n2 < 0 ? this.sections[t2] : n2; } return e23; } }, { key: "empty", get: function() { return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0; } }, { key: "iterGaps", value: function(e23) { for (var t2 = 0, n2 = 0, r2 = 0; t2 < this.sections.length; ) { var i2 = this.sections[t2++], o2 = this.sections[t2++]; o2 < 0 ? (e23(n2, r2, i2), r2 += i2) : r2 += o2, n2 += i2; } } }, { key: "iterChangedRanges", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; wC(this, e23, t2); } }, { key: "invertedDesc", get: function() { for (var t2 = [], n2 = 0; n2 < this.sections.length; ) { var r2 = this.sections[n2++], i2 = this.sections[n2++]; i2 < 0 ? t2.push(r2, i2) : t2.push(i2, r2); } return new e22(t2); } }, { key: "composeDesc", value: function(e23) { return this.empty ? e23 : e23.empty ? this : jC(this, e23); } }, { key: "mapDesc", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; return e23.empty ? this : xC(this, e23, t2); } }, { key: "mapPos", value: function(e23) { for (var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : mC.Simple, r2 = 0, i2 = 0, o2 = 0; o2 < this.sections.length; ) { var a2 = this.sections[o2++], s2 = this.sections[o2++], u2 = r2 + a2; if (s2 < 0) { if (u2 > e23) return i2 + (e23 - r2); i2 += a2; } else { if (n2 != mC.Simple && u2 >= e23 && (n2 == mC.TrackDel && r2 < e23 && u2 > e23 || n2 == mC.TrackBefore && r2 < e23 || n2 == mC.TrackAfter && u2 > e23)) return null; if (u2 > e23 || u2 == e23 && t2 < 0 && !a2) return e23 == r2 || t2 < 0 ? i2 : i2 + s2; i2 += s2; } r2 = u2; } if (e23 > r2) throw new RangeError("Position ".concat(e23, " is out of range for changeset of length ").concat(r2)); return i2; } }, { key: "touchesRange", value: function(e23) { for (var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23, n2 = 0, r2 = 0; n2 < this.sections.length && r2 <= t2; ) { var i2 = this.sections[n2++], o2 = this.sections[n2++], a2 = r2 + i2; if (o2 >= 0 && r2 <= t2 && a2 >= e23) return !(r2 < e23 && a2 > t2) || "cover"; r2 = a2; } return false; } }, { key: "toString", value: function() { for (var e23 = "", t2 = 0; t2 < this.sections.length; ) { var n2 = this.sections[t2++], r2 = this.sections[t2++]; e23 += (e23 ? " " : "") + n2 + (r2 >= 0 ? ":" + r2 : ""); } return e23; } }, { key: "toJSON", value: function() { return this.sections; } }], [{ key: "fromJSON", value: function(t2) { if (!Array.isArray(t2) || t2.length % 2 || t2.some(function(e23) { return typeof e23 != "number"; })) throw new RangeError("Invalid JSON representation of ChangeDesc"); return new e22(t2); } }, { key: "create", value: function(t2) { return new e22(t2); } }]), e22; }(), yC = function(e22) { _i(n2, gC); var t2 = Oi(n2); function n2(e23, r2) { var i2; return Ri(this, n2), (i2 = t2.call(this, e23)).inserted = r2, i2; } return zi(n2, [{ key: "apply", value: function(e23) { if (this.length != e23.length) throw new RangeError("Applying change set to a document with the wrong length"); return wC(this, function(t3, n3, r2, i2, o2) { return e23 = e23.replace(r2, r2 + (n3 - t3), o2); }, false), e23; } }, { key: "mapDesc", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; return xC(this, e23, t3, true); } }, { key: "invert", value: function(e23) { for (var t3 = this.sections.slice(), r2 = [], i2 = 0, o2 = 0; i2 < t3.length; i2 += 2) { var a2 = t3[i2], s2 = t3[i2 + 1]; if (s2 >= 0) { t3[i2] = s2, t3[i2 + 1] = a2; for (var u2 = i2 >> 1; r2.length < u2; ) r2.push(US.empty); r2.push(a2 ? e23.slice(o2, o2 + a2) : US.empty); } o2 += a2; } return new n2(t3, r2); } }, { key: "compose", value: function(e23) { return this.empty ? e23 : e23.empty ? this : jC(this, e23, true); } }, { key: "map", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; return e23.empty ? this : xC(this, e23, t3, true); } }, { key: "iterChanges", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; wC(this, e23, t3); } }, { key: "desc", get: function() { return gC.create(this.sections); } }, { key: "filter", value: function(e23) { var t3 = [], r2 = [], i2 = [], o2 = new SC(this); e: for (var a2 = 0, s2 = 0; ; ) { for (var u2 = a2 == e23.length ? 1e9 : e23[a2++]; s2 < u2 || s2 == u2 && o2.len == 0; ) { if (o2.done) break e; var c2 = Math.min(o2.len, u2 - s2); bC(i2, c2, -1); var l2 = o2.ins == -1 ? -1 : o2.off == 0 ? o2.ins : 0; bC(t3, c2, l2), l2 > 0 && kC(r2, t3, o2.text), o2.forward(c2), s2 += c2; } for (var f2 = e23[a2++]; s2 < f2; ) { if (o2.done) break e; var h2 = Math.min(o2.len, f2 - s2); bC(t3, h2, -1), bC(i2, h2, o2.ins == -1 ? -1 : o2.off == 0 ? o2.ins : 0), o2.forward(h2), s2 += h2; } } return { changes: new n2(t3, r2), filtered: gC.create(i2) }; } }, { key: "toJSON", value: function() { for (var e23 = [], t3 = 0; t3 < this.sections.length; t3 += 2) { var n3 = this.sections[t3], r2 = this.sections[t3 + 1]; r2 < 0 ? e23.push(n3) : r2 == 0 ? e23.push([n3]) : e23.push([n3].concat(this.inserted[t3 >> 1].toJSON())); } return e23; } }], [{ key: "of", value: function(e23, t3, r2) { var i2 = [], o2 = [], a2 = 0, s2 = null; function u2() { var e24 = arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; if (e24 || i2.length) { a2 < t3 && bC(i2, t3 - a2, -1); var r3 = new n2(i2, o2); s2 = s2 ? s2.compose(r3.map(s2)) : r3, i2 = [], o2 = [], a2 = 0; } } return function e24(c2) { if (Array.isArray(c2)) { var l2, f2 = bi(c2); try { for (f2.s(); !(l2 = f2.n()).done; ) { e24(l2.value); } } catch (e25) { f2.e(e25); } finally { f2.f(); } } else if (c2 instanceof n2) { if (c2.length != t3) throw new RangeError("Mismatched change set length (got ".concat(c2.length, ", expected ").concat(t3, ")")); u2(), s2 = s2 ? s2.compose(c2.map(s2)) : c2; } else { var h2 = c2.from, d2 = c2.to, v2 = d2 === void 0 ? h2 : d2, p2 = c2.insert; if (h2 > v2 || h2 < 0 || v2 > t3) throw new RangeError("Invalid change range ".concat(h2, " to ").concat(v2, " (in doc of length ").concat(t3, ")")); var m2 = p2 ? typeof p2 == "string" ? US.of(p2.split(r2 || pC)) : p2 : US.empty, g2 = m2.length; if (h2 == v2 && g2 == 0) return; h2 < a2 && u2(), h2 > a2 && bC(i2, h2 - a2, -1), bC(i2, v2 - h2, g2), kC(o2, i2, m2), a2 = v2; } }(e23), u2(!s2), s2; } }, { key: "empty", value: function(e23) { return new n2(e23 ? [e23, -1] : [], []); } }, { key: "fromJSON", value: function(e23) { if (!Array.isArray(e23)) throw new RangeError("Invalid JSON representation of ChangeSet"); for (var t3 = [], r2 = [], i2 = 0; i2 < e23.length; i2++) { var o2 = e23[i2]; if (typeof o2 == "number") t3.push(o2, -1); else { if (!Array.isArray(o2) || typeof o2[0] != "number" || o2.some(function(e24, t4) { return t4 && typeof e24 != "string"; })) throw new RangeError("Invalid JSON representation of ChangeSet"); if (o2.length == 1) t3.push(o2[0], 0); else { for (; r2.length < i2; ) r2.push(US.empty); r2[i2] = US.of(o2.slice(1)), t3.push(o2[0], r2[i2].length); } } } return new n2(t3, r2); } }, { key: "createSet", value: function(e23, t3) { return new n2(e23, t3); } }]), n2; }(); function bC(e22, t2, n2) { var r2 = arguments.length > 3 && arguments[3] !== void 0 && arguments[3]; if (!(t2 == 0 && n2 <= 0)) { var i2 = e22.length - 2; i2 >= 0 && n2 <= 0 && n2 == e22[i2 + 1] ? e22[i2] += t2 : t2 == 0 && e22[i2] == 0 ? e22[i2 + 1] += n2 : r2 ? (e22[i2] += t2, e22[i2 + 1] += n2) : e22.push(t2, n2); } } function kC(e22, t2, n2) { if (n2.length != 0) { var r2 = t2.length - 2 >> 1; if (r2 < e22.length) e22[e22.length - 1] = e22[e22.length - 1].append(n2); else { for (; e22.length < r2; ) e22.push(US.empty); e22.push(n2); } } } function wC(e22, t2, n2) { for (var r2 = e22.inserted, i2 = 0, o2 = 0, a2 = 0; a2 < e22.sections.length; ) { var s2 = e22.sections[a2++], u2 = e22.sections[a2++]; if (u2 < 0) i2 += s2, o2 += s2; else { for (var c2 = i2, l2 = o2, f2 = US.empty; c2 += s2, l2 += u2, u2 && r2 && (f2 = f2.append(r2[a2 - 2 >> 1])), !(n2 || a2 == e22.sections.length || e22.sections[a2 + 1] < 0); ) s2 = e22.sections[a2++], u2 = e22.sections[a2++]; t2(i2, c2, o2, l2, f2), i2 = c2, o2 = l2; } } } function xC(e22, t2, n2) { for (var r2 = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i2 = [], o2 = r2 ? [] : null, a2 = new SC(e22), s2 = new SC(t2), u2 = -1; ; ) if (a2.ins == -1 && s2.ins == -1) { var c2 = Math.min(a2.len, s2.len); bC(i2, c2, -1), a2.forward(c2), s2.forward(c2); } else if (s2.ins >= 0 && (a2.ins < 0 || u2 == a2.i || a2.off == 0 && (s2.len < a2.len || s2.len == a2.len && !n2))) { var l2 = s2.len; for (bC(i2, s2.ins, -1); l2; ) { var f2 = Math.min(a2.len, l2); a2.ins >= 0 && u2 < a2.i && a2.len <= f2 && (bC(i2, 0, a2.ins), o2 && kC(o2, i2, a2.text), u2 = a2.i), a2.forward(f2), l2 -= f2; } s2.next(); } else { if (!(a2.ins >= 0)) { if (a2.done && s2.done) return o2 ? yC.createSet(i2, o2) : gC.create(i2); throw new Error("Mismatched change set lengths"); } for (var h2 = 0, d2 = a2.len; d2; ) if (s2.ins == -1) { var v2 = Math.min(d2, s2.len); h2 += v2, d2 -= v2, s2.forward(v2); } else { if (!(s2.ins == 0 && s2.len < d2)) break; d2 -= s2.len, s2.next(); } bC(i2, h2, u2 < a2.i ? a2.ins : 0), o2 && u2 < a2.i && kC(o2, i2, a2.text), u2 = a2.i, a2.forward(a2.len - d2); } } function jC(e22, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r2 = [], i2 = n2 ? [] : null, o2 = new SC(e22), a2 = new SC(t2), s2 = false; ; ) { if (o2.done && a2.done) return i2 ? yC.createSet(r2, i2) : gC.create(r2); if (o2.ins == 0) bC(r2, o2.len, 0, s2), o2.next(); else if (a2.len != 0 || a2.done) { if (o2.done || a2.done) throw new Error("Mismatched change set lengths"); var u2 = Math.min(o2.len2, a2.len), c2 = r2.length; if (o2.ins == -1) { var l2 = a2.ins == -1 ? -1 : a2.off ? 0 : a2.ins; bC(r2, u2, l2, s2), i2 && l2 && kC(i2, r2, a2.text); } else a2.ins == -1 ? (bC(r2, o2.off ? 0 : o2.len, u2, s2), i2 && kC(i2, r2, o2.textBit(u2))) : (bC(r2, o2.off ? 0 : o2.len, a2.off ? 0 : a2.ins, s2), i2 && !a2.off && kC(i2, r2, a2.text)); s2 = (o2.ins > u2 || a2.ins >= 0 && a2.len > u2) && (s2 || r2.length > c2), o2.forward2(u2), a2.forward(u2); } else bC(r2, 0, a2.ins, s2), i2 && kC(i2, r2, a2.text), a2.next(); } } var SC = function() { function e22(t2) { Ri(this, e22), this.set = t2, this.i = 0, this.next(); } return zi(e22, [{ key: "next", value: function() { var e23 = this.set.sections; this.i < e23.length ? (this.len = e23[this.i++], this.ins = e23[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0; } }, { key: "done", get: function() { return this.ins == -2; } }, { key: "len2", get: function() { return this.ins < 0 ? this.len : this.ins; } }, { key: "text", get: function() { var e23 = this.set.inserted, t2 = this.i - 2 >> 1; return t2 >= e23.length ? US.empty : e23[t2]; } }, { key: "textBit", value: function(e23) { var t2 = this.set.inserted, n2 = this.i - 2 >> 1; return n2 >= t2.length && !e23 ? US.empty : t2[n2].slice(this.off, e23 == null ? void 0 : this.off + e23); } }, { key: "forward", value: function(e23) { e23 == this.len ? this.next() : (this.len -= e23, this.off += e23); } }, { key: "forward2", value: function(e23) { this.ins == -1 ? this.forward(e23) : e23 == this.ins ? this.next() : (this.ins -= e23, this.off += e23); } }]), e22; }(), CC = function() { function e22(t2, n2, r2) { Ri(this, e22), this.from = t2, this.to = n2, this.flags = r2; } return zi(e22, [{ key: "anchor", get: function() { return 16 & this.flags ? this.to : this.from; } }, { key: "head", get: function() { return 16 & this.flags ? this.from : this.to; } }, { key: "empty", get: function() { return this.from == this.to; } }, { key: "assoc", get: function() { return 4 & this.flags ? -1 : 8 & this.flags ? 1 : 0; } }, { key: "bidiLevel", get: function() { var e23 = 3 & this.flags; return e23 == 3 ? null : e23; } }, { key: "goalColumn", get: function() { var e23 = this.flags >> 5; return e23 == 33554431 ? void 0 : e23; } }, { key: "map", value: function(t2) { var n2, r2, i2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1; return this.empty ? n2 = r2 = t2.mapPos(this.from, i2) : (n2 = t2.mapPos(this.from, 1), r2 = t2.mapPos(this.to, -1)), n2 == this.from && r2 == this.to ? this : new e22(n2, r2, this.flags); } }, { key: "extend", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23; if (e23 <= this.anchor && t2 >= this.anchor) return _C.range(e23, t2); var n2 = Math.abs(e23 - this.anchor) > Math.abs(t2 - this.anchor) ? e23 : t2; return _C.range(this.anchor, n2); } }, { key: "eq", value: function(e23) { return this.anchor == e23.anchor && this.head == e23.head; } }, { key: "toJSON", value: function() { return { anchor: this.anchor, head: this.head }; } }], [{ key: "fromJSON", value: function(e23) { if (!e23 || typeof e23.anchor != "number" || typeof e23.head != "number") throw new RangeError("Invalid JSON representation for SelectionRange"); return _C.range(e23.anchor, e23.head); } }, { key: "create", value: function(t2, n2, r2) { return new e22(t2, n2, r2); } }]), e22; }(), _C = function() { function e22(t2, n2) { Ri(this, e22), this.ranges = t2, this.mainIndex = n2; } return zi(e22, [{ key: "map", value: function(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1; return t2.empty ? this : e22.create(this.ranges.map(function(e23) { return e23.map(t2, n2); }), this.mainIndex); } }, { key: "eq", value: function(e23) { if (this.ranges.length != e23.ranges.length || this.mainIndex != e23.mainIndex) return false; for (var t2 = 0; t2 < this.ranges.length; t2++) if (!this.ranges[t2].eq(e23.ranges[t2])) return false; return true; } }, { key: "main", get: function() { return this.ranges[this.mainIndex]; } }, { key: "asSingle", value: function() { return this.ranges.length == 1 ? this : new e22([this.main], 0); } }, { key: "addRange", value: function(t2) { var n2 = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1]; return e22.create([t2].concat(this.ranges), n2 ? 0 : this.mainIndex + 1); } }, { key: "replaceRange", value: function(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.mainIndex, r2 = this.ranges.slice(); return r2[n2] = t2, e22.create(r2, this.mainIndex); } }, { key: "toJSON", value: function() { return { ranges: this.ranges.map(function(e23) { return e23.toJSON(); }), main: this.mainIndex }; } }], [{ key: "fromJSON", value: function(t2) { if (!t2 || !Array.isArray(t2.ranges) || typeof t2.main != "number" || t2.main >= t2.ranges.length) throw new RangeError("Invalid JSON representation for EditorSelection"); return new e22(t2.ranges.map(function(e23) { return CC.fromJSON(e23); }), t2.main); } }, { key: "single", value: function(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t2; return new e22([e22.range(t2, n2)], 0); } }, { key: "create", value: function(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (t2.length == 0) throw new RangeError("A selection needs at least one range"); for (var r2 = 0, i2 = 0; i2 < t2.length; i2++) { var o2 = t2[i2]; if (o2.empty ? o2.from <= r2 : o2.from < r2) return e22.normalized(t2.slice(), n2); r2 = o2.to; } return new e22(t2, n2); } }, { key: "cursor", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = arguments.length > 2 ? arguments[2] : void 0, r2 = arguments.length > 3 ? arguments[3] : void 0; return CC.create(e23, e23, (t2 == 0 ? 0 : t2 < 0 ? 4 : 8) | (n2 == null ? 3 : Math.min(2, n2)) | (r2 != null ? r2 : 33554431) << 5); } }, { key: "range", value: function(e23, t2, n2) { var r2 = (n2 != null ? n2 : 33554431) << 5; return t2 < e23 ? CC.create(t2, e23, 24 | r2) : CC.create(e23, t2, r2 | (t2 > e23 ? 4 : 0)); } }, { key: "normalized", value: function(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r2 = t2[n2]; t2.sort(function(e23, t3) { return e23.from - t3.from; }), n2 = t2.indexOf(r2); for (var i2 = 1; i2 < t2.length; i2++) { var o2 = t2[i2], a2 = t2[i2 - 1]; if (o2.empty ? o2.from <= a2.to : o2.from < a2.to) { var s2 = a2.from, u2 = Math.max(o2.to, a2.to); i2 <= n2 && n2--, t2.splice(--i2, 2, o2.anchor > o2.head ? e22.range(u2, s2) : e22.range(s2, u2)); } } return new e22(t2, n2); } }]), e22; }(); function $C(e22, t2) { var n2, r2 = bi(e22.ranges); try { for (r2.s(); !(n2 = r2.n()).done; ) { if (n2.value.to > t2) throw new RangeError("Selection points outside of document"); } } catch (e23) { r2.e(e23); } finally { r2.f(); } } var OC = 0, AC = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.combine = t2, this.compareInput = n2, this.compare = r2, this.isStatic = i2, this.id = OC++, this.default = t2([]), this.extensions = typeof o2 == "function" ? o2(this) : o2; } return zi(e22, [{ key: "of", value: function(e23) { return new EC([], this, 0, e23); } }, { key: "compute", value: function(e23, t2) { if (this.isStatic) throw new Error("Can't compute a static facet"); return new EC(e23, this, 1, t2); } }, { key: "computeN", value: function(e23, t2) { if (this.isStatic) throw new Error("Can't compute a static facet"); return new EC(e23, this, 2, t2); } }, { key: "from", value: function(e23, t2) { return t2 || (t2 = function(e24) { return e24; }), this.compute([e23], function(n2) { return t2(n2.field(e23)); }); } }], [{ key: "define", value: function() { var t2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return new e22(t2.combine || function(e23) { return e23; }, t2.compareInput || function(e23, t3) { return e23 === t3; }, t2.compare || (t2.combine ? function(e23, t3) { return e23 === t3; } : MC), !!t2.static, t2.enables); } }]), e22; }(); function MC(e22, t2) { return e22 == t2 || e22.length == t2.length && e22.every(function(e23, n2) { return e23 === t2[n2]; }); } var EC = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.dependencies = t2, this.facet = n2, this.type = r2, this.value = i2, this.id = OC++; } return zi(e22, [{ key: "dynamicSlot", value: function(e23) { var t2, n2, r2 = this, i2 = this.value, o2 = this.facet.compareInput, a2 = this.id, s2 = e23[a2] >> 1, u2 = this.type == 2, c2 = false, l2 = false, f2 = [], h2 = bi(this.dependencies); try { for (h2.s(); !(n2 = h2.n()).done; ) { var d2 = n2.value; d2 == "doc" ? c2 = true : d2 == "selection" ? l2 = true : (1 & ((t2 = e23[d2.id]) !== null && t2 !== void 0 ? t2 : 1)) == 0 && f2.push(e23[d2.id]); } } catch (e24) { h2.e(e24); } finally { h2.f(); } return { create: function(e24) { return e24.values[s2] = i2(e24), 1; }, update: function(e24, t3) { if (c2 && t3.docChanged || l2 && (t3.docChanged || t3.selection) || NC(e24, f2)) { var n3 = i2(e24); if (u2 ? !PC(n3, e24.values[s2], o2) : !o2(n3, e24.values[s2])) return e24.values[s2] = n3, 1; } return 0; }, reconfigure: function(e24, t3) { var n3 = i2(e24), c3 = t3.config.address[a2]; if (c3 != null) { var l3 = UC(t3, c3); if (r2.dependencies.every(function(n4) { return n4 instanceof AC ? t3.facet(n4) === e24.facet(n4) : !(n4 instanceof IC) || t3.field(n4, false) == e24.field(n4, false); }) || (u2 ? PC(n3, l3, o2) : o2(n3, l3))) return e24.values[s2] = l3, 0; } return e24.values[s2] = n3, 1; } }; } }]), e22; }(); function PC(e22, t2, n2) { if (e22.length != t2.length) return false; for (var r2 = 0; r2 < e22.length; r2++) if (!n2(e22[r2], t2[r2])) return false; return true; } function NC(e22, t2) { var n2, r2 = false, i2 = bi(t2); try { for (i2.s(); !(n2 = i2.n()).done; ) { 1 & JC(e22, n2.value) && (r2 = true); } } catch (e23) { i2.e(e23); } finally { i2.f(); } return r2; } var TC = AC.define({ static: true }), IC = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.id = t2, this.createF = n2, this.updateF = r2, this.compareF = i2, this.spec = o2, this.provides = void 0; } return zi(e22, [{ key: "create", value: function(e23) { var t2 = this, n2 = e23.facet(TC).find(function(e24) { return e24.field == t2; }); return ((n2 == null ? void 0 : n2.create) || this.createF)(e23); } }, { key: "slot", value: function(e23) { var t2 = this, n2 = e23[this.id] >> 1; return { create: function(e24) { return e24.values[n2] = t2.create(e24), 1; }, update: function(e24, r2) { var i2 = e24.values[n2], o2 = t2.updateF(i2, r2); return t2.compareF(i2, o2) ? 0 : (e24.values[n2] = o2, 1); }, reconfigure: function(e24, r2) { return r2.config.address[t2.id] != null ? (e24.values[n2] = r2.field(t2), 0) : (e24.values[n2] = t2.create(e24), 1); } }; } }, { key: "init", value: function(e23) { return [this, TC.of({ field: this, create: e23 })]; } }, { key: "extension", get: function() { return this; } }], [{ key: "define", value: function(t2) { var n2 = new e22(OC++, t2.create, t2.update, t2.compare || function(e23, t3) { return e23 === t3; }, t2); return t2.provide && (n2.provides = t2.provide(n2)), n2; } }]), e22; }(), RC = 4, DC = 3, zC = 2, LC = 1; function BC(e22) { return function(t2) { return new FC(t2, e22); }; } var qC = { highest: BC(0), high: BC(LC), default: BC(zC), low: BC(DC), lowest: BC(RC) }, FC = zi(function e2(t2, n2) { Ri(this, e2), this.inner = t2, this.prec = n2; }), VC = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "of", value: function(e23) { return new HC(this, e23); } }, { key: "reconfigure", value: function(t2) { return e22.reconfigure.of({ compartment: this, extension: t2 }); } }, { key: "get", value: function(e23) { return e23.config.compartments.get(this); } }]), e22; }(), HC = zi(function e3(t2, n2) { Ri(this, e3), this.compartment = t2, this.inner = n2; }), WC = function() { function e22(t2, n2, r2, i2, o2, a2) { for (Ri(this, e22), this.base = t2, this.compartments = n2, this.dynamicSlots = r2, this.address = i2, this.staticValues = o2, this.facets = a2, this.statusTemplate = []; this.statusTemplate.length < r2.length; ) this.statusTemplate.push(0); } return zi(e22, [{ key: "staticFacet", value: function(e23) { var t2 = this.address[e23.id]; return t2 == null ? e23.default : this.staticValues[t2 >> 1]; } }], [{ key: "resolve", value: function(t2, n2, r2) { var i2, o2 = [], a2 = /* @__PURE__ */ Object.create(null), s2 = /* @__PURE__ */ new Map(), u2 = bi(function(e23, t3, n3) { var r3 = [[], [], [], [], []], i3 = /* @__PURE__ */ new Map(); function o3(e24, a3) { var s3 = i3.get(e24); if (s3 != null) { if (s3 <= a3) return; var u3 = r3[s3].indexOf(e24); u3 > -1 && r3[s3].splice(u3, 1), e24 instanceof HC && n3.delete(e24.compartment); } if (i3.set(e24, a3), Array.isArray(e24)) { var c3, l3 = bi(e24); try { for (l3.s(); !(c3 = l3.n()).done; ) { o3(c3.value, a3); } } catch (e25) { l3.e(e25); } finally { l3.f(); } } else if (e24 instanceof HC) { if (n3.has(e24.compartment)) throw new RangeError("Duplicate use of compartment in extensions"); var f3 = t3.get(e24.compartment) || e24.inner; n3.set(e24.compartment, f3), o3(f3, a3); } else if (e24 instanceof FC) o3(e24.inner, e24.prec); else if (e24 instanceof IC) r3[a3].push(e24), e24.provides && o3(e24.provides, a3); else if (e24 instanceof EC) r3[a3].push(e24), e24.facet.extensions && o3(e24.facet.extensions, a3); else { var h3 = e24.extension; if (!h3) throw new Error("Unrecognized extension value in extension set (".concat(e24, "). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.")); o3(h3, a3); } } return o3(e23, zC), r3.reduce(function(e24, t4) { return e24.concat(t4); }); }(t2, n2, s2)); try { for (u2.s(); !(i2 = u2.n()).done; ) { var c2 = i2.value; c2 instanceof IC ? o2.push(c2) : (a2[c2.facet.id] || (a2[c2.facet.id] = [])).push(c2); } } catch (e23) { u2.e(e23); } finally { u2.f(); } for (var l2 = /* @__PURE__ */ Object.create(null), f2 = [], h2 = [], d2 = function() { var e23 = p2[v2]; l2[e23.id] = h2.length << 1, h2.push(function(t3) { return e23.slot(t3); }); }, v2 = 0, p2 = o2; v2 < p2.length; v2++) d2(); var m2 = r2 == null ? void 0 : r2.config.facets, g2 = function(e23) { var t3 = a2[e23], n3 = t3[0].facet, i3 = m2 && m2[e23] || []; if (t3.every(function(e24) { return e24.type == 0; })) if (l2[n3.id] = f2.length << 1 | 1, MC(i3, t3)) f2.push(r2.facet(n3)); else { var o3 = n3.combine(t3.map(function(e24) { return e24.value; })); f2.push(r2 && n3.compare(o3, r2.facet(n3)) ? r2.facet(n3) : o3); } else { var s3, u3 = bi(t3); try { var c3 = function() { var e24 = s3.value; e24.type == 0 ? (l2[e24.id] = f2.length << 1 | 1, f2.push(e24.value)) : (l2[e24.id] = h2.length << 1, h2.push(function(t4) { return e24.dynamicSlot(t4); })); }; for (u3.s(); !(s3 = u3.n()).done; ) c3(); } catch (e24) { u3.e(e24); } finally { u3.f(); } l2[n3.id] = h2.length << 1, h2.push(function(e24) { return function(e25, t4, n4) { var r3 = n4.map(function(t5) { return e25[t5.id]; }), i4 = n4.map(function(e26) { return e26.type; }), o4 = r3.filter(function(e26) { return !(1 & e26); }), a3 = e25[t4.id] >> 1; function s4(e26) { for (var n5 = [], o5 = 0; o5 < r3.length; o5++) { var a4 = UC(e26, r3[o5]); if (i4[o5] == 2) { var s5, u4 = bi(a4); try { for (u4.s(); !(s5 = u4.n()).done; ) { var c4 = s5.value; n5.push(c4); } } catch (e27) { u4.e(e27); } finally { u4.f(); } } else n5.push(a4); } return t4.combine(n5); } return { create: function(e26) { var t5, n5 = bi(r3); try { for (n5.s(); !(t5 = n5.n()).done; ) JC(e26, t5.value); } catch (e27) { n5.e(e27); } finally { n5.f(); } return e26.values[a3] = s4(e26), 1; }, update: function(e26, n5) { if (!NC(e26, o4)) return 0; var r4 = s4(e26); return t4.compare(r4, e26.values[a3]) ? 0 : (e26.values[a3] = r4, 1); }, reconfigure: function(e26, i5) { var o5 = NC(e26, r3), u4 = i5.config.facets[t4.id], c4 = i5.facet(t4); if (u4 && !o5 && MC(n4, u4)) return e26.values[a3] = c4, 0; var l3 = s4(e26); return t4.compare(l3, c4) ? (e26.values[a3] = c4, 0) : (e26.values[a3] = l3, 1); } }; }(e24, n3, t3); }); } }; for (var y2 in a2) g2(y2); return new e22(t2, s2, h2.map(function(e23) { return e23(l2); }), l2, f2, a2); } }]), e22; }(); function JC(e22, t2) { if (1 & t2) return 2; var n2 = t2 >> 1, r2 = e22.status[n2]; if (r2 == 4) throw new Error("Cyclic dependency between fields and/or facets"); if (2 & r2) return r2; e22.status[n2] = 4; var i2 = e22.computeSlot(e22, e22.config.dynamicSlots[n2]); return e22.status[n2] = 2 | i2; } function UC(e22, t2) { return 1 & t2 ? e22.config.staticValues[t2 >> 1] : e22.values[t2 >> 1]; } var KC = AC.define(), GC = AC.define({ combine: function(e22) { return e22.some(function(e23) { return e23; }); }, static: true }), QC = AC.define({ combine: function(e22) { return e22.length ? e22[0] : void 0; }, static: true }), YC = AC.define(), ZC = AC.define(), XC = AC.define(), e_ = AC.define({ combine: function(e22) { return !!e22.length && e22[0]; } }), t_ = function() { function e22(t2, n2) { Ri(this, e22), this.type = t2, this.value = n2; } return zi(e22, null, [{ key: "define", value: function() { return new n_(); } }]), e22; }(), n_ = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "of", value: function(e23) { return new t_(this, e23); } }]), e22; }(), r_ = function() { function e22(t2) { Ri(this, e22), this.map = t2; } return zi(e22, [{ key: "of", value: function(e23) { return new i_(this, e23); } }]), e22; }(), i_ = function() { function e22(t2, n2) { Ri(this, e22), this.type = t2, this.value = n2; } return zi(e22, [{ key: "map", value: function(t2) { var n2 = this.type.map(this.value, t2); return n2 === void 0 ? void 0 : n2 == this.value ? this : new e22(this.type, n2); } }, { key: "is", value: function(e23) { return this.type == e23; } }], [{ key: "define", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return new r_(e23.map || function(e24) { return e24; }); } }, { key: "mapEffects", value: function(e23, t2) { if (!e23.length) return e23; var n2, r2 = [], i2 = bi(e23); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value.map(t2); o2 && r2.push(o2); } } catch (e24) { i2.e(e24); } finally { i2.f(); } return r2; } }]), e22; }(); i_.reconfigure = i_.define(), i_.appendConfig = i_.define(); var o_ = function() { function e22(t2, n2, r2, i2, o2, a2) { Ri(this, e22), this.startState = t2, this.changes = n2, this.selection = r2, this.effects = i2, this.annotations = o2, this.scrollIntoView = a2, this._doc = null, this._state = null, r2 && $C(r2, n2.newLength), o2.some(function(t3) { return t3.type == e22.time; }) || (this.annotations = o2.concat(e22.time.of(Date.now()))); } return zi(e22, [{ key: "newDoc", get: function() { return this._doc || (this._doc = this.changes.apply(this.startState.doc)); } }, { key: "newSelection", get: function() { return this.selection || this.startState.selection.map(this.changes); } }, { key: "state", get: function() { return this._state || this.startState.applyTransaction(this), this._state; } }, { key: "annotation", value: function(e23) { var t2, n2 = bi(this.annotations); try { for (n2.s(); !(t2 = n2.n()).done; ) { var r2 = t2.value; if (r2.type == e23) return r2.value; } } catch (e24) { n2.e(e24); } finally { n2.f(); } } }, { key: "docChanged", get: function() { return !this.changes.empty; } }, { key: "reconfigured", get: function() { return this.startState.config != this.state.config; } }, { key: "isUserEvent", value: function(t2) { var n2 = this.annotation(e22.userEvent); return !(!n2 || !(n2 == t2 || n2.length > t2.length && n2.slice(0, t2.length) == t2 && n2[t2.length] == ".")); } }], [{ key: "create", value: function(t2, n2, r2, i2, o2, a2) { return new e22(t2, n2, r2, i2, o2, a2); } }]), e22; }(); function a_(e22, t2) { for (var n2 = [], r2 = 0, i2 = 0; ; ) { var o2 = void 0, a2 = void 0; if (r2 < e22.length && (i2 == t2.length || t2[i2] >= e22[r2])) o2 = e22[r2++], a2 = e22[r2++]; else { if (!(i2 < t2.length)) return n2; o2 = t2[i2++], a2 = t2[i2++]; } !n2.length || n2[n2.length - 1] < o2 ? n2.push(o2, a2) : n2[n2.length - 1] < a2 && (n2[n2.length - 1] = a2); } } function s_(e22, t2, n2) { var r2, i2, o2, a2; return n2 ? (i2 = t2.changes, o2 = yC.empty(t2.changes.length), a2 = e22.changes.compose(t2.changes)) : (i2 = t2.changes.map(e22.changes), o2 = e22.changes.mapDesc(t2.changes, true), a2 = e22.changes.compose(i2)), { changes: a2, selection: t2.selection ? t2.selection.map(o2) : (r2 = e22.selection) === null || r2 === void 0 ? void 0 : r2.map(i2), effects: i_.mapEffects(e22.effects, i2).concat(i_.mapEffects(t2.effects, o2)), annotations: e22.annotations.length ? e22.annotations.concat(t2.annotations) : t2.annotations, scrollIntoView: e22.scrollIntoView || t2.scrollIntoView }; } function u_(e22, t2, n2) { var r2 = t2.selection, i2 = f_(t2.annotations); return t2.userEvent && (i2 = i2.concat(o_.userEvent.of(t2.userEvent))), { changes: t2.changes instanceof yC ? t2.changes : yC.of(t2.changes || [], n2, e22.facet(QC)), selection: r2 && (r2 instanceof _C ? r2 : _C.single(r2.anchor, r2.head)), effects: f_(t2.effects), annotations: i2, scrollIntoView: !!t2.scrollIntoView }; } function c_(e22, t2, n2) { var r2 = u_(e22, t2.length ? t2[0] : {}, e22.doc.length); t2.length && t2[0].filter === false && (n2 = false); for (var i2 = 1; i2 < t2.length; i2++) { t2[i2].filter === false && (n2 = false); var o2 = !!t2[i2].sequential; r2 = s_(r2, u_(e22, t2[i2], o2 ? r2.changes.newLength : e22.doc.length), o2); } var a2 = o_.create(e22, r2.changes, r2.selection, r2.effects, r2.annotations, r2.scrollIntoView); return function(e23) { for (var t3 = e23.startState, n3 = t3.facet(XC), r3 = e23, i3 = n3.length - 1; i3 >= 0; i3--) { var o3 = n3[i3](e23); o3 && Object.keys(o3).length && (r3 = s_(e23, u_(t3, o3, e23.changes.newLength), true)); } return r3 == e23 ? e23 : o_.create(t3, e23.changes, e23.selection, r3.effects, r3.annotations, r3.scrollIntoView); }(n2 ? function(e23) { var t3, n3 = e23.startState, r3 = true, i3 = bi(n3.facet(YC)); try { for (i3.s(); !(t3 = i3.n()).done; ) { var o3 = (0, t3.value)(e23); if (o3 === false) { r3 = false; break; } Array.isArray(o3) && (r3 = r3 === true ? o3 : a_(r3, o3)); } } catch (e24) { i3.e(e24); } finally { i3.f(); } if (r3 !== true) { var a3, s2; if (r3 === false) s2 = e23.changes.invertedDesc, a3 = yC.empty(n3.doc.length); else { var u2 = e23.changes.filter(r3); a3 = u2.changes, s2 = u2.filtered.mapDesc(u2.changes).invertedDesc; } e23 = o_.create(n3, a3, e23.selection && e23.selection.map(s2), i_.mapEffects(e23.effects, s2), e23.annotations, e23.scrollIntoView); } for (var c2 = n3.facet(ZC), l2 = c2.length - 1; l2 >= 0; l2--) { var f2 = c2[l2](e23); e23 = f2 instanceof o_ ? f2 : Array.isArray(f2) && f2.length == 1 && f2[0] instanceof o_ ? f2[0] : c_(n3, f_(f2), false); } return e23; }(a2) : a2); } o_.time = t_.define(), o_.userEvent = t_.define(), o_.addToHistory = t_.define(), o_.remote = t_.define(); var l_ = []; function f_(e22) { return e22 == null ? l_ : Array.isArray(e22) ? e22 : [e22]; } var h_, d_ = function(e22) { return e22[e22.Word = 0] = "Word", e22[e22.Space = 1] = "Space", e22[e22.Other = 2] = "Other", e22; }(d_ || (d_ = {})), v_ = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; try { h_ = new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u"); } catch (Lw2) { } function p_(e22) { return function(t2) { if (!/\S/.test(t2)) return d_.Space; if (function(e23) { if (h_) return h_.test(e23); for (var t3 = 0; t3 < e23.length; t3++) { var n3 = e23[t3]; if (/\w/.test(n3) || n3 > "\x80" && (n3.toUpperCase() != n3.toLowerCase() || v_.test(n3))) return true; } return false; }(t2)) return d_.Word; for (var n2 = 0; n2 < e22.length; n2++) if (t2.indexOf(e22[n2]) > -1) return d_.Word; return d_.Other; }; } var m_ = function() { function e22(t2, n2, r2, i2, o2, a2) { Ri(this, e22), this.config = t2, this.doc = n2, this.selection = r2, this.values = i2, this.status = t2.statusTemplate.slice(), this.computeSlot = o2, a2 && (a2._state = this); for (var s2 = 0; s2 < this.config.dynamicSlots.length; s2++) JC(this, s2 << 1); this.computeSlot = null; } return zi(e22, [{ key: "field", value: function(e23) { var t2 = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], n2 = this.config.address[e23.id]; if (n2 != null) return JC(this, n2), UC(this, n2); if (t2) throw new RangeError("Field is not present in this state"); } }, { key: "update", value: function() { for (var e23 = arguments.length, t2 = new Array(e23), n2 = 0; n2 < e23; n2++) t2[n2] = arguments[n2]; return c_(this, t2, true); } }, { key: "applyTransaction", value: function(t2) { var n2, r2, i2 = this, o2 = this.config, a2 = o2, s2 = a2.base, u2 = a2.compartments, c2 = bi(t2.effects); try { for (c2.s(); !(n2 = c2.n()).done; ) { var l2 = n2.value; l2.is(VC.reconfigure) ? (o2 && (u2 = /* @__PURE__ */ new Map(), o2.compartments.forEach(function(e23, t3) { return u2.set(t3, e23); }), o2 = null), u2.set(l2.value.compartment, l2.value.extension)) : l2.is(i_.reconfigure) ? (o2 = null, s2 = l2.value) : l2.is(i_.appendConfig) && (o2 = null, s2 = f_(s2).concat(l2.value)); } } catch (e23) { c2.e(e23); } finally { c2.f(); } o2 ? r2 = t2.startState.values.slice() : r2 = new e22(o2 = WC.resolve(s2, u2, this), this.doc, this.selection, o2.dynamicSlots.map(function() { return null; }), function(e23, t3) { return t3.reconfigure(e23, i2); }, null).values; new e22(o2, t2.newDoc, t2.newSelection, r2, function(e23, n3) { return n3.update(e23, t2); }, t2); } }, { key: "replaceSelection", value: function(e23) { return typeof e23 == "string" && (e23 = this.toText(e23)), this.changeByRange(function(t2) { return { changes: { from: t2.from, to: t2.to, insert: e23 }, range: _C.cursor(t2.from + e23.length) }; }); } }, { key: "changeByRange", value: function(e23) { for (var t2 = this.selection, n2 = e23(t2.ranges[0]), r2 = this.changes(n2.changes), i2 = [n2.range], o2 = f_(n2.effects), a2 = 1; a2 < t2.ranges.length; a2++) { for (var s2 = e23(t2.ranges[a2]), u2 = this.changes(s2.changes), c2 = u2.map(r2), l2 = 0; l2 < a2; l2++) i2[l2] = i2[l2].map(c2); var f2 = r2.mapDesc(u2, true); i2.push(s2.range.map(f2)), r2 = r2.compose(c2), o2 = i_.mapEffects(o2, c2).concat(i_.mapEffects(f_(s2.effects), f2)); } return { changes: r2, selection: _C.create(i2, t2.mainIndex), effects: o2 }; } }, { key: "changes", value: function() { var t2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; return t2 instanceof yC ? t2 : yC.of(t2, this.doc.length, this.facet(e22.lineSeparator)); } }, { key: "toText", value: function(t2) { return US.of(t2.split(this.facet(e22.lineSeparator) || pC)); } }, { key: "sliceDoc", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.doc.length; return this.doc.sliceString(e23, t2, this.lineBreak); } }, { key: "facet", value: function(e23) { var t2 = this.config.address[e23.id]; return t2 == null ? e23.default : (JC(this, t2), UC(this, t2)); } }, { key: "toJSON", value: function(e23) { var t2 = { doc: this.sliceDoc(), selection: this.selection.toJSON() }; if (e23) for (var n2 in e23) { var r2 = e23[n2]; r2 instanceof IC && this.config.address[r2.id] != null && (t2[n2] = r2.spec.toJSON(this.field(e23[n2]), this)); } return t2; } }, { key: "tabSize", get: function() { return this.facet(e22.tabSize); } }, { key: "lineBreak", get: function() { return this.facet(e22.lineSeparator) || "\n"; } }, { key: "readOnly", get: function() { return this.facet(e_); } }, { key: "phrase", value: function(t2) { for (var n2 = arguments.length, r2 = new Array(n2 > 1 ? n2 - 1 : 0), i2 = 1; i2 < n2; i2++) r2[i2 - 1] = arguments[i2]; var o2, a2 = bi(this.facet(e22.phrases)); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (Object.prototype.hasOwnProperty.call(s2, t2)) { t2 = s2[t2]; break; } } } catch (e23) { a2.e(e23); } finally { a2.f(); } return r2.length && (t2 = t2.replace(/\$(\$|\d*)/g, function(e23, t3) { if (t3 == "$") return "$"; var n3 = +(t3 || 1); return !n3 || n3 > r2.length ? e23 : r2[n3 - 1]; })), t2; } }, { key: "languageDataAt", value: function(e23, t2) { var n2, r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1, i2 = [], o2 = bi(this.facet(KC)); try { for (o2.s(); !(n2 = o2.n()).done; ) { var a2, s2 = n2.value, u2 = bi(s2(this, t2, r2)); try { for (u2.s(); !(a2 = u2.n()).done; ) { var c2 = a2.value; Object.prototype.hasOwnProperty.call(c2, e23) && i2.push(c2[e23]); } } catch (e24) { u2.e(e24); } finally { u2.f(); } } } catch (e24) { o2.e(e24); } finally { o2.f(); } return i2; } }, { key: "charCategorizer", value: function(e23) { return p_(this.languageDataAt("wordChars", e23).join("")); } }, { key: "wordAt", value: function(e23) { for (var t2 = this.doc.lineAt(e23), n2 = t2.text, r2 = t2.from, i2 = t2.length, o2 = this.charCategorizer(e23), a2 = e23 - r2, s2 = e23 - r2; a2 > 0; ) { var u2 = sC(n2, a2, false); if (o2(n2.slice(u2, a2)) != d_.Word) break; a2 = u2; } for (; s2 < i2; ) { var c2 = sC(n2, s2); if (o2(n2.slice(s2, c2)) != d_.Word) break; s2 = c2; } return a2 == s2 ? null : _C.range(a2 + r2, s2 + r2); } }], [{ key: "fromJSON", value: function(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r2 = arguments.length > 2 ? arguments[2] : void 0; if (!t2 || typeof t2.doc != "string") throw new RangeError("Invalid JSON representation for EditorState"); var i2 = []; if (r2) for (var o2 in r2) Object.prototype.hasOwnProperty.call(t2, o2) && function() { var e23 = r2[o2], n3 = t2[o2]; i2.push(e23.init(function(t3) { return e23.spec.fromJSON(n3, t3); })); }(); return e22.create({ doc: t2.doc, selection: _C.fromJSON(t2.selection), extensions: n2.extensions ? i2.concat([n2.extensions]) : i2 }); } }, { key: "create", value: function() { var t2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n2 = WC.resolve(t2.extensions || [], /* @__PURE__ */ new Map()), r2 = t2.doc instanceof US ? t2.doc : US.of((t2.doc || "").split(n2.staticFacet(e22.lineSeparator) || pC)), i2 = t2.selection ? t2.selection instanceof _C ? t2.selection : _C.single(t2.selection.anchor, t2.selection.head) : _C.single(0); return $C(i2, r2.length), n2.staticFacet(GC) || (i2 = i2.asSingle()), new e22(n2, r2, i2, n2.dynamicSlots.map(function() { return null; }), function(e23, t3) { return t3.create(e23); }, null); } }]), e22; }(); function g_(e22, t2) { var n2, r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i2 = {}, o2 = bi(e22); try { for (o2.s(); !(n2 = o2.n()).done; ) for (var a2 = n2.value, s2 = 0, u2 = Object.keys(a2); s2 < u2.length; s2++) { var c2 = u2[s2], l2 = a2[c2], f2 = i2[c2]; if (f2 === void 0) i2[c2] = l2; else if (f2 === l2 || l2 === void 0) ; else { if (!Object.hasOwnProperty.call(r2, c2)) throw new Error("Config merge conflict for field " + c2); i2[c2] = r2[c2](f2, l2); } } } catch (e23) { o2.e(e23); } finally { o2.f(); } for (var h2 in t2) i2[h2] === void 0 && (i2[h2] = t2[h2]); return i2; } m_.allowMultipleSelections = GC, m_.tabSize = AC.define({ combine: function(e22) { return e22.length ? e22[0] : 4; } }), m_.lineSeparator = QC, m_.readOnly = e_, m_.phrases = AC.define({ compare: function(e22, t2) { var n2 = Object.keys(e22), r2 = Object.keys(t2); return n2.length == r2.length && n2.every(function(n3) { return e22[n3] == t2[n3]; }); } }), m_.languageData = KC, m_.changeFilter = YC, m_.transactionFilter = ZC, m_.transactionExtender = XC, VC.reconfigure = i_.define(); var y_ = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "eq", value: function(e23) { return this == e23; } }, { key: "range", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23; return b_.create(e23, t2, this); } }]), e22; }(); y_.prototype.startSide = y_.prototype.endSide = 0, y_.prototype.point = false, y_.prototype.mapMode = mC.TrackDel; var b_ = function() { function e22(t2, n2, r2) { Ri(this, e22), this.from = t2, this.to = n2, this.value = r2; } return zi(e22, null, [{ key: "create", value: function(t2, n2, r2) { return new e22(t2, n2, r2); } }]), e22; }(); function k_(e22, t2) { return e22.from - t2.from || e22.value.startSide - t2.value.startSide; } var w_ = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.from = t2, this.to = n2, this.value = r2, this.maxPoint = i2; } return zi(e22, [{ key: "length", get: function() { return this.to[this.to.length - 1]; } }, { key: "findIndex", value: function(e23, t2, n2) { for (var r2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i2 = n2 ? this.to : this.from, o2 = r2, a2 = i2.length; ; ) { if (o2 == a2) return o2; var s2 = o2 + a2 >> 1, u2 = i2[s2] - e23 || (n2 ? this.value[s2].endSide : this.value[s2].startSide) - t2; if (s2 == o2) return u2 >= 0 ? o2 : a2; u2 >= 0 ? a2 = s2 : o2 = s2 + 1; } } }, { key: "between", value: function(e23, t2, n2, r2) { for (var i2 = this.findIndex(t2, -1e9, true), o2 = this.findIndex(n2, 1e9, false, i2); i2 < o2; i2++) if (r2(this.from[i2] + e23, this.to[i2] + e23, this.value[i2]) === false) return false; } }, { key: "map", value: function(t2, n2) { for (var r2 = [], i2 = [], o2 = [], a2 = -1, s2 = -1, u2 = 0; u2 < this.value.length; u2++) { var c2 = this.value[u2], l2 = this.from[u2] + t2, f2 = this.to[u2] + t2, h2 = void 0, d2 = void 0; if (l2 == f2) { var v2 = n2.mapPos(l2, c2.startSide, c2.mapMode); if (v2 == null) continue; if (h2 = d2 = v2, c2.startSide != c2.endSide && (d2 = n2.mapPos(l2, c2.endSide)) < h2) continue; } else if ((h2 = n2.mapPos(l2, c2.startSide)) > (d2 = n2.mapPos(f2, c2.endSide)) || h2 == d2 && c2.startSide > 0 && c2.endSide <= 0) continue; (d2 - h2 || c2.endSide - c2.startSide) < 0 || (a2 < 0 && (a2 = h2), c2.point && (s2 = Math.max(s2, d2 - h2)), r2.push(c2), i2.push(h2 - a2), o2.push(d2 - a2)); } return { mapped: r2.length ? new e22(i2, o2, r2, s2) : null, pos: a2 }; } }]), e22; }(), x_ = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.chunkPos = t2, this.chunk = n2, this.nextLayer = r2, this.maxPoint = i2; } return zi(e22, [{ key: "length", get: function() { var e23 = this.chunk.length - 1; return e23 < 0 ? 0 : Math.max(this.chunkEnd(e23), this.nextLayer.length); } }, { key: "size", get: function() { if (this.isEmpty) return 0; var e23, t2 = this.nextLayer.size, n2 = bi(this.chunk); try { for (n2.s(); !(e23 = n2.n()).done; ) { t2 += e23.value.value.length; } } catch (e24) { n2.e(e24); } finally { n2.f(); } return t2; } }, { key: "chunkEnd", value: function(e23) { return this.chunkPos[e23] + this.chunk[e23].length; } }, { key: "update", value: function(t2) { var n2 = t2.add, r2 = n2 === void 0 ? [] : n2, i2 = t2.sort, o2 = i2 !== void 0 && i2, a2 = t2.filterFrom, s2 = a2 === void 0 ? 0 : a2, u2 = t2.filterTo, c2 = u2 === void 0 ? this.length : u2, l2 = t2.filter; if (r2.length == 0 && !l2) return this; if (o2 && (r2 = r2.slice().sort(k_)), this.isEmpty) return r2.length ? e22.of(r2) : this; for (var f2 = new __(this, null, -1).goto(0), h2 = 0, d2 = [], v2 = new S_(); f2.value || h2 < r2.length; ) if (h2 < r2.length && (f2.from - r2[h2].from || f2.startSide - r2[h2].value.startSide) >= 0) { var p2 = r2[h2++]; v2.addInner(p2.from, p2.to, p2.value) || d2.push(p2); } else f2.rangeIndex == 1 && f2.chunkIndex < this.chunk.length && (h2 == r2.length || this.chunkEnd(f2.chunkIndex) < r2[h2].from) && (!l2 || s2 > this.chunkEnd(f2.chunkIndex) || c2 < this.chunkPos[f2.chunkIndex]) && v2.addChunk(this.chunkPos[f2.chunkIndex], this.chunk[f2.chunkIndex]) ? f2.nextChunk() : ((!l2 || s2 > f2.to || c2 < f2.from || l2(f2.from, f2.to, f2.value)) && (v2.addInner(f2.from, f2.to, f2.value) || d2.push(b_.create(f2.from, f2.to, f2.value))), f2.next()); return v2.finishInner(this.nextLayer.isEmpty && !d2.length ? e22.empty : this.nextLayer.update({ add: d2, filter: l2, filterFrom: s2, filterTo: c2 })); } }, { key: "map", value: function(t2) { if (t2.empty || this.isEmpty) return this; for (var n2 = [], r2 = [], i2 = -1, o2 = 0; o2 < this.chunk.length; o2++) { var a2 = this.chunkPos[o2], s2 = this.chunk[o2], u2 = t2.touchesRange(a2, a2 + s2.length); if (u2 === false) i2 = Math.max(i2, s2.maxPoint), n2.push(s2), r2.push(t2.mapPos(a2)); else if (u2 === true) { var c2 = s2.map(a2, t2), l2 = c2.mapped, f2 = c2.pos; l2 && (i2 = Math.max(i2, l2.maxPoint), n2.push(l2), r2.push(f2)); } } var h2 = this.nextLayer.map(t2); return n2.length == 0 ? h2 : new e22(r2, n2, h2 || e22.empty, i2); } }, { key: "between", value: function(e23, t2, n2) { if (!this.isEmpty) { for (var r2 = 0; r2 < this.chunk.length; r2++) { var i2 = this.chunkPos[r2], o2 = this.chunk[r2]; if (t2 >= i2 && e23 <= i2 + o2.length && o2.between(i2, e23 - i2, t2 - i2, n2) === false) return; } this.nextLayer.between(e23, t2, n2); } } }, { key: "iter", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return $_.from([this]).goto(e23); } }, { key: "isEmpty", get: function() { return this.nextLayer == this; } }], [{ key: "create", value: function(t2, n2, r2, i2) { return new e22(t2, n2, r2, i2); } }, { key: "iter", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return $_.from(e23).goto(t2); } }, { key: "compare", value: function(e23, t2, n2, r2) { var i2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1, o2 = e23.filter(function(e24) { return e24.maxPoint > 0 || !e24.isEmpty && e24.maxPoint >= i2; }), a2 = t2.filter(function(e24) { return e24.maxPoint > 0 || !e24.isEmpty && e24.maxPoint >= i2; }), s2 = C_(o2, a2, n2), u2 = new A_(o2, s2, i2), c2 = new A_(a2, s2, i2); n2.iterGaps(function(e24, t3, n3) { return M_(u2, e24, c2, t3, n3, r2); }), n2.empty && n2.length == 0 && M_(u2, 0, c2, 0, 0, r2); } }, { key: "eq", value: function(e23, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, r2 = arguments.length > 3 ? arguments[3] : void 0; r2 == null && (r2 = 1e9); var i2 = e23.filter(function(e24) { return !e24.isEmpty && t2.indexOf(e24) < 0; }), o2 = t2.filter(function(t3) { return !t3.isEmpty && e23.indexOf(t3) < 0; }); if (i2.length != o2.length) return false; if (!i2.length) return true; for (var a2 = C_(i2, o2), s2 = new A_(i2, a2, 0).goto(n2), u2 = new A_(o2, a2, 0).goto(n2); ; ) { if (s2.to != u2.to || !E_(s2.active, u2.active) || s2.point && (!u2.point || !s2.point.eq(u2.point))) return false; if (s2.to > r2) return true; s2.next(), u2.next(); } } }, { key: "spans", value: function(e23, t2, n2, r2) { for (var i2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1, o2 = new A_(e23, null, i2).goto(t2), a2 = t2, s2 = o2.openStart; ; ) { var u2 = Math.min(o2.to, n2); if (o2.point ? (r2.point(a2, u2, o2.point, o2.activeForPoint(o2.to), s2, o2.pointRank), s2 = o2.openEnd(u2) + (o2.to > u2 ? 1 : 0)) : u2 > a2 && (r2.span(a2, u2, o2.active, s2), s2 = o2.openEnd(u2)), o2.to > n2) break; a2 = o2.to, o2.next(); } return s2; } }, { key: "of", value: function(e23) { var t2, n2 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], r2 = new S_(), i2 = bi(e23 instanceof b_ ? [e23] : n2 ? j_(e23) : e23); try { for (i2.s(); !(t2 = i2.n()).done; ) { var o2 = t2.value; r2.add(o2.from, o2.to, o2.value); } } catch (e24) { i2.e(e24); } finally { i2.f(); } return r2.finish(); } }]), e22; }(); function j_(e22) { if (e22.length > 1) for (var t2 = e22[0], n2 = 1; n2 < e22.length; n2++) { var r2 = e22[n2]; if (k_(t2, r2) > 0) return e22.slice().sort(k_); t2 = r2; } return e22; } x_.empty = new x_([], [], null, -1), x_.empty.nextLayer = x_.empty; var S_ = function() { function e22() { Ri(this, e22), this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null; } return zi(e22, [{ key: "finishChunk", value: function(e23) { this.chunks.push(new w_(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e23 && (this.from = [], this.to = [], this.value = []); } }, { key: "add", value: function(t2, n2, r2) { this.addInner(t2, n2, r2) || (this.nextLayer || (this.nextLayer = new e22())).add(t2, n2, r2); } }, { key: "addInner", value: function(e23, t2, n2) { var r2 = e23 - this.lastTo || n2.startSide - this.last.endSide; if (r2 <= 0 && (e23 - this.lastFrom || n2.startSide - this.last.startSide) < 0) throw new Error("Ranges must be added sorted by `from` position and `startSide`"); return !(r2 < 0) && (this.from.length == 250 && this.finishChunk(true), this.chunkStart < 0 && (this.chunkStart = e23), this.from.push(e23 - this.chunkStart), this.to.push(t2 - this.chunkStart), this.last = n2, this.lastFrom = e23, this.lastTo = t2, this.value.push(n2), n2.point && (this.maxPoint = Math.max(this.maxPoint, t2 - e23)), true); } }, { key: "addChunk", value: function(e23, t2) { if ((e23 - this.lastTo || t2.value[0].startSide - this.last.endSide) < 0) return false; this.from.length && this.finishChunk(true), this.setMaxPoint = Math.max(this.setMaxPoint, t2.maxPoint), this.chunks.push(t2), this.chunkPos.push(e23); var n2 = t2.value.length - 1; return this.last = t2.value[n2], this.lastFrom = t2.from[n2] + e23, this.lastTo = t2.to[n2] + e23, true; } }, { key: "finish", value: function() { return this.finishInner(x_.empty); } }, { key: "finishInner", value: function(e23) { if (this.from.length && this.finishChunk(false), this.chunks.length == 0) return e23; var t2 = x_.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e23) : e23, this.setMaxPoint); return this.from = null, t2; } }]), e22; }(); function C_(e22, t2, n2) { var r2, i2 = /* @__PURE__ */ new Map(), o2 = bi(e22); try { for (o2.s(); !(r2 = o2.n()).done; ) for (var a2 = r2.value, s2 = 0; s2 < a2.chunk.length; s2++) a2.chunk[s2].maxPoint <= 0 && i2.set(a2.chunk[s2], a2.chunkPos[s2]); } catch (e23) { o2.e(e23); } finally { o2.f(); } var u2, c2 = /* @__PURE__ */ new Set(), l2 = bi(t2); try { for (l2.s(); !(u2 = l2.n()).done; ) for (var f2 = u2.value, h2 = 0; h2 < f2.chunk.length; h2++) { var d2 = i2.get(f2.chunk[h2]); d2 == null || (n2 ? n2.mapPos(d2) : d2) != f2.chunkPos[h2] || (n2 == null ? void 0 : n2.touchesRange(d2, d2 + f2.chunk[h2].length)) || c2.add(f2.chunk[h2]); } } catch (e23) { l2.e(e23); } finally { l2.f(); } return c2; } var __ = function() { function e22(t2, n2, r2) { var i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; Ri(this, e22), this.layer = t2, this.skip = n2, this.minPoint = r2, this.rank = i2; } return zi(e22, [{ key: "startSide", get: function() { return this.value ? this.value.startSide : 0; } }, { key: "endSide", get: function() { return this.value ? this.value.endSide : 0; } }, { key: "goto", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1e9; return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e23, t2, false), this; } }, { key: "gotoInner", value: function(e23, t2, n2) { for (; this.chunkIndex < this.layer.chunk.length; ) { var r2 = this.layer.chunk[this.chunkIndex]; if (!(this.skip && this.skip.has(r2) || this.layer.chunkEnd(this.chunkIndex) < e23 || r2.maxPoint < this.minPoint)) break; this.chunkIndex++, n2 = false; } if (this.chunkIndex < this.layer.chunk.length) { var i2 = this.layer.chunk[this.chunkIndex].findIndex(e23 - this.layer.chunkPos[this.chunkIndex], t2, true); (!n2 || this.rangeIndex < i2) && this.setRangeIndex(i2); } this.next(); } }, { key: "forward", value: function(e23, t2) { (this.to - e23 || this.endSide - t2) < 0 && this.gotoInner(e23, t2, true); } }, { key: "next", value: function() { for (; ; ) { if (this.chunkIndex == this.layer.chunk.length) { this.from = this.to = 1e9, this.value = null; break; } var e23 = this.layer.chunkPos[this.chunkIndex], t2 = this.layer.chunk[this.chunkIndex], n2 = e23 + t2.from[this.rangeIndex]; if (this.from = n2, this.to = e23 + t2.to[this.rangeIndex], this.value = t2.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint) break; } } }, { key: "setRangeIndex", value: function(e23) { if (e23 == this.layer.chunk[this.chunkIndex].value.length) { if (this.chunkIndex++, this.skip) for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); ) this.chunkIndex++; this.rangeIndex = 0; } else this.rangeIndex = e23; } }, { key: "nextChunk", value: function() { this.chunkIndex++, this.rangeIndex = 0, this.next(); } }, { key: "compare", value: function(e23) { return this.from - e23.from || this.startSide - e23.startSide || this.rank - e23.rank || this.to - e23.to || this.endSide - e23.endSide; } }]), e22; }(), $_ = function() { function e22(t2) { Ri(this, e22), this.heap = t2; } return zi(e22, [{ key: "startSide", get: function() { return this.value ? this.value.startSide : 0; } }, { key: "goto", value: function(e23) { var t2, n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1e9, r2 = bi(this.heap); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value; i2.goto(e23, n2); } } catch (e24) { r2.e(e24); } finally { r2.f(); } for (var o2 = this.heap.length >> 1; o2 >= 0; o2--) O_(this.heap, o2); return this.next(), this; } }, { key: "forward", value: function(e23, t2) { var n2, r2 = bi(this.heap); try { for (r2.s(); !(n2 = r2.n()).done; ) { n2.value.forward(e23, t2); } } catch (e24) { r2.e(e24); } finally { r2.f(); } for (var i2 = this.heap.length >> 1; i2 >= 0; i2--) O_(this.heap, i2); (this.to - e23 || this.value.endSide - t2) < 0 && this.next(); } }, { key: "next", value: function() { if (this.heap.length == 0) this.from = this.to = 1e9, this.value = null, this.rank = -1; else { var e23 = this.heap[0]; this.from = e23.from, this.to = e23.to, this.value = e23.value, this.rank = e23.rank, e23.value && e23.next(), O_(this.heap, 0); } } }], [{ key: "from", value: function(t2) { for (var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1, i2 = [], o2 = 0; o2 < t2.length; o2++) for (var a2 = t2[o2]; !a2.isEmpty; a2 = a2.nextLayer) a2.maxPoint >= r2 && i2.push(new __(a2, n2, r2, o2)); return i2.length == 1 ? i2[0] : new e22(i2); } }]), e22; }(); function O_(e22, t2) { for (var n2 = e22[t2]; ; ) { var r2 = 1 + (t2 << 1); if (r2 >= e22.length) break; var i2 = e22[r2]; if (r2 + 1 < e22.length && i2.compare(e22[r2 + 1]) >= 0 && (i2 = e22[r2 + 1], r2++), n2.compare(i2) < 0) break; e22[r2] = n2, e22[t2] = i2, t2 = r2; } } var A_ = function() { function e22(t2, n2, r2) { Ri(this, e22), this.minPoint = r2, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = $_.from(t2, n2, r2); } return zi(e22, [{ key: "goto", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1e9; return this.cursor.goto(e23, t2), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e23, this.endSide = t2, this.openStart = -1, this.next(), this; } }, { key: "forward", value: function(e23, t2) { for (; this.minActive > -1 && (this.activeTo[this.minActive] - e23 || this.active[this.minActive].endSide - t2) < 0; ) this.removeActive(this.minActive); this.cursor.forward(e23, t2); } }, { key: "removeActive", value: function(e23) { P_(this.active, e23), P_(this.activeTo, e23), P_(this.activeRank, e23), this.minActive = T_(this.active, this.activeTo); } }, { key: "addActive", value: function(e23) { for (var t2 = 0, n2 = this.cursor, r2 = n2.value, i2 = n2.to, o2 = n2.rank; t2 < this.activeRank.length && this.activeRank[t2] <= o2; ) t2++; N_(this.active, t2, r2), N_(this.activeTo, t2, i2), N_(this.activeRank, t2, o2), e23 && N_(e23, t2, this.cursor.from), this.minActive = T_(this.active, this.activeTo); } }, { key: "next", value: function() { var e23 = this.to, t2 = this.point; this.point = null; for (var n2 = this.openStart < 0 ? [] : null, r2 = 0; ; ) { var i2 = this.minActive; if (i2 > -1 && (this.activeTo[i2] - this.cursor.from || this.active[i2].endSide - this.cursor.startSide) < 0) { if (this.activeTo[i2] > e23) { this.to = this.activeTo[i2], this.endSide = this.active[i2].endSide; break; } this.removeActive(i2), n2 && P_(n2, i2); } else { if (!this.cursor.value) { this.to = this.endSide = 1e9; break; } if (this.cursor.from > e23) { this.to = this.cursor.from, this.endSide = this.cursor.startSide; break; } var o2 = this.cursor.value; if (o2.point) { if (!(t2 && this.cursor.to == this.to && this.cursor.from < this.cursor.to)) { this.point = o2, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = o2.endSide, this.cursor.from < e23 && (r2 = 1), this.cursor.next(), this.forward(this.to, this.endSide); break; } this.cursor.next(); } else this.addActive(n2), this.cursor.next(); } } if (n2) { for (var a2 = 0; a2 < n2.length && n2[a2] < e23; ) a2++; this.openStart = a2 + r2; } } }, { key: "activeForPoint", value: function(e23) { if (!this.active.length) return this.active; for (var t2 = [], n2 = this.active.length - 1; n2 >= 0 && !(this.activeRank[n2] < this.pointRank); n2--) (this.activeTo[n2] > e23 || this.activeTo[n2] == e23 && this.active[n2].endSide >= this.point.endSide) && t2.push(this.active[n2]); return t2.reverse(); } }, { key: "openEnd", value: function(e23) { for (var t2 = 0, n2 = this.activeTo.length - 1; n2 >= 0 && this.activeTo[n2] > e23; n2--) t2++; return t2; } }]), e22; }(); function M_(e22, t2, n2, r2, i2, o2) { e22.goto(t2), n2.goto(r2); for (var a2 = r2 + i2, s2 = r2, u2 = r2 - t2; ; ) { var c2 = e22.to + u2 - n2.to || e22.endSide - n2.endSide, l2 = c2 < 0 ? e22.to + u2 : n2.to, f2 = Math.min(l2, a2); if (e22.point || n2.point ? e22.point && n2.point && (e22.point == n2.point || e22.point.eq(n2.point)) && E_(e22.activeForPoint(e22.to + u2), n2.activeForPoint(n2.to)) || o2.comparePoint(s2, f2, e22.point, n2.point) : f2 > s2 && !E_(e22.active, n2.active) && o2.compareRange(s2, f2, e22.active, n2.active), l2 > a2) break; s2 = l2, c2 <= 0 && e22.next(), c2 >= 0 && n2.next(); } } function E_(e22, t2) { if (e22.length != t2.length) return false; for (var n2 = 0; n2 < e22.length; n2++) if (e22[n2] != t2[n2] && !e22[n2].eq(t2[n2])) return false; return true; } function P_(e22, t2) { for (var n2 = t2, r2 = e22.length - 1; n2 < r2; n2++) e22[n2] = e22[n2 + 1]; e22.pop(); } function N_(e22, t2, n2) { for (var r2 = e22.length - 1; r2 >= t2; r2--) e22[r2 + 1] = e22[r2]; e22[t2] = n2; } function T_(e22, t2) { for (var n2 = -1, r2 = 1e9, i2 = 0; i2 < t2.length; i2++) (t2[i2] - r2 || e22[i2].endSide - e22[n2].endSide) < 0 && (n2 = i2, r2 = t2[i2]); return n2; } function I_(e22, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e22.length, r2 = 0, i2 = 0; i2 < n2; ) e22.charCodeAt(i2) == 9 ? (r2 += t2 - r2 % t2, i2++) : (r2++, i2 = sC(e22, i2)); return r2; } function R_(e22, t2, n2, r2) { for (var i2 = 0, o2 = 0; ; ) { if (o2 >= t2) return i2; if (i2 == e22.length) break; o2 += e22.charCodeAt(i2) == 9 ? n2 - o2 % n2 : 1, i2 = sC(e22, i2); } return r2 === true ? -1 : e22.length; } for (var D_ = typeof Symbol == "undefined" ? "__\u037C" : Symbol.for("\u037C"), z_ = typeof Symbol == "undefined" ? "__styleSet" + Math.floor(1e8 * Math.random()) : Symbol("styleSet"), L_ = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : {}, B_ = function() { function e22(t2, n2) { Ri(this, e22), this.rules = []; var r2 = (n2 || {}).finish; function i2(e23) { return /^@/.test(e23) ? [e23] : e23.split(/,\s*/); } function o2(e23, t3, n3, a3) { var s2 = [], u2 = /^@(\w+)\b/.exec(e23[0]), c2 = u2 && u2[1] == "keyframes"; if (u2 && t3 == null) return n3.push(e23[0] + ";"); for (var l2 in t3) { var f2 = t3[l2]; if (/&/.test(l2)) o2(l2.split(/,\s*/).map(function(t4) { return e23.map(function(e24) { return t4.replace(/&/, e24); }); }).reduce(function(e24, t4) { return e24.concat(t4); }), f2, n3); else if (f2 && Li(f2) == "object") { if (!u2) throw new RangeError("The value of a property (" + l2 + ") should be a primitive value."); o2(i2(l2), f2, s2, c2); } else f2 != null && s2.push(l2.replace(/_.*/, "").replace(/[A-Z]/g, function(e24) { return "-" + e24.toLowerCase(); }) + ": " + f2 + ";"); } (s2.length || c2) && n3.push((!r2 || u2 || a3 ? e23 : e23.map(r2)).join(", ") + " {" + s2.join(" ") + "}"); } for (var a2 in t2) o2(i2(a2), t2[a2], this.rules); } return zi(e22, [{ key: "getRules", value: function() { return this.rules.join("\n"); } }], [{ key: "newName", value: function() { var e23 = L_[D_] || 1; return L_[D_] = e23 + 1, "\u037C" + e23.toString(36); } }, { key: "mount", value: function(e23, t2) { (e23[z_] || new F_(e23)).mount(Array.isArray(t2) ? t2 : [t2]); } }]), e22; }(), q_ = null, F_ = function() { function e22(t2) { if (Ri(this, e22), !t2.head && t2.adoptedStyleSheets && typeof CSSStyleSheet != "undefined") { if (q_) return t2.adoptedStyleSheets = [q_.sheet].concat(t2.adoptedStyleSheets), t2[z_] = q_; this.sheet = new CSSStyleSheet(), t2.adoptedStyleSheets = [this.sheet].concat(t2.adoptedStyleSheets), q_ = this; } else { this.styleTag = (t2.ownerDocument || t2).createElement("style"); var n2 = t2.head || t2; n2.insertBefore(this.styleTag, n2.firstChild); } this.modules = [], t2[z_] = this; } return zi(e22, [{ key: "mount", value: function(e23) { for (var t2 = this.sheet, n2 = 0, r2 = 0, i2 = 0; i2 < e23.length; i2++) { var o2 = e23[i2], a2 = this.modules.indexOf(o2); if (a2 < r2 && a2 > -1 && (this.modules.splice(a2, 1), r2--, a2 = -1), a2 == -1) { if (this.modules.splice(r2++, 0, o2), t2) for (var s2 = 0; s2 < o2.rules.length; s2++) t2.insertRule(o2.rules[s2], n2++); } else { for (; r2 < a2; ) n2 += this.modules[r2++].rules.length; n2 += o2.rules.length, r2++; } } if (!t2) { for (var u2 = "", c2 = 0; c2 < this.modules.length; c2++) u2 += this.modules[c2].getRules() + "\n"; this.styleTag.textContent = u2; } } }]), e22; }(), V_ = { 8: "Backspace", 9: "Tab", 10: "Enter", 12: "NumLock", 13: "Enter", 16: "Shift", 17: "Control", 18: "Alt", 20: "CapsLock", 27: "Escape", 32: " ", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "ArrowLeft", 38: "ArrowUp", 39: "ArrowRight", 40: "ArrowDown", 44: "PrintScreen", 45: "Insert", 46: "Delete", 59: ";", 61: "=", 91: "Meta", 92: "Meta", 106: "*", 107: "+", 108: ",", 109: "-", 110: ".", 111: "/", 144: "NumLock", 145: "ScrollLock", 160: "Shift", 161: "Shift", 162: "Control", 163: "Control", 164: "Alt", 165: "Alt", 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'", 229: "q" }, H_ = { 48: ")", 49: "!", 50: "@", 51: "#", 52: "$", 53: "%", 54: "^", 55: "&", 56: "*", 57: "(", 59: ":", 61: "+", 173: "_", 186: ":", 187: "+", 188: "<", 189: "_", 190: ">", 191: "?", 192: "~", 219: "{", 220: "|", 221: "}", 222: '"', 229: "Q" }, W_ = typeof navigator != "undefined" && /Chrome\/(\d+)/.exec(navigator.userAgent), J_ = typeof navigator != "undefined" && /Apple Computer/.test(navigator.vendor), U_ = typeof navigator != "undefined" && /Gecko\/\d+/.test(navigator.userAgent), K_ = typeof navigator != "undefined" && /Mac/.test(navigator.platform), G_ = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent), Q_ = W_ && (K_ || +W_[1] < 57) || U_ && K_, Y_ = 0; Y_ < 10; Y_++) V_[48 + Y_] = V_[96 + Y_] = String(Y_); for (Y_ = 1; Y_ <= 24; Y_++) V_[Y_ + 111] = "F" + Y_; for (Y_ = 65; Y_ <= 90; Y_++) V_[Y_] = String.fromCharCode(Y_ + 32), H_[Y_] = String.fromCharCode(Y_); for (var Z_ in V_) H_.hasOwnProperty(Z_) || (H_[Z_] = V_[Z_]); function X_(e22) { return (e22.nodeType == 11 ? e22.getSelection ? e22 : e22.ownerDocument : e22).getSelection(); } function e$(e22, t2) { return !!t2 && (e22 == t2 || e22.contains(t2.nodeType != 1 ? t2.parentNode : t2)); } function t$(e22, t2) { if (!t2.anchorNode) return false; try { return e$(e22, t2.anchorNode); } catch (e23) { return false; } } function n$(e22) { return e22.nodeType == 3 ? v$(e22, 0, e22.nodeValue.length).getClientRects() : e22.nodeType == 1 ? e22.getClientRects() : []; } function r$(e22, t2, n2, r2) { return !!n2 && (o$(e22, t2, n2, r2, -1) || o$(e22, t2, n2, r2, 1)); } function i$(e22) { for (var t2 = 0; ; t2++) if (!(e22 = e22.previousSibling)) return t2; } function o$(e22, t2, n2, r2, i2) { for (; ; ) { if (e22 == n2 && t2 == r2) return true; if (t2 == (i2 < 0 ? 0 : a$(e22))) { if (e22.nodeName == "DIV") return false; var o2 = e22.parentNode; if (!o2 || o2.nodeType != 1) return false; t2 = i$(e22) + (i2 < 0 ? 0 : 1), e22 = o2; } else { if (e22.nodeType != 1) return false; if ((e22 = e22.childNodes[t2 + (i2 < 0 ? -1 : 0)]).nodeType == 1 && e22.contentEditable == "false") return false; t2 = i2 < 0 ? a$(e22) : 0; } } } function a$(e22) { return e22.nodeType == 3 ? e22.nodeValue.length : e22.childNodes.length; } var s$ = { left: 0, right: 0, top: 0, bottom: 0 }; function u$(e22, t2) { var n2 = t2 ? e22.left : e22.right; return { left: n2, right: n2, top: e22.top, bottom: e22.bottom }; } function c$(e22) { return { left: 0, right: e22.innerWidth, top: 0, bottom: e22.innerHeight }; } var l$, f$ = function() { function e22() { Ri(this, e22), this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0; } return zi(e22, [{ key: "eq", value: function(e23) { return this.anchorNode == e23.anchorNode && this.anchorOffset == e23.anchorOffset && this.focusNode == e23.focusNode && this.focusOffset == e23.focusOffset; } }, { key: "setRange", value: function(e23) { this.set(e23.anchorNode, e23.anchorOffset, e23.focusNode, e23.focusOffset); } }, { key: "set", value: function(e23, t2, n2, r2) { this.anchorNode = e23, this.anchorOffset = t2, this.focusNode = n2, this.focusOffset = r2; } }]), e22; }(), h$ = null; function d$(e22) { if (e22.setActive) return e22.setActive(); if (h$) return e22.focus(h$); for (var t2 = [], n2 = e22; n2 && (t2.push(n2, n2.scrollTop, n2.scrollLeft), n2 != n2.ownerDocument); n2 = n2.parentNode) ; if (e22.focus(h$ == null ? { get preventScroll() { return h$ = { preventScroll: true }, true; } } : void 0), !h$) { h$ = false; for (var r2 = 0; r2 < t2.length; ) { var i2 = t2[r2++], o2 = t2[r2++], a2 = t2[r2++]; i2.scrollTop != o2 && (i2.scrollTop = o2), i2.scrollLeft != a2 && (i2.scrollLeft = a2); } } } function v$(e22, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t2, r2 = l$ || (l$ = document.createRange()); return r2.setEnd(e22, n2), r2.setStart(e22, t2), r2; } function p$(e22, t2, n2) { var r2 = { key: t2, code: t2, keyCode: n2, which: n2, cancelable: true }, i2 = new KeyboardEvent("keydown", r2); i2.synthetic = true, e22.dispatchEvent(i2); var o2 = new KeyboardEvent("keyup", r2); return o2.synthetic = true, e22.dispatchEvent(o2), i2.defaultPrevented || o2.defaultPrevented; } function m$(e22) { for (; e22; ) { if (e22 && (e22.nodeType == 9 || e22.nodeType == 11 && e22.host)) return e22; e22 = e22.assignedSlot || e22.parentNode; } return null; } function g$(e22) { for (; e22.attributes.length; ) e22.removeAttributeNode(e22.attributes[0]); } var y$ = function() { function e22(t2, n2) { var r2 = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2]; Ri(this, e22), this.node = t2, this.offset = n2, this.precise = r2; } return zi(e22, null, [{ key: "before", value: function(t2, n2) { return new e22(t2.parentNode, i$(t2), n2); } }, { key: "after", value: function(t2, n2) { return new e22(t2.parentNode, i$(t2) + 1, n2); } }]), e22; }(), b$ = [], k$ = function() { function e22() { Ri(this, e22), this.parent = null, this.dom = null, this.dirty = 2; } return zi(e22, [{ key: "editorView", get: function() { if (!this.parent) throw new Error("Accessing view in orphan content view"); return this.parent.editorView; } }, { key: "overrideDOMText", get: function() { return null; } }, { key: "posAtStart", get: function() { return this.parent ? this.parent.posBefore(this) : 0; } }, { key: "posAtEnd", get: function() { return this.posAtStart + this.length; } }, { key: "posBefore", value: function(e23) { var t2, n2 = this.posAtStart, r2 = bi(this.children); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value; if (i2 == e23) return n2; n2 += i2.length + i2.breakAfter; } } catch (e24) { r2.e(e24); } finally { r2.f(); } throw new RangeError("Invalid child in posBefore"); } }, { key: "posAfter", value: function(e23) { return this.posBefore(e23) + e23.length; } }, { key: "coordsAt", value: function(e23, t2) { return null; } }, { key: "sync", value: function(t2) { if (2 & this.dirty) { var n2, r2, i2 = this.dom, o2 = null, a2 = bi(this.children); try { for (a2.s(); !(r2 = a2.n()).done; ) { var s2 = r2.value; if (s2.dirty) { if (!s2.dom && (n2 = o2 ? o2.nextSibling : i2.firstChild)) { var u2 = e22.get(n2); u2 && (u2.parent || u2.constructor != s2.constructor) || s2.reuseDOM(n2); } s2.sync(t2), s2.dirty = 0; } if (n2 = o2 ? o2.nextSibling : i2.firstChild, t2 && !t2.written && t2.node == i2 && n2 != s2.dom && (t2.written = true), s2.dom.parentNode == i2) for (; n2 && n2 != s2.dom; ) n2 = w$(n2); else i2.insertBefore(s2.dom, n2); o2 = s2.dom; } } catch (e23) { a2.e(e23); } finally { a2.f(); } for ((n2 = o2 ? o2.nextSibling : i2.firstChild) && t2 && t2.node == i2 && (t2.written = true); n2; ) n2 = w$(n2); } else if (1 & this.dirty) { var c2, l2 = bi(this.children); try { for (l2.s(); !(c2 = l2.n()).done; ) { var f2 = c2.value; f2.dirty && (f2.sync(t2), f2.dirty = 0); } } catch (e23) { l2.e(e23); } finally { l2.f(); } } } }, { key: "reuseDOM", value: function(e23) { } }, { key: "localPosFromDOM", value: function(t2, n2) { var r2; if (t2 == this.dom) r2 = this.dom.childNodes[n2]; else { for (var i2 = a$(t2) == 0 ? 0 : n2 == 0 ? -1 : 1; ; ) { var o2 = t2.parentNode; if (o2 == this.dom) break; i2 == 0 && o2.firstChild != o2.lastChild && (i2 = t2 == o2.firstChild ? -1 : 1), t2 = o2; } r2 = i2 < 0 ? t2 : t2.nextSibling; } if (r2 == this.dom.firstChild) return 0; for (; r2 && !e22.get(r2); ) r2 = r2.nextSibling; if (!r2) return this.length; for (var a2 = 0, s2 = 0; ; a2++) { var u2 = this.children[a2]; if (u2.dom == r2) return s2; s2 += u2.length + u2.breakAfter; } } }, { key: "domBoundsAround", value: function(e23, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, r2 = -1, i2 = -1, o2 = -1, a2 = -1, s2 = 0, u2 = n2, c2 = n2; s2 < this.children.length; s2++) { var l2 = this.children[s2], f2 = u2 + l2.length; if (u2 < e23 && f2 > t2) return l2.domBoundsAround(e23, t2, u2); if (f2 >= e23 && r2 == -1 && (r2 = s2, i2 = u2), u2 > t2 && l2.dom.parentNode == this.dom) { o2 = s2, a2 = c2; break; } c2 = f2, u2 = f2 + l2.breakAfter; } return { from: i2, to: a2 < 0 ? n2 + this.length : a2, startDOM: (r2 ? this.children[r2 - 1].dom.nextSibling : null) || this.dom.firstChild, endDOM: o2 < this.children.length && o2 >= 0 ? this.children[o2].dom : null }; } }, { key: "markDirty", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; this.dirty |= 2, this.markParentsDirty(e23); } }, { key: "markParentsDirty", value: function(e23) { for (var t2 = this.parent; t2; t2 = t2.parent) { if (e23 && (t2.dirty |= 2), 1 & t2.dirty) return; t2.dirty |= 1, e23 = false; } } }, { key: "setParent", value: function(e23) { this.parent != e23 && (this.parent = e23, this.dirty && this.markParentsDirty(true)); } }, { key: "setDOM", value: function(e23) { this.dom && (this.dom.cmView = null), this.dom = e23, e23.cmView = this; } }, { key: "rootView", get: function() { for (var e23 = this; ; ) { var t2 = e23.parent; if (!t2) return e23; e23 = t2; } } }, { key: "replaceChildren", value: function(e23, t2) { var n2, r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : b$; this.markDirty(); for (var i2 = e23; i2 < t2; i2++) { var o2 = this.children[i2]; o2.parent == this && o2.destroy(); } (n2 = this.children).splice.apply(n2, [e23, t2 - e23].concat(Ni(r2))); for (var a2 = 0; a2 < r2.length; a2++) r2[a2].setParent(this); } }, { key: "ignoreMutation", value: function(e23) { return false; } }, { key: "ignoreEvent", value: function(e23) { return false; } }, { key: "childCursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.length; return new x$(this.children, e23, this.children.length); } }, { key: "childPos", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; return this.childCursor().findPos(e23, t2); } }, { key: "toString", value: function() { var e23 = this.constructor.name.replace("View", ""); return e23 + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e23 == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : ""); } }, { key: "isEditable", get: function() { return true; } }, { key: "merge", value: function(e23, t2, n2, r2, i2, o2) { return false; } }, { key: "become", value: function(e23) { return false; } }, { key: "getSide", value: function() { return 0; } }, { key: "destroy", value: function() { this.parent = null; } }], [{ key: "get", value: function(e23) { return e23.cmView; } }]), e22; }(); function w$(e22) { var t2 = e22.nextSibling; return e22.parentNode.removeChild(e22), t2; } k$.prototype.breakAfter = 0; var x$ = function() { function e22(t2, n2, r2) { Ri(this, e22), this.children = t2, this.pos = n2, this.i = r2, this.off = 0; } return zi(e22, [{ key: "findPos", value: function(e23) { for (var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; ; ) { if (e23 > this.pos || e23 == this.pos && (t2 > 0 || this.i == 0 || this.children[this.i - 1].breakAfter)) return this.off = e23 - this.pos, this; var n2 = this.children[--this.i]; this.pos -= n2.length + n2.breakAfter; } } }]), e22; }(); function j$(e22, t2, n2, r2, i2, o2, a2, s2, u2) { var c2 = e22.children, l2 = c2.length ? c2[t2] : null, f2 = o2.length ? o2[o2.length - 1] : null, h2 = f2 ? f2.breakAfter : a2; if (!(t2 == r2 && l2 && !a2 && !h2 && o2.length < 2 && l2.merge(n2, i2, o2.length ? f2 : null, n2 == 0, s2, u2))) { if (r2 < c2.length) { var d2 = c2[r2]; d2 && i2 < d2.length ? (t2 == r2 && (d2 = d2.split(i2), i2 = 0), !h2 && f2 && d2.merge(0, i2, f2, true, 0, u2) ? o2[o2.length - 1] = d2 : (i2 && d2.merge(0, i2, null, false, 0, u2), o2.push(d2))) : (d2 == null ? void 0 : d2.breakAfter) && (f2 ? f2.breakAfter = 1 : a2 = 1), r2++; } for (l2 && (l2.breakAfter = a2, n2 > 0 && (!a2 && o2.length && l2.merge(n2, l2.length, o2[0], false, s2, 0) ? l2.breakAfter = o2.shift().breakAfter : (n2 < l2.length || l2.children.length && l2.children[l2.children.length - 1].length == 0) && l2.merge(n2, l2.length, null, false, s2, 0), t2++)); t2 < r2 && o2.length; ) if (c2[r2 - 1].become(o2[o2.length - 1])) r2--, o2.pop(), u2 = o2.length ? 0 : s2; else { if (!c2[t2].become(o2[0])) break; t2++, o2.shift(), s2 = o2.length ? 0 : u2; } !o2.length && t2 && r2 < c2.length && !c2[t2 - 1].breakAfter && c2[r2].merge(0, 0, c2[t2 - 1], false, s2, u2) && t2--, (t2 < r2 || o2.length) && e22.replaceChildren(t2, r2, o2); } } function S$(e22, t2, n2, r2, i2, o2) { var a2, s2 = e22.childCursor(), u2 = s2.findPos(n2, 1), c2 = u2.i, l2 = u2.off, f2 = s2.findPos(t2, -1), h2 = f2.i, d2 = f2.off, v2 = t2 - n2, p2 = bi(r2); try { for (p2.s(); !(a2 = p2.n()).done; ) { v2 += a2.value.length; } } catch (e23) { p2.e(e23); } finally { p2.f(); } e22.length += v2, j$(e22, h2, d2, c2, l2, r2, 0, i2, o2); } var C$ = typeof navigator != "undefined" ? navigator : { userAgent: "", vendor: "", platform: "" }, _$ = typeof document != "undefined" ? document : { documentElement: { style: {} } }, $$ = /Edge\/(\d+)/.exec(C$.userAgent), O$ = /MSIE \d/.test(C$.userAgent), A$ = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C$.userAgent), M$ = !!(O$ || A$ || $$), E$ = !M$ && /gecko\/(\d+)/i.test(C$.userAgent), P$ = !M$ && /Chrome\/(\d+)/.exec(C$.userAgent), N$ = "webkitFontSmoothing" in _$.documentElement.style, T$ = !M$ && /Apple Computer/.test(C$.vendor), I$ = T$ && (/Mobile\/\w+/.test(C$.userAgent) || C$.maxTouchPoints > 2), R$ = { mac: I$ || /Mac/.test(C$.platform), windows: /Win/.test(C$.platform), linux: /Linux|X11/.test(C$.platform), ie: M$, ie_version: O$ ? _$.documentMode || 6 : A$ ? +A$[1] : $$ ? +$$[1] : 0, gecko: E$, gecko_version: E$ ? +(/Firefox\/(\d+)/.exec(C$.userAgent) || [0, 0])[1] : 0, chrome: !!P$, chrome_version: P$ ? +P$[1] : 0, ios: I$, android: /Android\b/.test(C$.userAgent), webkit: N$, safari: T$, webkit_version: N$ ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0, tabSize: _$.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size" }, D$ = function(e22) { _i(n2, k$); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).text = e23, r2; } return zi(n2, [{ key: "length", get: function() { return this.text.length; } }, { key: "createDOM", value: function(e23) { this.setDOM(e23 || document.createTextNode(this.text)); } }, { key: "sync", value: function(e23) { this.dom || this.createDOM(), this.dom.nodeValue != this.text && (e23 && e23.node == this.dom && (e23.written = true), this.dom.nodeValue = this.text); } }, { key: "reuseDOM", value: function(e23) { e23.nodeType == 3 && this.createDOM(e23); } }, { key: "merge", value: function(e23, t3, r2) { return (!r2 || r2 instanceof n2 && !(this.length - (t3 - e23) + r2.length > 256)) && (this.text = this.text.slice(0, e23) + (r2 ? r2.text : "") + this.text.slice(t3), this.markDirty(), true); } }, { key: "split", value: function(e23) { var t3 = new n2(this.text.slice(e23)); return this.text = this.text.slice(0, e23), this.markDirty(), t3; } }, { key: "localPosFromDOM", value: function(e23, t3) { return e23 == this.dom ? t3 : t3 ? this.text.length : 0; } }, { key: "domAtPos", value: function(e23) { return new y$(this.dom, e23); } }, { key: "domBoundsAround", value: function(e23, t3, n3) { return { from: n3, to: n3 + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling }; } }, { key: "coordsAt", value: function(e23, t3) { return L$(this.dom, e23, t3); } }]), n2; }(), z$ = function(e22) { _i(n2, k$); var t2 = Oi(n2); function n2(e23) { var r2, i2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], o2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; Ri(this, n2), (r2 = t2.call(this)).mark = e23, r2.children = i2, r2.length = o2; var a2, s2 = bi(i2); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = a2.value; u2.setParent(Mi(r2)); } } catch (e24) { s2.e(e24); } finally { s2.f(); } return r2; } return zi(n2, [{ key: "setAttrs", value: function(e23) { if (g$(e23), this.mark.class && (e23.className = this.mark.class), this.mark.attrs) for (var t3 in this.mark.attrs) e23.setAttribute(t3, this.mark.attrs[t3]); return e23; } }, { key: "reuseDOM", value: function(e23) { e23.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e23), this.dirty |= 6); } }, { key: "sync", value: function(e23) { this.dom ? 4 & this.dirty && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), Si(Pi(n2.prototype), "sync", this).call(this, e23); } }, { key: "merge", value: function(e23, t3, r2, i2, o2, a2) { return (!r2 || !(!(r2 instanceof n2 && r2.mark.eq(this.mark)) || e23 && o2 <= 0 || t3 < this.length && a2 <= 0)) && (S$(this, e23, t3, r2 ? r2.children : [], o2 - 1, a2 - 1), this.markDirty(), true); } }, { key: "split", value: function(e23) { var t3, r2 = [], i2 = 0, o2 = -1, a2 = 0, s2 = bi(this.children); try { for (s2.s(); !(t3 = s2.n()).done; ) { var u2 = t3.value, c2 = i2 + u2.length; c2 > e23 && r2.push(i2 < e23 ? u2.split(e23 - i2) : u2), o2 < 0 && i2 >= e23 && (o2 = a2), i2 = c2, a2++; } } catch (e24) { s2.e(e24); } finally { s2.f(); } var l2 = this.length - e23; return this.length = e23, o2 > -1 && (this.children.length = o2, this.markDirty()), new n2(this.mark, r2, l2); } }, { key: "domAtPos", value: function(e23) { return W$(this.dom, this.children, e23); } }, { key: "coordsAt", value: function(e23, t3) { return U$(this, e23, t3); } }]), n2; }(); function L$(e22, t2, n2) { var r2 = e22.nodeValue.length; t2 > r2 && (t2 = r2); var i2 = t2, o2 = t2, a2 = 0; t2 == 0 && n2 < 0 || t2 == r2 && n2 >= 0 ? R$.chrome || R$.gecko || (t2 ? (i2--, a2 = 1) : o2 < r2 && (o2++, a2 = -1)) : n2 < 0 ? i2-- : o2 < r2 && o2++; var s2 = v$(e22, i2, o2).getClientRects(); if (!s2.length) return s$; var u2 = s2[(a2 ? a2 < 0 : n2 >= 0) ? 0 : s2.length - 1]; return R$.safari && !a2 && u2.width == 0 && (u2 = Array.prototype.find.call(s2, function(e23) { return e23.width; }) || u2), a2 ? u$(u2, a2 < 0) : u2 || null; } var B$ = function(e22) { _i(n2, k$); var t2 = Oi(n2); function n2(e23, r2, i2) { var o2; return Ri(this, n2), (o2 = t2.call(this)).widget = e23, o2.length = r2, o2.side = i2, o2.prevWidget = null, o2; } return zi(n2, [{ key: "split", value: function(e23) { var t3 = n2.create(this.widget, this.length - e23, this.side); return this.length -= e23, t3; } }, { key: "sync", value: function() { this.dom && this.widget.updateDOM(this.dom) || (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(this.editorView)), this.dom.contentEditable = "false"); } }, { key: "getSide", value: function() { return this.side; } }, { key: "merge", value: function(e23, t3, r2, i2, o2, a2) { return !(r2 && (!(r2 instanceof n2 && this.widget.compare(r2.widget)) || e23 > 0 && o2 <= 0 || t3 < this.length && a2 <= 0)) && (this.length = e23 + (r2 ? r2.length : 0) + (this.length - t3), true); } }, { key: "become", value: function(e23) { return e23.length == this.length && e23 instanceof n2 && e23.side == this.side && this.widget.constructor == e23.widget.constructor && (this.widget.eq(e23.widget) || this.markDirty(true), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e23.widget, true); } }, { key: "ignoreMutation", value: function() { return true; } }, { key: "ignoreEvent", value: function(e23) { return this.widget.ignoreEvent(e23); } }, { key: "overrideDOMText", get: function() { if (this.length == 0) return US.empty; for (var e23 = this; e23.parent; ) e23 = e23.parent; var t3 = e23.editorView, n3 = t3 && t3.state.doc, r2 = this.posAtStart; return n3 ? n3.slice(r2, r2 + this.length) : US.empty; } }, { key: "domAtPos", value: function(e23) { return e23 == 0 ? y$.before(this.dom) : y$.after(this.dom, e23 == this.length); } }, { key: "domBoundsAround", value: function() { return null; } }, { key: "coordsAt", value: function(e23, t3) { var n3 = this.dom.getClientRects(), r2 = null; if (!n3.length) return s$; for (var i2 = e23 > 0 ? n3.length - 1 : 0; r2 = n3[i2], !(e23 > 0 ? i2 == 0 : i2 == n3.length - 1 || r2.top < r2.bottom); i2 += e23 > 0 ? -1 : 1) ; return e23 == 0 && t3 > 0 || e23 == this.length && t3 <= 0 ? r2 : u$(r2, e23 == 0); } }, { key: "isEditable", get: function() { return false; } }, { key: "destroy", value: function() { Si(Pi(n2.prototype), "destroy", this).call(this), this.dom && this.widget.destroy(this.dom); } }], [{ key: "create", value: function(e23, t3, r2) { return new (e23.customView || n2)(e23, t3, r2); } }]), n2; }(), q$ = function(e22) { _i(n2, B$); var t2 = Oi(n2); function n2() { return Ri(this, n2), t2.apply(this, arguments); } return zi(n2, [{ key: "domAtPos", value: function(e23) { var t3 = this.widget, n3 = t3.topView, r2 = t3.text; return n3 ? F$(e23, 0, n3, r2, function(e24, t4) { return e24.domAtPos(t4); }, function(e24) { return new y$(r2, Math.min(e24, r2.nodeValue.length)); }) : new y$(r2, Math.min(e23, r2.nodeValue.length)); } }, { key: "sync", value: function() { this.setDOM(this.widget.toDOM()); } }, { key: "localPosFromDOM", value: function(e23, t3) { var n3 = this.widget, r2 = n3.topView, i2 = n3.text; return r2 ? V$(e23, t3, r2, i2) : Math.min(t3, this.length); } }, { key: "ignoreMutation", value: function() { return false; } }, { key: "overrideDOMText", get: function() { return null; } }, { key: "coordsAt", value: function(e23, t3) { var n3 = this.widget, r2 = n3.topView, i2 = n3.text; return r2 ? F$(e23, t3, r2, i2, function(e24, t4, n4) { return e24.coordsAt(t4, n4); }, function(e24, t4) { return L$(i2, e24, t4); }) : L$(i2, e23, t3); } }, { key: "destroy", value: function() { var e23; Si(Pi(n2.prototype), "destroy", this).call(this), (e23 = this.widget.topView) === null || e23 === void 0 || e23.destroy(); } }, { key: "isEditable", get: function() { return true; } }]), n2; }(); function F$(e22, t2, n2, r2, i2, o2) { if (n2 instanceof z$) { var a2, s2 = bi(n2.children); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = a2.value, c2 = e$(u2.dom, r2), l2 = c2 ? r2.nodeValue.length : u2.length; if (e22 < l2 || e22 == l2 && u2.getSide() <= 0) return c2 ? F$(e22, t2, u2, r2, i2, o2) : i2(u2, e22, t2); e22 -= l2; } } catch (e23) { s2.e(e23); } finally { s2.f(); } return i2(n2, n2.length, -1); } return n2.dom == r2 ? o2(e22, t2) : i2(n2, e22, t2); } function V$(e22, t2, n2, r2) { if (n2 instanceof z$) { var i2, o2 = bi(n2.children); try { for (o2.s(); !(i2 = o2.n()).done; ) { var a2 = i2.value, s2 = 0, u2 = e$(a2.dom, r2); if (e$(a2.dom, e22)) return s2 + (u2 ? V$(e22, t2, a2, r2) : a2.localPosFromDOM(e22, t2)); s2 += u2 ? r2.nodeValue.length : a2.length; } } catch (e23) { o2.e(e23); } finally { o2.f(); } } else if (n2.dom == r2) return Math.min(t2, r2.nodeValue.length); return n2.localPosFromDOM(e22, t2); } var H$ = function(e22) { _i(n2, k$); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).side = e23, r2; } return zi(n2, [{ key: "length", get: function() { return 0; } }, { key: "merge", value: function() { return false; } }, { key: "become", value: function(e23) { return e23 instanceof n2 && e23.side == this.side; } }, { key: "split", value: function() { return new n2(this.side); } }, { key: "sync", value: function() { if (!this.dom) { var e23 = document.createElement("img"); e23.className = "cm-widgetBuffer", e23.setAttribute("aria-hidden", "true"), this.setDOM(e23); } } }, { key: "getSide", value: function() { return this.side; } }, { key: "domAtPos", value: function(e23) { return y$.before(this.dom); } }, { key: "localPosFromDOM", value: function() { return 0; } }, { key: "domBoundsAround", value: function() { return null; } }, { key: "coordsAt", value: function(e23) { var t3 = this.dom.getBoundingClientRect(), n3 = function(e24, t4) { var n4 = e24.parent, r2 = n4 ? n4.children.indexOf(e24) : -1; for (; n4 && r2 >= 0; ) if (t4 < 0 ? r2 > 0 : r2 < n4.children.length) { var i2 = n4.children[r2 + t4]; if (i2 instanceof D$) { var o2 = i2.coordsAt(t4 < 0 ? i2.length : 0, t4); if (o2) return o2; } r2 += t4; } else { if (!(n4 instanceof z$ && n4.parent)) { var a2 = n4.dom.lastChild; if (a2 && a2.nodeName == "BR") return a2.getClientRects()[0]; break; } r2 = n4.parent.children.indexOf(n4) + (t4 < 0 ? 0 : 1), n4 = n4.parent; } return; }(this, this.side > 0 ? -1 : 1); return n3 && n3.top < t3.bottom && n3.bottom > t3.top ? { left: t3.left, right: t3.right, top: n3.top, bottom: n3.bottom } : t3; } }, { key: "overrideDOMText", get: function() { return US.empty; } }]), n2; }(); function W$(e22, t2, n2) { for (var r2 = 0, i2 = 0; r2 < t2.length; r2++) { var o2 = t2[r2], a2 = i2 + o2.length; if (!(a2 == i2 && o2.getSide() <= 0)) { if (n2 > i2 && n2 < a2 && o2.dom.parentNode == e22) return o2.domAtPos(n2 - i2); if (n2 <= i2) break; i2 = a2; } } for (; r2 > 0; r2--) { var s2 = t2[r2 - 1].dom; if (s2.parentNode == e22) return y$.after(s2); } return new y$(e22, 0); } function J$(e22, t2, n2) { var r2, i2 = e22.children; n2 > 0 && t2 instanceof z$ && i2.length && (r2 = i2[i2.length - 1]) instanceof z$ && r2.mark.eq(t2.mark) ? J$(r2, t2.children[0], n2 - 1) : (i2.push(t2), t2.setParent(e22)), e22.length += t2.length; } function U$(e22, t2, n2) { for (var r2 = 0, i2 = 0; i2 < e22.children.length; i2++) { var o2 = e22.children[i2], a2 = r2 + o2.length, s2 = void 0; if ((n2 <= 0 || a2 == e22.length || o2.getSide() > 0 ? a2 >= t2 : a2 > t2) && (t2 < a2 || i2 + 1 == e22.children.length || (s2 = e22.children[i2 + 1]).length || s2.getSide() > 0)) { var u2 = 0; if (a2 == r2) { if (o2.getSide() <= 0) continue; u2 = n2 = -o2.getSide(); } var c2 = o2.coordsAt(Math.max(0, t2 - r2), n2); return u2 && c2 ? u$(c2, n2 < 0) : c2; } r2 = a2; } var l2 = e22.dom.lastChild; if (!l2) return e22.dom.getBoundingClientRect(); var f2 = n$(l2); return f2[f2.length - 1] || null; } function K$(e22, t2) { for (var n2 in e22) n2 == "class" && t2.class ? t2.class += " " + e22.class : n2 == "style" && t2.style ? t2.style += ";" + e22.style : t2[n2] = e22[n2]; return t2; } function G$(e22, t2) { if (e22 == t2) return true; if (!e22 || !t2) return false; var n2 = Object.keys(e22), r2 = Object.keys(t2); if (n2.length != r2.length) return false; for (var i2 = 0, o2 = n2; i2 < o2.length; i2++) { var a2 = o2[i2]; if (r2.indexOf(a2) == -1 || e22[a2] !== t2[a2]) return false; } return true; } function Q$(e22, t2, n2) { var r2 = null; if (t2) for (var i2 in t2) n2 && i2 in n2 || e22.removeAttribute(r2 = i2); if (n2) for (var o2 in n2) t2 && t2[o2] == n2[o2] || e22.setAttribute(r2 = o2, n2[o2]); return !!r2; } D$.prototype.children = B$.prototype.children = H$.prototype.children = b$; var Y$ = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "eq", value: function(e23) { return false; } }, { key: "updateDOM", value: function(e23) { return false; } }, { key: "compare", value: function(e23) { return this == e23 || this.constructor == e23.constructor && this.eq(e23); } }, { key: "estimatedHeight", get: function() { return -1; } }, { key: "ignoreEvent", value: function(e23) { return true; } }, { key: "customView", get: function() { return null; } }, { key: "destroy", value: function(e23) { } }]), e22; }(), Z$ = function(e22) { return e22[e22.Text = 0] = "Text", e22[e22.WidgetBefore = 1] = "WidgetBefore", e22[e22.WidgetAfter = 2] = "WidgetAfter", e22[e22.WidgetRange = 3] = "WidgetRange", e22; }(Z$ || (Z$ = {})), X$ = function(e22) { _i(n2, y_); var t2 = Oi(n2); function n2(e23, r2, i2, o2) { var a2; return Ri(this, n2), (a2 = t2.call(this)).startSide = e23, a2.endSide = r2, a2.widget = i2, a2.spec = o2, a2; } return zi(n2, [{ key: "heightRelevant", get: function() { return false; } }, { key: "hasHeight", value: function() { return !!this.widget && this.widget.estimatedHeight > -1; } }], [{ key: "mark", value: function(e23) { return new eO(e23); } }, { key: "widget", value: function(e23) { var t3 = e23.side || 0, n3 = !!e23.block; return new nO(e23, t3 += n3 ? t3 > 0 ? 3e8 : -4e8 : t3 > 0 ? 1e8 : -1e8, t3, n3, e23.widget || null, false); } }, { key: "replace", value: function(e23) { var t3, n3, r2 = !!e23.block; if (e23.isBlockGap) t3 = -5e8, n3 = 4e8; else { var i2 = rO(e23, r2); t3 = (i2.start ? r2 ? -3e8 : -1 : 5e8) - 1, n3 = 1 + (i2.end ? r2 ? 2e8 : 1 : -6e8); } return new nO(e23, t3, n3, r2, e23.widget || null, true); } }, { key: "line", value: function(e23) { return new tO(e23); } }, { key: "set", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; return x_.of(e23, t3); } }]), n2; }(); X$.none = x_.empty; var eO = function(e22) { _i(n2, X$); var t2 = Oi(n2); function n2(e23) { var r2; Ri(this, n2); var i2 = rO(e23), o2 = i2.start, a2 = i2.end; return (r2 = t2.call(this, o2 ? -1 : 5e8, a2 ? 1 : -6e8, null, e23)).tagName = e23.tagName || "span", r2.class = e23.class || "", r2.attrs = e23.attributes || null, r2; } return zi(n2, [{ key: "eq", value: function(e23) { return this == e23 || e23 instanceof n2 && this.tagName == e23.tagName && this.class == e23.class && G$(this.attrs, e23.attrs); } }, { key: "range", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23; if (e23 >= t3) throw new RangeError("Mark decorations may not be empty"); return Si(Pi(n2.prototype), "range", this).call(this, e23, t3); } }]), n2; }(); eO.prototype.point = false; var tO = function(e22) { _i(n2, X$); var t2 = Oi(n2); function n2(e23) { return Ri(this, n2), t2.call(this, -2e8, -2e8, null, e23); } return zi(n2, [{ key: "eq", value: function(e23) { return e23 instanceof n2 && G$(this.spec.attributes, e23.spec.attributes); } }, { key: "range", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23; if (t3 != e23) throw new RangeError("Line decoration ranges must be zero-length"); return Si(Pi(n2.prototype), "range", this).call(this, e23, t3); } }]), n2; }(); tO.prototype.mapMode = mC.TrackBefore, tO.prototype.point = true; var nO = function(e22) { _i(n2, X$); var t2 = Oi(n2); function n2(e23, r2, i2, o2, a2, s2) { var u2; return Ri(this, n2), (u2 = t2.call(this, r2, i2, a2, e23)).block = o2, u2.isReplace = s2, u2.mapMode = o2 ? r2 <= 0 ? mC.TrackBefore : mC.TrackAfter : mC.TrackDel, u2; } return zi(n2, [{ key: "type", get: function() { return this.startSide < this.endSide ? Z$.WidgetRange : this.startSide <= 0 ? Z$.WidgetBefore : Z$.WidgetAfter; } }, { key: "heightRelevant", get: function() { return this.block || !!this.widget && this.widget.estimatedHeight >= 5; } }, { key: "eq", value: function(e23) { return e23 instanceof n2 && (t3 = this.widget, r2 = e23.widget, t3 == r2 || !!(t3 && r2 && t3.compare(r2))) && this.block == e23.block && this.startSide == e23.startSide && this.endSide == e23.endSide; var t3, r2; } }, { key: "range", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23; if (this.isReplace && (e23 > t3 || e23 == t3 && this.startSide > 0 && this.endSide <= 0)) throw new RangeError("Invalid range for replacement decoration"); if (!this.isReplace && t3 != e23) throw new RangeError("Widget decorations can only have zero-length ranges"); return Si(Pi(n2.prototype), "range", this).call(this, e23, t3); } }]), n2; }(); function rO(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n2 = e22.inclusiveStart, r2 = e22.inclusiveEnd; return n2 == null && (n2 = e22.inclusive), r2 == null && (r2 = e22.inclusive), { start: n2 != null ? n2 : t2, end: r2 != null ? r2 : t2 }; } function iO(e22, t2, n2) { var r2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i2 = n2.length - 1; i2 >= 0 && n2[i2] + r2 >= e22 ? n2[i2] = Math.max(n2[i2], t2) : n2.push(e22, t2); } nO.prototype.point = true; var oO = function(e22) { _i(n2, k$); var t2 = Oi(n2); function n2() { var e23; return Ri(this, n2), (e23 = t2.apply(this, arguments)).children = [], e23.length = 0, e23.prevAttrs = void 0, e23.attrs = null, e23.breakAfter = 0, e23; } return zi(n2, [{ key: "merge", value: function(e23, t3, r2, i2, o2, a2) { if (r2) { if (!(r2 instanceof n2)) return false; this.dom || r2.transferDOM(this); } return i2 && this.setDeco(r2 ? r2.attrs : null), S$(this, e23, t3, r2 ? r2.children : [], o2, a2), true; } }, { key: "split", value: function(e23) { var t3 = new n2(); if (t3.breakAfter = this.breakAfter, this.length == 0) return t3; var r2 = this.childPos(e23), i2 = r2.i, o2 = r2.off; o2 && (t3.append(this.children[i2].split(o2), 0), this.children[i2].merge(o2, this.children[i2].length, null, false, 0, 0), i2++); for (var a2 = i2; a2 < this.children.length; a2++) t3.append(this.children[a2], 0); for (; i2 > 0 && this.children[i2 - 1].length == 0; ) this.children[--i2].destroy(); return this.children.length = i2, this.markDirty(), this.length = e23, t3; } }, { key: "transferDOM", value: function(e23) { this.dom && (this.markDirty(), e23.setDOM(this.dom), e23.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null); } }, { key: "setDeco", value: function(e23) { G$(this.attrs, e23) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e23); } }, { key: "append", value: function(e23, t3) { J$(this, e23, t3); } }, { key: "addLineDeco", value: function(e23) { var t3 = e23.spec.attributes, n3 = e23.spec.class; t3 && (this.attrs = K$(t3, this.attrs || {})), n3 && (this.attrs = K$({ class: n3 }, this.attrs || {})); } }, { key: "domAtPos", value: function(e23) { return W$(this.dom, this.children, e23); } }, { key: "reuseDOM", value: function(e23) { e23.nodeName == "DIV" && (this.setDOM(e23), this.dirty |= 6); } }, { key: "sync", value: function(e23) { var t3; this.dom ? 4 & this.dirty && (g$(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (Q$(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), Si(Pi(n2.prototype), "sync", this).call(this, e23); for (var r2 = this.dom.lastChild; r2 && k$.get(r2) instanceof z$; ) r2 = r2.lastChild; if (!(r2 && this.length && (r2.nodeName == "BR" || ((t3 = k$.get(r2)) === null || t3 === void 0 ? void 0 : t3.isEditable) != 0 || R$.ios && this.children.some(function(e24) { return e24 instanceof D$; })))) { var i2 = document.createElement("BR"); i2.cmIgnore = true, this.dom.appendChild(i2); } } }, { key: "measureTextSize", value: function() { if (this.children.length == 0 || this.length > 20) return null; var e23, t3 = 0, n3 = bi(this.children); try { for (n3.s(); !(e23 = n3.n()).done; ) { var r2 = e23.value; if (!(r2 instanceof D$)) return null; var i2 = n$(r2.dom); if (i2.length != 1) return null; t3 += i2[0].width; } } catch (e24) { n3.e(e24); } finally { n3.f(); } return { lineHeight: this.dom.getBoundingClientRect().height, charWidth: t3 / this.length }; } }, { key: "coordsAt", value: function(e23, t3) { return U$(this, e23, t3); } }, { key: "become", value: function(e23) { return false; } }, { key: "type", get: function() { return Z$.Text; } }], [{ key: "find", value: function(e23, t3) { for (var r2 = 0, i2 = 0; r2 < e23.children.length; r2++) { var o2 = e23.children[r2], a2 = i2 + o2.length; if (a2 >= t3) { if (o2 instanceof n2) return o2; if (a2 > t3) break; } i2 = a2 + o2.breakAfter; } return null; } }]), n2; }(), aO = function(e22) { _i(n2, k$); var t2 = Oi(n2); function n2(e23, r2, i2) { var o2; return Ri(this, n2), (o2 = t2.call(this)).widget = e23, o2.length = r2, o2.type = i2, o2.breakAfter = 0, o2.prevWidget = null, o2; } return zi(n2, [{ key: "merge", value: function(e23, t3, r2, i2, o2, a2) { return !(r2 && (!(r2 instanceof n2 && this.widget.compare(r2.widget)) || e23 > 0 && o2 <= 0 || t3 < this.length && a2 <= 0)) && (this.length = e23 + (r2 ? r2.length : 0) + (this.length - t3), true); } }, { key: "domAtPos", value: function(e23) { return e23 == 0 ? y$.before(this.dom) : y$.after(this.dom, e23 == this.length); } }, { key: "split", value: function(e23) { var t3 = this.length - e23; this.length = e23; var r2 = new n2(this.widget, t3, this.type); return r2.breakAfter = this.breakAfter, r2; } }, { key: "children", get: function() { return b$; } }, { key: "sync", value: function() { this.dom && this.widget.updateDOM(this.dom) || (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(this.editorView)), this.dom.contentEditable = "false"); } }, { key: "overrideDOMText", get: function() { return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : US.empty; } }, { key: "domBoundsAround", value: function() { return null; } }, { key: "become", value: function(e23) { return e23 instanceof n2 && e23.type == this.type && e23.widget.constructor == this.widget.constructor && (e23.widget.eq(this.widget) || this.markDirty(true), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e23.widget, this.length = e23.length, this.breakAfter = e23.breakAfter, true); } }, { key: "ignoreMutation", value: function() { return true; } }, { key: "ignoreEvent", value: function(e23) { return this.widget.ignoreEvent(e23); } }, { key: "destroy", value: function() { Si(Pi(n2.prototype), "destroy", this).call(this), this.dom && this.widget.destroy(this.dom); } }]), n2; }(), sO = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.doc = t2, this.pos = n2, this.end = r2, this.disallowBlockEffectsFor = i2, this.content = [], this.curLine = null, this.breakAtStart = 0, this.pendingBuffer = 0, this.atCursorPos = true, this.openStart = -1, this.openEnd = -1, this.text = "", this.textOff = 0, this.cursor = t2.iter(), this.skip = n2; } return zi(e22, [{ key: "posCovered", value: function() { if (this.content.length == 0) return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos; var e23 = this.content[this.content.length - 1]; return !(e23.breakAfter || e23 instanceof aO && e23.type == Z$.WidgetBefore); } }, { key: "getLine", value: function() { return this.curLine || (this.content.push(this.curLine = new oO()), this.atCursorPos = true), this.curLine; } }, { key: "flushBuffer", value: function(e23) { this.pendingBuffer && (this.curLine.append(uO(new H$(-1), e23), e23.length), this.pendingBuffer = 0); } }, { key: "addBlockWidget", value: function(e23) { this.flushBuffer([]), this.curLine = null, this.content.push(e23); } }, { key: "finish", value: function(e23) { e23 ? this.pendingBuffer = 0 : this.flushBuffer([]), this.posCovered() || this.getLine(); } }, { key: "buildText", value: function(e23, t2, n2) { for (; e23 > 0; ) { if (this.textOff == this.text.length) { var r2 = this.cursor.next(this.skip), i2 = r2.value, o2 = r2.lineBreak, a2 = r2.done; if (this.skip = 0, a2) throw new Error("Ran out of text content when drawing inline views"); if (o2) { this.posCovered() || this.getLine(), this.content.length ? this.content[this.content.length - 1].breakAfter = 1 : this.breakAtStart = 1, this.flushBuffer([]), this.curLine = null, e23--; continue; } this.text = i2, this.textOff = 0; } var s2 = Math.min(this.text.length - this.textOff, e23, 512); this.flushBuffer(t2.slice(0, n2)), this.getLine().append(uO(new D$(this.text.slice(this.textOff, this.textOff + s2)), t2), n2), this.atCursorPos = true, this.textOff += s2, e23 -= s2, n2 = 0; } } }, { key: "span", value: function(e23, t2, n2, r2) { this.buildText(t2 - e23, n2, r2), this.pos = t2, this.openStart < 0 && (this.openStart = r2); } }, { key: "point", value: function(e23, t2, n2, r2, i2, o2) { if (this.disallowBlockEffectsFor[o2] && n2 instanceof nO) { if (n2.block) throw new RangeError("Block decorations may not be specified via plugins"); if (t2 > this.doc.lineAt(this.pos).to) throw new RangeError("Decorations that replace line breaks may not be specified via plugins"); } var a2 = t2 - e23; if (n2 instanceof nO) if (n2.block) { var s2 = n2.type; s2 != Z$.WidgetAfter || this.posCovered() || this.getLine(), this.addBlockWidget(new aO(n2.widget || new cO("div"), a2, s2)); } else { var u2 = B$.create(n2.widget || new cO("span"), a2, n2.startSide), c2 = this.atCursorPos && !u2.isEditable && i2 <= r2.length && (e23 < t2 || n2.startSide > 0), l2 = !u2.isEditable && (e23 < t2 || n2.startSide <= 0), f2 = this.getLine(); this.pendingBuffer != 2 || c2 || (this.pendingBuffer = 0), this.flushBuffer(r2), c2 && (f2.append(uO(new H$(1), r2), i2), i2 = r2.length + Math.max(0, i2 - r2.length)), f2.append(uO(u2, r2), i2), this.atCursorPos = l2, this.pendingBuffer = l2 ? e23 < t2 ? 1 : 2 : 0; } else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(n2); a2 && (this.textOff + a2 <= this.text.length ? this.textOff += a2 : (this.skip += a2 - (this.text.length - this.textOff), this.text = "", this.textOff = 0), this.pos = t2), this.openStart < 0 && (this.openStart = i2); } }], [{ key: "build", value: function(t2, n2, r2, i2, o2) { var a2 = new e22(t2, n2, r2, o2); return a2.openEnd = x_.spans(i2, n2, r2, a2), a2.openStart < 0 && (a2.openStart = a2.openEnd), a2.finish(a2.openEnd), a2; } }]), e22; }(); function uO(e22, t2) { var n2, r2 = bi(t2); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; e22 = new z$(i2, [e22], e22.length); } } catch (e23) { r2.e(e23); } finally { r2.f(); } return e22; } var cO = function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).tag = e23, r2; } return zi(n2, [{ key: "eq", value: function(e23) { return e23.tag == this.tag; } }, { key: "toDOM", value: function() { return document.createElement(this.tag); } }, { key: "updateDOM", value: function(e23) { return e23.nodeName.toLowerCase() == this.tag; } }]), n2; }(), lO = AC.define(), fO = AC.define(), hO = AC.define(), dO = AC.define(), vO = AC.define(), pO = AC.define(), mO = AC.define({ combine: function(e22) { return e22.some(function(e23) { return e23; }); } }), gO = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "nearest", r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "nearest", i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 5, o2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 5; Ri(this, e22), this.range = t2, this.y = n2, this.x = r2, this.yMargin = i2, this.xMargin = o2; } return zi(e22, [{ key: "map", value: function(t2) { return t2.empty ? this : new e22(this.range.map(t2), this.y, this.x, this.yMargin, this.xMargin); } }]), e22; }(), yO = i_.define({ map: function(e22, t2) { return e22.map(t2); } }); function bO(e22, t2, n2) { var r2 = e22.facet(dO); r2.length ? r2[0](t2) : window.onerror ? window.onerror(String(t2), n2, void 0, void 0, t2) : n2 ? console.error(n2 + ":", t2) : console.error(t2); } var kO = AC.define({ combine: function(e22) { return !e22.length || e22[0]; } }), wO = 0, xO = AC.define(), jO = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.id = t2, this.create = n2, this.domEventHandlers = r2, this.extension = i2(this); } return zi(e22, null, [{ key: "define", value: function(t2, n2) { var r2 = n2 || {}, i2 = r2.eventHandlers, o2 = r2.provide, a2 = r2.decorations; return new e22(wO++, t2, i2, function(e23) { var t3 = [xO.of(e23)]; return a2 && t3.push($O.of(function(t4) { var n3 = t4.plugin(e23); return n3 ? a2(n3) : X$.none; })), o2 && t3.push(o2(e23)), t3; }); } }, { key: "fromClass", value: function(t2, n2) { return e22.define(function(e23) { return new t2(e23); }, n2); } }]), e22; }(), SO = function() { function e22(t2) { Ri(this, e22), this.spec = t2, this.mustUpdate = null, this.value = null; } return zi(e22, [{ key: "update", value: function(e23) { if (this.value) { if (this.mustUpdate) { var t2 = this.mustUpdate; if (this.mustUpdate = null, this.value.update) try { this.value.update(t2); } catch (e24) { if (bO(t2.state, e24, "CodeMirror plugin crashed"), this.value.destroy) try { this.value.destroy(); } catch (e25) { } this.deactivate(); } } } else if (this.spec) try { this.value = this.spec.create(e23); } catch (t3) { bO(e23.state, t3, "CodeMirror plugin crashed"), this.deactivate(); } return this; } }, { key: "destroy", value: function(e23) { var t2; if ((t2 = this.value) === null || t2 === void 0 ? void 0 : t2.destroy) try { this.value.destroy(); } catch (t3) { bO(e23.state, t3, "CodeMirror plugin crashed"); } } }, { key: "deactivate", value: function() { this.spec = this.value = null; } }]), e22; }(), CO = AC.define(), _O = AC.define(), $O = AC.define(), OO = AC.define(), AO = AC.define(), MO = AC.define(), EO = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.fromA = t2, this.toA = n2, this.fromB = r2, this.toB = i2; } return zi(e22, [{ key: "join", value: function(t2) { return new e22(Math.min(this.fromA, t2.fromA), Math.max(this.toA, t2.toA), Math.min(this.fromB, t2.fromB), Math.max(this.toB, t2.toB)); } }, { key: "addToSet", value: function(e23) { for (var t2 = e23.length, n2 = this; t2 > 0; t2--) { var r2 = e23[t2 - 1]; if (!(r2.fromA > n2.toA)) { if (r2.toA < n2.fromA) break; n2 = n2.join(r2), e23.splice(t2 - 1, 1); } } return e23.splice(t2, 0, n2), e23; } }], [{ key: "extendWithRanges", value: function(t2, n2) { if (n2.length == 0) return t2; for (var r2 = [], i2 = 0, o2 = 0, a2 = 0, s2 = 0; ; i2++) { for (var u2 = i2 == t2.length ? null : t2[i2], c2 = a2 - s2, l2 = u2 ? u2.fromB : 1e9; o2 < n2.length && n2[o2] < l2; ) { var f2 = n2[o2], h2 = n2[o2 + 1], d2 = Math.max(s2, f2), v2 = Math.min(l2, h2); if (d2 <= v2 && new e22(d2 + c2, v2 + c2, d2, v2).addToSet(r2), h2 > l2) break; o2 += 2; } if (!u2) return r2; new e22(u2.fromA, u2.toA, u2.fromB, u2.toB).addToSet(r2), a2 = u2.toA, s2 = u2.toB; } } }]), e22; }(), PO = function() { function e22(t2, n2, r2) { Ri(this, e22), this.view = t2, this.state = n2, this.transactions = r2, this.flags = 0, this.startState = t2.state, this.changes = yC.empty(this.startState.doc.length); var i2, o2 = bi(r2); try { for (o2.s(); !(i2 = o2.n()).done; ) { var a2 = i2.value; this.changes = this.changes.compose(a2.changes); } } catch (e23) { o2.e(e23); } finally { o2.f(); } var s2 = []; this.changes.iterChangedRanges(function(e23, t3, n3, r3) { return s2.push(new EO(e23, t3, n3, r3)); }), this.changedRanges = s2; var u2 = t2.hasFocus; u2 != t2.inputState.notifiedFocused && (t2.inputState.notifiedFocused = u2, this.flags |= 1); } return zi(e22, [{ key: "viewportChanged", get: function() { return (4 & this.flags) > 0; } }, { key: "heightChanged", get: function() { return (2 & this.flags) > 0; } }, { key: "geometryChanged", get: function() { return this.docChanged || (10 & this.flags) > 0; } }, { key: "focusChanged", get: function() { return (1 & this.flags) > 0; } }, { key: "docChanged", get: function() { return !this.changes.empty; } }, { key: "selectionSet", get: function() { return this.transactions.some(function(e23) { return e23.selection; }); } }, { key: "empty", get: function() { return this.flags == 0 && this.transactions.length == 0; } }], [{ key: "create", value: function(t2, n2, r2) { return new e22(t2, n2, r2); } }]), e22; }(), NO = function(e22) { return e22[e22.LTR = 0] = "LTR", e22[e22.RTL = 1] = "RTL", e22; }(NO || (NO = {})), TO = NO.LTR, IO = NO.RTL; function RO(e22) { for (var t2 = [], n2 = 0; n2 < e22.length; n2++) t2.push(1 << +e22[n2]); return t2; } for (var DO = RO("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), zO = RO("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), LO = /* @__PURE__ */ Object.create(null), BO = [], qO = 0, FO = ["()", "[]", "{}"]; qO < FO.length; qO++) { var VO = FO[qO], HO = VO.charCodeAt(0), WO = VO.charCodeAt(1); LO[HO] = WO, LO[WO] = -HO; } function JO(e22) { return e22 <= 247 ? DO[e22] : 1424 <= e22 && e22 <= 1524 ? 2 : 1536 <= e22 && e22 <= 1785 ? zO[e22 - 1536] : 1774 <= e22 && e22 <= 2220 ? 4 : 8192 <= e22 && e22 <= 8203 || e22 == 8204 ? 256 : 1; } var UO = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/, KO = function() { function e22(t2, n2, r2) { Ri(this, e22), this.from = t2, this.to = n2, this.level = r2; } return zi(e22, [{ key: "dir", get: function() { return this.level % 2 ? IO : TO; } }, { key: "side", value: function(e23, t2) { return this.dir == t2 == e23 ? this.to : this.from; } }], [{ key: "find", value: function(e23, t2, n2, r2) { for (var i2 = -1, o2 = 0; o2 < e23.length; o2++) { var a2 = e23[o2]; if (a2.from <= t2 && a2.to >= t2) { if (a2.level == n2) return o2; (i2 < 0 || (r2 != 0 ? r2 < 0 ? a2.from < t2 : a2.to > t2 : e23[i2].level > a2.level)) && (i2 = o2); } } if (i2 < 0) throw new RangeError("Index out of range"); return i2; } }]), e22; }(), GO = []; function QO(e22) { return [new KO(0, e22, 0)]; } var YO = ""; function ZO(e22, t2, n2, r2, i2) { var o2, a2 = r2.head - e22.from, s2 = -1; if (a2 == 0) { if (!i2 || !e22.length) return null; t2[0].level != n2 && (a2 = t2[0].side(false, n2), s2 = 0); } else if (a2 == e22.length) { if (i2) return null; var u2 = t2[t2.length - 1]; u2.level != n2 && (a2 = u2.side(true, n2), s2 = t2.length - 1); } s2 < 0 && (s2 = KO.find(t2, a2, (o2 = r2.bidiLevel) !== null && o2 !== void 0 ? o2 : -1, r2.assoc)); var c2 = t2[s2]; a2 == c2.side(i2, n2) && (a2 = (c2 = t2[s2 += i2 ? 1 : -1]).side(!i2, n2)); var l2 = i2 == (c2.dir == n2), f2 = sC(e22.text, a2, l2); if (YO = e22.text.slice(Math.min(a2, f2), Math.max(a2, f2)), f2 != c2.side(i2, n2)) return _C.cursor(f2 + e22.from, l2 ? -1 : 1, c2.level); var h2 = s2 == (i2 ? t2.length - 1 : 0) ? null : t2[s2 + (i2 ? 1 : -1)]; return h2 || c2.level == n2 ? h2 && h2.level < c2.level ? _C.cursor(h2.side(!i2, n2) + e22.from, i2 ? 1 : -1, h2.level) : _C.cursor(f2 + e22.from, i2 ? -1 : 1, c2.level) : _C.cursor(i2 ? e22.to : e22.from, i2 ? -1 : 1, n2); } var XO = function() { function e22(t2, n2) { Ri(this, e22), this.points = t2, this.text = "", this.lineSeparator = n2.facet(m_.lineSeparator); } return zi(e22, [{ key: "append", value: function(e23) { this.text += e23; } }, { key: "lineBreak", value: function() { this.text += "\uFFFF"; } }, { key: "readRange", value: function(e23, t2) { if (!e23) return this; for (var n2 = e23.parentNode, r2 = e23; ; ) { this.findPointBefore(n2, r2), this.readNode(r2); var i2 = r2.nextSibling; if (i2 == t2) break; var o2 = k$.get(r2), a2 = k$.get(i2); (o2 && a2 ? o2.breakAfter : (o2 ? o2.breakAfter : eA(r2)) || eA(i2) && (r2.nodeName != "BR" || r2.cmIgnore)) && this.lineBreak(), r2 = i2; } return this.findPointBefore(n2, t2), this; } }, { key: "readTextNode", value: function(e23) { var t2, n2 = e23.nodeValue, r2 = bi(this.points); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value; i2.node == e23 && (i2.pos = this.text.length + Math.min(i2.offset, n2.length)); } } catch (e24) { r2.e(e24); } finally { r2.f(); } for (var o2 = 0, a2 = this.lineSeparator ? null : /\r\n?|\n/g; ; ) { var s2 = -1, u2 = 1, c2 = void 0; if (this.lineSeparator ? (s2 = n2.indexOf(this.lineSeparator, o2), u2 = this.lineSeparator.length) : (c2 = a2.exec(n2)) && (s2 = c2.index, u2 = c2[0].length), this.append(n2.slice(o2, s2 < 0 ? n2.length : s2)), s2 < 0) break; if (this.lineBreak(), u2 > 1) { var l2, f2 = bi(this.points); try { for (f2.s(); !(l2 = f2.n()).done; ) { var h2 = l2.value; h2.node == e23 && h2.pos > this.text.length && (h2.pos -= u2 - 1); } } catch (e24) { f2.e(e24); } finally { f2.f(); } } o2 = s2 + u2; } } }, { key: "readNode", value: function(e23) { if (!e23.cmIgnore) { var t2 = k$.get(e23), n2 = t2 && t2.overrideDOMText; if (n2 != null) { this.findPointInside(e23, n2.length); for (var r2 = n2.iter(); !r2.next().done; ) r2.lineBreak ? this.lineBreak() : this.append(r2.value); } else e23.nodeType == 3 ? this.readTextNode(e23) : e23.nodeName == "BR" ? e23.nextSibling && this.lineBreak() : e23.nodeType == 1 && this.readRange(e23.firstChild, null); } } }, { key: "findPointBefore", value: function(e23, t2) { var n2, r2 = bi(this.points); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; i2.node == e23 && e23.childNodes[i2.offset] == t2 && (i2.pos = this.text.length); } } catch (e24) { r2.e(e24); } finally { r2.f(); } } }, { key: "findPointInside", value: function(e23, t2) { var n2, r2 = bi(this.points); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; (e23.nodeType == 3 ? i2.node == e23 : e23.contains(i2.node)) && (i2.pos = this.text.length + Math.min(t2, i2.offset)); } } catch (e24) { r2.e(e24); } finally { r2.f(); } } }]), e22; }(); function eA(e22) { return e22.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e22.nodeName); } var tA = zi(function e4(t2, n2) { Ri(this, e4), this.node = t2, this.offset = n2, this.pos = -1; }), nA = function(e22) { _i(n2, k$); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).view = e23, r2.compositionDeco = X$.none, r2.decorations = [], r2.dynamicDecorationMap = [], r2.minWidth = 0, r2.minWidthFrom = 0, r2.minWidthTo = 0, r2.impreciseAnchor = null, r2.impreciseHead = null, r2.forceSelection = false, r2.lastUpdate = Date.now(), r2.setDOM(e23.contentDOM), r2.children = [new oO()], r2.children[0].setParent(Mi(r2)), r2.updateDeco(), r2.updateInner([new EO(0, 0, 0, e23.state.doc.length)], 0), r2; } return zi(n2, [{ key: "root", get: function() { return this.view.root; } }, { key: "editorView", get: function() { return this.view; } }, { key: "length", get: function() { return this.view.state.doc.length; } }, { key: "update", value: function(e23) { var t3 = this, n3 = e23.changedRanges; this.minWidth > 0 && n3.length && (n3.every(function(e24) { var n4 = e24.fromA; return e24.toA < t3.minWidthFrom || n4 > t3.minWidthTo; }) ? (this.minWidthFrom = e23.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e23.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0), this.view.inputState.composing < 0 ? this.compositionDeco = X$.none : (e23.transactions.length || this.dirty) && (this.compositionDeco = function(e24, t4) { var n4 = oA(e24); if (!n4) return X$.none; var r3 = n4.from, i3 = n4.to, o3 = n4.node, a3 = n4.text, s3 = t4.mapPos(r3, 1), u3 = Math.max(s3, t4.mapPos(i3, -1)), c3 = e24.state, l2 = o3.nodeType == 3 ? o3.nodeValue : new XO([], c3).readRange(o3.firstChild, null).text; if (u3 - s3 < l2.length) if (c3.doc.sliceString(s3, Math.min(c3.doc.length, s3 + l2.length), "\uFFFF") == l2) u3 = s3 + l2.length; else { if (c3.doc.sliceString(Math.max(0, u3 - l2.length), u3, "\uFFFF") != l2) return X$.none; s3 = u3 - l2.length; } else if (c3.doc.sliceString(s3, u3, "\uFFFF") != l2) return X$.none; var f2 = k$.get(o3); f2 instanceof q$ ? f2 = f2.widget.topView : f2 && (f2.parent = null); return X$.set(X$.replace({ widget: new aA(o3, a3, f2), inclusive: true }).range(s3, u3)); }(this.view, e23.changes)), (R$.ie || R$.chrome) && !this.compositionDeco.size && e23 && e23.state.doc.lines != e23.startState.doc.lines && (this.forceSelection = true); var r2, i2, o2, a2, s2 = this.decorations, u2 = this.updateDeco(), c2 = (r2 = s2, i2 = u2, o2 = e23.changes, a2 = new cA(), x_.compare(r2, i2, o2, a2), a2.changes); return n3 = EO.extendWithRanges(n3, c2), (this.dirty != 0 || n3.length != 0) && (this.updateInner(n3, e23.startState.doc.length), e23.transactions.length && (this.lastUpdate = Date.now()), true); } }, { key: "updateInner", value: function(e23, t3) { var n3 = this; this.view.viewState.mustMeasureContent = true, this.updateChildren(e23, t3); var r2 = this.view.observer; r2.ignore(function() { n3.dom.style.height = n3.view.viewState.contentHeight + "px", n3.dom.style.flexBasis = n3.minWidth ? n3.minWidth + "px" : ""; var e24 = R$.chrome || R$.ios ? { node: r2.selectionRange.focusNode, written: false } : void 0; n3.sync(e24), n3.dirty = 0, e24 && (e24.written || r2.selectionRange.focusNode != e24.node) && (n3.forceSelection = true), n3.dom.style.height = ""; }); var i2 = []; if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length) { var o2, a2 = bi(this.children); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; s2 instanceof aO && s2.widget instanceof iA && i2.push(s2.dom); } } catch (e24) { a2.e(e24); } finally { a2.f(); } } r2.updateGaps(i2); } }, { key: "updateChildren", value: function(e23, t3) { for (var n3 = this.childCursor(t3), r2 = e23.length - 1; ; r2--) { var i2 = r2 >= 0 ? e23[r2] : null; if (!i2) break; var o2 = i2.fromA, a2 = i2.toA, s2 = i2.fromB, u2 = i2.toB, c2 = sO.build(this.view.state.doc, s2, u2, this.decorations, this.dynamicDecorationMap), l2 = c2.content, f2 = c2.breakAtStart, h2 = c2.openStart, d2 = c2.openEnd, v2 = n3.findPos(a2, 1), p2 = v2.i, m2 = v2.off, g2 = n3.findPos(o2, -1); j$(this, g2.i, g2.off, p2, m2, l2, f2, h2, d2); } } }, { key: "updateSelection", value: function() { var e23 = this, t3 = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], n3 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; if (!t3 && this.view.observer.selectionRange.focusNode || this.view.observer.readSelectionRange(), !(!n3 && !this.mayControlSelection() || R$.ios && this.view.inputState.rapidCompositionStart)) { var r2 = this.forceSelection; this.forceSelection = false; var i2 = this.view.state.selection.main, o2 = this.domAtPos(i2.anchor), a2 = i2.empty ? o2 : this.domAtPos(i2.head); if (R$.gecko && i2.empty && rA(o2)) { var s2 = document.createTextNode(""); this.view.observer.ignore(function() { return o2.node.insertBefore(s2, o2.node.childNodes[o2.offset] || null); }), o2 = a2 = new y$(s2, 0), r2 = true; } var u2 = this.view.observer.selectionRange; !r2 && u2.focusNode && r$(o2.node, o2.offset, u2.anchorNode, u2.anchorOffset) && r$(a2.node, a2.offset, u2.focusNode, u2.focusOffset) || (this.view.observer.ignore(function() { R$.android && R$.chrome && e23.dom.contains(u2.focusNode) && lA(u2.focusNode, e23.dom) && (e23.dom.blur(), e23.dom.focus({ preventScroll: true })); var t4 = X_(e23.root); if (t4) if (i2.empty) { if (R$.gecko) { var n4 = uA(o2.node, o2.offset); if (n4 && n4 != 3) { var r3 = sA(o2.node, o2.offset, n4 == 1 ? 1 : -1); r3 && (o2 = new y$(r3, n4 == 1 ? 0 : r3.nodeValue.length)); } } t4.collapse(o2.node, o2.offset), i2.bidiLevel != null && u2.cursorBidiLevel != null && (u2.cursorBidiLevel = i2.bidiLevel); } else if (t4.extend) t4.collapse(o2.node, o2.offset), t4.extend(a2.node, a2.offset); else { var s3 = document.createRange(); if (i2.anchor > i2.head) { var c2 = [a2, o2]; o2 = c2[0], a2 = c2[1]; } s3.setEnd(a2.node, a2.offset), s3.setStart(o2.node, o2.offset), t4.removeAllRanges(), t4.addRange(s3); } }), this.view.observer.setSelectionRange(o2, a2)), this.impreciseAnchor = o2.precise ? null : new y$(u2.anchorNode, u2.anchorOffset), this.impreciseHead = a2.precise ? null : new y$(u2.focusNode, u2.focusOffset); } } }, { key: "enforceCursorAssoc", value: function() { if (!this.compositionDeco.size) { var e23 = this.view.state.selection.main, t3 = X_(this.root); if (t3 && e23.empty && e23.assoc && t3.modify) { var n3 = oO.find(this, e23.head); if (n3) { var r2 = n3.posAtStart; if (e23.head != r2 && e23.head != r2 + n3.length) { var i2 = this.coordsAt(e23.head, -1), o2 = this.coordsAt(e23.head, 1); if (i2 && o2 && !(i2.bottom > o2.top)) { var a2 = this.domAtPos(e23.head + e23.assoc); t3.collapse(a2.node, a2.offset), t3.modify("move", e23.assoc < 0 ? "forward" : "backward", "lineboundary"); } } } } } } }, { key: "mayControlSelection", value: function() { var e23 = this.root.activeElement; return e23 == this.dom || t$(this.dom, this.view.observer.selectionRange) && !(e23 && this.dom.contains(e23)); } }, { key: "nearest", value: function(e23) { for (var t3 = e23; t3; ) { var n3 = k$.get(t3); if (n3 && n3.rootView == this) return n3; t3 = t3.parentNode; } return null; } }, { key: "posFromDOM", value: function(e23, t3) { var n3 = this.nearest(e23); if (!n3) throw new RangeError("Trying to find position for a DOM position outside of the document"); return n3.localPosFromDOM(e23, t3) + n3.posAtStart; } }, { key: "domAtPos", value: function(e23) { for (var t3 = this.childCursor().findPos(e23, -1), n3 = t3.i, r2 = t3.off; n3 < this.children.length - 1; ) { var i2 = this.children[n3]; if (r2 < i2.length || i2 instanceof oO) break; n3++, r2 = 0; } return this.children[n3].domAtPos(r2); } }, { key: "coordsAt", value: function(e23, t3) { for (var n3 = this.length, r2 = this.children.length - 1; ; r2--) { var i2 = this.children[r2], o2 = n3 - i2.breakAfter - i2.length; if (e23 > o2 || e23 == o2 && i2.type != Z$.WidgetBefore && i2.type != Z$.WidgetAfter && (!r2 || t3 == 2 || this.children[r2 - 1].breakAfter || this.children[r2 - 1].type == Z$.WidgetBefore && t3 > -2)) return i2.coordsAt(e23 - o2, t3); n3 = o2; } } }, { key: "measureVisibleLineHeights", value: function(e23) { for (var t3 = [], n3 = e23.from, r2 = e23.to, i2 = this.view.contentDOM.clientWidth, o2 = i2 > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, a2 = -1, s2 = this.view.textDirection == NO.LTR, u2 = 0, c2 = 0; c2 < this.children.length; c2++) { var l2 = this.children[c2], f2 = u2 + l2.length; if (f2 > r2) break; if (u2 >= n3) { var h2 = l2.dom.getBoundingClientRect(); if (t3.push(h2.height), o2) { var d2 = l2.dom.lastChild, v2 = d2 ? n$(d2) : []; if (v2.length) { var p2 = v2[v2.length - 1], m2 = s2 ? p2.right - h2.left : h2.right - p2.left; m2 > a2 && (a2 = m2, this.minWidth = i2, this.minWidthFrom = u2, this.minWidthTo = f2); } } } u2 = f2 + l2.breakAfter; } return t3; } }, { key: "textDirectionAt", value: function(e23) { var t3 = this.childPos(e23, 1).i; return getComputedStyle(this.children[t3].dom).direction == "rtl" ? NO.RTL : NO.LTR; } }, { key: "measureTextSize", value: function() { var e23, t3 = this, n3 = bi(this.children); try { for (n3.s(); !(e23 = n3.n()).done; ) { var r2 = e23.value; if (r2 instanceof oO) { var i2 = r2.measureTextSize(); if (i2) return i2; } } } catch (e24) { n3.e(e24); } finally { n3.f(); } var o2, a2, s2 = document.createElement("div"); return s2.className = "cm-line", s2.style.width = "99999px", s2.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(function() { t3.dom.appendChild(s2); var e24 = n$(s2.firstChild)[0]; o2 = s2.getBoundingClientRect().height, a2 = e24 ? e24.width / 27 : 7, s2.remove(); }), { lineHeight: o2, charWidth: a2 }; } }, { key: "childCursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.length, t3 = this.children.length; return t3 && (e23 -= this.children[--t3].length), new x$(this.children, e23, t3); } }, { key: "computeBlockGapDeco", value: function() { for (var e23 = [], t3 = this.view.viewState, n3 = 0, r2 = 0; ; r2++) { var i2 = r2 == t3.viewports.length ? null : t3.viewports[r2], o2 = i2 ? i2.from - 1 : this.length; if (o2 > n3) { var a2 = t3.lineBlockAt(o2).bottom - t3.lineBlockAt(n3).top; e23.push(X$.replace({ widget: new iA(a2), block: true, inclusive: true, isBlockGap: true }).range(n3, o2)); } if (!i2) break; n3 = i2.to + 1; } return X$.set(e23); } }, { key: "updateDeco", value: function() { for (var e23 = this, t3 = this.view.state.facet($O).map(function(t4, n4) { return (e23.dynamicDecorationMap[n4] = typeof t4 == "function") ? t4(e23.view) : t4; }), n3 = t3.length; n3 < t3.length + 3; n3++) this.dynamicDecorationMap[n3] = false; return this.decorations = [].concat(Ni(t3), [this.compositionDeco, this.computeBlockGapDeco(), this.view.viewState.lineGapDeco]); } }, { key: "scrollIntoView", value: function(e23) { var t3, n3 = this, r2 = e23.range, i2 = this.coordsAt(r2.head, r2.empty ? r2.assoc : r2.head > r2.anchor ? -1 : 1); if (i2) { !r2.empty && (t3 = this.coordsAt(r2.anchor, r2.anchor > r2.head ? -1 : 1)) && (i2 = { left: Math.min(i2.left, t3.left), top: Math.min(i2.top, t3.top), right: Math.max(i2.right, t3.right), bottom: Math.max(i2.bottom, t3.bottom) }); var o2, a2 = 0, s2 = 0, u2 = 0, c2 = 0, l2 = bi(this.view.state.facet(AO).map(function(e24) { return e24(n3.view); })); try { for (l2.s(); !(o2 = l2.n()).done; ) { var f2 = o2.value; if (f2) { var h2 = f2.left, d2 = f2.right, v2 = f2.top, p2 = f2.bottom; h2 != null && (a2 = Math.max(a2, h2)), d2 != null && (s2 = Math.max(s2, d2)), v2 != null && (u2 = Math.max(u2, v2)), p2 != null && (c2 = Math.max(c2, p2)); } } } catch (e24) { l2.e(e24); } finally { l2.f(); } var m2 = { left: i2.left - a2, top: i2.top - u2, right: i2.right + s2, bottom: i2.bottom + c2 }; !function(e24, t4, n4, r3, i3, o3, a3, s3) { for (var u3 = e24.ownerDocument, c3 = u3.defaultView, l3 = e24; l3; ) if (l3.nodeType == 1) { var f3 = void 0, h3 = l3 == u3.body; if (h3) f3 = c$(c3); else { if (l3.scrollHeight <= l3.clientHeight && l3.scrollWidth <= l3.clientWidth) { l3 = l3.parentNode; continue; } var d3 = l3.getBoundingClientRect(); f3 = { left: d3.left, right: d3.left + l3.clientWidth, top: d3.top, bottom: d3.top + l3.clientHeight }; } var v3 = 0, p3 = 0; if (i3 == "nearest") t4.top < f3.top ? (p3 = -(f3.top - t4.top + a3), n4 > 0 && t4.bottom > f3.bottom + p3 && (p3 = t4.bottom - f3.bottom + p3 + a3)) : t4.bottom > f3.bottom && (p3 = t4.bottom - f3.bottom + a3, n4 < 0 && t4.top - p3 < f3.top && (p3 = -(f3.top + p3 - t4.top + a3))); else { var m3 = t4.bottom - t4.top, g2 = f3.bottom - f3.top; p3 = (i3 == "center" && m3 <= g2 ? t4.top + m3 / 2 - g2 / 2 : i3 == "start" || i3 == "center" && n4 < 0 ? t4.top - a3 : t4.bottom - g2 + a3) - f3.top; } if (r3 == "nearest" ? t4.left < f3.left ? (v3 = -(f3.left - t4.left + o3), n4 > 0 && t4.right > f3.right + v3 && (v3 = t4.right - f3.right + v3 + o3)) : t4.right > f3.right && (v3 = t4.right - f3.right + o3, n4 < 0 && t4.left < f3.left + v3 && (v3 = -(f3.left + v3 - t4.left + o3))) : v3 = (r3 == "center" ? t4.left + (t4.right - t4.left) / 2 - (f3.right - f3.left) / 2 : r3 == "start" == s3 ? t4.left - o3 : t4.right - (f3.right - f3.left) + o3) - f3.left, v3 || p3) if (h3) c3.scrollBy(v3, p3); else { if (p3) { var y2 = l3.scrollTop; l3.scrollTop += p3, p3 = l3.scrollTop - y2; } if (v3) { var b2 = l3.scrollLeft; l3.scrollLeft += v3, v3 = l3.scrollLeft - b2; } t4 = { left: t4.left - v3, top: t4.top - p3, right: t4.right - v3, bottom: t4.bottom - p3 }; } if (h3) break; l3 = l3.assignedSlot || l3.parentNode, r3 = i3 = "nearest"; } else { if (l3.nodeType != 11) break; l3 = l3.host; } }(this.view.scrollDOM, m2, r2.head < r2.anchor ? -1 : 1, e23.x, e23.y, e23.xMargin, e23.yMargin, this.view.textDirection == NO.LTR); } } }]), n2; }(); function rA(e22) { return e22.node.nodeType == 1 && e22.node.firstChild && (e22.offset == 0 || e22.node.childNodes[e22.offset - 1].contentEditable == "false") && (e22.offset == e22.node.childNodes.length || e22.node.childNodes[e22.offset].contentEditable == "false"); } var iA = function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).height = e23, r2; } return zi(n2, [{ key: "toDOM", value: function() { var e23 = document.createElement("div"); return this.updateDOM(e23), e23; } }, { key: "eq", value: function(e23) { return e23.height == this.height; } }, { key: "updateDOM", value: function(e23) { return e23.style.height = this.height + "px", true; } }, { key: "estimatedHeight", get: function() { return this.height; } }]), n2; }(); function oA(e22) { var t2 = e22.observer.selectionRange, n2 = t2.focusNode && sA(t2.focusNode, t2.focusOffset, 0); if (!n2) return null; var r2 = e22.docView.nearest(n2); if (!r2) return null; if (r2 instanceof oO) { for (var i2 = n2; i2.parentNode != r2.dom; ) i2 = i2.parentNode; for (var o2 = i2.previousSibling; o2 && !k$.get(o2); ) o2 = o2.previousSibling; var a2 = o2 ? k$.get(o2).posAtEnd : r2.posAtStart; return { from: a2, to: a2, node: i2, text: n2 }; } for (; ; ) { var s2 = r2.parent; if (!s2) return null; if (s2 instanceof oO) break; r2 = s2; } var u2 = r2.posAtStart; return { from: u2, to: u2 + r2.length, node: r2.dom, text: n2 }; } var aA = function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2(e23, r2, i2) { var o2; return Ri(this, n2), (o2 = t2.call(this)).top = e23, o2.text = r2, o2.topView = i2, o2; } return zi(n2, [{ key: "eq", value: function(e23) { return this.top == e23.top && this.text == e23.text; } }, { key: "toDOM", value: function() { return this.top; } }, { key: "ignoreEvent", value: function() { return false; } }, { key: "customView", get: function() { return q$; } }]), n2; }(); function sA(e22, t2, n2) { for (; ; ) { if (e22.nodeType == 3) return e22; if (e22.nodeType == 1 && t2 > 0 && n2 <= 0) t2 = a$(e22 = e22.childNodes[t2 - 1]); else { if (!(e22.nodeType == 1 && t2 < e22.childNodes.length && n2 >= 0)) return null; e22 = e22.childNodes[t2], t2 = 0; } } } function uA(e22, t2) { return e22.nodeType != 1 ? 0 : (t2 && e22.childNodes[t2 - 1].contentEditable == "false" ? 1 : 0) | (t2 < e22.childNodes.length && e22.childNodes[t2].contentEditable == "false" ? 2 : 0); } var cA = function() { function e22() { Ri(this, e22), this.changes = []; } return zi(e22, [{ key: "compareRange", value: function(e23, t2) { iO(e23, t2, this.changes); } }, { key: "comparePoint", value: function(e23, t2) { iO(e23, t2, this.changes); } }]), e22; }(); function lA(e22, t2) { for (var n2 = e22; n2 && n2 != t2; n2 = n2.assignedSlot || n2.parentNode) if (n2.nodeType == 1 && n2.contentEditable == "false") return true; return false; } function fA(e22, t2) { return t2.left > e22 ? t2.left - e22 : Math.max(0, e22 - t2.right); } function hA(e22, t2) { return t2.top > e22 ? t2.top - e22 : Math.max(0, e22 - t2.bottom); } function dA(e22, t2) { return e22.top < t2.bottom - 1 && e22.bottom > t2.top + 1; } function vA(e22, t2) { return t2 < e22.top ? { top: t2, left: e22.left, right: e22.right, bottom: e22.bottom } : e22; } function pA(e22, t2) { return t2 > e22.bottom ? { top: e22.top, left: e22.left, right: e22.right, bottom: t2 } : e22; } function mA(e22, t2, n2) { for (var r2, i2, o2, a2, s2, u2, c2, l2, f2 = e22.firstChild; f2; f2 = f2.nextSibling) for (var h2 = n$(f2), d2 = 0; d2 < h2.length; d2++) { var v2 = h2[d2]; i2 && dA(i2, v2) && (v2 = vA(pA(v2, i2.bottom), i2.top)); var p2 = fA(t2, v2), m2 = hA(n2, v2); if (p2 == 0 && m2 == 0) return f2.nodeType == 3 ? gA(f2, t2, n2) : mA(f2, t2, n2); (!r2 || a2 > m2 || a2 == m2 && o2 > p2) && (r2 = f2, i2 = v2, o2 = p2, a2 = m2), p2 == 0 ? n2 > v2.bottom && (!c2 || c2.bottom < v2.bottom) ? (s2 = f2, c2 = v2) : n2 < v2.top && (!l2 || l2.top > v2.top) && (u2 = f2, l2 = v2) : c2 && dA(c2, v2) ? c2 = pA(c2, v2.bottom) : l2 && dA(l2, v2) && (l2 = vA(l2, v2.top)); } if (c2 && c2.bottom >= n2 ? (r2 = s2, i2 = c2) : l2 && l2.top <= n2 && (r2 = u2, i2 = l2), !r2) return { node: e22, offset: 0 }; var g2 = Math.max(i2.left, Math.min(i2.right, t2)); return r2.nodeType == 3 ? gA(r2, g2, n2) : o2 || r2.contentEditable != "true" ? { node: e22, offset: Array.prototype.indexOf.call(e22.childNodes, r2) + (t2 >= (i2.left + i2.right) / 2 ? 1 : 0) } : mA(r2, g2, n2); } function gA(e22, t2, n2) { for (var r2 = e22.nodeValue.length, i2 = -1, o2 = 1e9, a2 = 0, s2 = 0; s2 < r2; s2++) for (var u2 = v$(e22, s2, s2 + 1).getClientRects(), c2 = 0; c2 < u2.length; c2++) { var l2 = u2[c2]; if (l2.top != l2.bottom) { a2 || (a2 = t2 - l2.left); var f2 = (l2.top > n2 ? l2.top - n2 : n2 - l2.bottom) - 1; if (l2.left - 1 <= t2 && l2.right + 1 >= t2 && f2 < o2) { var h2 = t2 >= (l2.left + l2.right) / 2, d2 = h2; if (R$.chrome || R$.gecko) v$(e22, s2).getBoundingClientRect().left == l2.right && (d2 = !h2); if (f2 <= 0) return { node: e22, offset: s2 + (d2 ? 1 : 0) }; i2 = s2 + (d2 ? 1 : 0), o2 = f2; } } } return { node: e22, offset: i2 > -1 ? i2 : a2 > 0 ? e22.nodeValue.length : 0 }; } function yA(e22, t2, n2) { var r2, i2, o2 = t2.x, a2 = t2.y, s2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, u2 = e22.contentDOM.getBoundingClientRect(), c2 = u2.top + e22.viewState.paddingTop, l2 = e22.viewState.docHeight, f2 = a2 - c2; if (f2 < 0) return 0; if (f2 > l2) return e22.state.doc.length; for (var h2 = e22.defaultLineHeight / 2, d2 = false; (i2 = e22.elementAtHeight(f2)).type != Z$.Text; ) for (; !((f2 = s2 > 0 ? i2.bottom + h2 : i2.top - h2) >= 0 && f2 <= l2); ) { if (d2) return n2 ? null : 0; d2 = true, s2 = -s2; } a2 = c2 + f2; var v2 = i2.from; if (v2 < e22.viewport.from) return e22.viewport.from == 0 ? 0 : n2 ? null : bA(e22, u2, i2, o2, a2); if (v2 > e22.viewport.to) return e22.viewport.to == e22.state.doc.length ? e22.state.doc.length : n2 ? null : bA(e22, u2, i2, o2, a2); var p2 = e22.dom.ownerDocument, m2 = e22.root.elementFromPoint ? e22.root : p2, g2 = m2.elementFromPoint(o2, a2); g2 && !e22.contentDOM.contains(g2) && (g2 = null), g2 || (o2 = Math.max(u2.left + 1, Math.min(u2.right - 1, o2)), (g2 = m2.elementFromPoint(o2, a2)) && !e22.contentDOM.contains(g2) && (g2 = null)); var y2, b2 = -1; if (g2 && ((r2 = e22.docView.nearest(g2)) === null || r2 === void 0 ? void 0 : r2.isEditable) != 0) { if (p2.caretPositionFromPoint) { var k2 = p2.caretPositionFromPoint(o2, a2); k2 && (y2 = k2.offsetNode, b2 = k2.offset); } else if (p2.caretRangeFromPoint) { var w2 = p2.caretRangeFromPoint(o2, a2); w2 && (y2 = w2.startContainer, b2 = w2.startOffset, R$.safari && kA(y2, b2, o2) && (y2 = void 0)); } } if (!y2 || !e22.docView.dom.contains(y2)) { var x2 = oO.find(e22.docView, v2); if (!x2) return f2 > i2.top + i2.height / 2 ? i2.to : i2.from; var j2 = mA(x2.dom, o2, a2); y2 = j2.node, b2 = j2.offset; } return e22.docView.posFromDOM(y2, b2); } function bA(e22, t2, n2, r2, i2) { var o2 = Math.round((r2 - t2.left) * e22.defaultCharacterWidth); e22.lineWrapping && n2.height > 1.5 * e22.defaultLineHeight && (o2 += Math.floor((i2 - n2.top) / e22.defaultLineHeight) * e22.viewState.heightOracle.lineLength); var a2 = e22.state.sliceDoc(n2.from, n2.to); return n2.from + R_(a2, o2, e22.state.tabSize); } function kA(e22, t2, n2) { var r2; if (e22.nodeType != 3 || t2 != (r2 = e22.nodeValue.length)) return false; for (var i2 = e22.nextSibling; i2; i2 = i2.nextSibling) if (i2.nodeType != 1 || i2.nodeName != "BR") return false; return v$(e22, r2 - 1, r2).getBoundingClientRect().left > n2; } function wA(e22, t2, n2, r2) { var i2 = e22.state.doc.lineAt(t2.head), o2 = r2 && e22.lineWrapping ? e22.coordsAtPos(t2.assoc < 0 && t2.head > i2.from ? t2.head - 1 : t2.head) : null; if (o2) { var a2 = e22.dom.getBoundingClientRect(), s2 = e22.textDirectionAt(i2.from), u2 = e22.posAtCoords({ x: n2 == (s2 == NO.LTR) ? a2.right - 1 : a2.left + 1, y: (o2.top + o2.bottom) / 2 }); if (u2 != null) return _C.cursor(u2, n2 ? -1 : 1); } var c2 = oO.find(e22.docView, t2.head), l2 = c2 ? n2 ? c2.posAtEnd : c2.posAtStart : n2 ? i2.to : i2.from; return _C.cursor(l2, n2 ? -1 : 1); } function xA(e22, t2, n2, r2) { for (var i2 = e22.state.doc.lineAt(t2.head), o2 = e22.bidiSpans(i2), a2 = e22.textDirectionAt(i2.from), s2 = t2, u2 = null; ; ) { var c2 = ZO(i2, o2, a2, s2, n2), l2 = YO; if (!c2) { if (i2.number == (n2 ? e22.state.doc.lines : 1)) return s2; l2 = "\n", i2 = e22.state.doc.line(i2.number + (n2 ? 1 : -1)), o2 = e22.bidiSpans(i2), c2 = _C.cursor(n2 ? i2.from : i2.to); } if (u2) { if (!u2(l2)) return s2; } else { if (!r2) return c2; u2 = r2(l2); } s2 = c2; } } function jA(e22, t2, n2) { for (var r2 = e22.state.facet(OO).map(function(t3) { return t3(e22); }); ; ) { var i2, o2 = false, a2 = bi(r2); try { for (a2.s(); !(i2 = a2.n()).done; ) { i2.value.between(n2.from - 1, n2.from + 1, function(e23, r3, i3) { n2.from > e23 && n2.from < r3 && (n2 = t2.from > n2.from ? _C.cursor(e23, 1) : _C.cursor(r3, -1), o2 = true); }); } } catch (e23) { a2.e(e23); } finally { a2.f(); } if (!o2) return n2; } } var SA = function() { function e22(t2) { var n2 = this; Ri(this, e22), this.lastKeyCode = 0, this.lastKeyTime = 0, this.chromeScrollHack = -1, this.pendingIOSKey = void 0, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastEscPress = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.registeredEvents = [], this.customHandlers = [], this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.rapidCompositionStart = false, this.mouseSelection = null; var r2 = function(e23) { var r3 = AA[e23]; t2.contentDOM.addEventListener(e23, function(i3) { OA(t2, i3) && !n2.ignoreDuringComposition(i3) && (e23 == "keydown" && n2.keydown(t2, i3) || (n2.mustFlushObserver(i3) && t2.observer.forceFlush(), n2.runCustomHandlers(e23, t2, i3) ? i3.preventDefault() : r3(t2, i3))); }), n2.registeredEvents.push(e23); }; for (var i2 in AA) r2(i2); R$.chrome && R$.chrome_version >= 102 && t2.scrollDOM.addEventListener("wheel", function() { n2.chromeScrollHack < 0 ? t2.contentDOM.style.pointerEvents = "none" : window.clearTimeout(n2.chromeScrollHack), n2.chromeScrollHack = setTimeout(function() { n2.chromeScrollHack = -1, t2.contentDOM.style.pointerEvents = ""; }, 100); }, { passive: true }), this.notifiedFocused = t2.hasFocus, R$.safari && t2.contentDOM.addEventListener("input", function() { return null; }); } return zi(e22, [{ key: "setSelectionOrigin", value: function(e23) { this.lastSelectionOrigin = e23, this.lastSelectionTime = Date.now(); } }, { key: "ensureHandlers", value: function(e23, t2) { var n2, r2, i2 = this; this.customHandlers = []; var o2, a2 = bi(t2); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (r2 = (n2 = s2.update(e23).spec) === null || n2 === void 0 ? void 0 : n2.domEventHandlers) { this.customHandlers.push({ plugin: s2.value, handlers: r2 }); var u2 = function(t3) { i2.registeredEvents.indexOf(t3) < 0 && t3 != "scroll" && (i2.registeredEvents.push(t3), e23.contentDOM.addEventListener(t3, function(n3) { OA(e23, n3) && i2.runCustomHandlers(t3, e23, n3) && n3.preventDefault(); })); }; for (var c2 in r2) u2(c2); } } } catch (e24) { a2.e(e24); } finally { a2.f(); } } }, { key: "runCustomHandlers", value: function(e23, t2, n2) { var r2, i2 = bi(this.customHandlers); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value, a2 = o2.handlers[e23]; if (a2) try { if (a2.call(o2.plugin, n2, t2) || n2.defaultPrevented) return true; } catch (e24) { bO(t2.state, e24); } } } catch (e24) { i2.e(e24); } finally { i2.f(); } return false; } }, { key: "runScrollHandlers", value: function(e23, t2) { var n2, r2 = bi(this.customHandlers); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value, o2 = i2.handlers.scroll; if (o2) try { o2.call(i2.plugin, t2, e23); } catch (t3) { bO(e23.state, t3); } } } catch (e24) { r2.e(e24); } finally { r2.f(); } } }, { key: "keydown", value: function(e23, t2) { var n2, r2 = this; return this.lastKeyCode = t2.keyCode, this.lastKeyTime = Date.now(), t2.keyCode == 9 && Date.now() < this.lastEscPress + 2e3 || (!R$.android || !R$.chrome || t2.synthetic || t2.keyCode != 13 && t2.keyCode != 8 ? !(!R$.ios || !(n2 = CA.find(function(e24) { return e24.keyCode == t2.keyCode; })) || t2.ctrlKey || t2.altKey || t2.metaKey || t2.synthetic) && (this.pendingIOSKey = n2, setTimeout(function() { return r2.flushIOSKey(e23); }, 250), true) : (e23.observer.delayAndroidKey(t2.key, t2.keyCode), true)); } }, { key: "flushIOSKey", value: function(e23) { var t2 = this.pendingIOSKey; return !!t2 && (this.pendingIOSKey = void 0, p$(e23.contentDOM, t2.key, t2.keyCode)); } }, { key: "ignoreDuringComposition", value: function(e23) { return !!/^key/.test(e23.type) && (this.composing > 0 || !!(R$.safari && Date.now() - this.compositionEndedAt < 100) && (this.compositionEndedAt = 0, true)); } }, { key: "mustFlushObserver", value: function(e23) { return e23.type == "keydown" && e23.keyCode != 229 || e23.type == "compositionend" && !R$.ios; } }, { key: "startMouseSelection", value: function(e23) { this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e23; } }, { key: "update", value: function(e23) { this.mouseSelection && this.mouseSelection.update(e23), e23.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0); } }, { key: "destroy", value: function() { this.mouseSelection && this.mouseSelection.destroy(); } }]), e22; }(), CA = [{ key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" }, { key: "Enter", keyCode: 13, inputType: "insertParagraph" }, { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }], _A = [16, 17, 18, 20, 91, 92, 224, 225], $A = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.view = t2, this.style = r2, this.mustSelect = i2, this.lastEvent = n2; var o2 = t2.contentDOM.ownerDocument; o2.addEventListener("mousemove", this.move = this.move.bind(this)), o2.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = n2.shiftKey, this.multiple = t2.state.facet(m_.allowMultipleSelections) && function(e23, t3) { var n3 = e23.state.facet(lO); return n3.length ? n3[0](t3) : R$.mac ? t3.metaKey : t3.ctrlKey; }(t2, n2), this.dragMove = function(e23, t3) { var n3 = e23.state.facet(fO); return n3.length ? n3[0](t3) : R$.mac ? !t3.altKey : !t3.ctrlKey; }(t2, n2), this.dragging = !(!function(e23, t3) { if (e23.state.selection.main.empty) return false; var n3 = X_(e23.root); if (!n3 || n3.rangeCount == 0) return true; for (var r3 = n3.getRangeAt(0).getClientRects(), i3 = 0; i3 < r3.length; i3++) { var o3 = r3[i3]; if (o3.left <= t3.clientX && o3.right >= t3.clientX && o3.top <= t3.clientY && o3.bottom >= t3.clientY) return true; } return false; }(t2, n2) || FA(n2) != 1) && null, this.dragging === false && (n2.preventDefault(), this.select(n2)); } return zi(e22, [{ key: "move", value: function(e23) { if (e23.buttons == 0) return this.destroy(); this.dragging === false && this.select(this.lastEvent = e23); } }, { key: "up", value: function(e23) { this.dragging == null && this.select(this.lastEvent), this.dragging || e23.preventDefault(), this.destroy(); } }, { key: "destroy", value: function() { var e23 = this.view.contentDOM.ownerDocument; e23.removeEventListener("mousemove", this.move), e23.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = null; } }, { key: "select", value: function(e23) { var t2 = this.style.get(e23, this.extend, this.multiple); !this.mustSelect && t2.eq(this.view.state.selection) && t2.main.assoc == this.view.state.selection.main.assoc || this.view.dispatch({ selection: t2, userEvent: "select.pointer", scrollIntoView: true }), this.mustSelect = false; } }, { key: "update", value: function(e23) { var t2 = this; e23.docChanged && this.dragging && (this.dragging = this.dragging.map(e23.changes)), this.style.update(e23) && setTimeout(function() { return t2.select(t2.lastEvent); }, 20); } }]), e22; }(); function OA(e22, t2) { if (!t2.bubbles) return true; if (t2.defaultPrevented) return false; for (var n2, r2 = t2.target; r2 != e22.contentDOM; r2 = r2.parentNode) if (!r2 || r2.nodeType == 11 || (n2 = k$.get(r2)) && n2.ignoreEvent(t2)) return false; return true; } var AA = /* @__PURE__ */ Object.create(null), MA = R$.ie && R$.ie_version < 15 || R$.ios && R$.webkit_version < 604; function EA(e22, t2) { var n2, r2 = e22.state, i2 = 1, o2 = r2.toText(t2), a2 = o2.lines == r2.selection.ranges.length; if (HA != null && r2.selection.ranges.every(function(e23) { return e23.empty; }) && HA == o2.toString()) { var s2 = -1; n2 = r2.changeByRange(function(e23) { var n3 = r2.doc.lineAt(e23.from); if (n3.from == s2) return { range: e23 }; s2 = n3.from; var u2 = r2.toText((a2 ? o2.line(i2++).text : t2) + r2.lineBreak); return { changes: { from: n3.from, insert: u2 }, range: _C.cursor(e23.from + u2.length) }; }); } else n2 = a2 ? r2.changeByRange(function(e23) { var t3 = o2.line(i2++); return { changes: { from: e23.from, to: e23.to, insert: t3.text }, range: _C.cursor(e23.from + t3.length) }; }) : r2.replaceSelection(o2); e22.dispatch(n2, { userEvent: "input.paste", scrollIntoView: true }); } AA.keydown = function(e22, t2) { e22.inputState.setSelectionOrigin("select"), t2.keyCode == 27 ? e22.inputState.lastEscPress = Date.now() : _A.indexOf(t2.keyCode) < 0 && (e22.inputState.lastEscPress = 0); }; var PA = 0; function NA(e22, t2, n2, r2) { if (r2 == 1) return _C.cursor(t2, n2); if (r2 == 2) return function(e23, t3) { var n3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, r3 = e23.charCategorizer(t3), i3 = e23.doc.lineAt(t3), o3 = t3 - i3.from; if (i3.length == 0) return _C.cursor(t3); o3 == 0 ? n3 = 1 : o3 == i3.length && (n3 = -1); var a3 = o3, s3 = o3; n3 < 0 ? a3 = sC(i3.text, o3, false) : s3 = sC(i3.text, o3); for (var u2 = r3(i3.text.slice(a3, s3)); a3 > 0; ) { var c2 = sC(i3.text, a3, false); if (r3(i3.text.slice(c2, a3)) != u2) break; a3 = c2; } for (; s3 < i3.length; ) { var l2 = sC(i3.text, s3); if (r3(i3.text.slice(s3, l2)) != u2) break; s3 = l2; } return _C.range(a3 + i3.from, s3 + i3.from); }(e22.state, t2, n2); var i2 = oO.find(e22.docView, t2), o2 = e22.state.doc.lineAt(i2 ? i2.posAtEnd : t2), a2 = i2 ? i2.posAtStart : o2.from, s2 = i2 ? i2.posAtEnd : o2.to; return s2 < e22.state.doc.length && s2 == o2.to && s2++, _C.range(a2, s2); } AA.touchstart = function(e22, t2) { PA = Date.now(), e22.inputState.setSelectionOrigin("select.pointer"); }, AA.touchmove = function(e22) { e22.inputState.setSelectionOrigin("select.pointer"); }, AA.mousedown = function(e22, t2) { if (e22.observer.flush(), !(PA > Date.now() - 2e3 && FA(t2) == 1)) { var n2, r2 = null, i2 = bi(e22.state.facet(hO)); try { for (i2.s(); !(n2 = i2.n()).done; ) { if (r2 = (0, n2.value)(e22, t2)) break; } } catch (e23) { i2.e(e23); } finally { i2.f(); } if (r2 || t2.button != 0 || (r2 = function(e23, t3) { var n3 = DA(e23, t3), r3 = FA(t3), i3 = e23.state.selection, o3 = n3, a2 = t3; return { update: function(e24) { e24.docChanged && (n3 && (n3.pos = e24.changes.mapPos(n3.pos)), i3 = i3.map(e24.changes), a2 = null); }, get: function(t4, s2, u2) { var c2; if (a2 && t4.clientX == a2.clientX && t4.clientY == a2.clientY ? c2 = o3 : (c2 = o3 = DA(e23, t4), a2 = t4), !c2 || !n3) return i3; var l2 = NA(e23, c2.pos, c2.bias, r3); if (n3.pos != c2.pos && !s2) { var f2 = NA(e23, n3.pos, n3.bias, r3), h2 = Math.min(f2.from, l2.from), d2 = Math.max(f2.to, l2.to); l2 = h2 < l2.from ? _C.range(h2, d2) : _C.range(d2, h2); } return s2 ? i3.replaceRange(i3.main.extend(l2.from, l2.to)) : u2 ? i3.addRange(l2) : _C.create([l2]); } }; }(e22, t2)), r2) { var o2 = e22.root.activeElement != e22.contentDOM; o2 && e22.observer.ignore(function() { return d$(e22.contentDOM); }), e22.inputState.startMouseSelection(new $A(e22, t2, r2, o2)); } } }; var TA = function(e22, t2) { return e22 >= t2.top && e22 <= t2.bottom; }, IA = function(e22, t2, n2) { return TA(t2, n2) && e22 >= n2.left && e22 <= n2.right; }; function RA(e22, t2, n2, r2) { var i2 = oO.find(e22.docView, t2); if (!i2) return 1; var o2 = t2 - i2.posAtStart; if (o2 == 0) return 1; if (o2 == i2.length) return -1; var a2 = i2.coordsAt(o2, -1); if (a2 && IA(n2, r2, a2)) return -1; var s2 = i2.coordsAt(o2, 1); return s2 && IA(n2, r2, s2) ? 1 : a2 && TA(r2, a2) ? -1 : 1; } function DA(e22, t2) { var n2 = e22.posAtCoords({ x: t2.clientX, y: t2.clientY }, false); return { pos: n2, bias: RA(e22, n2, t2.clientX, t2.clientY) }; } var zA = R$.ie && R$.ie_version <= 11, LA = null, BA = 0, qA = 0; function FA(e22) { if (!zA) return e22.detail; var t2 = LA, n2 = qA; return LA = e22, qA = Date.now(), BA = !t2 || n2 > Date.now() - 400 && Math.abs(t2.clientX - e22.clientX) < 2 && Math.abs(t2.clientY - e22.clientY) < 2 ? (BA + 1) % 3 : 1; } function VA(e22, t2, n2, r2) { if (n2) { var i2 = e22.posAtCoords({ x: t2.clientX, y: t2.clientY }, false); t2.preventDefault(); var o2 = e22.inputState.mouseSelection, a2 = r2 && o2 && o2.dragging && o2.dragMove ? { from: o2.dragging.from, to: o2.dragging.to } : null, s2 = { from: i2, insert: n2 }, u2 = e22.state.changes(a2 ? [a2, s2] : s2); e22.focus(), e22.dispatch({ changes: u2, selection: { anchor: u2.mapPos(i2, -1), head: u2.mapPos(i2, 1) }, userEvent: a2 ? "move.drop" : "input.drop" }); } } AA.dragstart = function(e22, t2) { var n2 = e22.state.selection.main, r2 = e22.inputState.mouseSelection; r2 && (r2.dragging = n2), t2.dataTransfer && (t2.dataTransfer.setData("Text", e22.state.sliceDoc(n2.from, n2.to)), t2.dataTransfer.effectAllowed = "copyMove"); }, AA.drop = function(e22, t2) { if (t2.dataTransfer) { if (e22.state.readOnly) return t2.preventDefault(); var n2 = t2.dataTransfer.files; n2 && n2.length ? function() { t2.preventDefault(); for (var r2 = Array(n2.length), i2 = 0, o2 = function() { ++i2 == n2.length && VA(e22, t2, r2.filter(function(e23) { return e23 != null; }).join(e22.state.lineBreak), false); }, a2 = function(e23) { var t3 = new FileReader(); t3.onerror = o2, t3.onload = function() { /[\x00-\x08\x0e-\x1f]{2}/.test(t3.result) || (r2[e23] = t3.result), o2(); }, t3.readAsText(n2[e23]); }, s2 = 0; s2 < n2.length; s2++) a2(s2); }() : VA(e22, t2, t2.dataTransfer.getData("Text"), true); } }, AA.paste = function(e22, t2) { if (e22.state.readOnly) return t2.preventDefault(); e22.observer.flush(); var n2 = MA ? null : t2.clipboardData; n2 ? (EA(e22, n2.getData("text/plain")), t2.preventDefault()) : function(e23) { var t3 = e23.dom.parentNode; if (t3) { var n3 = t3.appendChild(document.createElement("textarea")); n3.style.cssText = "position: fixed; left: -10000px; top: 10px", n3.focus(), setTimeout(function() { e23.focus(), n3.remove(), EA(e23, n3.value); }, 50); } }(e22); }; var HA = null; function WA(e22) { setTimeout(function() { e22.hasFocus != e22.inputState.notifiedFocused && e22.update([]); }, 10); } function JA(e22, t2) { if (e22.docView.compositionDeco.size) { e22.inputState.rapidCompositionStart = t2; try { e22.update([]); } finally { e22.inputState.rapidCompositionStart = false; } } } AA.copy = AA.cut = function(e22, t2) { var n2 = function(e23) { var t3, n3 = [], r3 = [], i3 = false, o3 = bi(e23.selection.ranges); try { for (o3.s(); !(t3 = o3.n()).done; ) { var a3 = t3.value; a3.empty || (n3.push(e23.sliceDoc(a3.from, a3.to)), r3.push(a3)); } } catch (e24) { o3.e(e24); } finally { o3.f(); } if (!n3.length) { var s2, u2 = -1, c2 = bi(e23.selection.ranges); try { for (c2.s(); !(s2 = c2.n()).done; ) { var l2 = s2.value.from, f2 = e23.doc.lineAt(l2); f2.number > u2 && (n3.push(f2.text), r3.push({ from: f2.from, to: Math.min(e23.doc.length, f2.to + 1) })), u2 = f2.number; } } catch (e24) { c2.e(e24); } finally { c2.f(); } i3 = true; } return { text: n3.join(e23.lineBreak), ranges: r3, linewise: i3 }; }(e22.state), r2 = n2.text, i2 = n2.ranges, o2 = n2.linewise; if (r2 || o2) { HA = o2 ? r2 : null; var a2 = MA ? null : t2.clipboardData; a2 ? (t2.preventDefault(), a2.clearData(), a2.setData("text/plain", r2)) : function(e23, t3) { var n3 = e23.dom.parentNode; if (n3) { var r3 = n3.appendChild(document.createElement("textarea")); r3.style.cssText = "position: fixed; left: -10000px; top: 10px", r3.value = t3, r3.focus(), r3.selectionEnd = t3.length, r3.selectionStart = 0, setTimeout(function() { r3.remove(), e23.focus(); }, 50); } }(e22, r2), t2.type != "cut" || e22.state.readOnly || e22.dispatch({ changes: i2, scrollIntoView: true, userEvent: "delete.cut" }); } }, AA.focus = WA, AA.blur = function(e22) { e22.observer.clearSelectionRange(), WA(e22); }, AA.compositionstart = AA.compositionupdate = function(e22) { e22.inputState.compositionFirstChange == null && (e22.inputState.compositionFirstChange = true), e22.inputState.composing < 0 && (e22.inputState.composing = 0, e22.docView.compositionDeco.size && (e22.observer.flush(), JA(e22, true))); }, AA.compositionend = function(e22) { e22.inputState.composing = -1, e22.inputState.compositionEndedAt = Date.now(), e22.inputState.compositionFirstChange = null, setTimeout(function() { e22.inputState.composing < 0 && JA(e22, false); }, 50); }, AA.contextmenu = function(e22) { e22.inputState.lastContextMenu = Date.now(); }, AA.beforeinput = function(e22, t2) { var n2, r2; if (R$.chrome && R$.android && (r2 = CA.find(function(e23) { return e23.inputType == t2.inputType; })) && (e22.observer.delayAndroidKey(r2.key, r2.keyCode), r2.key == "Backspace" || r2.key == "Delete")) { var i2 = ((n2 = window.visualViewport) === null || n2 === void 0 ? void 0 : n2.height) || 0; setTimeout(function() { var t3; (((t3 = window.visualViewport) === null || t3 === void 0 ? void 0 : t3.height) || 0) > i2 + 10 && e22.hasFocus && (e22.contentDOM.blur(), e22.focus()); }, 100); } }; var UA = ["pre-wrap", "normal", "pre-line", "break-spaces"], KA = function() { function e22() { Ri(this, e22), this.doc = US.empty, this.lineWrapping = false, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.lineLength = 30, this.heightChanged = false; } return zi(e22, [{ key: "heightForGap", value: function(e23, t2) { var n2 = this.doc.lineAt(t2).number - this.doc.lineAt(e23).number + 1; return this.lineWrapping && (n2 += Math.ceil((t2 - e23 - n2 * this.lineLength * 0.5) / this.lineLength)), this.lineHeight * n2; } }, { key: "heightForLine", value: function(e23) { return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e23 - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight; } }, { key: "setDoc", value: function(e23) { return this.doc = e23, this; } }, { key: "mustRefreshForWrapping", value: function(e23) { return UA.indexOf(e23) > -1 != this.lineWrapping; } }, { key: "mustRefreshForHeights", value: function(e23) { for (var t2 = false, n2 = 0; n2 < e23.length; n2++) { var r2 = e23[n2]; r2 < 0 ? n2++ : this.heightSamples[Math.floor(10 * r2)] || (t2 = true, this.heightSamples[Math.floor(10 * r2)] = true); } return t2; } }, { key: "refresh", value: function(e23, t2, n2, r2, i2) { var o2 = UA.indexOf(e23) > -1, a2 = Math.round(t2) != Math.round(this.lineHeight) || this.lineWrapping != o2; if (this.lineWrapping = o2, this.lineHeight = t2, this.charWidth = n2, this.lineLength = r2, a2) { this.heightSamples = {}; for (var s2 = 0; s2 < i2.length; s2++) { var u2 = i2[s2]; u2 < 0 ? s2++ : this.heightSamples[Math.floor(10 * u2)] = true; } } return a2; } }]), e22; }(), GA = function() { function e22(t2, n2) { Ri(this, e22), this.from = t2, this.heights = n2, this.index = 0; } return zi(e22, [{ key: "more", get: function() { return this.index < this.heights.length; } }]), e22; }(), QA = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.from = t2, this.length = n2, this.top = r2, this.height = i2, this.type = o2; } return zi(e22, [{ key: "to", get: function() { return this.from + this.length; } }, { key: "bottom", get: function() { return this.top + this.height; } }, { key: "join", value: function(t2) { var n2 = (Array.isArray(this.type) ? this.type : [this]).concat(Array.isArray(t2.type) ? t2.type : [t2]); return new e22(this.from, this.length + t2.length, this.top, this.height + t2.height, n2); } }]), e22; }(), YA = function(e22) { return e22[e22.ByPos = 0] = "ByPos", e22[e22.ByHeight = 1] = "ByHeight", e22[e22.ByPosNoHeight = 2] = "ByPosNoHeight", e22; }(YA || (YA = {})), ZA = function() { function e22(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 2; Ri(this, e22), this.length = t2, this.height = n2, this.flags = r2; } return zi(e22, [{ key: "outdated", get: function() { return (2 & this.flags) > 0; }, set: function(e23) { this.flags = (e23 ? 2 : 0) | -3 & this.flags; } }, { key: "setHeight", value: function(e23, t2) { this.height != t2 && (Math.abs(this.height - t2) > 1e-3 && (e23.heightChanged = true), this.height = t2); } }, { key: "replace", value: function(t2, n2, r2) { return e22.of(r2); } }, { key: "decomposeLeft", value: function(e23, t2) { t2.push(this); } }, { key: "decomposeRight", value: function(e23, t2) { t2.push(this); } }, { key: "applyChanges", value: function(e23, t2, n2, r2) { for (var i2 = this, o2 = r2.length - 1; o2 >= 0; o2--) { var a2 = r2[o2], s2 = a2.fromA, u2 = a2.toA, c2 = a2.fromB, l2 = a2.toB, f2 = i2.lineAt(s2, YA.ByPosNoHeight, t2, 0, 0), h2 = f2.to >= u2 ? f2 : i2.lineAt(u2, YA.ByPosNoHeight, t2, 0, 0); for (l2 += h2.to - u2, u2 = h2.to; o2 > 0 && f2.from <= r2[o2 - 1].toA; ) s2 = r2[o2 - 1].fromA, c2 = r2[o2 - 1].fromB, o2--, s2 < f2.from && (f2 = i2.lineAt(s2, YA.ByPosNoHeight, t2, 0, 0)); c2 += f2.from - s2, s2 = f2.from; var d2 = iM.build(n2, e23, c2, l2); i2 = i2.replace(s2, u2, d2); } return i2.updateHeight(n2, 0); } }], [{ key: "empty", value: function() { return new eM(0, 0); } }, { key: "of", value: function(t2) { if (t2.length == 1) return t2[0]; for (var n2 = 0, r2 = t2.length, i2 = 0, o2 = 0; ; ) if (n2 == r2) if (i2 > 2 * o2) { var a2 = t2[n2 - 1]; a2.break ? t2.splice(--n2, 1, a2.left, null, a2.right) : t2.splice(--n2, 1, a2.left, a2.right), r2 += 1 + a2.break, i2 -= a2.size; } else { if (!(o2 > 2 * i2)) break; var s2 = t2[r2]; s2.break ? t2.splice(r2, 1, s2.left, null, s2.right) : t2.splice(r2, 1, s2.left, s2.right), r2 += 2 + s2.break, o2 -= s2.size; } else if (i2 < o2) { var u2 = t2[n2++]; u2 && (i2 += u2.size); } else { var c2 = t2[--r2]; c2 && (o2 += c2.size); } var l2 = 0; return t2[n2 - 1] == null ? (l2 = 1, n2--) : t2[n2] == null && (l2 = 1, r2++), new nM(e22.of(t2.slice(0, n2)), l2, e22.of(t2.slice(r2))); } }]), e22; }(); ZA.prototype.size = 1; var XA = function(e22) { _i(n2, ZA); var t2 = Oi(n2); function n2(e23, r2, i2) { var o2; return Ri(this, n2), (o2 = t2.call(this, e23, r2)).type = i2, o2; } return zi(n2, [{ key: "blockAt", value: function(e23, t3, n3, r2) { return new QA(r2, this.length, n3, this.height, this.type); } }, { key: "lineAt", value: function(e23, t3, n3, r2, i2) { return this.blockAt(0, n3, r2, i2); } }, { key: "forEachLine", value: function(e23, t3, n3, r2, i2, o2) { e23 <= i2 + this.length && t3 >= i2 && o2(this.blockAt(0, n3, r2, i2)); } }, { key: "updateHeight", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n3 = arguments.length > 3 ? arguments[3] : void 0; return n3 && n3.from <= t3 && n3.more && this.setHeight(e23, n3.heights[n3.index++]), this.outdated = false, this; } }, { key: "toString", value: function() { return "block(".concat(this.length, ")"); } }]), n2; }(), eM = function(e22) { _i(n2, XA); var t2 = Oi(n2); function n2(e23, r2) { var i2; return Ri(this, n2), (i2 = t2.call(this, e23, r2, Z$.Text)).collapsed = 0, i2.widgetHeight = 0, i2; } return zi(n2, [{ key: "replace", value: function(e23, t3, r2) { var i2 = r2[0]; return r2.length == 1 && (i2 instanceof n2 || i2 instanceof tM && 4 & i2.flags) && Math.abs(this.length - i2.length) < 10 ? (i2 instanceof tM ? i2 = new n2(i2.length, this.height) : i2.height = this.height, this.outdated || (i2.outdated = false), i2) : ZA.of(r2); } }, { key: "updateHeight", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n3 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r2 = arguments.length > 3 ? arguments[3] : void 0; return r2 && r2.from <= t3 && r2.more ? this.setHeight(e23, r2.heights[r2.index++]) : (n3 || this.outdated) && this.setHeight(e23, Math.max(this.widgetHeight, e23.heightForLine(this.length - this.collapsed))), this.outdated = false, this; } }, { key: "toString", value: function() { return "line(".concat(this.length).concat(this.collapsed ? -this.collapsed : "").concat(this.widgetHeight ? ":" + this.widgetHeight : "", ")"); } }]), n2; }(), tM = function(e22) { _i(n2, ZA); var t2 = Oi(n2); function n2(e23) { return Ri(this, n2), t2.call(this, e23, 0); } return zi(n2, [{ key: "lines", value: function(e23, t3) { var n3 = e23.lineAt(t3).number, r2 = e23.lineAt(t3 + this.length).number; return { firstLine: n3, lastLine: r2, lineHeight: this.height / (r2 - n3 + 1) }; } }, { key: "blockAt", value: function(e23, t3, n3, r2) { var i2 = this.lines(t3, r2), o2 = i2.firstLine, a2 = i2.lastLine, s2 = i2.lineHeight, u2 = Math.max(0, Math.min(a2 - o2, Math.floor((e23 - n3) / s2))), c2 = t3.line(o2 + u2), l2 = c2.from, f2 = c2.length; return new QA(l2, f2, n3 + s2 * u2, s2, Z$.Text); } }, { key: "lineAt", value: function(e23, t3, n3, r2, i2) { if (t3 == YA.ByHeight) return this.blockAt(e23, n3, r2, i2); if (t3 == YA.ByPosNoHeight) { var o2 = n3.lineAt(e23), a2 = o2.from, s2 = o2.to; return new QA(a2, s2 - a2, 0, 0, Z$.Text); } var u2 = this.lines(n3, i2), c2 = u2.firstLine, l2 = u2.lineHeight, f2 = n3.lineAt(e23), h2 = f2.from, d2 = f2.length, v2 = f2.number; return new QA(h2, d2, r2 + l2 * (v2 - c2), l2, Z$.Text); } }, { key: "forEachLine", value: function(e23, t3, n3, r2, i2, o2) { for (var a2 = this.lines(n3, i2), s2 = a2.firstLine, u2 = a2.lineHeight, c2 = Math.max(e23, i2), l2 = Math.min(i2 + this.length, t3); c2 <= l2; ) { var f2 = n3.lineAt(c2); c2 == e23 && (r2 += u2 * (f2.number - s2)), o2(new QA(f2.from, f2.length, r2, u2, Z$.Text)), r2 += u2, c2 = f2.to + 1; } } }, { key: "replace", value: function(e23, t3, r2) { var i2 = this.length - t3; if (i2 > 0) { var o2 = r2[r2.length - 1]; o2 instanceof n2 ? r2[r2.length - 1] = new n2(o2.length + i2) : r2.push(null, new n2(i2 - 1)); } if (e23 > 0) { var a2 = r2[0]; a2 instanceof n2 ? r2[0] = new n2(e23 + a2.length) : r2.unshift(new n2(e23 - 1), null); } return ZA.of(r2); } }, { key: "decomposeLeft", value: function(e23, t3) { t3.push(new n2(e23 - 1), null); } }, { key: "decomposeRight", value: function(e23, t3) { t3.push(null, new n2(this.length - e23 - 1)); } }, { key: "updateHeight", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r2 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], i2 = arguments.length > 3 ? arguments[3] : void 0, o2 = t3 + this.length; if (i2 && i2.from <= t3 + this.length && i2.more) { var a2 = [], s2 = Math.max(t3, i2.from), u2 = -1, c2 = e23.heightChanged; for (i2.from > t3 && a2.push(new n2(i2.from - t3 - 1).updateHeight(e23, t3)); s2 <= o2 && i2.more; ) { var l2 = e23.doc.lineAt(s2).length; a2.length && a2.push(null); var f2 = i2.heights[i2.index++]; u2 == -1 ? u2 = f2 : Math.abs(f2 - u2) >= 1e-3 && (u2 = -2); var h2 = new eM(l2, f2); h2.outdated = false, a2.push(h2), s2 += l2 + 1; } s2 <= o2 && a2.push(null, new n2(o2 - s2).updateHeight(e23, s2)); var d2 = ZA.of(a2); return e23.heightChanged = c2 || u2 < 0 || Math.abs(d2.height - this.height) >= 1e-3 || Math.abs(u2 - this.lines(e23.doc, t3).lineHeight) >= 1e-3, d2; } return (r2 || this.outdated) && (this.setHeight(e23, e23.heightForGap(t3, t3 + this.length)), this.outdated = false), this; } }, { key: "toString", value: function() { return "gap(".concat(this.length, ")"); } }]), n2; }(), nM = function(e22) { _i(n2, ZA); var t2 = Oi(n2); function n2(e23, r2, i2) { var o2; return Ri(this, n2), (o2 = t2.call(this, e23.length + r2 + i2.length, e23.height + i2.height, r2 | (e23.outdated || i2.outdated ? 2 : 0))).left = e23, o2.right = i2, o2.size = e23.size + i2.size, o2; } return zi(n2, [{ key: "break", get: function() { return 1 & this.flags; } }, { key: "blockAt", value: function(e23, t3, n3, r2) { var i2 = n3 + this.left.height; return e23 < i2 ? this.left.blockAt(e23, t3, n3, r2) : this.right.blockAt(e23, t3, i2, r2 + this.left.length + this.break); } }, { key: "lineAt", value: function(e23, t3, n3, r2, i2) { var o2 = r2 + this.left.height, a2 = i2 + this.left.length + this.break, s2 = t3 == YA.ByHeight ? e23 < o2 : e23 < a2, u2 = s2 ? this.left.lineAt(e23, t3, n3, r2, i2) : this.right.lineAt(e23, t3, n3, o2, a2); if (this.break || (s2 ? u2.to < a2 : u2.from > a2)) return u2; var c2 = t3 == YA.ByPosNoHeight ? YA.ByPosNoHeight : YA.ByPos; return s2 ? u2.join(this.right.lineAt(a2, c2, n3, o2, a2)) : this.left.lineAt(a2, c2, n3, r2, i2).join(u2); } }, { key: "forEachLine", value: function(e23, t3, n3, r2, i2, o2) { var a2 = r2 + this.left.height, s2 = i2 + this.left.length + this.break; if (this.break) e23 < s2 && this.left.forEachLine(e23, t3, n3, r2, i2, o2), t3 >= s2 && this.right.forEachLine(e23, t3, n3, a2, s2, o2); else { var u2 = this.lineAt(s2, YA.ByPos, n3, r2, i2); e23 < u2.from && this.left.forEachLine(e23, u2.from - 1, n3, r2, i2, o2), u2.to >= e23 && u2.from <= t3 && o2(u2), t3 > u2.to && this.right.forEachLine(u2.to + 1, t3, n3, a2, s2, o2); } } }, { key: "replace", value: function(e23, t3, n3) { var r2 = this.left.length + this.break; if (t3 < r2) return this.balanced(this.left.replace(e23, t3, n3), this.right); if (e23 > this.left.length) return this.balanced(this.left, this.right.replace(e23 - r2, t3 - r2, n3)); var i2 = []; e23 > 0 && this.decomposeLeft(e23, i2); var o2, a2 = i2.length, s2 = bi(n3); try { for (s2.s(); !(o2 = s2.n()).done; ) { var u2 = o2.value; i2.push(u2); } } catch (e24) { s2.e(e24); } finally { s2.f(); } if (e23 > 0 && rM(i2, a2 - 1), t3 < this.length) { var c2 = i2.length; this.decomposeRight(t3, i2), rM(i2, c2); } return ZA.of(i2); } }, { key: "decomposeLeft", value: function(e23, t3) { var n3 = this.left.length; if (e23 <= n3) return this.left.decomposeLeft(e23, t3); t3.push(this.left), this.break && e23 >= ++n3 && t3.push(null), e23 > n3 && this.right.decomposeLeft(e23 - n3, t3); } }, { key: "decomposeRight", value: function(e23, t3) { var n3 = this.left.length, r2 = n3 + this.break; if (e23 >= r2) return this.right.decomposeRight(e23 - r2, t3); e23 < n3 && this.left.decomposeRight(e23, t3), this.break && e23 < r2 && t3.push(null), t3.push(this.right); } }, { key: "balanced", value: function(e23, t3) { return e23.size > 2 * t3.size || t3.size > 2 * e23.size ? ZA.of(this.break ? [e23, null, t3] : [e23, t3]) : (this.left = e23, this.right = t3, this.height = e23.height + t3.height, this.outdated = e23.outdated || t3.outdated, this.size = e23.size + t3.size, this.length = e23.length + this.break + t3.length, this); } }, { key: "updateHeight", value: function(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n3 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r2 = arguments.length > 3 ? arguments[3] : void 0, i2 = this.left, o2 = this.right, a2 = t3 + i2.length + this.break, s2 = null; return r2 && r2.from <= t3 + i2.length && r2.more ? s2 = i2 = i2.updateHeight(e23, t3, n3, r2) : i2.updateHeight(e23, t3, n3), r2 && r2.from <= a2 + o2.length && r2.more ? s2 = o2 = o2.updateHeight(e23, a2, n3, r2) : o2.updateHeight(e23, a2, n3), s2 ? this.balanced(i2, o2) : (this.height = this.left.height + this.right.height, this.outdated = false, this); } }, { key: "toString", value: function() { return this.left + (this.break ? " " : "-") + this.right; } }]), n2; }(); function rM(e22, t2) { var n2, r2; e22[t2] == null && (n2 = e22[t2 - 1]) instanceof tM && (r2 = e22[t2 + 1]) instanceof tM && e22.splice(t2 - 1, 3, new tM(n2.length + 1 + r2.length)); } var iM = function() { function e22(t2, n2) { Ri(this, e22), this.pos = t2, this.oracle = n2, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = t2; } return zi(e22, [{ key: "isCovered", get: function() { return this.covering && this.nodes[this.nodes.length - 1] == this.covering; } }, { key: "span", value: function(e23, t2) { if (this.lineStart > -1) { var n2 = Math.min(t2, this.lineEnd), r2 = this.nodes[this.nodes.length - 1]; r2 instanceof eM ? r2.length += n2 - this.pos : (n2 > this.pos || !this.isCovered) && this.nodes.push(new eM(n2 - this.pos, -1)), this.writtenTo = n2, t2 > n2 && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1); } this.pos = t2; } }, { key: "point", value: function(e23, t2, n2) { if (e23 < t2 || n2.heightRelevant) { var r2 = n2.widget ? n2.widget.estimatedHeight : 0; r2 < 0 && (r2 = this.oracle.lineHeight); var i2 = t2 - e23; n2.block ? this.addBlock(new XA(i2, r2, n2.type)) : (i2 || r2 >= 5) && this.addLineDeco(r2, i2); } else t2 > e23 && this.span(e23, t2); this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to); } }, { key: "enterLine", value: function() { if (!(this.lineStart > -1)) { var e23 = this.oracle.doc.lineAt(this.pos), t2 = e23.from, n2 = e23.to; this.lineStart = t2, this.lineEnd = n2, this.writtenTo < t2 && ((this.writtenTo < t2 - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, t2 - 1)), this.nodes.push(null)), this.pos > t2 && this.nodes.push(new eM(this.pos - t2, -1)), this.writtenTo = this.pos; } } }, { key: "blankContent", value: function(e23, t2) { var n2 = new tM(t2 - e23); return this.oracle.doc.lineAt(e23).to == t2 && (n2.flags |= 4), n2; } }, { key: "ensureLine", value: function() { this.enterLine(); var e23 = this.nodes.length ? this.nodes[this.nodes.length - 1] : null; if (e23 instanceof eM) return e23; var t2 = new eM(0, -1); return this.nodes.push(t2), t2; } }, { key: "addBlock", value: function(e23) { this.enterLine(), e23.type != Z$.WidgetAfter || this.isCovered || this.ensureLine(), this.nodes.push(e23), this.writtenTo = this.pos = this.pos + e23.length, e23.type != Z$.WidgetBefore && (this.covering = e23); } }, { key: "addLineDeco", value: function(e23, t2) { var n2 = this.ensureLine(); n2.length += t2, n2.collapsed += t2, n2.widgetHeight = Math.max(n2.widgetHeight, e23), this.writtenTo = this.pos = this.pos + t2; } }, { key: "finish", value: function(e23) { var t2 = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1]; !(this.lineStart > -1) || t2 instanceof eM || this.isCovered ? (this.writtenTo < this.pos || t2 == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos)) : this.nodes.push(new eM(0, -1)); var n2, r2 = e23, i2 = bi(this.nodes); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value; o2 instanceof eM && o2.updateHeight(this.oracle, r2), r2 += o2 ? o2.length : 1; } } catch (e24) { i2.e(e24); } finally { i2.f(); } return this.nodes; } }], [{ key: "build", value: function(t2, n2, r2, i2) { var o2 = new e22(r2, t2); return x_.spans(n2, r2, i2, o2, 0), o2.finish(r2); } }]), e22; }(); function oM(e22, t2, n2) { var r2 = new aM(); return x_.compare(e22, t2, n2, r2, 0), r2.changes; } var aM = function() { function e22() { Ri(this, e22), this.changes = []; } return zi(e22, [{ key: "compareRange", value: function() { } }, { key: "comparePoint", value: function(e23, t2, n2, r2) { (e23 < t2 || n2 && n2.heightRelevant || r2 && r2.heightRelevant) && iO(e23, t2, this.changes, 5); } }]), e22; }(); function sM(e22, t2) { for (var n2 = e22.getBoundingClientRect(), r2 = Math.max(0, n2.left), i2 = Math.min(innerWidth, n2.right), o2 = Math.max(0, n2.top), a2 = Math.min(innerHeight, n2.bottom), s2 = e22.ownerDocument.body, u2 = e22.parentNode; u2 && u2 != s2; ) if (u2.nodeType == 1) { var c2 = u2, l2 = window.getComputedStyle(c2); if ((c2.scrollHeight > c2.clientHeight || c2.scrollWidth > c2.clientWidth) && l2.overflow != "visible") { var f2 = c2.getBoundingClientRect(); r2 = Math.max(r2, f2.left), i2 = Math.min(i2, f2.right), o2 = Math.max(o2, f2.top), a2 = Math.min(a2, f2.bottom); } u2 = l2.position == "absolute" || l2.position == "fixed" ? c2.offsetParent : c2.parentNode; } else { if (u2.nodeType != 11) break; u2 = u2.host; } return { left: r2 - n2.left, right: Math.max(r2, i2) - n2.left, top: o2 - (n2.top + t2), bottom: Math.max(o2, a2) - (n2.top + t2) }; } function uM(e22, t2) { var n2 = e22.getBoundingClientRect(); return { left: 0, right: n2.right - n2.left, top: t2, bottom: n2.bottom - (n2.top + t2) }; } var cM = function() { function e22(t2, n2, r2) { Ri(this, e22), this.from = t2, this.to = n2, this.size = r2; } return zi(e22, [{ key: "draw", value: function(e23) { return X$.replace({ widget: new lM(this.size, e23) }).range(this.from, this.to); } }], [{ key: "same", value: function(e23, t2) { if (e23.length != t2.length) return false; for (var n2 = 0; n2 < e23.length; n2++) { var r2 = e23[n2], i2 = t2[n2]; if (r2.from != i2.from || r2.to != i2.to || r2.size != i2.size) return false; } return true; } }]), e22; }(), lM = function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2(e23, r2) { var i2; return Ri(this, n2), (i2 = t2.call(this)).size = e23, i2.vertical = r2, i2; } return zi(n2, [{ key: "eq", value: function(e23) { return e23.size == this.size && e23.vertical == this.vertical; } }, { key: "toDOM", value: function() { var e23 = document.createElement("div"); return this.vertical ? e23.style.height = this.size + "px" : (e23.style.width = this.size + "px", e23.style.height = "2px", e23.style.display = "inline-block"), e23; } }, { key: "estimatedHeight", get: function() { return this.vertical ? this.size : -1; } }]), n2; }(), fM = function() { function e22(t2) { Ri(this, e22), this.state = t2, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = true, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.heightOracle = new KA(), this.scaler = mM, this.scrollTarget = null, this.printing = false, this.mustMeasureContent = true, this.defaultTextDirection = NO.RTL, this.visibleRanges = [], this.mustEnforceCursorAssoc = false, this.stateDeco = t2.facet($O).filter(function(e23) { return typeof e23 != "function"; }), this.heightMap = ZA.empty().applyChanges(this.stateDeco, US.empty, this.heightOracle.setDoc(t2.doc), [new EO(0, 0, 0, t2.doc.length)]), this.viewport = this.getViewport(0, null), this.updateViewportLines(), this.updateForViewport(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = X$.set(this.lineGaps.map(function(e23) { return e23.draw(false); })), this.computeVisibleRanges(); } return zi(e22, [{ key: "updateForViewport", value: function() { for (var e23 = this, t2 = [this.viewport], n2 = this.state.selection.main, r2 = function(r3) { var i3 = r3 ? n2.head : n2.anchor; if (!t2.some(function(e24) { var t3 = e24.from, n3 = e24.to; return i3 >= t3 && i3 <= n3; })) { var o2 = e23.lineBlockAt(i3), a2 = o2.from, s2 = o2.to; t2.push(new hM(a2, s2)); } }, i2 = 0; i2 <= 1; i2++) r2(i2); this.viewports = t2.sort(function(e24, t3) { return e24.from - t3.from; }), this.scaler = this.heightMap.height <= 7e6 ? mM : new gM(this.heightOracle.doc, this.heightMap, this.viewports); } }, { key: "updateViewportLines", value: function() { var e23 = this; this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.state.doc, 0, 0, function(t2) { e23.viewportLines.push(e23.scaler.scale == 1 ? t2 : yM(t2, e23.scaler)); }); } }, { key: "update", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; this.state = e23.state; var n2 = this.stateDeco; this.stateDeco = this.state.facet($O).filter(function(e24) { return typeof e24 != "function"; }); var r2 = e23.changedRanges, i2 = EO.extendWithRanges(r2, oM(n2, this.stateDeco, e23 ? e23.changes : yC.empty(this.state.doc.length))), o2 = this.heightMap.height; this.heightMap = this.heightMap.applyChanges(this.stateDeco, e23.startState.doc, this.heightOracle.setDoc(this.state.doc), i2), this.heightMap.height != o2 && (e23.flags |= 2); var a2 = i2.length ? this.mapViewport(this.viewport, e23.changes) : this.viewport; (t2 && (t2.range.head < a2.from || t2.range.head > a2.to) || !this.viewportIsAppropriate(a2)) && (a2 = this.getViewport(0, t2)); var s2 = !e23.changes.empty || 2 & e23.flags || a2.from != this.viewport.from || a2.to != this.viewport.to; this.viewport = a2, this.updateForViewport(), s2 && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e23.changes))), e23.flags |= this.computeVisibleRanges(), t2 && (this.scrollTarget = t2), !this.mustEnforceCursorAssoc && e23.selectionSet && e23.view.lineWrapping && e23.state.selection.main.empty && e23.state.selection.main.assoc && (this.mustEnforceCursorAssoc = true); } }, { key: "measure", value: function(e23) { var t2 = e23.contentDOM, n2 = window.getComputedStyle(t2), r2 = this.heightOracle, i2 = n2.whiteSpace; this.defaultTextDirection = n2.direction == "rtl" ? NO.RTL : NO.LTR; var o2 = this.heightOracle.mustRefreshForWrapping(i2), a2 = o2 || this.mustMeasureContent || this.contentDOMHeight != t2.clientHeight; this.contentDOMHeight = t2.clientHeight, this.mustMeasureContent = false; var s2 = 0, u2 = 0, c2 = parseInt(n2.paddingTop) || 0, l2 = parseInt(n2.paddingBottom) || 0; this.paddingTop == c2 && this.paddingBottom == l2 || (this.paddingTop = c2, this.paddingBottom = l2, s2 |= 10), this.editorWidth != e23.scrollDOM.clientWidth && (r2.lineWrapping && (a2 = true), this.editorWidth = e23.scrollDOM.clientWidth, s2 |= 8); var f2 = (this.printing ? uM : sM)(t2, this.paddingTop), h2 = f2.top - this.pixelViewport.top, d2 = f2.bottom - this.pixelViewport.bottom; this.pixelViewport = f2; var v2 = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left; if (v2 != this.inView && (this.inView = v2, v2 && (a2 = true)), !this.inView) return 0; var p2 = t2.clientWidth; if (this.contentDOMWidth == p2 && this.editorHeight == e23.scrollDOM.clientHeight || (this.contentDOMWidth = p2, this.editorHeight = e23.scrollDOM.clientHeight, s2 |= 8), a2) { var m2 = e23.docView.measureVisibleLineHeights(this.viewport); if (r2.mustRefreshForHeights(m2) && (o2 = true), o2 || r2.lineWrapping && Math.abs(p2 - this.contentDOMWidth) > r2.charWidth) { var g2 = e23.docView.measureTextSize(), y2 = g2.lineHeight, b2 = g2.charWidth; (o2 = r2.refresh(i2, y2, b2, p2 / b2, m2)) && (e23.docView.minWidth = 0, s2 |= 8); } h2 > 0 && d2 > 0 ? u2 = Math.max(h2, d2) : h2 < 0 && d2 < 0 && (u2 = Math.min(h2, d2)), r2.heightChanged = false; var k2, w2 = bi(this.viewports); try { for (w2.s(); !(k2 = w2.n()).done; ) { var x2 = k2.value, j2 = x2.from == this.viewport.from ? m2 : e23.docView.measureVisibleLineHeights(x2); this.heightMap = this.heightMap.updateHeight(r2, 0, o2, new GA(x2.from, j2)); } } catch (e24) { w2.e(e24); } finally { w2.f(); } r2.heightChanged && (s2 |= 2); } var S2 = !this.viewportIsAppropriate(this.viewport, u2) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to); return S2 && (this.viewport = this.getViewport(u2, this.scrollTarget)), this.updateForViewport(), (2 & s2 || S2) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o2 ? [] : this.lineGaps)), s2 |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = false, e23.docView.enforceCursorAssoc()), s2; } }, { key: "visibleTop", get: function() { return this.scaler.fromDOM(this.pixelViewport.top); } }, { key: "visibleBottom", get: function() { return this.scaler.fromDOM(this.pixelViewport.bottom); } }, { key: "getViewport", value: function(e23, t2) { var n2 = 0.5 - Math.max(-0.5, Math.min(0.5, e23 / 1e3 / 2)), r2 = this.heightMap, i2 = this.state.doc, o2 = this.visibleTop, a2 = this.visibleBottom, s2 = new hM(r2.lineAt(o2 - 1e3 * n2, YA.ByHeight, i2, 0, 0).from, r2.lineAt(a2 + 1e3 * (1 - n2), YA.ByHeight, i2, 0, 0).to); if (t2) { var u2 = t2.range.head; if (u2 < s2.from || u2 > s2.to) { var c2, l2 = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f2 = r2.lineAt(u2, YA.ByPos, i2, 0, 0); c2 = t2.y == "center" ? (f2.top + f2.bottom) / 2 - l2 / 2 : t2.y == "start" || t2.y == "nearest" && u2 < s2.from ? f2.top : f2.bottom - l2, s2 = new hM(r2.lineAt(c2 - 500, YA.ByHeight, i2, 0, 0).from, r2.lineAt(c2 + l2 + 500, YA.ByHeight, i2, 0, 0).to); } } return s2; } }, { key: "mapViewport", value: function(e23, t2) { var n2 = t2.mapPos(e23.from, -1), r2 = t2.mapPos(e23.to, 1); return new hM(this.heightMap.lineAt(n2, YA.ByPos, this.state.doc, 0, 0).from, this.heightMap.lineAt(r2, YA.ByPos, this.state.doc, 0, 0).to); } }, { key: "viewportIsAppropriate", value: function(e23) { var t2 = e23.from, n2 = e23.to, r2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (!this.inView) return true; var i2 = this.heightMap.lineAt(t2, YA.ByPos, this.state.doc, 0, 0), o2 = i2.top, a2 = this.heightMap.lineAt(n2, YA.ByPos, this.state.doc, 0, 0), s2 = a2.bottom, u2 = this.visibleTop, c2 = this.visibleBottom; return (t2 == 0 || o2 <= u2 - Math.max(10, Math.min(-r2, 250))) && (n2 == this.state.doc.length || s2 >= c2 + Math.max(10, Math.min(r2, 250))) && o2 > u2 - 2e3 && s2 < c2 + 2e3; } }, { key: "mapLineGaps", value: function(e23, t2) { if (!e23.length || t2.empty) return e23; var n2, r2 = [], i2 = bi(e23); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value; t2.touchesRange(o2.from, o2.to) || r2.push(new cM(t2.mapPos(o2.from), t2.mapPos(o2.to), o2.size)); } } catch (e24) { i2.e(e24); } finally { i2.f(); } return r2; } }, { key: "ensureLineGaps", value: function(e23) { var t2 = this, n2 = []; if (this.defaultTextDirection != NO.LTR) return n2; var r2, i2 = bi(this.viewportLines); try { var o2 = function() { var i3 = r2.value; if (i3.length < 4e3) return "continue"; var o3 = function(e24, t3, n3) { var r3 = [], i4 = e24, o4 = 0; x_.spans(n3, e24, t3, { span: function() { }, point: function(e25, t4) { e25 > i4 && (r3.push({ from: i4, to: e25 }), o4 += e25 - i4), i4 = t4; } }, 20), i4 < t3 && (r3.push({ from: i4, to: t3 }), o4 += t3 - i4); return { total: o4, ranges: r3 }; }(i3.from, i3.to, t2.stateDeco); if (o3.total < 4e3) return "continue"; var a2 = void 0, s2 = void 0; if (t2.heightOracle.lineWrapping) { var u2 = 2e3 / t2.heightOracle.lineLength * t2.heightOracle.lineHeight; a2 = dM(o3, (t2.visibleTop - i3.top - u2) / i3.height), s2 = dM(o3, (t2.visibleBottom - i3.top + u2) / i3.height); } else { var c2 = o3.total * t2.heightOracle.charWidth, l2 = 2e3 * t2.heightOracle.charWidth; a2 = dM(o3, (t2.pixelViewport.left - l2) / c2), s2 = dM(o3, (t2.pixelViewport.right + l2) / c2); } var f2 = []; a2 > i3.from && f2.push({ from: i3.from, to: a2 }), s2 < i3.to && f2.push({ from: s2, to: i3.to }); var h2 = t2.state.selection.main; h2.from >= i3.from && h2.from <= i3.to && pM(f2, h2.from - 10, h2.from + 10), !h2.empty && h2.to >= i3.from && h2.to <= i3.to && pM(f2, h2.to - 10, h2.to + 10); for (var d2 = function() { var r3 = p2[v2], a3 = r3.from, s3 = r3.to; s3 - a3 > 1e3 && n2.push(function(e24, t3) { var n3, r4 = bi(e24); try { for (r4.s(); !(n3 = r4.n()).done; ) { var i4 = n3.value; if (t3(i4)) return i4; } } catch (e25) { r4.e(e25); } finally { r4.f(); } return; }(e23, function(e24) { return e24.from >= i3.from && e24.to <= i3.to && Math.abs(e24.from - a3) < 1e3 && Math.abs(e24.to - s3) < 1e3; }) || new cM(a3, s3, t2.gapSize(i3, a3, s3, o3))); }, v2 = 0, p2 = f2; v2 < p2.length; v2++) d2(); }; for (i2.s(); !(r2 = i2.n()).done; ) o2(); } catch (e24) { i2.e(e24); } finally { i2.f(); } return n2; } }, { key: "gapSize", value: function(e23, t2, n2, r2) { var i2 = vM(r2, n2) - vM(r2, t2); return this.heightOracle.lineWrapping ? e23.height * i2 : r2.total * this.heightOracle.charWidth * i2; } }, { key: "updateLineGaps", value: function(e23) { var t2 = this; cM.same(e23, this.lineGaps) || (this.lineGaps = e23, this.lineGapDeco = X$.set(e23.map(function(e24) { return e24.draw(t2.heightOracle.lineWrapping); }))); } }, { key: "computeVisibleRanges", value: function() { var e23 = this.stateDeco; this.lineGaps.length && (e23 = e23.concat(this.lineGapDeco)); var t2 = []; x_.spans(e23, this.viewport.from, this.viewport.to, { span: function(e24, n3) { t2.push({ from: e24, to: n3 }); }, point: function() { } }, 20); var n2 = t2.length != this.visibleRanges.length || this.visibleRanges.some(function(e24, n3) { return e24.from != t2[n3].from || e24.to != t2[n3].to; }); return this.visibleRanges = t2, n2 ? 4 : 0; } }, { key: "lineBlockAt", value: function(e23) { return e23 >= this.viewport.from && e23 <= this.viewport.to && this.viewportLines.find(function(t2) { return t2.from <= e23 && t2.to >= e23; }) || yM(this.heightMap.lineAt(e23, YA.ByPos, this.state.doc, 0, 0), this.scaler); } }, { key: "lineBlockAtHeight", value: function(e23) { return yM(this.heightMap.lineAt(this.scaler.fromDOM(e23), YA.ByHeight, this.state.doc, 0, 0), this.scaler); } }, { key: "elementAtHeight", value: function(e23) { return yM(this.heightMap.blockAt(this.scaler.fromDOM(e23), this.state.doc, 0, 0), this.scaler); } }, { key: "docHeight", get: function() { return this.scaler.toDOM(this.heightMap.height); } }, { key: "contentHeight", get: function() { return this.docHeight + this.paddingTop + this.paddingBottom; } }]), e22; }(), hM = zi(function e5(t2, n2) { Ri(this, e5), this.from = t2, this.to = n2; }); function dM(e22, t2) { var n2 = e22.total, r2 = e22.ranges; if (t2 <= 0) return r2[0].from; if (t2 >= 1) return r2[r2.length - 1].to; for (var i2 = Math.floor(n2 * t2), o2 = 0; ; o2++) { var a2 = r2[o2], s2 = a2.from, u2 = a2.to - s2; if (i2 <= u2) return s2 + i2; i2 -= u2; } } function vM(e22, t2) { var n2, r2 = 0, i2 = bi(e22.ranges); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value, a2 = o2.from, s2 = o2.to; if (t2 <= s2) { r2 += t2 - a2; break; } r2 += s2 - a2; } } catch (e23) { i2.e(e23); } finally { i2.f(); } return r2 / e22.total; } function pM(e22, t2, n2) { for (var r2 = 0; r2 < e22.length; r2++) { var i2 = e22[r2]; if (i2.from < n2 && i2.to > t2) { var o2 = []; i2.from < t2 && o2.push({ from: i2.from, to: t2 }), i2.to > n2 && o2.push({ from: n2, to: i2.to }), e22.splice.apply(e22, [r2, 1].concat(o2)), r2 += o2.length - 1; } } } var mM = { toDOM: function(e22) { return e22; }, fromDOM: function(e22) { return e22; }, scale: 1 }, gM = function() { function e22(t2, n2, r2) { Ri(this, e22); var i2 = 0, o2 = 0, a2 = 0; this.viewports = r2.map(function(e23) { var r3 = e23.from, o3 = e23.to, a3 = n2.lineAt(r3, YA.ByPos, t2, 0, 0).top, s3 = n2.lineAt(o3, YA.ByPos, t2, 0, 0).bottom; return i2 += s3 - a3, { from: r3, to: o3, top: a3, bottom: s3, domTop: 0, domBottom: 0 }; }), this.scale = (7e6 - i2) / (n2.height - i2); var s2, u2 = bi(this.viewports); try { for (u2.s(); !(s2 = u2.n()).done; ) { var c2 = s2.value; c2.domTop = a2 + (c2.top - o2) * this.scale, a2 = c2.domBottom = c2.domTop + (c2.bottom - c2.top), o2 = c2.bottom; } } catch (e23) { u2.e(e23); } finally { u2.f(); } } return zi(e22, [{ key: "toDOM", value: function(e23) { for (var t2 = 0, n2 = 0, r2 = 0; ; t2++) { var i2 = t2 < this.viewports.length ? this.viewports[t2] : null; if (!i2 || e23 < i2.top) return r2 + (e23 - n2) * this.scale; if (e23 <= i2.bottom) return i2.domTop + (e23 - i2.top); n2 = i2.bottom, r2 = i2.domBottom; } } }, { key: "fromDOM", value: function(e23) { for (var t2 = 0, n2 = 0, r2 = 0; ; t2++) { var i2 = t2 < this.viewports.length ? this.viewports[t2] : null; if (!i2 || e23 < i2.domTop) return n2 + (e23 - r2) / this.scale; if (e23 <= i2.domBottom) return i2.top + (e23 - i2.domTop); n2 = i2.bottom, r2 = i2.domBottom; } } }]), e22; }(); function yM(e22, t2) { if (t2.scale == 1) return e22; var n2 = t2.toDOM(e22.top), r2 = t2.toDOM(e22.bottom); return new QA(e22.from, e22.length, n2, r2 - n2, Array.isArray(e22.type) ? e22.type.map(function(e23) { return yM(e23, t2); }) : e22.type); } var bM = AC.define({ combine: function(e22) { return e22.join(" "); } }), kM = AC.define({ combine: function(e22) { return e22.indexOf(true) > -1; } }), wM = B_.newName(), xM = B_.newName(), jM = B_.newName(), SM = { "&light": "." + xM, "&dark": "." + jM }; function CM(e22, t2, n2) { return new B_(t2, { finish: function(t3) { return /&/.test(t3) ? t3.replace(/&\w*/, function(t4) { if (t4 == "&") return e22; if (!n2 || !n2[t4]) throw new RangeError("Unsupported selector: ".concat(t4)); return n2[t4]; }) : e22 + " " + t3; } }); } var _M = CM("." + wM, { "&.cm-editor": { position: "relative !important", boxSizing: "border-box", "&.cm-focused": { outline: "1px dotted #212121" }, display: "flex !important", flexDirection: "column" }, ".cm-scroller": { display: "flex !important", alignItems: "flex-start !important", fontFamily: "monospace", lineHeight: 1.4, height: "100%", overflowX: "auto", position: "relative", zIndex: 0 }, ".cm-content": { margin: 0, flexGrow: 2, flexShrink: 0, minHeight: "100%", display: "block", whiteSpace: "pre", wordWrap: "normal", boxSizing: "border-box", padding: "4px 0", outline: "none", "&[contenteditable=true]": { WebkitUserModify: "read-write-plaintext-only" } }, ".cm-lineWrapping": { whiteSpace_fallback: "pre-wrap", whiteSpace: "break-spaces", wordBreak: "break-word", overflowWrap: "anywhere", flexShrink: 1 }, "&light .cm-content": { caretColor: "black" }, "&dark .cm-content": { caretColor: "white" }, ".cm-line": { display: "block", padding: "0 2px 0 4px" }, ".cm-selectionLayer": { zIndex: -1, contain: "size style" }, ".cm-selectionBackground": { position: "absolute" }, "&light .cm-selectionBackground": { background: "#d9d9d9" }, "&dark .cm-selectionBackground": { background: "#222" }, "&light.cm-focused .cm-selectionBackground": { background: "#d7d4f0" }, "&dark.cm-focused .cm-selectionBackground": { background: "#233" }, ".cm-cursorLayer": { zIndex: 100, contain: "size style", pointerEvents: "none" }, "&.cm-focused .cm-cursorLayer": { animation: "steps(1) cm-blink 1.2s infinite" }, "@keyframes cm-blink": { "0%": {}, "50%": { visibility: "hidden" }, "100%": {} }, "@keyframes cm-blink2": { "0%": {}, "50%": { visibility: "hidden" }, "100%": {} }, ".cm-cursor, .cm-dropCursor": { position: "absolute", borderLeft: "1.2px solid black", marginLeft: "-0.6px", pointerEvents: "none" }, ".cm-cursor": { display: "none" }, "&dark .cm-cursor": { borderLeftColor: "#444" }, "&.cm-focused .cm-cursor": { display: "block" }, "&light .cm-activeLine": { backgroundColor: "#f3f9ff" }, "&dark .cm-activeLine": { backgroundColor: "#223039" }, "&light .cm-specialChar": { color: "red" }, "&dark .cm-specialChar": { color: "#f78" }, ".cm-gutters": { display: "flex", height: "100%", boxSizing: "border-box", left: 0, zIndex: 200 }, "&light .cm-gutters": { backgroundColor: "#f5f5f5", color: "#6c6c6c", borderRight: "1px solid #ddd" }, "&dark .cm-gutters": { backgroundColor: "#333338", color: "#ccc" }, ".cm-gutter": { display: "flex !important", flexDirection: "column", flexShrink: 0, boxSizing: "border-box", minHeight: "100%", overflow: "hidden" }, ".cm-gutterElement": { boxSizing: "border-box" }, ".cm-lineNumbers .cm-gutterElement": { padding: "0 3px 0 5px", minWidth: "20px", textAlign: "right", whiteSpace: "nowrap" }, "&light .cm-activeLineGutter": { backgroundColor: "#e2f2ff" }, "&dark .cm-activeLineGutter": { backgroundColor: "#222227" }, ".cm-panels": { boxSizing: "border-box", position: "sticky", left: 0, right: 0 }, "&light .cm-panels": { backgroundColor: "#f5f5f5", color: "black" }, "&light .cm-panels-top": { borderBottom: "1px solid #ddd" }, "&light .cm-panels-bottom": { borderTop: "1px solid #ddd" }, "&dark .cm-panels": { backgroundColor: "#333338", color: "white" }, ".cm-tab": { display: "inline-block", overflow: "hidden", verticalAlign: "bottom" }, ".cm-widgetBuffer": { verticalAlign: "text-top", height: "1em", display: "inline" }, ".cm-placeholder": { color: "#888", display: "inline-block", verticalAlign: "top" }, ".cm-button": { verticalAlign: "middle", color: "inherit", fontSize: "70%", padding: ".2em 1em", borderRadius: "1px" }, "&light .cm-button": { backgroundImage: "linear-gradient(#eff1f5, #d9d9df)", border: "1px solid #888", "&:active": { backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)" } }, "&dark .cm-button": { backgroundImage: "linear-gradient(#393939, #111)", border: "1px solid #888", "&:active": { backgroundImage: "linear-gradient(#111, #333)" } }, ".cm-textfield": { verticalAlign: "middle", color: "inherit", fontSize: "70%", border: "1px solid silver", padding: ".2em .5em" }, "&light .cm-textfield": { backgroundColor: "white" }, "&dark .cm-textfield": { border: "1px solid #555", backgroundColor: "inherit" } }, SM), $M = { childList: true, characterData: true, subtree: true, attributes: true, characterDataOldValue: true }, OM = R$.ie && R$.ie_version <= 11, AM = function() { function e22(t2, n2, r2) { var i2 = this; Ri(this, e22), this.view = t2, this.onChange = n2, this.onScrollChanged = r2, this.active = false, this.selectionRange = new f$(), this.selectionChanged = false, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.scrollTargets = [], this.intersection = null, this.resize = null, this.intersecting = false, this.gapIntersection = null, this.gaps = [], this.parentCheck = -1, this.dom = t2.contentDOM, this.observer = new MutationObserver(function(e23) { var n3, r3 = bi(e23); try { for (r3.s(); !(n3 = r3.n()).done; ) { var o2 = n3.value; i2.queue.push(o2); } } catch (e24) { r3.e(e24); } finally { r3.f(); } (R$.ie && R$.ie_version <= 11 || R$.ios && t2.composing) && e23.some(function(e24) { return e24.type == "childList" && e24.removedNodes.length || e24.type == "characterData" && e24.oldValue.length > e24.target.nodeValue.length; }) ? i2.flushSoon() : i2.flush(); }), OM && (this.onCharData = function(e23) { i2.queue.push({ target: e23.target, type: "characterData", oldValue: e23.prevValue }), i2.flushSoon(); }), this.onSelectionChange = this.onSelectionChange.bind(this), window.addEventListener("resize", this.onResize = this.onResize.bind(this)), typeof ResizeObserver == "function" && (this.resize = new ResizeObserver(function() { i2.view.docView.lastUpdate < Date.now() - 75 && i2.onResize(); }), this.resize.observe(t2.scrollDOM)), window.addEventListener("beforeprint", this.onPrint = this.onPrint.bind(this)), this.start(), window.addEventListener("scroll", this.onScroll = this.onScroll.bind(this)), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver(function(e23) { i2.parentCheck < 0 && (i2.parentCheck = setTimeout(i2.listenForScroll.bind(i2), 1e3)), e23.length > 0 && e23[e23.length - 1].intersectionRatio > 0 != i2.intersecting && (i2.intersecting = !i2.intersecting, i2.intersecting != i2.view.inView && i2.onScrollChanged(document.createEvent("Event"))); }, {}), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver(function(e23) { e23.length > 0 && e23[e23.length - 1].intersectionRatio > 0 && i2.onScrollChanged(document.createEvent("Event")); }, {})), this.listenForScroll(), this.readSelectionRange(), this.dom.ownerDocument.addEventListener("selectionchange", this.onSelectionChange); } return zi(e22, [{ key: "onScroll", value: function(e23) { this.intersecting && this.flush(false), this.onScrollChanged(e23); } }, { key: "onResize", value: function() { var e23 = this; this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(function() { e23.resizeTimeout = -1, e23.view.requestMeasure(); }, 50)); } }, { key: "onPrint", value: function() { var e23 = this; this.view.viewState.printing = true, this.view.measure(), setTimeout(function() { e23.view.viewState.printing = false, e23.view.requestMeasure(); }, 500); } }, { key: "updateGaps", value: function(e23) { if (this.gapIntersection && (e23.length != this.gaps.length || this.gaps.some(function(t3, n3) { return t3 != e23[n3]; }))) { this.gapIntersection.disconnect(); var t2, n2 = bi(e23); try { for (n2.s(); !(t2 = n2.n()).done; ) { var r2 = t2.value; this.gapIntersection.observe(r2); } } catch (e24) { n2.e(e24); } finally { n2.f(); } this.gaps = e23; } } }, { key: "onSelectionChange", value: function(e23) { if (this.readSelectionRange() && !this.delayedAndroidKey) { var t2 = this.view, n2 = this.selectionRange; if (t2.state.facet(kO) ? t2.root.activeElement == this.dom : t$(t2.dom, n2)) { var r2 = n2.anchorNode && t2.docView.nearest(n2.anchorNode); r2 && r2.ignoreEvent(e23) || ((R$.ie && R$.ie_version <= 11 || R$.android && R$.chrome) && !t2.state.selection.main.empty && n2.focusNode && r$(n2.focusNode, n2.focusOffset, n2.anchorNode, n2.anchorOffset) ? this.flushSoon() : this.flush(false)); } } } }, { key: "readSelectionRange", value: function() { var e23 = this.view.root, t2 = R$.safari && e23.nodeType == 11 && function() { for (var e24 = document.activeElement; e24 && e24.shadowRoot; ) e24 = e24.shadowRoot.activeElement; return e24; }() == this.view.contentDOM && function(e24) { var t3 = null; function n2(e25) { e25.preventDefault(), e25.stopImmediatePropagation(), t3 = e25.getTargetRanges()[0]; } if (e24.contentDOM.addEventListener("beforeinput", n2, true), document.execCommand("indent"), e24.contentDOM.removeEventListener("beforeinput", n2, true), !t3) return null; var r2 = t3.startContainer, i2 = t3.startOffset, o2 = t3.endContainer, a2 = t3.endOffset, s2 = e24.docView.domAtPos(e24.state.selection.main.anchor); if (r$(s2.node, s2.offset, o2, a2)) { var u2 = [o2, a2, r2, i2]; r2 = u2[0], i2 = u2[1], o2 = u2[2], a2 = u2[3]; } return { anchorNode: r2, anchorOffset: i2, focusNode: o2, focusOffset: a2 }; }(this.view) || X_(e23); return !(!t2 || this.selectionRange.eq(t2)) && (this.selectionRange.setRange(t2), this.selectionChanged = true); } }, { key: "setSelectionRange", value: function(e23, t2) { this.selectionRange.set(e23.node, e23.offset, t2.node, t2.offset), this.selectionChanged = false; } }, { key: "clearSelectionRange", value: function() { this.selectionRange.set(null, 0, null, 0); } }, { key: "listenForScroll", value: function() { this.parentCheck = -1; for (var e23 = 0, t2 = null, n2 = this.dom; n2; ) if (n2.nodeType == 1) !t2 && e23 < this.scrollTargets.length && this.scrollTargets[e23] == n2 ? e23++ : t2 || (t2 = this.scrollTargets.slice(0, e23)), t2 && t2.push(n2), n2 = n2.assignedSlot || n2.parentNode; else { if (n2.nodeType != 11) break; n2 = n2.host; } if (e23 < this.scrollTargets.length && !t2 && (t2 = this.scrollTargets.slice(0, e23)), t2) { var r2, i2 = bi(this.scrollTargets); try { for (i2.s(); !(r2 = i2.n()).done; ) { r2.value.removeEventListener("scroll", this.onScroll); } } catch (e24) { i2.e(e24); } finally { i2.f(); } var o2, a2 = bi(this.scrollTargets = t2); try { for (a2.s(); !(o2 = a2.n()).done; ) { o2.value.addEventListener("scroll", this.onScroll); } } catch (e24) { a2.e(e24); } finally { a2.f(); } } } }, { key: "ignore", value: function(e23) { if (!this.active) return e23(); try { return this.stop(), e23(); } finally { this.start(), this.clear(); } } }, { key: "start", value: function() { this.active || (this.observer.observe(this.dom, $M), OM && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = true); } }, { key: "stop", value: function() { this.active && (this.active = false, this.observer.disconnect(), OM && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData)); } }, { key: "clear", value: function() { this.processRecords(), this.queue.length = 0, this.selectionChanged = false; } }, { key: "delayAndroidKey", value: function(e23, t2) { var n2 = this; this.delayedAndroidKey || requestAnimationFrame(function() { var e24 = n2.delayedAndroidKey; n2.delayedAndroidKey = null, n2.delayedFlush = -1, n2.flush() || p$(n2.view.contentDOM, e24.key, e24.keyCode); }), this.delayedAndroidKey && e23 != "Enter" || (this.delayedAndroidKey = { key: e23, keyCode: t2 }); } }, { key: "flushSoon", value: function() { var e23 = this; this.delayedFlush < 0 && (this.delayedFlush = window.setTimeout(function() { e23.delayedFlush = -1, e23.flush(); }, 20)); } }, { key: "forceFlush", value: function() { this.delayedFlush >= 0 && (window.clearTimeout(this.delayedFlush), this.delayedFlush = -1, this.flush()); } }, { key: "processRecords", value: function() { var e23, t2 = this.queue, n2 = bi(this.observer.takeRecords()); try { for (n2.s(); !(e23 = n2.n()).done; ) { var r2 = e23.value; t2.push(r2); } } catch (e24) { n2.e(e24); } finally { n2.f(); } t2.length && (this.queue = []); var i2, o2 = -1, a2 = -1, s2 = false, u2 = bi(t2); try { for (u2.s(); !(i2 = u2.n()).done; ) { var c2 = i2.value, l2 = this.readMutation(c2); l2 && (l2.typeOver && (s2 = true), o2 == -1 ? (o2 = l2.from, a2 = l2.to) : (o2 = Math.min(l2.from, o2), a2 = Math.max(l2.to, a2))); } } catch (e24) { u2.e(e24); } finally { u2.f(); } return { from: o2, to: a2, typeOver: s2 }; } }, { key: "flush", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; if (!(this.delayedFlush >= 0 || this.delayedAndroidKey)) { e23 && this.readSelectionRange(); var t2 = this.processRecords(), n2 = t2.from, r2 = t2.to, i2 = t2.typeOver, o2 = this.selectionChanged && t$(this.dom, this.selectionRange); if (!(n2 < 0) || o2) { this.selectionChanged = false; var a2 = this.view.state, s2 = this.onChange(n2, r2, i2); return this.view.state == a2 && this.view.update([]), s2; } } } }, { key: "readMutation", value: function(e23) { var t2 = this.view.docView.nearest(e23.target); if (!t2 || t2.ignoreMutation(e23)) return null; if (t2.markDirty(e23.type == "attributes"), e23.type == "attributes" && (t2.dirty |= 4), e23.type == "childList") { var n2 = MM(t2, e23.previousSibling || e23.target.previousSibling, -1), r2 = MM(t2, e23.nextSibling || e23.target.nextSibling, 1); return { from: n2 ? t2.posAfter(n2) : t2.posAtStart, to: r2 ? t2.posBefore(r2) : t2.posAtEnd, typeOver: false }; } return e23.type == "characterData" ? { from: t2.posAtStart, to: t2.posAtEnd, typeOver: e23.target.nodeValue == e23.oldValue } : null; } }, { key: "destroy", value: function() { var e23, t2, n2; this.stop(), (e23 = this.intersection) === null || e23 === void 0 || e23.disconnect(), (t2 = this.gapIntersection) === null || t2 === void 0 || t2.disconnect(), (n2 = this.resize) === null || n2 === void 0 || n2.disconnect(); var r2, i2 = bi(this.scrollTargets); try { for (i2.s(); !(r2 = i2.n()).done; ) { r2.value.removeEventListener("scroll", this.onScroll); } } catch (e24) { i2.e(e24); } finally { i2.f(); } window.removeEventListener("scroll", this.onScroll), window.removeEventListener("resize", this.onResize), window.removeEventListener("beforeprint", this.onPrint), this.dom.ownerDocument.removeEventListener("selectionchange", this.onSelectionChange), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout); } }]), e22; }(); function MM(e22, t2, n2) { for (; t2; ) { var r2 = k$.get(t2); if (r2 && r2.parent == e22) return r2; var i2 = t2.parentNode; t2 = i2 != e22.dom ? i2 : n2 > 0 ? t2.nextSibling : t2.previousSibling; } return null; } function EM(e22, t2, n2, r2) { var i2, o2, a2 = e22.state.selection.main; if (t2 > -1) { var s2 = e22.docView.domBoundsAround(t2, n2, 0); if (!s2 || e22.state.readOnly) return false; var u2 = s2.from, c2 = s2.to, l2 = e22.docView.impreciseHead || e22.docView.impreciseAnchor ? [] : function(e23) { var t3 = []; if (e23.root.activeElement != e23.contentDOM) return t3; var n3 = e23.observer.selectionRange, r3 = n3.anchorNode, i3 = n3.anchorOffset, o3 = n3.focusNode, a3 = n3.focusOffset; r3 && (t3.push(new tA(r3, i3)), o3 == r3 && a3 == i3 || t3.push(new tA(o3, a3))); return t3; }(e22), f2 = new XO(l2, e22.state); f2.readRange(s2.startDOM, s2.endDOM); var h2 = a2.from, d2 = null; (e22.inputState.lastKeyCode === 8 && e22.inputState.lastKeyTime > Date.now() - 100 || R$.android && f2.text.length < c2 - u2) && (h2 = a2.to, d2 = "end"); var v2 = function(e23, t3, n3, r3) { var i3 = Math.min(e23.length, t3.length), o3 = 0; for (; o3 < i3 && e23.charCodeAt(o3) == t3.charCodeAt(o3); ) o3++; if (o3 == i3 && e23.length == t3.length) return null; var a3 = e23.length, s3 = t3.length; for (; a3 > 0 && s3 > 0 && e23.charCodeAt(a3 - 1) == t3.charCodeAt(s3 - 1); ) a3--, s3--; if (r3 == "end") { n3 -= a3 + Math.max(0, o3 - Math.min(a3, s3)) - o3; } if (a3 < o3 && e23.length < t3.length) { s3 = (o3 -= n3 <= o3 && n3 >= a3 ? o3 - n3 : 0) + (s3 - a3), a3 = o3; } else if (s3 < o3) { a3 = (o3 -= n3 <= o3 && n3 >= s3 ? o3 - n3 : 0) + (a3 - s3), s3 = o3; } return { from: o3, toA: a3, toB: s3 }; }(e22.state.doc.sliceString(u2, c2, "\uFFFF"), f2.text, h2 - u2, d2); v2 && (R$.chrome && e22.inputState.lastKeyCode == 13 && v2.toB == v2.from + 2 && f2.text.slice(v2.from, v2.toB) == "\uFFFF\uFFFF" && v2.toB--, i2 = { from: u2 + v2.from, to: u2 + v2.toA, insert: US.of(f2.text.slice(v2.from, v2.toB).split("\uFFFF")) }), o2 = function(e23, t3) { if (e23.length == 0) return null; var n3 = e23[0].pos, r3 = e23.length == 2 ? e23[1].pos : n3; return n3 > -1 && r3 > -1 ? _C.single(n3 + t3, r3 + t3) : null; }(l2, u2); } else if (e22.hasFocus || !e22.state.facet(kO)) { var p2 = e22.observer.selectionRange, m2 = e22.docView, g2 = m2.impreciseHead, y2 = m2.impreciseAnchor, b2 = g2 && g2.node == p2.focusNode && g2.offset == p2.focusOffset || !e$(e22.contentDOM, p2.focusNode) ? e22.state.selection.main.head : e22.docView.posFromDOM(p2.focusNode, p2.focusOffset), k2 = y2 && y2.node == p2.anchorNode && y2.offset == p2.anchorOffset || !e$(e22.contentDOM, p2.anchorNode) ? e22.state.selection.main.anchor : e22.docView.posFromDOM(p2.anchorNode, p2.anchorOffset); b2 == a2.head && k2 == a2.anchor || (o2 = _C.single(k2, b2)); } if (!i2 && !o2) return false; if (!i2 && r2 && !a2.empty && o2 && o2.main.empty ? i2 = { from: a2.from, to: a2.to, insert: e22.state.doc.slice(a2.from, a2.to) } : i2 && i2.from >= a2.from && i2.to <= a2.to && (i2.from != a2.from || i2.to != a2.to) && a2.to - a2.from - (i2.to - i2.from) <= 4 ? i2 = { from: a2.from, to: a2.to, insert: e22.state.doc.slice(a2.from, i2.from).append(i2.insert).append(e22.state.doc.slice(i2.to, a2.to)) } : (R$.mac || R$.android) && i2 && i2.from == i2.to && i2.from == a2.head - 1 && i2.insert.toString() == "." && (i2 = { from: a2.from, to: a2.to, insert: US.of([" "]) }), i2) { var w2 = e22.state; if (R$.ios && e22.inputState.flushIOSKey(e22)) return true; if (R$.android && (i2.from == a2.from && i2.to == a2.to && i2.insert.length == 1 && i2.insert.lines == 2 && p$(e22.contentDOM, "Enter", 13) || i2.from == a2.from - 1 && i2.to == a2.to && i2.insert.length == 0 && p$(e22.contentDOM, "Backspace", 8) || i2.from == a2.from && i2.to == a2.to + 1 && i2.insert.length == 0 && p$(e22.contentDOM, "Delete", 46))) return true; var x2, j2 = i2.insert.toString(); if (e22.state.facet(pO).some(function(t3) { return t3(e22, i2.from, i2.to, j2); })) return true; if (e22.inputState.composing >= 0 && e22.inputState.composing++, i2.from >= a2.from && i2.to <= a2.to && i2.to - i2.from >= (a2.to - a2.from) / 3 && (!o2 || o2.main.empty && o2.main.from == i2.from + i2.insert.length) && e22.inputState.composing < 0) { var S2 = a2.from < i2.from ? w2.sliceDoc(a2.from, i2.from) : "", C2 = a2.to > i2.to ? w2.sliceDoc(i2.to, a2.to) : ""; x2 = w2.replaceSelection(e22.state.toText(S2 + i2.insert.sliceString(0, void 0, e22.state.lineBreak) + C2)); } else { var _2 = w2.changes(i2), $2 = o2 && !w2.selection.main.eq(o2.main) && o2.main.to <= _2.newLength ? o2.main : void 0; if (w2.selection.ranges.length > 1 && e22.inputState.composing >= 0 && i2.to <= a2.to && i2.to >= a2.to - 10) { var O2 = e22.state.sliceDoc(i2.from, i2.to), A2 = oA(e22) || e22.state.doc.lineAt(a2.head), M2 = a2.to - i2.to, E2 = a2.to - a2.from; x2 = w2.changeByRange(function(t3) { if (t3.from == a2.from && t3.to == a2.to) return { changes: _2, range: $2 || t3.map(_2) }; var n3 = t3.to - M2, r3 = n3 - O2.length; if (t3.to - t3.from != E2 || e22.state.sliceDoc(r3, n3) != O2 || A2 && t3.to >= A2.from && t3.from <= A2.to) return { range: t3 }; var o3 = w2.changes({ from: r3, to: n3, insert: i2.insert }), s3 = t3.to - a2.to; return { changes: o3, range: $2 ? _C.range(Math.max(0, $2.anchor + s3), Math.max(0, $2.head + s3)) : t3.map(o3) }; }); } else x2 = { changes: _2, selection: $2 && w2.selection.replaceRange($2) }; } var P2 = "input.type"; return e22.composing && (P2 += ".compose", e22.inputState.compositionFirstChange && (P2 += ".start", e22.inputState.compositionFirstChange = false)), e22.dispatch(x2, { scrollIntoView: true, userEvent: P2 }), true; } if (o2 && !o2.main.eq(a2)) { var N2 = false, T2 = "select"; return e22.inputState.lastSelectionTime > Date.now() - 50 && (e22.inputState.lastSelectionOrigin == "select" && (N2 = true), T2 = e22.inputState.lastSelectionOrigin), e22.dispatch({ selection: o2, scrollIntoView: N2, userEvent: T2 }), true; } return false; } var PM = function() { function e22() { var t2 = this, n2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Ri(this, e22), this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = false, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.style.cssText = "position: absolute; top: -10000px", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), this._dispatch = n2.dispatch || function(e23) { return t2.update([e23]); }, this.dispatch = this.dispatch.bind(this), this.root = n2.root || m$(n2.parent) || document, this.viewState = new fM(n2.state || m_.create(n2)), this.plugins = this.state.facet(xO).map(function(e23) { return new SO(e23); }); var r2, i2 = bi(this.plugins); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; o2.update(this); } } catch (e23) { i2.e(e23); } finally { i2.f(); } this.observer = new AM(this, function(e23, n3, r3) { return EM(t2, e23, n3, r3); }, function(e23) { t2.inputState.runScrollHandlers(t2, e23), t2.observer.intersecting && t2.measure(); }), this.inputState = new SA(this), this.inputState.ensureHandlers(this, this.plugins), this.docView = new nA(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(), n2.parent && n2.parent.appendChild(this.dom); } return zi(e22, [{ key: "state", get: function() { return this.viewState.state; } }, { key: "viewport", get: function() { return this.viewState.viewport; } }, { key: "visibleRanges", get: function() { return this.viewState.visibleRanges; } }, { key: "inView", get: function() { return this.viewState.inView; } }, { key: "composing", get: function() { return this.inputState.composing > 0; } }, { key: "compositionStarted", get: function() { return this.inputState.composing >= 0; } }, { key: "dispatch", value: function() { var e23; this._dispatch(arguments.length == 1 && (arguments.length <= 0 ? void 0 : arguments[0]) instanceof o_ ? arguments.length <= 0 ? void 0 : arguments[0] : (e23 = this.state).update.apply(e23, arguments)); } }, { key: "update", value: function(e23) { if (this.updateState != 0) throw new Error("Calls to EditorView.update are not allowed while an update is in progress"); var t2, n2, r2 = false, i2 = false, o2 = this.state, a2 = bi(e23); try { for (a2.s(); !(n2 = a2.n()).done; ) { var s2 = n2.value; if (s2.startState != o2) throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state."); o2 = s2.state; } } catch (e24) { a2.e(e24); } finally { a2.f(); } if (this.destroyed) this.viewState.state = o2; else { if (this.observer.clear(), o2.facet(m_.phrases) != this.state.facet(m_.phrases)) return this.setState(o2); t2 = PO.create(this, o2, e23); var u2 = this.viewState.scrollTarget; try { this.updateState = 2; var c2, l2 = bi(e23); try { for (l2.s(); !(c2 = l2.n()).done; ) { var f2 = c2.value; if (u2 && (u2 = u2.map(f2.changes)), f2.scrollIntoView) { var h2 = f2.state.selection.main; u2 = new gO(h2.empty ? h2 : _C.cursor(h2.head, h2.head > h2.anchor ? -1 : 1)); } var d2, v2 = bi(f2.effects); try { for (v2.s(); !(d2 = v2.n()).done; ) { var p2 = d2.value; p2.is(yO) && (u2 = p2.value); } } catch (e24) { v2.e(e24); } finally { v2.f(); } } } catch (e24) { l2.e(e24); } finally { l2.f(); } this.viewState.update(t2, u2), this.bidiCache = IM.update(this.bidiCache, t2.changes), t2.empty || (this.updatePlugins(t2), this.inputState.update(t2)), r2 = this.docView.update(t2), this.state.facet(MO) != this.styleModules && this.mountStyles(), i2 = this.updateAttrs(), this.showAnnouncements(e23), this.docView.updateSelection(r2, e23.some(function(e24) { return e24.isUserEvent("select.pointer"); })); } finally { this.updateState = 0; } if (t2.startState.facet(bM) != t2.state.facet(bM) && (this.viewState.mustMeasureContent = true), (r2 || i2 || u2 || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), !t2.empty) { var m2, g2 = bi(this.state.facet(vO)); try { for (g2.s(); !(m2 = g2.n()).done; ) { (0, m2.value)(t2); } } catch (e24) { g2.e(e24); } finally { g2.f(); } } } } }, { key: "setState", value: function(e23) { if (this.updateState != 0) throw new Error("Calls to EditorView.setState are not allowed while an update is in progress"); if (this.destroyed) this.viewState.state = e23; else { this.updateState = 2; var t2 = this.hasFocus; try { var n2, r2 = bi(this.plugins); try { for (r2.s(); !(n2 = r2.n()).done; ) { n2.value.destroy(this); } } catch (e24) { r2.e(e24); } finally { r2.f(); } this.viewState = new fM(e23), this.plugins = e23.facet(xO).map(function(e24) { return new SO(e24); }), this.pluginMap.clear(); var i2, o2 = bi(this.plugins); try { for (o2.s(); !(i2 = o2.n()).done; ) { i2.value.update(this); } } catch (e24) { o2.e(e24); } finally { o2.f(); } this.docView = new nA(this), this.inputState.ensureHandlers(this, this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = []; } finally { this.updateState = 0; } t2 && this.focus(), this.requestMeasure(); } } }, { key: "updatePlugins", value: function(e23) { var t2 = e23.startState.facet(xO), n2 = e23.state.facet(xO); if (t2 != n2) { var r2, i2 = [], o2 = bi(n2); try { for (o2.s(); !(r2 = o2.n()).done; ) { var a2 = r2.value, s2 = t2.indexOf(a2); if (s2 < 0) i2.push(new SO(a2)); else { var u2 = this.plugins[s2]; u2.mustUpdate = e23, i2.push(u2); } } } catch (e24) { o2.e(e24); } finally { o2.f(); } var c2, l2 = bi(this.plugins); try { for (l2.s(); !(c2 = l2.n()).done; ) { var f2 = c2.value; f2.mustUpdate != e23 && f2.destroy(this); } } catch (e24) { l2.e(e24); } finally { l2.f(); } this.plugins = i2, this.pluginMap.clear(), this.inputState.ensureHandlers(this, this.plugins); } else { var h2, d2 = bi(this.plugins); try { for (d2.s(); !(h2 = d2.n()).done; ) { h2.value.mustUpdate = e23; } } catch (e24) { d2.e(e24); } finally { d2.f(); } } for (var v2 = 0; v2 < this.plugins.length; v2++) this.plugins[v2].update(this); } }, { key: "measure", value: function() { var e23 = this, t2 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; if (!this.destroyed) { this.measureScheduled > -1 && cancelAnimationFrame(this.measureScheduled), this.measureScheduled = 0, t2 && this.observer.flush(); var n2 = null; try { for (var r2 = 0; ; r2++) { this.updateState = 1; var i2 = this.viewport, o2 = this.viewState.measure(this); if (!o2 && !this.measureRequests.length && this.viewState.scrollTarget == null) break; if (r2 > 5) { console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize"); break; } var a2 = []; if (!(4 & o2)) { var s2 = [a2, this.measureRequests]; this.measureRequests = s2[0], a2 = s2[1]; } var u2 = a2.map(function(t3) { try { return t3.read(e23); } catch (t4) { return bO(e23.state, t4), TM; } }), c2 = PO.create(this, this.state, []), l2 = false, f2 = false; c2.flags |= o2, n2 ? n2.flags |= o2 : n2 = c2, this.updateState = 2, c2.empty || (this.updatePlugins(c2), this.inputState.update(c2), this.updateAttrs(), l2 = this.docView.update(c2)); for (var h2 = 0; h2 < a2.length; h2++) if (u2[h2] != TM) try { var d2 = a2[h2]; d2.write && d2.write(u2[h2], this); } catch (e24) { bO(this.state, e24); } if (this.viewState.scrollTarget && (this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, f2 = true), l2 && this.docView.updateSelection(true), this.viewport.from == i2.from && this.viewport.to == i2.to && !f2 && this.measureRequests.length == 0) break; } } finally { this.updateState = 0, this.measureScheduled = -1; } if (n2 && !n2.empty) { var v2, p2 = bi(this.state.facet(vO)); try { for (p2.s(); !(v2 = p2.n()).done; ) { var m2 = v2.value; m2(n2); } } catch (e24) { p2.e(e24); } finally { p2.f(); } } } } }, { key: "themeClasses", get: function() { return wM + " " + (this.state.facet(kM) ? jM : xM) + " " + this.state.facet(bM); } }, { key: "updateAttrs", value: function() { var e23 = this, t2 = RM(this, CO, { class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses }), n2 = { spellcheck: "false", autocorrect: "off", autocapitalize: "off", translate: "no", contenteditable: this.state.facet(kO) ? "true" : "false", class: "cm-content", style: "".concat(R$.tabSize, ": ").concat(this.state.tabSize), role: "textbox", "aria-multiline": "true" }; this.state.readOnly && (n2["aria-readonly"] = "true"), RM(this, _O, n2); var r2 = this.observer.ignore(function() { var r3 = Q$(e23.contentDOM, e23.contentAttrs, n2), i2 = Q$(e23.dom, e23.editorAttrs, t2); return r3 || i2; }); return this.editorAttrs = t2, this.contentAttrs = n2, r2; } }, { key: "showAnnouncements", value: function(t2) { var n2, r2 = true, i2 = bi(t2); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2, a2 = bi(n2.value.effects); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (s2.is(e22.announce)) r2 && (this.announceDOM.textContent = ""), r2 = false, this.announceDOM.appendChild(document.createElement("div")).textContent = s2.value; } } catch (e23) { a2.e(e23); } finally { a2.f(); } } } catch (e23) { i2.e(e23); } finally { i2.f(); } } }, { key: "mountStyles", value: function() { this.styleModules = this.state.facet(MO), B_.mount(this.root, this.styleModules.concat(_M).reverse()); } }, { key: "readMeasured", value: function() { if (this.updateState == 2) throw new Error("Reading the editor layout isn't allowed during an update"); this.updateState == 0 && this.measureScheduled > -1 && this.measure(false); } }, { key: "requestMeasure", value: function(e23) { var t2 = this; if (this.measureScheduled < 0 && (this.measureScheduled = requestAnimationFrame(function() { return t2.measure(); })), e23) { if (e23.key != null) { for (var n2 = 0; n2 < this.measureRequests.length; n2++) if (this.measureRequests[n2].key === e23.key) return void (this.measureRequests[n2] = e23); } this.measureRequests.push(e23); } } }, { key: "plugin", value: function(e23) { var t2 = this.pluginMap.get(e23); return (t2 === void 0 || t2 && t2.spec != e23) && this.pluginMap.set(e23, t2 = this.plugins.find(function(t3) { return t3.spec == e23; }) || null), t2 && t2.update(this).value; } }, { key: "documentTop", get: function() { return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop; } }, { key: "documentPadding", get: function() { return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom }; } }, { key: "elementAtHeight", value: function(e23) { return this.readMeasured(), this.viewState.elementAtHeight(e23); } }, { key: "lineBlockAtHeight", value: function(e23) { return this.readMeasured(), this.viewState.lineBlockAtHeight(e23); } }, { key: "viewportLineBlocks", get: function() { return this.viewState.viewportLines; } }, { key: "lineBlockAt", value: function(e23) { return this.viewState.lineBlockAt(e23); } }, { key: "contentHeight", get: function() { return this.viewState.contentHeight; } }, { key: "moveByChar", value: function(e23, t2, n2) { return jA(this, e23, xA(this, e23, t2, n2)); } }, { key: "moveByGroup", value: function(e23, t2) { var n2 = this; return jA(this, e23, xA(this, e23, t2, function(t3) { return function(e24, t4, n3) { var r2 = e24.state.charCategorizer(t4), i2 = r2(n3); return function(e25) { var t5 = r2(e25); return i2 == d_.Space && (i2 = t5), i2 == t5; }; }(n2, e23.head, t3); })); } }, { key: "moveToLineBoundary", value: function(e23, t2) { var n2 = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2]; return wA(this, e23, t2, n2); } }, { key: "moveVertically", value: function(e23, t2, n2) { return jA(this, e23, function(e24, t3, n3, r2) { var i2 = t3.head, o2 = n3 ? 1 : -1; if (i2 == (n3 ? e24.state.doc.length : 0)) return _C.cursor(i2, t3.assoc); var a2, s2 = t3.goalColumn, u2 = e24.contentDOM.getBoundingClientRect(), c2 = e24.coordsAtPos(i2), l2 = e24.documentTop; if (c2) s2 == null && (s2 = c2.left - u2.left), a2 = o2 < 0 ? c2.top : c2.bottom; else { var f2 = e24.viewState.lineBlockAt(i2); s2 == null && (s2 = Math.min(u2.right - u2.left, e24.defaultCharacterWidth * (i2 - f2.from))), a2 = (o2 < 0 ? f2.top : f2.bottom) + l2; } for (var h2 = u2.left + s2, d2 = r2 != null ? r2 : e24.defaultLineHeight >> 1, v2 = 0; ; v2 += 10) { var p2 = a2 + (d2 + v2) * o2, m2 = yA(e24, { x: h2, y: p2 }, false, o2); if (p2 < u2.top || p2 > u2.bottom || (o2 < 0 ? m2 < i2 : m2 > i2)) return _C.cursor(m2, t3.assoc, void 0, s2); } }(this, e23, t2, n2)); } }, { key: "domAtPos", value: function(e23) { return this.docView.domAtPos(e23); } }, { key: "posAtDOM", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return this.docView.posFromDOM(e23, t2); } }, { key: "posAtCoords", value: function(e23) { var t2 = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1]; return this.readMeasured(), yA(this, e23, t2); } }, { key: "coordsAtPos", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; this.readMeasured(); var n2 = this.docView.coordsAt(e23, t2); if (!n2 || n2.left == n2.right) return n2; var r2 = this.state.doc.lineAt(e23), i2 = this.bidiSpans(r2), o2 = i2[KO.find(i2, e23 - r2.from, -1, t2)]; return u$(n2, o2.dir == NO.LTR == t2 > 0); } }, { key: "defaultCharacterWidth", get: function() { return this.viewState.heightOracle.charWidth; } }, { key: "defaultLineHeight", get: function() { return this.viewState.heightOracle.lineHeight; } }, { key: "textDirection", get: function() { return this.viewState.defaultTextDirection; } }, { key: "textDirectionAt", value: function(e23) { return !this.state.facet(mO) || e23 < this.viewport.from || e23 > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e23)); } }, { key: "lineWrapping", get: function() { return this.viewState.heightOracle.lineWrapping; } }, { key: "bidiSpans", value: function(e23) { if (e23.length > NM) return QO(e23.length); var t2, n2 = this.textDirectionAt(e23.from), r2 = bi(this.bidiCache); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value; if (i2.from == e23.from && i2.dir == n2) return i2.order; } } catch (e24) { r2.e(e24); } finally { r2.f(); } var o2 = function(e24, t3) { var n3 = e24.length, r3 = t3 == TO ? 1 : 2, i3 = t3 == TO ? 2 : 1; if (!e24 || r3 == 1 && !UO.test(e24)) return QO(n3); for (var o3 = 0, a2 = r3, s2 = r3; o3 < n3; o3++) { var u2 = JO(e24.charCodeAt(o3)); u2 == 512 ? u2 = a2 : u2 == 8 && s2 == 4 && (u2 = 16), GO[o3] = u2 == 4 ? 2 : u2, 7 & u2 && (s2 = u2), a2 = u2; } for (var c2 = 0, l2 = r3, f2 = r3; c2 < n3; c2++) { var h2 = GO[c2]; if (h2 == 128) c2 < n3 - 1 && l2 == GO[c2 + 1] && 24 & l2 ? h2 = GO[c2] = l2 : GO[c2] = 256; else if (h2 == 64) { for (var d2 = c2 + 1; d2 < n3 && GO[d2] == 64; ) d2++; for (var v2 = c2 && l2 == 8 || d2 < n3 && GO[d2] == 8 ? f2 == 1 ? 1 : 8 : 256, p2 = c2; p2 < d2; p2++) GO[p2] = v2; c2 = d2 - 1; } else h2 == 8 && f2 == 1 && (GO[c2] = 1); l2 = h2, 7 & h2 && (f2 = h2); } for (var m2, g2, y2, b2 = 0, k2 = 0, w2 = 0; b2 < n3; b2++) if (g2 = LO[m2 = e24.charCodeAt(b2)]) if (g2 < 0) { for (var x2 = k2 - 3; x2 >= 0; x2 -= 3) if (BO[x2 + 1] == -g2) { var j2 = BO[x2 + 2], S2 = 2 & j2 ? r3 : 4 & j2 ? 1 & j2 ? i3 : r3 : 0; S2 && (GO[b2] = GO[BO[x2]] = S2), k2 = x2; break; } } else { if (BO.length == 189) break; BO[k2++] = b2, BO[k2++] = m2, BO[k2++] = w2; } else if ((y2 = GO[b2]) == 2 || y2 == 1) { var C2 = y2 == r3; w2 = C2 ? 0 : 1; for (var _2 = k2 - 3; _2 >= 0; _2 -= 3) { var $2 = BO[_2 + 2]; if (2 & $2) break; if (C2) BO[_2 + 2] |= 2; else { if (4 & $2) break; BO[_2 + 2] |= 4; } } } for (var O2 = 0; O2 < n3; O2++) if (GO[O2] == 256) { for (var A2 = O2 + 1; A2 < n3 && GO[A2] == 256; ) A2++; for (var M2 = (O2 ? GO[O2 - 1] : r3) == 1, E2 = M2 == ((A2 < n3 ? GO[A2] : r3) == 1) ? M2 ? 1 : 2 : r3, P2 = O2; P2 < A2; P2++) GO[P2] = E2; O2 = A2 - 1; } var N2 = []; if (r3 == 1) for (var T2 = 0; T2 < n3; ) { for (var I2 = T2, R2 = GO[T2++] != 1; T2 < n3 && R2 == (GO[T2] != 1); ) T2++; if (R2) for (var D2 = T2; D2 > I2; ) { for (var z2 = D2, L2 = GO[--D2] != 2; D2 > I2 && L2 == (GO[D2 - 1] != 2); ) D2--; N2.push(new KO(D2, z2, L2 ? 2 : 1)); } else N2.push(new KO(I2, T2, 0)); } else for (var B2 = 0; B2 < n3; ) { for (var q2 = B2, F2 = GO[B2++] == 2; B2 < n3 && F2 == (GO[B2] == 2); ) B2++; N2.push(new KO(q2, B2, F2 ? 1 : 2)); } return N2; }(e23.text, n2); return this.bidiCache.push(new IM(e23.from, e23.to, n2, o2)), o2; } }, { key: "hasFocus", get: function() { var e23; return (document.hasFocus() || R$.safari && ((e23 = this.inputState) === null || e23 === void 0 ? void 0 : e23.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM; } }, { key: "focus", value: function() { var e23 = this; this.observer.ignore(function() { d$(e23.contentDOM), e23.docView.updateSelection(); }); } }, { key: "destroy", value: function() { var e23, t2 = bi(this.plugins); try { for (t2.s(); !(e23 = t2.n()).done; ) { e23.value.destroy(this); } } catch (e24) { t2.e(e24); } finally { t2.f(); } this.plugins = [], this.inputState.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && cancelAnimationFrame(this.measureScheduled), this.destroyed = true; } }], [{ key: "scrollIntoView", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return yO.of(new gO(typeof e23 == "number" ? _C.cursor(e23) : e23, t2.y, t2.x, t2.yMargin, t2.xMargin)); } }, { key: "domEventHandlers", value: function(e23) { return jO.define(function() { return {}; }, { eventHandlers: e23 }); } }, { key: "theme", value: function(e23, t2) { var n2 = B_.newName(), r2 = [bM.of(n2), MO.of(CM(".".concat(n2), e23))]; return t2 && t2.dark && r2.push(kM.of(true)), r2; } }, { key: "baseTheme", value: function(e23) { return qC.lowest(MO.of(CM("." + wM, e23, SM))); } }, { key: "findFromDOM", value: function(e23) { var t2, n2 = e23.querySelector(".cm-content"), r2 = n2 && k$.get(n2) || k$.get(e23); return ((t2 = r2 == null ? void 0 : r2.rootView) === null || t2 === void 0 ? void 0 : t2.view) || null; } }]), e22; }(); PM.styleModule = MO, PM.inputHandler = pO, PM.perLineTextDirection = mO, PM.exceptionSink = dO, PM.updateListener = vO, PM.editable = kO, PM.mouseSelectionStyle = hO, PM.dragMovesSelection = fO, PM.clickAddsSelectionRange = lO, PM.decorations = $O, PM.atomicRanges = OO, PM.scrollMargins = AO, PM.darkTheme = kM, PM.contentAttributes = _O, PM.editorAttributes = CO, PM.lineWrapping = PM.contentAttributes.of({ class: "cm-lineWrapping" }), PM.announce = i_.define(); var NM = 4096, TM = {}, IM = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.from = t2, this.to = n2, this.dir = r2, this.order = i2; } return zi(e22, null, [{ key: "update", value: function(t2, n2) { if (n2.empty) return t2; for (var r2 = [], i2 = t2.length ? t2[t2.length - 1].dir : NO.LTR, o2 = Math.max(0, t2.length - 10); o2 < t2.length; o2++) { var a2 = t2[o2]; a2.dir != i2 || n2.touchesRange(a2.from, a2.to) || r2.push(new e22(n2.mapPos(a2.from, 1), n2.mapPos(a2.to, -1), a2.dir, a2.order)); } return r2; } }]), e22; }(); function RM(e22, t2, n2) { for (var r2 = e22.state.facet(t2), i2 = r2.length - 1; i2 >= 0; i2--) { var o2 = r2[i2], a2 = typeof o2 == "function" ? o2(e22) : o2; a2 && K$(a2, n2); } return n2; } var DM = R$.mac ? "mac" : R$.windows ? "win" : R$.linux ? "linux" : "key"; function zM(e22, t2) { var n2, r2, i2, o2, a2 = e22.split(/-(?!$)/), s2 = a2[a2.length - 1]; s2 == "Space" && (s2 = " "); for (var u2 = 0; u2 < a2.length - 1; ++u2) { var c2 = a2[u2]; if (/^(cmd|meta|m)$/i.test(c2)) o2 = true; else if (/^a(lt)?$/i.test(c2)) n2 = true; else if (/^(c|ctrl|control)$/i.test(c2)) r2 = true; else if (/^s(hift)?$/i.test(c2)) i2 = true; else { if (!/^mod$/i.test(c2)) throw new Error("Unrecognized modifier name: " + c2); t2 == "mac" ? o2 = true : r2 = true; } } return n2 && (s2 = "Alt-" + s2), r2 && (s2 = "Ctrl-" + s2), o2 && (s2 = "Meta-" + s2), i2 && (s2 = "Shift-" + s2), s2; } function LM(e22, t2, n2) { return t2.altKey && (e22 = "Alt-" + e22), t2.ctrlKey && (e22 = "Ctrl-" + e22), t2.metaKey && (e22 = "Meta-" + e22), n2 !== false && t2.shiftKey && (e22 = "Shift-" + e22), e22; } var BM = PM.domEventHandlers({ keydown: function(e22, t2) { return WM(VM(t2.state), e22, t2, "editor"); } }), qM = AC.define({ enables: BM }), FM = /* @__PURE__ */ new WeakMap(); function VM(e22) { var t2 = e22.facet(qM), n2 = FM.get(t2); return n2 || FM.set(t2, n2 = function(e23) { var t3, n3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DM, r2 = /* @__PURE__ */ Object.create(null), i2 = /* @__PURE__ */ Object.create(null), o2 = function(e24, t4) { var n4 = i2[e24]; if (n4 == null) i2[e24] = t4; else if (n4 != t4) throw new Error("Key binding " + e24 + " is used both as a regular binding and as a multi-stroke prefix"); }, a2 = function(e24, t4, i3, a3) { for (var s3 = r2[e24] || (r2[e24] = /* @__PURE__ */ Object.create(null)), u3 = t4.split(/ (?!$)/).map(function(e25) { return zM(e25, n3); }), c3 = function(t5) { var n4 = u3.slice(0, t5).join(" "); o2(n4, true), s3[n4] || (s3[n4] = { preventDefault: true, commands: [function(t6) { var r3 = HM = { view: t6, prefix: n4, scope: e24 }; return setTimeout(function() { HM == r3 && (HM = null); }, 4e3), true; }] }); }, l3 = 1; l3 < u3.length; l3++) c3(l3); var f3 = u3.join(" "); o2(f3, false); var h3 = s3[f3] || (s3[f3] = { preventDefault: false, commands: [] }); h3.commands.push(i3), a3 && (h3.preventDefault = true); }, s2 = bi(e23); try { for (s2.s(); !(t3 = s2.n()).done; ) { var u2 = t3.value, c2 = u2[n3] || u2.key; if (c2) { var l2, f2 = bi(u2.scope ? u2.scope.split(" ") : ["editor"]); try { for (f2.s(); !(l2 = f2.n()).done; ) { var h2 = l2.value; a2(h2, c2, u2.run, u2.preventDefault), u2.shift && a2(h2, "Shift-" + c2, u2.shift, u2.preventDefault); } } catch (e24) { f2.e(e24); } finally { f2.f(); } } } } catch (e24) { s2.e(e24); } finally { s2.f(); } return r2; }(t2.reduce(function(e23, t3) { return e23.concat(t3); }, []))), n2; } var HM = null; function WM(e22, t2, n2, r2) { var i2 = function(e23) { var t3 = !(Q_ && (e23.ctrlKey || e23.altKey || e23.metaKey) || (J_ || G_) && e23.shiftKey && e23.key && e23.key.length == 1) && e23.key || (e23.shiftKey ? H_ : V_)[e23.keyCode] || e23.key || "Unidentified"; return t3 == "Esc" && (t3 = "Escape"), t3 == "Del" && (t3 = "Delete"), t3 == "Left" && (t3 = "ArrowLeft"), t3 == "Up" && (t3 = "ArrowUp"), t3 == "Right" && (t3 = "ArrowRight"), t3 == "Down" && (t3 = "ArrowDown"), t3; }(t2), o2 = hC(i2, 0), a2 = vC(o2) == i2.length && i2 != " ", s2 = "", u2 = false; HM && HM.view == n2 && HM.scope == r2 && (s2 = HM.prefix + " ", (u2 = _A.indexOf(t2.keyCode) < 0) && (HM = null)); var c2, l2 = function(e23) { if (e23) { var t3, r3 = bi(e23.commands); try { for (r3.s(); !(t3 = r3.n()).done; ) { if ((0, t3.value)(n2)) return true; } } catch (e24) { r3.e(e24); } finally { r3.f(); } e23.preventDefault && (u2 = true); } return false; }, f2 = e22[r2]; if (f2) { if (l2(f2[s2 + LM(i2, t2, !a2)])) return true; if (a2 && (t2.shiftKey || t2.altKey || t2.metaKey || o2 > 127) && (c2 = V_[t2.keyCode]) && c2 != i2) { if (l2(f2[s2 + LM(c2, t2, true)])) return true; if (t2.shiftKey && H_[t2.keyCode] != c2 && l2(f2[s2 + LM(H_[t2.keyCode], t2, false)])) return true; } else if (a2 && t2.shiftKey && l2(f2[s2 + LM(i2, t2, true)])) return true; } return u2; } var JM = !R$.ios, UM = AC.define({ combine: function(e22) { return g_(e22, { cursorBlinkRate: 1200, drawRangeCursor: true }, { cursorBlinkRate: function(e23, t2) { return Math.min(e23, t2); }, drawRangeCursor: function(e23, t2) { return e23 || t2; } }); } }); function KM() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [UM.of(e22), QM, ZM]; } var GM = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.left = t2, this.top = n2, this.width = r2, this.height = i2, this.className = o2; } return zi(e22, [{ key: "draw", value: function() { var e23 = document.createElement("div"); return e23.className = this.className, this.adjust(e23), e23; } }, { key: "adjust", value: function(e23) { e23.style.left = this.left + "px", e23.style.top = this.top + "px", this.width >= 0 && (e23.style.width = this.width + "px"), e23.style.height = this.height + "px"; } }, { key: "eq", value: function(e23) { return this.left == e23.left && this.top == e23.top && this.width == e23.width && this.height == e23.height && this.className == e23.className; } }]), e22; }(), QM = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.rangePieces = [], this.cursors = [], this.measureReq = { read: this.readPos.bind(this), write: this.drawSel.bind(this) }, this.selectionLayer = t2.scrollDOM.appendChild(document.createElement("div")), this.selectionLayer.className = "cm-selectionLayer", this.selectionLayer.setAttribute("aria-hidden", "true"), this.cursorLayer = t2.scrollDOM.appendChild(document.createElement("div")), this.cursorLayer.className = "cm-cursorLayer", this.cursorLayer.setAttribute("aria-hidden", "true"), t2.requestMeasure(this.measureReq), this.setBlinkRate(); } return zi(e22, [{ key: "setBlinkRate", value: function() { this.cursorLayer.style.animationDuration = this.view.state.facet(UM).cursorBlinkRate + "ms"; } }, { key: "update", value: function(e23) { var t2 = e23.startState.facet(UM) != e23.state.facet(UM); (t2 || e23.selectionSet || e23.geometryChanged || e23.viewportChanged) && this.view.requestMeasure(this.measureReq), e23.transactions.some(function(e24) { return e24.scrollIntoView; }) && (this.cursorLayer.style.animationName = this.cursorLayer.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink"), t2 && this.setBlinkRate(); } }, { key: "readPos", value: function() { var e23, t2 = this, n2 = this.view.state, r2 = n2.facet(UM), i2 = n2.selection.ranges.map(function(e24) { return e24.empty ? [] : function(e25, t3) { if (t3.to <= e25.viewport.from || t3.from >= e25.viewport.to) return []; var n3 = Math.max(t3.from, e25.viewport.from), r3 = Math.min(t3.to, e25.viewport.to), i3 = e25.textDirection == NO.LTR, o3 = e25.contentDOM, a3 = o3.getBoundingClientRect(), s3 = XM(e25), u3 = window.getComputedStyle(o3.firstChild), c3 = a3.left + parseInt(u3.paddingLeft) + Math.min(0, parseInt(u3.textIndent)), l2 = a3.right - parseInt(u3.paddingRight), f2 = tE(e25, n3), h2 = tE(e25, r3), d2 = f2.type == Z$.Text ? f2 : null, v2 = h2.type == Z$.Text ? h2 : null; e25.lineWrapping && (d2 && (d2 = eE(e25, n3, d2)), v2 && (v2 = eE(e25, r3, v2))); if (d2 && v2 && d2.from == v2.from) return b2(k2(t3.from, t3.to, d2)); var p2 = d2 ? k2(t3.from, null, d2) : w2(f2, false), m2 = v2 ? k2(null, t3.to, v2) : w2(h2, true), g2 = []; return (d2 || f2).to < (v2 || h2).from - 1 ? g2.push(y2(c3, p2.bottom, l2, m2.top)) : p2.bottom < m2.top && e25.elementAtHeight((p2.bottom + m2.top) / 2).type == Z$.Text && (p2.bottom = m2.top = (p2.bottom + m2.top) / 2), b2(p2).concat(g2).concat(b2(m2)); function y2(e26, t4, n4, r4) { return new GM(e26 - s3.left, t4 - s3.top - 0.01, n4 - e26, r4 - t4 + 0.01, "cm-selectionBackground"); } function b2(e26) { for (var t4 = e26.top, n4 = e26.bottom, r4 = e26.horizontal, i4 = [], o4 = 0; o4 < r4.length; o4 += 2) i4.push(y2(r4[o4], t4, r4[o4 + 1], n4)); return i4; } function k2(t4, n4, r4) { var o4 = 1e9, a4 = -1e9, s4 = []; function u4(t5, n5, u5, f4, h4) { var d4 = e25.coordsAtPos(t5, t5 == r4.to ? -2 : 2), v4 = e25.coordsAtPos(u5, u5 == r4.from ? 2 : -2); o4 = Math.min(d4.top, v4.top, o4), a4 = Math.max(d4.bottom, v4.bottom, a4), h4 == NO.LTR ? s4.push(i3 && n5 ? c3 : d4.left, i3 && f4 ? l2 : v4.right) : s4.push(!i3 && f4 ? c3 : v4.left, !i3 && n5 ? l2 : d4.right); } var f3, h3 = t4 != null ? t4 : r4.from, d3 = n4 != null ? n4 : r4.to, v3 = bi(e25.visibleRanges); try { for (v3.s(); !(f3 = v3.n()).done; ) { var p3 = f3.value; if (p3.to > h3 && p3.from < d3) for (var m3 = Math.max(p3.from, h3), g3 = Math.min(p3.to, d3); ; ) { var y3, b3 = e25.state.doc.lineAt(m3), k3 = bi(e25.bidiSpans(b3)); try { for (k3.s(); !(y3 = k3.n()).done; ) { var w3 = y3.value, x2 = w3.from + b3.from, j2 = w3.to + b3.from; if (x2 >= g3) break; j2 > m3 && u4(Math.max(x2, m3), t4 == null && x2 <= h3, Math.min(j2, g3), n4 == null && j2 >= d3, w3.dir); } } catch (e26) { k3.e(e26); } finally { k3.f(); } if ((m3 = b3.to + 1) >= g3) break; } } } catch (e26) { v3.e(e26); } finally { v3.f(); } return s4.length == 0 && u4(h3, t4 == null, d3, n4 == null, e25.textDirection), { top: o4, bottom: a4, horizontal: s4 }; } function w2(e26, t4) { var n4 = a3.top + (t4 ? e26.top : e26.bottom); return { top: n4, bottom: n4, horizontal: [] }; } }(t2.view, e24); }).reduce(function(e24, t3) { return e24.concat(t3); }), o2 = [], a2 = bi(n2.selection.ranges); try { for (a2.s(); !(e23 = a2.n()).done; ) { var s2 = e23.value, u2 = s2 == n2.selection.main; if (s2.empty ? !u2 || JM : r2.drawRangeCursor) { var c2 = nE(this.view, s2, u2); c2 && o2.push(c2); } } } catch (e24) { a2.e(e24); } finally { a2.f(); } return { rangePieces: i2, cursors: o2 }; } }, { key: "drawSel", value: function(e23) { var t2 = this, n2 = e23.rangePieces, r2 = e23.cursors; if (n2.length != this.rangePieces.length || n2.some(function(e24, n3) { return !e24.eq(t2.rangePieces[n3]); })) { this.selectionLayer.textContent = ""; var i2, o2 = bi(n2); try { for (o2.s(); !(i2 = o2.n()).done; ) { var a2 = i2.value; this.selectionLayer.appendChild(a2.draw()); } } catch (e24) { o2.e(e24); } finally { o2.f(); } this.rangePieces = n2; } if (r2.length != this.cursors.length || r2.some(function(e24, n3) { return !e24.eq(t2.cursors[n3]); })) { var s2 = this.cursorLayer.children; if (s2.length !== r2.length) { this.cursorLayer.textContent = ""; var u2, c2 = bi(r2); try { for (c2.s(); !(u2 = c2.n()).done; ) { var l2 = u2.value; this.cursorLayer.appendChild(l2.draw()); } } catch (e24) { c2.e(e24); } finally { c2.f(); } } else r2.forEach(function(e24, t3) { return e24.adjust(s2[t3]); }); this.cursors = r2; } } }, { key: "destroy", value: function() { this.selectionLayer.remove(), this.cursorLayer.remove(); } }]), e22; }()), YM = { ".cm-line": { "& ::selection": { backgroundColor: "transparent !important" }, "&::selection": { backgroundColor: "transparent !important" } } }; JM && (YM[".cm-line"].caretColor = "transparent !important"); var ZM = qC.highest(PM.theme(YM)); function XM(e22) { var t2 = e22.scrollDOM.getBoundingClientRect(); return { left: (e22.textDirection == NO.LTR ? t2.left : t2.right - e22.scrollDOM.clientWidth) - e22.scrollDOM.scrollLeft, top: t2.top - e22.scrollDOM.scrollTop }; } function eE(e22, t2, n2) { var r2 = _C.cursor(t2); return { from: Math.max(n2.from, e22.moveToLineBoundary(r2, false, true).from), to: Math.min(n2.to, e22.moveToLineBoundary(r2, true, true).from), type: Z$.Text }; } function tE(e22, t2) { var n2 = e22.lineBlockAt(t2); if (Array.isArray(n2.type)) { var r2, i2 = bi(n2.type); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; if (o2.to > t2 || o2.to == t2 && (o2.to == n2.to || o2.type == Z$.Text)) return o2; } } catch (e23) { i2.e(e23); } finally { i2.f(); } } return n2; } function nE(e22, t2, n2) { var r2 = e22.coordsAtPos(t2.head, t2.assoc || 1); if (!r2) return null; var i2 = XM(e22); return new GM(r2.left - i2.left, r2.top - i2.top, -1, r2.bottom - r2.top, n2 ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary"); } var rE = i_.define({ map: function(e22, t2) { return e22 == null ? null : t2.mapPos(e22); } }), iE = IC.define({ create: function() { return null; }, update: function(e22, t2) { return e22 != null && (e22 = t2.changes.mapPos(e22)), t2.effects.reduce(function(e23, t3) { return t3.is(rE) ? t3.value : e23; }, e22); } }), oE = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) }; } return zi(e22, [{ key: "update", value: function(e23) { var t2, n2 = e23.state.field(iE); n2 == null ? this.cursor != null && ((t2 = this.cursor) === null || t2 === void 0 || t2.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (e23.startState.field(iE) != n2 || e23.docChanged || e23.geometryChanged) && this.view.requestMeasure(this.measureReq)); } }, { key: "readPos", value: function() { var e23 = this.view.state.field(iE), t2 = e23 != null && this.view.coordsAtPos(e23); if (!t2) return null; var n2 = this.view.scrollDOM.getBoundingClientRect(); return { left: t2.left - n2.left + this.view.scrollDOM.scrollLeft, top: t2.top - n2.top + this.view.scrollDOM.scrollTop, height: t2.bottom - t2.top }; } }, { key: "drawCursor", value: function(e23) { this.cursor && (e23 ? (this.cursor.style.left = e23.left + "px", this.cursor.style.top = e23.top + "px", this.cursor.style.height = e23.height + "px") : this.cursor.style.left = "-100000px"); } }, { key: "destroy", value: function() { this.cursor && this.cursor.remove(); } }, { key: "setDropPos", value: function(e23) { this.view.state.field(iE) != e23 && this.view.dispatch({ effects: rE.of(e23) }); } }]), e22; }(), { eventHandlers: { dragover: function(e22) { this.setDropPos(this.view.posAtCoords({ x: e22.clientX, y: e22.clientY })); }, dragleave: function(e22) { e22.target != this.view.contentDOM && this.view.contentDOM.contains(e22.relatedTarget) || this.setDropPos(null); }, dragend: function() { this.setDropPos(null); }, drop: function() { this.setDropPos(null); } } }); function aE(e22, t2, n2, r2, i2) { t2.lastIndex = 0; for (var o2, a2 = e22.iterRange(n2, r2), s2 = n2; !a2.next().done; s2 += a2.value.length) if (!a2.lineBreak) for (; o2 = t2.exec(a2.value); ) i2(s2 + o2.index, s2 + o2.index + o2[0].length, o2); } var sE = function() { function e22(t2) { Ri(this, e22); var n2 = t2.regexp, r2 = t2.decoration, i2 = t2.boundary, o2 = t2.maxLength, a2 = o2 === void 0 ? 1e3 : o2; if (!n2.global) throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set"); this.regexp = n2, this.getDeco = typeof r2 == "function" ? r2 : function() { return r2; }, this.boundary = i2, this.maxLength = a2; } return zi(e22, [{ key: "createDeco", value: function(e23) { var t2, n2 = this, r2 = new S_(), i2 = bi(function(e24, t3) { var n3 = e24.visibleRanges; if (n3.length == 1 && n3[0].from == e24.viewport.from && n3[0].to == e24.viewport.to) return n3; var r3, i3 = [], o3 = bi(n3); try { for (o3.s(); !(r3 = o3.n()).done; ) { var a3 = r3.value, s3 = a3.from, u2 = a3.to; s3 = Math.max(e24.state.doc.lineAt(s3).from, s3 - t3), u2 = Math.min(e24.state.doc.lineAt(u2).to, u2 + t3), i3.length && i3[i3.length - 1].to >= s3 ? i3[i3.length - 1].to = u2 : i3.push({ from: s3, to: u2 }); } } catch (e25) { o3.e(e25); } finally { o3.f(); } return i3; }(e23, this.maxLength)); try { for (i2.s(); !(t2 = i2.n()).done; ) { var o2 = t2.value, a2 = o2.from, s2 = o2.to; aE(e23.state.doc, this.regexp, a2, s2, function(t3, i3, o3) { return r2.add(t3, i3, n2.getDeco(o3, e23, t3)); }); } } catch (e24) { i2.e(e24); } finally { i2.f(); } return r2.finish(); } }, { key: "updateDeco", value: function(e23, t2) { var n2 = 1e9, r2 = -1; return e23.docChanged && e23.changes.iterChanges(function(t3, i2, o2, a2) { a2 > e23.view.viewport.from && o2 < e23.view.viewport.to && (n2 = Math.min(o2, n2), r2 = Math.max(a2, r2)); }), e23.viewportChanged || r2 - n2 > 1e3 ? this.createDeco(e23.view) : r2 > -1 ? this.updateRange(e23.view, t2.map(e23.changes), n2, r2) : t2; } }, { key: "updateRange", value: function(e23, t2, n2, r2) { var i2, o2 = this, a2 = bi(e23.visibleRanges); try { for (a2.s(); !(i2 = a2.n()).done; ) { var s2 = i2.value, u2 = Math.max(s2.from, n2), c2 = Math.min(s2.to, r2); c2 > u2 && function() { var n3 = e23.state.doc.lineAt(u2), r3 = n3.to < c2 ? e23.state.doc.lineAt(c2) : n3, i3 = Math.max(s2.from, n3.from), a3 = Math.min(s2.to, r3.to); if (o2.boundary) { for (; u2 > n3.from; u2--) if (o2.boundary.test(n3.text[u2 - 1 - n3.from])) { i3 = u2; break; } for (; c2 < r3.to; c2++) if (o2.boundary.test(r3.text[c2 - r3.from])) { a3 = c2; break; } } var l2 = [], f2 = void 0; if (n3 == r3) for (o2.regexp.lastIndex = i3 - n3.from; (f2 = o2.regexp.exec(n3.text)) && f2.index < a3 - n3.from; ) { var h2 = f2.index + n3.from; l2.push(o2.getDeco(f2, e23, h2).range(h2, h2 + f2[0].length)); } else aE(e23.state.doc, o2.regexp, i3, a3, function(t3, n4, r4) { return l2.push(o2.getDeco(r4, e23, t3).range(t3, n4)); }); t2 = t2.update({ filterFrom: i3, filterTo: a3, filter: function(e24, t3) { return e24 < i3 || t3 > a3; }, add: l2 }); }(); } } catch (e24) { a2.e(e24); } finally { a2.f(); } return t2; } }]), e22; }(), uE = /x/.unicode != null ? "gu" : "g", cE = new RegExp("[\0-\b\n-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\uFEFF\uFFF9-\uFFFC]", uE), lE = { 0: "null", 7: "bell", 8: "backspace", 10: "newline", 11: "vertical tab", 13: "carriage return", 27: "escape", 8203: "zero width space", 8204: "zero width non-joiner", 8205: "zero width joiner", 8206: "left-to-right mark", 8207: "right-to-left mark", 8232: "line separator", 8237: "left-to-right override", 8238: "right-to-left override", 8233: "paragraph separator", 65279: "zero width no-break space", 65532: "object replacement" }, fE = null; var hE = AC.define({ combine: function(e22) { var t2 = g_(e22, { render: null, specialChars: cE, addSpecialChars: null }); return (t2.replaceTabs = !function() { var e23; if (fE == null && typeof document != "undefined" && document.body) { var t3 = document.body.style; fE = ((e23 = t3.tabSize) !== null && e23 !== void 0 ? e23 : t3.MozTabSize) != null; } return fE || false; }()) && (t2.specialChars = new RegExp(" |" + t2.specialChars.source, uE)), t2.addSpecialChars && (t2.specialChars = new RegExp(t2.specialChars.source + "|" + t2.addSpecialChars.source, uE)), t2; } }); function dE() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [hE.of(e22), pE()]; } var vE = null; function pE() { return vE || (vE = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.decorations = X$.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t2.state.facet(hE)), this.decorations = this.decorator.createDeco(t2); } return zi(e22, [{ key: "makeDecorator", value: function(e23) { var t2 = this; return new sE({ regexp: e23.specialChars, decoration: function(n2, r2, i2) { var o2 = r2.state.doc, a2 = hC(n2[0], 0); if (a2 == 9) { var s2 = o2.lineAt(i2), u2 = r2.state.tabSize, c2 = I_(s2.text, u2, i2 - s2.from); return X$.replace({ widget: new gE((u2 - c2 % u2) * t2.view.defaultCharacterWidth) }); } return t2.decorationCache[a2] || (t2.decorationCache[a2] = X$.replace({ widget: new mE(e23, a2) })); }, boundary: e23.replaceTabs ? void 0 : /[^]/ }); } }, { key: "update", value: function(e23) { var t2 = e23.state.facet(hE); e23.startState.facet(hE) != t2 ? (this.decorator = this.makeDecorator(t2), this.decorations = this.decorator.createDeco(e23.view)) : this.decorations = this.decorator.updateDeco(e23, this.decorations); } }]), e22; }(), { decorations: function(e22) { return e22.decorations; } })); } var mE = function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2(e23, r2) { var i2; return Ri(this, n2), (i2 = t2.call(this)).options = e23, i2.code = r2, i2; } return zi(n2, [{ key: "eq", value: function(e23) { return e23.code == this.code; } }, { key: "toDOM", value: function(e23) { var t3 = function(e24) { return e24 >= 32 ? "\u2022" : e24 == 10 ? "\u2424" : String.fromCharCode(9216 + e24); }(this.code), n3 = e23.state.phrase("Control character") + " " + (lE[this.code] || "0x" + this.code.toString(16)), r2 = this.options.render && this.options.render(this.code, n3, t3); if (r2) return r2; var i2 = document.createElement("span"); return i2.textContent = t3, i2.title = n3, i2.setAttribute("aria-label", n3), i2.className = "cm-specialChar", i2; } }, { key: "ignoreEvent", value: function() { return false; } }]), n2; }(), gE = function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).width = e23, r2; } return zi(n2, [{ key: "eq", value: function(e23) { return e23.width == this.width; } }, { key: "toDOM", value: function() { var e23 = document.createElement("span"); return e23.textContent = " ", e23.className = "cm-tab", e23.style.width = this.width + "px", e23; } }, { key: "ignoreEvent", value: function() { return false; } }]), n2; }(); var yE = X$.line({ class: "cm-activeLine" }), bE = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.decorations = this.getDeco(t2); } return zi(e22, [{ key: "update", value: function(e23) { (e23.docChanged || e23.selectionSet) && (this.decorations = this.getDeco(e23.view)); } }, { key: "getDeco", value: function(e23) { var t2, n2 = -1, r2 = [], i2 = bi(e23.state.selection.ranges); try { for (i2.s(); !(t2 = i2.n()).done; ) { var o2 = t2.value; if (!o2.empty) return X$.none; var a2 = e23.lineBlockAt(o2.head); a2.from > n2 && (r2.push(yE.range(a2.from)), n2 = a2.from); } } catch (e24) { i2.e(e24); } finally { i2.f(); } return X$.set(r2); } }]), e22; }(), { decorations: function(e22) { return e22.decorations; } }); function kE(e22, t2) { var n2 = e22.posAtCoords({ x: t2.clientX, y: t2.clientY }, false), r2 = e22.state.doc.lineAt(n2), i2 = n2 - r2.from, o2 = i2 > 2e3 ? -1 : i2 == r2.length ? function(e23, t3) { var n3 = e23.coordsAtPos(e23.viewport.from); return n3 ? Math.round(Math.abs((n3.left - t3) / e23.defaultCharacterWidth)) : -1; }(e22, t2.clientX) : I_(r2.text, e22.state.tabSize, n2 - r2.from); return { line: r2.number, col: o2, off: i2 }; } function wE(e22, t2) { var n2 = kE(e22, t2), r2 = e22.state.selection; return n2 ? { update: function(e23) { if (e23.docChanged) { var t3 = e23.changes.mapPos(e23.startState.doc.line(n2.line).from), i2 = e23.state.doc.lineAt(t3); n2 = { line: i2.number, col: n2.col, off: Math.min(n2.off, i2.length) }, r2 = r2.map(e23.changes); } }, get: function(t3, i2, o2) { var a2 = kE(e22, t3); if (!a2) return r2; var s2 = function(e23, t4, n3) { var r3 = Math.min(t4.line, n3.line), i3 = Math.max(t4.line, n3.line), o3 = []; if (t4.off > 2e3 || n3.off > 2e3 || t4.col < 0 || n3.col < 0) for (var a3 = Math.min(t4.off, n3.off), s3 = Math.max(t4.off, n3.off), u2 = r3; u2 <= i3; u2++) { var c2 = e23.doc.line(u2); c2.length <= s3 && o3.push(_C.range(c2.from + a3, c2.to + s3)); } else for (var l2 = Math.min(t4.col, n3.col), f2 = Math.max(t4.col, n3.col), h2 = r3; h2 <= i3; h2++) { var d2 = e23.doc.line(h2), v2 = R_(d2.text, l2, e23.tabSize, true); if (v2 > -1) { var p2 = R_(d2.text, f2, e23.tabSize); o3.push(_C.range(d2.from + v2, d2.from + p2)); } } return o3; }(e22.state, n2, a2); return s2.length ? o2 ? _C.create(s2.concat(r2.ranges)) : _C.create(s2) : r2; } } : null; } function xE(e22) { var t2 = (e22 == null ? void 0 : e22.eventFilter) || function(e23) { return e23.altKey && e23.button == 0; }; return PM.mouseSelectionStyle.of(function(e23, n2) { return t2(n2) ? wE(e23, n2) : null; }); } var jE = { Alt: [18, function(e22) { return e22.altKey; }], Control: [17, function(e22) { return e22.ctrlKey; }], Shift: [16, function(e22) { return e22.shiftKey; }], Meta: [91, function(e22) { return e22.metaKey; }] }, SE = { style: "cursor: crosshair" }; function CE() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t2 = ki(jE[e22.key || "Alt"], 2), n2 = t2[0], r2 = t2[1], i2 = jO.fromClass(function() { function e23(t3) { Ri(this, e23), this.view = t3, this.isDown = false; } return zi(e23, [{ key: "set", value: function(e24) { this.isDown != e24 && (this.isDown = e24, this.view.update([])); } }]), e23; }(), { eventHandlers: { keydown: function(e23) { this.set(e23.keyCode == n2 || r2(e23)); }, keyup: function(e23) { e23.keyCode != n2 && r2(e23) || this.set(false); } } }); return [i2, PM.contentAttributes.of(function(e23) { var t3; return ((t3 = e23.plugin(i2)) === null || t3 === void 0 ? void 0 : t3.isDown) ? SE : null; })]; } var _E = function() { function e22(t2, n2, r2) { Ri(this, e22), this.facet = n2, this.createTooltipView = r2, this.input = t2.state.facet(n2), this.tooltips = this.input.filter(function(e23) { return e23; }), this.tooltipViews = this.tooltips.map(r2); } return zi(e22, [{ key: "update", value: function(e23) { var t2 = e23.state.facet(this.facet), n2 = t2.filter(function(e24) { return e24; }); if (t2 === this.input) { var r2, i2 = bi(this.tooltipViews); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; o2.update && o2.update(e23); } } catch (e24) { i2.e(e24); } finally { i2.f(); } return false; } for (var a2 = [], s2 = 0; s2 < n2.length; s2++) { var u2 = n2[s2], c2 = -1; if (u2) { for (var l2 = 0; l2 < this.tooltips.length; l2++) { var f2 = this.tooltips[l2]; f2 && f2.create == u2.create && (c2 = l2); } if (c2 < 0) a2[s2] = this.createTooltipView(u2); else { var h2 = a2[s2] = this.tooltipViews[c2]; h2.update && h2.update(e23); } } } var d2, v2 = bi(this.tooltipViews); try { for (v2.s(); !(d2 = v2.n()).done; ) { var p2 = d2.value; a2.indexOf(p2) < 0 && p2.dom.remove(); } } catch (e24) { v2.e(e24); } finally { v2.f(); } return this.input = t2, this.tooltips = n2, this.tooltipViews = a2, true; } }]), e22; }(); function $E() { return { top: 0, left: 0, bottom: innerHeight, right: innerWidth }; } var OE = AC.define({ combine: function(e22) { var t2, n2, r2; return { position: R$.ios ? "absolute" : ((t2 = e22.find(function(e23) { return e23.position; })) === null || t2 === void 0 ? void 0 : t2.position) || "fixed", parent: ((n2 = e22.find(function(e23) { return e23.parent; })) === null || n2 === void 0 ? void 0 : n2.parent) || null, tooltipSpace: ((r2 = e22.find(function(e23) { return e23.tooltipSpace; })) === null || r2 === void 0 ? void 0 : r2.tooltipSpace) || $E }; } }), AE = jO.fromClass(function() { function e22(t2) { var n2, r2 = this; Ri(this, e22), this.view = t2, this.inView = true, this.lastTransaction = 0, this.measureTimeout = -1; var i2 = t2.state.facet(OE); this.position = i2.position, this.parent = i2.parent, this.classes = t2.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.manager = new _E(t2, PE, function(e23) { return r2.createTooltip(e23); }), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver(function(e23) { Date.now() > r2.lastTransaction - 50 && e23.length > 0 && e23[e23.length - 1].intersectionRatio < 1 && r2.measureSoon(); }, { threshold: [1] }) : null, this.observeIntersection(), (n2 = t2.dom.ownerDocument.defaultView) === null || n2 === void 0 || n2.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure(); } return zi(e22, [{ key: "createContainer", value: function() { this.parent ? (this.container = document.createElement("div"), this.container.style.position = "relative", this.container.className = this.view.themeClasses, this.parent.appendChild(this.container)) : this.container = this.view.dom; } }, { key: "observeIntersection", value: function() { if (this.intersectionObserver) { this.intersectionObserver.disconnect(); var e23, t2 = bi(this.manager.tooltipViews); try { for (t2.s(); !(e23 = t2.n()).done; ) { var n2 = e23.value; this.intersectionObserver.observe(n2.dom); } } catch (e24) { t2.e(e24); } finally { t2.f(); } } } }, { key: "measureSoon", value: function() { var e23 = this; this.measureTimeout < 0 && (this.measureTimeout = setTimeout(function() { e23.measureTimeout = -1, e23.maybeMeasure(); }, 50)); } }, { key: "update", value: function(e23) { e23.transactions.length && (this.lastTransaction = Date.now()); var t2 = this.manager.update(e23); t2 && this.observeIntersection(); var n2 = t2 || e23.geometryChanged, r2 = e23.state.facet(OE); if (r2.position != this.position) { this.position = r2.position; var i2, o2 = bi(this.manager.tooltipViews); try { for (o2.s(); !(i2 = o2.n()).done; ) { i2.value.dom.style.position = this.position; } } catch (e24) { o2.e(e24); } finally { o2.f(); } n2 = true; } if (r2.parent != this.parent) { this.parent && this.container.remove(), this.parent = r2.parent, this.createContainer(); var a2, s2 = bi(this.manager.tooltipViews); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = a2.value; this.container.appendChild(u2.dom); } } catch (e24) { s2.e(e24); } finally { s2.f(); } n2 = true; } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses); n2 && this.maybeMeasure(); } }, { key: "createTooltip", value: function(e23) { var t2 = e23.create(this.view); if (t2.dom.classList.add("cm-tooltip"), e23.arrow && !t2.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) { var n2 = document.createElement("div"); n2.className = "cm-tooltip-arrow", t2.dom.appendChild(n2); } return t2.dom.style.position = this.position, t2.dom.style.top = "-10000px", this.container.appendChild(t2.dom), t2.mount && t2.mount(this.view), t2; } }, { key: "destroy", value: function() { var e23, t2; (e23 = this.view.dom.ownerDocument.defaultView) === null || e23 === void 0 || e23.removeEventListener("resize", this.measureSoon); var n2, r2 = bi(this.manager.tooltipViews); try { for (r2.s(); !(n2 = r2.n()).done; ) { n2.value.dom.remove(); } } catch (e24) { r2.e(e24); } finally { r2.f(); } (t2 = this.intersectionObserver) === null || t2 === void 0 || t2.disconnect(), clearTimeout(this.measureTimeout); } }, { key: "readMeasure", value: function() { var e23 = this, t2 = this.view.dom.getBoundingClientRect(); return { editor: t2, parent: this.parent ? this.container.getBoundingClientRect() : t2, pos: this.manager.tooltips.map(function(t3, n2) { var r2 = e23.manager.tooltipViews[n2]; return r2.getCoords ? r2.getCoords(t3.pos) : e23.view.coordsAtPos(t3.pos); }), size: this.manager.tooltipViews.map(function(e24) { return e24.dom.getBoundingClientRect(); }), space: this.view.state.facet(OE).tooltipSpace(this.view) }; } }, { key: "writeMeasure", value: function(e23) { for (var t2 = e23.editor, n2 = e23.space, r2 = [], i2 = 0; i2 < this.manager.tooltips.length; i2++) { var o2 = this.manager.tooltips[i2], a2 = this.manager.tooltipViews[i2], s2 = a2.dom, u2 = e23.pos[i2], c2 = e23.size[i2]; if (!u2 || u2.bottom <= Math.max(t2.top, n2.top) || u2.top >= Math.min(t2.bottom, n2.bottom) || u2.right < Math.max(t2.left, n2.left) - 0.1 || u2.left > Math.min(t2.right, n2.right) + 0.1) s2.style.top = "-10000px"; else { var l2 = o2.arrow ? a2.dom.querySelector(".cm-tooltip-arrow") : null, f2 = l2 ? 7 : 0, h2 = c2.right - c2.left, d2 = c2.bottom - c2.top, v2 = a2.offset || EE, p2 = this.view.textDirection == NO.LTR, m2 = c2.width > n2.right - n2.left ? p2 ? n2.left : n2.right - c2.width : p2 ? Math.min(u2.left - (l2 ? 14 : 0) + v2.x, n2.right - h2) : Math.max(n2.left, u2.left - h2 + (l2 ? 14 : 0) - v2.x), g2 = !!o2.above; !o2.strictSide && (g2 ? u2.top - (c2.bottom - c2.top) - v2.y < n2.top : u2.bottom + (c2.bottom - c2.top) + v2.y > n2.bottom) && g2 == n2.bottom - u2.bottom > u2.top - n2.top && (g2 = !g2); var y2 = g2 ? u2.top - d2 - f2 - v2.y : u2.bottom + f2 + v2.y, b2 = m2 + h2; if (a2.overlap !== true) { var k2, w2 = bi(r2); try { for (w2.s(); !(k2 = w2.n()).done; ) { var x2 = k2.value; x2.left < b2 && x2.right > m2 && x2.top < y2 + d2 && x2.bottom > y2 && (y2 = g2 ? x2.top - d2 - 2 - f2 : x2.bottom + f2 + 2); } } catch (e24) { w2.e(e24); } finally { w2.f(); } } this.position == "absolute" ? (s2.style.top = y2 - e23.parent.top + "px", s2.style.left = m2 - e23.parent.left + "px") : (s2.style.top = y2 + "px", s2.style.left = m2 + "px"), l2 && (l2.style.left = "".concat(u2.left + (p2 ? v2.x : -v2.x) - (m2 + 14 - 7), "px")), a2.overlap !== true && r2.push({ left: m2, top: y2, right: b2, bottom: y2 + d2 }), s2.classList.toggle("cm-tooltip-above", g2), s2.classList.toggle("cm-tooltip-below", !g2), a2.positioned && a2.positioned(); } } } }, { key: "maybeMeasure", value: function() { if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && (this.inView = this.view.inView, !this.inView))) { var e23, t2 = bi(this.manager.tooltipViews); try { for (t2.s(); !(e23 = t2.n()).done; ) { e23.value.dom.style.top = "-10000px"; } } catch (e24) { t2.e(e24); } finally { t2.f(); } } } }]), e22; }(), { eventHandlers: { scroll: function() { this.maybeMeasure(); } } }), ME = PM.baseTheme({ ".cm-tooltip": { zIndex: 100 }, "&light .cm-tooltip": { border: "1px solid #bbb", backgroundColor: "#f5f5f5" }, "&light .cm-tooltip-section:not(:first-child)": { borderTop: "1px solid #bbb" }, "&dark .cm-tooltip": { backgroundColor: "#333338", color: "white" }, ".cm-tooltip-arrow": { height: "".concat(7, "px"), width: "".concat(14, "px"), position: "absolute", zIndex: -1, overflow: "hidden", "&:before, &:after": { content: "''", position: "absolute", width: 0, height: 0, borderLeft: "".concat(7, "px solid transparent"), borderRight: "".concat(7, "px solid transparent") }, ".cm-tooltip-above &": { bottom: "-".concat(7, "px"), "&:before": { borderTop: "".concat(7, "px solid #bbb") }, "&:after": { borderTop: "".concat(7, "px solid #f5f5f5"), bottom: "1px" } }, ".cm-tooltip-below &": { top: "-".concat(7, "px"), "&:before": { borderBottom: "".concat(7, "px solid #bbb") }, "&:after": { borderBottom: "".concat(7, "px solid #f5f5f5"), top: "1px" } } }, "&dark .cm-tooltip .cm-tooltip-arrow": { "&:before": { borderTopColor: "#333338", borderBottomColor: "#333338" }, "&:after": { borderTopColor: "transparent", borderBottomColor: "transparent" } } }), EE = { x: 0, y: 0 }, PE = AC.define({ enables: [AE, ME] }), NE = AC.define(), TE = function() { function e22(t2) { var n2 = this; Ri(this, e22), this.view = t2, this.mounted = false, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new _E(t2, NE, function(e23) { return n2.createHostedView(e23); }); } return zi(e22, [{ key: "createHostedView", value: function(e23) { var t2 = e23.create(this.view); return t2.dom.classList.add("cm-tooltip-section"), this.dom.appendChild(t2.dom), this.mounted && t2.mount && t2.mount(this.view), t2; } }, { key: "mount", value: function(e23) { var t2, n2 = bi(this.manager.tooltipViews); try { for (n2.s(); !(t2 = n2.n()).done; ) { var r2 = t2.value; r2.mount && r2.mount(e23); } } catch (e24) { n2.e(e24); } finally { n2.f(); } this.mounted = true; } }, { key: "positioned", value: function() { var e23, t2 = bi(this.manager.tooltipViews); try { for (t2.s(); !(e23 = t2.n()).done; ) { var n2 = e23.value; n2.positioned && n2.positioned(); } } catch (e24) { t2.e(e24); } finally { t2.f(); } } }, { key: "update", value: function(e23) { this.manager.update(e23); } }], [{ key: "create", value: function(t2) { return new e22(t2); } }]), e22; }(), IE = PE.compute([NE], function(e22) { var t2 = e22.facet(NE).filter(function(e23) { return e23; }); return t2.length === 0 ? null : { pos: Math.min.apply(Math, Ni(t2.map(function(e23) { return e23.pos; }))), end: Math.max.apply(Math, Ni(t2.filter(function(e23) { return e23.end != null; }).map(function(e23) { return e23.end; }))), create: TE.create, above: t2[0].above, arrow: t2.some(function(e23) { return e23.arrow; }) }; }), RE = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.view = t2, this.source = n2, this.field = r2, this.setHover = i2, this.hoverTime = o2, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: t2.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), t2.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), t2.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this)); } return zi(e22, [{ key: "update", value: function() { var e23 = this; this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(function() { return e23.startHover(); }, 20)); } }, { key: "active", get: function() { return this.view.state.field(this.field); } }, { key: "checkHover", value: function() { if (this.hoverTimeout = -1, !this.active) { var e23 = Date.now() - this.lastMove.time; e23 < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e23) : this.startHover(); } } }, { key: "startHover", value: function() { var e23 = this; clearTimeout(this.restartTimeout); var t2 = this.lastMove, n2 = this.view.contentDOM.contains(t2.target) ? this.view.posAtCoords(t2) : null; if (n2 != null) { var r2 = this.view.coordsAtPos(n2); if (!(r2 == null || t2.y < r2.top || t2.y > r2.bottom || t2.x < r2.left - this.view.defaultCharacterWidth || t2.x > r2.right + this.view.defaultCharacterWidth)) { var i2 = this.view.bidiSpans(this.view.state.doc.lineAt(n2)).find(function(e24) { return e24.from <= n2 && e24.to >= n2; }), o2 = i2 && i2.dir == NO.RTL ? -1 : 1, a2 = this.source(this.view, n2, t2.x < r2.left ? -o2 : o2); if (a2 == null ? void 0 : a2.then) { var s2 = this.pending = { pos: n2 }; a2.then(function(t3) { e23.pending == s2 && (e23.pending = null, t3 && e23.view.dispatch({ effects: e23.setHover.of(t3) })); }, function(t3) { return bO(e23.view.state, t3, "hover tooltip"); }); } else a2 && this.view.dispatch({ effects: this.setHover.of(a2) }); } } } }, { key: "mousemove", value: function(e23) { var t2; this.lastMove = { x: e23.clientX, y: e23.clientY, target: e23.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime)); var n2 = this.active; if (n2 && !function(e24) { for (var t3 = e24; t3; t3 = t3.parentNode) if (t3.nodeType == 1 && t3.classList.contains("cm-tooltip")) return true; return false; }(this.lastMove.target) || this.pending) { var r2 = (n2 || this.pending).pos, i2 = (t2 = n2 == null ? void 0 : n2.end) !== null && t2 !== void 0 ? t2 : r2; (r2 == i2 ? this.view.posAtCoords(this.lastMove) == r2 : function(e24, t3, n3, r3, i3, o2) { var a2 = document.createRange(), s2 = e24.domAtPos(t3), u2 = e24.domAtPos(n3); a2.setEnd(u2.node, u2.offset), a2.setStart(s2.node, s2.offset); var c2 = a2.getClientRects(); a2.detach(); for (var l2 = 0; l2 < c2.length; l2++) { var f2 = c2[l2]; if (Math.max(f2.top - i3, i3 - f2.bottom, f2.left - r3, r3 - f2.right) <= o2) return true; } return false; }(this.view, r2, i2, e23.clientX, e23.clientY, 6)) || (this.view.dispatch({ effects: this.setHover.of(null) }), this.pending = null); } } }, { key: "mouseleave", value: function() { clearTimeout(this.hoverTimeout), this.hoverTimeout = -1, this.active && this.view.dispatch({ effects: this.setHover.of(null) }); } }, { key: "destroy", value: function() { clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove); } }]), e22; }(); function DE(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n2 = i_.define(), r2 = IC.define({ create: function() { return null; }, update: function(e23, r3) { if (e23 && (t2.hideOnChange && (r3.docChanged || r3.selection) || t2.hideOn && t2.hideOn(r3, e23))) return null; if (e23 && r3.docChanged) { var i2 = r3.changes.mapPos(e23.pos, -1, mC.TrackDel); if (i2 == null) return null; var o2 = Object.assign(/* @__PURE__ */ Object.create(null), e23); o2.pos = i2, e23.end != null && (o2.end = r3.changes.mapPos(e23.end)), e23 = o2; } var a2, s2 = bi(r3.effects); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = a2.value; u2.is(n2) && (e23 = u2.value), u2.is(LE) && (e23 = null); } } catch (e24) { s2.e(e24); } finally { s2.f(); } return e23; }, provide: function(e23) { return NE.from(e23); } }); return [r2, jO.define(function(i2) { return new RE(i2, e22, r2, n2, t2.hoverTime || 300); }), IE]; } function zE(e22, t2) { var n2 = e22.plugin(AE); if (!n2) return null; var r2 = n2.manager.tooltips.indexOf(t2); return r2 < 0 ? null : n2.manager.tooltipViews[r2]; } var LE = i_.define(), BE = AC.define({ combine: function(e22) { var t2, n2, r2, i2 = bi(e22); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; t2 = t2 || o2.topContainer, n2 = n2 || o2.bottomContainer; } } catch (e23) { i2.e(e23); } finally { i2.f(); } return { topContainer: t2, bottomContainer: n2 }; } }); function qE(e22, t2) { var n2 = e22.plugin(FE), r2 = n2 ? n2.specs.indexOf(t2) : -1; return r2 > -1 ? n2.panels[r2] : null; } var FE = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.input = t2.state.facet(WE), this.specs = this.input.filter(function(e23) { return e23; }), this.panels = this.specs.map(function(e23) { return e23(t2); }); var n2 = t2.state.facet(BE); this.top = new VE(t2, true, n2.topContainer), this.bottom = new VE(t2, false, n2.bottomContainer), this.top.sync(this.panels.filter(function(e23) { return e23.top; })), this.bottom.sync(this.panels.filter(function(e23) { return !e23.top; })); var r2, i2 = bi(this.panels); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; o2.dom.classList.add("cm-panel"), o2.mount && o2.mount(); } } catch (e23) { i2.e(e23); } finally { i2.f(); } } return zi(e22, [{ key: "update", value: function(e23) { var t2 = e23.state.facet(BE); this.top.container != t2.topContainer && (this.top.sync([]), this.top = new VE(e23.view, true, t2.topContainer)), this.bottom.container != t2.bottomContainer && (this.bottom.sync([]), this.bottom = new VE(e23.view, false, t2.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses(); var n2 = e23.state.facet(WE); if (n2 != this.input) { var r2, i2 = n2.filter(function(e24) { return e24; }), o2 = [], a2 = [], s2 = [], u2 = [], c2 = bi(i2); try { for (c2.s(); !(r2 = c2.n()).done; ) { var l2 = r2.value, f2 = this.specs.indexOf(l2), h2 = void 0; f2 < 0 ? (h2 = l2(e23.view), u2.push(h2)) : (h2 = this.panels[f2]).update && h2.update(e23), o2.push(h2), (h2.top ? a2 : s2).push(h2); } } catch (e24) { c2.e(e24); } finally { c2.f(); } this.specs = i2, this.panels = o2, this.top.sync(a2), this.bottom.sync(s2); for (var d2 = 0, v2 = u2; d2 < v2.length; d2++) { var p2 = v2[d2]; p2.dom.classList.add("cm-panel"), p2.mount && p2.mount(); } } else { var m2, g2 = bi(this.panels); try { for (g2.s(); !(m2 = g2.n()).done; ) { var y2 = m2.value; y2.update && y2.update(e23); } } catch (e24) { g2.e(e24); } finally { g2.f(); } } } }, { key: "destroy", value: function() { this.top.sync([]), this.bottom.sync([]); } }]), e22; }(), { provide: function(e22) { return PM.scrollMargins.of(function(t2) { var n2 = t2.plugin(e22); return n2 && { top: n2.top.scrollMargin(), bottom: n2.bottom.scrollMargin() }; }); } }), VE = function() { function e22(t2, n2, r2) { Ri(this, e22), this.view = t2, this.top = n2, this.container = r2, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses(); } return zi(e22, [{ key: "sync", value: function(e23) { var t2, n2 = bi(this.panels); try { for (n2.s(); !(t2 = n2.n()).done; ) { var r2 = t2.value; r2.destroy && e23.indexOf(r2) < 0 && r2.destroy(); } } catch (e24) { n2.e(e24); } finally { n2.f(); } this.panels = e23, this.syncDOM(); } }, { key: "syncDOM", value: function() { if (this.panels.length != 0) { if (!this.dom) { this.dom = document.createElement("div"), this.dom.className = this.top ? "cm-panels cm-panels-top" : "cm-panels cm-panels-bottom", this.dom.style[this.top ? "top" : "bottom"] = "0"; var e23 = this.container || this.view.dom; e23.insertBefore(this.dom, this.top ? e23.firstChild : null); } var t2, n2 = this.dom.firstChild, r2 = bi(this.panels); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value; if (i2.dom.parentNode == this.dom) { for (; n2 != i2.dom; ) n2 = HE(n2); n2 = n2.nextSibling; } else this.dom.insertBefore(i2.dom, n2); } } catch (e24) { r2.e(e24); } finally { r2.f(); } for (; n2; ) n2 = HE(n2); } else this.dom && (this.dom.remove(), this.dom = void 0); } }, { key: "scrollMargin", value: function() { return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top); } }, { key: "syncClasses", value: function() { if (this.container && this.classes != this.view.themeClasses) { var e23, t2 = bi(this.classes.split(" ")); try { for (t2.s(); !(e23 = t2.n()).done; ) { var n2 = e23.value; n2 && this.container.classList.remove(n2); } } catch (e24) { t2.e(e24); } finally { t2.f(); } var r2, i2 = bi((this.classes = this.view.themeClasses).split(" ")); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; o2 && this.container.classList.add(o2); } } catch (e24) { i2.e(e24); } finally { i2.f(); } } } }]), e22; }(); function HE(e22) { var t2 = e22.nextSibling; return e22.remove(), t2; } var WE = AC.define({ enables: FE }), JE = function(e22) { _i(n2, y_); var t2 = Oi(n2); function n2() { return Ri(this, n2), t2.apply(this, arguments); } return zi(n2, [{ key: "compare", value: function(e23) { return this == e23 || this.constructor == e23.constructor && this.eq(e23); } }, { key: "eq", value: function(e23) { return false; } }, { key: "destroy", value: function(e23) { } }]), n2; }(); JE.prototype.elementClass = "", JE.prototype.toDOM = void 0, JE.prototype.mapMode = mC.TrackBefore, JE.prototype.startSide = JE.prototype.endSide = -1, JE.prototype.point = true; var UE = AC.define(), KE = { class: "", renderEmptyElements: false, elementStyle: "", markers: function() { return x_.empty; }, lineMarker: function() { return null; }, lineMarkerChange: null, initialSpacer: null, updateSpacer: null, domEventHandlers: {} }, GE = AC.define(); function QE(e22) { return [ZE(), GE.of(Object.assign(Object.assign({}, KE), e22))]; } var YE = AC.define({ combine: function(e22) { return e22.some(function(e23) { return e23; }); } }); function ZE(e22) { var t2 = [XE]; return e22 && e22.fixed === false && t2.push(YE.of(true)), t2; } var XE = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.prevViewport = t2.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight + "px", this.gutters = t2.state.facet(GE).map(function(e23) { return new rP(t2, e23); }); var n2, r2 = bi(this.gutters); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; this.dom.appendChild(i2.dom); } } catch (e23) { r2.e(e23); } finally { r2.f(); } this.fixed = !t2.state.facet(YE), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(false), t2.scrollDOM.insertBefore(this.dom, t2.contentDOM); } return zi(e22, [{ key: "update", value: function(e23) { if (this.updateGutters(e23)) { var t2 = this.prevViewport, n2 = e23.view.viewport, r2 = Math.min(t2.to, n2.to) - Math.max(t2.from, n2.from); this.syncGutters(r2 < 0.8 * (n2.to - n2.from)); } e23.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight + "px"), this.view.state.facet(YE) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = e23.view.viewport; } }, { key: "syncGutters", value: function(e23) { var t2 = this, n2 = this.dom.nextSibling; e23 && this.dom.remove(); var r2, i2 = x_.iter(this.view.state.facet(UE), this.view.viewport.from), o2 = [], a2 = this.gutters.map(function(e24) { return new nP(e24, t2.view.viewport, -t2.view.documentPadding.top); }), s2 = bi(this.view.viewportLineBlocks); try { for (s2.s(); !(r2 = s2.n()).done; ) { var u2 = r2.value, c2 = void 0; if (Array.isArray(u2.type)) { var l2, f2 = bi(u2.type); try { for (f2.s(); !(l2 = f2.n()).done; ) { var h2 = l2.value; if (h2.type == Z$.Text) { c2 = h2; break; } } } catch (e24) { f2.e(e24); } finally { f2.f(); } } else c2 = u2.type == Z$.Text ? u2 : void 0; if (c2) { o2.length && (o2 = []), tP(i2, o2, u2.from); var d2, v2 = bi(a2); try { for (v2.s(); !(d2 = v2.n()).done; ) { d2.value.line(this.view, c2, o2); } } catch (e24) { v2.e(e24); } finally { v2.f(); } } } } catch (e24) { s2.e(e24); } finally { s2.f(); } var p2, m2 = bi(a2); try { for (m2.s(); !(p2 = m2.n()).done; ) { p2.value.finish(); } } catch (e24) { m2.e(e24); } finally { m2.f(); } e23 && this.view.scrollDOM.insertBefore(this.dom, n2); } }, { key: "updateGutters", value: function(e23) { var t2 = e23.startState.facet(GE), n2 = e23.state.facet(GE), r2 = e23.docChanged || e23.heightChanged || e23.viewportChanged || !x_.eq(e23.startState.facet(UE), e23.state.facet(UE), e23.view.viewport.from, e23.view.viewport.to); if (t2 == n2) { var i2, o2 = bi(this.gutters); try { for (o2.s(); !(i2 = o2.n()).done; ) { i2.value.update(e23) && (r2 = true); } } catch (e24) { o2.e(e24); } finally { o2.f(); } } else { r2 = true; var a2, s2 = [], u2 = bi(n2); try { for (u2.s(); !(a2 = u2.n()).done; ) { var c2 = a2.value, l2 = t2.indexOf(c2); l2 < 0 ? s2.push(new rP(this.view, c2)) : (this.gutters[l2].update(e23), s2.push(this.gutters[l2])); } } catch (e24) { u2.e(e24); } finally { u2.f(); } var f2, h2 = bi(this.gutters); try { for (h2.s(); !(f2 = h2.n()).done; ) { var d2 = f2.value; d2.dom.remove(), s2.indexOf(d2) < 0 && d2.destroy(); } } catch (e24) { h2.e(e24); } finally { h2.f(); } for (var v2 = 0, p2 = s2; v2 < p2.length; v2++) { var m2 = p2[v2]; this.dom.appendChild(m2.dom); } this.gutters = s2; } return r2; } }, { key: "destroy", value: function() { var e23, t2 = bi(this.gutters); try { for (t2.s(); !(e23 = t2.n()).done; ) { e23.value.destroy(); } } catch (e24) { t2.e(e24); } finally { t2.f(); } this.dom.remove(); } }]), e22; }(), { provide: function(e22) { return PM.scrollMargins.of(function(t2) { var n2 = t2.plugin(e22); return n2 && n2.gutters.length != 0 && n2.fixed ? t2.textDirection == NO.LTR ? { left: n2.dom.offsetWidth } : { right: n2.dom.offsetWidth } : null; }); } }); function eP(e22) { return Array.isArray(e22) ? e22 : [e22]; } function tP(e22, t2, n2) { for (; e22.value && e22.from <= n2; ) e22.from == n2 && t2.push(e22.value), e22.next(); } var nP = function() { function e22(t2, n2, r2) { Ri(this, e22), this.gutter = t2, this.height = r2, this.localMarkers = [], this.i = 0, this.cursor = x_.iter(t2.markers, n2.from); } return zi(e22, [{ key: "line", value: function(e23, t2, n2) { this.localMarkers.length && (this.localMarkers = []), tP(this.cursor, this.localMarkers, t2.from); var r2 = n2.length ? this.localMarkers.concat(n2) : this.localMarkers, i2 = this.gutter.config.lineMarker(e23, t2, r2); i2 && r2.unshift(i2); var o2 = this.gutter; if (r2.length != 0 || o2.config.renderEmptyElements) { var a2 = t2.top - this.height; if (this.i == o2.elements.length) { var s2 = new iP(e23, t2.height, a2, r2); o2.elements.push(s2), o2.dom.appendChild(s2.dom); } else o2.elements[this.i].update(e23, t2.height, a2, r2); this.height = t2.bottom, this.i++; } } }, { key: "finish", value: function() { for (var e23 = this.gutter; e23.elements.length > this.i; ) { var t2 = e23.elements.pop(); e23.dom.removeChild(t2.dom), t2.destroy(); } } }]), e22; }(), rP = function() { function e22(t2, n2) { var r2 = this; Ri(this, e22), this.view = t2, this.config = n2, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : ""); var i2 = function(e23) { r2.dom.addEventListener(e23, function(r3) { var i3 = t2.lineBlockAtHeight(r3.clientY - t2.documentTop); n2.domEventHandlers[e23](t2, i3, r3) && r3.preventDefault(); }); }; for (var o2 in n2.domEventHandlers) i2(o2); this.markers = eP(n2.markers(t2)), n2.initialSpacer && (this.spacer = new iP(t2, 0, 0, [n2.initialSpacer(t2)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none"); } return zi(e22, [{ key: "update", value: function(e23) { var t2 = this.markers; if (this.markers = eP(this.config.markers(e23.view)), this.spacer && this.config.updateSpacer) { var n2 = this.config.updateSpacer(this.spacer.markers[0], e23); n2 != this.spacer.markers[0] && this.spacer.update(e23.view, 0, 0, [n2]); } var r2 = e23.view.viewport; return !x_.eq(this.markers, t2, r2.from, r2.to) || !!this.config.lineMarkerChange && this.config.lineMarkerChange(e23); } }, { key: "destroy", value: function() { var e23, t2 = bi(this.elements); try { for (t2.s(); !(e23 = t2.n()).done; ) { e23.value.destroy(); } } catch (e24) { t2.e(e24); } finally { t2.f(); } } }]), e22; }(), iP = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(t2, n2, r2, i2); } return zi(e22, [{ key: "update", value: function(e23, t2, n2, r2) { this.height != t2 && (this.dom.style.height = (this.height = t2) + "px"), this.above != n2 && (this.dom.style.marginTop = (this.above = n2) ? n2 + "px" : ""), function(e24, t3) { if (e24.length != t3.length) return false; for (var n3 = 0; n3 < e24.length; n3++) if (!e24[n3].compare(t3[n3])) return false; return true; }(this.markers, r2) || this.setMarkers(e23, r2); } }, { key: "setMarkers", value: function(e23, t2) { for (var n2 = "cm-gutterElement", r2 = this.dom.firstChild, i2 = 0, o2 = 0; ; ) { var a2 = o2, s2 = i2 < t2.length ? t2[i2++] : null, u2 = false; if (s2) { var c2 = s2.elementClass; c2 && (n2 += " " + c2); for (var l2 = o2; l2 < this.markers.length; l2++) if (this.markers[l2].compare(s2)) { a2 = l2, u2 = true; break; } } else a2 = this.markers.length; for (; o2 < a2; ) { var f2 = this.markers[o2++]; if (f2.toDOM) { f2.destroy(r2); var h2 = r2.nextSibling; r2.remove(), r2 = h2; } } if (!s2) break; s2.toDOM && (u2 ? r2 = r2.nextSibling : this.dom.insertBefore(s2.toDOM(e23), r2)), u2 && o2++; } this.dom.className = n2, this.markers = t2; } }, { key: "destroy", value: function() { this.setMarkers(null, []); } }]), e22; }(); var oP = AC.define(), aP = AC.define({ combine: function(e22) { return g_(e22, { formatNumber: String, domEventHandlers: {} }, { domEventHandlers: function(e23, t2) { var n2 = Object.assign({}, e23), r2 = function(e24) { var r3 = n2[e24], i3 = t2[e24]; n2[e24] = r3 ? function(e25, t3, n3) { return r3(e25, t3, n3) || i3(e25, t3, n3); } : i3; }; for (var i2 in t2) r2(i2); return n2; } }); } }), sP = function(e22) { _i(n2, JE); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).number = e23, r2; } return zi(n2, [{ key: "eq", value: function(e23) { return this.number == e23.number; } }, { key: "toDOM", value: function() { return document.createTextNode(this.number); } }]), n2; }(); function uP(e22, t2) { return e22.state.facet(aP).formatNumber(t2, e22.state); } var cP = GE.compute([aP], function(e22) { return { class: "cm-lineNumbers", renderEmptyElements: false, markers: function(e23) { return e23.state.facet(oP); }, lineMarker: function(e23, t2, n2) { return n2.some(function(e24) { return e24.toDOM; }) ? null : new sP(uP(e23, e23.state.doc.lineAt(t2.from).number)); }, lineMarkerChange: function(e23) { return e23.startState.facet(aP) != e23.state.facet(aP); }, initialSpacer: function(e23) { return new sP(uP(e23, fP(e23.state.doc.lines))); }, updateSpacer: function(e23, t2) { var n2 = uP(t2.view, fP(t2.view.state.doc.lines)); return n2 == e23.number ? e23 : new sP(n2); }, domEventHandlers: e22.facet(aP).domEventHandlers }; }); function lP() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [aP.of(e22), ZE(), cP]; } function fP(e22) { for (var t2 = 9; t2 < e22; ) t2 = 10 * t2 + 9; return t2; } var hP = new (function(e22) { _i(n2, JE); var t2 = Oi(n2); function n2() { var e23; return Ri(this, n2), (e23 = t2.apply(this, arguments)).elementClass = "cm-activeLineGutter", e23; } return zi(n2); }())(), dP = UE.compute(["selection"], function(e22) { var t2, n2 = [], r2 = -1, i2 = bi(e22.selection.ranges); try { for (i2.s(); !(t2 = i2.n()).done; ) { var o2 = t2.value; if (o2.empty) { var a2 = e22.doc.lineAt(o2.head).from; a2 > r2 && (r2 = a2, n2.push(hP.range(a2))); } } } catch (e23) { i2.e(e23); } finally { i2.f(); } return x_.of(n2); }); var vP = 0, pP = zi(function e6(t2, n2) { Ri(this, e6), this.from = t2, this.to = n2; }), mP = function() { function e22() { var t2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Ri(this, e22), this.id = vP++, this.perNode = !!t2.perNode, this.deserialize = t2.deserialize || function() { throw new Error("This node type doesn't define a deserialize function"); }; } return zi(e22, [{ key: "add", value: function(e23) { var t2 = this; if (this.perNode) throw new RangeError("Can't add per-node props to node types"); return typeof e23 != "function" && (e23 = yP.match(e23)), function(n2) { var r2 = e23(n2); return r2 === void 0 ? null : [t2, r2]; }; } }]), e22; }(); mP.closedBy = new mP({ deserialize: function(e22) { return e22.split(" "); } }), mP.openedBy = new mP({ deserialize: function(e22) { return e22.split(" "); } }), mP.group = new mP({ deserialize: function(e22) { return e22.split(" "); } }), mP.contextHash = new mP({ perNode: true }), mP.lookAhead = new mP({ perNode: true }), mP.mounted = new mP({ perNode: true }); var gP = /* @__PURE__ */ Object.create(null), yP = function() { function e22(t2, n2, r2) { var i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; Ri(this, e22), this.name = t2, this.props = n2, this.id = r2, this.flags = i2; } return zi(e22, [{ key: "prop", value: function(e23) { return this.props[e23.id]; } }, { key: "isTop", get: function() { return (1 & this.flags) > 0; } }, { key: "isSkipped", get: function() { return (2 & this.flags) > 0; } }, { key: "isError", get: function() { return (4 & this.flags) > 0; } }, { key: "isAnonymous", get: function() { return (8 & this.flags) > 0; } }, { key: "is", value: function(e23) { if (typeof e23 == "string") { if (this.name == e23) return true; var t2 = this.prop(mP.group); return !!t2 && t2.indexOf(e23) > -1; } return this.id == e23; } }], [{ key: "define", value: function(t2) { var n2 = t2.props && t2.props.length ? /* @__PURE__ */ Object.create(null) : gP, r2 = (t2.top ? 1 : 0) | (t2.skipped ? 2 : 0) | (t2.error ? 4 : 0) | (t2.name == null ? 8 : 0), i2 = new e22(t2.name || "", n2, t2.id, r2); if (t2.props) { var o2, a2 = bi(t2.props); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (Array.isArray(s2) || (s2 = s2(i2)), s2) { if (s2[0].perNode) throw new RangeError("Can't store a per-node prop on a node type"); n2[s2[0].id] = s2[1]; } } } catch (e23) { a2.e(e23); } finally { a2.f(); } } return i2; } }, { key: "match", value: function(e23) { var t2 = /* @__PURE__ */ Object.create(null); for (var n2 in e23) { var r2, i2 = bi(n2.split(" ")); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; t2[o2] = e23[n2]; } } catch (e24) { i2.e(e24); } finally { i2.f(); } } return function(e24) { for (var n3 = e24.prop(mP.group), r3 = -1; r3 < (n3 ? n3.length : 0); r3++) { var i3 = t2[r3 < 0 ? e24.name : n3[r3]]; if (i3) return i3; } }; } }]), e22; }(); yP.none = new yP("", /* @__PURE__ */ Object.create(null), 0, 8); var bP, kP = /* @__PURE__ */ new WeakMap(), wP = /* @__PURE__ */ new WeakMap(); !function(e22) { e22[e22.ExcludeBuffers = 1] = "ExcludeBuffers", e22[e22.IncludeAnonymous = 2] = "IncludeAnonymous", e22[e22.IgnoreMounts = 4] = "IgnoreMounts", e22[e22.IgnoreOverlays = 8] = "IgnoreOverlays"; }(bP || (bP = {})); var xP = function() { function e22(t2, n2, r2, i2, o2) { if (Ri(this, e22), this.type = t2, this.children = n2, this.positions = r2, this.length = i2, this.props = null, o2 && o2.length) { this.props = /* @__PURE__ */ Object.create(null); var a2, s2 = bi(o2); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = ki(a2.value, 2), c2 = u2[0], l2 = u2[1]; this.props[typeof c2 == "number" ? c2 : c2.id] = l2; } } catch (e23) { s2.e(e23); } finally { s2.f(); } } } return zi(e22, [{ key: "toString", value: function() { var e23 = this.prop(mP.mounted); if (e23 && !e23.overlay) return e23.tree.toString(); var t2, n2 = "", r2 = bi(this.children); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value.toString(); i2 && (n2 && (n2 += ","), n2 += i2); } } catch (e24) { r2.e(e24); } finally { r2.f(); } return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n2.length ? "(" + n2 + ")" : "") : n2; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new NP(this.topNode, e23); } }, { key: "cursorAt", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = kP.get(this) || this.topNode, r2 = new NP(n2); return r2.moveTo(e23, t2), kP.set(this, r2._tree), r2; } }, { key: "topNode", get: function() { return new OP(this, 0, 0, null); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = $P(kP.get(this) || this.topNode, e23, t2, false); return kP.set(this, n2), n2; } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = $P(wP.get(this) || this.topNode, e23, t2, true); return wP.set(this, n2), n2; } }, { key: "iterate", value: function(e23) { for (var t2 = e23.enter, n2 = e23.leave, r2 = e23.from, i2 = r2 === void 0 ? 0 : r2, o2 = e23.to, a2 = o2 === void 0 ? this.length : o2, s2 = this.cursor((e23.mode || 0) | bP.IncludeAnonymous); ; ) { var u2 = false; if (s2.from <= a2 && s2.to >= i2 && (s2.type.isAnonymous || t2(s2) !== false)) { if (s2.firstChild()) continue; u2 = true; } for (; u2 && n2 && !s2.type.isAnonymous && n2(s2), !s2.nextSibling(); ) { if (!s2.parent()) return; u2 = true; } } } }, { key: "prop", value: function(e23) { return e23.perNode ? this.props ? this.props[e23.id] : void 0 : this.type.prop(e23); } }, { key: "propValues", get: function() { var e23 = []; if (this.props) for (var t2 in this.props) e23.push([+t2, this.props[t2]]); return e23; } }, { key: "balance", value: function() { var t2 = this, n2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return this.children.length <= 8 ? this : zP(yP.none, this.children, this.positions, 0, this.children.length, 0, this.length, function(n3, r2, i2) { return new e22(t2.type, n3, r2, i2, t2.propValues); }, n2.makeTree || function(t3, n3, r2) { return new e22(yP.none, t3, n3, r2); }); } }], [{ key: "build", value: function(e23) { return IP(e23); } }]), e22; }(); xP.empty = new xP(yP.none, [], [], 0); var jP = function() { function e22(t2, n2) { Ri(this, e22), this.buffer = t2, this.index = n2; } return zi(e22, [{ key: "id", get: function() { return this.buffer[this.index - 4]; } }, { key: "start", get: function() { return this.buffer[this.index - 3]; } }, { key: "end", get: function() { return this.buffer[this.index - 2]; } }, { key: "size", get: function() { return this.buffer[this.index - 1]; } }, { key: "pos", get: function() { return this.index; } }, { key: "next", value: function() { this.index -= 4; } }, { key: "fork", value: function() { return new e22(this.buffer, this.index); } }]), e22; }(), SP = function() { function e22(t2, n2, r2) { Ri(this, e22), this.buffer = t2, this.length = n2, this.set = r2; } return zi(e22, [{ key: "type", get: function() { return yP.none; } }, { key: "toString", value: function() { for (var e23 = [], t2 = 0; t2 < this.buffer.length; ) e23.push(this.childString(t2)), t2 = this.buffer[t2 + 3]; return e23.join(","); } }, { key: "childString", value: function(e23) { var t2 = this.buffer[e23], n2 = this.buffer[e23 + 3], r2 = this.set.types[t2], i2 = r2.name; if (/\W/.test(i2) && !r2.isError && (i2 = JSON.stringify(i2)), n2 == (e23 += 4)) return i2; for (var o2 = []; e23 < n2; ) o2.push(this.childString(e23)), e23 = this.buffer[e23 + 3]; return i2 + "(" + o2.join(",") + ")"; } }, { key: "findChild", value: function(e23, t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = -1, s2 = e23; s2 != t2 && !(CP(i2, r2, o2[s2 + 1], o2[s2 + 2]) && (a2 = s2, n2 > 0)); s2 = o2[s2 + 3]) ; return a2; } }, { key: "slice", value: function(t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = new Uint16Array(n2 - t2), s2 = t2, u2 = 0; s2 < n2; ) a2[u2++] = o2[s2++], a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - t2; return new e22(a2, i2 - r2, this.set); } }]), e22; }(); function CP(e22, t2, n2, r2) { switch (e22) { case -2: return n2 < t2; case -1: return r2 >= t2 && n2 < t2; case 0: return n2 < t2 && r2 > t2; case 1: return n2 <= t2 && r2 > t2; case 2: return r2 > t2; case 4: return true; } } function _P(e22, t2) { for (var n2 = e22.childBefore(t2); n2; ) { var r2 = n2.lastChild; if (!r2 || r2.to != n2.to) break; r2.type.isError && r2.from == r2.to ? (e22 = n2, n2 = r2.prevSibling) : n2 = r2; } return e22; } function $P(e22, t2, n2, r2) { for (var i2; e22.from == e22.to || (n2 < 1 ? e22.from >= t2 : e22.from > t2) || (n2 > -1 ? e22.to <= t2 : e22.to < t2); ) { var o2 = !r2 && e22 instanceof OP && e22.index < 0 ? null : e22.parent; if (!o2) return e22; e22 = o2; } var a2 = r2 ? 0 : bP.IgnoreOverlays; if (r2) for (var s2 = e22, u2 = s2.parent; u2; u2 = (s2 = u2).parent) s2 instanceof OP && s2.index < 0 && ((i2 = u2.enter(t2, n2, a2)) === null || i2 === void 0 ? void 0 : i2.from) != s2.from && (e22 = u2); for (; ; ) { var c2 = e22.enter(t2, n2, a2); if (!c2) return e22; e22 = c2; } } var OP = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this._tree = t2, this.from = n2, this.index = r2, this._parent = i2; } return zi(e22, [{ key: "type", get: function() { return this._tree.type; } }, { key: "name", get: function() { return this._tree.type.name; } }, { key: "to", get: function() { return this.from + this._tree.length; } }, { key: "nextChild", value: function(t2, n2, r2, i2) { for (var o2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, a2 = this; ; ) { for (var s2 = a2._tree, u2 = s2.children, c2 = s2.positions, l2 = n2 > 0 ? u2.length : -1; t2 != l2; t2 += n2) { var f2 = u2[t2], h2 = c2[t2] + a2.from; if (CP(i2, r2, h2, h2 + f2.length)) { if (f2 instanceof SP) { if (o2 & bP.ExcludeBuffers) continue; var d2 = f2.findChild(0, f2.buffer.length, n2, r2 - h2, i2); if (d2 > -1) return new PP(new EP(a2, f2, t2, h2), null, d2); } else if (o2 & bP.IncludeAnonymous || !f2.type.isAnonymous || TP(f2)) { var v2 = void 0; if (!(o2 & bP.IgnoreMounts) && f2.props && (v2 = f2.prop(mP.mounted)) && !v2.overlay) return new e22(v2.tree, h2, t2, a2); var p2 = new e22(f2, h2, t2, a2); return o2 & bP.IncludeAnonymous || !p2.type.isAnonymous ? p2 : p2.nextChild(n2 < 0 ? f2.children.length - 1 : 0, n2, r2, i2); } } } if (o2 & bP.IncludeAnonymous || !a2.type.isAnonymous) return null; if (t2 = a2.index >= 0 ? a2.index + n2 : n2 < 0 ? -1 : a2._parent._tree.children.length, !(a2 = a2._parent)) return null; } } }, { key: "firstChild", get: function() { return this.nextChild(0, 1, 0, 4); } }, { key: "lastChild", get: function() { return this.nextChild(this._tree.children.length - 1, -1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.nextChild(0, 1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.nextChild(this._tree.children.length - 1, -1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2, i2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (!(i2 & bP.IgnoreOverlays) && (r2 = this._tree.prop(mP.mounted)) && r2.overlay) { var o2, a2 = t2 - this.from, s2 = bi(r2.overlay); try { for (s2.s(); !(o2 = s2.n()).done; ) { var u2 = o2.value, c2 = u2.from, l2 = u2.to; if ((n2 > 0 ? c2 <= a2 : c2 < a2) && (n2 < 0 ? l2 >= a2 : l2 > a2)) return new e22(r2.tree, r2.overlay[0].from + this.from, -1, this); } } catch (e23) { s2.e(e23); } finally { s2.f(); } } return this.nextChild(0, 1, t2, n2, i2); } }, { key: "nextSignificantParent", value: function() { for (var e23 = this; e23.type.isAnonymous && e23._parent; ) e23 = e23._parent; return e23; } }, { key: "parent", get: function() { return this._parent ? this._parent.nextSignificantParent() : null; } }, { key: "nextSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4) : null; } }, { key: "prevSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4) : null; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new NP(this, e23); } }, { key: "tree", get: function() { return this._tree; } }, { key: "toTree", value: function() { return this._tree; } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return $P(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return $P(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return _P(this, e23); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = AP(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return AP(this, e23, t2, n2); } }, { key: "toString", value: function() { return this._tree.toString(); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return MP(this, e23); } }]), e22; }(); function AP(e22, t2, n2, r2) { var i2 = e22.cursor(), o2 = []; if (!i2.firstChild()) return o2; if (n2 != null) { for (; !i2.type.is(n2); ) if (!i2.nextSibling()) return o2; } for (; ; ) { if (r2 != null && i2.type.is(r2)) return o2; if (i2.type.is(t2) && o2.push(i2.node), !i2.nextSibling()) return r2 == null ? o2 : []; } } function MP(e22, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t2.length - 1, r2 = e22.parent; n2 >= 0; r2 = r2.parent) { if (!r2) return false; if (!r2.type.isAnonymous) { if (t2[n2] && t2[n2] != r2.name) return false; n2--; } } return true; } var EP = zi(function e7(t2, n2, r2, i2) { Ri(this, e7), this.parent = t2, this.buffer = n2, this.index = r2, this.start = i2; }), PP = function() { function e22(t2, n2, r2) { Ri(this, e22), this.context = t2, this._parent = n2, this.index = r2, this.type = t2.buffer.set.types[t2.buffer.buffer[r2]]; } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "from", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 1]; } }, { key: "to", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 2]; } }, { key: "child", value: function(t2, n2, r2) { var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], t2, n2 - this.context.start, r2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "firstChild", get: function() { return this.child(1, 0, 4); } }, { key: "lastChild", get: function() { return this.child(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.child(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.child(-1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (r2 & bP.ExcludeBuffers) return null; var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], n2 > 0 ? 1 : -1, t2 - this.context.start, n2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "parent", get: function() { return this._parent || this.context.parent.nextSignificantParent(); } }, { key: "externalSibling", value: function(e23) { return this._parent ? null : this.context.parent.nextChild(this.context.index + e23, e23, 0, 4); } }, { key: "nextSibling", get: function() { var t2 = this.context.buffer, n2 = t2.buffer[this.index + 3]; return n2 < (this._parent ? t2.buffer[this._parent.index + 3] : t2.buffer.length) ? new e22(this.context, this._parent, n2) : this.externalSibling(1); } }, { key: "prevSibling", get: function() { var t2 = this.context.buffer, n2 = this._parent ? this._parent.index + 4 : 0; return this.index == n2 ? this.externalSibling(-1) : new e22(this.context, this._parent, t2.findChild(n2, this.index, -1, 0, 4)); } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new NP(this, e23); } }, { key: "tree", get: function() { return null; } }, { key: "toTree", value: function() { var e23 = [], t2 = [], n2 = this.context.buffer, r2 = this.index + 4, i2 = n2.buffer[this.index + 3]; if (i2 > r2) { var o2 = n2.buffer[this.index + 1], a2 = n2.buffer[this.index + 2]; e23.push(n2.slice(r2, i2, o2, a2)), t2.push(0); } return new xP(this.type, e23, t2, this.to - this.from); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return $P(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return $P(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return _P(this, e23); } }, { key: "toString", value: function() { return this.context.buffer.childString(this.index); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = AP(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return AP(this, e23, t2, n2); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return MP(this, e23); } }]), e22; }(), NP = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (Ri(this, e22), this.mode = n2, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, t2 instanceof OP) this.yieldNode(t2); else { this._tree = t2.context.parent, this.buffer = t2.context; for (var r2 = t2._parent; r2; r2 = r2._parent) this.stack.unshift(r2.index); this.bufferNode = t2, this.yieldBuf(t2.index); } } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "yieldNode", value: function(e23) { return !!e23 && (this._tree = e23, this.type = e23.type, this.from = e23.from, this.to = e23.to, true); } }, { key: "yieldBuf", value: function(e23, t2) { this.index = e23; var n2 = this.buffer, r2 = n2.start, i2 = n2.buffer; return this.type = t2 || i2.set.types[i2.buffer[e23]], this.from = r2 + i2.buffer[e23 + 1], this.to = r2 + i2.buffer[e23 + 2], true; } }, { key: "yield", value: function(e23) { return !!e23 && (e23 instanceof OP ? (this.buffer = null, this.yieldNode(e23)) : (this.buffer = e23.context, this.yieldBuf(e23.index, e23.type))); } }, { key: "toString", value: function() { return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString(); } }, { key: "enterChild", value: function(e23, t2, n2) { if (!this.buffer) return this.yield(this._tree.nextChild(e23 < 0 ? this._tree._tree.children.length - 1 : 0, e23, t2, n2, this.mode)); var r2 = this.buffer.buffer, i2 = r2.findChild(this.index + 4, r2.buffer[this.index + 3], e23, t2 - this.buffer.start, n2); return !(i2 < 0) && (this.stack.push(this.index), this.yieldBuf(i2)); } }, { key: "firstChild", value: function() { return this.enterChild(1, 0, 4); } }, { key: "lastChild", value: function() { return this.enterChild(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.enterChild(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.enterChild(-1, e23, -2); } }, { key: "enter", value: function(e23, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.mode; return this.buffer ? !(n2 & bP.ExcludeBuffers) && this.enterChild(1, e23, t2) : this.yield(this._tree.enter(e23, t2, n2)); } }, { key: "parent", value: function() { if (!this.buffer) return this.yieldNode(this.mode & bP.IncludeAnonymous ? this._tree._parent : this._tree.parent); if (this.stack.length) return this.yieldBuf(this.stack.pop()); var e23 = this.mode & bP.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); return this.buffer = null, this.yieldNode(e23); } }, { key: "sibling", value: function(e23) { if (!this.buffer) return !!this._tree._parent && this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e23, e23, 0, 4, this.mode)); var t2 = this.buffer.buffer, n2 = this.stack.length - 1; if (e23 < 0) { var r2 = n2 < 0 ? 0 : this.stack[n2] + 4; if (this.index != r2) return this.yieldBuf(t2.findChild(r2, this.index, -1, 0, 4)); } else { var i2 = t2.buffer[this.index + 3]; if (i2 < (n2 < 0 ? t2.buffer.length : t2.buffer[this.stack[n2] + 3])) return this.yieldBuf(i2); } return n2 < 0 && this.yield(this.buffer.parent.nextChild(this.buffer.index + e23, e23, 0, 4, this.mode)); } }, { key: "nextSibling", value: function() { return this.sibling(1); } }, { key: "prevSibling", value: function() { return this.sibling(-1); } }, { key: "atLastNode", value: function(e23) { var t2, n2, r2 = this.buffer; if (r2) { if (e23 > 0) { if (this.index < r2.buffer.buffer.length) return false; } else for (var i2 = 0; i2 < this.index; i2++) if (r2.buffer.buffer[i2 + 3] < this.index) return false; t2 = r2.index, n2 = r2.parent; } else { var o2 = this._tree; t2 = o2.index, n2 = o2._parent; } for (; n2; t2 = (a2 = n2).index, n2 = a2._parent, a2) { var a2; if (t2 > -1) for (var s2 = t2 + e23, u2 = e23 < 0 ? -1 : n2._tree.children.length; s2 != u2; s2 += e23) { var c2 = n2._tree.children[s2]; if (this.mode & bP.IncludeAnonymous || c2 instanceof SP || !c2.type.isAnonymous || TP(c2)) return false; } } return true; } }, { key: "move", value: function(e23, t2) { if (t2 && this.enterChild(e23, 0, 4)) return true; for (; ; ) { if (this.sibling(e23)) return true; if (this.atLastNode(e23) || !this.parent()) return false; } } }, { key: "next", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(1, e23); } }, { key: "prev", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(-1, e23); } }, { key: "moveTo", value: function(e23) { for (var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; (this.from == this.to || (t2 < 1 ? this.from >= e23 : this.from > e23) || (t2 > -1 ? this.to <= e23 : this.to < e23)) && this.parent(); ) ; for (; this.enterChild(1, e23, t2); ) ; return this; } }, { key: "node", get: function() { if (!this.buffer) return this._tree; var e23 = this.bufferNode, t2 = null, n2 = 0; if (e23 && e23.context == this.buffer) e: for (var r2 = this.index, i2 = this.stack.length; i2 >= 0; ) { for (var o2 = e23; o2; o2 = o2._parent) if (o2.index == r2) { if (r2 == this.index) return o2; t2 = o2, n2 = i2 + 1; break e; } r2 = this.stack[--i2]; } for (var a2 = n2; a2 < this.stack.length; a2++) t2 = new PP(this.buffer, t2, this.stack[a2]); return this.bufferNode = new PP(this.buffer, t2, this.index); } }, { key: "tree", get: function() { return this.buffer ? null : this._tree._tree; } }, { key: "iterate", value: function(e23, t2) { for (var n2 = 0; ; ) { var r2 = false; if (this.type.isAnonymous || e23(this) !== false) { if (this.firstChild()) { n2++; continue; } this.type.isAnonymous || (r2 = true); } for (; r2 && t2 && t2(this), r2 = this.type.isAnonymous, !this.nextSibling(); ) { if (!n2) return; this.parent(), n2--, r2 = true; } } } }, { key: "matchContext", value: function(e23) { if (!this.buffer) return MP(this.node, e23); for (var t2 = this.buffer.buffer, n2 = t2.set.types, r2 = e23.length - 1, i2 = this.stack.length - 1; r2 >= 0; i2--) { if (i2 < 0) return MP(this.node, e23, r2); var o2 = n2[t2.buffer[this.stack[i2]]]; if (!o2.isAnonymous) { if (e23[r2] && e23[r2] != o2.name) return false; r2--; } } return true; } }]), e22; }(); function TP(e22) { return e22.children.some(function(e23) { return e23 instanceof SP || !e23.type.isAnonymous || TP(e23); }); } function IP(e22) { var t2, n2 = e22.buffer, r2 = e22.nodeSet, i2 = e22.maxBufferLength, o2 = i2 === void 0 ? 1024 : i2, a2 = e22.reused, s2 = a2 === void 0 ? [] : a2, u2 = e22.minRepeatType, c2 = u2 === void 0 ? r2.types.length : u2, l2 = Array.isArray(n2) ? new jP(n2, n2.length) : n2, f2 = r2.types, h2 = 0, d2 = 0; function v2(e23, t3, n3, i3, a3) { for (var u3 = l2.id, y3 = l2.start, b3 = l2.end, k3 = l2.size, w2 = d2; k3 < 0; ) { if (l2.next(), k3 == -1) { var x2 = s2[u3]; return n3.push(x2), void i3.push(y3 - e23); } if (k3 == -3) return void (h2 = u3); if (k3 == -4) return void (d2 = u3); throw new RangeError("Unrecognized record size: ".concat(k3)); } var j2, S2, C2 = f2[u3], _2 = y3 - e23; if (b3 - y3 <= o2 && (S2 = function(e24, t4) { var n4 = l2.fork(), r3 = 0, i4 = 0, a4 = 0, s3 = n4.end - o2, u4 = { size: 0, start: 0, skip: 0 }; e: for (var f3 = n4.pos - e24; n4.pos > f3; ) { var h3 = n4.size; if (n4.id == t4 && h3 >= 0) u4.size = r3, u4.start = i4, u4.skip = a4, a4 += 4, r3 += 4, n4.next(); else { var d3 = n4.pos - h3; if (h3 < 0 || d3 < f3 || n4.start < s3) break; var v3 = n4.id >= c2 ? 4 : 0, p3 = n4.start; for (n4.next(); n4.pos > d3; ) { if (n4.size < 0) { if (n4.size != -3) break e; v3 += 4; } else n4.id >= c2 && (v3 += 4); n4.next(); } i4 = p3, r3 += h3, a4 += v3; } } (t4 < 0 || r3 == e24) && (u4.size = r3, u4.start = i4, u4.skip = a4); return u4.size > 4 ? u4 : void 0; }(l2.pos - t3, a3))) { for (var $2 = new Uint16Array(S2.size - S2.skip), O2 = l2.pos - S2.size, A2 = $2.length; l2.pos > O2; ) A2 = g2(S2.start, $2, A2); j2 = new SP($2, b3 - S2.start, r2), _2 = S2.start - e23; } else { var M2 = l2.pos - k3; l2.next(); for (var E2 = [], P2 = [], N2 = u3 >= c2 ? u3 : -1, T2 = 0, I2 = b3; l2.pos > M2; ) N2 >= 0 && l2.id == N2 && l2.size >= 0 ? (l2.end <= I2 - o2 && (p2(E2, P2, y3, T2, l2.end, I2, N2, w2), T2 = E2.length, I2 = l2.end), l2.next()) : v2(y3, M2, E2, P2, N2); if (N2 >= 0 && T2 > 0 && T2 < E2.length && p2(E2, P2, y3, T2, y3, I2, N2, w2), E2.reverse(), P2.reverse(), N2 > -1 && T2 > 0) { var R2 = function(e24) { return function(t4, n4, r3) { var i4, o3, a4 = 0, s3 = t4.length - 1; if (s3 >= 0 && (i4 = t4[s3]) instanceof xP) { if (!s3 && i4.type == e24 && i4.length == r3) return i4; (o3 = i4.prop(mP.lookAhead)) && (a4 = n4[s3] + i4.length + o3); } return m2(e24, t4, n4, r3, a4); }; }(C2); j2 = zP(C2, E2, P2, 0, E2.length, 0, b3 - y3, R2, R2); } else j2 = m2(C2, E2, P2, b3 - y3, w2 - b3); } n3.push(j2), i3.push(_2); } function p2(e23, t3, n3, i3, o3, a3, s3, u3) { for (var c3 = [], l3 = []; e23.length > i3; ) c3.push(e23.pop()), l3.push(t3.pop() + n3 - o3); e23.push(m2(r2.types[s3], c3, l3, a3 - o3, u3 - a3)), t3.push(o3 - n3); } function m2(e23, t3, n3, r3) { var i3 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, o3 = arguments.length > 5 ? arguments[5] : void 0; if (h2) { var a3 = [mP.contextHash, h2]; o3 = o3 ? [a3].concat(o3) : [a3]; } if (i3 > 25) { var s3 = [mP.lookAhead, i3]; o3 = o3 ? [s3].concat(o3) : [s3]; } return new xP(e23, t3, n3, r3, o3); } function g2(e23, t3, n3) { var r3 = l2.id, i3 = l2.start, o3 = l2.end, a3 = l2.size; if (l2.next(), a3 >= 0 && r3 < c2) { var s3 = n3; if (a3 > 4) for (var u3 = l2.pos - (a3 - 4); l2.pos > u3; ) n3 = g2(e23, t3, n3); t3[--n3] = s3, t3[--n3] = o3 - e23, t3[--n3] = i3 - e23, t3[--n3] = r3; } else a3 == -3 ? h2 = r3 : a3 == -4 && (d2 = r3); return n3; } for (var y2 = [], b2 = []; l2.pos > 0; ) v2(e22.start || 0, e22.bufferStart || 0, y2, b2, -1); var k2 = (t2 = e22.length) !== null && t2 !== void 0 ? t2 : y2.length ? b2[0] + y2[0].length : 0; return new xP(f2[e22.topID], y2.reverse(), b2.reverse(), k2); } var RP = /* @__PURE__ */ new WeakMap(); function DP(e22, t2) { if (!e22.isAnonymous || t2 instanceof SP || t2.type != e22) return 1; var n2 = RP.get(t2); if (n2 == null) { n2 = 1; var r2, i2 = bi(t2.children); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; if (o2.type != e22 || !(o2 instanceof xP)) { n2 = 1; break; } n2 += DP(e22, o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } RP.set(t2, n2); } return n2; } function zP(e22, t2, n2, r2, i2, o2, a2, s2, u2) { for (var c2 = 0, l2 = r2; l2 < i2; l2++) c2 += DP(e22, t2[l2]); var f2 = Math.ceil(1.5 * c2 / 8), h2 = [], d2 = []; return function t3(n3, r3, i3, a3, s3) { for (var c3 = i3; c3 < a3; ) { var l3 = c3, v2 = r3[c3], p2 = DP(e22, n3[c3]); for (c3++; c3 < a3; c3++) { var m2 = DP(e22, n3[c3]); if (p2 + m2 >= f2) break; p2 += m2; } if (c3 == l3 + 1) { if (p2 > f2) { var g2 = n3[l3]; t3(g2.children, g2.positions, 0, g2.children.length, r3[l3] + s3); continue; } h2.push(n3[l3]); } else { var y2 = r3[c3 - 1] + n3[c3 - 1].length - v2; h2.push(zP(e22, n3, r3, l3, c3, v2, y2, null, u2)); } d2.push(v2 + s3 - o2); } }(t2, n2, r2, i2, 0), (s2 || u2)(h2, d2, a2); } var LP = function() { function e22(t2, n2, r2, i2) { var o2 = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a2 = arguments.length > 5 && arguments[5] !== void 0 && arguments[5]; Ri(this, e22), this.from = t2, this.to = n2, this.tree = r2, this.offset = i2, this.open = (o2 ? 1 : 0) | (a2 ? 2 : 0); } return zi(e22, [{ key: "openStart", get: function() { return (1 & this.open) > 0; } }, { key: "openEnd", get: function() { return (2 & this.open) > 0; } }], [{ key: "addTree", value: function(t2) { var n2, r2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i2 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], o2 = [new e22(0, t2.length, t2, 0, false, i2)], a2 = bi(r2); try { for (a2.s(); !(n2 = a2.n()).done; ) { var s2 = n2.value; s2.to > t2.length && o2.push(s2); } } catch (e23) { a2.e(e23); } finally { a2.f(); } return o2; } }, { key: "applyChanges", value: function(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 128; if (!n2.length) return t2; for (var i2 = [], o2 = 1, a2 = t2.length ? t2[0] : null, s2 = 0, u2 = 0, c2 = 0; ; s2++) { var l2 = s2 < n2.length ? n2[s2] : null, f2 = l2 ? l2.fromA : 1e9; if (f2 - u2 >= r2) for (; a2 && a2.from < f2; ) { var h2 = a2; if (u2 >= h2.from || f2 <= h2.to || c2) { var d2 = Math.max(h2.from, u2) - c2, v2 = Math.min(h2.to, f2) - c2; h2 = d2 >= v2 ? null : new e22(d2, v2, h2.tree, h2.offset + c2, s2 > 0, !!l2); } if (h2 && i2.push(h2), a2.to > f2) break; a2 = o2 < t2.length ? t2[o2++] : null; } if (!l2) break; u2 = l2.toA, c2 = l2.toA - l2.toB; } return i2; } }]), e22; }(), BP = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "startParse", value: function(e23, t2, n2) { return typeof e23 == "string" && (e23 = new qP(e23)), n2 = n2 ? n2.length ? n2.map(function(e24) { return new pP(e24.from, e24.to); }) : [new pP(0, 0)] : [new pP(0, e23.length)], this.createParse(e23, t2 || [], n2); } }, { key: "parse", value: function(e23, t2, n2) { for (var r2 = this.startParse(e23, t2, n2); ; ) { var i2 = r2.advance(); if (i2) return i2; } } }]), e22; }(), qP = function() { function e22(t2) { Ri(this, e22), this.string = t2; } return zi(e22, [{ key: "length", get: function() { return this.string.length; } }, { key: "chunk", value: function(e23) { return this.string.slice(e23); } }, { key: "lineChunks", get: function() { return false; } }, { key: "read", value: function(e23, t2) { return this.string.slice(e23, t2); } }]), e22; }(); new mP({ perNode: true }); var FP = 0, VP = function() { function e22() { var t2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Ri(this, e22), this.id = FP++, this.perNode = !!t2.perNode, this.deserialize = t2.deserialize || function() { throw new Error("This node type doesn't define a deserialize function"); }; } return zi(e22, [{ key: "add", value: function(e23) { var t2 = this; if (this.perNode) throw new RangeError("Can't add per-node props to node types"); return typeof e23 != "function" && (e23 = WP.match(e23)), function(n2) { var r2 = e23(n2); return r2 === void 0 ? null : [t2, r2]; }; } }]), e22; }(); VP.closedBy = new VP({ deserialize: function(e22) { return e22.split(" "); } }), VP.openedBy = new VP({ deserialize: function(e22) { return e22.split(" "); } }), VP.group = new VP({ deserialize: function(e22) { return e22.split(" "); } }), VP.contextHash = new VP({ perNode: true }), VP.lookAhead = new VP({ perNode: true }), VP.mounted = new VP({ perNode: true }); var HP = /* @__PURE__ */ Object.create(null), WP = function() { function e22(t2, n2, r2) { var i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; Ri(this, e22), this.name = t2, this.props = n2, this.id = r2, this.flags = i2; } return zi(e22, [{ key: "prop", value: function(e23) { return this.props[e23.id]; } }, { key: "isTop", get: function() { return (1 & this.flags) > 0; } }, { key: "isSkipped", get: function() { return (2 & this.flags) > 0; } }, { key: "isError", get: function() { return (4 & this.flags) > 0; } }, { key: "isAnonymous", get: function() { return (8 & this.flags) > 0; } }, { key: "is", value: function(e23) { if (typeof e23 == "string") { if (this.name == e23) return true; var t2 = this.prop(VP.group); return !!t2 && t2.indexOf(e23) > -1; } return this.id == e23; } }], [{ key: "define", value: function(t2) { var n2 = t2.props && t2.props.length ? /* @__PURE__ */ Object.create(null) : HP, r2 = (t2.top ? 1 : 0) | (t2.skipped ? 2 : 0) | (t2.error ? 4 : 0) | (t2.name == null ? 8 : 0), i2 = new e22(t2.name || "", n2, t2.id, r2); if (t2.props) { var o2, a2 = bi(t2.props); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (Array.isArray(s2) || (s2 = s2(i2)), s2) { if (s2[0].perNode) throw new RangeError("Can't store a per-node prop on a node type"); n2[s2[0].id] = s2[1]; } } } catch (e23) { a2.e(e23); } finally { a2.f(); } } return i2; } }, { key: "match", value: function(e23) { var t2 = /* @__PURE__ */ Object.create(null); for (var n2 in e23) { var r2, i2 = bi(n2.split(" ")); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; t2[o2] = e23[n2]; } } catch (e24) { i2.e(e24); } finally { i2.f(); } } return function(e24) { for (var n3 = e24.prop(VP.group), r3 = -1; r3 < (n3 ? n3.length : 0); r3++) { var i3 = t2[r3 < 0 ? e24.name : n3[r3]]; if (i3) return i3; } }; } }]), e22; }(); WP.none = new WP("", /* @__PURE__ */ Object.create(null), 0, 8); var JP, UP = /* @__PURE__ */ new WeakMap(), KP = /* @__PURE__ */ new WeakMap(); !function(e22) { e22[e22.ExcludeBuffers = 1] = "ExcludeBuffers", e22[e22.IncludeAnonymous = 2] = "IncludeAnonymous", e22[e22.IgnoreMounts = 4] = "IgnoreMounts", e22[e22.IgnoreOverlays = 8] = "IgnoreOverlays"; }(JP || (JP = {})); var GP = function() { function e22(t2, n2, r2, i2, o2) { if (Ri(this, e22), this.type = t2, this.children = n2, this.positions = r2, this.length = i2, this.props = null, o2 && o2.length) { this.props = /* @__PURE__ */ Object.create(null); var a2, s2 = bi(o2); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = ki(a2.value, 2), c2 = u2[0], l2 = u2[1]; this.props[typeof c2 == "number" ? c2 : c2.id] = l2; } } catch (e23) { s2.e(e23); } finally { s2.f(); } } } return zi(e22, [{ key: "toString", value: function() { var e23 = this.prop(VP.mounted); if (e23 && !e23.overlay) return e23.tree.toString(); var t2, n2 = "", r2 = bi(this.children); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value.toString(); i2 && (n2 && (n2 += ","), n2 += i2); } } catch (e24) { r2.e(e24); } finally { r2.f(); } return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n2.length ? "(" + n2 + ")" : "") : n2; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new aN(this.topNode, e23); } }, { key: "cursorAt", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = UP.get(this) || this.topNode, r2 = new aN(n2); return r2.moveTo(e23, t2), UP.set(this, r2._tree), r2; } }, { key: "topNode", get: function() { return new tN(this, 0, 0, null); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = eN(UP.get(this) || this.topNode, e23, t2, false); return UP.set(this, n2), n2; } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = eN(KP.get(this) || this.topNode, e23, t2, true); return KP.set(this, n2), n2; } }, { key: "iterate", value: function(e23) { for (var t2 = e23.enter, n2 = e23.leave, r2 = e23.from, i2 = r2 === void 0 ? 0 : r2, o2 = e23.to, a2 = o2 === void 0 ? this.length : o2, s2 = this.cursor((e23.mode || 0) | JP.IncludeAnonymous); ; ) { var u2 = false; if (s2.from <= a2 && s2.to >= i2 && (s2.type.isAnonymous || t2(s2) !== false)) { if (s2.firstChild()) continue; u2 = true; } for (; u2 && n2 && !s2.type.isAnonymous && n2(s2), !s2.nextSibling(); ) { if (!s2.parent()) return; u2 = true; } } } }, { key: "prop", value: function(e23) { return e23.perNode ? this.props ? this.props[e23.id] : void 0 : this.type.prop(e23); } }, { key: "propValues", get: function() { var e23 = []; if (this.props) for (var t2 in this.props) e23.push([+t2, this.props[t2]]); return e23; } }, { key: "balance", value: function() { var t2 = this, n2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return this.children.length <= 8 ? this : fN(WP.none, this.children, this.positions, 0, this.children.length, 0, this.length, function(n3, r2, i2) { return new e22(t2.type, n3, r2, i2, t2.propValues); }, n2.makeTree || function(t3, n3, r2) { return new e22(WP.none, t3, n3, r2); }); } }], [{ key: "build", value: function(e23) { return uN(e23); } }]), e22; }(); GP.empty = new GP(WP.none, [], [], 0); var QP = function() { function e22(t2, n2) { Ri(this, e22), this.buffer = t2, this.index = n2; } return zi(e22, [{ key: "id", get: function() { return this.buffer[this.index - 4]; } }, { key: "start", get: function() { return this.buffer[this.index - 3]; } }, { key: "end", get: function() { return this.buffer[this.index - 2]; } }, { key: "size", get: function() { return this.buffer[this.index - 1]; } }, { key: "pos", get: function() { return this.index; } }, { key: "next", value: function() { this.index -= 4; } }, { key: "fork", value: function() { return new e22(this.buffer, this.index); } }]), e22; }(), YP = function() { function e22(t2, n2, r2) { Ri(this, e22), this.buffer = t2, this.length = n2, this.set = r2; } return zi(e22, [{ key: "type", get: function() { return WP.none; } }, { key: "toString", value: function() { for (var e23 = [], t2 = 0; t2 < this.buffer.length; ) e23.push(this.childString(t2)), t2 = this.buffer[t2 + 3]; return e23.join(","); } }, { key: "childString", value: function(e23) { var t2 = this.buffer[e23], n2 = this.buffer[e23 + 3], r2 = this.set.types[t2], i2 = r2.name; if (/\W/.test(i2) && !r2.isError && (i2 = JSON.stringify(i2)), n2 == (e23 += 4)) return i2; for (var o2 = []; e23 < n2; ) o2.push(this.childString(e23)), e23 = this.buffer[e23 + 3]; return i2 + "(" + o2.join(",") + ")"; } }, { key: "findChild", value: function(e23, t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = -1, s2 = e23; s2 != t2 && !(ZP(i2, r2, o2[s2 + 1], o2[s2 + 2]) && (a2 = s2, n2 > 0)); s2 = o2[s2 + 3]) ; return a2; } }, { key: "slice", value: function(t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = new Uint16Array(n2 - t2), s2 = t2, u2 = 0; s2 < n2; ) a2[u2++] = o2[s2++], a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - t2; return new e22(a2, i2 - r2, this.set); } }]), e22; }(); function ZP(e22, t2, n2, r2) { switch (e22) { case -2: return n2 < t2; case -1: return r2 >= t2 && n2 < t2; case 0: return n2 < t2 && r2 > t2; case 1: return n2 <= t2 && r2 > t2; case 2: return r2 > t2; case 4: return true; } } function XP(e22, t2) { for (var n2 = e22.childBefore(t2); n2; ) { var r2 = n2.lastChild; if (!r2 || r2.to != n2.to) break; r2.type.isError && r2.from == r2.to ? (e22 = n2, n2 = r2.prevSibling) : n2 = r2; } return e22; } function eN(e22, t2, n2, r2) { for (var i2; e22.from == e22.to || (n2 < 1 ? e22.from >= t2 : e22.from > t2) || (n2 > -1 ? e22.to <= t2 : e22.to < t2); ) { var o2 = !r2 && e22 instanceof tN && e22.index < 0 ? null : e22.parent; if (!o2) return e22; e22 = o2; } var a2 = r2 ? 0 : JP.IgnoreOverlays; if (r2) for (var s2 = e22, u2 = s2.parent; u2; u2 = (s2 = u2).parent) s2 instanceof tN && s2.index < 0 && ((i2 = u2.enter(t2, n2, a2)) === null || i2 === void 0 ? void 0 : i2.from) != s2.from && (e22 = u2); for (; ; ) { var c2 = e22.enter(t2, n2, a2); if (!c2) return e22; e22 = c2; } } var tN = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this._tree = t2, this.from = n2, this.index = r2, this._parent = i2; } return zi(e22, [{ key: "type", get: function() { return this._tree.type; } }, { key: "name", get: function() { return this._tree.type.name; } }, { key: "to", get: function() { return this.from + this._tree.length; } }, { key: "nextChild", value: function(t2, n2, r2, i2) { for (var o2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, a2 = this; ; ) { for (var s2 = a2._tree, u2 = s2.children, c2 = s2.positions, l2 = n2 > 0 ? u2.length : -1; t2 != l2; t2 += n2) { var f2 = u2[t2], h2 = c2[t2] + a2.from; if (ZP(i2, r2, h2, h2 + f2.length)) { if (f2 instanceof YP) { if (o2 & JP.ExcludeBuffers) continue; var d2 = f2.findChild(0, f2.buffer.length, n2, r2 - h2, i2); if (d2 > -1) return new oN(new iN(a2, f2, t2, h2), null, d2); } else if (o2 & JP.IncludeAnonymous || !f2.type.isAnonymous || sN(f2)) { var v2 = void 0; if (!(o2 & JP.IgnoreMounts) && f2.props && (v2 = f2.prop(VP.mounted)) && !v2.overlay) return new e22(v2.tree, h2, t2, a2); var p2 = new e22(f2, h2, t2, a2); return o2 & JP.IncludeAnonymous || !p2.type.isAnonymous ? p2 : p2.nextChild(n2 < 0 ? f2.children.length - 1 : 0, n2, r2, i2); } } } if (o2 & JP.IncludeAnonymous || !a2.type.isAnonymous) return null; if (t2 = a2.index >= 0 ? a2.index + n2 : n2 < 0 ? -1 : a2._parent._tree.children.length, !(a2 = a2._parent)) return null; } } }, { key: "firstChild", get: function() { return this.nextChild(0, 1, 0, 4); } }, { key: "lastChild", get: function() { return this.nextChild(this._tree.children.length - 1, -1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.nextChild(0, 1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.nextChild(this._tree.children.length - 1, -1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2, i2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (!(i2 & JP.IgnoreOverlays) && (r2 = this._tree.prop(VP.mounted)) && r2.overlay) { var o2, a2 = t2 - this.from, s2 = bi(r2.overlay); try { for (s2.s(); !(o2 = s2.n()).done; ) { var u2 = o2.value, c2 = u2.from, l2 = u2.to; if ((n2 > 0 ? c2 <= a2 : c2 < a2) && (n2 < 0 ? l2 >= a2 : l2 > a2)) return new e22(r2.tree, r2.overlay[0].from + this.from, -1, this); } } catch (e23) { s2.e(e23); } finally { s2.f(); } } return this.nextChild(0, 1, t2, n2, i2); } }, { key: "nextSignificantParent", value: function() { for (var e23 = this; e23.type.isAnonymous && e23._parent; ) e23 = e23._parent; return e23; } }, { key: "parent", get: function() { return this._parent ? this._parent.nextSignificantParent() : null; } }, { key: "nextSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4) : null; } }, { key: "prevSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4) : null; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new aN(this, e23); } }, { key: "tree", get: function() { return this._tree; } }, { key: "toTree", value: function() { return this._tree; } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return eN(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return eN(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return XP(this, e23); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = nN(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return nN(this, e23, t2, n2); } }, { key: "toString", value: function() { return this._tree.toString(); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return rN(this, e23); } }]), e22; }(); function nN(e22, t2, n2, r2) { var i2 = e22.cursor(), o2 = []; if (!i2.firstChild()) return o2; if (n2 != null) { for (; !i2.type.is(n2); ) if (!i2.nextSibling()) return o2; } for (; ; ) { if (r2 != null && i2.type.is(r2)) return o2; if (i2.type.is(t2) && o2.push(i2.node), !i2.nextSibling()) return r2 == null ? o2 : []; } } function rN(e22, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t2.length - 1, r2 = e22.parent; n2 >= 0; r2 = r2.parent) { if (!r2) return false; if (!r2.type.isAnonymous) { if (t2[n2] && t2[n2] != r2.name) return false; n2--; } } return true; } var iN = zi(function e8(t2, n2, r2, i2) { Ri(this, e8), this.parent = t2, this.buffer = n2, this.index = r2, this.start = i2; }), oN = function() { function e22(t2, n2, r2) { Ri(this, e22), this.context = t2, this._parent = n2, this.index = r2, this.type = t2.buffer.set.types[t2.buffer.buffer[r2]]; } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "from", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 1]; } }, { key: "to", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 2]; } }, { key: "child", value: function(t2, n2, r2) { var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], t2, n2 - this.context.start, r2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "firstChild", get: function() { return this.child(1, 0, 4); } }, { key: "lastChild", get: function() { return this.child(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.child(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.child(-1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (r2 & JP.ExcludeBuffers) return null; var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], n2 > 0 ? 1 : -1, t2 - this.context.start, n2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "parent", get: function() { return this._parent || this.context.parent.nextSignificantParent(); } }, { key: "externalSibling", value: function(e23) { return this._parent ? null : this.context.parent.nextChild(this.context.index + e23, e23, 0, 4); } }, { key: "nextSibling", get: function() { var t2 = this.context.buffer, n2 = t2.buffer[this.index + 3]; return n2 < (this._parent ? t2.buffer[this._parent.index + 3] : t2.buffer.length) ? new e22(this.context, this._parent, n2) : this.externalSibling(1); } }, { key: "prevSibling", get: function() { var t2 = this.context.buffer, n2 = this._parent ? this._parent.index + 4 : 0; return this.index == n2 ? this.externalSibling(-1) : new e22(this.context, this._parent, t2.findChild(n2, this.index, -1, 0, 4)); } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new aN(this, e23); } }, { key: "tree", get: function() { return null; } }, { key: "toTree", value: function() { var e23 = [], t2 = [], n2 = this.context.buffer, r2 = this.index + 4, i2 = n2.buffer[this.index + 3]; if (i2 > r2) { var o2 = n2.buffer[this.index + 1], a2 = n2.buffer[this.index + 2]; e23.push(n2.slice(r2, i2, o2, a2)), t2.push(0); } return new GP(this.type, e23, t2, this.to - this.from); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return eN(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return eN(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return XP(this, e23); } }, { key: "toString", value: function() { return this.context.buffer.childString(this.index); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = nN(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return nN(this, e23, t2, n2); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return rN(this, e23); } }]), e22; }(), aN = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (Ri(this, e22), this.mode = n2, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, t2 instanceof tN) this.yieldNode(t2); else { this._tree = t2.context.parent, this.buffer = t2.context; for (var r2 = t2._parent; r2; r2 = r2._parent) this.stack.unshift(r2.index); this.bufferNode = t2, this.yieldBuf(t2.index); } } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "yieldNode", value: function(e23) { return !!e23 && (this._tree = e23, this.type = e23.type, this.from = e23.from, this.to = e23.to, true); } }, { key: "yieldBuf", value: function(e23, t2) { this.index = e23; var n2 = this.buffer, r2 = n2.start, i2 = n2.buffer; return this.type = t2 || i2.set.types[i2.buffer[e23]], this.from = r2 + i2.buffer[e23 + 1], this.to = r2 + i2.buffer[e23 + 2], true; } }, { key: "yield", value: function(e23) { return !!e23 && (e23 instanceof tN ? (this.buffer = null, this.yieldNode(e23)) : (this.buffer = e23.context, this.yieldBuf(e23.index, e23.type))); } }, { key: "toString", value: function() { return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString(); } }, { key: "enterChild", value: function(e23, t2, n2) { if (!this.buffer) return this.yield(this._tree.nextChild(e23 < 0 ? this._tree._tree.children.length - 1 : 0, e23, t2, n2, this.mode)); var r2 = this.buffer.buffer, i2 = r2.findChild(this.index + 4, r2.buffer[this.index + 3], e23, t2 - this.buffer.start, n2); return !(i2 < 0) && (this.stack.push(this.index), this.yieldBuf(i2)); } }, { key: "firstChild", value: function() { return this.enterChild(1, 0, 4); } }, { key: "lastChild", value: function() { return this.enterChild(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.enterChild(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.enterChild(-1, e23, -2); } }, { key: "enter", value: function(e23, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.mode; return this.buffer ? !(n2 & JP.ExcludeBuffers) && this.enterChild(1, e23, t2) : this.yield(this._tree.enter(e23, t2, n2)); } }, { key: "parent", value: function() { if (!this.buffer) return this.yieldNode(this.mode & JP.IncludeAnonymous ? this._tree._parent : this._tree.parent); if (this.stack.length) return this.yieldBuf(this.stack.pop()); var e23 = this.mode & JP.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); return this.buffer = null, this.yieldNode(e23); } }, { key: "sibling", value: function(e23) { if (!this.buffer) return !!this._tree._parent && this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e23, e23, 0, 4, this.mode)); var t2 = this.buffer.buffer, n2 = this.stack.length - 1; if (e23 < 0) { var r2 = n2 < 0 ? 0 : this.stack[n2] + 4; if (this.index != r2) return this.yieldBuf(t2.findChild(r2, this.index, -1, 0, 4)); } else { var i2 = t2.buffer[this.index + 3]; if (i2 < (n2 < 0 ? t2.buffer.length : t2.buffer[this.stack[n2] + 3])) return this.yieldBuf(i2); } return n2 < 0 && this.yield(this.buffer.parent.nextChild(this.buffer.index + e23, e23, 0, 4, this.mode)); } }, { key: "nextSibling", value: function() { return this.sibling(1); } }, { key: "prevSibling", value: function() { return this.sibling(-1); } }, { key: "atLastNode", value: function(e23) { var t2, n2, r2 = this.buffer; if (r2) { if (e23 > 0) { if (this.index < r2.buffer.buffer.length) return false; } else for (var i2 = 0; i2 < this.index; i2++) if (r2.buffer.buffer[i2 + 3] < this.index) return false; t2 = r2.index, n2 = r2.parent; } else { var o2 = this._tree; t2 = o2.index, n2 = o2._parent; } for (; n2; t2 = (a2 = n2).index, n2 = a2._parent, a2) { var a2; if (t2 > -1) for (var s2 = t2 + e23, u2 = e23 < 0 ? -1 : n2._tree.children.length; s2 != u2; s2 += e23) { var c2 = n2._tree.children[s2]; if (this.mode & JP.IncludeAnonymous || c2 instanceof YP || !c2.type.isAnonymous || sN(c2)) return false; } } return true; } }, { key: "move", value: function(e23, t2) { if (t2 && this.enterChild(e23, 0, 4)) return true; for (; ; ) { if (this.sibling(e23)) return true; if (this.atLastNode(e23) || !this.parent()) return false; } } }, { key: "next", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(1, e23); } }, { key: "prev", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(-1, e23); } }, { key: "moveTo", value: function(e23) { for (var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; (this.from == this.to || (t2 < 1 ? this.from >= e23 : this.from > e23) || (t2 > -1 ? this.to <= e23 : this.to < e23)) && this.parent(); ) ; for (; this.enterChild(1, e23, t2); ) ; return this; } }, { key: "node", get: function() { if (!this.buffer) return this._tree; var e23 = this.bufferNode, t2 = null, n2 = 0; if (e23 && e23.context == this.buffer) e: for (var r2 = this.index, i2 = this.stack.length; i2 >= 0; ) { for (var o2 = e23; o2; o2 = o2._parent) if (o2.index == r2) { if (r2 == this.index) return o2; t2 = o2, n2 = i2 + 1; break e; } r2 = this.stack[--i2]; } for (var a2 = n2; a2 < this.stack.length; a2++) t2 = new oN(this.buffer, t2, this.stack[a2]); return this.bufferNode = new oN(this.buffer, t2, this.index); } }, { key: "tree", get: function() { return this.buffer ? null : this._tree._tree; } }, { key: "iterate", value: function(e23, t2) { for (var n2 = 0; ; ) { var r2 = false; if (this.type.isAnonymous || e23(this) !== false) { if (this.firstChild()) { n2++; continue; } this.type.isAnonymous || (r2 = true); } for (; r2 && t2 && t2(this), r2 = this.type.isAnonymous, !this.nextSibling(); ) { if (!n2) return; this.parent(), n2--, r2 = true; } } } }, { key: "matchContext", value: function(e23) { if (!this.buffer) return rN(this.node, e23); for (var t2 = this.buffer.buffer, n2 = t2.set.types, r2 = e23.length - 1, i2 = this.stack.length - 1; r2 >= 0; i2--) { if (i2 < 0) return rN(this.node, e23, r2); var o2 = n2[t2.buffer[this.stack[i2]]]; if (!o2.isAnonymous) { if (e23[r2] && e23[r2] != o2.name) return false; r2--; } } return true; } }]), e22; }(); function sN(e22) { return e22.children.some(function(e23) { return e23 instanceof YP || !e23.type.isAnonymous || sN(e23); }); } function uN(e22) { var t2, n2 = e22.buffer, r2 = e22.nodeSet, i2 = e22.maxBufferLength, o2 = i2 === void 0 ? 1024 : i2, a2 = e22.reused, s2 = a2 === void 0 ? [] : a2, u2 = e22.minRepeatType, c2 = u2 === void 0 ? r2.types.length : u2, l2 = Array.isArray(n2) ? new QP(n2, n2.length) : n2, f2 = r2.types, h2 = 0, d2 = 0; function v2(e23, t3, n3, i3, a3) { for (var u3 = l2.id, y3 = l2.start, b3 = l2.end, k3 = l2.size, w2 = d2; k3 < 0; ) { if (l2.next(), k3 == -1) { var x2 = s2[u3]; return n3.push(x2), void i3.push(y3 - e23); } if (k3 == -3) return void (h2 = u3); if (k3 == -4) return void (d2 = u3); throw new RangeError("Unrecognized record size: ".concat(k3)); } var j2, S2, C2 = f2[u3], _2 = y3 - e23; if (b3 - y3 <= o2 && (S2 = function(e24, t4) { var n4 = l2.fork(), r3 = 0, i4 = 0, a4 = 0, s3 = n4.end - o2, u4 = { size: 0, start: 0, skip: 0 }; e: for (var f3 = n4.pos - e24; n4.pos > f3; ) { var h3 = n4.size; if (n4.id == t4 && h3 >= 0) u4.size = r3, u4.start = i4, u4.skip = a4, a4 += 4, r3 += 4, n4.next(); else { var d3 = n4.pos - h3; if (h3 < 0 || d3 < f3 || n4.start < s3) break; var v3 = n4.id >= c2 ? 4 : 0, p3 = n4.start; for (n4.next(); n4.pos > d3; ) { if (n4.size < 0) { if (n4.size != -3) break e; v3 += 4; } else n4.id >= c2 && (v3 += 4); n4.next(); } i4 = p3, r3 += h3, a4 += v3; } } (t4 < 0 || r3 == e24) && (u4.size = r3, u4.start = i4, u4.skip = a4); return u4.size > 4 ? u4 : void 0; }(l2.pos - t3, a3))) { for (var $2 = new Uint16Array(S2.size - S2.skip), O2 = l2.pos - S2.size, A2 = $2.length; l2.pos > O2; ) A2 = g2(S2.start, $2, A2); j2 = new YP($2, b3 - S2.start, r2), _2 = S2.start - e23; } else { var M2 = l2.pos - k3; l2.next(); for (var E2 = [], P2 = [], N2 = u3 >= c2 ? u3 : -1, T2 = 0, I2 = b3; l2.pos > M2; ) N2 >= 0 && l2.id == N2 && l2.size >= 0 ? (l2.end <= I2 - o2 && (p2(E2, P2, y3, T2, l2.end, I2, N2, w2), T2 = E2.length, I2 = l2.end), l2.next()) : v2(y3, M2, E2, P2, N2); if (N2 >= 0 && T2 > 0 && T2 < E2.length && p2(E2, P2, y3, T2, y3, I2, N2, w2), E2.reverse(), P2.reverse(), N2 > -1 && T2 > 0) { var R2 = function(e24) { return function(t4, n4, r3) { var i4, o3, a4 = 0, s3 = t4.length - 1; if (s3 >= 0 && (i4 = t4[s3]) instanceof GP) { if (!s3 && i4.type == e24 && i4.length == r3) return i4; (o3 = i4.prop(VP.lookAhead)) && (a4 = n4[s3] + i4.length + o3); } return m2(e24, t4, n4, r3, a4); }; }(C2); j2 = fN(C2, E2, P2, 0, E2.length, 0, b3 - y3, R2, R2); } else j2 = m2(C2, E2, P2, b3 - y3, w2 - b3); } n3.push(j2), i3.push(_2); } function p2(e23, t3, n3, i3, o3, a3, s3, u3) { for (var c3 = [], l3 = []; e23.length > i3; ) c3.push(e23.pop()), l3.push(t3.pop() + n3 - o3); e23.push(m2(r2.types[s3], c3, l3, a3 - o3, u3 - a3)), t3.push(o3 - n3); } function m2(e23, t3, n3, r3) { var i3 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, o3 = arguments.length > 5 ? arguments[5] : void 0; if (h2) { var a3 = [VP.contextHash, h2]; o3 = o3 ? [a3].concat(o3) : [a3]; } if (i3 > 25) { var s3 = [VP.lookAhead, i3]; o3 = o3 ? [s3].concat(o3) : [s3]; } return new GP(e23, t3, n3, r3, o3); } function g2(e23, t3, n3) { var r3 = l2.id, i3 = l2.start, o3 = l2.end, a3 = l2.size; if (l2.next(), a3 >= 0 && r3 < c2) { var s3 = n3; if (a3 > 4) for (var u3 = l2.pos - (a3 - 4); l2.pos > u3; ) n3 = g2(e23, t3, n3); t3[--n3] = s3, t3[--n3] = o3 - e23, t3[--n3] = i3 - e23, t3[--n3] = r3; } else a3 == -3 ? h2 = r3 : a3 == -4 && (d2 = r3); return n3; } for (var y2 = [], b2 = []; l2.pos > 0; ) v2(e22.start || 0, e22.bufferStart || 0, y2, b2, -1); var k2 = (t2 = e22.length) !== null && t2 !== void 0 ? t2 : y2.length ? b2[0] + y2[0].length : 0; return new GP(f2[e22.topID], y2.reverse(), b2.reverse(), k2); } var cN = /* @__PURE__ */ new WeakMap(); function lN(e22, t2) { if (!e22.isAnonymous || t2 instanceof YP || t2.type != e22) return 1; var n2 = cN.get(t2); if (n2 == null) { n2 = 1; var r2, i2 = bi(t2.children); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; if (o2.type != e22 || !(o2 instanceof GP)) { n2 = 1; break; } n2 += lN(e22, o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } cN.set(t2, n2); } return n2; } function fN(e22, t2, n2, r2, i2, o2, a2, s2, u2) { for (var c2 = 0, l2 = r2; l2 < i2; l2++) c2 += lN(e22, t2[l2]); var f2 = Math.ceil(1.5 * c2 / 8), h2 = [], d2 = []; return function t3(n3, r3, i3, a3, s3) { for (var c3 = i3; c3 < a3; ) { var l3 = c3, v2 = r3[c3], p2 = lN(e22, n3[c3]); for (c3++; c3 < a3; c3++) { var m2 = lN(e22, n3[c3]); if (p2 + m2 >= f2) break; p2 += m2; } if (c3 == l3 + 1) { if (p2 > f2) { var g2 = n3[l3]; t3(g2.children, g2.positions, 0, g2.children.length, r3[l3] + s3); continue; } h2.push(n3[l3]); } else { var y2 = r3[c3 - 1] + n3[c3 - 1].length - v2; h2.push(fN(e22, n3, r3, l3, c3, v2, y2, null, u2)); } d2.push(v2 + s3 - o2); } }(t2, n2, r2, i2, 0), (s2 || u2)(h2, d2, a2); } new VP({ perNode: true }); var hN = 0, dN = function() { function e22(t2, n2, r2) { Ri(this, e22), this.set = t2, this.base = n2, this.modified = r2, this.id = hN++; } return zi(e22, null, [{ key: "define", value: function(t2) { if (t2 == null ? void 0 : t2.base) throw new Error("Can not derive from a modified tag"); var n2 = new e22([], null, []); if (n2.set.push(n2), t2) { var r2, i2 = bi(t2.set); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; n2.set.push(o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } } return n2; } }, { key: "defineModifier", value: function() { var e23 = new pN(); return function(t2) { return t2.modified.indexOf(e23) > -1 ? t2 : pN.get(t2.base || t2, t2.modified.concat(e23).sort(function(e24, t3) { return e24.id - t3.id; })); }; } }]), e22; }(), vN = 0, pN = function() { function e22() { Ri(this, e22), this.instances = [], this.id = vN++; } return zi(e22, null, [{ key: "get", value: function(t2, n2) { if (!n2.length) return t2; var r2 = n2[0].instances.find(function(e23) { return e23.base == t2 && (r3 = n2, i3 = e23.modified, r3.length == i3.length && r3.every(function(e24, t3) { return e24 == i3[t3]; })); var r3, i3; }); if (r2) return r2; var i2, o2 = [], a2 = new dN(o2, t2, n2), s2 = bi(n2); try { for (s2.s(); !(i2 = s2.n()).done; ) { i2.value.instances.push(a2); } } catch (e23) { s2.e(e23); } finally { s2.f(); } var u2, c2 = mN(n2), l2 = bi(t2.set); try { for (l2.s(); !(u2 = l2.n()).done; ) { var f2, h2 = u2.value, d2 = bi(c2); try { for (d2.s(); !(f2 = d2.n()).done; ) { var v2 = f2.value; o2.push(e22.get(h2, v2)); } } catch (e23) { d2.e(e23); } finally { d2.f(); } } } catch (e23) { l2.e(e23); } finally { l2.f(); } return a2; } }]), e22; }(); function mN(e22) { for (var t2 = [e22], n2 = 0; n2 < e22.length; n2++) { var r2, i2 = bi(mN(e22.slice(0, n2).concat(e22.slice(n2 + 1)))); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; t2.push(o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } } return t2; } function gN(e22) { var t2 = /* @__PURE__ */ Object.create(null); for (var n2 in e22) { var r2 = e22[n2]; Array.isArray(r2) || (r2 = [r2]); var i2, o2 = bi(n2.split(" ")); try { for (o2.s(); !(i2 = o2.n()).done; ) { var a2 = i2.value; if (a2) { for (var s2 = [], u2 = 2, c2 = a2, l2 = 0; ; ) { if (c2 == "..." && l2 > 0 && l2 + 3 == a2.length) { u2 = 1; break; } var f2 = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c2); if (!f2) throw new RangeError("Invalid path: " + a2); if (s2.push(f2[0] == "*" ? "" : f2[0][0] == '"' ? JSON.parse(f2[0]) : f2[0]), (l2 += f2[0].length) == a2.length) break; var h2 = a2[l2++]; if (l2 == a2.length && h2 == "!") { u2 = 0; break; } if (h2 != "/") throw new RangeError("Invalid path: " + a2); c2 = a2.slice(l2); } var d2 = s2.length - 1, v2 = s2[d2]; if (!v2) throw new RangeError("Invalid path: " + a2); var p2 = new bN(r2, u2, d2 > 0 ? s2.slice(0, d2) : null); t2[v2] = p2.sort(t2[v2]); } } } catch (e23) { o2.e(e23); } finally { o2.f(); } } return yN.add(t2); } var yN = new VP(), bN = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.tags = t2, this.mode = n2, this.context = r2, this.next = i2; } return zi(e22, [{ key: "sort", value: function(e23) { return !e23 || e23.depth < this.depth ? (this.next = e23, this) : (e23.next = this.sort(e23.next), e23); } }, { key: "depth", get: function() { return this.context ? this.context.length : 0; } }]), e22; }(); function kN(e22, t2) { var n2, r2 = /* @__PURE__ */ Object.create(null), i2 = bi(e22); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value; if (Array.isArray(o2.tag)) { var a2, s2 = bi(o2.tag); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = a2.value; r2[u2.id] = o2.class; } } catch (e23) { s2.e(e23); } finally { s2.f(); } } else r2[o2.tag.id] = o2.class; } } catch (e23) { i2.e(e23); } finally { i2.f(); } var c2 = t2 || {}, l2 = c2.scope, f2 = c2.all, h2 = f2 === void 0 ? null : f2; return { style: function(e23) { var t3, n3 = h2, i3 = bi(e23); try { for (i3.s(); !(t3 = i3.n()).done; ) { var o3, a3 = bi(t3.value.set); try { for (a3.s(); !(o3 = a3.n()).done; ) { var s3 = o3.value, u3 = r2[s3.id]; if (u3) { n3 = n3 ? n3 + " " + u3 : u3; break; } } } catch (e24) { a3.e(e24); } finally { a3.f(); } } } catch (e24) { i3.e(e24); } finally { i3.f(); } return n3; }, scope: l2 }; } function wN(e22, t2) { var n2, r2 = null, i2 = bi(e22); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value.style(t2); o2 && (r2 = r2 ? r2 + " " + o2 : o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } return r2; } function xN(e22, t2, n2) { var r2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : e22.length, o2 = new SN(r2, Array.isArray(t2) ? t2 : [t2], n2); o2.highlightRange(e22.cursor(), r2, i2, "", o2.highlighters), o2.flush(i2); } var jN, SN = function() { function e22(t2, n2, r2) { Ri(this, e22), this.at = t2, this.highlighters = n2, this.span = r2, this.class = ""; } return zi(e22, [{ key: "startSpan", value: function(e23, t2) { t2 != this.class && (this.flush(e23), e23 > this.at && (this.at = e23), this.class = t2); } }, { key: "flush", value: function(e23) { e23 > this.at && this.class && this.span(this.at, e23, this.class); } }, { key: "highlightRange", value: function(e23, t2, n2, r2, i2) { var o2 = e23.type, a2 = e23.from, s2 = e23.to; if (!(a2 >= n2 || s2 <= t2)) { o2.isTop && (i2 = this.highlighters.filter(function(e24) { return !e24.scope || e24.scope(o2); })); for (var u2 = r2, c2 = o2.prop(yN), l2 = false; c2; ) { if (!c2.context || e23.matchContext(c2.context)) { var f2 = wN(i2, c2.tags); f2 && (u2 && (u2 += " "), u2 += f2, c2.mode == 1 ? r2 += (r2 ? " " : "") + f2 : c2.mode == 0 && (l2 = true)); break; } c2 = c2.next; } if (this.startSpan(e23.from, u2), !l2) { var h2 = e23.tree && e23.tree.prop(VP.mounted); if (h2 && h2.overlay) { for (var d2 = e23.node.enter(h2.overlay[0].from + a2, 1), v2 = this.highlighters.filter(function(e24) { return !e24.scope || e24.scope(h2.tree.type); }), p2 = e23.firstChild(), m2 = 0, g2 = a2; ; m2++) { var y2 = m2 < h2.overlay.length ? h2.overlay[m2] : null, b2 = y2 ? y2.from + a2 : s2, k2 = Math.max(t2, g2), w2 = Math.min(n2, b2); if (k2 < w2 && p2) for (; e23.from < w2 && (this.highlightRange(e23, k2, w2, r2, i2), this.startSpan(Math.min(n2, e23.to), u2), !(e23.to >= b2) && e23.nextSibling()); ) ; if (!y2 || b2 > n2) break; (g2 = y2.to + a2) > t2 && (this.highlightRange(d2.cursor(), Math.max(t2, y2.from + a2), Math.min(n2, g2), r2, v2), this.startSpan(g2, u2)); } p2 && e23.parent(); } else if (e23.firstChild()) { do { if (!(e23.to <= t2)) { if (e23.from >= n2) break; this.highlightRange(e23, t2, n2, r2, i2), this.startSpan(Math.min(n2, e23.to), u2); } } while (e23.nextSibling()); e23.parent(); } } } } }]), e22; }(), CN = dN.define, _N = CN(), $N = CN(), ON = CN($N), AN = CN($N), MN = CN(), EN = CN(MN), PN = CN(MN), NN = CN(), TN = CN(NN), IN = CN(), RN = CN(), DN = CN(), zN = CN(DN), LN = CN(), BN = { comment: _N, lineComment: CN(_N), blockComment: CN(_N), docComment: CN(_N), name: $N, variableName: CN($N), typeName: ON, tagName: CN(ON), propertyName: AN, attributeName: CN(AN), className: CN($N), labelName: CN($N), namespace: CN($N), macroName: CN($N), literal: MN, string: EN, docString: CN(EN), character: CN(EN), attributeValue: CN(EN), number: PN, integer: CN(PN), float: CN(PN), bool: CN(MN), regexp: CN(MN), escape: CN(MN), color: CN(MN), url: CN(MN), keyword: IN, self: CN(IN), null: CN(IN), atom: CN(IN), unit: CN(IN), modifier: CN(IN), operatorKeyword: CN(IN), controlKeyword: CN(IN), definitionKeyword: CN(IN), moduleKeyword: CN(IN), operator: RN, derefOperator: CN(RN), arithmeticOperator: CN(RN), logicOperator: CN(RN), bitwiseOperator: CN(RN), compareOperator: CN(RN), updateOperator: CN(RN), definitionOperator: CN(RN), typeOperator: CN(RN), controlOperator: CN(RN), punctuation: DN, separator: CN(DN), bracket: zN, angleBracket: CN(zN), squareBracket: CN(zN), paren: CN(zN), brace: CN(zN), content: NN, heading: TN, heading1: CN(TN), heading2: CN(TN), heading3: CN(TN), heading4: CN(TN), heading5: CN(TN), heading6: CN(TN), contentSeparator: CN(NN), list: CN(NN), quote: CN(NN), emphasis: CN(NN), strong: CN(NN), link: CN(NN), monospace: CN(NN), strikethrough: CN(NN), inserted: CN(), deleted: CN(), changed: CN(), invalid: CN(), meta: LN, documentMeta: CN(LN), annotation: CN(LN), processingInstruction: CN(LN), definition: dN.defineModifier(), constant: dN.defineModifier(), function: dN.defineModifier(), standard: dN.defineModifier(), local: dN.defineModifier(), special: dN.defineModifier() }; kN([{ tag: BN.link, class: "tok-link" }, { tag: BN.heading, class: "tok-heading" }, { tag: BN.emphasis, class: "tok-emphasis" }, { tag: BN.strong, class: "tok-strong" }, { tag: BN.keyword, class: "tok-keyword" }, { tag: BN.atom, class: "tok-atom" }, { tag: BN.bool, class: "tok-bool" }, { tag: BN.url, class: "tok-url" }, { tag: BN.labelName, class: "tok-labelName" }, { tag: BN.inserted, class: "tok-inserted" }, { tag: BN.deleted, class: "tok-deleted" }, { tag: BN.literal, class: "tok-literal" }, { tag: BN.string, class: "tok-string" }, { tag: BN.number, class: "tok-number" }, { tag: [BN.regexp, BN.escape, BN.special(BN.string)], class: "tok-string2" }, { tag: BN.variableName, class: "tok-variableName" }, { tag: BN.local(BN.variableName), class: "tok-variableName tok-local" }, { tag: BN.definition(BN.variableName), class: "tok-variableName tok-definition" }, { tag: BN.special(BN.variableName), class: "tok-variableName2" }, { tag: BN.definition(BN.propertyName), class: "tok-propertyName tok-definition" }, { tag: BN.typeName, class: "tok-typeName" }, { tag: BN.namespace, class: "tok-namespace" }, { tag: BN.className, class: "tok-className" }, { tag: BN.macroName, class: "tok-macroName" }, { tag: BN.propertyName, class: "tok-propertyName" }, { tag: BN.operator, class: "tok-operator" }, { tag: BN.comment, class: "tok-comment" }, { tag: BN.meta, class: "tok-meta" }, { tag: BN.invalid, class: "tok-invalid" }, { tag: BN.punctuation, class: "tok-punctuation" }]); var qN = new mP(); var FN = function() { function e22(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []; Ri(this, e22), this.data = t2, m_.prototype.hasOwnProperty("tree") || Object.defineProperty(m_.prototype, "tree", { get: function() { return WN(this); } }), this.parser = n2, this.extension = [eT.of(this), m_.languageData.of(function(e23, t3, n3) { return e23.facet(VN(e23, t3, n3)); })].concat(r2); } return zi(e22, [{ key: "isActiveAt", value: function(e23, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; return VN(e23, t2, n2) == this.data; } }, { key: "findRegions", value: function(e23) { var t2 = this, n2 = e23.facet(eT); if ((n2 == null ? void 0 : n2.data) == this.data) return [{ from: 0, to: e23.doc.length }]; if (!n2 || !n2.allowsNesting) return []; var r2 = []; return function e24(n3, i2) { if (n3.prop(qN) != t2.data) { var o2 = n3.prop(mP.mounted); if (o2) { if (o2.tree.prop(qN) == t2.data) { if (o2.overlay) { var a2, s2 = bi(o2.overlay); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = a2.value; r2.push({ from: u2.from + i2, to: u2.to + i2 }); } } catch (e25) { s2.e(e25); } finally { s2.f(); } } else r2.push({ from: i2, to: i2 + n3.length }); return; } if (o2.overlay) { var c2 = r2.length; if (e24(o2.tree, o2.overlay[0].from + i2), r2.length > c2) return; } } for (var l2 = 0; l2 < n3.children.length; l2++) { var f2 = n3.children[l2]; f2 instanceof xP && e24(f2, n3.positions[l2] + i2); } } else r2.push({ from: i2, to: i2 + n3.length }); }(WN(e23), 0), r2; } }, { key: "allowsNesting", get: function() { return true; } }]), e22; }(); function VN(e22, t2, n2) { var r2 = e22.facet(eT); if (!r2) return null; var i2 = r2.data; if (r2.allowsNesting) for (var o2 = WN(e22).topNode; o2; o2 = o2.enter(t2, n2, bP.ExcludeBuffers)) i2 = o2.type.prop(qN) || i2; return i2; } FN.setState = i_.define(); var HN = function(e22) { _i(n2, FN); var t2 = Oi(n2); function n2(e23, r2) { var i2; return Ri(this, n2), (i2 = t2.call(this, e23, r2)).parser = r2, i2; } return zi(n2, [{ key: "configure", value: function(e23) { return new n2(this.data, this.parser.configure(e23)); } }, { key: "allowsNesting", get: function() { return this.parser.hasWrappers(); } }], [{ key: "define", value: function(e23) { var t3, r2 = (t3 = e23.languageData, AC.define({ combine: t3 ? function(e24) { return e24.concat(t3); } : void 0 })); return new n2(r2, e23.parser.configure({ props: [qN.add(function(e24) { return e24.isTop ? r2 : void 0; })] })); } }]), n2; }(); function WN(e22) { var t2 = e22.field(FN.state, false); return t2 ? t2.tree : xP.empty; } var JN = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t2.length; Ri(this, e22), this.doc = t2, this.length = n2, this.cursorPos = 0, this.string = "", this.cursor = t2.iter(); } return zi(e22, [{ key: "syncTo", value: function(e23) { return this.string = this.cursor.next(e23 - this.cursorPos).value, this.cursorPos = e23 + this.string.length, this.cursorPos - this.string.length; } }, { key: "chunk", value: function(e23) { return this.syncTo(e23), this.string; } }, { key: "lineChunks", get: function() { return true; } }, { key: "read", value: function(e23, t2) { var n2 = this.cursorPos - this.string.length; return e23 < n2 || t2 >= this.cursorPos ? this.doc.sliceString(e23, t2) : this.string.slice(e23 - n2, t2 - n2); } }]), e22; }(), UN = null, KN = function() { function e22(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], i2 = arguments.length > 3 ? arguments[3] : void 0, o2 = arguments.length > 4 ? arguments[4] : void 0, a2 = arguments.length > 5 ? arguments[5] : void 0, s2 = arguments.length > 6 ? arguments[6] : void 0, u2 = arguments.length > 7 ? arguments[7] : void 0; Ri(this, e22), this.parser = t2, this.state = n2, this.fragments = r2, this.tree = i2, this.treeLen = o2, this.viewport = a2, this.skipped = s2, this.scheduleOn = u2, this.parse = null, this.tempSkipped = []; } return zi(e22, [{ key: "startParse", value: function() { return this.parser.startParse(new JN(this.state.doc), this.fragments); } }, { key: "work", value: function(e23, t2) { var n2 = this; return t2 != null && t2 >= this.state.doc.length && (t2 = void 0), this.tree != xP.empty && this.isDone(t2 != null ? t2 : this.state.doc.length) ? (this.takeTree(), true) : this.withContext(function() { var r2; if (typeof e23 == "number") { var i2 = Date.now() + e23; e23 = function() { return Date.now() > i2; }; } for (n2.parse || (n2.parse = n2.startParse()), t2 != null && (n2.parse.stoppedAt == null || n2.parse.stoppedAt > t2) && t2 < n2.state.doc.length && n2.parse.stopAt(t2); ; ) { var o2 = n2.parse.advance(); if (o2) { if (n2.fragments = n2.withoutTempSkipped(LP.addTree(o2, n2.fragments, n2.parse.stoppedAt != null)), n2.treeLen = (r2 = n2.parse.stoppedAt) !== null && r2 !== void 0 ? r2 : n2.state.doc.length, n2.tree = o2, n2.parse = null, !(n2.treeLen < (t2 != null ? t2 : n2.state.doc.length))) return true; n2.parse = n2.startParse(); } if (e23()) return false; } }); } }, { key: "takeTree", value: function() { var e23, t2, n2 = this; this.parse && (e23 = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e23) && this.parse.stopAt(e23), this.withContext(function() { for (; !(t2 = n2.parse.advance()); ) ; }), this.treeLen = e23, this.tree = t2, this.fragments = this.withoutTempSkipped(LP.addTree(this.tree, this.fragments, true)), this.parse = null); } }, { key: "withContext", value: function(e23) { var t2 = UN; UN = this; try { return e23(); } finally { UN = t2; } } }, { key: "withoutTempSkipped", value: function(e23) { for (var t2; t2 = this.tempSkipped.pop(); ) e23 = GN(e23, t2.from, t2.to); return e23; } }, { key: "changes", value: function(t2, n2) { var r2 = this.fragments, i2 = this.tree, o2 = this.treeLen, a2 = this.viewport, s2 = this.skipped; if (this.takeTree(), !t2.empty) { var u2 = []; if (t2.iterChangedRanges(function(e23, t3, n3, r3) { return u2.push({ fromA: e23, toA: t3, fromB: n3, toB: r3 }); }), r2 = LP.applyChanges(r2, u2), i2 = xP.empty, o2 = 0, a2 = { from: t2.mapPos(a2.from, -1), to: t2.mapPos(a2.to, 1) }, this.skipped.length) { s2 = []; var c2, l2 = bi(this.skipped); try { for (l2.s(); !(c2 = l2.n()).done; ) { var f2 = c2.value, h2 = t2.mapPos(f2.from, 1), d2 = t2.mapPos(f2.to, -1); h2 < d2 && s2.push({ from: h2, to: d2 }); } } catch (e23) { l2.e(e23); } finally { l2.f(); } } } return new e22(this.parser, n2, r2, i2, o2, a2, s2, this.scheduleOn); } }, { key: "updateViewport", value: function(e23) { if (this.viewport.from == e23.from && this.viewport.to == e23.to) return false; this.viewport = e23; for (var t2 = this.skipped.length, n2 = 0; n2 < this.skipped.length; n2++) { var r2 = this.skipped[n2], i2 = r2.from, o2 = r2.to; i2 < e23.to && o2 > e23.from && (this.fragments = GN(this.fragments, i2, o2), this.skipped.splice(n2--, 1)); } return !(this.skipped.length >= t2) && (this.reset(), true); } }, { key: "reset", value: function() { this.parse && (this.takeTree(), this.parse = null); } }, { key: "skipUntilInView", value: function(e23, t2) { this.skipped.push({ from: e23, to: t2 }); } }, { key: "isDone", value: function(e23) { e23 = Math.min(e23, this.state.doc.length); var t2 = this.fragments; return this.treeLen >= e23 && t2.length && t2[0].from == 0 && t2[0].to >= e23; } }], [{ key: "create", value: function(t2, n2, r2) { return new e22(t2, n2, [], xP.empty, 0, r2, [], null); } }, { key: "getSkippingParser", value: function(e23) { return new (function(t2) { _i(r2, BP); var n2 = Oi(r2); function r2() { return Ri(this, r2), n2.apply(this, arguments); } return zi(r2, [{ key: "createParse", value: function(t3, n3, r3) { var i2 = r3[0].from, o2 = r3[r3.length - 1].to; return { parsedPos: i2, advance: function() { var t4 = UN; if (t4) { var n4, a2 = bi(r3); try { for (a2.s(); !(n4 = a2.n()).done; ) { var s2 = n4.value; t4.tempSkipped.push(s2); } } catch (e24) { a2.e(e24); } finally { a2.f(); } e23 && (t4.scheduleOn = t4.scheduleOn ? Promise.all([t4.scheduleOn, e23]) : e23); } return this.parsedPos = o2, new xP(yP.none, [], [], o2 - i2); }, stoppedAt: null, stopAt: function() { } }; } }]), r2; }())(); } }, { key: "get", value: function() { return UN; } }]), e22; }(); function GN(e22, t2, n2) { return LP.applyChanges(e22, [{ fromA: t2, toA: n2, fromB: t2, toB: n2 }]); } var QN = function() { function e22(t2) { Ri(this, e22), this.context = t2, this.tree = t2.tree; } return zi(e22, [{ key: "apply", value: function(t2) { if (!t2.docChanged && this.tree == this.context.tree) return this; var n2 = this.context.changes(t2.changes, t2.state), r2 = this.context.treeLen == t2.startState.doc.length ? void 0 : Math.max(t2.changes.mapPos(this.context.treeLen), n2.viewport.to); return n2.work(20, r2) || n2.takeTree(), new e22(n2); } }], [{ key: "init", value: function(t2) { var n2 = Math.min(3e3, t2.doc.length), r2 = KN.create(t2.facet(eT).parser, t2, { from: 0, to: n2 }); return r2.work(20, n2) || r2.takeTree(), new e22(r2); } }]), e22; }(); FN.state = IC.define({ create: QN.init, update: function(e22, t2) { var n2, r2 = bi(t2.effects); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; if (i2.is(FN.setState)) return i2.value; } } catch (e23) { r2.e(e23); } finally { r2.f(); } return t2.startState.facet(eT) != t2.state.facet(eT) ? QN.init(t2.state) : e22.apply(t2); } }); var YN = function(e22) { var t2 = setTimeout(function() { return e22(); }, 500); return function() { return clearTimeout(t2); }; }; typeof requestIdleCallback != "undefined" && (YN = function(e22) { var t2 = -1, n2 = setTimeout(function() { t2 = requestIdleCallback(e22, { timeout: 400 }); }, 100); return function() { return t2 < 0 ? clearTimeout(n2) : cancelIdleCallback(t2); }; }); var ZN = typeof navigator != "undefined" && ((jN = navigator.scheduling) === null || jN === void 0 ? void 0 : jN.isInputPending) ? function() { return navigator.scheduling.isInputPending(); } : null, XN = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork(); } return zi(e22, [{ key: "update", value: function(e23) { var t2 = this.view.state.field(FN.state).context; (t2.updateViewport(e23.view.viewport) || this.view.viewport.to > t2.treeLen) && this.scheduleWork(), e23.docChanged && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(t2); } }, { key: "scheduleWork", value: function() { if (!this.working) { var e23 = this.view.state, t2 = e23.field(FN.state); t2.tree == t2.context.tree && t2.context.isDone(e23.doc.length) || (this.working = YN(this.work)); } } }, { key: "work", value: function(e23) { this.working = null; var t2 = Date.now(); if (this.chunkEnd < t2 && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = t2 + 3e4, this.chunkBudget = 3e3), !(this.chunkBudget <= 0)) { var n2 = this.view, r2 = n2.state, i2 = n2.viewport.to, o2 = r2.field(FN.state); if (o2.tree != o2.context.tree || !o2.context.isDone(i2 + 1e5)) { var a2 = Date.now() + Math.min(this.chunkBudget, 100, e23 && !ZN ? Math.max(25, e23.timeRemaining() - 5) : 1e9), s2 = o2.context.treeLen < i2 && r2.doc.length > i2 + 1e3, u2 = o2.context.work(function() { return ZN && ZN() || Date.now() > a2; }, i2 + (s2 ? 0 : 1e5)); this.chunkBudget -= Date.now() - t2, (u2 || this.chunkBudget <= 0) && (o2.context.takeTree(), this.view.dispatch({ effects: FN.setState.of(new QN(o2.context)) })), this.chunkBudget > 0 && (!u2 || s2) && this.scheduleWork(), this.checkAsyncSchedule(o2.context); } } } }, { key: "checkAsyncSchedule", value: function(e23) { var t2 = this; e23.scheduleOn && (this.workScheduled++, e23.scheduleOn.then(function() { return t2.scheduleWork(); }).catch(function(e24) { return bO(t2.view.state, e24); }).then(function() { return t2.workScheduled--; }), e23.scheduleOn = null); } }, { key: "destroy", value: function() { this.working && this.working(); } }, { key: "isWorking", value: function() { return !!(this.working || this.workScheduled > 0); } }]), e22; }(), { eventHandlers: { focus: function() { this.scheduleWork(); } } }), eT = AC.define({ combine: function(e22) { return e22.length ? e22[0] : null; }, enables: [FN.state, XN] }), tT = zi(function e9(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []; Ri(this, e9), this.language = t2, this.support = n2, this.extension = [t2, n2]; }), nT = AC.define(), rT = AC.define({ combine: function(e22) { if (!e22.length) return " "; if (!/^(?: +|\t+)$/.test(e22[0])) throw new Error("Invalid indent unit: " + JSON.stringify(e22[0])); return e22[0]; } }); function iT(e22) { var t2 = e22.facet(rT); return t2.charCodeAt(0) == 9 ? e22.tabSize * t2.length : t2.length; } function oT(e22, t2) { var n2 = "", r2 = e22.tabSize; if (e22.facet(rT).charCodeAt(0) == 9) for (; t2 >= r2; ) n2 += " ", t2 -= r2; for (var i2 = 0; i2 < t2; i2++) n2 += " "; return n2; } function aT(e22, t2) { e22 instanceof m_ && (e22 = new sT(e22)); var n2, r2 = bi(e22.state.facet(nT)); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = (0, n2.value)(e22, t2); if (i2 != null) return i2; } } catch (e23) { r2.e(e23); } finally { r2.f(); } var o2 = WN(e22.state); return o2 ? function(e23, t3, n3) { return lT(t3.resolveInner(n3).enterUnfinishedNodesBefore(n3), n3, e23); }(e22, o2, t2) : null; } var sT = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; Ri(this, e22), this.state = t2, this.options = n2, this.unit = iT(t2); } return zi(e22, [{ key: "lineAt", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, n2 = this.state.doc.lineAt(e23), r2 = this.options, i2 = r2.simulateBreak, o2 = r2.simulateDoubleBreak; return i2 != null && i2 >= n2.from && i2 <= n2.to ? o2 && i2 == e23 ? { text: "", from: e23 } : (t2 < 0 ? i2 < e23 : i2 <= e23) ? { text: n2.text.slice(i2 - n2.from), from: i2 } : { text: n2.text.slice(0, i2 - n2.from), from: n2.from } : n2; } }, { key: "textAfterPos", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; if (this.options.simulateDoubleBreak && e23 == this.options.simulateBreak) return ""; var n2 = this.lineAt(e23, t2), r2 = n2.text, i2 = n2.from; return r2.slice(e23 - i2, Math.min(r2.length, e23 + 100 - i2)); } }, { key: "column", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, n2 = this.lineAt(e23, t2), r2 = n2.text, i2 = n2.from, o2 = this.countColumn(r2, e23 - i2), a2 = this.options.overrideIndentation ? this.options.overrideIndentation(i2) : -1; return a2 > -1 && (o2 += a2 - this.countColumn(r2, r2.search(/\S|$/))), o2; } }, { key: "countColumn", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e23.length; return I_(e23, this.state.tabSize, t2); } }, { key: "lineIndent", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, n2 = this.lineAt(e23, t2), r2 = n2.text, i2 = n2.from, o2 = this.options.overrideIndentation; if (o2) { var a2 = o2(i2); if (a2 > -1) return a2; } return this.countColumn(r2, r2.search(/\S|$/)); } }, { key: "simulatedBreak", get: function() { return this.options.simulateBreak || null; } }]), e22; }(), uT = new mP(); function cT(e22) { var t2 = e22.type.prop(uT); if (t2) return t2; var n2, r2 = e22.firstChild; if (r2 && (n2 = r2.type.prop(mP.closedBy))) { var i2 = e22.lastChild, o2 = i2 && n2.indexOf(i2.name) > -1; return function(e23) { return function(e24, t3, n3, r3, i3) { var o3 = e24.textAfter, a2 = o3.match(/^\s*/)[0].length, s2 = r3 && o3.slice(a2, a2 + r3.length) == r3 || i3 == e24.pos + a2, u2 = t3 ? function(e25) { var t4 = e25.node, n4 = t4.childAfter(t4.from), r4 = t4.lastChild; if (!n4) return null; for (var i4 = e25.options.simulateBreak, o4 = e25.state.doc.lineAt(n4.from), a3 = i4 == null || i4 <= o4.from ? o4.to : Math.min(o4.to, i4), s3 = n4.to; ; ) { var u3 = t4.childAfter(s3); if (!u3 || u3 == r4) return null; if (!u3.type.isSkipped) return u3.from < a3 ? n4 : null; s3 = u3.to; } }(e24) : null; return u2 ? s2 ? e24.column(u2.from) : e24.column(u2.to) : e24.baseIndent + (s2 ? 0 : e24.unit * n3); }(e23, true, 1, void 0, o2 && !function(e24) { return e24.pos == e24.options.simulateBreak && e24.options.simulateDoubleBreak; }(e23) ? i2.from : void 0); }; } return e22.parent == null ? fT : null; } function lT(e22, t2, n2) { for (; e22; e22 = e22.parent) { var r2 = cT(e22); if (r2) return r2(hT.create(n2, t2, e22)); } return null; } function fT() { return 0; } var hT = function(e22) { _i(n2, sT); var t2 = Oi(n2); function n2(e23, r2, i2) { var o2; return Ri(this, n2), (o2 = t2.call(this, e23.state, e23.options)).base = e23, o2.pos = r2, o2.node = i2, o2; } return zi(n2, [{ key: "textAfter", get: function() { return this.textAfterPos(this.pos); } }, { key: "baseIndent", get: function() { for (var e23 = this.state.doc.lineAt(this.node.from); ; ) { for (var t3 = this.node.resolve(e23.from); t3.parent && t3.parent.from == t3.from; ) t3 = t3.parent; if (dT(t3, this.node)) break; e23 = this.state.doc.lineAt(t3.from); } return this.lineIndent(e23.from); } }, { key: "continue", value: function() { var e23 = this.node.parent; return e23 ? lT(e23, this.pos, this.base) : 0; } }], [{ key: "create", value: function(e23, t3, r2) { return new n2(e23, t3, r2); } }]), n2; }(); function dT(e22, t2) { for (var n2 = t2; n2; n2 = n2.parent) if (e22 == n2) return true; return false; } function vT() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t2 = e22.except, n2 = e22.units, r2 = n2 === void 0 ? 1 : n2; return function(e23) { var n3 = t2 && t2.test(e23.textAfter); return e23.baseIndent + (n3 ? 0 : r2 * e23.unit); }; } var pT = AC.define(), mT = new mP(); function gT(e22, t2, n2) { var r2, i2 = bi(e22.facet(pT)); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = (0, r2.value)(e22, t2, n2); if (o2) return o2; } } catch (e23) { i2.e(e23); } finally { i2.f(); } return function(e23, t3, n3) { var r3 = WN(e23); if (r3.length < n3) return null; for (var i3, o3, a2 = null, s2 = r3.resolveInner(n3); s2; s2 = s2.parent) if (!(s2.to <= n3 || s2.from > n3)) { if (a2 && s2.from < t3) break; var u2 = s2.type.prop(mT); if (u2 && (s2.to < r3.length - 50 || r3.length == e23.doc.length || (o3 = void 0, !(o3 = (i3 = s2).lastChild) || o3.to != i3.to || !o3.type.isError))) { var c2 = u2(s2, e23); c2 && c2.from <= n3 && c2.from >= t3 && c2.to > n3 && (a2 = c2); } } return a2; }(e22, t2, n2); } function yT(e22, t2) { var n2 = t2.mapPos(e22.from, 1), r2 = t2.mapPos(e22.to, -1); return n2 >= r2 ? void 0 : { from: n2, to: r2 }; } var bT = i_.define({ map: yT }), kT = i_.define({ map: yT }); function wT(e22) { var t2, n2 = [], r2 = bi(e22.state.selection.ranges); try { var i2 = function() { var r3 = t2.value.head; if (n2.some(function(e23) { return e23.from <= r3 && e23.to >= r3; })) return "continue"; n2.push(e22.lineBlockAt(r3)); }; for (r2.s(); !(t2 = r2.n()).done; ) i2(); } catch (e23) { r2.e(e23); } finally { r2.f(); } return n2; } var xT = IC.define({ create: function() { return X$.none; }, update: function(e22, t2) { e22 = e22.map(t2.changes); var n2, r2 = bi(t2.effects); try { var i2 = function() { var t3 = n2.value; t3.is(bT) && !function(e23, t4, n3) { var r3 = false; return e23.between(t4, t4, function(e24, i3) { e24 == t4 && i3 == n3 && (r3 = true); }), r3; }(e22, t3.value.from, t3.value.to) ? e22 = e22.update({ add: [MT.range(t3.value.from, t3.value.to)] }) : t3.is(kT) && (e22 = e22.update({ filter: function(e23, n3) { return t3.value.from != e23 || t3.value.to != n3; }, filterFrom: t3.value.from, filterTo: t3.value.to })); }; for (r2.s(); !(n2 = r2.n()).done; ) i2(); } catch (e23) { r2.e(e23); } finally { r2.f(); } if (t2.selection) { var o2 = false, a2 = t2.selection.main.head; e22.between(a2, a2, function(e23, t3) { e23 < a2 && t3 > a2 && (o2 = true); }), o2 && (e22 = e22.update({ filterFrom: a2, filterTo: a2, filter: function(e23, t3) { return t3 <= a2 || e23 >= a2; } })); } return e22; }, provide: function(e22) { return PM.decorations.from(e22); }, toJSON: function(e22, t2) { var n2 = []; return e22.between(0, t2.doc.length, function(e23, t3) { n2.push(e23, t3); }), n2; }, fromJSON: function(e22) { if (!Array.isArray(e22) || e22.length % 2) throw new RangeError("Invalid JSON for fold state"); for (var t2 = [], n2 = 0; n2 < e22.length; ) { var r2 = e22[n2++], i2 = e22[n2++]; if (typeof r2 != "number" || typeof i2 != "number") throw new RangeError("Invalid JSON for fold state"); t2.push(MT.range(r2, i2)); } return X$.set(t2, true); } }); function jT(e22, t2, n2) { var r2, i2 = null; return (r2 = e22.field(xT, false)) === null || r2 === void 0 || r2.between(t2, n2, function(e23, t3) { (!i2 || i2.from > e23) && (i2 = { from: e23, to: t3 }); }), i2; } function ST(e22, t2) { return e22.field(xT, false) ? t2 : t2.concat(i_.appendConfig.of(AT())); } function CT(e22, t2) { var n2 = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], r2 = e22.state.doc.lineAt(t2.from).number, i2 = e22.state.doc.lineAt(t2.to).number; return PM.announce.of("".concat(e22.state.phrase(n2 ? "Folded lines" : "Unfolded lines"), " ").concat(r2, " ").concat(e22.state.phrase("to"), " ").concat(i2, ".")); } var _T = [{ key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: function(e22) { var t2, n2 = bi(wT(e22)); try { for (n2.s(); !(t2 = n2.n()).done; ) { var r2 = t2.value, i2 = gT(e22.state, r2.from, r2.to); if (i2) return e22.dispatch({ effects: ST(e22.state, [bT.of(i2), CT(e22, i2)]) }), true; } } catch (e23) { n2.e(e23); } finally { n2.f(); } return false; } }, { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: function(e22) { if (!e22.state.field(xT, false)) return false; var t2, n2 = [], r2 = bi(wT(e22)); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value, o2 = jT(e22.state, i2.from, i2.to); o2 && n2.push(kT.of(o2), CT(e22, o2, false)); } } catch (e23) { r2.e(e23); } finally { r2.f(); } return n2.length && e22.dispatch({ effects: n2 }), n2.length > 0; } }, { key: "Ctrl-Alt-[", run: function(e22) { for (var t2 = e22.state, n2 = [], r2 = 0; r2 < t2.doc.length; ) { var i2 = e22.lineBlockAt(r2), o2 = gT(t2, i2.from, i2.to); o2 && n2.push(bT.of(o2)), r2 = (o2 ? e22.lineBlockAt(o2.to) : i2).to + 1; } return n2.length && e22.dispatch({ effects: ST(e22.state, n2) }), !!n2.length; } }, { key: "Ctrl-Alt-]", run: function(e22) { var t2 = e22.state.field(xT, false); if (!t2 || !t2.size) return false; var n2 = []; return t2.between(0, e22.state.doc.length, function(e23, t3) { n2.push(kT.of({ from: e23, to: t3 })); }), e22.dispatch({ effects: n2 }), true; } }], $T = { placeholderDOM: null, placeholderText: "\u2026" }, OT = AC.define({ combine: function(e22) { return g_(e22, $T); } }); function AT(e22) { var t2 = [xT, TT]; return e22 && t2.push(OT.of(e22)), t2; } var MT = X$.replace({ widget: new (function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2() { return Ri(this, n2), t2.apply(this, arguments); } return zi(n2, [{ key: "toDOM", value: function(e23) { var t3 = e23.state, n3 = t3.facet(OT), r2 = function(t4) { var n4 = e23.lineBlockAt(e23.posAtDOM(t4.target)), r3 = jT(e23.state, n4.from, n4.to); r3 && e23.dispatch({ effects: kT.of(r3) }), t4.preventDefault(); }; if (n3.placeholderDOM) return n3.placeholderDOM(e23, r2); var i2 = document.createElement("span"); return i2.textContent = n3.placeholderText, i2.setAttribute("aria-label", t3.phrase("folded code")), i2.title = t3.phrase("unfold"), i2.className = "cm-foldPlaceholder", i2.onclick = r2, i2; } }]), n2; }())() }), ET = { openText: "\u2304", closedText: "\u203A", markerDOM: null, domEventHandlers: {}, foldingChanged: function() { return false; } }, PT = function(e22) { _i(n2, JE); var t2 = Oi(n2); function n2(e23, r2) { var i2; return Ri(this, n2), (i2 = t2.call(this)).config = e23, i2.open = r2, i2; } return zi(n2, [{ key: "eq", value: function(e23) { return this.config == e23.config && this.open == e23.open; } }, { key: "toDOM", value: function(e23) { if (this.config.markerDOM) return this.config.markerDOM(this.open); var t3 = document.createElement("span"); return t3.textContent = this.open ? this.config.openText : this.config.closedText, t3.title = e23.state.phrase(this.open ? "Fold line" : "Unfold line"), t3; } }]), n2; }(); function NT() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t2 = Object.assign(Object.assign({}, ET), e22), n2 = new PT(t2, true), r2 = new PT(t2, false), i2 = jO.fromClass(function() { function e23(t3) { Ri(this, e23), this.from = t3.viewport.from, this.markers = this.buildMarkers(t3); } return zi(e23, [{ key: "update", value: function(e24) { (e24.docChanged || e24.viewportChanged || e24.startState.facet(eT) != e24.state.facet(eT) || e24.startState.field(xT, false) != e24.state.field(xT, false) || WN(e24.startState) != WN(e24.state) || t2.foldingChanged(e24)) && (this.markers = this.buildMarkers(e24.view)); } }, { key: "buildMarkers", value: function(e24) { var t3, i3 = new S_(), o3 = bi(e24.viewportLineBlocks); try { for (o3.s(); !(t3 = o3.n()).done; ) { var a2 = t3.value, s2 = jT(e24.state, a2.from, a2.to) ? r2 : gT(e24.state, a2.from, a2.to) ? n2 : null; s2 && i3.add(a2.from, a2.from, s2); } } catch (e25) { o3.e(e25); } finally { o3.f(); } return i3.finish(); } }]), e23; }()), o2 = t2.domEventHandlers; return [i2, QE({ class: "cm-foldGutter", markers: function(e23) { var t3; return ((t3 = e23.plugin(i2)) === null || t3 === void 0 ? void 0 : t3.markers) || x_.empty; }, initialSpacer: function() { return new PT(t2, false); }, domEventHandlers: Object.assign(Object.assign({}, o2), { click: function(e23, t3, n3) { if (o2.click && o2.click(e23, t3, n3)) return true; var r3 = jT(e23.state, t3.from, t3.to); if (r3) return e23.dispatch({ effects: kT.of(r3) }), true; var i3 = gT(e23.state, t3.from, t3.to); return !!i3 && (e23.dispatch({ effects: bT.of(i3) }), true); } }) }), AT()]; } var TT = PM.baseTheme({ ".cm-foldPlaceholder": { backgroundColor: "#eee", border: "1px solid #ddd", color: "#888", borderRadius: ".2em", margin: "0 1px", padding: "0 1px", cursor: "pointer" }, ".cm-foldGutter span": { padding: "0 1px", cursor: "pointer" } }), IT = function() { function e22(t2, n2) { var r2; function i2(e23) { var t3 = B_.newName(); return (r2 || (r2 = /* @__PURE__ */ Object.create(null)))["." + t3] = e23, t3; } Ri(this, e22); var o2 = typeof n2.all == "string" ? n2.all : n2.all ? i2(n2.all) : void 0, a2 = n2.scope; this.scope = a2 instanceof FN ? function(e23) { return e23.prop(qN) == a2.data; } : a2 ? function(e23) { return e23 == a2; } : void 0, this.style = kN(t2.map(function(e23) { return { tag: e23.tag, class: e23.class || i2(Object.assign({}, e23, { tag: null })) }; }), { all: o2 }).style, this.module = r2 ? new B_(r2) : null, this.themeType = n2.themeType; } return zi(e22, null, [{ key: "define", value: function(t2, n2) { return new e22(t2, n2 || {}); } }]), e22; }(), RT = AC.define(), DT = AC.define({ combine: function(e22) { return e22.length ? [e22[0]] : null; } }); function zT(e22) { var t2 = e22.facet(RT); return t2.length ? t2 : e22.facet(DT); } function LT(e22, t2) { var n2, r2 = [qT]; return e22 instanceof IT && (e22.module && r2.push(PM.styleModule.of(e22.module)), n2 = e22.themeType), (t2 == null ? void 0 : t2.fallback) ? r2.push(DT.of(e22)) : n2 ? r2.push(RT.computeN([PM.darkTheme], function(t3) { return t3.facet(PM.darkTheme) == (n2 == "dark") ? [e22] : []; })) : r2.push(RT.of(e22)), r2; } var BT = function() { function e22(t2) { Ri(this, e22), this.markCache = /* @__PURE__ */ Object.create(null), this.tree = WN(t2.state), this.decorations = this.buildDeco(t2, zT(t2.state)); } return zi(e22, [{ key: "update", value: function(e23) { var t2 = WN(e23.state), n2 = zT(e23.state), r2 = n2 != zT(e23.startState); t2.length < e23.view.viewport.to && !r2 && t2.type == this.tree.type ? this.decorations = this.decorations.map(e23.changes) : (t2 != this.tree || e23.viewportChanged || r2) && (this.tree = t2, this.decorations = this.buildDeco(e23.view, n2)); } }, { key: "buildDeco", value: function(e23, t2) { var n2 = this; if (!t2 || !this.tree.length) return X$.none; var r2, i2 = new S_(), o2 = bi(e23.visibleRanges); try { for (o2.s(); !(r2 = o2.n()).done; ) { var a2 = r2.value, s2 = a2.from, u2 = a2.to; xN(this.tree, t2, function(e24, t3, r3) { i2.add(e24, t3, n2.markCache[r3] || (n2.markCache[r3] = X$.mark({ class: r3 }))); }, s2, u2); } } catch (e24) { o2.e(e24); } finally { o2.f(); } return i2.finish(); } }]), e22; }(), qT = qC.high(jO.fromClass(BT, { decorations: function(e22) { return e22.decorations; } })), FT = IT.define([{ tag: BN.meta, color: "#7a757a" }, { tag: BN.link, textDecoration: "underline" }, { tag: BN.heading, textDecoration: "underline", fontWeight: "bold" }, { tag: BN.emphasis, fontStyle: "italic" }, { tag: BN.strong, fontWeight: "bold" }, { tag: BN.strikethrough, textDecoration: "line-through" }, { tag: BN.keyword, color: "#708" }, { tag: [BN.atom, BN.bool, BN.url, BN.contentSeparator, BN.labelName], color: "#219" }, { tag: [BN.literal, BN.inserted], color: "#164" }, { tag: [BN.string, BN.deleted], color: "#a11" }, { tag: [BN.regexp, BN.escape, BN.special(BN.string)], color: "#e40" }, { tag: BN.definition(BN.variableName), color: "#00f" }, { tag: BN.local(BN.variableName), color: "#30a" }, { tag: [BN.typeName, BN.namespace], color: "#085" }, { tag: BN.className, color: "#167" }, { tag: [BN.special(BN.variableName), BN.macroName], color: "#256" }, { tag: BN.definition(BN.propertyName), color: "#00c" }, { tag: BN.comment, color: "#940" }, { tag: BN.invalid, color: "#f00" }]), VT = PM.baseTheme({ "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" }, "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" } }), HT = AC.define({ combine: function(e22) { return g_(e22, { afterCursor: true, brackets: "()[]{}", maxScanDistance: 1e4, renderMatch: UT }); } }), WT = X$.mark({ class: "cm-matchingBracket" }), JT = X$.mark({ class: "cm-nonmatchingBracket" }); function UT(e22) { var t2 = [], n2 = e22.matched ? WT : JT; return t2.push(n2.range(e22.start.from, e22.start.to)), e22.end && t2.push(n2.range(e22.end.from, e22.end.to)), t2; } var KT = [IC.define({ create: function() { return X$.none; }, update: function(e22, t2) { if (!t2.docChanged && !t2.selection) return e22; var n2, r2 = [], i2 = t2.state.facet(HT), o2 = bi(t2.state.selection.ranges); try { for (o2.s(); !(n2 = o2.n()).done; ) { var a2 = n2.value; if (a2.empty) { var s2 = YT(t2.state, a2.head, -1, i2) || a2.head > 0 && YT(t2.state, a2.head - 1, 1, i2) || i2.afterCursor && (YT(t2.state, a2.head, 1, i2) || a2.head < t2.state.doc.length && YT(t2.state, a2.head + 1, -1, i2)); s2 && (r2 = r2.concat(i2.renderMatch(s2, t2.state))); } } } catch (e23) { o2.e(e23); } finally { o2.f(); } return X$.set(r2, true); }, provide: function(e22) { return PM.decorations.from(e22); } }), VT]; function GT() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [HT.of(e22), KT]; } function QT(e22, t2, n2) { var r2 = e22.prop(t2 < 0 ? mP.openedBy : mP.closedBy); if (r2) return r2; if (e22.name.length == 1) { var i2 = n2.indexOf(e22.name); if (i2 > -1 && i2 % 2 == (t2 < 0 ? 1 : 0)) return [n2[i2 + t2]]; } return null; } function YT(e22, t2, n2) { for (var r2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i2 = r2.maxScanDistance || 1e4, o2 = r2.brackets || "()[]{}", a2 = WN(e22), s2 = a2.resolveInner(t2, n2), u2 = s2; u2; u2 = u2.parent) { var c2 = QT(u2.type, n2, o2); if (c2 && u2.from < u2.to) return ZT(e22, t2, n2, u2, c2, o2); } return XT(e22, t2, n2, a2, s2.type, i2, o2); } function ZT(e22, t2, n2, r2, i2, o2) { var a2 = r2.parent, s2 = { from: r2.from, to: r2.to }, u2 = 0, c2 = a2 == null ? void 0 : a2.cursor(); if (c2 && (n2 < 0 ? c2.childBefore(r2.from) : c2.childAfter(r2.to))) do { if (n2 < 0 ? c2.to <= r2.from : c2.from >= r2.to) { if (u2 == 0 && i2.indexOf(c2.type.name) > -1 && c2.from < c2.to) return { start: s2, end: { from: c2.from, to: c2.to }, matched: true }; if (QT(c2.type, n2, o2)) u2++; else if (QT(c2.type, -n2, o2) && --u2 == 0) return { start: s2, end: c2.from == c2.to ? void 0 : { from: c2.from, to: c2.to }, matched: false }; } } while (n2 < 0 ? c2.prevSibling() : c2.nextSibling()); return { start: s2, matched: false }; } function XT(e22, t2, n2, r2, i2, o2, a2) { var s2 = n2 < 0 ? e22.sliceDoc(t2 - 1, t2) : e22.sliceDoc(t2, t2 + 1), u2 = a2.indexOf(s2); if (u2 < 0 || u2 % 2 == 0 != n2 > 0) return null; for (var c2 = { from: n2 < 0 ? t2 - 1 : t2, to: n2 > 0 ? t2 + 1 : t2 }, l2 = e22.doc.iterRange(t2, n2 > 0 ? e22.doc.length : 0), f2 = 0, h2 = 0; !l2.next().done && h2 <= o2; ) { var d2 = l2.value; n2 < 0 && (h2 += d2.length); for (var v2 = t2 + h2 * n2, p2 = n2 > 0 ? 0 : d2.length - 1, m2 = n2 > 0 ? d2.length : -1; p2 != m2; p2 += n2) { var g2 = a2.indexOf(d2[p2]); if (!(g2 < 0 || r2.resolveInner(v2 + p2, 1).type != i2)) if (g2 % 2 == 0 == n2 > 0) f2++; else { if (f2 == 1) return { start: c2, end: { from: v2 + p2, to: v2 + p2 + 1 }, matched: g2 >> 1 == u2 >> 1 }; f2--; } } n2 > 0 && (h2 += d2.length); } return l2.done ? { start: c2, matched: false } : null; } for (var eI = /* @__PURE__ */ Object.create(null), tI = [yP.none], nI = [], rI = /* @__PURE__ */ Object.create(null), iI = 0, oI = [["variable", "variableName"], ["variable-2", "variableName.special"], ["string-2", "string.special"], ["def", "variableName.definition"], ["tag", "tagName"], ["attribute", "attributeName"], ["type", "typeName"], ["builtin", "variableName.standard"], ["qualifier", "modifier"], ["error", "invalid"], ["header", "heading"], ["property", "propertyName"]]; iI < oI.length; iI++) { var aI = ki(oI[iI], 2), sI = aI[0], uI = aI[1]; rI[sI] = lI(eI, uI); } function cI(e22, t2) { nI.indexOf(e22) > -1 || (nI.push(e22), console.warn(t2)); } function lI(e22, t2) { var n2, r2 = null, i2 = bi(t2.split(".")); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value, a2 = e22[o2] || BN[o2]; a2 ? typeof a2 == "function" ? r2 ? r2 = a2(r2) : cI(o2, "Modifier ".concat(o2, " used at start of tag")) : r2 ? cI(o2, "Tag ".concat(o2, " used as modifier")) : r2 = a2 : cI(o2, "Unknown highlighting tag ".concat(o2)); } } catch (e23) { i2.e(e23); } finally { i2.f(); } if (!r2) return 0; var s2 = t2.replace(/ /g, "_"), u2 = yP.define({ id: tI.length, name: s2, props: [gN(ji({}, s2, r2))] }); return tI.push(u2), u2.id; } var fI = 0, hI = function() { function e22() { var t2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Ri(this, e22), this.id = fI++, this.perNode = !!t2.perNode, this.deserialize = t2.deserialize || function() { throw new Error("This node type doesn't define a deserialize function"); }; } return zi(e22, [{ key: "add", value: function(e23) { var t2 = this; if (this.perNode) throw new RangeError("Can't add per-node props to node types"); return typeof e23 != "function" && (e23 = vI.match(e23)), function(n2) { var r2 = e23(n2); return r2 === void 0 ? null : [t2, r2]; }; } }]), e22; }(); hI.closedBy = new hI({ deserialize: function(e22) { return e22.split(" "); } }), hI.openedBy = new hI({ deserialize: function(e22) { return e22.split(" "); } }), hI.group = new hI({ deserialize: function(e22) { return e22.split(" "); } }), hI.contextHash = new hI({ perNode: true }), hI.lookAhead = new hI({ perNode: true }), hI.mounted = new hI({ perNode: true }); var dI = /* @__PURE__ */ Object.create(null), vI = function() { function e22(t2, n2, r2) { var i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; Ri(this, e22), this.name = t2, this.props = n2, this.id = r2, this.flags = i2; } return zi(e22, [{ key: "prop", value: function(e23) { return this.props[e23.id]; } }, { key: "isTop", get: function() { return (1 & this.flags) > 0; } }, { key: "isSkipped", get: function() { return (2 & this.flags) > 0; } }, { key: "isError", get: function() { return (4 & this.flags) > 0; } }, { key: "isAnonymous", get: function() { return (8 & this.flags) > 0; } }, { key: "is", value: function(e23) { if (typeof e23 == "string") { if (this.name == e23) return true; var t2 = this.prop(hI.group); return !!t2 && t2.indexOf(e23) > -1; } return this.id == e23; } }], [{ key: "define", value: function(t2) { var n2 = t2.props && t2.props.length ? /* @__PURE__ */ Object.create(null) : dI, r2 = (t2.top ? 1 : 0) | (t2.skipped ? 2 : 0) | (t2.error ? 4 : 0) | (t2.name == null ? 8 : 0), i2 = new e22(t2.name || "", n2, t2.id, r2); if (t2.props) { var o2, a2 = bi(t2.props); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (Array.isArray(s2) || (s2 = s2(i2)), s2) { if (s2[0].perNode) throw new RangeError("Can't store a per-node prop on a node type"); n2[s2[0].id] = s2[1]; } } } catch (e23) { a2.e(e23); } finally { a2.f(); } } return i2; } }, { key: "match", value: function(e23) { var t2 = /* @__PURE__ */ Object.create(null); for (var n2 in e23) { var r2, i2 = bi(n2.split(" ")); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; t2[o2] = e23[n2]; } } catch (e24) { i2.e(e24); } finally { i2.f(); } } return function(e24) { for (var n3 = e24.prop(hI.group), r3 = -1; r3 < (n3 ? n3.length : 0); r3++) { var i3 = t2[r3 < 0 ? e24.name : n3[r3]]; if (i3) return i3; } }; } }]), e22; }(); vI.none = new vI("", /* @__PURE__ */ Object.create(null), 0, 8); var pI, mI = /* @__PURE__ */ new WeakMap(), gI = /* @__PURE__ */ new WeakMap(); !function(e22) { e22[e22.ExcludeBuffers = 1] = "ExcludeBuffers", e22[e22.IncludeAnonymous = 2] = "IncludeAnonymous", e22[e22.IgnoreMounts = 4] = "IgnoreMounts", e22[e22.IgnoreOverlays = 8] = "IgnoreOverlays"; }(pI || (pI = {})); var yI = function() { function e22(t2, n2, r2, i2, o2) { if (Ri(this, e22), this.type = t2, this.children = n2, this.positions = r2, this.length = i2, this.props = null, o2 && o2.length) { this.props = /* @__PURE__ */ Object.create(null); var a2, s2 = bi(o2); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = ki(a2.value, 2), c2 = u2[0], l2 = u2[1]; this.props[typeof c2 == "number" ? c2 : c2.id] = l2; } } catch (e23) { s2.e(e23); } finally { s2.f(); } } } return zi(e22, [{ key: "toString", value: function() { var e23 = this.prop(hI.mounted); if (e23 && !e23.overlay) return e23.tree.toString(); var t2, n2 = "", r2 = bi(this.children); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value.toString(); i2 && (n2 && (n2 += ","), n2 += i2); } } catch (e24) { r2.e(e24); } finally { r2.f(); } return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n2.length ? "(" + n2 + ")" : "") : n2; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new AI(this.topNode, e23); } }, { key: "cursorAt", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = mI.get(this) || this.topNode, r2 = new AI(n2); return r2.moveTo(e23, t2), mI.set(this, r2._tree), r2; } }, { key: "topNode", get: function() { return new SI(this, 0, 0, null); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = jI(mI.get(this) || this.topNode, e23, t2, false); return mI.set(this, n2), n2; } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = jI(gI.get(this) || this.topNode, e23, t2, true); return gI.set(this, n2), n2; } }, { key: "iterate", value: function(e23) { for (var t2 = e23.enter, n2 = e23.leave, r2 = e23.from, i2 = r2 === void 0 ? 0 : r2, o2 = e23.to, a2 = o2 === void 0 ? this.length : o2, s2 = this.cursor((e23.mode || 0) | pI.IncludeAnonymous); ; ) { var u2 = false; if (s2.from <= a2 && s2.to >= i2 && (s2.type.isAnonymous || t2(s2) !== false)) { if (s2.firstChild()) continue; u2 = true; } for (; u2 && n2 && !s2.type.isAnonymous && n2(s2), !s2.nextSibling(); ) { if (!s2.parent()) return; u2 = true; } } } }, { key: "prop", value: function(e23) { return e23.perNode ? this.props ? this.props[e23.id] : void 0 : this.type.prop(e23); } }, { key: "propValues", get: function() { var e23 = []; if (this.props) for (var t2 in this.props) e23.push([+t2, this.props[t2]]); return e23; } }, { key: "balance", value: function() { var t2 = this, n2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return this.children.length <= 8 ? this : TI(vI.none, this.children, this.positions, 0, this.children.length, 0, this.length, function(n3, r2, i2) { return new e22(t2.type, n3, r2, i2, t2.propValues); }, n2.makeTree || function(t3, n3, r2) { return new e22(vI.none, t3, n3, r2); }); } }], [{ key: "build", value: function(e23) { return EI(e23); } }]), e22; }(); yI.empty = new yI(vI.none, [], [], 0); var bI = function() { function e22(t2, n2) { Ri(this, e22), this.buffer = t2, this.index = n2; } return zi(e22, [{ key: "id", get: function() { return this.buffer[this.index - 4]; } }, { key: "start", get: function() { return this.buffer[this.index - 3]; } }, { key: "end", get: function() { return this.buffer[this.index - 2]; } }, { key: "size", get: function() { return this.buffer[this.index - 1]; } }, { key: "pos", get: function() { return this.index; } }, { key: "next", value: function() { this.index -= 4; } }, { key: "fork", value: function() { return new e22(this.buffer, this.index); } }]), e22; }(), kI = function() { function e22(t2, n2, r2) { Ri(this, e22), this.buffer = t2, this.length = n2, this.set = r2; } return zi(e22, [{ key: "type", get: function() { return vI.none; } }, { key: "toString", value: function() { for (var e23 = [], t2 = 0; t2 < this.buffer.length; ) e23.push(this.childString(t2)), t2 = this.buffer[t2 + 3]; return e23.join(","); } }, { key: "childString", value: function(e23) { var t2 = this.buffer[e23], n2 = this.buffer[e23 + 3], r2 = this.set.types[t2], i2 = r2.name; if (/\W/.test(i2) && !r2.isError && (i2 = JSON.stringify(i2)), n2 == (e23 += 4)) return i2; for (var o2 = []; e23 < n2; ) o2.push(this.childString(e23)), e23 = this.buffer[e23 + 3]; return i2 + "(" + o2.join(",") + ")"; } }, { key: "findChild", value: function(e23, t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = -1, s2 = e23; s2 != t2 && !(wI(i2, r2, o2[s2 + 1], o2[s2 + 2]) && (a2 = s2, n2 > 0)); s2 = o2[s2 + 3]) ; return a2; } }, { key: "slice", value: function(t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = new Uint16Array(n2 - t2), s2 = t2, u2 = 0; s2 < n2; ) a2[u2++] = o2[s2++], a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - t2; return new e22(a2, i2 - r2, this.set); } }]), e22; }(); function wI(e22, t2, n2, r2) { switch (e22) { case -2: return n2 < t2; case -1: return r2 >= t2 && n2 < t2; case 0: return n2 < t2 && r2 > t2; case 1: return n2 <= t2 && r2 > t2; case 2: return r2 > t2; case 4: return true; } } function xI(e22, t2) { for (var n2 = e22.childBefore(t2); n2; ) { var r2 = n2.lastChild; if (!r2 || r2.to != n2.to) break; r2.type.isError && r2.from == r2.to ? (e22 = n2, n2 = r2.prevSibling) : n2 = r2; } return e22; } function jI(e22, t2, n2, r2) { for (var i2; e22.from == e22.to || (n2 < 1 ? e22.from >= t2 : e22.from > t2) || (n2 > -1 ? e22.to <= t2 : e22.to < t2); ) { var o2 = !r2 && e22 instanceof SI && e22.index < 0 ? null : e22.parent; if (!o2) return e22; e22 = o2; } var a2 = r2 ? 0 : pI.IgnoreOverlays; if (r2) for (var s2 = e22, u2 = s2.parent; u2; u2 = (s2 = u2).parent) s2 instanceof SI && s2.index < 0 && ((i2 = u2.enter(t2, n2, a2)) === null || i2 === void 0 ? void 0 : i2.from) != s2.from && (e22 = u2); for (; ; ) { var c2 = e22.enter(t2, n2, a2); if (!c2) return e22; e22 = c2; } } var SI = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this._tree = t2, this.from = n2, this.index = r2, this._parent = i2; } return zi(e22, [{ key: "type", get: function() { return this._tree.type; } }, { key: "name", get: function() { return this._tree.type.name; } }, { key: "to", get: function() { return this.from + this._tree.length; } }, { key: "nextChild", value: function(t2, n2, r2, i2) { for (var o2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, a2 = this; ; ) { for (var s2 = a2._tree, u2 = s2.children, c2 = s2.positions, l2 = n2 > 0 ? u2.length : -1; t2 != l2; t2 += n2) { var f2 = u2[t2], h2 = c2[t2] + a2.from; if (wI(i2, r2, h2, h2 + f2.length)) { if (f2 instanceof kI) { if (o2 & pI.ExcludeBuffers) continue; var d2 = f2.findChild(0, f2.buffer.length, n2, r2 - h2, i2); if (d2 > -1) return new OI(new $I(a2, f2, t2, h2), null, d2); } else if (o2 & pI.IncludeAnonymous || !f2.type.isAnonymous || MI(f2)) { var v2 = void 0; if (!(o2 & pI.IgnoreMounts) && f2.props && (v2 = f2.prop(hI.mounted)) && !v2.overlay) return new e22(v2.tree, h2, t2, a2); var p2 = new e22(f2, h2, t2, a2); return o2 & pI.IncludeAnonymous || !p2.type.isAnonymous ? p2 : p2.nextChild(n2 < 0 ? f2.children.length - 1 : 0, n2, r2, i2); } } } if (o2 & pI.IncludeAnonymous || !a2.type.isAnonymous) return null; if (t2 = a2.index >= 0 ? a2.index + n2 : n2 < 0 ? -1 : a2._parent._tree.children.length, !(a2 = a2._parent)) return null; } } }, { key: "firstChild", get: function() { return this.nextChild(0, 1, 0, 4); } }, { key: "lastChild", get: function() { return this.nextChild(this._tree.children.length - 1, -1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.nextChild(0, 1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.nextChild(this._tree.children.length - 1, -1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2, i2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (!(i2 & pI.IgnoreOverlays) && (r2 = this._tree.prop(hI.mounted)) && r2.overlay) { var o2, a2 = t2 - this.from, s2 = bi(r2.overlay); try { for (s2.s(); !(o2 = s2.n()).done; ) { var u2 = o2.value, c2 = u2.from, l2 = u2.to; if ((n2 > 0 ? c2 <= a2 : c2 < a2) && (n2 < 0 ? l2 >= a2 : l2 > a2)) return new e22(r2.tree, r2.overlay[0].from + this.from, -1, this); } } catch (e23) { s2.e(e23); } finally { s2.f(); } } return this.nextChild(0, 1, t2, n2, i2); } }, { key: "nextSignificantParent", value: function() { for (var e23 = this; e23.type.isAnonymous && e23._parent; ) e23 = e23._parent; return e23; } }, { key: "parent", get: function() { return this._parent ? this._parent.nextSignificantParent() : null; } }, { key: "nextSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4) : null; } }, { key: "prevSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4) : null; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new AI(this, e23); } }, { key: "tree", get: function() { return this._tree; } }, { key: "toTree", value: function() { return this._tree; } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return jI(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return jI(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return xI(this, e23); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = CI(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return CI(this, e23, t2, n2); } }, { key: "toString", value: function() { return this._tree.toString(); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return _I(this, e23); } }]), e22; }(); function CI(e22, t2, n2, r2) { var i2 = e22.cursor(), o2 = []; if (!i2.firstChild()) return o2; if (n2 != null) { for (; !i2.type.is(n2); ) if (!i2.nextSibling()) return o2; } for (; ; ) { if (r2 != null && i2.type.is(r2)) return o2; if (i2.type.is(t2) && o2.push(i2.node), !i2.nextSibling()) return r2 == null ? o2 : []; } } function _I(e22, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t2.length - 1, r2 = e22.parent; n2 >= 0; r2 = r2.parent) { if (!r2) return false; if (!r2.type.isAnonymous) { if (t2[n2] && t2[n2] != r2.name) return false; n2--; } } return true; } var $I = zi(function e10(t2, n2, r2, i2) { Ri(this, e10), this.parent = t2, this.buffer = n2, this.index = r2, this.start = i2; }), OI = function() { function e22(t2, n2, r2) { Ri(this, e22), this.context = t2, this._parent = n2, this.index = r2, this.type = t2.buffer.set.types[t2.buffer.buffer[r2]]; } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "from", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 1]; } }, { key: "to", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 2]; } }, { key: "child", value: function(t2, n2, r2) { var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], t2, n2 - this.context.start, r2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "firstChild", get: function() { return this.child(1, 0, 4); } }, { key: "lastChild", get: function() { return this.child(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.child(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.child(-1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (r2 & pI.ExcludeBuffers) return null; var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], n2 > 0 ? 1 : -1, t2 - this.context.start, n2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "parent", get: function() { return this._parent || this.context.parent.nextSignificantParent(); } }, { key: "externalSibling", value: function(e23) { return this._parent ? null : this.context.parent.nextChild(this.context.index + e23, e23, 0, 4); } }, { key: "nextSibling", get: function() { var t2 = this.context.buffer, n2 = t2.buffer[this.index + 3]; return n2 < (this._parent ? t2.buffer[this._parent.index + 3] : t2.buffer.length) ? new e22(this.context, this._parent, n2) : this.externalSibling(1); } }, { key: "prevSibling", get: function() { var t2 = this.context.buffer, n2 = this._parent ? this._parent.index + 4 : 0; return this.index == n2 ? this.externalSibling(-1) : new e22(this.context, this._parent, t2.findChild(n2, this.index, -1, 0, 4)); } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new AI(this, e23); } }, { key: "tree", get: function() { return null; } }, { key: "toTree", value: function() { var e23 = [], t2 = [], n2 = this.context.buffer, r2 = this.index + 4, i2 = n2.buffer[this.index + 3]; if (i2 > r2) { var o2 = n2.buffer[this.index + 1], a2 = n2.buffer[this.index + 2]; e23.push(n2.slice(r2, i2, o2, a2)), t2.push(0); } return new yI(this.type, e23, t2, this.to - this.from); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return jI(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return jI(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return xI(this, e23); } }, { key: "toString", value: function() { return this.context.buffer.childString(this.index); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = CI(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return CI(this, e23, t2, n2); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return _I(this, e23); } }]), e22; }(), AI = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (Ri(this, e22), this.mode = n2, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, t2 instanceof SI) this.yieldNode(t2); else { this._tree = t2.context.parent, this.buffer = t2.context; for (var r2 = t2._parent; r2; r2 = r2._parent) this.stack.unshift(r2.index); this.bufferNode = t2, this.yieldBuf(t2.index); } } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "yieldNode", value: function(e23) { return !!e23 && (this._tree = e23, this.type = e23.type, this.from = e23.from, this.to = e23.to, true); } }, { key: "yieldBuf", value: function(e23, t2) { this.index = e23; var n2 = this.buffer, r2 = n2.start, i2 = n2.buffer; return this.type = t2 || i2.set.types[i2.buffer[e23]], this.from = r2 + i2.buffer[e23 + 1], this.to = r2 + i2.buffer[e23 + 2], true; } }, { key: "yield", value: function(e23) { return !!e23 && (e23 instanceof SI ? (this.buffer = null, this.yieldNode(e23)) : (this.buffer = e23.context, this.yieldBuf(e23.index, e23.type))); } }, { key: "toString", value: function() { return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString(); } }, { key: "enterChild", value: function(e23, t2, n2) { if (!this.buffer) return this.yield(this._tree.nextChild(e23 < 0 ? this._tree._tree.children.length - 1 : 0, e23, t2, n2, this.mode)); var r2 = this.buffer.buffer, i2 = r2.findChild(this.index + 4, r2.buffer[this.index + 3], e23, t2 - this.buffer.start, n2); return !(i2 < 0) && (this.stack.push(this.index), this.yieldBuf(i2)); } }, { key: "firstChild", value: function() { return this.enterChild(1, 0, 4); } }, { key: "lastChild", value: function() { return this.enterChild(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.enterChild(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.enterChild(-1, e23, -2); } }, { key: "enter", value: function(e23, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.mode; return this.buffer ? !(n2 & pI.ExcludeBuffers) && this.enterChild(1, e23, t2) : this.yield(this._tree.enter(e23, t2, n2)); } }, { key: "parent", value: function() { if (!this.buffer) return this.yieldNode(this.mode & pI.IncludeAnonymous ? this._tree._parent : this._tree.parent); if (this.stack.length) return this.yieldBuf(this.stack.pop()); var e23 = this.mode & pI.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); return this.buffer = null, this.yieldNode(e23); } }, { key: "sibling", value: function(e23) { if (!this.buffer) return !!this._tree._parent && this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e23, e23, 0, 4, this.mode)); var t2 = this.buffer.buffer, n2 = this.stack.length - 1; if (e23 < 0) { var r2 = n2 < 0 ? 0 : this.stack[n2] + 4; if (this.index != r2) return this.yieldBuf(t2.findChild(r2, this.index, -1, 0, 4)); } else { var i2 = t2.buffer[this.index + 3]; if (i2 < (n2 < 0 ? t2.buffer.length : t2.buffer[this.stack[n2] + 3])) return this.yieldBuf(i2); } return n2 < 0 && this.yield(this.buffer.parent.nextChild(this.buffer.index + e23, e23, 0, 4, this.mode)); } }, { key: "nextSibling", value: function() { return this.sibling(1); } }, { key: "prevSibling", value: function() { return this.sibling(-1); } }, { key: "atLastNode", value: function(e23) { var t2, n2, r2 = this.buffer; if (r2) { if (e23 > 0) { if (this.index < r2.buffer.buffer.length) return false; } else for (var i2 = 0; i2 < this.index; i2++) if (r2.buffer.buffer[i2 + 3] < this.index) return false; t2 = r2.index, n2 = r2.parent; } else { var o2 = this._tree; t2 = o2.index, n2 = o2._parent; } for (; n2; t2 = (a2 = n2).index, n2 = a2._parent, a2) { var a2; if (t2 > -1) for (var s2 = t2 + e23, u2 = e23 < 0 ? -1 : n2._tree.children.length; s2 != u2; s2 += e23) { var c2 = n2._tree.children[s2]; if (this.mode & pI.IncludeAnonymous || c2 instanceof kI || !c2.type.isAnonymous || MI(c2)) return false; } } return true; } }, { key: "move", value: function(e23, t2) { if (t2 && this.enterChild(e23, 0, 4)) return true; for (; ; ) { if (this.sibling(e23)) return true; if (this.atLastNode(e23) || !this.parent()) return false; } } }, { key: "next", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(1, e23); } }, { key: "prev", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(-1, e23); } }, { key: "moveTo", value: function(e23) { for (var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; (this.from == this.to || (t2 < 1 ? this.from >= e23 : this.from > e23) || (t2 > -1 ? this.to <= e23 : this.to < e23)) && this.parent(); ) ; for (; this.enterChild(1, e23, t2); ) ; return this; } }, { key: "node", get: function() { if (!this.buffer) return this._tree; var e23 = this.bufferNode, t2 = null, n2 = 0; if (e23 && e23.context == this.buffer) e: for (var r2 = this.index, i2 = this.stack.length; i2 >= 0; ) { for (var o2 = e23; o2; o2 = o2._parent) if (o2.index == r2) { if (r2 == this.index) return o2; t2 = o2, n2 = i2 + 1; break e; } r2 = this.stack[--i2]; } for (var a2 = n2; a2 < this.stack.length; a2++) t2 = new OI(this.buffer, t2, this.stack[a2]); return this.bufferNode = new OI(this.buffer, t2, this.index); } }, { key: "tree", get: function() { return this.buffer ? null : this._tree._tree; } }, { key: "iterate", value: function(e23, t2) { for (var n2 = 0; ; ) { var r2 = false; if (this.type.isAnonymous || e23(this) !== false) { if (this.firstChild()) { n2++; continue; } this.type.isAnonymous || (r2 = true); } for (; r2 && t2 && t2(this), r2 = this.type.isAnonymous, !this.nextSibling(); ) { if (!n2) return; this.parent(), n2--, r2 = true; } } } }, { key: "matchContext", value: function(e23) { if (!this.buffer) return _I(this.node, e23); for (var t2 = this.buffer.buffer, n2 = t2.set.types, r2 = e23.length - 1, i2 = this.stack.length - 1; r2 >= 0; i2--) { if (i2 < 0) return _I(this.node, e23, r2); var o2 = n2[t2.buffer[this.stack[i2]]]; if (!o2.isAnonymous) { if (e23[r2] && e23[r2] != o2.name) return false; r2--; } } return true; } }]), e22; }(); function MI(e22) { return e22.children.some(function(e23) { return e23 instanceof kI || !e23.type.isAnonymous || MI(e23); }); } function EI(e22) { var t2, n2 = e22.buffer, r2 = e22.nodeSet, i2 = e22.maxBufferLength, o2 = i2 === void 0 ? 1024 : i2, a2 = e22.reused, s2 = a2 === void 0 ? [] : a2, u2 = e22.minRepeatType, c2 = u2 === void 0 ? r2.types.length : u2, l2 = Array.isArray(n2) ? new bI(n2, n2.length) : n2, f2 = r2.types, h2 = 0, d2 = 0; function v2(e23, t3, n3, i3, a3) { for (var u3 = l2.id, y3 = l2.start, b3 = l2.end, k3 = l2.size, w2 = d2; k3 < 0; ) { if (l2.next(), k3 == -1) { var x2 = s2[u3]; return n3.push(x2), void i3.push(y3 - e23); } if (k3 == -3) return void (h2 = u3); if (k3 == -4) return void (d2 = u3); throw new RangeError("Unrecognized record size: ".concat(k3)); } var j2, S2, C2 = f2[u3], _2 = y3 - e23; if (b3 - y3 <= o2 && (S2 = function(e24, t4) { var n4 = l2.fork(), r3 = 0, i4 = 0, a4 = 0, s3 = n4.end - o2, u4 = { size: 0, start: 0, skip: 0 }; e: for (var f3 = n4.pos - e24; n4.pos > f3; ) { var h3 = n4.size; if (n4.id == t4 && h3 >= 0) u4.size = r3, u4.start = i4, u4.skip = a4, a4 += 4, r3 += 4, n4.next(); else { var d3 = n4.pos - h3; if (h3 < 0 || d3 < f3 || n4.start < s3) break; var v3 = n4.id >= c2 ? 4 : 0, p3 = n4.start; for (n4.next(); n4.pos > d3; ) { if (n4.size < 0) { if (n4.size != -3) break e; v3 += 4; } else n4.id >= c2 && (v3 += 4); n4.next(); } i4 = p3, r3 += h3, a4 += v3; } } (t4 < 0 || r3 == e24) && (u4.size = r3, u4.start = i4, u4.skip = a4); return u4.size > 4 ? u4 : void 0; }(l2.pos - t3, a3))) { for (var $2 = new Uint16Array(S2.size - S2.skip), O2 = l2.pos - S2.size, A2 = $2.length; l2.pos > O2; ) A2 = g2(S2.start, $2, A2); j2 = new kI($2, b3 - S2.start, r2), _2 = S2.start - e23; } else { var M2 = l2.pos - k3; l2.next(); for (var E2 = [], P2 = [], N2 = u3 >= c2 ? u3 : -1, T2 = 0, I2 = b3; l2.pos > M2; ) N2 >= 0 && l2.id == N2 && l2.size >= 0 ? (l2.end <= I2 - o2 && (p2(E2, P2, y3, T2, l2.end, I2, N2, w2), T2 = E2.length, I2 = l2.end), l2.next()) : v2(y3, M2, E2, P2, N2); if (N2 >= 0 && T2 > 0 && T2 < E2.length && p2(E2, P2, y3, T2, y3, I2, N2, w2), E2.reverse(), P2.reverse(), N2 > -1 && T2 > 0) { var R2 = function(e24) { return function(t4, n4, r3) { var i4, o3, a4 = 0, s3 = t4.length - 1; if (s3 >= 0 && (i4 = t4[s3]) instanceof yI) { if (!s3 && i4.type == e24 && i4.length == r3) return i4; (o3 = i4.prop(hI.lookAhead)) && (a4 = n4[s3] + i4.length + o3); } return m2(e24, t4, n4, r3, a4); }; }(C2); j2 = TI(C2, E2, P2, 0, E2.length, 0, b3 - y3, R2, R2); } else j2 = m2(C2, E2, P2, b3 - y3, w2 - b3); } n3.push(j2), i3.push(_2); } function p2(e23, t3, n3, i3, o3, a3, s3, u3) { for (var c3 = [], l3 = []; e23.length > i3; ) c3.push(e23.pop()), l3.push(t3.pop() + n3 - o3); e23.push(m2(r2.types[s3], c3, l3, a3 - o3, u3 - a3)), t3.push(o3 - n3); } function m2(e23, t3, n3, r3) { var i3 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, o3 = arguments.length > 5 ? arguments[5] : void 0; if (h2) { var a3 = [hI.contextHash, h2]; o3 = o3 ? [a3].concat(o3) : [a3]; } if (i3 > 25) { var s3 = [hI.lookAhead, i3]; o3 = o3 ? [s3].concat(o3) : [s3]; } return new yI(e23, t3, n3, r3, o3); } function g2(e23, t3, n3) { var r3 = l2.id, i3 = l2.start, o3 = l2.end, a3 = l2.size; if (l2.next(), a3 >= 0 && r3 < c2) { var s3 = n3; if (a3 > 4) for (var u3 = l2.pos - (a3 - 4); l2.pos > u3; ) n3 = g2(e23, t3, n3); t3[--n3] = s3, t3[--n3] = o3 - e23, t3[--n3] = i3 - e23, t3[--n3] = r3; } else a3 == -3 ? h2 = r3 : a3 == -4 && (d2 = r3); return n3; } for (var y2 = [], b2 = []; l2.pos > 0; ) v2(e22.start || 0, e22.bufferStart || 0, y2, b2, -1); var k2 = (t2 = e22.length) !== null && t2 !== void 0 ? t2 : y2.length ? b2[0] + y2[0].length : 0; return new yI(f2[e22.topID], y2.reverse(), b2.reverse(), k2); } var PI = /* @__PURE__ */ new WeakMap(); function NI(e22, t2) { if (!e22.isAnonymous || t2 instanceof kI || t2.type != e22) return 1; var n2 = PI.get(t2); if (n2 == null) { n2 = 1; var r2, i2 = bi(t2.children); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; if (o2.type != e22 || !(o2 instanceof yI)) { n2 = 1; break; } n2 += NI(e22, o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } PI.set(t2, n2); } return n2; } function TI(e22, t2, n2, r2, i2, o2, a2, s2, u2) { for (var c2 = 0, l2 = r2; l2 < i2; l2++) c2 += NI(e22, t2[l2]); var f2 = Math.ceil(1.5 * c2 / 8), h2 = [], d2 = []; return function t3(n3, r3, i3, a3, s3) { for (var c3 = i3; c3 < a3; ) { var l3 = c3, v2 = r3[c3], p2 = NI(e22, n3[c3]); for (c3++; c3 < a3; c3++) { var m2 = NI(e22, n3[c3]); if (p2 + m2 >= f2) break; p2 += m2; } if (c3 == l3 + 1) { if (p2 > f2) { var g2 = n3[l3]; t3(g2.children, g2.positions, 0, g2.children.length, r3[l3] + s3); continue; } h2.push(n3[l3]); } else { var y2 = r3[c3 - 1] + n3[c3 - 1].length - v2; h2.push(TI(e22, n3, r3, l3, c3, v2, y2, null, u2)); } d2.push(v2 + s3 - o2); } }(t2, n2, r2, i2, 0), (s2 || u2)(h2, d2, a2); } new hI({ perNode: true }); function II(e22, t2) { return function(n2) { var r2 = n2.state, i2 = n2.dispatch; if (r2.readOnly) return false; var o2 = e22(t2, r2); return !!o2 && (i2(r2.update(o2)), true); }; } var RI = II(FI, 0), DI = II(qI, 0), zI = II(function(e22, t2) { return qI(e22, t2, function(e23) { var t3, n2 = [], r2 = bi(e23.selection.ranges); try { for (r2.s(); !(t3 = r2.n()).done; ) { var i2 = t3.value, o2 = e23.doc.lineAt(i2.from), a2 = i2.to <= o2.to ? o2 : e23.doc.lineAt(i2.to), s2 = n2.length - 1; s2 >= 0 && n2[s2].to > o2.from ? n2[s2].to = a2.to : n2.push({ from: o2.from, to: a2.to }); } } catch (e24) { r2.e(e24); } finally { r2.f(); } return n2; }(t2)); }, 0); function LI(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e22.selection.main.head, n2 = e22.languageDataAt("commentTokens", t2); return n2.length ? n2[0] : {}; } function BI(e22, t2, n2, r2) { var i2, o2, a2 = t2.open, s2 = t2.close, u2 = e22.sliceDoc(n2 - 50, n2), c2 = e22.sliceDoc(r2, r2 + 50), l2 = /\s*$/.exec(u2)[0].length, f2 = /^\s*/.exec(c2)[0].length, h2 = u2.length - l2; if (u2.slice(h2 - a2.length, h2) == a2 && c2.slice(f2, f2 + s2.length) == s2) return { open: { pos: n2 - l2, margin: l2 && 1 }, close: { pos: r2 + f2, margin: f2 && 1 } }; r2 - n2 <= 100 ? i2 = o2 = e22.sliceDoc(n2, r2) : (i2 = e22.sliceDoc(n2, n2 + 50), o2 = e22.sliceDoc(r2 - 50, r2)); var d2 = /^\s*/.exec(i2)[0].length, v2 = /\s*$/.exec(o2)[0].length, p2 = o2.length - v2 - s2.length; return i2.slice(d2, d2 + a2.length) == a2 && o2.slice(p2, p2 + s2.length) == s2 ? { open: { pos: n2 + d2 + a2.length, margin: /\s/.test(i2.charAt(d2 + a2.length)) ? 1 : 0 }, close: { pos: r2 - v2 - s2.length, margin: /\s/.test(o2.charAt(p2 - 1)) ? 1 : 0 } } : null; } function qI(e22, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t2.selection.ranges, r2 = n2.map(function(e23) { return LI(t2, e23.from).block; }); if (!r2.every(function(e23) { return e23; })) return null; var i2 = n2.map(function(e23, n3) { return BI(t2, r2[n3], e23.from, e23.to); }); if (e22 != 2 && !i2.every(function(e23) { return e23; })) return { changes: t2.changes(n2.map(function(e23, t3) { return i2[t3] ? [] : [{ from: e23.from, insert: r2[t3].open + " " }, { from: e23.to, insert: " " + r2[t3].close }]; })) }; if (e22 != 1 && i2.some(function(e23) { return e23; })) { for (var o2, a2 = [], s2 = 0; s2 < i2.length; s2++) if (o2 = i2[s2]) { var u2 = r2[s2], c2 = o2, l2 = c2.open, f2 = c2.close; a2.push({ from: l2.pos - u2.open.length, to: l2.pos + l2.margin }, { from: f2.pos - f2.margin, to: f2.pos + u2.close.length }); } return { changes: a2 }; } return null; } function FI(e22, t2) { var n2, r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t2.selection.ranges, i2 = [], o2 = -1, a2 = bi(r2); try { for (a2.s(); !(n2 = a2.n()).done; ) { for (var s2 = n2.value, u2 = s2.from, c2 = s2.to, l2 = i2.length, f2 = 1e9, h2 = u2; h2 <= c2; ) { var d2 = t2.doc.lineAt(h2); if (d2.from > o2 && (u2 == c2 || c2 > d2.from)) { o2 = d2.from; var v2 = LI(t2, h2).line; if (!v2) continue; var p2 = /^\s*/.exec(d2.text)[0].length, m2 = p2 == d2.length, g2 = d2.text.slice(p2, p2 + v2.length) == v2 ? p2 : -1; p2 < d2.text.length && p2 < f2 && (f2 = p2), i2.push({ line: d2, comment: g2, token: v2, indent: p2, empty: m2, single: false }); } h2 = d2.to + 1; } if (f2 < 1e9) for (var y2 = l2; y2 < i2.length; y2++) i2[y2].indent < i2[y2].line.text.length && (i2[y2].indent = f2); i2.length == l2 + 1 && (i2[l2].single = true); } } catch (e23) { a2.e(e23); } finally { a2.f(); } if (e22 != 2 && i2.some(function(e23) { return e23.comment < 0 && (!e23.empty || e23.single); })) { var b2, k2 = [], w2 = bi(i2); try { for (w2.s(); !(b2 = w2.n()).done; ) { var x2 = b2.value, j2 = x2.line, S2 = x2.token, C2 = x2.indent, _2 = x2.empty, $2 = x2.single; !$2 && _2 || k2.push({ from: j2.from + C2, insert: S2 + " " }); } } catch (e23) { w2.e(e23); } finally { w2.f(); } var O2 = t2.changes(k2); return { changes: O2, selection: t2.selection.map(O2, 1) }; } if (e22 != 1 && i2.some(function(e23) { return e23.comment >= 0; })) { var A2, M2 = [], E2 = bi(i2); try { for (E2.s(); !(A2 = E2.n()).done; ) { var P2 = A2.value, N2 = P2.line, T2 = P2.comment, I2 = P2.token; if (T2 >= 0) { var R2 = N2.from + T2, D2 = R2 + I2.length; N2.text[D2 - N2.from] == " " && D2++, M2.push({ from: R2, to: D2 }); } } } catch (e23) { E2.e(e23); } finally { E2.f(); } return { changes: M2 }; } return null; } var VI = t_.define(), HI = t_.define(), WI = AC.define(), JI = AC.define({ combine: function(e22) { return g_(e22, { minDepth: 100, newGroupDelay: 500 }, { minDepth: Math.max, newGroupDelay: Math.min }); } }); var UI = IC.define({ create: function() { return hR.empty; }, update: function(e22, t2) { var n2, r2, i2 = t2.state.facet(JI), o2 = t2.annotation(VI); if (o2) { var a2 = t2.docChanged ? _C.single((n2 = t2.changes, r2 = 0, n2.iterChangedRanges(function(e23, t3) { return r2 = t3; }), r2)) : void 0, s2 = rR.fromTransaction(t2, a2), u2 = o2.side, c2 = u2 == 0 ? e22.undone : e22.done; return c2 = s2 ? iR(c2, c2.length, i2.minDepth, s2) : sR(c2, t2.startState.selection), new hR(u2 == 0 ? o2.rest : c2, u2 == 0 ? c2 : o2.rest); } var l2 = t2.annotation(HI); if (l2 != "full" && l2 != "before" || (e22 = e22.isolate()), t2.annotation(o_.addToHistory) === false) return t2.changes.empty ? e22 : e22.addMapping(t2.changes.desc); var f2 = rR.fromTransaction(t2), h2 = t2.annotation(o_.time), d2 = t2.annotation(o_.userEvent); return f2 ? e22 = e22.addChanges(f2, h2, d2, i2.newGroupDelay, i2.minDepth) : t2.selection && (e22 = e22.addSelection(t2.startState.selection, h2, d2, i2.newGroupDelay)), l2 != "full" && l2 != "after" || (e22 = e22.isolate()), e22; }, toJSON: function(e22) { return { done: e22.done.map(function(e23) { return e23.toJSON(); }), undone: e22.undone.map(function(e23) { return e23.toJSON(); }) }; }, fromJSON: function(e22) { return new hR(e22.done.map(rR.fromJSON), e22.undone.map(rR.fromJSON)); } }); function KI() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [UI, JI.of(e22), PM.domEventHandlers({ beforeinput: function(e23, t2) { var n2 = e23.inputType == "historyUndo" ? QI : e23.inputType == "historyRedo" ? YI : null; return !!n2 && (e23.preventDefault(), n2(t2)); } })]; } function GI(e22, t2) { return function(n2) { var r2 = n2.state, i2 = n2.dispatch; if (!t2 && r2.readOnly) return false; var o2 = r2.field(UI, false); if (!o2) return false; var a2 = o2.pop(e22, r2, t2); return !!a2 && (i2(a2), true); }; } var QI = GI(0, false), YI = GI(1, false), ZI = GI(0, true), XI = GI(1, true); function eR(e22) { return function(t2) { var n2 = t2.field(UI, false); if (!n2) return 0; var r2 = e22 == 0 ? n2.done : n2.undone; return r2.length - (r2.length && !r2[0].changes ? 1 : 0); }; } var tR = eR(0), nR = eR(1), rR = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.changes = t2, this.effects = n2, this.mapped = r2, this.startSelection = i2, this.selectionsAfter = o2; } return zi(e22, [{ key: "setSelAfter", value: function(t2) { return new e22(this.changes, this.effects, this.mapped, this.startSelection, t2); } }, { key: "toJSON", value: function() { var e23, t2, n2; return { changes: (e23 = this.changes) === null || e23 === void 0 ? void 0 : e23.toJSON(), mapped: (t2 = this.mapped) === null || t2 === void 0 ? void 0 : t2.toJSON(), startSelection: (n2 = this.startSelection) === null || n2 === void 0 ? void 0 : n2.toJSON(), selectionsAfter: this.selectionsAfter.map(function(e24) { return e24.toJSON(); }) }; } }], [{ key: "fromJSON", value: function(t2) { return new e22(t2.changes && yC.fromJSON(t2.changes), [], t2.mapped && gC.fromJSON(t2.mapped), t2.startSelection && _C.fromJSON(t2.startSelection), t2.selectionsAfter.map(_C.fromJSON)); } }, { key: "fromTransaction", value: function(t2, n2) { var r2, i2 = aR, o2 = bi(t2.startState.facet(WI)); try { for (o2.s(); !(r2 = o2.n()).done; ) { var a2 = (0, r2.value)(t2); a2.length && (i2 = i2.concat(a2)); } } catch (e23) { o2.e(e23); } finally { o2.f(); } return !i2.length && t2.changes.empty ? null : new e22(t2.changes.invert(t2.startState.doc), i2, void 0, n2 || t2.startState.selection, aR); } }, { key: "selection", value: function(t2) { return new e22(void 0, aR, void 0, void 0, t2); } }]), e22; }(); function iR(e22, t2, n2, r2) { var i2 = t2 + 1 > n2 + 20 ? t2 - n2 - 1 : 0, o2 = e22.slice(i2, t2); return o2.push(r2), o2; } function oR(e22, t2) { return e22.length ? t2.length ? e22.concat(t2) : e22 : t2; } var aR = []; function sR(e22, t2) { if (e22.length) { var n2 = e22[e22.length - 1], r2 = n2.selectionsAfter.slice(Math.max(0, n2.selectionsAfter.length - 200)); return r2.length && r2[r2.length - 1].eq(t2) ? e22 : (r2.push(t2), iR(e22, e22.length - 1, 1e9, n2.setSelAfter(r2))); } return [rR.selection([t2])]; } function uR(e22) { var t2 = e22[e22.length - 1], n2 = e22.slice(); return n2[e22.length - 1] = t2.setSelAfter(t2.selectionsAfter.slice(0, t2.selectionsAfter.length - 1)), n2; } function cR(e22, t2) { if (!e22.length) return e22; for (var n2 = e22.length, r2 = aR; n2; ) { var i2 = lR(e22[n2 - 1], t2, r2); if (i2.changes && !i2.changes.empty || i2.effects.length) { var o2 = e22.slice(0, n2); return o2[n2 - 1] = i2, o2; } t2 = i2.mapped, n2--, r2 = i2.selectionsAfter; } return r2.length ? [rR.selection(r2)] : aR; } function lR(e22, t2, n2) { var r2 = oR(e22.selectionsAfter.length ? e22.selectionsAfter.map(function(e23) { return e23.map(t2); }) : aR, n2); if (!e22.changes) return rR.selection(r2); var i2 = e22.changes.map(t2), o2 = t2.mapDesc(e22.changes, true), a2 = e22.mapped ? e22.mapped.composeDesc(o2) : o2; return new rR(i2, i_.mapEffects(e22.effects, t2), a2, e22.startSelection.map(o2), r2); } var fR = /^(input\.type|delete)($|\.)/, hR = function() { function e22(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0; Ri(this, e22), this.done = t2, this.undone = n2, this.prevTime = r2, this.prevUserEvent = i2; } return zi(e22, [{ key: "isolate", value: function() { return this.prevTime ? new e22(this.done, this.undone) : this; } }, { key: "addChanges", value: function(t2, n2, r2, i2, o2) { var a2 = this.done, s2 = a2[a2.length - 1]; return new e22(a2 = s2 && s2.changes && !s2.changes.empty && t2.changes && (!r2 || fR.test(r2)) && (!s2.selectionsAfter.length && n2 - this.prevTime < i2 && function(e23, t3) { var n3 = [], r3 = false; return e23.iterChangedRanges(function(e24, t4) { return n3.push(e24, t4); }), t3.iterChangedRanges(function(e24, t4, i3, o3) { for (var a3 = 0; a3 < n3.length; ) { var s3 = n3[a3++], u2 = n3[a3++]; o3 >= s3 && i3 <= u2 && (r3 = true); } }), r3; }(s2.changes, t2.changes) || r2 == "input.type.compose") ? iR(a2, a2.length - 1, o2, new rR(t2.changes.compose(s2.changes), oR(t2.effects, s2.effects), s2.mapped, s2.startSelection, aR)) : iR(a2, a2.length, o2, t2), aR, n2, r2); } }, { key: "addSelection", value: function(t2, n2, r2, i2) { var o2, a2, s2 = this.done.length ? this.done[this.done.length - 1].selectionsAfter : aR; return s2.length > 0 && n2 - this.prevTime < i2 && r2 == this.prevUserEvent && r2 && /^select($|\.)/.test(r2) && (o2 = s2[s2.length - 1], a2 = t2, o2.ranges.length == a2.ranges.length && o2.ranges.filter(function(e23, t3) { return e23.empty != a2.ranges[t3].empty; }).length === 0) ? this : new e22(sR(this.done, t2), this.undone, n2, r2); } }, { key: "addMapping", value: function(t2) { return new e22(cR(this.done, t2), cR(this.undone, t2), this.prevTime, this.prevUserEvent); } }, { key: "pop", value: function(e23, t2, n2) { var r2 = e23 == 0 ? this.done : this.undone; if (r2.length == 0) return null; var i2 = r2[r2.length - 1]; if (n2 && i2.selectionsAfter.length) return t2.update({ selection: i2.selectionsAfter[i2.selectionsAfter.length - 1], annotations: VI.of({ side: e23, rest: uR(r2) }), userEvent: e23 == 0 ? "select.undo" : "select.redo", scrollIntoView: true }); if (i2.changes) { var o2 = r2.length == 1 ? aR : r2.slice(0, r2.length - 1); return i2.mapped && (o2 = cR(o2, i2.mapped)), t2.update({ changes: i2.changes, selection: i2.startSelection, effects: i2.effects, annotations: VI.of({ side: e23, rest: o2 }), filter: false, userEvent: e23 == 0 ? "undo" : "redo", scrollIntoView: true }); } return null; } }]), e22; }(); hR.empty = new hR(aR, aR); var dR = [{ key: "Mod-z", run: QI, preventDefault: true }, { key: "Mod-y", mac: "Mod-Shift-z", run: YI, preventDefault: true }, { linux: "Ctrl-Shift-z", run: YI, preventDefault: true }, { key: "Mod-u", run: ZI, preventDefault: true }, { key: "Alt-u", mac: "Mod-Shift-u", run: XI, preventDefault: true }]; function vR(e22, t2) { return _C.create(e22.ranges.map(t2), e22.mainIndex); } function pR(e22, t2) { return e22.update({ selection: t2, scrollIntoView: true, userEvent: "select" }); } function mR(e22, t2) { var n2 = e22.state, r2 = e22.dispatch, i2 = vR(n2.selection, t2); return !i2.eq(n2.selection) && (r2(pR(n2, i2)), true); } function gR(e22, t2) { return _C.cursor(t2 ? e22.to : e22.from); } function yR(e22, t2) { return mR(e22, function(n2) { return n2.empty ? e22.moveByChar(n2, t2) : gR(n2, t2); }); } function bR(e22) { return e22.textDirectionAt(e22.state.selection.main.head) == NO.LTR; } var kR = function(e22) { return yR(e22, !bR(e22)); }, wR = function(e22) { return yR(e22, bR(e22)); }; function xR(e22, t2) { return mR(e22, function(n2) { return n2.empty ? e22.moveByGroup(n2, t2) : gR(n2, t2); }); } function jR(e22, t2, n2) { if (t2.type.prop(n2)) return true; var r2 = t2.to - t2.from; return r2 && (r2 > 2 || /[^\s,.;:]/.test(e22.sliceDoc(t2.from, t2.to))) || t2.firstChild; } function SR(e22, t2, n2) { for (var r2 = WN(e22).resolveInner(t2.head), i2 = n2 ? hI.closedBy : hI.openedBy, o2 = t2.head; ; ) { var a2 = n2 ? r2.childAfter(o2) : r2.childBefore(o2); if (!a2) break; jR(e22, a2, i2) ? r2 = a2 : o2 = n2 ? a2.to : a2.from; } var s2, u2; return u2 = r2.type.prop(i2) && (s2 = n2 ? YT(e22, r2.from, 1) : YT(e22, r2.to, -1)) && s2.matched ? n2 ? s2.end.to : s2.end.from : n2 ? r2.to : r2.from, _C.cursor(u2, n2 ? -1 : 1); } function CR(e22, t2) { return mR(e22, function(n2) { if (!n2.empty) return gR(n2, t2); var r2 = e22.moveVertically(n2, t2); return r2.head != n2.head ? r2 : e22.moveToLineBoundary(n2, t2); }); } var _R = function(e22) { return CR(e22, false); }, $R = function(e22) { return CR(e22, true); }; function OR(e22) { return Math.max(e22.defaultLineHeight, Math.min(e22.dom.clientHeight, innerHeight) - 5); } function AR(e22, t2) { var n2 = e22.state, r2 = vR(n2.selection, function(n3) { return n3.empty ? e22.moveVertically(n3, t2, OR(e22)) : gR(n3, t2); }); if (r2.eq(n2.selection)) return false; var i2, o2 = e22.coordsAtPos(n2.selection.main.head), a2 = e22.scrollDOM.getBoundingClientRect(); return o2 && o2.top > a2.top && o2.bottom < a2.bottom && o2.top - a2.top <= e22.scrollDOM.scrollHeight - e22.scrollDOM.scrollTop - e22.scrollDOM.clientHeight && (i2 = PM.scrollIntoView(r2.main.head, { y: "start", yMargin: o2.top - a2.top })), e22.dispatch(pR(n2, r2), { effects: i2 }), true; } var MR = function(e22) { return AR(e22, false); }, ER = function(e22) { return AR(e22, true); }; function PR(e22, t2, n2) { var r2 = e22.lineBlockAt(t2.head), i2 = e22.moveToLineBoundary(t2, n2); if (i2.head == t2.head && i2.head != (n2 ? r2.to : r2.from) && (i2 = e22.moveToLineBoundary(t2, n2, false)), !n2 && i2.head == r2.from && r2.length) { var o2 = /^\s*/.exec(e22.state.sliceDoc(r2.from, Math.min(r2.from + 100, r2.to)))[0].length; o2 && t2.head != r2.from + o2 && (i2 = _C.cursor(r2.from + o2)); } return i2; } var NR = function(e22) { return mR(e22, function(t2) { return PR(e22, t2, true); }); }, TR = function(e22) { return mR(e22, function(t2) { return PR(e22, t2, false); }); }; function IR(e22, t2) { var n2 = vR(e22.state.selection, function(e23) { var n3 = t2(e23); return _C.range(e23.anchor, n3.head, n3.goalColumn); }); return !n2.eq(e22.state.selection) && (e22.dispatch(pR(e22.state, n2)), true); } function RR(e22, t2) { return IR(e22, function(n2) { return e22.moveByChar(n2, t2); }); } var DR = function(e22) { return RR(e22, !bR(e22)); }, zR = function(e22) { return RR(e22, bR(e22)); }; function LR(e22, t2) { return IR(e22, function(n2) { return e22.moveByGroup(n2, t2); }); } function BR(e22, t2) { return IR(e22, function(n2) { return e22.moveVertically(n2, t2); }); } var qR = function(e22) { return BR(e22, false); }, FR = function(e22) { return BR(e22, true); }; function VR(e22, t2) { return IR(e22, function(n2) { return e22.moveVertically(n2, t2, OR(e22)); }); } var HR = function(e22) { return VR(e22, false); }, WR = function(e22) { return VR(e22, true); }, JR = function(e22) { return IR(e22, function(t2) { return PR(e22, t2, true); }); }, UR = function(e22) { return IR(e22, function(t2) { return PR(e22, t2, false); }); }, KR = function(e22) { var t2 = e22.state; return (0, e22.dispatch)(pR(t2, { anchor: 0 })), true; }, GR = function(e22) { var t2 = e22.state; return (0, e22.dispatch)(pR(t2, { anchor: t2.doc.length })), true; }, QR = function(e22) { var t2 = e22.state; return (0, e22.dispatch)(pR(t2, { anchor: t2.selection.main.anchor, head: 0 })), true; }, YR = function(e22) { var t2 = e22.state; return (0, e22.dispatch)(pR(t2, { anchor: t2.selection.main.anchor, head: t2.doc.length })), true; }; function ZR(e22, t2) { var n2 = e22.state, r2 = e22.dispatch; if (n2.readOnly) return false; var i2 = "delete.selection", o2 = n2.changeByRange(function(e23) { var n3 = e23.from, r3 = e23.to; if (n3 == r3) { var o3 = t2(n3); o3 < n3 ? i2 = "delete.backward" : o3 > n3 && (i2 = "delete.forward"), n3 = Math.min(n3, o3), r3 = Math.max(r3, o3); } return n3 == r3 ? { range: e23 } : { changes: { from: n3, to: r3 }, range: _C.cursor(n3) }; }); return !o2.changes.empty && (r2(n2.update(o2, { scrollIntoView: true, userEvent: i2, effects: i2 == "delete.selection" ? PM.announce.of(n2.phrase("Selection deleted")) : void 0 })), true); } function XR(e22, t2, n2) { if (e22 instanceof PM) { var r2, i2 = bi(e22.state.facet(PM.atomicRanges).map(function(t3) { return t3(e22); })); try { for (i2.s(); !(r2 = i2.n()).done; ) { r2.value.between(t2, t2, function(e23, r3) { e23 < t2 && r3 > t2 && (t2 = n2 ? r3 : e23); }); } } catch (e23) { i2.e(e23); } finally { i2.f(); } } return t2; } var eD = function(e22, t2) { return ZR(e22, function(n2) { var r2, i2, o2 = e22.state, a2 = o2.doc.lineAt(n2); if (!t2 && n2 > a2.from && n2 < a2.from + 200 && !/[^ \t]/.test(r2 = a2.text.slice(0, n2 - a2.from))) { if (r2[r2.length - 1] == " ") return n2 - 1; for (var s2 = I_(r2, o2.tabSize) % iT(o2) || iT(o2), u2 = 0; u2 < s2 && r2[r2.length - 1 - u2] == " "; u2++) n2--; i2 = n2; } else (i2 = sC(a2.text, n2 - a2.from, t2, t2) + a2.from) == n2 && a2.number != (t2 ? o2.doc.lines : 1) && (i2 += t2 ? 1 : -1); return XR(e22, i2, t2); }); }, tD = function(e22) { return eD(e22, false); }, nD = function(e22) { return eD(e22, true); }, rD = function(e22, t2) { return ZR(e22, function(n2) { for (var r2 = n2, i2 = e22.state, o2 = i2.doc.lineAt(r2), a2 = i2.charCategorizer(r2), s2 = null; ; ) { if (r2 == (t2 ? o2.to : o2.from)) { r2 == n2 && o2.number != (t2 ? i2.doc.lines : 1) && (r2 += t2 ? 1 : -1); break; } var u2 = sC(o2.text, r2 - o2.from, t2) + o2.from, c2 = o2.text.slice(Math.min(r2, u2) - o2.from, Math.max(r2, u2) - o2.from), l2 = a2(c2); if (s2 != null && l2 != s2) break; c2 == " " && r2 == n2 || (s2 = l2), r2 = u2; } return XR(e22, r2, t2); }); }, iD = function(e22) { return rD(e22, false); }, oD = function(e22) { return ZR(e22, function(t2) { var n2 = e22.lineBlockAt(t2).to; return XR(e22, t2 < n2 ? n2 : Math.min(e22.state.doc.length, t2 + 1), true); }); }; function aD(e22) { var t2, n2 = [], r2 = -1, i2 = bi(e22.selection.ranges); try { for (i2.s(); !(t2 = i2.n()).done; ) { var o2 = t2.value, a2 = e22.doc.lineAt(o2.from), s2 = e22.doc.lineAt(o2.to); if (o2.empty || o2.to != s2.from || (s2 = e22.doc.lineAt(o2.to - 1)), r2 >= a2.number) { var u2 = n2[n2.length - 1]; u2.to = s2.to, u2.ranges.push(o2); } else n2.push({ from: a2.from, to: s2.to, ranges: [o2] }); r2 = s2.number + 1; } } catch (e23) { i2.e(e23); } finally { i2.f(); } return n2; } function sD(e22, t2, n2) { if (e22.readOnly) return false; var r2, i2 = [], o2 = [], a2 = bi(aD(e22)); try { for (a2.s(); !(r2 = a2.n()).done; ) { var s2 = r2.value; if (n2 ? s2.to != e22.doc.length : s2.from != 0) { var u2 = e22.doc.lineAt(n2 ? s2.to + 1 : s2.from - 1), c2 = u2.length + 1; if (n2) { i2.push({ from: s2.to, to: u2.to }, { from: s2.from, insert: u2.text + e22.lineBreak }); var l2, f2 = bi(s2.ranges); try { for (f2.s(); !(l2 = f2.n()).done; ) { var h2 = l2.value; o2.push(_C.range(Math.min(e22.doc.length, h2.anchor + c2), Math.min(e22.doc.length, h2.head + c2))); } } catch (e23) { f2.e(e23); } finally { f2.f(); } } else { i2.push({ from: u2.from, to: s2.from }, { from: s2.to, insert: e22.lineBreak + u2.text }); var d2, v2 = bi(s2.ranges); try { for (v2.s(); !(d2 = v2.n()).done; ) { var p2 = d2.value; o2.push(_C.range(p2.anchor - c2, p2.head - c2)); } } catch (e23) { v2.e(e23); } finally { v2.f(); } } } } } catch (e23) { a2.e(e23); } finally { a2.f(); } return !!i2.length && (t2(e22.update({ changes: i2, scrollIntoView: true, selection: _C.create(o2, e22.selection.mainIndex), userEvent: "move.line" })), true); } function uD(e22, t2, n2) { if (e22.readOnly) return false; var r2, i2 = [], o2 = bi(aD(e22)); try { for (o2.s(); !(r2 = o2.n()).done; ) { var a2 = r2.value; n2 ? i2.push({ from: a2.from, insert: e22.doc.slice(a2.from, a2.to) + e22.lineBreak }) : i2.push({ from: a2.to, insert: e22.lineBreak + e22.doc.slice(a2.from, a2.to) }); } } catch (e23) { o2.e(e23); } finally { o2.f(); } return t2(e22.update({ changes: i2, scrollIntoView: true, userEvent: "input.copyline" })), true; } var cD = lD(false); function lD(e22) { return function(t2) { var n2 = t2.state, r2 = t2.dispatch; if (n2.readOnly) return false; var i2 = n2.changeByRange(function(t3) { var r3 = t3.from, i3 = t3.to, o2 = n2.doc.lineAt(r3), a2 = !e22 && r3 == i3 && function(e23, t4) { if (/\(\)|\[\]|\{\}/.test(e23.sliceDoc(t4 - 1, t4 + 1))) return { from: t4, to: t4 }; var n3, r4 = WN(e23).resolveInner(t4), i4 = r4.childBefore(t4), o3 = r4.childAfter(t4); return i4 && o3 && i4.to <= t4 && o3.from >= t4 && (n3 = i4.type.prop(hI.closedBy)) && n3.indexOf(o3.name) > -1 && e23.doc.lineAt(i4.to).from == e23.doc.lineAt(o3.from).from ? { from: i4.to, to: o3.from } : null; }(n2, r3); e22 && (r3 = i3 = (i3 <= o2.to ? o2 : n2.doc.lineAt(i3)).to); var s2 = new sT(n2, { simulateBreak: r3, simulateDoubleBreak: !!a2 }), u2 = aT(s2, r3); for (u2 == null && (u2 = /^\s*/.exec(n2.doc.lineAt(r3).text)[0].length); i3 < o2.to && /\s/.test(o2.text[i3 - o2.from]); ) i3++; a2 ? (r3 = a2.from, i3 = a2.to) : r3 > o2.from && r3 < o2.from + 100 && !/\S/.test(o2.text.slice(0, r3)) && (r3 = o2.from); var c2 = ["", oT(n2, u2)]; return a2 && c2.push(oT(n2, s2.lineIndent(o2.from, -1))), { changes: { from: r3, to: i3, insert: US.of(c2) }, range: _C.cursor(r3 + 1 + c2[1].length) }; }); return r2(n2.update(i2, { scrollIntoView: true, userEvent: "input" })), true; }; } function fD(e22, t2) { var n2 = -1; return e22.changeByRange(function(r2) { for (var i2 = [], o2 = r2.from; o2 <= r2.to; ) { var a2 = e22.doc.lineAt(o2); a2.number > n2 && (r2.empty || r2.to > a2.from) && (t2(a2, i2, r2), n2 = a2.number), o2 = a2.to + 1; } var s2 = e22.changes(i2); return { changes: i2, range: _C.range(s2.mapPos(r2.anchor, 1), s2.mapPos(r2.head, 1)) }; }); } var hD = function(e22) { var t2 = e22.state, n2 = e22.dispatch; return !t2.readOnly && (n2(t2.update(fD(t2, function(e23, n3) { n3.push({ from: e23.from, insert: t2.facet(rT) }); }), { userEvent: "input.indent" })), true); }, dD = function(e22) { var t2 = e22.state, n2 = e22.dispatch; return !t2.readOnly && (n2(t2.update(fD(t2, function(e23, n3) { var r2 = /^\s*/.exec(e23.text)[0]; if (r2) { for (var i2 = I_(r2, t2.tabSize), o2 = 0, a2 = oT(t2, Math.max(0, i2 - iT(t2))); o2 < r2.length && o2 < a2.length && r2.charCodeAt(o2) == a2.charCodeAt(o2); ) o2++; n3.push({ from: e23.from + o2, to: e23.from + r2.length, insert: a2.slice(o2) }); } }), { userEvent: "delete.dedent" })), true); }, vD = [{ key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: function(e22) { return mR(e22, function(t2) { return SR(e22.state, t2, !bR(e22)); }); }, shift: function(e22) { return IR(e22, function(t2) { return SR(e22.state, t2, !bR(e22)); }); } }, { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: function(e22) { return mR(e22, function(t2) { return SR(e22.state, t2, bR(e22)); }); }, shift: function(e22) { return IR(e22, function(t2) { return SR(e22.state, t2, bR(e22)); }); } }, { key: "Alt-ArrowUp", run: function(e22) { return sD(e22.state, e22.dispatch, false); } }, { key: "Shift-Alt-ArrowUp", run: function(e22) { return uD(e22.state, e22.dispatch, false); } }, { key: "Alt-ArrowDown", run: function(e22) { return sD(e22.state, e22.dispatch, true); } }, { key: "Shift-Alt-ArrowDown", run: function(e22) { return uD(e22.state, e22.dispatch, true); } }, { key: "Escape", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch, r2 = t2.selection, i2 = null; return r2.ranges.length > 1 ? i2 = _C.create([r2.main]) : r2.main.empty || (i2 = _C.create([_C.cursor(r2.main.head)])), !!i2 && (n2(pR(t2, i2)), true); } }, { key: "Mod-Enter", run: lD(true) }, { key: "Alt-l", mac: "Ctrl-l", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch, r2 = aD(t2).map(function(e23) { var n3 = e23.from, r3 = e23.to; return _C.range(n3, Math.min(r3 + 1, t2.doc.length)); }); return n2(t2.update({ selection: _C.create(r2), userEvent: "select" })), true; } }, { key: "Mod-i", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch, r2 = vR(t2.selection, function(e23) { for (var n3, r3 = WN(t2).resolveInner(e23.head, 1); !(r3.from < e23.from && r3.to >= e23.to || r3.to > e23.to && r3.from <= e23.from) && ((n3 = r3.parent) === null || n3 === void 0 ? void 0 : n3.parent); ) r3 = r3.parent; return _C.range(r3.to, r3.from); }); return n2(pR(t2, r2)), true; }, preventDefault: true }, { key: "Mod-[", run: dD }, { key: "Mod-]", run: hD }, { key: "Mod-Alt-\\", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch; if (t2.readOnly) return false; var r2 = /* @__PURE__ */ Object.create(null), i2 = new sT(t2, { overrideIndentation: function(e23) { var t3 = r2[e23]; return t3 == null ? -1 : t3; } }), o2 = fD(t2, function(e23, n3, o3) { var a2 = aT(i2, e23.from); if (a2 != null) { /\S/.test(e23.text) || (a2 = 0); var s2 = /^\s*/.exec(e23.text)[0], u2 = oT(t2, a2); (s2 != u2 || o3.from < e23.from + s2.length) && (r2[e23.from] = a2, n3.push({ from: e23.from, to: e23.from + s2.length, insert: u2 })); } }); return o2.changes.empty || n2(t2.update(o2, { userEvent: "indent" })), true; } }, { key: "Shift-Mod-k", run: function(e22) { if (e22.state.readOnly) return false; var t2 = e22.state, n2 = t2.changes(aD(t2).map(function(e23) { var n3 = e23.from, r3 = e23.to; return n3 > 0 ? n3-- : r3 < t2.doc.length && r3++, { from: n3, to: r3 }; })), r2 = vR(t2.selection, function(t3) { return e22.moveVertically(t3, true); }).map(n2); return e22.dispatch({ changes: n2, selection: r2, scrollIntoView: true, userEvent: "delete.line" }), true; } }, { key: "Shift-Mod-\\", run: function(e22) { return function(e23, t2, n2) { var r2 = false, i2 = vR(e23.selection, function(t3) { var i3 = YT(e23, t3.head, -1) || YT(e23, t3.head, 1) || t3.head > 0 && YT(e23, t3.head - 1, 1) || t3.head < e23.doc.length && YT(e23, t3.head + 1, -1); if (!i3 || !i3.end) return t3; r2 = true; var o2 = i3.start.from == t3.head ? i3.end.to : i3.end.from; return n2 ? _C.range(t3.anchor, o2) : _C.cursor(o2); }); return !!r2 && (t2(pR(e23, i2)), true); }(e22.state, e22.dispatch, false); } }, { key: "Mod-/", run: function(e22) { var t2 = LI(e22.state); return t2.line ? RI(e22) : !!t2.block && zI(e22); } }, { key: "Alt-A", run: DI }].concat([{ key: "ArrowLeft", run: kR, shift: DR, preventDefault: true }, { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: function(e22) { return xR(e22, !bR(e22)); }, shift: function(e22) { return LR(e22, !bR(e22)); } }, { mac: "Cmd-ArrowLeft", run: TR, shift: UR }, { key: "ArrowRight", run: wR, shift: zR, preventDefault: true }, { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: function(e22) { return xR(e22, bR(e22)); }, shift: function(e22) { return LR(e22, bR(e22)); } }, { mac: "Cmd-ArrowRight", run: NR, shift: JR }, { key: "ArrowUp", run: _R, shift: qR, preventDefault: true }, { mac: "Cmd-ArrowUp", run: KR, shift: QR }, { mac: "Ctrl-ArrowUp", run: MR, shift: HR }, { key: "ArrowDown", run: $R, shift: FR, preventDefault: true }, { mac: "Cmd-ArrowDown", run: GR, shift: YR }, { mac: "Ctrl-ArrowDown", run: ER, shift: WR }, { key: "PageUp", run: MR, shift: HR }, { key: "PageDown", run: ER, shift: WR }, { key: "Home", run: TR, shift: UR, preventDefault: true }, { key: "Mod-Home", run: KR, shift: QR }, { key: "End", run: NR, shift: JR, preventDefault: true }, { key: "Mod-End", run: GR, shift: YR }, { key: "Enter", run: cD }, { key: "Mod-a", run: function(e22) { var t2 = e22.state; return (0, e22.dispatch)(t2.update({ selection: { anchor: 0, head: t2.doc.length }, userEvent: "select" })), true; } }, { key: "Backspace", run: tD, shift: tD }, { key: "Delete", run: nD }, { key: "Mod-Backspace", mac: "Alt-Backspace", run: iD }, { key: "Mod-Delete", mac: "Alt-Delete", run: function(e22) { return rD(e22, true); } }, { mac: "Mod-Backspace", run: function(e22) { return ZR(e22, function(t2) { var n2 = e22.lineBlockAt(t2).from; return XR(e22, t2 > n2 ? n2 : Math.max(0, t2 - 1), false); }); } }, { mac: "Mod-Delete", run: oD }].concat([{ key: "Ctrl-b", run: kR, shift: DR, preventDefault: true }, { key: "Ctrl-f", run: wR, shift: zR }, { key: "Ctrl-p", run: _R, shift: qR }, { key: "Ctrl-n", run: $R, shift: FR }, { key: "Ctrl-a", run: function(e22) { return mR(e22, function(t2) { return _C.cursor(e22.lineBlockAt(t2.head).from, 1); }); }, shift: function(e22) { return IR(e22, function(t2) { return _C.cursor(e22.lineBlockAt(t2.head).from); }); } }, { key: "Ctrl-e", run: function(e22) { return mR(e22, function(t2) { return _C.cursor(e22.lineBlockAt(t2.head).to, -1); }); }, shift: function(e22) { return IR(e22, function(t2) { return _C.cursor(e22.lineBlockAt(t2.head).to); }); } }, { key: "Ctrl-d", run: nD }, { key: "Ctrl-h", run: tD }, { key: "Ctrl-k", run: oD }, { key: "Ctrl-Alt-h", run: iD }, { key: "Ctrl-o", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch; if (t2.readOnly) return false; var r2 = t2.changeByRange(function(e23) { return { changes: { from: e23.from, to: e23.to, insert: US.of(["", ""]) }, range: _C.cursor(e23.from) }; }); return n2(t2.update(r2, { scrollIntoView: true, userEvent: "input" })), true; } }, { key: "Ctrl-t", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch; if (t2.readOnly) return false; var r2 = t2.changeByRange(function(e23) { if (!e23.empty || e23.from == 0 || e23.from == t2.doc.length) return { range: e23 }; var n3 = e23.from, r3 = t2.doc.lineAt(n3), i2 = n3 == r3.from ? n3 - 1 : sC(r3.text, n3 - r3.from, false) + r3.from, o2 = n3 == r3.to ? n3 + 1 : sC(r3.text, n3 - r3.from, true) + r3.from; return { changes: { from: i2, to: o2, insert: t2.doc.slice(n3, o2).append(t2.doc.slice(i2, n3)) }, range: _C.cursor(o2) }; }); return !r2.changes.empty && (n2(t2.update(r2, { scrollIntoView: true, userEvent: "move.character" })), true); } }, { key: "Ctrl-v", run: ER }].map(function(e22) { return { mac: e22.key, run: e22.run, shift: e22.shift }; }))), pD = { key: "Tab", run: hD, shift: dD }; function mD() { var e22 = arguments[0]; typeof e22 == "string" && (e22 = document.createElement(e22)); var t2 = 1, n2 = arguments[1]; if (n2 && Li(n2) == "object" && n2.nodeType == null && !Array.isArray(n2)) { for (var r2 in n2) if (Object.prototype.hasOwnProperty.call(n2, r2)) { var i2 = n2[r2]; typeof i2 == "string" ? e22.setAttribute(r2, i2) : i2 != null && (e22[r2] = i2); } t2++; } for (; t2 < arguments.length; t2++) gD(e22, arguments[t2]); return e22; } function gD(e22, t2) { if (typeof t2 == "string") e22.appendChild(document.createTextNode(t2)); else if (t2 == null) ; else if (t2.nodeType != null) e22.appendChild(t2); else { if (!Array.isArray(t2)) throw new RangeError("Unsupported child node: " + t2); for (var n2 = 0; n2 < t2.length; n2++) gD(e22, t2[n2]); } } var yD = typeof String.prototype.normalize == "function" ? function(e22) { return e22.normalize("NFKD"); } : function(e22) { return e22; }, bD = function() { function e22(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : t2.length, o2 = arguments.length > 4 ? arguments[4] : void 0; Ri(this, e22), this.value = { from: 0, to: 0 }, this.done = false, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = t2.iterRange(r2, i2), this.bufferStart = r2, this.normalize = o2 ? function(e23) { return o2(yD(e23)); } : yD, this.query = this.normalize(n2); } return zi(e22, [{ key: "peek", value: function() { if (this.bufferPos == this.buffer.length) { if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done) return -1; this.bufferPos = 0, this.buffer = this.iter.value; } return hC(this.buffer, this.bufferPos); } }, { key: "next", value: function() { for (; this.matches.length; ) this.matches.pop(); return this.nextOverlapping(); } }, { key: "nextOverlapping", value: function() { for (; ; ) { var e23 = this.peek(); if (e23 < 0) return this.done = true, this; var t2 = dC(e23), n2 = this.bufferStart + this.bufferPos; this.bufferPos += vC(e23); for (var r2 = this.normalize(t2), i2 = 0, o2 = n2; ; i2++) { var a2 = r2.charCodeAt(i2), s2 = this.match(a2, o2); if (s2) return this.value = s2, this; if (i2 == r2.length - 1) break; o2 == n2 && i2 < t2.length && t2.charCodeAt(i2) == a2 && o2++; } } } }, { key: "match", value: function(e23, t2) { for (var n2 = null, r2 = 0; r2 < this.matches.length; r2 += 2) { var i2 = this.matches[r2], o2 = false; this.query.charCodeAt(i2) == e23 && (i2 == this.query.length - 1 ? n2 = { from: this.matches[r2 + 1], to: t2 + 1 } : (this.matches[r2]++, o2 = true)), o2 || (this.matches.splice(r2, 2), r2 -= 2); } return this.query.charCodeAt(0) == e23 && (this.query.length == 1 ? n2 = { from: t2, to: t2 + 1 } : this.matches.push(1, t2)), n2; } }]), e22; }(); typeof Symbol != "undefined" && (bD.prototype[Symbol.iterator] = function() { return this; }); var kD = { from: -1, to: -1, match: /.*/.exec("") }, wD = "gm" + (/x/.unicode == null ? "" : "u"), xD = function() { function e22(t2, n2, r2) { var i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, o2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : t2.length; if (Ri(this, e22), this.to = o2, this.curLine = "", this.done = false, this.value = kD, /\\[sWDnr]|\n|\r|\[\^/.test(n2)) return new CD(t2, n2, r2, i2, o2); this.re = new RegExp(n2, wD + ((r2 == null ? void 0 : r2.ignoreCase) ? "i" : "")), this.iter = t2.iter(); var a2 = t2.lineAt(i2); this.curLineStart = a2.from, this.matchPos = i2, this.getLine(this.curLineStart); } return zi(e22, [{ key: "getLine", value: function(e23) { this.iter.next(e23), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next()); } }, { key: "nextLine", value: function() { this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0); } }, { key: "next", value: function() { for (var e23 = this.matchPos - this.curLineStart; ; ) { this.re.lastIndex = e23; var t2 = this.matchPos <= this.to && this.re.exec(this.curLine); if (t2) { var n2 = this.curLineStart + t2.index, r2 = n2 + t2[0].length; if (this.matchPos = r2 + (n2 == r2 ? 1 : 0), n2 == this.curLine.length && this.nextLine(), n2 < r2 || n2 > this.value.to) return this.value = { from: n2, to: r2, match: t2 }, this; e23 = this.matchPos - this.curLineStart; } else { if (!(this.curLineStart + this.curLine.length < this.to)) return this.done = true, this; this.nextLine(), e23 = 0; } } } }]), e22; }(), jD = /* @__PURE__ */ new WeakMap(), SD = function() { function e22(t2, n2) { Ri(this, e22), this.from = t2, this.text = n2; } return zi(e22, [{ key: "to", get: function() { return this.from + this.text.length; } }], [{ key: "get", value: function(t2, n2, r2) { var i2 = jD.get(t2); if (!i2 || i2.from >= r2 || i2.to <= n2) { var o2 = new e22(n2, t2.sliceString(n2, r2)); return jD.set(t2, o2), o2; } if (i2.from == n2 && i2.to == r2) return i2; var a2 = i2.text, s2 = i2.from; return s2 > n2 && (a2 = t2.sliceString(n2, s2) + a2, s2 = n2), i2.to < r2 && (a2 += t2.sliceString(i2.to, r2)), jD.set(t2, new e22(s2, a2)), new e22(n2, a2.slice(n2 - s2, r2 - s2)); } }]), e22; }(), CD = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.text = t2, this.to = o2, this.done = false, this.value = kD, this.matchPos = i2, this.re = new RegExp(n2, wD + ((r2 == null ? void 0 : r2.ignoreCase) ? "i" : "")), this.flat = SD.get(t2, i2, this.chunkEnd(i2 + 5e3)); } return zi(e22, [{ key: "chunkEnd", value: function(e23) { return e23 >= this.to ? this.to : this.text.lineAt(e23).to; } }, { key: "next", value: function() { for (; ; ) { var e23 = this.re.lastIndex = this.matchPos - this.flat.from, t2 = this.re.exec(this.flat.text); if (t2 && !t2[0] && t2.index == e23 && (this.re.lastIndex = e23 + 1, t2 = this.re.exec(this.flat.text)), t2 && this.flat.to < this.to && t2.index + t2[0].length > this.flat.text.length - 10 && (t2 = null), t2) { var n2 = this.flat.from + t2.index, r2 = n2 + t2[0].length; return this.value = { from: n2, to: r2, match: t2 }, this.matchPos = r2 + (n2 == r2 ? 1 : 0), this; } if (this.flat.to == this.to) return this.done = true, this; this.flat = SD.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + 2 * this.flat.text.length)); } } }]), e22; }(); function _D(e22) { var t2 = mD("input", { class: "cm-textfield", name: "line" }); function n2() { var n3 = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t2.value); if (n3) { var r2 = e22.state, i2 = r2.doc.lineAt(r2.selection.main.head), o2 = ki(n3, 5), a2 = o2[1], s2 = o2[2], u2 = o2[3], c2 = o2[4], l2 = u2 ? +u2.slice(1) : 0, f2 = s2 ? +s2 : i2.number; if (s2 && c2) { var h2 = f2 / 100; a2 && (h2 = h2 * (a2 == "-" ? -1 : 1) + i2.number / r2.doc.lines), f2 = Math.round(r2.doc.lines * h2); } else s2 && a2 && (f2 = f2 * (a2 == "-" ? -1 : 1) + i2.number); var d2 = r2.doc.line(Math.max(1, Math.min(r2.doc.lines, f2))); e22.dispatch({ effects: $D.of(false), selection: _C.cursor(d2.from + Math.max(0, Math.min(l2, d2.length))), scrollIntoView: true }), e22.focus(); } } return { dom: mD("form", { class: "cm-gotoLine", onkeydown: function(t3) { t3.keyCode == 27 ? (t3.preventDefault(), e22.dispatch({ effects: $D.of(false) }), e22.focus()) : t3.keyCode == 13 && (t3.preventDefault(), n2()); }, onsubmit: function(e23) { e23.preventDefault(), n2(); } }, mD("label", e22.state.phrase("Go to line"), ": ", t2), " ", mD("button", { class: "cm-button", type: "submit" }, e22.state.phrase("go"))) }; } typeof Symbol != "undefined" && (xD.prototype[Symbol.iterator] = CD.prototype[Symbol.iterator] = function() { return this; }); var $D = i_.define(), OD = IC.define({ create: function() { return true; }, update: function(e22, t2) { var n2, r2 = bi(t2.effects); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; i2.is($D) && (e22 = i2.value); } } catch (e23) { r2.e(e23); } finally { r2.f(); } return e22; }, provide: function(e22) { return WE.from(e22, function(e23) { return e23 ? _D : null; }); } }), AD = PM.baseTheme({ ".cm-panel.cm-gotoLine": { padding: "2px 6px 4px", "& label": { fontSize: "80%" } } }), MD = { highlightWordAroundCursor: false, minSelectionLength: 1, maxMatches: 100, wholeWords: false }, ED = AC.define({ combine: function(e22) { return g_(e22, MD, { highlightWordAroundCursor: function(e23, t2) { return e23 || t2; }, minSelectionLength: Math.min, maxMatches: Math.min }); } }); var PD = X$.mark({ class: "cm-selectionMatch" }), ND = X$.mark({ class: "cm-selectionMatch cm-selectionMatch-main" }); function TD(e22, t2, n2, r2) { return !(n2 != 0 && e22(t2.sliceDoc(n2 - 1, n2)) == d_.Word || r2 != t2.doc.length && e22(t2.sliceDoc(r2, r2 + 1)) == d_.Word); } var ID = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.decorations = this.getDeco(t2); } return zi(e22, [{ key: "update", value: function(e23) { (e23.selectionSet || e23.docChanged || e23.viewportChanged) && (this.decorations = this.getDeco(e23.view)); } }, { key: "getDeco", value: function(e23) { var t2 = e23.state.facet(ED), n2 = e23.state, r2 = n2.selection; if (r2.ranges.length > 1) return X$.none; var i2, o2 = r2.main, a2 = null; if (o2.empty) { if (!t2.highlightWordAroundCursor) return X$.none; var s2 = n2.wordAt(o2.head); if (!s2) return X$.none; a2 = n2.charCategorizer(o2.head), i2 = n2.sliceDoc(s2.from, s2.to); } else { var u2 = o2.to - o2.from; if (u2 < t2.minSelectionLength || u2 > 200) return X$.none; if (t2.wholeWords) { if (i2 = n2.sliceDoc(o2.from, o2.to), !TD(a2 = n2.charCategorizer(o2.head), n2, o2.from, o2.to) || !function(e24, t3, n3, r3) { return e24(t3.sliceDoc(n3, n3 + 1)) == d_.Word && e24(t3.sliceDoc(r3 - 1, r3)) == d_.Word; }(a2, n2, o2.from, o2.to)) return X$.none; } else if (!(i2 = n2.sliceDoc(o2.from, o2.to).trim())) return X$.none; } var c2, l2 = [], f2 = bi(e23.visibleRanges); try { for (f2.s(); !(c2 = f2.n()).done; ) for (var h2 = c2.value, d2 = new bD(n2.doc, i2, h2.from, h2.to); !d2.next().done; ) { var v2 = d2.value, p2 = v2.from, m2 = v2.to; if ((!a2 || TD(a2, n2, p2, m2)) && (o2.empty && p2 <= o2.from && m2 >= o2.to ? l2.push(ND.range(p2, m2)) : (p2 >= o2.to || m2 <= o2.from) && l2.push(PD.range(p2, m2)), l2.length > t2.maxMatches)) return X$.none; } } catch (e24) { f2.e(e24); } finally { f2.f(); } return X$.set(l2); } }]), e22; }(), { decorations: function(e22) { return e22.decorations; } }), RD = PM.baseTheme({ ".cm-selectionMatch": { backgroundColor: "#99ff7780" }, ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" } }); var DD = AC.define({ combine: function(e22) { var t2; return { top: e22.reduce(function(e23, t3) { return e23 != null ? e23 : t3.top; }, void 0) || false, caseSensitive: e22.reduce(function(e23, t3) { return e23 != null ? e23 : t3.caseSensitive; }, void 0) || false, createPanel: ((t2 = e22.find(function(e23) { return e23.createPanel; })) === null || t2 === void 0 ? void 0 : t2.createPanel) || function(e23) { return new cz(e23); } }; } }); function zD(e22) { return e22 ? [DD.of(e22), vz] : vz; } var LD = function() { function e22(t2) { Ri(this, e22), this.search = t2.search, this.caseSensitive = !!t2.caseSensitive, this.regexp = !!t2.regexp, this.replace = t2.replace || "", this.valid = !!this.search && (!this.regexp || function(e23) { try { return new RegExp(e23, wD), true; } catch (e24) { return false; } }(this.search)), this.unquoted = t2.literal ? this.search : this.search.replace(/\\([nrt\\])/g, function(e23, t3) { return t3 == "n" ? "\n" : t3 == "r" ? "\r" : t3 == "t" ? " " : "\\"; }); } return zi(e22, [{ key: "eq", value: function(e23) { return this.search == e23.search && this.replace == e23.replace && this.caseSensitive == e23.caseSensitive && this.regexp == e23.regexp; } }, { key: "create", value: function() { return this.regexp ? new HD(this) : new FD(this); } }, { key: "getCursor", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e23.length; return this.regexp ? VD(this, e23, t2, n2) : qD(this, e23, t2, n2); } }]), e22; }(), BD = zi(function e11(t2) { Ri(this, e11), this.spec = t2; }); function qD(e22, t2, n2, r2) { return new bD(t2, e22.unquoted, n2, r2, e22.caseSensitive ? void 0 : function(e23) { return e23.toLowerCase(); }); } var FD = function(e22) { _i(n2, BD); var t2 = Oi(n2); function n2(e23) { return Ri(this, n2), t2.call(this, e23); } return zi(n2, [{ key: "nextMatch", value: function(e23, t3, n3) { var r2 = qD(this.spec, e23, n3, e23.length).nextOverlapping(); return r2.done && (r2 = qD(this.spec, e23, 0, t3).nextOverlapping()), r2.done ? null : r2.value; } }, { key: "prevMatchInRange", value: function(e23, t3, n3) { for (var r2 = n3; ; ) { for (var i2 = Math.max(t3, r2 - 1e4 - this.spec.unquoted.length), o2 = qD(this.spec, e23, i2, r2), a2 = null; !o2.nextOverlapping().done; ) a2 = o2.value; if (a2) return a2; if (i2 == t3) return null; r2 -= 1e4; } } }, { key: "prevMatch", value: function(e23, t3, n3) { return this.prevMatchInRange(e23, 0, t3) || this.prevMatchInRange(e23, n3, e23.length); } }, { key: "getReplacement", value: function(e23) { return this.spec.replace; } }, { key: "matchAll", value: function(e23, t3) { for (var n3 = qD(this.spec, e23, 0, e23.length), r2 = []; !n3.next().done; ) { if (r2.length >= t3) return null; r2.push(n3.value); } return r2; } }, { key: "highlight", value: function(e23, t3, n3, r2) { for (var i2 = qD(this.spec, e23, Math.max(0, t3 - this.spec.unquoted.length), Math.min(n3 + this.spec.unquoted.length, e23.length)); !i2.next().done; ) r2(i2.value.from, i2.value.to); } }]), n2; }(); function VD(e22, t2, n2, r2) { return new xD(t2, e22.search, e22.caseSensitive ? void 0 : { ignoreCase: true }, n2, r2); } var HD = function(e22) { _i(n2, BD); var t2 = Oi(n2); function n2() { return Ri(this, n2), t2.apply(this, arguments); } return zi(n2, [{ key: "nextMatch", value: function(e23, t3, n3) { var r2 = VD(this.spec, e23, n3, e23.length).next(); return r2.done && (r2 = VD(this.spec, e23, 0, t3).next()), r2.done ? null : r2.value; } }, { key: "prevMatchInRange", value: function(e23, t3, n3) { for (var r2 = 1; ; r2++) { for (var i2 = Math.max(t3, n3 - 1e4 * r2), o2 = VD(this.spec, e23, i2, n3), a2 = null; !o2.next().done; ) a2 = o2.value; if (a2 && (i2 == t3 || a2.from > i2 + 10)) return a2; if (i2 == t3) return null; } } }, { key: "prevMatch", value: function(e23, t3, n3) { return this.prevMatchInRange(e23, 0, t3) || this.prevMatchInRange(e23, n3, e23.length); } }, { key: "getReplacement", value: function(e23) { return this.spec.replace.replace(/\$([$&\d+])/g, function(t3, n3) { return n3 == "$" ? "$" : n3 == "&" ? e23.match[0] : n3 != "0" && +n3 < e23.match.length ? e23.match[n3] : t3; }); } }, { key: "matchAll", value: function(e23, t3) { for (var n3 = VD(this.spec, e23, 0, e23.length), r2 = []; !n3.next().done; ) { if (r2.length >= t3) return null; r2.push(n3.value); } return r2; } }, { key: "highlight", value: function(e23, t3, n3, r2) { for (var i2 = VD(this.spec, e23, Math.max(0, t3 - 250), Math.min(n3 + 250, e23.length)); !i2.next().done; ) r2(i2.value.from, i2.value.to); } }]), n2; }(), WD = i_.define(), JD = i_.define(), UD = IC.define({ create: function(e22) { return new KD(oz(e22).create(), null); }, update: function(e22, t2) { var n2, r2 = bi(t2.effects); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; i2.is(WD) ? e22 = new KD(i2.value.create(), e22.panel) : i2.is(JD) && (e22 = new KD(e22.query, i2.value ? iz : null)); } } catch (e23) { r2.e(e23); } finally { r2.f(); } return e22; }, provide: function(e22) { return WE.from(e22, function(e23) { return e23.panel; }); } }), KD = zi(function e12(t2, n2) { Ri(this, e12), this.query = t2, this.panel = n2; }), GD = X$.mark({ class: "cm-searchMatch" }), QD = X$.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), YD = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.decorations = this.highlight(t2.state.field(UD)); } return zi(e22, [{ key: "update", value: function(e23) { var t2 = e23.state.field(UD); (t2 != e23.startState.field(UD) || e23.docChanged || e23.selectionSet || e23.viewportChanged) && (this.decorations = this.highlight(t2)); } }, { key: "highlight", value: function(e23) { var t2 = e23.query; if (!e23.panel || !t2.spec.valid) return X$.none; for (var n2 = this.view, r2 = new S_(), i2 = 0, o2 = n2.visibleRanges, a2 = o2.length; i2 < a2; i2++) { for (var s2 = o2[i2], u2 = s2.from, c2 = s2.to; i2 < a2 - 1 && c2 > o2[i2 + 1].from - 500; ) c2 = o2[++i2].to; t2.highlight(n2.state.doc, u2, c2, function(e24, t3) { var i3 = n2.state.selection.ranges.some(function(n3) { return n3.from == e24 && n3.to == t3; }); r2.add(e24, t3, i3 ? QD : GD); }); } return r2.finish(); } }]), e22; }(), { decorations: function(e22) { return e22.decorations; } }); function ZD(e22) { return function(t2) { var n2 = t2.state.field(UD, false); return n2 && n2.query.spec.valid ? e22(t2, n2) : az(t2); }; } var XD = ZD(function(e22, t2) { var n2 = t2.query, r2 = e22.state.selection.main, i2 = r2.from, o2 = r2.to, a2 = n2.nextMatch(e22.state.doc, i2, o2); return !(!a2 || a2.from == i2 && a2.to == o2) && (e22.dispatch({ selection: { anchor: a2.from, head: a2.to }, scrollIntoView: true, effects: hz(e22, a2), userEvent: "select.search" }), true); }), ez = ZD(function(e22, t2) { var n2 = t2.query, r2 = e22.state, i2 = r2.selection.main, o2 = i2.from, a2 = i2.to, s2 = n2.prevMatch(r2.doc, o2, a2); return !!s2 && (e22.dispatch({ selection: { anchor: s2.from, head: s2.to }, scrollIntoView: true, effects: hz(e22, s2), userEvent: "select.search" }), true); }), tz = ZD(function(e22, t2) { var n2 = t2.query.matchAll(e22.state.doc, 1e3); return !(!n2 || !n2.length) && (e22.dispatch({ selection: _C.create(n2.map(function(e23) { return _C.range(e23.from, e23.to); })), userEvent: "select.search.matches" }), true); }), nz = ZD(function(e22, t2) { var n2 = t2.query, r2 = e22.state, i2 = r2.selection.main, o2 = i2.from, a2 = i2.to; if (r2.readOnly) return false; var s2 = n2.nextMatch(r2.doc, o2, o2); if (!s2) return false; var u2, c2, l2 = [], f2 = []; if (s2.from == o2 && s2.to == a2 && (c2 = r2.toText(n2.getReplacement(s2)), l2.push({ from: s2.from, to: s2.to, insert: c2 }), s2 = n2.nextMatch(r2.doc, s2.from, s2.to), f2.push(PM.announce.of(r2.phrase("replaced match on line $", r2.doc.lineAt(o2).number) + "."))), s2) { var h2 = l2.length == 0 || l2[0].from >= s2.to ? 0 : s2.to - s2.from - c2.length; u2 = { anchor: s2.from - h2, head: s2.to - h2 }, f2.push(hz(e22, s2)); } return e22.dispatch({ changes: l2, selection: u2, scrollIntoView: !!u2, effects: f2, userEvent: "input.replace" }), true; }), rz = ZD(function(e22, t2) { var n2 = t2.query; if (e22.state.readOnly) return false; var r2 = n2.matchAll(e22.state.doc, 1e9).map(function(e23) { return { from: e23.from, to: e23.to, insert: n2.getReplacement(e23) }; }); if (!r2.length) return false; var i2 = e22.state.phrase("replaced $ matches", r2.length) + "."; return e22.dispatch({ changes: r2, effects: PM.announce.of(i2), userEvent: "input.replace.all" }), true; }); function iz(e22) { return e22.state.facet(DD).createPanel(e22); } function oz(e22, t2) { var n2, r2 = e22.selection.main, i2 = r2.empty || r2.to > r2.from + 100 ? "" : e22.sliceDoc(r2.from, r2.to), o2 = (n2 = t2 == null ? void 0 : t2.caseSensitive) !== null && n2 !== void 0 ? n2 : e22.facet(DD).caseSensitive; return t2 && !i2 ? t2 : new LD({ search: i2.replace(/\n/g, "\\n"), caseSensitive: o2 }); } var az = function(e22) { var t2 = e22.state.field(UD, false); if (t2 && t2.panel) { var n2 = qE(e22, iz); if (!n2) return false; var r2 = n2.dom.querySelector("[main-field]"); if (r2 && r2 != e22.root.activeElement) { var i2 = oz(e22.state, t2.query.spec); i2.valid && e22.dispatch({ effects: WD.of(i2) }), r2.focus(), r2.select(); } } else e22.dispatch({ effects: [JD.of(true), t2 ? WD.of(oz(e22.state, t2.query.spec)) : i_.appendConfig.of(vz)] }); return true; }, sz = function(e22) { var t2 = e22.state.field(UD, false); if (!t2 || !t2.panel) return false; var n2 = qE(e22, iz); return n2 && n2.dom.contains(e22.root.activeElement) && e22.focus(), e22.dispatch({ effects: JD.of(false) }), true; }, uz = [{ key: "Mod-f", run: az, scope: "editor search-panel" }, { key: "F3", run: XD, shift: ez, scope: "editor search-panel", preventDefault: true }, { key: "Mod-g", run: XD, shift: ez, scope: "editor search-panel", preventDefault: true }, { key: "Escape", run: sz, scope: "editor search-panel" }, { key: "Mod-Shift-l", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch, r2 = t2.selection; if (r2.ranges.length > 1 || r2.main.empty) return false; for (var i2 = r2.main, o2 = i2.from, a2 = i2.to, s2 = [], u2 = 0, c2 = new bD(t2.doc, t2.sliceDoc(o2, a2)); !c2.next().done; ) { if (s2.length > 1e3) return false; c2.value.from == o2 && (u2 = s2.length), s2.push(_C.range(c2.value.from, c2.value.to)); } return n2(t2.update({ selection: _C.create(s2, u2), userEvent: "select.search.matches" })), true; } }, { key: "Alt-g", run: function(e22) { var t2 = qE(e22, _D); if (!t2) { var n2 = [$D.of(true)]; e22.state.field(OD, false) == null && n2.push(i_.appendConfig.of([OD, AD])), e22.dispatch({ effects: n2 }), t2 = qE(e22, _D); } return t2 && t2.dom.querySelector("input").focus(), true; } }, { key: "Mod-d", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch, r2 = t2.selection.ranges; if (r2.some(function(e23) { return e23.from === e23.to; })) return function(e23) { var t3 = e23.state, n3 = e23.dispatch, r3 = t3.selection, i3 = _C.create(r3.ranges.map(function(e24) { return t3.wordAt(e24.head) || _C.cursor(e24.head); }), r3.mainIndex); return !i3.eq(r3) && (n3(t3.update({ selection: i3 })), true); }({ state: t2, dispatch: n2 }); var i2 = t2.sliceDoc(r2[0].from, r2[0].to); if (t2.selection.ranges.some(function(e23) { return t2.sliceDoc(e23.from, e23.to) != i2; })) return false; var o2 = function(e23, t3) { for (var n3 = e23.selection, r3 = n3.main, i3 = n3.ranges, o3 = e23.wordAt(r3.head), a2 = o3 && o3.from == r3.from && o3.to == r3.to, s2 = function(n4, r4) { if (r4.next(), !r4.done) { if (n4 && i3.some(function(e24) { return e24.from == r4.value.from; })) return c2 = r4, u2 = n4, "continue"; if (a2) { var o4 = e23.wordAt(r4.value.from); if (!o4 || o4.from != r4.value.from || o4.to != r4.value.to) return c2 = r4, u2 = n4, "continue"; } return u2 = n4, c2 = r4, { v: r4.value }; } if (n4) return c2 = r4, u2 = n4, { v: null }; r4 = new bD(e23.doc, t3, 0, Math.max(0, i3[i3.length - 1].from - 1)), u2 = n4 = true, c2 = r4; }, u2 = false, c2 = new bD(e23.doc, t3, i3[i3.length - 1].to); ; ) { var l2 = s2(u2, c2); if (l2 !== "continue" && Li(l2) === "object") return l2.v; } }(t2, i2); return !!o2 && (n2(t2.update({ selection: t2.selection.addRange(_C.range(o2.from, o2.to), false), effects: PM.scrollIntoView(o2.to) })), true); }, preventDefault: true }], cz = function() { function e22(t2) { var n2 = this; Ri(this, e22), this.view = t2; var r2 = this.query = t2.state.field(UD).query.spec; function i2(e23, t3, n3) { return mD("button", { class: "cm-button", name: e23, onclick: t3, type: "button" }, n3); } this.commit = this.commit.bind(this), this.searchField = mD("input", { value: r2.search, placeholder: lz(t2, "Find"), "aria-label": lz(t2, "Find"), class: "cm-textfield", name: "search", "main-field": "true", onchange: this.commit, onkeyup: this.commit }), this.replaceField = mD("input", { value: r2.replace, placeholder: lz(t2, "Replace"), "aria-label": lz(t2, "Replace"), class: "cm-textfield", name: "replace", onchange: this.commit, onkeyup: this.commit }), this.caseField = mD("input", { type: "checkbox", name: "case", checked: r2.caseSensitive, onchange: this.commit }), this.reField = mD("input", { type: "checkbox", name: "re", checked: r2.regexp, onchange: this.commit }), this.dom = mD("div", { onkeydown: function(e23) { return n2.keydown(e23); }, class: "cm-search" }, [this.searchField, i2("next", function() { return XD(t2); }, [lz(t2, "next")]), i2("prev", function() { return ez(t2); }, [lz(t2, "previous")]), i2("select", function() { return tz(t2); }, [lz(t2, "all")]), mD("label", null, [this.caseField, lz(t2, "match case")]), mD("label", null, [this.reField, lz(t2, "regexp")])].concat(Ni(t2.state.readOnly ? [] : [mD("br"), this.replaceField, i2("replace", function() { return nz(t2); }, [lz(t2, "replace")]), i2("replaceAll", function() { return rz(t2); }, [lz(t2, "replace all")]), mD("button", { name: "close", onclick: function() { return sz(t2); }, "aria-label": lz(t2, "close"), type: "button" }, ["\xD7"])]))); } return zi(e22, [{ key: "commit", value: function() { var e23 = new LD({ search: this.searchField.value, caseSensitive: this.caseField.checked, regexp: this.reField.checked, replace: this.replaceField.value }); e23.eq(this.query) || (this.query = e23, this.view.dispatch({ effects: WD.of(e23) })); } }, { key: "keydown", value: function(e23) { var t2, n2, r2; t2 = this.view, n2 = e23, r2 = "search-panel", WM(VM(t2.state), n2, t2, r2) ? e23.preventDefault() : e23.keyCode == 13 && e23.target == this.searchField ? (e23.preventDefault(), (e23.shiftKey ? ez : XD)(this.view)) : e23.keyCode == 13 && e23.target == this.replaceField && (e23.preventDefault(), nz(this.view)); } }, { key: "update", value: function(e23) { var t2, n2 = bi(e23.transactions); try { for (n2.s(); !(t2 = n2.n()).done; ) { var r2, i2 = bi(t2.value.effects); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; o2.is(WD) && !o2.value.eq(this.query) && this.setQuery(o2.value); } } catch (e24) { i2.e(e24); } finally { i2.f(); } } } catch (e24) { n2.e(e24); } finally { n2.f(); } } }, { key: "setQuery", value: function(e23) { this.query = e23, this.searchField.value = e23.search, this.replaceField.value = e23.replace, this.caseField.checked = e23.caseSensitive, this.reField.checked = e23.regexp; } }, { key: "mount", value: function() { this.searchField.select(); } }, { key: "pos", get: function() { return 80; } }, { key: "top", get: function() { return this.view.state.facet(DD).top; } }]), e22; }(); function lz(e22, t2) { return e22.state.phrase(t2); } var fz = /[\s\.,:;?!]/; function hz(e22, t2) { var n2 = t2.from, r2 = t2.to, i2 = e22.state.doc.lineAt(n2), o2 = e22.state.doc.lineAt(r2).to, a2 = Math.max(i2.from, n2 - 30), s2 = Math.min(o2, r2 + 30), u2 = e22.state.sliceDoc(a2, s2); if (a2 != i2.from) { for (var c2 = 0; c2 < 30; c2++) if (!fz.test(u2[c2 + 1]) && fz.test(u2[c2])) { u2 = u2.slice(c2); break; } } if (s2 != o2) { for (var l2 = u2.length - 1; l2 > u2.length - 30; l2--) if (!fz.test(u2[l2 - 1]) && fz.test(u2[l2])) { u2 = u2.slice(0, l2); break; } } return PM.announce.of("".concat(e22.state.phrase("current match"), ". ").concat(u2, " ").concat(e22.state.phrase("on line"), " ").concat(i2.number, ".")); } var dz = PM.baseTheme({ ".cm-panel.cm-search": { padding: "2px 6px 4px", position: "relative", "& [name=close]": { position: "absolute", top: "0", right: "4px", backgroundColor: "inherit", border: "none", font: "inherit", padding: 0, margin: 0 }, "& input, & button, & label": { margin: ".2em .6em .2em 0" }, "& input[type=checkbox]": { marginRight: ".2em" }, "& label": { fontSize: "80%", whiteSpace: "pre" } }, "&light .cm-searchMatch": { backgroundColor: "#ffff0054" }, "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" }, "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" }, "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" } }), vz = [UD, qC.lowest(YD), dz], pz = function() { function e22(t2, n2, r2) { Ri(this, e22), this.state = t2, this.pos = n2, this.explicit = r2, this.abortListeners = []; } return zi(e22, [{ key: "tokenBefore", value: function(e23) { for (var t2 = WN(this.state).resolveInner(this.pos, -1); t2 && e23.indexOf(t2.name) < 0; ) t2 = t2.parent; return t2 ? { from: t2.from, to: this.pos, text: this.state.sliceDoc(t2.from, this.pos), type: t2.type } : null; } }, { key: "matchBefore", value: function(e23) { var t2 = this.state.doc.lineAt(this.pos), n2 = Math.max(t2.from, this.pos - 250), r2 = t2.text.slice(n2 - t2.from, this.pos - t2.from), i2 = r2.search(kz(e23, false)); return i2 < 0 ? null : { from: n2 + i2, to: this.pos, text: r2.slice(i2) }; } }, { key: "aborted", get: function() { return this.abortListeners == null; } }, { key: "addEventListener", value: function(e23, t2) { e23 == "abort" && this.abortListeners && this.abortListeners.push(t2); } }]), e22; }(); function mz(e22) { var t2 = Object.keys(e22).join(""), n2 = /\w/.test(t2); return n2 && (t2 = t2.replace(/\w/g, "")), "[".concat(n2 ? "\\w" : "").concat(t2.replace(/[^\w\s]/g, "\\$&"), "]"); } function gz(e22) { var t2 = e22.map(function(e23) { return typeof e23 == "string" ? { label: e23 } : e23; }), n2 = ki(t2.every(function(e23) { return /^\w+$/.test(e23.label); }) ? [/\w*$/, /\w+$/] : function(e23) { var t3, n3 = /* @__PURE__ */ Object.create(null), r3 = /* @__PURE__ */ Object.create(null), i3 = bi(e23); try { for (i3.s(); !(t3 = i3.n()).done; ) { var o2 = t3.value.label; n3[o2[0]] = true; for (var a2 = 1; a2 < o2.length; a2++) r3[o2[a2]] = true; } } catch (e24) { i3.e(e24); } finally { i3.f(); } var s2 = mz(n3) + mz(r3) + "*$"; return [new RegExp("^" + s2), new RegExp(s2)]; }(t2), 2), r2 = n2[0], i2 = n2[1]; return function(e23) { var n3 = e23.matchBefore(i2); return n3 || e23.explicit ? { from: n3 ? n3.from : e23.pos, options: t2, validFor: r2 } : null; }; } var yz = zi(function e13(t2, n2, r2) { Ri(this, e13), this.completion = t2, this.source = n2, this.match = r2; }); function bz(e22) { return e22.selection.main.head; } function kz(e22, t2) { var n2, r2 = e22.source, i2 = t2 && r2[0] != "^", o2 = r2[r2.length - 1] != "$"; return i2 || o2 ? new RegExp("".concat(i2 ? "^" : "", "(?:").concat(r2, ")").concat(o2 ? "$" : ""), (n2 = e22.flags) !== null && n2 !== void 0 ? n2 : e22.ignoreCase ? "i" : "") : e22; } function wz(e22, t2) { var n2 = t2.completion.apply || t2.completion.label, r2 = t2.source; typeof n2 == "string" ? e22.dispatch(function(e23, t3, n3, r3) { return Object.assign(Object.assign({}, e23.changeByRange(function(i2) { if (i2 == e23.selection.main) return { changes: { from: n3, to: r3, insert: t3 }, range: _C.cursor(n3 + t3.length) }; var o2 = r3 - n3; return !i2.empty || o2 && e23.sliceDoc(i2.from - o2, i2.from) != e23.sliceDoc(n3, r3) ? { range: i2 } : { changes: { from: i2.from - o2, to: i2.from, insert: t3 }, range: _C.cursor(i2.from - o2 + t3.length) }; })), { userEvent: "input.complete" }); }(e22.state, n2, r2.from, r2.to)) : n2(e22, t2.completion, r2.from, r2.to); } var xz = /* @__PURE__ */ new WeakMap(); function jz(e22) { if (!Array.isArray(e22)) return e22; var t2 = xz.get(e22); return t2 || xz.set(e22, t2 = gz(e22)), t2; } var Sz = function() { function e22(t2) { Ri(this, e22), this.pattern = t2, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = []; for (var n2 = 0; n2 < t2.length; ) { var r2 = hC(t2, n2), i2 = vC(r2); this.chars.push(r2); var o2 = t2.slice(n2, n2 + i2), a2 = o2.toUpperCase(); this.folded.push(hC(a2 == o2 ? o2.toLowerCase() : a2, 0)), n2 += i2; } this.astral = t2.length != this.chars.length; } return zi(e22, [{ key: "match", value: function(e23) { if (this.pattern.length == 0) return [0]; if (e23.length < this.pattern.length) return null; var t2 = this.chars, n2 = this.folded, r2 = this.any, i2 = this.precise, o2 = this.byWord; if (t2.length == 1) { var a2 = hC(e23, 0); return a2 == t2[0] ? [0, 0, vC(a2)] : a2 == n2[0] ? [-200, 0, vC(a2)] : null; } var s2 = e23.indexOf(this.pattern); if (s2 == 0) return [0, 0, this.pattern.length]; var u2 = t2.length, c2 = 0; if (s2 < 0) { for (var l2 = 0, f2 = Math.min(e23.length, 200); l2 < f2 && c2 < u2; ) { var h2 = hC(e23, l2); h2 != t2[c2] && h2 != n2[c2] || (r2[c2++] = l2), l2 += vC(h2); } if (c2 < u2) return null; } for (var d2 = 0, v2 = 0, p2 = false, m2 = 0, g2 = -1, y2 = -1, b2 = /[a-z]/.test(e23), k2 = true, w2 = 0, x2 = Math.min(e23.length, 200), j2 = 0; w2 < x2 && v2 < u2; ) { var S2 = hC(e23, w2); s2 < 0 && (d2 < u2 && S2 == t2[d2] && (i2[d2++] = w2), m2 < u2 && (S2 == t2[m2] || S2 == n2[m2] ? (m2 == 0 && (g2 = w2), y2 = w2 + 1, m2++) : m2 = 0)); var C2 = void 0, _2 = S2 < 255 ? S2 >= 48 && S2 <= 57 || S2 >= 97 && S2 <= 122 ? 2 : S2 >= 65 && S2 <= 90 ? 1 : 0 : (C2 = dC(S2)) != C2.toLowerCase() ? 1 : C2 != C2.toUpperCase() ? 2 : 0; (!w2 || _2 == 1 && b2 || j2 == 0 && _2 != 0) && (t2[v2] == S2 || n2[v2] == S2 && (p2 = true) ? o2[v2++] = w2 : o2.length && (k2 = false)), j2 = _2, w2 += vC(S2); } return v2 == u2 && o2[0] == 0 && k2 ? this.result((p2 ? -200 : 0) - 100, o2, e23) : m2 == u2 && g2 == 0 ? [-200 - e23.length, 0, y2] : s2 > -1 ? [-700 - e23.length, s2, s2 + this.pattern.length] : m2 == u2 ? [-900 - e23.length, g2, y2] : v2 == u2 ? this.result((p2 ? -200 : 0) - 100 - 700 + (k2 ? 0 : -1100), o2, e23) : t2.length == 2 ? null : this.result((r2[0] ? -700 : 0) - 200 - 1100, r2, e23); } }, { key: "result", value: function(e23, t2, n2) { var r2, i2 = [e23 - n2.length], o2 = 1, a2 = bi(t2); try { for (a2.s(); !(r2 = a2.n()).done; ) { var s2 = r2.value, u2 = s2 + (this.astral ? vC(hC(n2, s2)) : 1); o2 > 1 && i2[o2 - 1] == s2 ? i2[o2 - 1] = u2 : (i2[o2++] = s2, i2[o2++] = u2); } } catch (e24) { a2.e(e24); } finally { a2.f(); } return i2; } }]), e22; }(), Cz = AC.define({ combine: function(e22) { return g_(e22, { activateOnTyping: true, override: null, closeOnBlur: true, maxRenderedOptions: 100, defaultKeymap: true, optionClass: function() { return ""; }, aboveCursor: false, icons: true, addToOptions: [] }, { defaultKeymap: function(e23, t2) { return e23 && t2; }, closeOnBlur: function(e23, t2) { return e23 && t2; }, icons: function(e23, t2) { return e23 && t2; }, optionClass: function(e23, t2) { return function(n2) { return function(e24, t3) { return e24 ? t3 ? e24 + " " + t3 : e24 : t3; }(e23(n2), t2(n2)); }; }, addToOptions: function(e23, t2) { return e23.concat(t2); } }); } }); function _z(e22, t2, n2) { if (e22 <= n2) return { from: 0, to: e22 }; if (t2 <= e22 >> 1) { var r2 = Math.floor(t2 / n2); return { from: r2 * n2, to: (r2 + 1) * n2 }; } var i2 = Math.floor((e22 - t2) / n2); return { from: e22 - (i2 + 1) * n2, to: e22 - i2 * n2 }; } var $z = function() { function e22(t2, n2) { var r2 = this; Ri(this, e22), this.view = t2, this.stateField = n2, this.info = null, this.placeInfo = { read: function() { return r2.measureInfo(); }, write: function(e23) { return r2.positionInfo(e23); }, key: this }; var i2 = t2.state.field(n2), o2 = i2.open, a2 = o2.options, s2 = o2.selected, u2 = t2.state.facet(Cz); this.optionContent = function(e23) { var t3 = e23.addToOptions.slice(); return e23.icons && t3.push({ render: function(e24) { var t4, n3 = document.createElement("div"); return n3.classList.add("cm-completionIcon"), e24.type && (t4 = n3.classList).add.apply(t4, Ni(e24.type.split(/\s+/g).map(function(e25) { return "cm-completionIcon-" + e25; }))), n3.setAttribute("aria-hidden", "true"), n3; }, position: 20 }), t3.push({ render: function(e24, t4, n3) { var r3 = document.createElement("span"); r3.className = "cm-completionLabel"; for (var i3 = e24.label, o3 = 0, a3 = 1; a3 < n3.length; ) { var s3 = n3[a3++], u3 = n3[a3++]; s3 > o3 && r3.appendChild(document.createTextNode(i3.slice(o3, s3))); var c2 = r3.appendChild(document.createElement("span")); c2.appendChild(document.createTextNode(i3.slice(s3, u3))), c2.className = "cm-completionMatchedText", o3 = u3; } return o3 < i3.length && r3.appendChild(document.createTextNode(i3.slice(o3))), r3; }, position: 50 }, { render: function(e24) { if (!e24.detail) return null; var t4 = document.createElement("span"); return t4.className = "cm-completionDetail", t4.textContent = e24.detail, t4; }, position: 80 }), t3.sort(function(e24, t4) { return e24.position - t4.position; }).map(function(e24) { return e24.render; }); }(u2), this.optionClass = u2.optionClass, this.range = _z(a2.length, s2, u2.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.dom.addEventListener("mousedown", function(e23) { for (var n3, i3 = e23.target; i3 && i3 != r2.dom; i3 = i3.parentNode) if (i3.nodeName == "LI" && (n3 = /-(\d+)$/.exec(i3.id)) && +n3[1] < a2.length) return wz(t2, a2[+n3[1]]), void e23.preventDefault(); }), this.list = this.dom.appendChild(this.createListBox(a2, i2.id, this.range)), this.list.addEventListener("scroll", function() { r2.info && r2.view.requestMeasure(r2.placeInfo); }); } return zi(e22, [{ key: "mount", value: function() { this.updateSel(); } }, { key: "update", value: function(e23) { e23.state.field(this.stateField) != e23.startState.field(this.stateField) && this.updateSel(); } }, { key: "positioned", value: function() { this.info && this.view.requestMeasure(this.placeInfo); } }, { key: "updateSel", value: function() { var e23 = this, t2 = this.view.state.field(this.stateField), n2 = t2.open; if ((n2.selected < this.range.from || n2.selected >= this.range.to) && (this.range = _z(n2.options.length, n2.selected, this.view.state.facet(Cz).maxRenderedOptions), this.list.remove(), this.list = this.dom.appendChild(this.createListBox(n2.options, t2.id, this.range)), this.list.addEventListener("scroll", function() { e23.info && e23.view.requestMeasure(e23.placeInfo); })), this.updateSelectedOption(n2.selected)) { this.info && (this.info.remove(), this.info = null); var r2 = n2.options[n2.selected].completion, i2 = r2.info; if (!i2) return; var o2 = typeof i2 == "string" ? document.createTextNode(i2) : i2(r2); if (!o2) return; "then" in o2 ? o2.then(function(n3) { n3 && e23.view.state.field(e23.stateField, false) == t2 && e23.addInfoPane(n3); }).catch(function(t3) { return bO(e23.view.state, t3, "completion info"); }) : this.addInfoPane(o2); } } }, { key: "addInfoPane", value: function(e23) { var t2 = this.info = document.createElement("div"); t2.className = "cm-tooltip cm-completionInfo", t2.appendChild(e23), this.dom.appendChild(t2), this.view.requestMeasure(this.placeInfo); } }, { key: "updateSelectedOption", value: function(e23) { for (var t2 = null, n2 = this.list.firstChild, r2 = this.range.from; n2; n2 = n2.nextSibling, r2++) r2 == e23 ? n2.hasAttribute("aria-selected") || (n2.setAttribute("aria-selected", "true"), t2 = n2) : n2.hasAttribute("aria-selected") && n2.removeAttribute("aria-selected"); return t2 && function(e24, t3) { var n3 = e24.getBoundingClientRect(), r3 = t3.getBoundingClientRect(); r3.top < n3.top ? e24.scrollTop -= n3.top - r3.top : r3.bottom > n3.bottom && (e24.scrollTop += r3.bottom - n3.bottom); }(this.list, t2), t2; } }, { key: "measureInfo", value: function() { var e23 = this.dom.querySelector("[aria-selected]"); if (!e23 || !this.info) return null; var t2 = this.dom.getBoundingClientRect(), n2 = this.info.getBoundingClientRect(), r2 = e23.getBoundingClientRect(); if (r2.top > Math.min(innerHeight, t2.bottom) - 10 || r2.bottom < Math.max(0, t2.top) + 10) return null; var i2 = Math.max(0, Math.min(r2.top, innerHeight - n2.height)) - t2.top, o2 = this.view.textDirection == NO.RTL, a2 = t2.left, s2 = innerWidth - t2.right; return o2 && a2 < Math.min(n2.width, s2) ? o2 = false : !o2 && s2 < Math.min(n2.width, a2) && (o2 = true), { top: i2, left: o2 }; } }, { key: "positionInfo", value: function(e23) { this.info && (this.info.style.top = (e23 ? e23.top : -1e6) + "px", e23 && (this.info.classList.toggle("cm-completionInfo-left", e23.left), this.info.classList.toggle("cm-completionInfo-right", !e23.left))); } }, { key: "createListBox", value: function(e23, t2, n2) { var r2 = document.createElement("ul"); r2.id = t2, r2.setAttribute("role", "listbox"), r2.setAttribute("aria-expanded", "true"), r2.setAttribute("aria-label", this.view.state.phrase("Completions")); for (var i2 = n2.from; i2 < n2.to; i2++) { var o2 = e23[i2], a2 = o2.completion, s2 = o2.match, u2 = r2.appendChild(document.createElement("li")); u2.id = t2 + "-" + i2, u2.setAttribute("role", "option"); var c2 = this.optionClass(a2); c2 && (u2.className = c2); var l2, f2 = bi(this.optionContent); try { for (f2.s(); !(l2 = f2.n()).done; ) { var h2 = (0, l2.value)(a2, this.view.state, s2); h2 && u2.appendChild(h2); } } catch (e24) { f2.e(e24); } finally { f2.f(); } } return n2.from && r2.classList.add("cm-completionListIncompleteTop"), n2.to < e23.length && r2.classList.add("cm-completionListIncompleteBottom"), r2; } }]), e22; }(); function Oz(e22) { return 100 * (e22.boost || 0) + (e22.apply ? 10 : 0) + (e22.info ? 5 : 0) + (e22.type ? 1 : 0); } var Az = function() { function e22(t2, n2, r2, i2, o2) { Ri(this, e22), this.options = t2, this.attrs = n2, this.tooltip = r2, this.timestamp = i2, this.selected = o2; } return zi(e22, [{ key: "setSelected", value: function(t2, n2) { return t2 == this.selected || t2 >= this.options.length ? this : new e22(this.options, Pz(n2, t2), this.tooltip, this.timestamp, t2); } }, { key: "map", value: function(t2) { return new e22(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: t2.mapPos(this.tooltip.pos) }), this.timestamp, this.selected); } }], [{ key: "build", value: function(t2, n2, r2, i2, o2) { var a2 = function(e23, t3) { var n3, r3 = [], i3 = 0, o3 = bi(e23); try { for (o3.s(); !(n3 = o3.n()).done; ) { var a3 = n3.value; if (a3.hasResult()) if (a3.result.filter === false) { var s3, u3 = a3.result.getMatch, c3 = bi(a3.result.options); try { for (c3.s(); !(s3 = c3.n()).done; ) { var l3 = s3.value, f2 = [1e9 - i3++]; if (u3) { var h2, d2 = bi(u3(l3)); try { for (d2.s(); !(h2 = d2.n()).done; ) { var v2 = h2.value; f2.push(v2); } } catch (e24) { d2.e(e24); } finally { d2.f(); } } r3.push(new yz(l3, a3, f2)); } } catch (e24) { c3.e(e24); } finally { c3.f(); } } else { var p2, m2 = new Sz(t3.sliceDoc(a3.from, a3.to)), g2 = void 0, y2 = bi(a3.result.options); try { for (y2.s(); !(p2 = y2.n()).done; ) { var b2 = p2.value; (g2 = m2.match(b2.label)) && (b2.boost != null && (g2[0] += b2.boost), r3.push(new yz(b2, a3, g2))); } } catch (e24) { y2.e(e24); } finally { y2.f(); } } } } catch (e24) { o3.e(e24); } finally { o3.f(); } var k2, w2 = [], x2 = null, j2 = bi(r3.sort(Tz)); try { for (j2.s(); !(k2 = j2.n()).done; ) { var S2 = k2.value; !x2 || x2.label != S2.completion.label || x2.detail != S2.completion.detail || x2.type != null && S2.completion.type != null && x2.type != S2.completion.type || x2.apply != S2.completion.apply ? w2.push(S2) : Oz(S2.completion) > Oz(x2) && (w2[w2.length - 1] = S2), x2 = S2.completion; } } catch (e24) { j2.e(e24); } finally { j2.f(); } return w2; }(t2, n2); if (!a2.length) return null; var s2, u2 = 0; if (i2 && i2.selected) { for (var c2 = i2.options[i2.selected].completion, l2 = 0; l2 < a2.length; l2++) if (a2[l2].completion == c2) { u2 = l2; break; } } return new e22(a2, Pz(r2, u2), { pos: t2.reduce(function(e23, t3) { return t3.hasResult() ? Math.min(e23, t3.from) : e23; }, 1e8), create: (s2 = Fz, function(e23) { return new $z(e23, s2); }), above: o2.aboveCursor }, i2 ? i2.timestamp : Date.now(), u2); } }]), e22; }(), Mz = function() { function e22(t2, n2, r2) { Ri(this, e22), this.active = t2, this.id = n2, this.open = r2; } return zi(e22, [{ key: "update", value: function(t2) { var n2 = this, r2 = t2.state, i2 = r2.facet(Cz), o2 = (i2.override || r2.languageDataAt("autocomplete", bz(r2)).map(jz)).map(function(e23) { return (n2.active.find(function(t3) { return t3.source == e23; }) || new Rz(e23, n2.active.some(function(e24) { return e24.state != 0; }) ? 1 : 0)).update(t2, i2); }); o2.length == this.active.length && o2.every(function(e23, t3) { return e23 == n2.active[t3]; }) && (o2 = this.active); var a2 = t2.selection || o2.some(function(e23) { return e23.hasResult() && t2.changes.touchesRange(e23.from, e23.to); }) || !function(e23, t3) { if (e23 == t3) return true; for (var n3 = 0, r3 = 0; ; ) { for (; n3 < e23.length && !e23[n3].hasResult; ) n3++; for (; r3 < t3.length && !t3[r3].hasResult; ) r3++; var i3 = n3 == e23.length, o3 = r3 == t3.length; if (i3 || o3) return i3 == o3; if (e23[n3++].result != t3[r3++].result) return false; } }(o2, this.active) ? Az.build(o2, r2, this.id, this.open, i2) : this.open && t2.docChanged ? this.open.map(t2.changes) : this.open; !a2 && o2.every(function(e23) { return e23.state != 1; }) && o2.some(function(e23) { return e23.hasResult(); }) && (o2 = o2.map(function(e23) { return e23.hasResult() ? new Rz(e23.source, 0) : e23; })); var s2, u2 = bi(t2.effects); try { for (u2.s(); !(s2 = u2.n()).done; ) { var c2 = s2.value; c2.is(qz) && (a2 = a2 && a2.setSelected(c2.value, this.id)); } } catch (e23) { u2.e(e23); } finally { u2.f(); } return o2 == this.active && a2 == this.open ? this : new e22(o2, this.id, a2); } }, { key: "tooltip", get: function() { return this.open ? this.open.tooltip : null; } }, { key: "attrs", get: function() { return this.open ? this.open.attrs : Ez; } }], [{ key: "start", value: function() { return new e22(Nz, "cm-ac-" + Math.floor(2e6 * Math.random()).toString(36), null); } }]), e22; }(); var Ez = { "aria-autocomplete": "list" }; function Pz(e22, t2) { return { "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-activedescendant": e22 + "-" + t2, "aria-controls": e22 }; } var Nz = []; function Tz(e22, t2) { var n2 = t2.match[0] - e22.match[0]; return n2 || e22.completion.label.localeCompare(t2.completion.label); } function Iz(e22) { return e22.isUserEvent("input.type") ? "input" : e22.isUserEvent("delete.backward") ? "delete" : null; } var Rz = function() { function e22(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1; Ri(this, e22), this.source = t2, this.state = n2, this.explicitPos = r2; } return zi(e22, [{ key: "hasResult", value: function() { return false; } }, { key: "update", value: function(t2, n2) { var r2 = Iz(t2), i2 = this; r2 ? i2 = i2.handleUserEvent(t2, r2, n2) : t2.docChanged ? i2 = i2.handleChange(t2) : t2.selection && i2.state != 0 && (i2 = new e22(i2.source, 0)); var o2, a2 = bi(t2.effects); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (s2.is(zz)) i2 = new e22(i2.source, 1, s2.value ? bz(t2.state) : -1); else if (s2.is(Lz)) i2 = new e22(i2.source, 0); else if (s2.is(Bz)) { var u2, c2 = bi(s2.value); try { for (c2.s(); !(u2 = c2.n()).done; ) { var l2 = u2.value; l2.source == i2.source && (i2 = l2); } } catch (e23) { c2.e(e23); } finally { c2.f(); } } } } catch (e23) { a2.e(e23); } finally { a2.f(); } return i2; } }, { key: "handleUserEvent", value: function(t2, n2, r2) { return n2 != "delete" && r2.activateOnTyping ? new e22(this.source, 1) : this.map(t2.changes); } }, { key: "handleChange", value: function(t2) { return t2.changes.touchesRange(bz(t2.startState)) ? new e22(this.source, 0) : this.map(t2.changes); } }, { key: "map", value: function(t2) { return t2.empty || this.explicitPos < 0 ? this : new e22(this.source, this.state, t2.mapPos(this.explicitPos)); } }]), e22; }(), Dz = function(e22) { _i(n2, Rz); var t2 = Oi(n2); function n2(e23, r2, i2, o2, a2) { var s2; return Ri(this, n2), (s2 = t2.call(this, e23, 2, r2)).result = i2, s2.from = o2, s2.to = a2, s2; } return zi(n2, [{ key: "hasResult", value: function() { return true; } }, { key: "handleUserEvent", value: function(e23, t3, r2) { var i2, o2 = e23.changes.mapPos(this.from), a2 = e23.changes.mapPos(this.to, 1), s2 = bz(e23.state); if ((this.explicitPos < 0 ? s2 <= o2 : s2 < this.from) || s2 > a2 || t3 == "delete" && bz(e23.startState) == this.from) return new Rz(this.source, t3 == "input" && r2.activateOnTyping ? 1 : 0); var u2, c2 = this.explicitPos < 0 ? -1 : e23.changes.mapPos(this.explicitPos); return function(e24, t4, n3, r3) { if (!e24) return false; var i3 = t4.sliceDoc(n3, r3); return typeof e24 == "function" ? e24(i3, n3, r3, t4) : kz(e24, true).test(i3); }(this.result.validFor, e23.state, o2, a2) ? new n2(this.source, c2, this.result, o2, a2) : this.result.update && (u2 = this.result.update(this.result, o2, a2, new pz(e23.state, s2, c2 >= 0))) ? new n2(this.source, c2, u2, u2.from, (i2 = u2.to) !== null && i2 !== void 0 ? i2 : bz(e23.state)) : new Rz(this.source, 1, c2); } }, { key: "handleChange", value: function(e23) { return e23.changes.touchesRange(this.from, this.to) ? new Rz(this.source, 0) : this.map(e23.changes); } }, { key: "map", value: function(e23) { return e23.empty ? this : new n2(this.source, this.explicitPos < 0 ? -1 : e23.mapPos(this.explicitPos), this.result, e23.mapPos(this.from), e23.mapPos(this.to, 1)); } }]), n2; }(); var zz = i_.define(), Lz = i_.define(), Bz = i_.define({ map: function(e22, t2) { return e22.map(function(e23) { return e23.map(t2); }); } }), qz = i_.define(), Fz = IC.define({ create: function() { return Mz.start(); }, update: function(e22, t2) { return e22.update(t2); }, provide: function(e22) { return [PE.from(e22, function(e23) { return e23.tooltip; }), PM.contentAttributes.from(e22, function(e23) { return e23.attrs; })]; } }); function Vz(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "option"; return function(n2) { var r2 = n2.state.field(Fz, false); if (!r2 || !r2.open || Date.now() - r2.open.timestamp < 75) return false; var i2, o2 = 1; t2 == "page" && (i2 = zE(n2, r2.open.tooltip)) && (o2 = Math.max(2, Math.floor(i2.dom.offsetHeight / i2.dom.querySelector("li").offsetHeight) - 1)); var a2 = r2.open.selected + o2 * (e22 ? 1 : -1), s2 = r2.open.options.length; return a2 < 0 ? a2 = t2 == "page" ? 0 : s2 - 1 : a2 >= s2 && (a2 = t2 == "page" ? s2 - 1 : 0), n2.dispatch({ effects: qz.of(a2) }), true; }; } var Hz = zi(function e14(t2, n2) { Ri(this, e14), this.active = t2, this.context = n2, this.time = Date.now(), this.updates = [], this.done = void 0; }), Wz = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.composing = 0; var n2, r2 = bi(t2.state.field(Fz).active); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; i2.state == 1 && this.startQuery(i2); } } catch (e23) { r2.e(e23); } finally { r2.f(); } } return zi(e22, [{ key: "update", value: function(e23) { var t2 = this, n2 = e23.state.field(Fz); if (e23.selectionSet || e23.docChanged || e23.startState.field(Fz) != n2) { for (var r2 = e23.transactions.some(function(e24) { return (e24.selection || e24.docChanged) && !Iz(e24); }), i2 = 0; i2 < this.running.length; i2++) { var o2 = this.running[i2]; if (r2 || o2.updates.length + e23.transactions.length > 50 && Date.now() - o2.time > 1e3) { var a2, s2 = bi(o2.context.abortListeners); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = a2.value; try { u2(); } catch (e24) { bO(this.view.state, e24); } } } catch (e24) { s2.e(e24); } finally { s2.f(); } o2.context.abortListeners = null, this.running.splice(i2--, 1); } else { var c2; (c2 = o2.updates).push.apply(c2, Ni(e23.transactions)); } } if (this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), this.debounceUpdate = n2.active.some(function(e24) { return e24.state == 1 && !t2.running.some(function(t3) { return t3.active.source == e24.source; }); }) ? setTimeout(function() { return t2.startUpdate(); }, 50) : -1, this.composing != 0) { var l2, f2 = bi(e23.transactions); try { for (f2.s(); !(l2 = f2.n()).done; ) { var h2 = l2.value; Iz(h2) == "input" ? this.composing = 2 : this.composing == 2 && h2.selection && (this.composing = 3); } } catch (e24) { f2.e(e24); } finally { f2.f(); } } } } }, { key: "startUpdate", value: function() { var e23 = this; this.debounceUpdate = -1; var t2, n2 = bi(this.view.state.field(Fz).active); try { var r2 = function() { var n3 = t2.value; n3.state != 1 || e23.running.some(function(e24) { return e24.active.source == n3.source; }) || e23.startQuery(n3); }; for (n2.s(); !(t2 = n2.n()).done; ) r2(); } catch (e24) { n2.e(e24); } finally { n2.f(); } } }, { key: "startQuery", value: function(e23) { var t2 = this, n2 = this.view.state, r2 = bz(n2), i2 = new pz(n2, r2, e23.explicitPos == r2), o2 = new Hz(e23, i2); this.running.push(o2), Promise.resolve(e23.source(i2)).then(function(e24) { o2.context.aborted || (o2.done = e24 || null, t2.scheduleAccept()); }, function(e24) { t2.view.dispatch({ effects: Lz.of(null) }), bO(t2.view.state, e24); }); } }, { key: "scheduleAccept", value: function() { var e23 = this; this.running.every(function(e24) { return e24.done !== void 0; }) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(function() { return e23.accept(); }, 50)); } }, { key: "accept", value: function() { var e23, t2 = this; this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1; for (var n2 = [], r2 = this.view.state.facet(Cz), i2 = function(i3) { var a2 = t2.running[i3]; if (a2.done === void 0) return o2 = i3, "continue"; if (t2.running.splice(i3--, 1), a2.done) { var s2, u2 = new Dz(a2.active.source, a2.active.explicitPos, a2.done, a2.done.from, (e23 = a2.done.to) !== null && e23 !== void 0 ? e23 : bz(a2.updates.length ? a2.updates[0].startState : t2.view.state)), c2 = bi(a2.updates); try { for (c2.s(); !(s2 = c2.n()).done; ) { var l2 = s2.value; u2 = u2.update(l2, r2); } } catch (e24) { c2.e(e24); } finally { c2.f(); } if (u2.hasResult()) return n2.push(u2), o2 = i3, "continue"; } var f2 = t2.view.state.field(Fz).active.find(function(e24) { return e24.source == a2.active.source; }); if (f2 && f2.state == 1) if (a2.done == null) { var h2, d2 = new Rz(a2.active.source, 0), v2 = bi(a2.updates); try { for (v2.s(); !(h2 = v2.n()).done; ) { var p2 = h2.value; d2 = d2.update(p2, r2); } } catch (e24) { v2.e(e24); } finally { v2.f(); } d2.state != 1 && n2.push(d2); } else t2.startQuery(f2); o2 = i3; }, o2 = 0; o2 < this.running.length; o2++) i2(o2); n2.length && this.view.dispatch({ effects: Bz.of(n2) }); } }]), e22; }(), { eventHandlers: { blur: function() { var e22 = this.view.state.field(Fz, false); e22 && e22.tooltip && this.view.state.facet(Cz).closeOnBlur && this.view.dispatch({ effects: Lz.of(null) }); }, compositionstart: function() { this.composing = 1; }, compositionend: function() { var e22 = this; this.composing == 3 && setTimeout(function() { return e22.view.dispatch({ effects: zz.of(false) }); }, 20), this.composing = 0; } } }), Jz = PM.baseTheme({ ".cm-tooltip.cm-tooltip-autocomplete": { "& > ul": { fontFamily: "monospace", whiteSpace: "nowrap", overflow: "hidden auto", maxWidth_fallback: "700px", maxWidth: "min(700px, 95vw)", minWidth: "250px", maxHeight: "10em", listStyle: "none", margin: 0, padding: 0, "& > li": { overflowX: "hidden", textOverflow: "ellipsis", cursor: "pointer", padding: "1px 3px", lineHeight: 1.2 } } }, "&light .cm-tooltip-autocomplete ul li[aria-selected]": { background: "#17c", color: "white" }, "&dark .cm-tooltip-autocomplete ul li[aria-selected]": { background: "#347", color: "white" }, ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": { content: '"\xB7\xB7\xB7"', opacity: 0.5, display: "block", textAlign: "center" }, ".cm-tooltip.cm-completionInfo": { position: "absolute", padding: "3px 9px", width: "max-content", maxWidth: "300px" }, ".cm-completionInfo.cm-completionInfo-left": { right: "100%" }, ".cm-completionInfo.cm-completionInfo-right": { left: "100%" }, "&light .cm-snippetField": { backgroundColor: "#00000022" }, "&dark .cm-snippetField": { backgroundColor: "#ffffff22" }, ".cm-snippetFieldPosition": { verticalAlign: "text-top", width: 0, height: "1.15em", margin: "0 -0.7px -.7em", borderLeft: "1.4px dotted #888" }, ".cm-completionMatchedText": { textDecoration: "underline" }, ".cm-completionDetail": { marginLeft: "0.5em", fontStyle: "italic" }, ".cm-completionIcon": { fontSize: "90%", width: ".8em", display: "inline-block", textAlign: "center", paddingRight: ".6em", opacity: "0.6" }, ".cm-completionIcon-function, .cm-completionIcon-method": { "&:after": { content: "'\u0192'" } }, ".cm-completionIcon-class": { "&:after": { content: "'\u25CB'" } }, ".cm-completionIcon-interface": { "&:after": { content: "'\u25CC'" } }, ".cm-completionIcon-variable": { "&:after": { content: "'\u{1D465}'" } }, ".cm-completionIcon-constant": { "&:after": { content: "'\u{1D436}'" } }, ".cm-completionIcon-type": { "&:after": { content: "'\u{1D461}'" } }, ".cm-completionIcon-enum": { "&:after": { content: "'\u222A'" } }, ".cm-completionIcon-property": { "&:after": { content: "'\u25A1'" } }, ".cm-completionIcon-keyword": { "&:after": { content: "'\u{1F511}\uFE0E'" } }, ".cm-completionIcon-namespace": { "&:after": { content: "'\u25A2'" } }, ".cm-completionIcon-text": { "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" } } }), Uz = { brackets: ["(", "[", "{", "'", '"'], before: ")]}:;>" }, Kz = i_.define({ map: function(e22, t2) { var n2 = t2.mapPos(e22, -1, mC.TrackAfter); return n2 == null ? void 0 : n2; } }), Gz = i_.define({ map: function(e22, t2) { return t2.mapPos(e22); } }), Qz = new (function(e22) { _i(n2, y_); var t2 = Oi(n2); function n2() { return Ri(this, n2), t2.apply(this, arguments); } return zi(n2); }())(); Qz.startSide = 1, Qz.endSide = -1; var Yz = IC.define({ create: function() { return x_.empty; }, update: function(e22, t2) { if (t2.selection) { var n2 = t2.state.doc.lineAt(t2.selection.main.head).from, r2 = t2.startState.doc.lineAt(t2.startState.selection.main.head).from; n2 != t2.changes.mapPos(r2, -1) && (e22 = x_.empty); } e22 = e22.map(t2.changes); var i2, o2 = bi(t2.effects); try { var a2 = function() { var t3 = i2.value; t3.is(Kz) ? e22 = e22.update({ add: [Qz.range(t3.value, t3.value + 1)] }) : t3.is(Gz) && (e22 = e22.update({ filter: function(e23) { return e23 != t3.value; } })); }; for (o2.s(); !(i2 = o2.n()).done; ) a2(); } catch (e23) { o2.e(e23); } finally { o2.f(); } return e22; } }); function Zz(e22) { for (var t2 = 0; t2 < "()[]{}<>".length; t2 += 2) if ("()[]{}<>".charCodeAt(t2) == e22) return "()[]{}<>".charAt(t2 + 1); return dC(e22 < 128 ? e22 : e22 + 1); } function Xz(e22, t2) { return e22.languageDataAt("closeBrackets", t2)[0] || Uz; } var eL = (typeof navigator == "undefined" ? "undefined" : Li(navigator)) == "object" && /Android\b/.test(navigator.userAgent), tL = PM.inputHandler.of(function(e22, t2, n2, r2) { if ((eL ? e22.composing : e22.compositionStarted) || e22.state.readOnly) return false; var i2 = e22.state.selection.main; if (r2.length > 2 || r2.length == 2 && vC(hC(r2, 0)) == 1 || t2 != i2.from || n2 != i2.to) return false; var o2 = function(e23, t3) { var n3, r3 = Xz(e23, e23.selection.main.head), i3 = r3.brackets || Uz.brackets, o3 = bi(i3); try { for (o3.s(); !(n3 = o3.n()).done; ) { var a2 = n3.value, s2 = Zz(hC(a2, 0)); if (t3 == a2) return s2 == a2 ? sL(e23, a2, i3.indexOf(a2 + a2 + a2) > -1) : oL(e23, a2, s2, r3.before || Uz.before); if (t3 == s2 && rL(e23, e23.selection.main.from)) return aL(e23, a2, s2); } } catch (e24) { o3.e(e24); } finally { o3.f(); } return null; }(e22.state, r2); return !!o2 && (e22.dispatch(o2), true); }), nL = [{ key: "Backspace", run: function(e22) { var t2 = e22.state, n2 = e22.dispatch; if (t2.readOnly) return false; var r2 = Xz(t2, t2.selection.main.head).brackets || Uz.brackets, i2 = null, o2 = t2.changeByRange(function(e23) { if (e23.empty) { var n3, o3 = function(e24, t3) { var n4 = e24.sliceString(t3 - 2, t3); return vC(hC(n4, 0)) == n4.length ? n4 : n4.slice(1); }(t2.doc, e23.head), a2 = bi(r2); try { for (a2.s(); !(n3 = a2.n()).done; ) { var s2 = n3.value; if (s2 == o3 && iL(t2.doc, e23.head) == Zz(hC(s2, 0))) return { changes: { from: e23.head - s2.length, to: e23.head + s2.length }, range: _C.cursor(e23.head - s2.length), userEvent: "delete.backward" }; } } catch (e24) { a2.e(e24); } finally { a2.f(); } } return { range: i2 = e23 }; }); return i2 || n2(t2.update(o2, { scrollIntoView: true })), !i2; } }]; function rL(e22, t2) { var n2 = false; return e22.field(Yz).between(0, e22.doc.length, function(e23) { e23 == t2 && (n2 = true); }), n2; } function iL(e22, t2) { var n2 = e22.sliceString(t2, t2 + 2); return n2.slice(0, vC(hC(n2, 0))); } function oL(e22, t2, n2, r2) { var i2 = null, o2 = e22.changeByRange(function(o3) { if (!o3.empty) return { changes: [{ insert: t2, from: o3.from }, { insert: n2, from: o3.to }], effects: Kz.of(o3.to + t2.length), range: _C.range(o3.anchor + t2.length, o3.head + t2.length) }; var a2 = iL(e22.doc, o3.head); return !a2 || /\s/.test(a2) || r2.indexOf(a2) > -1 ? { changes: { insert: t2 + n2, from: o3.head }, effects: Kz.of(o3.head + t2.length), range: _C.cursor(o3.head + t2.length) } : { range: i2 = o3 }; }); return i2 ? null : e22.update(o2, { scrollIntoView: true, userEvent: "input.type" }); } function aL(e22, t2, n2) { var r2 = null, i2 = e22.selection.ranges.map(function(t3) { return t3.empty && iL(e22.doc, t3.head) == n2 ? _C.cursor(t3.head + n2.length) : r2 = t3; }); return r2 ? null : e22.update({ selection: _C.create(i2, e22.selection.mainIndex), scrollIntoView: true, effects: e22.selection.ranges.map(function(e23) { var t3 = e23.from; return Gz.of(t3); }) }); } function sL(e22, t2, n2) { var r2 = null, i2 = e22.changeByRange(function(i3) { if (!i3.empty) return { changes: [{ insert: t2, from: i3.from }, { insert: t2, from: i3.to }], effects: Kz.of(i3.to + t2.length), range: _C.range(i3.anchor + t2.length, i3.head + t2.length) }; var o2 = i3.head, a2 = iL(e22.doc, o2); if (a2 == t2) { if (uL(e22, o2)) return { changes: { insert: t2 + t2, from: o2 }, effects: Kz.of(o2 + t2.length), range: _C.cursor(o2 + t2.length) }; if (rL(e22, o2)) { var s2 = n2 && e22.sliceDoc(o2, o2 + 3 * t2.length) == t2 + t2 + t2; return { range: _C.cursor(o2 + t2.length * (s2 ? 3 : 1)), effects: Gz.of(o2) }; } } else { if (n2 && e22.sliceDoc(o2 - 2 * t2.length, o2) == t2 + t2 && uL(e22, o2 - 2 * t2.length)) return { changes: { insert: t2 + t2 + t2 + t2, from: o2 }, effects: Kz.of(o2 + t2.length), range: _C.cursor(o2 + t2.length) }; if (e22.charCategorizer(o2)(a2) != d_.Word) { var u2 = e22.sliceDoc(o2 - 1, o2); if (u2 != t2 && e22.charCategorizer(o2)(u2) != d_.Word && !function(e23, t3, n3) { for (var r3 = WN(e23).resolveInner(t3, -1), i4 = 0; i4 < 5; i4++) { if (e23.sliceDoc(r3.from, r3.from + n3.length) == n3) return true; var o3 = r3.to == t3 && r3.parent; if (!o3) break; r3 = o3; } return false; }(e22, o2, t2)) return { changes: { insert: t2 + t2, from: o2 }, effects: Kz.of(o2 + t2.length), range: _C.cursor(o2 + t2.length) }; } } return { range: r2 = i3 }; }); return r2 ? null : e22.update(i2, { scrollIntoView: true, userEvent: "input.type" }); } function uL(e22, t2) { var n2 = WN(e22).resolveInner(t2 + 1); return n2.parent && n2.from == t2; } function cL() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [Fz, Cz.of(e22), Wz, fL, Jz]; } var lL = [{ key: "Ctrl-Space", run: function(e22) { return !!e22.state.field(Fz, false) && (e22.dispatch({ effects: zz.of(true) }), true); } }, { key: "Escape", run: function(e22) { var t2 = e22.state.field(Fz, false); return !(!t2 || !t2.active.some(function(e23) { return e23.state != 0; })) && (e22.dispatch({ effects: Lz.of(null) }), true); } }, { key: "ArrowDown", run: Vz(true) }, { key: "ArrowUp", run: Vz(false) }, { key: "PageDown", run: Vz(true, "page") }, { key: "PageUp", run: Vz(false, "page") }, { key: "Enter", run: function(e22) { var t2 = e22.state.field(Fz, false); return !(e22.state.readOnly || !t2 || !t2.open || Date.now() - t2.open.timestamp < 75) && (wz(e22, t2.open.options[t2.open.selected]), true); } }], fL = qC.highest(qM.computeN([Cz], function(e22) { return e22.facet(Cz).defaultKeymap ? [lL] : []; })), hL = zi(function e15(t2, n2, r2) { Ri(this, e15), this.from = t2, this.to = n2, this.diagnostic = r2; }), dL = function() { function e22(t2, n2, r2) { Ri(this, e22), this.diagnostics = t2, this.panel = n2, this.selected = r2; } return zi(e22, null, [{ key: "init", value: function(t2, n2, r2) { var i2 = t2, o2 = r2.facet($L).markerFilter; o2 && (i2 = o2(i2)); var a2 = X$.set(i2.map(function(e23) { return e23.from == e23.to || e23.from == e23.to - 1 && r2.doc.lineAt(e23.from).to == e23.from ? X$.widget({ widget: new EL(e23), diagnostic: e23 }).range(e23.from) : X$.mark({ attributes: { class: "cm-lintRange cm-lintRange-" + e23.severity }, diagnostic: e23 }).range(e23.from, e23.to); }), true); return new e22(a2, n2, vL(a2)); } }]), e22; }(); function vL(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, r2 = null; return e22.between(n2, 1e9, function(e23, n3, i2) { var o2 = i2.spec; if (!t2 || o2.diagnostic == t2) return r2 = new hL(e23, n3, o2.diagnostic), false; }), r2; } function pL(e22, t2) { return !(!e22.effects.some(function(e23) { return e23.is(gL); }) && !e22.changes.touchesRange(t2.pos)); } function mL(e22, t2) { return e22.field(kL, false) ? t2 : t2.concat(i_.appendConfig.of([kL, PM.decorations.compute([kL], function(e23) { var t3 = e23.field(kL), n2 = t3.selected, r2 = t3.panel; return n2 && r2 && n2.from != n2.to ? X$.set([wL.range(n2.from, n2.to)]) : X$.none; }), DE(xL, { hideOn: pL }), RL])); } var gL = i_.define(), yL = i_.define(), bL = i_.define(), kL = IC.define({ create: function() { return new dL(X$.none, null, null); }, update: function(e22, t2) { if (t2.docChanged) { var n2 = e22.diagnostics.map(t2.changes), r2 = null; if (e22.selected) { var i2 = t2.changes.mapPos(e22.selected.from, 1); r2 = vL(n2, e22.selected.diagnostic, i2) || vL(n2, null, i2); } e22 = new dL(n2, e22.panel, r2); } var o2, a2 = bi(t2.effects); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; s2.is(gL) ? e22 = dL.init(s2.value, e22.panel, t2.state) : s2.is(yL) ? e22 = new dL(e22.diagnostics, s2.value ? NL.open : null, e22.selected) : s2.is(bL) && (e22 = new dL(e22.diagnostics, e22.panel, s2.value)); } } catch (e23) { a2.e(e23); } finally { a2.f(); } return e22; }, provide: function(e22) { return [WE.from(e22, function(e23) { return e23.panel; }), PM.decorations.from(e22, function(e23) { return e23.diagnostics; })]; } }), wL = X$.mark({ class: "cm-lintRange cm-lintRange-active" }); function xL(e22, t2, n2) { var r2 = e22.state.field(kL).diagnostics, i2 = [], o2 = 2e8, a2 = 0; r2.between(t2 - (n2 < 0 ? 1 : 0), t2 + (n2 > 0 ? 1 : 0), function(e23, r3, s3) { var u2 = s3.spec; t2 >= e23 && t2 <= r3 && (e23 == r3 || (t2 > e23 || n2 > 0) && (t2 < r3 || n2 < 0)) && (i2.push(u2.diagnostic), o2 = Math.min(e23, o2), a2 = Math.max(r3, a2)); }); var s2 = e22.state.facet($L).tooltipFilter; return s2 && (i2 = s2(i2)), i2.length ? { pos: o2, end: a2, above: e22.state.doc.lineAt(o2).to < a2, create: function() { return { dom: jL(e22, i2) }; } } : null; } function jL(e22, t2) { return mD("ul", { class: "cm-tooltip-lint" }, t2.map(function(t3) { return ML(e22, t3, false); })); } var SL = function(e22) { var t2 = e22.state.field(kL, false); return !(!t2 || !t2.panel) && (e22.dispatch({ effects: yL.of(false) }), true); }, CL = [{ key: "Mod-Shift-m", run: function(e22) { var t2 = e22.state.field(kL, false); t2 && t2.panel || e22.dispatch({ effects: mL(e22.state, [yL.of(true)]) }); var n2 = qE(e22, NL.open); return n2 && n2.dom.querySelector(".cm-panel-lint ul").focus(), true; } }, { key: "F8", run: function(e22) { var t2 = e22.state.field(kL, false); if (!t2) return false; var n2 = e22.state.selection.main, r2 = t2.diagnostics.iter(n2.to + 1); return !(!r2.value && (!(r2 = t2.diagnostics.iter(0)).value || r2.from == n2.from && r2.to == n2.to)) && (e22.dispatch({ selection: { anchor: r2.from, head: r2.to }, scrollIntoView: true }), true); } }], _L = jO.fromClass(function() { function e22(t2) { Ri(this, e22), this.view = t2, this.timeout = -1, this.set = true; var n2 = t2.state.facet($L).delay; this.lintTime = Date.now() + n2, this.run = this.run.bind(this), this.timeout = setTimeout(this.run, n2); } return zi(e22, [{ key: "run", value: function() { var e23 = this, t2 = Date.now(); if (t2 < this.lintTime - 10) setTimeout(this.run, this.lintTime - t2); else { this.set = false; var n2 = this.view.state, r2 = n2.facet($L).sources; Promise.all(r2.map(function(t3) { return Promise.resolve(t3(e23.view)); })).then(function(t3) { var r3 = t3.reduce(function(e24, t4) { return e24.concat(t4); }); e23.view.state.doc == n2.doc && e23.view.dispatch(function(e24, t4) { return { effects: mL(e24, [gL.of(t4)]) }; }(e23.view.state, r3)); }, function(t3) { bO(e23.view.state, t3); }); } } }, { key: "update", value: function(e23) { var t2 = e23.state.facet($L); (e23.docChanged || t2 != e23.startState.facet($L)) && (this.lintTime = Date.now() + t2.delay, this.set || (this.set = true, this.timeout = setTimeout(this.run, t2.delay))); } }, { key: "force", value: function() { this.set && (this.lintTime = Date.now(), this.run()); } }, { key: "destroy", value: function() { clearTimeout(this.timeout); } }]), e22; }()), $L = AC.define({ combine: function(e22) { return Object.assign({ sources: e22.map(function(e23) { return e23.source; }) }, g_(e22.map(function(e23) { return e23.config; }), { delay: 750, markerFilter: null, tooltipFilter: null })); }, enables: _L }); function OL(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return $L.of({ source: e22, config: t2 }); } function AL(e22) { var t2 = []; if (e22) { var n2, r2 = bi(e22); try { e: for (r2.s(); !(n2 = r2.n()).done; ) { for (var i2 = n2.value.name, o2 = function(e23) { var n3 = i2[e23]; if (/[a-zA-Z]/.test(n3) && !t2.some(function(e24) { return e24.toLowerCase() == n3.toLowerCase(); })) return t2.push(n3), "continue|actions"; }, a2 = 0; a2 < i2.length; a2++) { if (o2(a2) === "continue|actions") continue e; } t2.push(""); } } catch (e23) { r2.e(e23); } finally { r2.f(); } } return t2; } function ML(e22, t2, n2) { var r2, i2 = n2 ? AL(t2.actions) : []; return mD("li", { class: "cm-diagnostic cm-diagnostic-" + t2.severity }, mD("span", { class: "cm-diagnosticText" }, t2.renderMessage ? t2.renderMessage() : t2.message), (r2 = t2.actions) === null || r2 === void 0 ? void 0 : r2.map(function(n3, r3) { var o2 = function(r4) { r4.preventDefault(); var i3 = vL(e22.state.field(kL).diagnostics, t2); i3 && n3.apply(e22, i3.from, i3.to); }, a2 = n3.name, s2 = i2[r3] ? a2.indexOf(i2[r3]) : -1, u2 = s2 < 0 ? a2 : [a2.slice(0, s2), mD("u", a2.slice(s2, s2 + 1)), a2.slice(s2 + 1)]; return mD("button", { type: "button", class: "cm-diagnosticAction", onclick: o2, onmousedown: o2, "aria-label": " Action: ".concat(a2).concat(s2 < 0 ? "" : ' (access key "'.concat(i2[r3], ')"'), ".") }, u2); }), t2.source && mD("div", { class: "cm-diagnosticSource" }, t2.source)); } var EL = function(e22) { _i(n2, Y$); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).diagnostic = e23, r2; } return zi(n2, [{ key: "eq", value: function(e23) { return e23.diagnostic == this.diagnostic; } }, { key: "toDOM", value: function() { return mD("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity }); } }]), n2; }(), PL = zi(function e16(t2, n2) { Ri(this, e16), this.diagnostic = n2, this.id = "item_" + Math.floor(4294967295 * Math.random()).toString(16), this.dom = ML(t2, n2, true), this.dom.id = this.id, this.dom.setAttribute("role", "option"); }), NL = function() { function e22(t2) { var n2 = this; Ri(this, e22), this.view = t2, this.items = []; this.list = mD("ul", { tabIndex: 0, role: "listbox", "aria-label": this.view.state.phrase("Diagnostics"), onkeydown: function(e23) { if (e23.keyCode == 27) SL(n2.view), n2.view.focus(); else if (e23.keyCode == 38 || e23.keyCode == 33) n2.moveSelection((n2.selectedIndex - 1 + n2.items.length) % n2.items.length); else if (e23.keyCode == 40 || e23.keyCode == 34) n2.moveSelection((n2.selectedIndex + 1) % n2.items.length); else if (e23.keyCode == 36) n2.moveSelection(0); else if (e23.keyCode == 35) n2.moveSelection(n2.items.length - 1); else if (e23.keyCode == 13) n2.view.focus(); else { if (!(e23.keyCode >= 65 && e23.keyCode <= 90 && n2.selectedIndex >= 0)) return; for (var r2 = n2.items[n2.selectedIndex].diagnostic, i2 = AL(r2.actions), o2 = 0; o2 < i2.length; o2++) if (i2[o2].toUpperCase().charCodeAt(0) == e23.keyCode) { var a2 = vL(n2.view.state.field(kL).diagnostics, r2); a2 && r2.actions[o2].apply(t2, a2.from, a2.to); } } e23.preventDefault(); }, onclick: function(e23) { for (var t3 = 0; t3 < n2.items.length; t3++) n2.items[t3].dom.contains(e23.target) && n2.moveSelection(t3); } }), this.dom = mD("div", { class: "cm-panel-lint" }, this.list, mD("button", { type: "button", name: "close", "aria-label": this.view.state.phrase("close"), onclick: function() { return SL(n2.view); } }, "\xD7")), this.update(); } return zi(e22, [{ key: "selectedIndex", get: function() { var e23 = this.view.state.field(kL).selected; if (!e23) return -1; for (var t2 = 0; t2 < this.items.length; t2++) if (this.items[t2].diagnostic == e23.diagnostic) return t2; return -1; } }, { key: "update", value: function() { var e23 = this, t2 = this.view.state.field(kL), n2 = t2.diagnostics, r2 = t2.selected, i2 = 0, o2 = false, a2 = null; for (n2.between(0, this.view.state.doc.length, function(t3, n3, s2) { for (var u2, c2 = s2.spec, l2 = -1, f2 = i2; f2 < e23.items.length; f2++) if (e23.items[f2].diagnostic == c2.diagnostic) { l2 = f2; break; } l2 < 0 ? (u2 = new PL(e23.view, c2.diagnostic), e23.items.splice(i2, 0, u2), o2 = true) : (u2 = e23.items[l2], l2 > i2 && (e23.items.splice(i2, l2 - i2), o2 = true)), r2 && u2.diagnostic == r2.diagnostic ? u2.dom.hasAttribute("aria-selected") || (u2.dom.setAttribute("aria-selected", "true"), a2 = u2) : u2.dom.hasAttribute("aria-selected") && u2.dom.removeAttribute("aria-selected"), i2++; }); i2 < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); ) o2 = true, this.items.pop(); this.items.length == 0 && (this.items.push(new PL(this.view, { from: -1, to: -1, severity: "info", message: this.view.state.phrase("No diagnostics") })), o2 = true), a2 ? (this.list.setAttribute("aria-activedescendant", a2.id), this.view.requestMeasure({ key: this, read: function() { return { sel: a2.dom.getBoundingClientRect(), panel: e23.list.getBoundingClientRect() }; }, write: function(t3) { var n3 = t3.sel, r3 = t3.panel; n3.top < r3.top ? e23.list.scrollTop -= r3.top - n3.top : n3.bottom > r3.bottom && (e23.list.scrollTop += n3.bottom - r3.bottom); } })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), o2 && this.sync(); } }, { key: "sync", value: function() { var e23 = this.list.firstChild; function t2() { var t3 = e23; e23 = t3.nextSibling, t3.remove(); } var n2, r2 = bi(this.items); try { for (r2.s(); !(n2 = r2.n()).done; ) { var i2 = n2.value; if (i2.dom.parentNode == this.list) { for (; e23 != i2.dom; ) t2(); e23 = i2.dom.nextSibling; } else this.list.insertBefore(i2.dom, e23); } } catch (e24) { r2.e(e24); } finally { r2.f(); } for (; e23; ) t2(); } }, { key: "moveSelection", value: function(e23) { if (!(this.selectedIndex < 0)) { var t2 = vL(this.view.state.field(kL).diagnostics, this.items[e23].diagnostic); t2 && this.view.dispatch({ selection: { anchor: t2.from, head: t2.to }, scrollIntoView: true, effects: bL.of(t2) }); } } }], [{ key: "open", value: function(t2) { return new e22(t2); } }]), e22; }(); function TL(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'viewBox="0 0 40 40"'; return `url('data:image/svg+xml,").concat(encodeURIComponent(e22), "')"); } function IL(e22) { return TL(''), 'width="6" height="3"'); } var RL = PM.baseTheme({ ".cm-diagnostic": { padding: "3px 6px 3px 8px", marginLeft: "-1px", display: "block", whiteSpace: "pre-wrap" }, ".cm-diagnostic-error": { borderLeft: "5px solid #d11" }, ".cm-diagnostic-warning": { borderLeft: "5px solid orange" }, ".cm-diagnostic-info": { borderLeft: "5px solid #999" }, ".cm-diagnosticAction": { font: "inherit", border: "none", padding: "2px 4px", backgroundColor: "#444", color: "white", borderRadius: "3px", marginLeft: "8px" }, ".cm-diagnosticSource": { fontSize: "70%", opacity: 0.7 }, ".cm-lintRange": { backgroundPosition: "left bottom", backgroundRepeat: "repeat-x", paddingBottom: "0.7px" }, ".cm-lintRange-error": { backgroundImage: IL("#d11") }, ".cm-lintRange-warning": { backgroundImage: IL("orange") }, ".cm-lintRange-info": { backgroundImage: IL("#999") }, ".cm-lintRange-active": { backgroundColor: "#ffdd9980" }, ".cm-tooltip-lint": { padding: 0, margin: 0 }, ".cm-lintPoint": { position: "relative", "&:after": { content: '""', position: "absolute", bottom: 0, left: "-2px", borderLeft: "3px solid transparent", borderRight: "3px solid transparent", borderBottom: "4px solid #d11" } }, ".cm-lintPoint-warning": { "&:after": { borderBottomColor: "orange" } }, ".cm-lintPoint-info": { "&:after": { borderBottomColor: "#999" } }, ".cm-panel.cm-panel-lint": { position: "relative", "& ul": { maxHeight: "100px", overflowY: "auto", "& [aria-selected]": { backgroundColor: "#ddd", "& u": { textDecoration: "underline" } }, "&:focus [aria-selected]": { background_fallback: "#bdf", backgroundColor: "Highlight", color_fallback: "white", color: "HighlightText" }, "& u": { textDecoration: "none" }, padding: 0, margin: 0 }, "& [name=close]": { position: "absolute", top: "0", right: "2px", background: "inherit", border: "none", font: "inherit", padding: 0, margin: 0 } } }), DL = function(e22) { _i(n2, JE); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), (r2 = t2.call(this)).diagnostics = e23, r2.severity = e23.reduce(function(e24, t3) { var n3 = t3.severity; return n3 == "error" || n3 == "warning" && e24 == "info" ? n3 : e24; }, "info"), r2; } return zi(n2, [{ key: "toDOM", value: function(e23) { var t3 = document.createElement("div"); t3.className = "cm-lint-marker cm-lint-marker-" + this.severity; var n3 = this.diagnostics, r2 = e23.state.facet(HL).tooltipFilter; return r2 && (n3 = r2(n3)), n3.length && (t3.onmouseover = function() { return function(e24, t4, n4) { function r3() { var r4 = e24.elementAtHeight(t4.getBoundingClientRect().top + 5 - e24.documentTop); e24.coordsAtPos(r4.from) && e24.dispatch({ effects: qL.of({ pos: r4.from, above: false, create: function() { return { dom: jL(e24, n4), getCoords: function() { return t4.getBoundingClientRect(); } }; } }) }), t4.onmouseout = t4.onmousemove = null, function(e25, t5) { var n5 = function n6(r5) { var i3 = t5.getBoundingClientRect(); if (!(r5.clientX > i3.left - 10 && r5.clientX < i3.right + 10 && r5.clientY > i3.top - 10 && r5.clientY < i3.bottom + 10)) { for (var o3 = r5.target; o3; o3 = o3.parentNode) if (o3.nodeType == 1 && o3.classList.contains("cm-tooltip-lint")) return; window.removeEventListener("mousemove", n6), e25.state.field(FL) && e25.dispatch({ effects: qL.of(null) }); } }; window.addEventListener("mousemove", n5); }(e24, t4); } var i2 = e24.state.facet(HL).hoverTime, o2 = setTimeout(r3, i2); t4.onmouseout = function() { clearTimeout(o2), t4.onmouseout = t4.onmousemove = null; }, t4.onmousemove = function() { clearTimeout(o2), o2 = setTimeout(r3, i2); }; }(e23, t3, n3); }), t3; } }]), n2; }(); function zL(e22, t2) { var n2, r2 = /* @__PURE__ */ Object.create(null), i2 = bi(t2); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value, a2 = e22.lineAt(o2.from); (r2[a2.from] || (r2[a2.from] = [])).push(o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } var s2 = []; for (var u2 in r2) s2.push(new DL(r2[u2]).range(+u2)); return x_.of(s2, true); } var LL = QE({ class: "cm-gutter-lint", markers: function(e22) { return e22.state.field(BL); } }), BL = IC.define({ create: function() { return x_.empty; }, update: function(e22, t2) { e22 = e22.map(t2.changes); var n2, r2 = t2.state.facet(HL).markerFilter, i2 = bi(t2.effects); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value; if (o2.is(gL)) { var a2 = o2.value; r2 && (a2 = r2(a2 || [])), e22 = zL(t2.state.doc, a2.slice(0)); } } } catch (e23) { i2.e(e23); } finally { i2.f(); } return e22; } }), qL = i_.define(), FL = IC.define({ create: function() { return null; }, update: function(e22, t2) { return e22 && t2.docChanged && (e22 = pL(t2, e22) ? null : Object.assign(Object.assign({}, e22), { pos: t2.changes.mapPos(e22.pos) })), t2.effects.reduce(function(e23, t3) { return t3.is(qL) ? t3.value : e23; }, e22); }, provide: function(e22) { return PE.from(e22); } }), VL = PM.baseTheme({ ".cm-gutter-lint": { width: "1.4em", "& .cm-gutterElement": { padding: ".2em" } }, ".cm-lint-marker": { width: "1em", height: "1em" }, ".cm-lint-marker-info": { content: TL('') }, ".cm-lint-marker-warning": { content: TL('') }, ".cm-lint-marker-error:before": { content: TL('') } }), HL = AC.define({ combine: function(e22) { return g_(e22, { hoverTime: 300, markerFilter: null, tooltipFilter: null }); } }); function WL() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return [HL.of(e22), BL, LL, VL, FL]; } var JL = function() { return [lP(), dP, dE(), KI(), NT(), KM(), [iE, oE], m_.allowMultipleSelections.of(true), m_.transactionFilter.of(function(e23) { if (!e23.docChanged || !e23.isUserEvent("input.type") && !e23.isUserEvent("input.complete")) return e23; var t3 = e23.startState.languageDataAt("indentOnInput", e23.startState.selection.main.head); if (!t3.length) return e23; var n2 = e23.newDoc, r2 = e23.newSelection.main.head, i2 = n2.lineAt(r2); if (r2 > i2.from + 200) return e23; var o2 = n2.sliceString(i2.from, r2); if (!t3.some(function(e24) { return e24.test(o2); })) return e23; var a2, s2 = e23.state, u2 = -1, c2 = [], l2 = bi(s2.selection.ranges); try { for (l2.s(); !(a2 = l2.n()).done; ) { var f2 = a2.value.head, h2 = s2.doc.lineAt(f2); if (h2.from != u2) { u2 = h2.from; var d2 = aT(s2, h2.from); if (d2 != null) { var v2 = /^\s*/.exec(h2.text)[0], p2 = oT(s2, d2); v2 != p2 && c2.push({ from: h2.from, to: h2.from + v2.length, insert: p2 }); } } } } catch (e24) { l2.e(e24); } finally { l2.f(); } return c2.length ? [e23, { changes: c2, sequential: true }] : e23; }), LT(FT, { fallback: true }), GT(), [tL, Yz], cL(), xE(), CE(), bE, (t2 = [RD, ID], e22 && t2.push(ED.of(e22)), t2), qM.of([].concat(nL, Ni(vD), uz, dR, _T, lL, CL))]; var e22, t2; }(), UL = 0, KL = zi(function e17(t2, n2) { Ri(this, e17), this.from = t2, this.to = n2; }), GL = function() { function e22() { var t2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; Ri(this, e22), this.id = UL++, this.perNode = !!t2.perNode, this.deserialize = t2.deserialize || function() { throw new Error("This node type doesn't define a deserialize function"); }; } return zi(e22, [{ key: "add", value: function(e23) { var t2 = this; if (this.perNode) throw new RangeError("Can't add per-node props to node types"); return typeof e23 != "function" && (e23 = YL.match(e23)), function(n2) { var r2 = e23(n2); return r2 === void 0 ? null : [t2, r2]; }; } }]), e22; }(); GL.closedBy = new GL({ deserialize: function(e22) { return e22.split(" "); } }), GL.openedBy = new GL({ deserialize: function(e22) { return e22.split(" "); } }), GL.group = new GL({ deserialize: function(e22) { return e22.split(" "); } }), GL.contextHash = new GL({ perNode: true }), GL.lookAhead = new GL({ perNode: true }), GL.mounted = new GL({ perNode: true }); var QL = /* @__PURE__ */ Object.create(null), YL = function() { function e22(t2, n2, r2) { var i2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0; Ri(this, e22), this.name = t2, this.props = n2, this.id = r2, this.flags = i2; } return zi(e22, [{ key: "prop", value: function(e23) { return this.props[e23.id]; } }, { key: "isTop", get: function() { return (1 & this.flags) > 0; } }, { key: "isSkipped", get: function() { return (2 & this.flags) > 0; } }, { key: "isError", get: function() { return (4 & this.flags) > 0; } }, { key: "isAnonymous", get: function() { return (8 & this.flags) > 0; } }, { key: "is", value: function(e23) { if (typeof e23 == "string") { if (this.name == e23) return true; var t2 = this.prop(GL.group); return !!t2 && t2.indexOf(e23) > -1; } return this.id == e23; } }], [{ key: "define", value: function(t2) { var n2 = t2.props && t2.props.length ? /* @__PURE__ */ Object.create(null) : QL, r2 = (t2.top ? 1 : 0) | (t2.skipped ? 2 : 0) | (t2.error ? 4 : 0) | (t2.name == null ? 8 : 0), i2 = new e22(t2.name || "", n2, t2.id, r2); if (t2.props) { var o2, a2 = bi(t2.props); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2 = o2.value; if (Array.isArray(s2) || (s2 = s2(i2)), s2) { if (s2[0].perNode) throw new RangeError("Can't store a per-node prop on a node type"); n2[s2[0].id] = s2[1]; } } } catch (e23) { a2.e(e23); } finally { a2.f(); } } return i2; } }, { key: "match", value: function(e23) { var t2 = /* @__PURE__ */ Object.create(null); for (var n2 in e23) { var r2, i2 = bi(n2.split(" ")); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; t2[o2] = e23[n2]; } } catch (e24) { i2.e(e24); } finally { i2.f(); } } return function(e24) { for (var n3 = e24.prop(GL.group), r3 = -1; r3 < (n3 ? n3.length : 0); r3++) { var i3 = t2[r3 < 0 ? e24.name : n3[r3]]; if (i3) return i3; } }; } }]), e22; }(); YL.none = new YL("", /* @__PURE__ */ Object.create(null), 0, 8); var ZL, XL = function() { function e22(t2) { Ri(this, e22), this.types = t2; for (var n2 = 0; n2 < t2.length; n2++) if (t2[n2].id != n2) throw new RangeError("Node type ids should correspond to array positions when creating a node set"); } return zi(e22, [{ key: "extend", value: function() { for (var t2 = [], n2 = arguments.length, r2 = new Array(n2), i2 = 0; i2 < n2; i2++) r2[i2] = arguments[i2]; var o2, a2 = bi(this.types); try { for (a2.s(); !(o2 = a2.n()).done; ) { var s2, u2 = o2.value, c2 = null, l2 = bi(r2); try { for (l2.s(); !(s2 = l2.n()).done; ) { var f2 = s2.value, h2 = f2(u2); h2 && (c2 || (c2 = Object.assign({}, u2.props)), c2[h2[0].id] = h2[1]); } } catch (e23) { l2.e(e23); } finally { l2.f(); } t2.push(c2 ? new YL(u2.name, c2, u2.id, u2.flags) : u2); } } catch (e23) { a2.e(e23); } finally { a2.f(); } return new e22(t2); } }]), e22; }(), eB = /* @__PURE__ */ new WeakMap(), tB = /* @__PURE__ */ new WeakMap(); !function(e22) { e22[e22.ExcludeBuffers = 1] = "ExcludeBuffers", e22[e22.IncludeAnonymous = 2] = "IncludeAnonymous", e22[e22.IgnoreMounts = 4] = "IgnoreMounts", e22[e22.IgnoreOverlays = 8] = "IgnoreOverlays"; }(ZL || (ZL = {})); var nB = function() { function e22(t2, n2, r2, i2, o2) { if (Ri(this, e22), this.type = t2, this.children = n2, this.positions = r2, this.length = i2, this.props = null, o2 && o2.length) { this.props = /* @__PURE__ */ Object.create(null); var a2, s2 = bi(o2); try { for (s2.s(); !(a2 = s2.n()).done; ) { var u2 = ki(a2.value, 2), c2 = u2[0], l2 = u2[1]; this.props[typeof c2 == "number" ? c2 : c2.id] = l2; } } catch (e23) { s2.e(e23); } finally { s2.f(); } } } return zi(e22, [{ key: "toString", value: function() { var e23 = this.prop(GL.mounted); if (e23 && !e23.overlay) return e23.tree.toString(); var t2, n2 = "", r2 = bi(this.children); try { for (r2.s(); !(t2 = r2.n()).done; ) { var i2 = t2.value.toString(); i2 && (n2 && (n2 += ","), n2 += i2); } } catch (e24) { r2.e(e24); } finally { r2.f(); } return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n2.length ? "(" + n2 + ")" : "") : n2; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new dB(this.topNode, e23); } }, { key: "cursorAt", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = eB.get(this) || this.topNode, r2 = new dB(n2); return r2.moveTo(e23, t2), eB.set(this, r2._tree), r2; } }, { key: "topNode", get: function() { return new uB(this, 0, 0, null); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = sB(eB.get(this) || this.topNode, e23, t2, false); return eB.set(this, n2), n2; } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = sB(tB.get(this) || this.topNode, e23, t2, true); return tB.set(this, n2), n2; } }, { key: "iterate", value: function(e23) { for (var t2 = e23.enter, n2 = e23.leave, r2 = e23.from, i2 = r2 === void 0 ? 0 : r2, o2 = e23.to, a2 = o2 === void 0 ? this.length : o2, s2 = this.cursor((e23.mode || 0) | ZL.IncludeAnonymous); ; ) { var u2 = false; if (s2.from <= a2 && s2.to >= i2 && (s2.type.isAnonymous || t2(s2) !== false)) { if (s2.firstChild()) continue; u2 = true; } for (; u2 && n2 && !s2.type.isAnonymous && n2(s2), !s2.nextSibling(); ) { if (!s2.parent()) return; u2 = true; } } } }, { key: "prop", value: function(e23) { return e23.perNode ? this.props ? this.props[e23.id] : void 0 : this.type.prop(e23); } }, { key: "propValues", get: function() { var e23 = []; if (this.props) for (var t2 in this.props) e23.push([+t2, this.props[t2]]); return e23; } }, { key: "balance", value: function() { var t2 = this, n2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return this.children.length <= 8 ? this : yB(YL.none, this.children, this.positions, 0, this.children.length, 0, this.length, function(n3, r2, i2) { return new e22(t2.type, n3, r2, i2, t2.propValues); }, n2.makeTree || function(t3, n3, r2) { return new e22(YL.none, t3, n3, r2); }); } }], [{ key: "build", value: function(e23) { return pB(e23); } }]), e22; }(); nB.empty = new nB(YL.none, [], [], 0); var rB = function() { function e22(t2, n2) { Ri(this, e22), this.buffer = t2, this.index = n2; } return zi(e22, [{ key: "id", get: function() { return this.buffer[this.index - 4]; } }, { key: "start", get: function() { return this.buffer[this.index - 3]; } }, { key: "end", get: function() { return this.buffer[this.index - 2]; } }, { key: "size", get: function() { return this.buffer[this.index - 1]; } }, { key: "pos", get: function() { return this.index; } }, { key: "next", value: function() { this.index -= 4; } }, { key: "fork", value: function() { return new e22(this.buffer, this.index); } }]), e22; }(), iB = function() { function e22(t2, n2, r2) { Ri(this, e22), this.buffer = t2, this.length = n2, this.set = r2; } return zi(e22, [{ key: "type", get: function() { return YL.none; } }, { key: "toString", value: function() { for (var e23 = [], t2 = 0; t2 < this.buffer.length; ) e23.push(this.childString(t2)), t2 = this.buffer[t2 + 3]; return e23.join(","); } }, { key: "childString", value: function(e23) { var t2 = this.buffer[e23], n2 = this.buffer[e23 + 3], r2 = this.set.types[t2], i2 = r2.name; if (/\W/.test(i2) && !r2.isError && (i2 = JSON.stringify(i2)), n2 == (e23 += 4)) return i2; for (var o2 = []; e23 < n2; ) o2.push(this.childString(e23)), e23 = this.buffer[e23 + 3]; return i2 + "(" + o2.join(",") + ")"; } }, { key: "findChild", value: function(e23, t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = -1, s2 = e23; s2 != t2 && !(oB(i2, r2, o2[s2 + 1], o2[s2 + 2]) && (a2 = s2, n2 > 0)); s2 = o2[s2 + 3]) ; return a2; } }, { key: "slice", value: function(t2, n2, r2, i2) { for (var o2 = this.buffer, a2 = new Uint16Array(n2 - t2), s2 = t2, u2 = 0; s2 < n2; ) a2[u2++] = o2[s2++], a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - r2, a2[u2++] = o2[s2++] - t2; return new e22(a2, i2 - r2, this.set); } }]), e22; }(); function oB(e22, t2, n2, r2) { switch (e22) { case -2: return n2 < t2; case -1: return r2 >= t2 && n2 < t2; case 0: return n2 < t2 && r2 > t2; case 1: return n2 <= t2 && r2 > t2; case 2: return r2 > t2; case 4: return true; } } function aB(e22, t2) { for (var n2 = e22.childBefore(t2); n2; ) { var r2 = n2.lastChild; if (!r2 || r2.to != n2.to) break; r2.type.isError && r2.from == r2.to ? (e22 = n2, n2 = r2.prevSibling) : n2 = r2; } return e22; } function sB(e22, t2, n2, r2) { for (var i2; e22.from == e22.to || (n2 < 1 ? e22.from >= t2 : e22.from > t2) || (n2 > -1 ? e22.to <= t2 : e22.to < t2); ) { var o2 = !r2 && e22 instanceof uB && e22.index < 0 ? null : e22.parent; if (!o2) return e22; e22 = o2; } var a2 = r2 ? 0 : ZL.IgnoreOverlays; if (r2) for (var s2 = e22, u2 = s2.parent; u2; u2 = (s2 = u2).parent) s2 instanceof uB && s2.index < 0 && ((i2 = u2.enter(t2, n2, a2)) === null || i2 === void 0 ? void 0 : i2.from) != s2.from && (e22 = u2); for (; ; ) { var c2 = e22.enter(t2, n2, a2); if (!c2) return e22; e22 = c2; } } var uB = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this._tree = t2, this.from = n2, this.index = r2, this._parent = i2; } return zi(e22, [{ key: "type", get: function() { return this._tree.type; } }, { key: "name", get: function() { return this._tree.type.name; } }, { key: "to", get: function() { return this.from + this._tree.length; } }, { key: "nextChild", value: function(t2, n2, r2, i2) { for (var o2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, a2 = this; ; ) { for (var s2 = a2._tree, u2 = s2.children, c2 = s2.positions, l2 = n2 > 0 ? u2.length : -1; t2 != l2; t2 += n2) { var f2 = u2[t2], h2 = c2[t2] + a2.from; if (oB(i2, r2, h2, h2 + f2.length)) { if (f2 instanceof iB) { if (o2 & ZL.ExcludeBuffers) continue; var d2 = f2.findChild(0, f2.buffer.length, n2, r2 - h2, i2); if (d2 > -1) return new hB(new fB(a2, f2, t2, h2), null, d2); } else if (o2 & ZL.IncludeAnonymous || !f2.type.isAnonymous || vB(f2)) { var v2 = void 0; if (!(o2 & ZL.IgnoreMounts) && f2.props && (v2 = f2.prop(GL.mounted)) && !v2.overlay) return new e22(v2.tree, h2, t2, a2); var p2 = new e22(f2, h2, t2, a2); return o2 & ZL.IncludeAnonymous || !p2.type.isAnonymous ? p2 : p2.nextChild(n2 < 0 ? f2.children.length - 1 : 0, n2, r2, i2); } } } if (o2 & ZL.IncludeAnonymous || !a2.type.isAnonymous) return null; if (t2 = a2.index >= 0 ? a2.index + n2 : n2 < 0 ? -1 : a2._parent._tree.children.length, !(a2 = a2._parent)) return null; } } }, { key: "firstChild", get: function() { return this.nextChild(0, 1, 0, 4); } }, { key: "lastChild", get: function() { return this.nextChild(this._tree.children.length - 1, -1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.nextChild(0, 1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.nextChild(this._tree.children.length - 1, -1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2, i2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (!(i2 & ZL.IgnoreOverlays) && (r2 = this._tree.prop(GL.mounted)) && r2.overlay) { var o2, a2 = t2 - this.from, s2 = bi(r2.overlay); try { for (s2.s(); !(o2 = s2.n()).done; ) { var u2 = o2.value, c2 = u2.from, l2 = u2.to; if ((n2 > 0 ? c2 <= a2 : c2 < a2) && (n2 < 0 ? l2 >= a2 : l2 > a2)) return new e22(r2.tree, r2.overlay[0].from + this.from, -1, this); } } catch (e23) { s2.e(e23); } finally { s2.f(); } } return this.nextChild(0, 1, t2, n2, i2); } }, { key: "nextSignificantParent", value: function() { for (var e23 = this; e23.type.isAnonymous && e23._parent; ) e23 = e23._parent; return e23; } }, { key: "parent", get: function() { return this._parent ? this._parent.nextSignificantParent() : null; } }, { key: "nextSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4) : null; } }, { key: "prevSibling", get: function() { return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4) : null; } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new dB(this, e23); } }, { key: "tree", get: function() { return this._tree; } }, { key: "toTree", value: function() { return this._tree; } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return sB(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return sB(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return aB(this, e23); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = cB(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return cB(this, e23, t2, n2); } }, { key: "toString", value: function() { return this._tree.toString(); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return lB(this, e23); } }]), e22; }(); function cB(e22, t2, n2, r2) { var i2 = e22.cursor(), o2 = []; if (!i2.firstChild()) return o2; if (n2 != null) { for (; !i2.type.is(n2); ) if (!i2.nextSibling()) return o2; } for (; ; ) { if (r2 != null && i2.type.is(r2)) return o2; if (i2.type.is(t2) && o2.push(i2.node), !i2.nextSibling()) return r2 == null ? o2 : []; } } function lB(e22, t2) { for (var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t2.length - 1, r2 = e22.parent; n2 >= 0; r2 = r2.parent) { if (!r2) return false; if (!r2.type.isAnonymous) { if (t2[n2] && t2[n2] != r2.name) return false; n2--; } } return true; } var fB = zi(function e18(t2, n2, r2, i2) { Ri(this, e18), this.parent = t2, this.buffer = n2, this.index = r2, this.start = i2; }), hB = function() { function e22(t2, n2, r2) { Ri(this, e22), this.context = t2, this._parent = n2, this.index = r2, this.type = t2.buffer.set.types[t2.buffer.buffer[r2]]; } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "from", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 1]; } }, { key: "to", get: function() { return this.context.start + this.context.buffer.buffer[this.index + 2]; } }, { key: "child", value: function(t2, n2, r2) { var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], t2, n2 - this.context.start, r2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "firstChild", get: function() { return this.child(1, 0, 4); } }, { key: "lastChild", get: function() { return this.child(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.child(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.child(-1, e23, -2); } }, { key: "enter", value: function(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; if (r2 & ZL.ExcludeBuffers) return null; var i2 = this.context.buffer, o2 = i2.findChild(this.index + 4, i2.buffer[this.index + 3], n2 > 0 ? 1 : -1, t2 - this.context.start, n2); return o2 < 0 ? null : new e22(this.context, this, o2); } }, { key: "parent", get: function() { return this._parent || this.context.parent.nextSignificantParent(); } }, { key: "externalSibling", value: function(e23) { return this._parent ? null : this.context.parent.nextChild(this.context.index + e23, e23, 0, 4); } }, { key: "nextSibling", get: function() { var t2 = this.context.buffer, n2 = t2.buffer[this.index + 3]; return n2 < (this._parent ? t2.buffer[this._parent.index + 3] : t2.buffer.length) ? new e22(this.context, this._parent, n2) : this.externalSibling(1); } }, { key: "prevSibling", get: function() { var t2 = this.context.buffer, n2 = this._parent ? this._parent.index + 4 : 0; return this.index == n2 ? this.externalSibling(-1) : new e22(this.context, this._parent, t2.findChild(n2, this.index, -1, 0, 4)); } }, { key: "cursor", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; return new dB(this, e23); } }, { key: "tree", get: function() { return null; } }, { key: "toTree", value: function() { var e23 = [], t2 = [], n2 = this.context.buffer, r2 = this.index + 4, i2 = n2.buffer[this.index + 3]; if (i2 > r2) { var o2 = n2.buffer[this.index + 1], a2 = n2.buffer[this.index + 2]; e23.push(n2.slice(r2, i2, o2, a2)), t2.push(0); } return new nB(this.type, e23, t2, this.to - this.from); } }, { key: "resolve", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return sB(this, e23, t2, false); } }, { key: "resolveInner", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return sB(this, e23, t2, true); } }, { key: "enterUnfinishedNodesBefore", value: function(e23) { return aB(this, e23); } }, { key: "toString", value: function() { return this.context.buffer.childString(this.index); } }, { key: "getChild", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r2 = cB(this, e23, t2, n2); return r2.length ? r2[0] : null; } }, { key: "getChildren", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; return cB(this, e23, t2, n2); } }, { key: "node", get: function() { return this; } }, { key: "matchContext", value: function(e23) { return lB(this, e23); } }]), e22; }(), dB = function() { function e22(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; if (Ri(this, e22), this.mode = n2, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, t2 instanceof uB) this.yieldNode(t2); else { this._tree = t2.context.parent, this.buffer = t2.context; for (var r2 = t2._parent; r2; r2 = r2._parent) this.stack.unshift(r2.index); this.bufferNode = t2, this.yieldBuf(t2.index); } } return zi(e22, [{ key: "name", get: function() { return this.type.name; } }, { key: "yieldNode", value: function(e23) { return !!e23 && (this._tree = e23, this.type = e23.type, this.from = e23.from, this.to = e23.to, true); } }, { key: "yieldBuf", value: function(e23, t2) { this.index = e23; var n2 = this.buffer, r2 = n2.start, i2 = n2.buffer; return this.type = t2 || i2.set.types[i2.buffer[e23]], this.from = r2 + i2.buffer[e23 + 1], this.to = r2 + i2.buffer[e23 + 2], true; } }, { key: "yield", value: function(e23) { return !!e23 && (e23 instanceof uB ? (this.buffer = null, this.yieldNode(e23)) : (this.buffer = e23.context, this.yieldBuf(e23.index, e23.type))); } }, { key: "toString", value: function() { return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString(); } }, { key: "enterChild", value: function(e23, t2, n2) { if (!this.buffer) return this.yield(this._tree.nextChild(e23 < 0 ? this._tree._tree.children.length - 1 : 0, e23, t2, n2, this.mode)); var r2 = this.buffer.buffer, i2 = r2.findChild(this.index + 4, r2.buffer[this.index + 3], e23, t2 - this.buffer.start, n2); return !(i2 < 0) && (this.stack.push(this.index), this.yieldBuf(i2)); } }, { key: "firstChild", value: function() { return this.enterChild(1, 0, 4); } }, { key: "lastChild", value: function() { return this.enterChild(-1, 0, 4); } }, { key: "childAfter", value: function(e23) { return this.enterChild(1, e23, 2); } }, { key: "childBefore", value: function(e23) { return this.enterChild(-1, e23, -2); } }, { key: "enter", value: function(e23, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.mode; return this.buffer ? !(n2 & ZL.ExcludeBuffers) && this.enterChild(1, e23, t2) : this.yield(this._tree.enter(e23, t2, n2)); } }, { key: "parent", value: function() { if (!this.buffer) return this.yieldNode(this.mode & ZL.IncludeAnonymous ? this._tree._parent : this._tree.parent); if (this.stack.length) return this.yieldBuf(this.stack.pop()); var e23 = this.mode & ZL.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent(); return this.buffer = null, this.yieldNode(e23); } }, { key: "sibling", value: function(e23) { if (!this.buffer) return !!this._tree._parent && this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e23, e23, 0, 4, this.mode)); var t2 = this.buffer.buffer, n2 = this.stack.length - 1; if (e23 < 0) { var r2 = n2 < 0 ? 0 : this.stack[n2] + 4; if (this.index != r2) return this.yieldBuf(t2.findChild(r2, this.index, -1, 0, 4)); } else { var i2 = t2.buffer[this.index + 3]; if (i2 < (n2 < 0 ? t2.buffer.length : t2.buffer[this.stack[n2] + 3])) return this.yieldBuf(i2); } return n2 < 0 && this.yield(this.buffer.parent.nextChild(this.buffer.index + e23, e23, 0, 4, this.mode)); } }, { key: "nextSibling", value: function() { return this.sibling(1); } }, { key: "prevSibling", value: function() { return this.sibling(-1); } }, { key: "atLastNode", value: function(e23) { var t2, n2, r2 = this.buffer; if (r2) { if (e23 > 0) { if (this.index < r2.buffer.buffer.length) return false; } else for (var i2 = 0; i2 < this.index; i2++) if (r2.buffer.buffer[i2 + 3] < this.index) return false; t2 = r2.index, n2 = r2.parent; } else { var o2 = this._tree; t2 = o2.index, n2 = o2._parent; } for (; n2; t2 = (a2 = n2).index, n2 = a2._parent, a2) { var a2; if (t2 > -1) for (var s2 = t2 + e23, u2 = e23 < 0 ? -1 : n2._tree.children.length; s2 != u2; s2 += e23) { var c2 = n2._tree.children[s2]; if (this.mode & ZL.IncludeAnonymous || c2 instanceof iB || !c2.type.isAnonymous || vB(c2)) return false; } } return true; } }, { key: "move", value: function(e23, t2) { if (t2 && this.enterChild(e23, 0, 4)) return true; for (; ; ) { if (this.sibling(e23)) return true; if (this.atLastNode(e23) || !this.parent()) return false; } } }, { key: "next", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(1, e23); } }, { key: "prev", value: function() { var e23 = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]; return this.move(-1, e23); } }, { key: "moveTo", value: function(e23) { for (var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; (this.from == this.to || (t2 < 1 ? this.from >= e23 : this.from > e23) || (t2 > -1 ? this.to <= e23 : this.to < e23)) && this.parent(); ) ; for (; this.enterChild(1, e23, t2); ) ; return this; } }, { key: "node", get: function() { if (!this.buffer) return this._tree; var e23 = this.bufferNode, t2 = null, n2 = 0; if (e23 && e23.context == this.buffer) e: for (var r2 = this.index, i2 = this.stack.length; i2 >= 0; ) { for (var o2 = e23; o2; o2 = o2._parent) if (o2.index == r2) { if (r2 == this.index) return o2; t2 = o2, n2 = i2 + 1; break e; } r2 = this.stack[--i2]; } for (var a2 = n2; a2 < this.stack.length; a2++) t2 = new hB(this.buffer, t2, this.stack[a2]); return this.bufferNode = new hB(this.buffer, t2, this.index); } }, { key: "tree", get: function() { return this.buffer ? null : this._tree._tree; } }, { key: "iterate", value: function(e23, t2) { for (var n2 = 0; ; ) { var r2 = false; if (this.type.isAnonymous || e23(this) !== false) { if (this.firstChild()) { n2++; continue; } this.type.isAnonymous || (r2 = true); } for (; r2 && t2 && t2(this), r2 = this.type.isAnonymous, !this.nextSibling(); ) { if (!n2) return; this.parent(), n2--, r2 = true; } } } }, { key: "matchContext", value: function(e23) { if (!this.buffer) return lB(this.node, e23); for (var t2 = this.buffer.buffer, n2 = t2.set.types, r2 = e23.length - 1, i2 = this.stack.length - 1; r2 >= 0; i2--) { if (i2 < 0) return lB(this.node, e23, r2); var o2 = n2[t2.buffer[this.stack[i2]]]; if (!o2.isAnonymous) { if (e23[r2] && e23[r2] != o2.name) return false; r2--; } } return true; } }]), e22; }(); function vB(e22) { return e22.children.some(function(e23) { return e23 instanceof iB || !e23.type.isAnonymous || vB(e23); }); } function pB(e22) { var t2, n2 = e22.buffer, r2 = e22.nodeSet, i2 = e22.maxBufferLength, o2 = i2 === void 0 ? 1024 : i2, a2 = e22.reused, s2 = a2 === void 0 ? [] : a2, u2 = e22.minRepeatType, c2 = u2 === void 0 ? r2.types.length : u2, l2 = Array.isArray(n2) ? new rB(n2, n2.length) : n2, f2 = r2.types, h2 = 0, d2 = 0; function v2(e23, t3, n3, i3, a3) { for (var u3 = l2.id, y3 = l2.start, b3 = l2.end, k3 = l2.size, w2 = d2; k3 < 0; ) { if (l2.next(), k3 == -1) { var x2 = s2[u3]; return n3.push(x2), void i3.push(y3 - e23); } if (k3 == -3) return void (h2 = u3); if (k3 == -4) return void (d2 = u3); throw new RangeError("Unrecognized record size: ".concat(k3)); } var j2, S2, C2 = f2[u3], _2 = y3 - e23; if (b3 - y3 <= o2 && (S2 = function(e24, t4) { var n4 = l2.fork(), r3 = 0, i4 = 0, a4 = 0, s3 = n4.end - o2, u4 = { size: 0, start: 0, skip: 0 }; e: for (var f3 = n4.pos - e24; n4.pos > f3; ) { var h3 = n4.size; if (n4.id == t4 && h3 >= 0) u4.size = r3, u4.start = i4, u4.skip = a4, a4 += 4, r3 += 4, n4.next(); else { var d3 = n4.pos - h3; if (h3 < 0 || d3 < f3 || n4.start < s3) break; var v3 = n4.id >= c2 ? 4 : 0, p3 = n4.start; for (n4.next(); n4.pos > d3; ) { if (n4.size < 0) { if (n4.size != -3) break e; v3 += 4; } else n4.id >= c2 && (v3 += 4); n4.next(); } i4 = p3, r3 += h3, a4 += v3; } } (t4 < 0 || r3 == e24) && (u4.size = r3, u4.start = i4, u4.skip = a4); return u4.size > 4 ? u4 : void 0; }(l2.pos - t3, a3))) { for (var $2 = new Uint16Array(S2.size - S2.skip), O2 = l2.pos - S2.size, A2 = $2.length; l2.pos > O2; ) A2 = g2(S2.start, $2, A2); j2 = new iB($2, b3 - S2.start, r2), _2 = S2.start - e23; } else { var M2 = l2.pos - k3; l2.next(); for (var E2 = [], P2 = [], N2 = u3 >= c2 ? u3 : -1, T2 = 0, I2 = b3; l2.pos > M2; ) N2 >= 0 && l2.id == N2 && l2.size >= 0 ? (l2.end <= I2 - o2 && (p2(E2, P2, y3, T2, l2.end, I2, N2, w2), T2 = E2.length, I2 = l2.end), l2.next()) : v2(y3, M2, E2, P2, N2); if (N2 >= 0 && T2 > 0 && T2 < E2.length && p2(E2, P2, y3, T2, y3, I2, N2, w2), E2.reverse(), P2.reverse(), N2 > -1 && T2 > 0) { var R2 = function(e24) { return function(t4, n4, r3) { var i4, o3, a4 = 0, s3 = t4.length - 1; if (s3 >= 0 && (i4 = t4[s3]) instanceof nB) { if (!s3 && i4.type == e24 && i4.length == r3) return i4; (o3 = i4.prop(GL.lookAhead)) && (a4 = n4[s3] + i4.length + o3); } return m2(e24, t4, n4, r3, a4); }; }(C2); j2 = yB(C2, E2, P2, 0, E2.length, 0, b3 - y3, R2, R2); } else j2 = m2(C2, E2, P2, b3 - y3, w2 - b3); } n3.push(j2), i3.push(_2); } function p2(e23, t3, n3, i3, o3, a3, s3, u3) { for (var c3 = [], l3 = []; e23.length > i3; ) c3.push(e23.pop()), l3.push(t3.pop() + n3 - o3); e23.push(m2(r2.types[s3], c3, l3, a3 - o3, u3 - a3)), t3.push(o3 - n3); } function m2(e23, t3, n3, r3) { var i3 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, o3 = arguments.length > 5 ? arguments[5] : void 0; if (h2) { var a3 = [GL.contextHash, h2]; o3 = o3 ? [a3].concat(o3) : [a3]; } if (i3 > 25) { var s3 = [GL.lookAhead, i3]; o3 = o3 ? [s3].concat(o3) : [s3]; } return new nB(e23, t3, n3, r3, o3); } function g2(e23, t3, n3) { var r3 = l2.id, i3 = l2.start, o3 = l2.end, a3 = l2.size; if (l2.next(), a3 >= 0 && r3 < c2) { var s3 = n3; if (a3 > 4) for (var u3 = l2.pos - (a3 - 4); l2.pos > u3; ) n3 = g2(e23, t3, n3); t3[--n3] = s3, t3[--n3] = o3 - e23, t3[--n3] = i3 - e23, t3[--n3] = r3; } else a3 == -3 ? h2 = r3 : a3 == -4 && (d2 = r3); return n3; } for (var y2 = [], b2 = []; l2.pos > 0; ) v2(e22.start || 0, e22.bufferStart || 0, y2, b2, -1); var k2 = (t2 = e22.length) !== null && t2 !== void 0 ? t2 : y2.length ? b2[0] + y2[0].length : 0; return new nB(f2[e22.topID], y2.reverse(), b2.reverse(), k2); } var mB = /* @__PURE__ */ new WeakMap(); function gB(e22, t2) { if (!e22.isAnonymous || t2 instanceof iB || t2.type != e22) return 1; var n2 = mB.get(t2); if (n2 == null) { n2 = 1; var r2, i2 = bi(t2.children); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value; if (o2.type != e22 || !(o2 instanceof nB)) { n2 = 1; break; } n2 += gB(e22, o2); } } catch (e23) { i2.e(e23); } finally { i2.f(); } mB.set(t2, n2); } return n2; } function yB(e22, t2, n2, r2, i2, o2, a2, s2, u2) { for (var c2 = 0, l2 = r2; l2 < i2; l2++) c2 += gB(e22, t2[l2]); var f2 = Math.ceil(1.5 * c2 / 8), h2 = [], d2 = []; return function t3(n3, r3, i3, a3, s3) { for (var c3 = i3; c3 < a3; ) { var l3 = c3, v2 = r3[c3], p2 = gB(e22, n3[c3]); for (c3++; c3 < a3; c3++) { var m2 = gB(e22, n3[c3]); if (p2 + m2 >= f2) break; p2 += m2; } if (c3 == l3 + 1) { if (p2 > f2) { var g2 = n3[l3]; t3(g2.children, g2.positions, 0, g2.children.length, r3[l3] + s3); continue; } h2.push(n3[l3]); } else { var y2 = r3[c3 - 1] + n3[c3 - 1].length - v2; h2.push(yB(e22, n3, r3, l3, c3, v2, y2, null, u2)); } d2.push(v2 + s3 - o2); } }(t2, n2, r2, i2, 0), (s2 || u2)(h2, d2, a2); } var bB = function() { function e22() { Ri(this, e22); } return zi(e22, [{ key: "startParse", value: function(e23, t2, n2) { return typeof e23 == "string" && (e23 = new kB(e23)), n2 = n2 ? n2.length ? n2.map(function(e24) { return new KL(e24.from, e24.to); }) : [new KL(0, 0)] : [new KL(0, e23.length)], this.createParse(e23, t2 || [], n2); } }, { key: "parse", value: function(e23, t2, n2) { for (var r2 = this.startParse(e23, t2, n2); ; ) { var i2 = r2.advance(); if (i2) return i2; } } }]), e22; }(), kB = function() { function e22(t2) { Ri(this, e22), this.string = t2; } return zi(e22, [{ key: "length", get: function() { return this.string.length; } }, { key: "chunk", value: function(e23) { return this.string.slice(e23); } }, { key: "lineChunks", get: function() { return false; } }, { key: "read", value: function(e23, t2) { return this.string.slice(e23, t2); } }]), e22; }(); new GL({ perNode: true }); var wB, xB = function() { function e22(t2, n2, r2, i2, o2, a2, s2, u2, c2) { var l2 = arguments.length > 9 && arguments[9] !== void 0 ? arguments[9] : 0, f2 = arguments.length > 10 ? arguments[10] : void 0; Ri(this, e22), this.p = t2, this.stack = n2, this.state = r2, this.reducePos = i2, this.pos = o2, this.score = a2, this.buffer = s2, this.bufferBase = u2, this.curContext = c2, this.lookAhead = l2, this.parent = f2; } return zi(e22, [{ key: "toString", value: function() { return "[".concat(this.stack.filter(function(e23, t2) { return t2 % 3 == 0; }).concat(this.state), "]@").concat(this.pos).concat(this.score ? "!" + this.score : ""); } }, { key: "context", get: function() { return this.curContext ? this.curContext.context : null; } }, { key: "pushState", value: function(e23, t2) { this.stack.push(this.state, t2, this.bufferBase + this.buffer.length), this.state = e23; } }, { key: "reduce", value: function(e23) { var t2 = e23 >> 19, n2 = 65535 & e23, r2 = this.p.parser, i2 = r2.dynamicPrecedence(n2); if (i2 && (this.score += i2), t2 == 0) return this.pushState(r2.getGoto(this.state, n2, true), this.reducePos), n2 < r2.minRepeatTerm && this.storeNode(n2, this.reducePos, this.reducePos, 4, true), void this.reduceContext(n2, this.reducePos); var o2 = this.stack.length - 3 * (t2 - 1) - (262144 & e23 ? 6 : 0), a2 = this.stack[o2 - 2], s2 = this.stack[o2 - 1], u2 = this.bufferBase + this.buffer.length - s2; if (n2 < r2.minRepeatTerm || 131072 & e23) { var c2 = r2.stateFlag(this.state, 1) ? this.pos : this.reducePos; this.storeNode(n2, a2, c2, u2 + 4, true); } if (262144 & e23) this.state = this.stack[o2]; else { var l2 = this.stack[o2 - 3]; this.state = r2.getGoto(l2, n2, true); } for (; this.stack.length > o2; ) this.stack.pop(); this.reduceContext(n2, a2); } }, { key: "storeNode", value: function(e23, t2, n2) { var r2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, i2 = arguments.length > 4 && arguments[4] !== void 0 && arguments[4]; if (e23 == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) { var o2 = this, a2 = this.buffer.length; if (a2 == 0 && o2.parent && (a2 = o2.bufferBase - o2.parent.bufferBase, o2 = o2.parent), a2 > 0 && o2.buffer[a2 - 4] == 0 && o2.buffer[a2 - 1] > -1) { if (t2 == n2) return; if (o2.buffer[a2 - 2] >= t2) return void (o2.buffer[a2 - 2] = n2); } } if (i2 && this.pos != n2) { var s2 = this.buffer.length; if (s2 > 0 && this.buffer[s2 - 4] != 0) for (; s2 > 0 && this.buffer[s2 - 2] > n2; ) this.buffer[s2] = this.buffer[s2 - 4], this.buffer[s2 + 1] = this.buffer[s2 - 3], this.buffer[s2 + 2] = this.buffer[s2 - 2], this.buffer[s2 + 3] = this.buffer[s2 - 1], s2 -= 4, r2 > 4 && (r2 -= 4); this.buffer[s2] = e23, this.buffer[s2 + 1] = t2, this.buffer[s2 + 2] = n2, this.buffer[s2 + 3] = r2; } else this.buffer.push(e23, t2, n2, r2); } }, { key: "shift", value: function(e23, t2, n2) { var r2 = this.pos; if (131072 & e23) this.pushState(65535 & e23, this.pos); else if ((262144 & e23) == 0) { var i2 = e23, o2 = this.p.parser; (n2 > this.pos || t2 <= o2.maxNode) && (this.pos = n2, o2.stateFlag(i2, 1) || (this.reducePos = n2)), this.pushState(i2, r2), this.shiftContext(t2, r2), t2 <= o2.maxNode && this.buffer.push(t2, r2, n2, 4); } else this.pos = n2, this.shiftContext(t2, r2), t2 <= this.p.parser.maxNode && this.buffer.push(t2, r2, n2, 4); } }, { key: "apply", value: function(e23, t2, n2) { 65536 & e23 ? this.reduce(e23) : this.shift(e23, t2, n2); } }, { key: "useNode", value: function(e23, t2) { var n2 = this.p.reused.length - 1; (n2 < 0 || this.p.reused[n2] != e23) && (this.p.reused.push(e23), n2++); var r2 = this.pos; this.reducePos = this.pos = r2 + e23.length, this.pushState(t2, r2), this.buffer.push(n2, r2, this.reducePos, -1), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e23, this, this.p.stream.reset(this.pos - e23.length))); } }, { key: "split", value: function() { for (var t2 = this, n2 = t2.buffer.length; n2 > 0 && t2.buffer[n2 - 2] > t2.reducePos; ) n2 -= 4; for (var r2 = t2.buffer.slice(n2), i2 = t2.bufferBase + n2; t2 && i2 == t2.bufferBase; ) t2 = t2.parent; return new e22(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r2, i2, this.curContext, this.lookAhead, t2); } }, { key: "recoverByDelete", value: function(e23, t2) { var n2 = e23 <= this.p.parser.maxNode; n2 && this.storeNode(e23, this.pos, t2, 4), this.storeNode(0, this.pos, t2, n2 ? 8 : 4), this.pos = this.reducePos = t2, this.score -= 190; } }, { key: "canShift", value: function(e23) { for (var t2 = new SB(this); ; ) { var n2 = this.p.parser.stateSlot(t2.state, 4) || this.p.parser.hasAction(t2.state, e23); if ((65536 & n2) == 0) return true; if (n2 == 0) return false; t2.reduce(n2); } } }, { key: "recoverByInsert", value: function(e23) { if (this.stack.length >= 300) return []; var t2 = this.p.parser.nextStates(this.state); if (t2.length > 8 || this.stack.length >= 120) { for (var n2, r2 = [], i2 = 0; i2 < t2.length; i2 += 2) (n2 = t2[i2 + 1]) != this.state && this.p.parser.hasAction(n2, e23) && r2.push(t2[i2], n2); if (this.stack.length < 120) for (var o2 = function(e24) { var n3 = t2[e24 + 1]; r2.some(function(e25, t3) { return 1 & t3 && e25 == n3; }) || r2.push(t2[e24], n3); }, a2 = 0; r2.length < 8 && a2 < t2.length; a2 += 2) o2(a2); t2 = r2; } for (var s2 = [], u2 = 0; u2 < t2.length && s2.length < 4; u2 += 2) { var c2 = t2[u2 + 1]; if (c2 != this.state) { var l2 = this.split(); l2.pushState(c2, this.pos), l2.storeNode(0, l2.pos, l2.pos, 4, true), l2.shiftContext(t2[u2], this.pos), l2.score -= 200, s2.push(l2); } } return s2; } }, { key: "forceReduce", value: function() { var e23 = this.p.parser.stateSlot(this.state, 5); if ((65536 & e23) == 0) return false; var t2 = this.p.parser; if (!t2.validAction(this.state, e23)) { var n2 = e23 >> 19, r2 = 65535 & e23, i2 = this.stack.length - 3 * n2; if (i2 < 0 || t2.getGoto(this.stack[i2], r2, false) < 0) return false; this.storeNode(0, this.reducePos, this.reducePos, 4, true), this.score -= 100; } return this.reducePos = this.pos, this.reduce(e23), true; } }, { key: "forceAll", value: function() { for (; !this.p.parser.stateFlag(this.state, 2); ) if (!this.forceReduce()) { this.storeNode(0, this.pos, this.pos, 4, true); break; } return this; } }, { key: "deadEnd", get: function() { if (this.stack.length != 3) return false; var e23 = this.p.parser; return e23.data[e23.stateSlot(this.state, 1)] == 65535 && !e23.stateSlot(this.state, 4); } }, { key: "restart", value: function() { this.state = this.stack[0], this.stack.length = 0; } }, { key: "sameState", value: function(e23) { if (this.state != e23.state || this.stack.length != e23.stack.length) return false; for (var t2 = 0; t2 < this.stack.length; t2 += 3) if (this.stack[t2] != e23.stack[t2]) return false; return true; } }, { key: "parser", get: function() { return this.p.parser; } }, { key: "dialectEnabled", value: function(e23) { return this.p.parser.dialect.flags[e23]; } }, { key: "shiftContext", value: function(e23, t2) { this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e23, this, this.p.stream.reset(t2))); } }, { key: "reduceContext", value: function(e23, t2) { this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e23, this, this.p.stream.reset(t2))); } }, { key: "emitContext", value: function() { var e23 = this.buffer.length - 1; (e23 < 0 || this.buffer[e23] != -3) && this.buffer.push(this.curContext.hash, this.reducePos, this.reducePos, -3); } }, { key: "emitLookAhead", value: function() { var e23 = this.buffer.length - 1; (e23 < 0 || this.buffer[e23] != -4) && this.buffer.push(this.lookAhead, this.reducePos, this.reducePos, -4); } }, { key: "updateContext", value: function(e23) { if (e23 != this.curContext.context) { var t2 = new jB(this.curContext.tracker, e23); t2.hash != this.curContext.hash && this.emitContext(), this.curContext = t2; } } }, { key: "setLookAhead", value: function(e23) { e23 > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e23); } }, { key: "close", value: function() { this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead(); } }], [{ key: "start", value: function(t2, n2) { var r2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, i2 = t2.parser.context; return new e22(t2, [], n2, r2, r2, 0, [], 0, i2 ? new jB(i2, i2.start) : null, 0, null); } }]), e22; }(), jB = zi(function e19(t2, n2) { Ri(this, e19), this.tracker = t2, this.context = n2, this.hash = t2.strict ? t2.hash(n2) : 0; }); !function(e22) { e22[e22.Insert = 200] = "Insert", e22[e22.Delete = 190] = "Delete", e22[e22.Reduce = 100] = "Reduce", e22[e22.MaxNext = 4] = "MaxNext", e22[e22.MaxInsertStackDepth = 300] = "MaxInsertStackDepth", e22[e22.DampenInsertStackDepth = 120] = "DampenInsertStackDepth"; }(wB || (wB = {})); var SB = function() { function e22(t2) { Ri(this, e22), this.start = t2, this.state = t2.state, this.stack = t2.stack, this.base = this.stack.length; } return zi(e22, [{ key: "reduce", value: function(e23) { var t2 = 65535 & e23, n2 = e23 >> 19; n2 == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= 3 * (n2 - 1); var r2 = this.start.p.parser.getGoto(this.stack[this.base - 3], t2, true); this.state = r2; } }]), e22; }(), CB = function() { function e22(t2, n2, r2) { Ri(this, e22), this.stack = t2, this.pos = n2, this.index = r2, this.buffer = t2.buffer, this.index == 0 && this.maybeNext(); } return zi(e22, [{ key: "maybeNext", value: function() { var e23 = this.stack.parent; e23 != null && (this.index = this.stack.bufferBase - e23.bufferBase, this.stack = e23, this.buffer = e23.buffer); } }, { key: "id", get: function() { return this.buffer[this.index - 4]; } }, { key: "start", get: function() { return this.buffer[this.index - 3]; } }, { key: "end", get: function() { return this.buffer[this.index - 2]; } }, { key: "size", get: function() { return this.buffer[this.index - 1]; } }, { key: "next", value: function() { this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext(); } }, { key: "fork", value: function() { return new e22(this.stack, this.pos, this.index); } }], [{ key: "create", value: function(t2) { var n2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t2.bufferBase + t2.buffer.length; return new e22(t2, n2, n2 - t2.bufferBase); } }]), e22; }(), _B = zi(function e20() { Ri(this, e20), this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0; }), $B = new _B(), OB = function() { function e22(t2, n2) { Ri(this, e22), this.input = t2, this.ranges = n2, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = $B, this.rangeIndex = 0, this.pos = this.chunkPos = n2[0].from, this.range = n2[0], this.end = n2[n2.length - 1].to, this.readNext(); } return zi(e22, [{ key: "resolveOffset", value: function(e23, t2) { for (var n2 = this.range, r2 = this.rangeIndex, i2 = this.pos + e23; i2 < n2.from; ) { if (!r2) return null; var o2 = this.ranges[--r2]; i2 -= n2.from - o2.to, n2 = o2; } for (; t2 < 0 ? i2 > n2.to : i2 >= n2.to; ) { if (r2 == this.ranges.length - 1) return null; var a2 = this.ranges[++r2]; i2 += a2.from - n2.to, n2 = a2; } return i2; } }, { key: "peek", value: function(e23) { var t2, n2, r2 = this.chunkOff + e23; if (r2 >= 0 && r2 < this.chunk.length) t2 = this.pos + e23, n2 = this.chunk.charCodeAt(r2); else { var i2 = this.resolveOffset(e23, 1); if (i2 == null) return -1; if ((t2 = i2) >= this.chunk2Pos && t2 < this.chunk2Pos + this.chunk2.length) n2 = this.chunk2.charCodeAt(t2 - this.chunk2Pos); else { for (var o2 = this.rangeIndex, a2 = this.range; a2.to <= t2; ) a2 = this.ranges[++o2]; this.chunk2 = this.input.chunk(this.chunk2Pos = t2), t2 + this.chunk2.length > a2.to && (this.chunk2 = this.chunk2.slice(0, a2.to - t2)), n2 = this.chunk2.charCodeAt(0); } } return t2 >= this.token.lookAhead && (this.token.lookAhead = t2 + 1), n2; } }, { key: "acceptToken", value: function(e23) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n2 = t2 ? this.resolveOffset(t2, -1) : this.pos; if (n2 == null || n2 < this.token.start) throw new RangeError("Token end out of bounds"); this.token.value = e23, this.token.end = n2; } }, { key: "getChunk", value: function() { if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) { var e23 = this.chunk, t2 = this.chunkPos; this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e23, this.chunk2Pos = t2, this.chunkOff = this.pos - this.chunkPos; } else { this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos; var n2 = this.input.chunk(this.pos), r2 = this.pos + n2.length; this.chunk = r2 > this.range.to ? n2.slice(0, this.range.to - this.pos) : n2, this.chunkPos = this.pos, this.chunkOff = 0; } } }, { key: "readNext", value: function() { return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff); } }, { key: "advance", value: function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1; for (this.chunkOff += e23; this.pos + e23 >= this.range.to; ) { if (this.rangeIndex == this.ranges.length - 1) return this.setDone(); e23 -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from; } return this.pos += e23, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext(); } }, { key: "setDone", value: function() { return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1; } }, { key: "reset", value: function(e23, t2) { if (t2 ? (this.token = t2, t2.start = e23, t2.lookAhead = e23 + 1, t2.value = t2.extended = -1) : this.token = $B, this.pos != e23) { if (this.pos = e23, e23 == this.end) return this.setDone(), this; for (; e23 < this.range.from; ) this.range = this.ranges[--this.rangeIndex]; for (; e23 >= this.range.to; ) this.range = this.ranges[++this.rangeIndex]; e23 >= this.chunkPos && e23 < this.chunkPos + this.chunk.length ? this.chunkOff = e23 - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext(); } return this; } }, { key: "read", value: function(e23, t2) { if (e23 >= this.chunkPos && t2 <= this.chunkPos + this.chunk.length) return this.chunk.slice(e23 - this.chunkPos, t2 - this.chunkPos); if (e23 >= this.chunk2Pos && t2 <= this.chunk2Pos + this.chunk2.length) return this.chunk2.slice(e23 - this.chunk2Pos, t2 - this.chunk2Pos); if (e23 >= this.range.from && t2 <= this.range.to) return this.input.read(e23, t2); var n2, r2 = "", i2 = bi(this.ranges); try { for (i2.s(); !(n2 = i2.n()).done; ) { var o2 = n2.value; if (o2.from >= t2) break; o2.to > e23 && (r2 += this.input.read(Math.max(o2.from, e23), Math.min(o2.to, t2))); } } catch (e24) { i2.e(e24); } finally { i2.f(); } return r2; } }]), e22; }(), AB = function() { function e22(t2, n2) { Ri(this, e22), this.data = t2, this.id = n2; } return zi(e22, [{ key: "token", value: function(e23, t2) { !function(e24, t3, n2, r2) { var i2 = 0, o2 = 1 << r2, a2 = n2.p.parser, s2 = a2.dialect; e: for (; (o2 & e24[i2]) != 0; ) { for (var u2 = e24[i2 + 1], c2 = i2 + 3; c2 < u2; c2 += 2) if ((e24[c2 + 1] & o2) > 0) { var l2 = e24[c2]; if (s2.allows(l2) && (t3.token.value == -1 || t3.token.value == l2 || a2.overrides(l2, t3.token.value))) { t3.acceptToken(l2); break; } } for (var f2 = t3.next, h2 = 0, d2 = e24[i2 + 2]; h2 < d2; ) { var v2 = h2 + d2 >> 1, p2 = u2 + v2 + (v2 << 1), m2 = e24[p2], g2 = e24[p2 + 1]; if (f2 < m2) d2 = v2; else { if (!(f2 >= g2)) { i2 = e24[p2 + 2], t3.advance(); continue e; } h2 = v2 + 1; } } break; } }(this.data, e23, t2, this.id); } }]), e22; }(); function MB(e22) { var t2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Uint16Array; if (typeof e22 != "string") return e22; for (var n2 = null, r2 = 0, i2 = 0; r2 < e22.length; ) { for (var o2 = 0; ; ) { var a2 = e22.charCodeAt(r2++), s2 = false; if (a2 == 126) { o2 = 65535; break; } a2 >= 92 && a2--, a2 >= 34 && a2--; var u2 = a2 - 32; if (u2 >= 46 && (u2 -= 46, s2 = true), o2 += u2, s2) break; o2 *= 46; } n2 ? n2[i2++] = o2 : n2 = new t2(o2); } return n2; } AB.prototype.contextual = AB.prototype.fallback = AB.prototype.extend = false; var EB, PB = typeof process != "undefined" && process.env && /\bparse\b/.test({}.LOG), NB = null; function TB(e22, t2, n2) { var r2 = e22.cursor(ZL.IncludeAnonymous); for (r2.moveTo(t2); ; ) if (!(n2 < 0 ? r2.childBefore(t2) : r2.childAfter(t2))) for (; ; ) { if ((n2 < 0 ? r2.to < t2 : r2.from > t2) && !r2.type.isError) return n2 < 0 ? Math.max(0, Math.min(r2.to - 1, t2 - 25)) : Math.min(e22.length, Math.max(r2.from + 1, t2 + 25)); if (n2 < 0 ? r2.prevSibling() : r2.nextSibling()) break; if (!r2.parent()) return n2 < 0 ? 0 : e22.length; } } !function(e22) { e22[e22.Margin = 25] = "Margin"; }(EB || (EB = {})); var IB, RB = function() { function e22(t2, n2) { Ri(this, e22), this.fragments = t2, this.nodeSet = n2, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment(); } return zi(e22, [{ key: "nextFragment", value: function() { var e23 = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++]; if (e23) { for (this.safeFrom = e23.openStart ? TB(e23.tree, e23.from + e23.offset, 1) - e23.offset : e23.from, this.safeTo = e23.openEnd ? TB(e23.tree, e23.to + e23.offset, -1) - e23.offset : e23.to; this.trees.length; ) this.trees.pop(), this.start.pop(), this.index.pop(); this.trees.push(e23.tree), this.start.push(-e23.offset), this.index.push(0), this.nextStart = this.safeFrom; } else this.nextStart = 1e9; } }, { key: "nodeAt", value: function(e23) { if (e23 < this.nextStart) return null; for (; this.fragment && this.safeTo <= e23; ) this.nextFragment(); if (!this.fragment) return null; for (; ; ) { var t2 = this.trees.length - 1; if (t2 < 0) return this.nextFragment(), null; var n2 = this.trees[t2], r2 = this.index[t2]; if (r2 != n2.children.length) { var i2 = n2.children[r2], o2 = this.start[t2] + n2.positions[r2]; if (o2 > e23) return this.nextStart = o2, null; if (i2 instanceof nB) { if (o2 == e23) { if (o2 < this.safeFrom) return null; var a2 = o2 + i2.length; if (a2 <= this.safeTo) { var s2 = i2.prop(GL.lookAhead); if (!s2 || a2 + s2 < this.fragment.to) return i2; } } this.index[t2]++, o2 + i2.length >= Math.max(this.safeFrom, e23) && (this.trees.push(i2), this.start.push(o2), this.index.push(0)); } else this.index[t2]++, this.nextStart = o2 + i2.length; } else this.trees.pop(), this.start.pop(), this.index.pop(); } } }]), e22; }(), DB = function() { function e22(t2, n2) { Ri(this, e22), this.stream = n2, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = t2.tokenizers.map(function(e23) { return new _B(); }); } return zi(e22, [{ key: "getActions", value: function(e23) { for (var t2 = 0, n2 = null, r2 = e23.p.parser, i2 = r2.tokenizers, o2 = r2.stateSlot(e23.state, 3), a2 = e23.curContext ? e23.curContext.hash : 0, s2 = 0, u2 = 0; u2 < i2.length; u2++) if ((1 << u2 & o2) != 0) { var c2 = i2[u2], l2 = this.tokens[u2]; if ((!n2 || c2.fallback) && ((c2.contextual || l2.start != e23.pos || l2.mask != o2 || l2.context != a2) && (this.updateCachedToken(l2, c2, e23), l2.mask = o2, l2.context = a2), l2.lookAhead > l2.end + 25 && (s2 = Math.max(l2.lookAhead, s2)), l2.value != 0)) { var f2 = t2; if (l2.extended > -1 && (t2 = this.addActions(e23, l2.extended, l2.end, t2)), t2 = this.addActions(e23, l2.value, l2.end, t2), !c2.extend && (n2 = l2, t2 > f2)) break; } } for (; this.actions.length > t2; ) this.actions.pop(); return s2 && e23.setLookAhead(s2), n2 || e23.pos != this.stream.end || ((n2 = new _B()).value = e23.p.parser.eofTerm, n2.start = n2.end = e23.pos, t2 = this.addActions(e23, n2.value, n2.end, t2)), this.mainToken = n2, this.actions; } }, { key: "getMainToken", value: function(e23) { if (this.mainToken) return this.mainToken; var t2 = new _B(), n2 = e23.pos, r2 = e23.p; return t2.start = n2, t2.end = Math.min(n2 + 1, r2.stream.end), t2.value = n2 == r2.stream.end ? r2.parser.eofTerm : 0, t2; } }, { key: "updateCachedToken", value: function(e23, t2, n2) { if (t2.token(this.stream.reset(n2.pos, e23), n2), e23.value > -1) { for (var r2 = n2.p.parser, i2 = 0; i2 < r2.specialized.length; i2++) if (r2.specialized[i2] == e23.value) { var o2 = r2.specializers[i2](this.stream.read(e23.start, e23.end), n2); if (o2 >= 0 && n2.p.parser.dialect.allows(o2 >> 1)) { (1 & o2) == 0 ? e23.value = o2 >> 1 : e23.extended = o2 >> 1; break; } } } else e23.value = 0, e23.end = Math.min(n2.p.stream.end, n2.pos + 1); } }, { key: "putAction", value: function(e23, t2, n2, r2) { for (var i2 = 0; i2 < r2; i2 += 3) if (this.actions[i2] == e23) return r2; return this.actions[r2++] = e23, this.actions[r2++] = t2, this.actions[r2++] = n2, r2; } }, { key: "addActions", value: function(e23, t2, n2, r2) { for (var i2 = e23.state, o2 = e23.p.parser, a2 = o2.data, s2 = 0; s2 < 2; s2++) for (var u2 = o2.stateSlot(i2, s2 ? 2 : 1); ; u2 += 3) { if (a2[u2] == 65535) { if (a2[u2 + 1] != 1) { r2 == 0 && a2[u2 + 1] == 2 && (r2 = this.putAction(FB(a2, u2 + 2), t2, n2, r2)); break; } u2 = FB(a2, u2 + 2); } a2[u2] == t2 && (r2 = this.putAction(FB(a2, u2 + 1), t2, n2, r2)); } return r2; } }]), e22; }(); !function(e22) { e22[e22.Distance = 5] = "Distance", e22[e22.MaxRemainingPerStep = 3] = "MaxRemainingPerStep", e22[e22.MinBufferLengthPrune = 500] = "MinBufferLengthPrune", e22[e22.ForceReduceLimit = 10] = "ForceReduceLimit", e22[e22.CutDepth = 15e3] = "CutDepth", e22[e22.CutTo = 9e3] = "CutTo"; }(IB || (IB = {})); var zB = function() { function e22(t2, n2, r2, i2) { Ri(this, e22), this.parser = t2, this.input = n2, this.ranges = i2, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.stream = new OB(n2, i2), this.tokens = new DB(t2, this.stream), this.topTerm = t2.top[1]; var o2 = i2[0].from; this.stacks = [xB.start(this, t2.top[0], o2)], this.fragments = r2.length && this.stream.end - o2 > 4 * t2.bufferLength ? new RB(r2, t2.nodeSet) : null; } return zi(e22, [{ key: "parsedPos", get: function() { return this.minStackPos; } }, { key: "advance", value: function() { for (var e23, t2, n2 = this.stacks, r2 = this.minStackPos, i2 = this.stacks = [], o2 = 0; o2 < n2.length; o2++) for (var a2 = n2[o2]; ; ) { if (this.tokens.mainToken = null, a2.pos > r2) i2.push(a2); else { if (this.advanceStack(a2, i2, n2)) continue; e23 || (e23 = [], t2 = []), e23.push(a2); var s2 = this.tokens.getMainToken(a2); t2.push(s2.value, s2.end); } break; } if (!i2.length) { var u2 = e23 && function(e24) { var t3, n3 = null, r3 = bi(e24); try { for (r3.s(); !(t3 = r3.n()).done; ) { var i3 = t3.value, o3 = i3.p.stoppedAt; (i3.pos == i3.p.stream.end || o3 != null && i3.pos > o3) && i3.p.parser.stateFlag(i3.state, 2) && (!n3 || n3.score < i3.score) && (n3 = i3); } } catch (e25) { r3.e(e25); } finally { r3.f(); } return n3; }(e23); if (u2) return this.stackToTree(u2); if (this.parser.strict) throw PB && e23 && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + r2); this.recovering || (this.recovering = 5); } if (this.recovering && e23) { var c2 = this.stoppedAt != null && e23[0].pos > this.stoppedAt ? e23[0] : this.runRecovery(e23, t2, i2); if (c2) return this.stackToTree(c2.forceAll()); } if (this.recovering) { var l2 = this.recovering == 1 ? 1 : 3 * this.recovering; if (i2.length > l2) for (i2.sort(function(e24, t3) { return t3.score - e24.score; }); i2.length > l2; ) i2.pop(); i2.some(function(e24) { return e24.reducePos > r2; }) && this.recovering--; } else if (i2.length > 1) e: for (var f2 = 0; f2 < i2.length - 1; f2++) for (var h2 = i2[f2], d2 = f2 + 1; d2 < i2.length; d2++) { var v2 = i2[d2]; if (h2.sameState(v2) || h2.buffer.length > 500 && v2.buffer.length > 500) { if (!((h2.score - v2.score || h2.buffer.length - v2.buffer.length) > 0)) { i2.splice(f2--, 1); continue e; } i2.splice(d2--, 1); } } this.minStackPos = i2[0].pos; for (var p2 = 1; p2 < i2.length; p2++) i2[p2].pos < this.minStackPos && (this.minStackPos = i2[p2].pos); return null; } }, { key: "stopAt", value: function(e23) { if (this.stoppedAt != null && this.stoppedAt < e23) throw new RangeError("Can't move stoppedAt forward"); this.stoppedAt = e23; } }, { key: "advanceStack", value: function(e23, t2, n2) { var r2 = e23.pos, i2 = this.parser, o2 = PB ? this.stackID(e23) + " -> " : ""; if (this.stoppedAt != null && r2 > this.stoppedAt) return e23.forceReduce() ? e23 : null; if (this.fragments) for (var a2 = e23.curContext && e23.curContext.tracker.strict, s2 = a2 ? e23.curContext.hash : 0, u2 = this.fragments.nodeAt(r2); u2; ) { var c2 = this.parser.nodeSet.types[u2.type.id] == u2.type ? i2.getGoto(e23.state, u2.type.id) : -1; if (c2 > -1 && u2.length && (!a2 || (u2.prop(GL.contextHash) || 0) == s2)) return e23.useNode(u2, c2), PB && console.log(o2 + this.stackID(e23) + " (via reuse of ".concat(i2.getName(u2.type.id), ")")), true; if (!(u2 instanceof nB) || u2.children.length == 0 || u2.positions[0] > 0) break; var l2 = u2.children[0]; if (!(l2 instanceof nB && u2.positions[0] == 0)) break; u2 = l2; } var f2 = i2.stateSlot(e23.state, 4); if (f2 > 0) return e23.reduce(f2), PB && console.log(o2 + this.stackID(e23) + " (via always-reduce ".concat(i2.getName(65535 & f2), ")")), true; if (e23.stack.length >= 15e3) for (; e23.stack.length > 9e3 && e23.forceReduce(); ) ; for (var h2 = this.tokens.getActions(e23), d2 = 0; d2 < h2.length; ) { var v2 = h2[d2++], p2 = h2[d2++], m2 = h2[d2++], g2 = d2 == h2.length || !n2, y2 = g2 ? e23 : e23.split(); if (y2.apply(v2, p2, m2), PB && console.log(o2 + this.stackID(y2) + " (via ".concat((65536 & v2) == 0 ? "shift" : "reduce of ".concat(i2.getName(65535 & v2)), " for ").concat(i2.getName(p2), " @ ").concat(r2).concat(y2 == e23 ? "" : ", split", ")")), g2) return true; y2.pos > r2 ? t2.push(y2) : n2.push(y2); } return false; } }, { key: "advanceFully", value: function(e23, t2) { for (var n2 = e23.pos; ; ) { if (!this.advanceStack(e23, null, null)) return false; if (e23.pos > n2) return LB(e23, t2), true; } } }, { key: "runRecovery", value: function(e23, t2, n2) { for (var r2 = null, i2 = false, o2 = 0; o2 < e23.length; o2++) { var a2 = e23[o2], s2 = t2[o2 << 1], u2 = t2[1 + (o2 << 1)], c2 = PB ? this.stackID(a2) + " -> " : ""; if (a2.deadEnd) { if (i2) continue; if (i2 = true, a2.restart(), PB && console.log(c2 + this.stackID(a2) + " (restarted)"), this.advanceFully(a2, n2)) continue; } for (var l2 = a2.split(), f2 = c2, h2 = 0; l2.forceReduce() && h2 < 10; h2++) { if (PB && console.log(f2 + this.stackID(l2) + " (via force-reduce)"), this.advanceFully(l2, n2)) break; PB && (f2 = this.stackID(l2) + " -> "); } var d2, v2 = bi(a2.recoverByInsert(s2)); try { for (v2.s(); !(d2 = v2.n()).done; ) { var p2 = d2.value; PB && console.log(c2 + this.stackID(p2) + " (via recover-insert)"), this.advanceFully(p2, n2); } } catch (e24) { v2.e(e24); } finally { v2.f(); } this.stream.end > a2.pos ? (u2 == a2.pos && (u2++, s2 = 0), a2.recoverByDelete(s2, u2), PB && console.log(c2 + this.stackID(a2) + " (via recover-delete ".concat(this.parser.getName(s2), ")")), LB(a2, n2)) : (!r2 || r2.score < a2.score) && (r2 = a2); } return r2; } }, { key: "stackToTree", value: function(e23) { return e23.close(), nB.build({ buffer: CB.create(e23), nodeSet: this.parser.nodeSet, topID: this.topTerm, maxBufferLength: this.parser.bufferLength, reused: this.reused, start: this.ranges[0].from, length: e23.pos - this.ranges[0].from, minRepeatType: this.parser.minRepeatTerm }); } }, { key: "stackID", value: function(e23) { var t2 = (NB || (NB = /* @__PURE__ */ new WeakMap())).get(e23); return t2 || NB.set(e23, t2 = String.fromCodePoint(this.nextStackID++)), t2 + e23; } }]), e22; }(); function LB(e22, t2) { for (var n2 = 0; n2 < t2.length; n2++) { var r2 = t2[n2]; if (r2.pos == e22.pos && r2.sameState(e22)) return void (t2[n2].score < e22.score && (t2[n2] = e22)); } t2.push(e22); } var BB = function() { function e22(t2, n2, r2) { Ri(this, e22), this.source = t2, this.flags = n2, this.disabled = r2; } return zi(e22, [{ key: "allows", value: function(e23) { return !this.disabled || this.disabled[e23] == 0; } }]), e22; }(), qB = function(e22) { _i(n2, bB); var t2 = Oi(n2); function n2(e23) { var r2, i2; if (Ri(this, n2), (i2 = t2.call(this)).wrappers = [], e23.version != 14) throw new RangeError("Parser version (".concat(e23.version, ") doesn't match runtime version (", 14, ")")); var o2 = e23.nodeNames.split(" "); i2.minRepeatTerm = o2.length; for (var a2 = 0; a2 < e23.repeatNodeCount; a2++) o2.push(""); for (var s2 = Object.keys(e23.topRules).map(function(t3) { return e23.topRules[t3][1]; }), u2 = [], c2 = 0; c2 < o2.length; c2++) u2.push([]); function l2(e24, t3, n3) { u2[e24].push([t3, t3.deserialize(String(n3))]); } if (e23.nodeProps) { var f2, h2 = bi(e23.nodeProps); try { for (h2.s(); !(f2 = h2.n()).done; ) { var d2 = f2.value, v2 = d2[0]; typeof v2 == "string" && (v2 = GL[v2]); for (var p2 = 1; p2 < d2.length; ) { var m2 = d2[p2++]; if (m2 >= 0) l2(m2, v2, d2[p2++]); else { for (var g2 = d2[p2 + -m2], y2 = -m2; y2 > 0; y2--) l2(d2[p2++], v2, g2); p2++; } } } } catch (e24) { h2.e(e24); } finally { h2.f(); } } i2.nodeSet = new XL(o2.map(function(t3, n3) { return YL.define({ name: n3 >= i2.minRepeatTerm ? void 0 : t3, id: n3, props: u2[n3], top: s2.indexOf(n3) > -1, error: n3 == 0, skipped: e23.skippedNodes && e23.skippedNodes.indexOf(n3) > -1 }); })), e23.propSources && (i2.nodeSet = (r2 = i2.nodeSet).extend.apply(r2, Ni(e23.propSources))), i2.strict = false, i2.bufferLength = 1024; var b2 = MB(e23.tokenData); if (i2.context = e23.context, i2.specialized = new Uint16Array(e23.specialized ? e23.specialized.length : 0), i2.specializers = [], e23.specialized) for (var k2 = 0; k2 < e23.specialized.length; k2++) i2.specialized[k2] = e23.specialized[k2].term, i2.specializers[k2] = e23.specialized[k2].get; return i2.states = MB(e23.states, Uint32Array), i2.data = MB(e23.stateData), i2.goto = MB(e23.goto), i2.maxTerm = e23.maxTerm, i2.tokenizers = e23.tokenizers.map(function(e24) { return typeof e24 == "number" ? new AB(b2, e24) : e24; }), i2.topRules = e23.topRules, i2.dialects = e23.dialects || {}, i2.dynamicPrecedences = e23.dynamicPrecedences || null, i2.tokenPrecTable = e23.tokenPrec, i2.termNames = e23.termNames || null, i2.maxNode = i2.nodeSet.types.length - 1, i2.dialect = i2.parseDialect(), i2.top = i2.topRules[Object.keys(i2.topRules)[0]], i2; } return zi(n2, [{ key: "createParse", value: function(e23, t3, n3) { var r2, i2 = new zB(this, e23, t3, n3), o2 = bi(this.wrappers); try { for (o2.s(); !(r2 = o2.n()).done; ) { i2 = (0, r2.value)(i2, e23, t3, n3); } } catch (e24) { o2.e(e24); } finally { o2.f(); } return i2; } }, { key: "getGoto", value: function(e23, t3) { var n3 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r2 = this.goto; if (t3 >= r2[0]) return -1; for (var i2 = r2[t3 + 1]; ; ) { var o2 = r2[i2++], a2 = 1 & o2, s2 = r2[i2++]; if (a2 && n3) return s2; for (var u2 = i2 + (o2 >> 1); i2 < u2; i2++) if (r2[i2] == e23) return s2; if (a2) return -1; } } }, { key: "hasAction", value: function(e23, t3) { for (var n3 = this.data, r2 = 0; r2 < 2; r2++) for (var i2, o2 = this.stateSlot(e23, r2 ? 2 : 1); ; o2 += 3) { if ((i2 = n3[o2]) == 65535) { if (n3[o2 + 1] != 1) { if (n3[o2 + 1] == 2) return FB(n3, o2 + 2); break; } i2 = n3[o2 = FB(n3, o2 + 2)]; } if (i2 == t3 || i2 == 0) return FB(n3, o2 + 1); } return 0; } }, { key: "stateSlot", value: function(e23, t3) { return this.states[6 * e23 + t3]; } }, { key: "stateFlag", value: function(e23, t3) { return (this.stateSlot(e23, 0) & t3) > 0; } }, { key: "validAction", value: function(e23, t3) { if (t3 == this.stateSlot(e23, 4)) return true; for (var n3 = this.stateSlot(e23, 1); ; n3 += 3) { if (this.data[n3] == 65535) { if (this.data[n3 + 1] != 1) return false; n3 = FB(this.data, n3 + 2); } if (t3 == FB(this.data, n3 + 1)) return true; } } }, { key: "nextStates", value: function(e23) { for (var t3 = this, n3 = [], r2 = this.stateSlot(e23, 1); ; r2 += 3) { if (this.data[r2] == 65535) { if (this.data[r2 + 1] != 1) break; r2 = FB(this.data, r2 + 2); } (1 & this.data[r2 + 2]) == 0 && function() { var e24 = t3.data[r2 + 1]; n3.some(function(t4, n4) { return 1 & n4 && t4 == e24; }) || n3.push(t3.data[r2], e24); }(); } return n3; } }, { key: "overrides", value: function(e23, t3) { var n3 = VB(this.data, this.tokenPrecTable, t3); return n3 < 0 || VB(this.data, this.tokenPrecTable, e23) < n3; } }, { key: "configure", value: function(e23) { var t3, r2 = Object.assign(Object.create(n2.prototype), this); if (e23.props && (r2.nodeSet = (t3 = this.nodeSet).extend.apply(t3, Ni(e23.props))), e23.top) { var i2 = this.topRules[e23.top]; if (!i2) throw new RangeError("Invalid top rule name ".concat(e23.top)); r2.top = i2; } return e23.tokenizers && (r2.tokenizers = this.tokenizers.map(function(t4) { var n3 = e23.tokenizers.find(function(e24) { return e24.from == t4; }); return n3 ? n3.to : t4; })), e23.contextTracker && (r2.context = e23.contextTracker), e23.dialect && (r2.dialect = this.parseDialect(e23.dialect)), e23.strict != null && (r2.strict = e23.strict), e23.wrap && (r2.wrappers = r2.wrappers.concat(e23.wrap)), e23.bufferLength != null && (r2.bufferLength = e23.bufferLength), r2; } }, { key: "hasWrappers", value: function() { return this.wrappers.length > 0; } }, { key: "getName", value: function(e23) { return this.termNames ? this.termNames[e23] : String(e23 <= this.maxNode && this.nodeSet.types[e23].name || e23); } }, { key: "eofTerm", get: function() { return this.maxNode + 1; } }, { key: "topNode", get: function() { return this.nodeSet.types[this.top[1]]; } }, { key: "dynamicPrecedence", value: function(e23) { var t3 = this.dynamicPrecedences; return t3 == null ? 0 : t3[e23] || 0; } }, { key: "parseDialect", value: function(e23) { var t3 = Object.keys(this.dialects), n3 = t3.map(function() { return false; }); if (e23) { var r2, i2 = bi(e23.split(" ")); try { for (i2.s(); !(r2 = i2.n()).done; ) { var o2 = r2.value, a2 = t3.indexOf(o2); a2 >= 0 && (n3[a2] = true); } } catch (e24) { i2.e(e24); } finally { i2.f(); } } for (var s2 = null, u2 = 0; u2 < t3.length; u2++) if (!n3[u2]) for (var c2, l2 = this.dialects[t3[u2]]; (c2 = this.data[l2++]) != 65535; ) (s2 || (s2 = new Uint8Array(this.maxTerm + 1)))[c2] = 1; return new BB(e23, n3, s2); } }], [{ key: "deserialize", value: function(e23) { return new n2(e23); } }]), n2; }(); function FB(e22, t2) { return e22[t2] | e22[t2 + 1] << 16; } function VB(e22, t2, n2) { for (var r2, i2 = t2; (r2 = e22[i2]) != 65535; i2++) if (r2 == n2) return i2 - t2; return -1; } var HB = gN({ String: BN.string, Number: BN.number, "True False": BN.bool, PropertyName: BN.propertyName, Null: BN.null, ",": BN.separator, "[ ]": BN.squareBracket, "{ }": BN.brace }), WB = qB.deserialize({ version: 14, states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j", stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O", goto: "!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R", nodeNames: "\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array", maxTerm: 25, nodeProps: [["openedBy", 7, "{", 12, "["], ["closedBy", 8, "}", 13, "]"]], propSources: [HB], skippedNodes: [0], repeatNodeCount: 2, tokenData: "(p~RaXY!WYZ!W]^!Wpq!Wrs!]|}$i}!O$n!Q!R$w!R![&V![!]&h!}#O&m#P#Q&r#Y#Z&w#b#c'f#h#i'}#o#p(f#q#r(k~!]Oc~~!`Upq!]qr!]rs!rs#O!]#O#P!w#P~!]~!wOe~~!zXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#g~#jR!Q![#s!c!i#s#T#Z#s~#vR!Q![$P!c!i$P#T#Z$P~$SR!Q![$]!c!i$]#T#Z$]~$`R!Q![!]!c!i!]#T#Z!]~$nOh~~$qQ!Q!R$w!R![&V~$|RT~!O!P%V!g!h%k#X#Y%k~%YP!Q![%]~%bRT~!Q![%]!g!h%k#X#Y%k~%nR{|%w}!O%w!Q![%}~%zP!Q![%}~&SPT~!Q![%}~&[ST~!O!P%V!Q![&V!g!h%k#X#Y%k~&mOg~~&rO]~~&wO[~~&zP#T#U&}~'QP#`#a'T~'WP#g#h'Z~'^P#X#Y'a~'fOR~~'iP#i#j'l~'oP#`#a'r~'uP#`#a'x~'}OS~~(QP#f#g(T~(WP#i#j(Z~(^P#X#Y(a~(fOQ~~(kOW~~(pOV~", tokenizers: [0], topRules: { JsonText: [0, 1] }, tokenPrec: 0 }), JB = HN.define({ parser: WB.configure({ props: [uT.add({ Object: vT({ except: /^\s*\}/ }), Array: vT({ except: /^\s*\]/ }) }), mT.add({ "Object Array": function(e22) { var t2 = e22.firstChild, n2 = e22.lastChild; return t2 && t2.to < n2.from ? { from: t2.to, to: n2.type.isError ? e22.to : n2.from } : null; } })] }), languageData: { closeBrackets: { brackets: ["[", "{", '"'] }, indentOnInput: /^\s*[\}\]]$/ } }); function UB(e22, t2) { var n2 = Date.now(), r2 = e22(); return t2(Date.now() - n2), r2; } function KB(e22) { co(e22, "svelte-1oo7hnc", ".jse-status-bar.svelte-1oo7hnc.svelte-1oo7hnc{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);margin:0;border-top:var(--jse-panel-border);border-left:var(--jse-main-border);border-right:var(--jse-main-border);display:flex;gap:var(--jse-padding)}.jse-status-bar.svelte-1oo7hnc.svelte-1oo7hnc:last-child{border-bottom:var(--jse-main-border)}.jse-status-bar.svelte-1oo7hnc .jse-status-bar-info.svelte-1oo7hnc{padding:2px}"); } function GB(e22) { var t2, n2, r2; return { c: function() { t2 = go("div"), n2 = bo("Line: "), r2 = bo(e22[0]), So(t2, "class", "jse-status-bar-info svelte-1oo7hnc"); }, m: function(e23, i2) { vo(e23, t2, i2), uo(t2, n2), uo(t2, r2); }, p: function(e23, t3) { 1 & t3 && Ao(r2, e23[0]); }, d: function(e23) { e23 && po(t2); } }; } function QB(e22) { var t2, n2, r2; return { c: function() { t2 = go("div"), n2 = bo("Column: "), r2 = bo(e22[1]), So(t2, "class", "jse-status-bar-info svelte-1oo7hnc"); }, m: function(e23, i2) { vo(e23, t2, i2), uo(t2, n2), uo(t2, r2); }, p: function(e23, t3) { 2 & t3 && Ao(r2, e23[1]); }, d: function(e23) { e23 && po(t2); } }; } function YB(e22) { var t2, n2, r2, i2; return { c: function() { t2 = go("div"), n2 = bo("Selection: "), r2 = bo(e22[2]), i2 = bo(" characters"), So(t2, "class", "jse-status-bar-info svelte-1oo7hnc"); }, m: function(e23, o2) { vo(e23, t2, o2), uo(t2, n2), uo(t2, r2), uo(t2, i2); }, p: function(e23, t3) { 4 & t3 && Ao(r2, e23[2]); }, d: function(e23) { e23 && po(t2); } }; } function ZB(e22) { var t2, n2, r2, i2 = e22[0] !== void 0 && GB(e22), o2 = e22[1] !== void 0 && QB(e22), a2 = e22[2] !== void 0 && e22[2] > 0 && YB(e22); return { c: function() { t2 = go("div"), i2 && i2.c(), n2 = ko(), o2 && o2.c(), r2 = ko(), a2 && a2.c(), So(t2, "class", "jse-status-bar svelte-1oo7hnc"); }, m: function(e23, s2) { vo(e23, t2, s2), i2 && i2.m(t2, null), uo(t2, n2), o2 && o2.m(t2, null), uo(t2, r2), a2 && a2.m(t2, null); }, p: function(e23, s2) { var u2 = ki(s2, 1)[0]; e23[0] !== void 0 ? i2 ? i2.p(e23, u2) : ((i2 = GB(e23)).c(), i2.m(t2, n2)) : i2 && (i2.d(1), i2 = null), e23[1] !== void 0 ? o2 ? o2.p(e23, u2) : ((o2 = QB(e23)).c(), o2.m(t2, r2)) : o2 && (o2.d(1), o2 = null), e23[2] !== void 0 && e23[2] > 0 ? a2 ? a2.p(e23, u2) : ((a2 = YB(e23)).c(), a2.m(t2, null)) : a2 && (a2.d(1), a2 = null); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2), i2 && i2.d(), o2 && o2.d(), a2 && a2.d(); } }; } function XB(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2 = t2.editorState; return e22.$$set = function(e23) { "editorState" in e23 && n2(3, d2 = e23.editorState); }, e22.$$.update = function() { 56 & e22.$$.dirty && n2(9, u2 = n2(5, i2 = n2(4, r2 = d2 == null ? void 0 : d2.selection) === null || r2 === void 0 ? void 0 : r2.main) === null || i2 === void 0 ? void 0 : i2.head), 584 & e22.$$.dirty && n2(10, c2 = n2(6, o2 = d2 == null ? void 0 : d2.doc) === null || o2 === void 0 ? void 0 : o2.lineAt(u2)), 1024 & e22.$$.dirty && n2(0, l2 = c2 ? c2.number : void 0), 1536 & e22.$$.dirty && n2(1, f2 = c2 ? u2 - c2.from + 1 : void 0), 392 & e22.$$.dirty && n2(2, h2 = n2(8, s2 = n2(7, a2 = d2 == null ? void 0 : d2.selection) === null || a2 === void 0 ? void 0 : a2.ranges) === null || s2 === void 0 ? void 0 : s2.reduce(function(e23, t3) { return e23 + t3.to - t3.from; }, 0)); }, [l2, f2, h2, d2, r2, i2, o2, a2, s2, u2, c2]; } var eq = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, XB, ZB, Ui, { editorState: 3 }, KB), r2; } return zi(n2); }(), tq = IT.define([{ tag: BN.propertyName, color: "var(--jse-key-color)" }, { tag: BN.number, color: "var(--jse-value-color-number)" }, { tag: BN.bool, color: "var(--jse-value-color-boolean)" }, { tag: BN.string, color: "var(--jse-value-color-string)" }, { tag: BN.keyword, color: "var(--jse-value-color-null)" }]), nq = LT(tq), rq = tq.style; function iq(e22) { co(e22, "svelte-cmeafv", '.jse-text-mode.svelte-cmeafv.svelte-cmeafv{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-cmeafv.svelte-cmeafv{border-top:var(--jse-main-border)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-cmeafv .jse-contents.jse-hidden.svelte-cmeafv{visibility:hidden}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-activeLine,.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-activeLineGutter{background:var(--jse-hover-background-color)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-diagnostic{font-size:var(--jse-font-size);font-family:var(--jse-font-family)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-cmeafv .jse-contents.svelte-cmeafv .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-cmeafv .jse-contents .jse-loading-space.svelte-cmeafv{flex:1}.jse-text-mode.svelte-cmeafv .jse-contents .jse-loading.svelte-cmeafv{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}'); } function oq(e22) { var t2, n2; return t2 = new JS({ props: { readOnly: e22[1], onFormat: e22[17], onCompact: e22[18], onSort: e22[19], onTransform: e22[20], onToggleSearch: e22[21], onUndo: e22[22], onRedo: e22[23], canFormat: !e22[15], canCompact: !e22[15], canSort: !e22[15], canTransform: !e22[15], canUndo: e22[10], canRedo: e22[11], onRenderMenu: e22[5] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 2 & n3[0] && (r2.readOnly = e23[1]), 32768 & n3[0] && (r2.canFormat = !e23[15]), 32768 & n3[0] && (r2.canCompact = !e23[15]), 32768 & n3[0] && (r2.canSort = !e23[15]), 32768 & n3[0] && (r2.canTransform = !e23[15]), 1024 & n3[0] && (r2.canUndo = e23[10]), 2048 & n3[0] && (r2.canRedo = e23[11]), 32 & n3[0] && (r2.onRenderMenu = e23[5]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function aq(e22) { var t2; return { c: function() { (t2 = go("div")).innerHTML = '
\n
loading...
', So(t2, "class", "jse-contents svelte-cmeafv"); }, m: function(e23, n2) { vo(e23, t2, n2); }, p: Bi, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function sq(e22) { var t2, n2, r2, i2, o2, a2, s2, u2 = e22[14] && uq(e22), c2 = e22[3] && cq(e22), l2 = e22[12] && lq(e22); return a2 = new SS({ props: { validationErrors: e22[9], selectError: e22[26] } }), { c: function() { u2 && u2.c(), t2 = ko(), n2 = go("div"), r2 = ko(), c2 && c2.c(), i2 = ko(), l2 && l2.c(), o2 = ko(), Aa(a2.$$.fragment), So(n2, "class", "jse-contents svelte-cmeafv"), To(n2, "jse-hidden", e22[14]); }, m: function(f2, h2) { u2 && u2.m(f2, h2), vo(f2, t2, h2), vo(f2, n2, h2), e22[46](n2), vo(f2, r2, h2), c2 && c2.m(f2, h2), vo(f2, i2, h2), l2 && l2.m(f2, h2), vo(f2, o2, h2), Ma(a2, f2, h2), s2 = true; }, p: function(e23, r3) { e23[14] ? u2 ? (u2.p(e23, r3), 16384 & r3[0] && ya(u2, 1)) : ((u2 = uq(e23)).c(), ya(u2, 1), u2.m(t2.parentNode, t2)) : u2 && (ma(), ba(u2, 1, 1, function() { u2 = null; }), ga()), 16384 & r3[0] && To(n2, "jse-hidden", e23[14]), e23[3] ? c2 ? (c2.p(e23, r3), 8 & r3[0] && ya(c2, 1)) : ((c2 = cq(e23)).c(), ya(c2, 1), c2.m(i2.parentNode, i2)) : c2 && (ma(), ba(c2, 1, 1, function() { c2 = null; }), ga()), e23[12] ? l2 ? (l2.p(e23, r3), 4096 & r3[0] && ya(l2, 1)) : ((l2 = lq(e23)).c(), ya(l2, 1), l2.m(o2.parentNode, o2)) : l2 && (ma(), ba(l2, 1, 1, function() { l2 = null; }), ga()); var s3 = {}; 512 & r3[0] && (s3.validationErrors = e23[9]), a2.$set(s3); }, i: function(e23) { s2 || (ya(u2), ya(c2), ya(l2), ya(a2.$$.fragment, e23), s2 = true); }, o: function(e23) { ba(u2), ba(c2), ba(l2), ba(a2.$$.fragment, e23), s2 = false; }, d: function(s3) { u2 && u2.d(s3), s3 && po(t2), s3 && po(n2), e22[46](null), s3 && po(r2), c2 && c2.d(s3), s3 && po(i2), l2 && l2.d(s3), s3 && po(o2), Ea(a2, s3); } }; } function uq(e22) { var t2, n2; return t2 = new cS({ props: { icon: Cj, type: "error", message: "The JSON document is larger than ".concat(Oj(10485760, 1024), ", ") + "and may crash your browser when loading it in text mode. Actual size: ".concat(Oj(e22[0].length, 1024), "."), actions: [{ text: "Open anyway", title: "Open the document in text mode. This may freeze or crash your browser.", onClick: e22[24] }, { text: "Open in tree mode", title: "Open the document in tree mode. Tree mode can handle large documents.", onClick: e22[4] }, { text: "Cancel", title: "Cancel opening this large document.", onClick: e22[25] }] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 1 & n3[0] && (r2.message = "The JSON document is larger than ".concat(Oj(10485760, 1024), ", ") + "and may crash your browser when loading it in text mode. Actual size: ".concat(Oj(e23[0].length, 1024), ".")), 16 & n3[0] && (r2.actions = [{ text: "Open anyway", title: "Open the document in text mode. This may freeze or crash your browser.", onClick: e23[24] }, { text: "Open in tree mode", title: "Open the document in tree mode. Tree mode can handle large documents.", onClick: e23[4] }, { text: "Cancel", title: "Cancel opening this large document.", onClick: e23[25] }]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function cq(e22) { var t2, n2; return t2 = new eq({ props: { editorState: e22[8] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 256 & n3[0] && (r2.editorState = e23[8]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function lq(e22) { var t2, n2; return t2 = new cS({ props: { type: "error", icon: Cj, message: e22[12].message, actions: e22[13], onClick: e22[47] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 4096 & n3[0] && (r2.message = e23[12].message), 8192 & n3[0] && (r2.actions = e23[13]), 4096 & n3[0] && (r2.onClick = e23[47]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function fq(e22) { var t2, n2, r2, i2, o2, a2 = e22[2] && oq(e22), s2 = [sq, aq], u2 = []; return r2 = function(e23, t3) { return e23[16] ? 1 : 0; }(e22), i2 = u2[r2] = s2[r2](e22), { c: function() { t2 = go("div"), a2 && a2.c(), n2 = ko(), i2.c(), So(t2, "class", "jse-text-mode svelte-cmeafv"), To(t2, "no-main-menu", !e22[2]); }, m: function(i3, s3) { vo(i3, t2, s3), a2 && a2.m(t2, null), uo(t2, n2), u2[r2].m(t2, null), e22[48](t2), o2 = true; }, p: function(e23, r3) { e23[2] ? a2 ? (a2.p(e23, r3), 4 & r3[0] && ya(a2, 1)) : ((a2 = oq(e23)).c(), ya(a2, 1), a2.m(t2, n2)) : a2 && (ma(), ba(a2, 1, 1, function() { a2 = null; }), ga()), i2.p(e23, r3), 4 & r3[0] && To(t2, "no-main-menu", !e23[2]); }, i: function(e23) { o2 || (ya(a2), ya(i2), o2 = true); }, o: function(e23) { ba(a2), ba(i2), o2 = false; }, d: function(n3) { n3 && po(t2), a2 && a2.d(), u2[r2].d(), e22[48](null); } }; } function hq(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2 = t2.readOnly, v2 = d2 !== void 0 && d2, p2 = t2.mainMenuBar, m2 = p2 === void 0 || p2, g2 = t2.statusBar, y2 = g2 === void 0 || g2, b2 = t2.text, k2 = b2 === void 0 ? "" : b2, w2 = t2.indentation, x2 = w2 === void 0 ? 2 : w2, j2 = t2.tabSize, S2 = j2 === void 0 ? 4 : j2, C2 = t2.escapeUnicodeCharacters, _2 = C2 !== void 0 && C2, $2 = t2.validator, O2 = $2 === void 0 ? null : $2, A2 = t2.onChange, M2 = A2 === void 0 ? null : A2, E2 = t2.onSwitchToTreeMode, P2 = E2 === void 0 ? Wu : E2, N2 = t2.onError, T2 = t2.onFocus, I2 = T2 === void 0 ? Wu : T2, R2 = t2.onBlur, D2 = R2 === void 0 ? Wu : R2, z2 = t2.onRenderMenu, L2 = z2 === void 0 ? Wu : z2, B2 = t2.onSortModal, q2 = t2.onTransformModal, F2 = Da("jsoneditor:TextMode"), V2 = { key: "Mod-i", run: ie2, shift: oe2, preventDefault: true }, H2 = typeof window == "undefined"; F2("isSSR:", H2); var W2 = false, J2 = [], U2 = new VC(), K2 = new VC(), G2 = new VC(), Q2 = _2; Uo(yi(mi().mark(function e23() { return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (!H2) { e24.next = 2; break; } return e24.abrupt("return"); case 2: try { c2 = fe2({ target: u2, initialText: o2 ? "" : k2, readOnly: v2, indentation: x2 }), te2(); } catch (e25) { console.error(e25); } case 3: case "end": return e24.stop(); } }, e23); }))), Ko(function() { c2 && (F2("Destroy CodeMirror editor"), c2.destroy()); }); var Y2 = false, Z2 = false, X2 = Jk(), ee2 = Jk(); function te2() { c2 && (F2("focus"), c2.focus()); } var ne2 = false; function re2(e23) { F2("patch", e23); var t3 = k2, r3 = JSON.parse(k2), i3 = fs.exports.immutableJSONPatch(r3, e23), o3 = fs.exports.revertJSONPatch(r3, e23); return n2(0, k2 = JSON.stringify(i3, null, x2)), k2 !== t3 && ke2(k2, t3), { json: i3, previousJson: r3, undo: o3, redo: e23 }; } function ie2() { if (F2("format"), !v2) try { var e23 = k2, t3 = JSON.parse(k2); n2(0, k2 = JSON.stringify(t3, null, x2)), k2 !== e23 && ke2(k2, e23); } catch (e24) { N2(e24); } } function oe2() { if (F2("compact"), !v2) try { var e23 = k2, t3 = JSON.parse(k2); n2(0, k2 = JSON.stringify(t3)), k2 !== e23 && ke2(k2, e23); } catch (e24) { N2(e24); } } function ae2() { if (F2("repair"), !v2) try { var e23 = k2; n2(0, k2 = Os(k2)), n2(44, we2 = "valid"), n2(12, xe2 = void 0), k2 !== e23 && ke2(k2, e23); } catch (e24) { N2(e24); } } function se2(e23) { var t3 = e23.id, n3 = e23.selectedPath, r3 = e23.onTransform, i3 = e23.onClose; try { var o3 = JSON.parse(k2); ne2 = true, q2({ id: t3 || ee2, json: o3, selectedPath: n3, onTransform: r3 ? function(e24) { r3({ operations: e24, json: o3, transformedJson: fs.exports.immutableJSONPatch(o3, e24) }); } : function(e24) { F2("onTransform", e24), re2(e24); }, onClose: function() { ne2 = false, te2(), i3 && i3(); } }); } catch (e24) { N2(e24); } } function ue2(e23) { F2("select parse error", e23); var t3 = de2(e23, false); ce2(t3.from, t3.to), te2(); } function ce2(e23, t3) { F2("setSelection", { anchor: e23, head: t3 }), c2 && c2.dispatch(c2.state.update({ selection: { anchor: e23, head: t3 }, scrollIntoView: true })); } function le2(e23, t3) { if (t3.state.selection.ranges.length === 1) { var n3 = t3.state.selection.ranges[0], r3 = k2.slice(n3.from, n3.to); if (r3 === "{" || r3 === "[") { var i3 = hs.parse(k2), o3 = Object.keys(i3.pointers).find(function(e24) { var t4; return ((t4 = i3.pointers[e24].value) === null || t4 === void 0 ? void 0 : t4.pos) === n3.from; }), a3 = i3.pointers[o3]; if (o3 && a3 && a3.value && a3.valueEnd) F2("pointer found, selecting inner contents of path:", o3, a3), ce2(a3.value.pos + 1, a3.valueEnd.pos - 1); } } } function fe2(e23) { var t3 = e23.target, r3 = e23.initialText, i3 = e23.readOnly, o3 = e23.indentation; F2("Create CodeMirror editor", { readOnly: i3, indentation: o3 }); var a3 = m_.create({ doc: r3, extensions: [qM.of([pD, V2]), OL(function() { return be2.flush(), function() { if (F2("validate"), n2(44, we2 = "valid"), n2(12, xe2 = null), n2(9, J2 = []), k2.length > 104857600) return [{ from: 0, to: 0, message: "Validation turned off: the document is too large", severity: "info" }]; if (k2.length === 0) return []; try { var e24 = UB(function() { return JSON.parse(k2); }, function(e25) { return F2("validate: parsed json in ".concat(e25, " ms")); }); return O2 ? (n2(9, J2 = UB(function() { return O2(e24); }, function(e25) { return F2("validate: validated json in ".concat(e25, " ms")); })), J2.map(he2)) : []; } catch (e25) { var t4 = UB(function() { return function(e26) { if (e26.length > 1048576) return false; try { return JSON.parse(Os(e26)), true; } catch (e27) { return false; } }(k2); }, function(e26) { return F2("validate: checked whether repairable in ".concat(e26, " ms")); }); return n2(12, xe2 = tx(k2, e25.message || e25.toString())), n2(44, we2 = t4 ? "repairable" : "invalid"), [de2(xe2, t4)]; } }(); }, { delay: 300 }), WL(), JL, nq, PM.domEventHandlers({ dblclick: le2 }), PM.updateListener.of(function(e24) { n2(8, h2 = e24.state), e24.docChanged && be2(); }), new tT(JB), zD({ top: true }), U2.of(m_.readOnly.of(i3)), G2.of(m_.tabSize.of(S2)), K2.of(ge2(o3)), PM.lineWrapping] }); return c2 = new PM({ state: a3, parent: t3 }); } function he2(e23) { var t3 = e23.path, n3 = e23.message, r3 = e23.isChildError, i3 = function(e24, t4) { try { var n4 = hs.parse(e24), r4 = fs.exports.compileJSONPointer(t4), i4 = n4.pointers[r4]; if (i4) return { path: t4, line: i4.key ? i4.key.line : i4.value ? i4.value.line : 0, column: i4.key ? i4.key.column : i4.value ? i4.value.column : 0, from: i4.key ? i4.key.pos : i4.value ? i4.value.pos : 0, to: i4.keyEnd ? i4.keyEnd.pos : i4.valueEnd ? i4.valueEnd.pos : 0 }; } catch (e25) { console.error(e25); } return null; }(k2, t3); return { path: t3, isChildError: r3, line: i3.line, column: i3.column, from: i3.from, to: i3.to, message: n3, severity: "warning", actions: [] }; } function de2(e23, t3) { var n3 = e23.line, r3 = e23.column, i3 = e23.position; return { path: null, line: n3, column: r3, from: i3 || 0, to: i3 || 0, severity: "error", message: e23.message, actions: t3 && !v2 ? [{ name: "Auto repair", apply: function() { return ae2(); } }] : null }; } function ve2(e23) { var t3 = arguments.length > 1 && arguments[1] !== void 0 && arguments[1]; !o2 || t3 ? c2 && e23 !== l2 && (F2("setCodeMirrorValue length=", e23.length), l2 = e23, c2.dispatch({ changes: { from: 0, to: c2.state.doc.length, insert: a2.escapeValue(e23) } }), ye2()) : F2("not applying text: editor is disabled"); } function pe2() { F2("forceUpdateText", { escapeUnicodeCharacters: _2 }), c2 && c2.dispatch({ changes: { from: 0, to: c2.state.doc.length, insert: a2.escapeValue(k2) } }); } function me2() { if (c2 && (l2 = c2 ? a2.unescapeValue(c2.state.doc.toString()) : "") !== k2) { var e23 = l2; F2("text changed"), n2(0, k2 = l2), ye2(), ke2(k2, e23); } } function ge2(e23) { return rT.of(typeof e23 == "number" ? " ".repeat(e23) : e23); } function ye2() { n2(10, Y2 = tR(c2.state) > 0), n2(11, Z2 = nR(c2.state) > 0), F2({ canUndo: Y2, canRedo: Z2 }); } Mj({ onMount: Uo, onDestroy: Ko, getWindow: function() { return Mx(f2); }, hasFocus: function() { return ne2 && document.hasFocus() || Ex(f2); }, onFocus: I2, onBlur: D2 }); var be2 = tv(me2, 300); function ke2(e23, t3) { M2 && M2(e23, t3); } var we2 = "valid", xe2 = null; return e22.$$set = function(e23) { "readOnly" in e23 && n2(1, v2 = e23.readOnly), "mainMenuBar" in e23 && n2(2, m2 = e23.mainMenuBar), "statusBar" in e23 && n2(3, y2 = e23.statusBar), "text" in e23 && n2(0, k2 = e23.text), "indentation" in e23 && n2(28, x2 = e23.indentation), "tabSize" in e23 && n2(29, S2 = e23.tabSize), "escapeUnicodeCharacters" in e23 && n2(30, _2 = e23.escapeUnicodeCharacters), "validator" in e23 && n2(31, O2 = e23.validator), "onChange" in e23 && n2(32, M2 = e23.onChange), "onSwitchToTreeMode" in e23 && n2(4, P2 = e23.onSwitchToTreeMode), "onError" in e23 && n2(33, N2 = e23.onError), "onFocus" in e23 && n2(34, I2 = e23.onFocus), "onBlur" in e23 && n2(35, D2 = e23.onBlur), "onRenderMenu" in e23 && n2(5, L2 = e23.onRenderMenu), "onSortModal" in e23 && n2(36, B2 = e23.onSortModal), "onTransformModal" in e23 && n2(37, q2 = e23.onTransformModal); }, e22.$$.update = function() { 1 & e22.$$.dirty[0] && n2(15, r2 = k2.length === 0), 1 & e22.$$.dirty[0] && n2(45, i2 = k2 && k2.length > 10485760), 18432 & e22.$$.dirty[1] && n2(14, o2 = i2 && !W2), 1073741824 & e22.$$.dirty[0] && (a2 = dx({ escapeControlCharacters: false, escapeUnicodeCharacters: _2 })), 1 & e22.$$.dirty[0] && ve2(k2), 268435456 & e22.$$.dirty[0] && function(e23) { c2 && (F2("updateIndentation", e23), c2.dispatch({ effects: K2.reconfigure(ge2(e23)) })); }(x2), 536870912 & e22.$$.dirty[0] && function(e23) { c2 && (F2("updateTabSize", e23), c2.dispatch({ effects: G2.reconfigure(m_.tabSize.of(e23)) })); }(S2), 2 & e22.$$.dirty[0] && function(e23) { c2 && (F2("updateReadOnly", e23), c2.dispatch({ effects: U2.reconfigure(m_.readOnly.of(e23)) })); }(v2), 1073741824 & e22.$$.dirty[0] | 4096 & e22.$$.dirty[1] && Q2 !== _2 && (n2(43, Q2 = _2), pe2()), 2 & e22.$$.dirty[0] | 1 & e22.$$.dirty[1] && pe2(), 2 & e22.$$.dirty[0] | 8192 & e22.$$.dirty[1] && n2(13, s2 = we2 !== "repairable" || v2 ? [] : [{ icon: _j, text: "Auto repair", title: "Automatically repair JSON", onClick: ae2 }]); }, [k2, v2, m2, y2, P2, L2, u2, f2, h2, J2, Y2, Z2, xe2, s2, o2, r2, H2, ie2, oe2, function() { var e23; if (!v2) try { var t3 = JSON.parse(k2); ne2 = true, B2({ id: X2, json: t3, selectedPath: [], onSort: (e23 = yi(mi().mark(function e24(t4) { return mi().wrap(function(e25) { for (; ; ) switch (e25.prev = e25.next) { case 0: F2("onSort", t4), re2(t4); case 2: case "end": return e25.stop(); } }, e24); })), function(t4) { return e23.apply(this, arguments); }), onClose: function() { ne2 = false, te2(); } }); } catch (e24) { N2(e24); } }, function() { v2 || se2({ selectedPath: [] }); }, function() { c2 && (u2 && u2.querySelector(".cm-search") ? sz(c2) : az(c2)); }, function() { v2 || c2 && (QI(c2), te2()); }, function() { v2 || c2 && (YI(c2), te2()); }, function() { n2(42, W2 = true), ve2(k2, true); }, function() { me2(); }, function(e23) { F2("select validation error", e23); var t3 = he2(e23); ce2(t3.from, t3.to), te2(); }, ue2, x2, S2, _2, O2, M2, N2, I2, D2, B2, q2, te2, re2, se2, function() { F2("refresh"); var e23 = c2.state.doc.length; c2.dispatch({ changes: { from: e23, to: e23, insert: " " } }), c2.dispatch({ changes: { from: e23, to: e23 + 1, insert: "" } }); }, W2, Q2, we2, i2, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(6, u2 = e23); }); }, function() { return ue2(xe2); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(7, f2 = e23); }); }]; } tq.style = function(e22) { return rq(e22 || []); }; var dq = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, hq, fq, Ki, { readOnly: 1, mainMenuBar: 2, statusBar: 3, text: 0, indentation: 28, tabSize: 29, escapeUnicodeCharacters: 30, validator: 31, onChange: 32, onSwitchToTreeMode: 4, onError: 33, onFocus: 34, onBlur: 35, onRenderMenu: 5, onSortModal: 36, onTransformModal: 37, focus: 38, patch: 39, openTransformModal: 40, refresh: 41 }, iq, [-1, -1, -1]), r2; } return zi(n2, [{ key: "focus", get: function() { return this.$$.ctx[38]; } }, { key: "patch", get: function() { return this.$$.ctx[39]; } }, { key: "openTransformModal", get: function() { return this.$$.ctx[40]; } }, { key: "refresh", get: function() { return this.$$.ctx[41]; } }]), n2; }(), vq = Da("jsoneditor:AutoScrollHandler"); var pq = function(e22, t2, n2, r2) { return (e22 /= r2 / 2) < 1 ? n2 / 2 * e22 * e22 + t2 : -n2 / 2 * (--e22 * (e22 - 2) - 1) + t2; }, mq = function() { var e22, t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2; function d2() { return e22.scrollY || e22.pageYOffset || e22.scrollTop; } function v2(t3) { return t3.getBoundingClientRect().top - (e22.getBoundingClientRect ? e22.getBoundingClientRect().top : 0) + n2; } function p2(t3) { e22.scrollTo ? e22.scrollTo(0, t3) : e22.scrollTop = t3; } function m2(e23) { c2 || (c2 = e23), p2(o2(l2 = e23 - c2, n2, s2, u2)), h2 = true, l2 < u2 ? requestAnimationFrame(m2) : function() { p2(n2 + s2), t2 && a2 && (t2.setAttribute("tabindex", "-1"), t2.focus()); typeof f2 == "function" && f2(); c2 = false, h2 = false; }(); } return function(l3) { var p3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; switch (u2 = p3.duration || 1e3, i2 = p3.offset || 0, f2 = p3.callback, o2 = p3.easing || pq, a2 = p3.a11y || false, Li(p3.container)) { case "object": e22 = p3.container; break; case "string": e22 = document.querySelector(p3.container); break; default: e22 = window; } switch (n2 = d2(), Li(l3)) { case "number": t2 = void 0, a2 = false, r2 = n2 + l3; break; case "object": r2 = v2(t2 = l3); break; case "string": t2 = document.querySelector(l3), r2 = v2(t2); } switch (s2 = r2 - n2 + i2, Li(p3.duration)) { case "number": u2 = p3.duration; break; case "function": u2 = p3.duration(s2); } h2 ? c2 = false : requestAnimationFrame(m2); }; }; function gq(e22) { for (var t2 = bb(e22, function(e23) { return e23.start; }), n2 = [t2[0]], r2 = 0; r2 < t2.length; r2++) { var i2 = n2.length - 1, o2 = n2[i2], a2 = t2[r2]; a2.start <= o2.end ? n2[i2] = { start: Math.min(o2.start, a2.start), end: Math.max(o2.end, a2.end) } : n2.push(a2); } return n2; } function yq(e22, t2) { return e22.some(function(e23) { return t2 >= e23.start && t2 < e23.end; }); } function bq(e22) { return kq(e22) + 100; } function kq(e22) { return 100 * Math.floor(e22 / 100); } function wq(e22) { var t2 = { expandedMap: {}, enforceStringMap: {}, visibleSectionsMap: {}, selection: void 0 }; return (e22 == null ? void 0 : e22.select) && (t2 = xi(xi({}, t2), {}, { selection: e22.select(e22.json, t2) })), (e22 == null ? void 0 : e22.expand) && (t2 = Cq(e22.json, t2, [], e22.expand)), t2; } function xq(e22, t2) { return e22.visibleSectionsMap[t2] || Xa; } function jq(e22, t2, n2) { t2.forEach(function(t3) { var r2 = t3.start, i2 = t3.end; Fw(r2, Math.min(e22.length, i2), n2); }); } function Sq(e22, t2, n2) { for (var r2 = xi({}, t2.expandedMap), i2 = xi({}, t2.visibleSectionsMap), o2 = 0; o2 <= n2.length; o2++) { var a2 = n2.slice(0, o2), s2 = fs.exports.compileJSONPointer(a2), u2 = fs.exports.getIn(e22, a2); if (Ms(u2) && (r2[s2] = true), Array.isArray(u2) && o2 < n2.length) { var c2 = i2[s2] || Xa, l2 = Uw(n2[o2]); if (!yq(c2, l2)) { var f2 = kq(l2), h2 = { start: f2, end: bq(f2) }; i2[s2] = gq(c2.concat(h2)); } } } return xi(xi({}, t2), {}, { expandedMap: r2, visibleSectionsMap: i2 }); } function Cq(e22, t2, n2, r2) { var i2 = xi({}, t2.expandedMap); var o2 = n2.slice(); return function e23(n3) { var a2 = o2.length; if (Array.isArray(n3)) { if (r2(o2)) { var s2 = fs.exports.compileJSONPointer(o2); if (i2[s2] = true, n3.length > 0) { var u2 = xq(t2, s2); jq(n3, u2, function(t3) { o2[a2] = String(t3), e23(n3[t3]); }), o2.pop(); } } } else if (As(n3) && r2(o2)) { i2[fs.exports.compileJSONPointer(o2)] = true; var c2 = Object.keys(n3); if (c2.length > 0) { var l2, f2 = bi(c2); try { for (f2.s(); !(l2 = f2.n()).done; ) { var h2 = l2.value; o2[a2] = h2, e23(n3[h2]); } } catch (e24) { f2.e(e24); } finally { f2.f(); } o2.pop(); } } }(fs.exports.getIn(e22, n2)), xi(xi({}, t2), {}, { expandedMap: i2 }); } function _q(e22, t2) { return xi(xi({}, e22), {}, { expandedMap: xi(xi({}, e22.expandedMap), {}, ji({}, fs.exports.compileJSONPointer(t2), true)) }); } function $q(e22, t2) { var n2 = Pq(e22.expandedMap, t2), r2 = Pq(e22.enforceStringMap, t2), i2 = Pq(e22.visibleSectionsMap, t2); return xi(xi({}, e22), {}, { expandedMap: n2, enforceStringMap: r2, visibleSectionsMap: i2 }); } function Oq(e22, t2, n2) { if (n2) { var r2 = xi({}, e22.enforceStringMap); return r2[t2] = n2, xi(xi({}, e22), {}, { enforceStringMap: r2 }); } if (typeof e22.enforceStringMap[t2] == "boolean") { var i2 = xi({}, e22.enforceStringMap); return delete i2[t2], xi(xi({}, e22), {}, { enforceStringMap: i2 }); } return e22; } function Aq(e22, t2, n2) { var r2 = fs.exports.immutableJSONPatch(e22, n2), i2 = n2.reduce(function(e23, t3) { return fs.exports.isJSONPatchAdd(t3) ? Mq(r2, e23, t3) : fs.exports.isJSONPatchRemove(t3) ? Eq(r2, e23, t3) : fs.exports.isJSONPatchReplace(t3) ? function(e24, t4, n3) { var r3 = n3.path, i3 = Dq(e24, t4.expandedMap), o2 = Dq(e24, t4.enforceStringMap), a2 = Dq(e24, t4.visibleSectionsMap); Kw(n3.value) || Gw(n3.value) || delete i3[r3]; Gw(n3.value) || delete a2[r3]; (Kw(n3.value) || Gw(n3.value)) && delete o2[r3]; return xi(xi({}, t4), {}, { expandedMap: i3, enforceStringMap: o2, visibleSectionsMap: a2 }); }(r2, e23, t3) : fs.exports.isJSONPatchCopy(t3) || fs.exports.isJSONPatchMove(t3) ? function(e24, t4, n3) { if (fs.exports.isJSONPatchMove(n3) && n3.from === n3.path) return t4; var r3 = function(e25) { return n3.path + e25.substring(n3.from.length); }, i3 = Iq(Nq(t4.expandedMap, n3.from), r3), o2 = Iq(Nq(t4.enforceStringMap, n3.from), r3), a2 = Iq(Nq(t4.visibleSectionsMap, n3.from), r3), s2 = t4; fs.exports.isJSONPatchMove(n3) && (s2 = Eq(e24, s2, { op: "remove", path: n3.from })); var u2 = Tq((s2 = Mq(e24, s2, { op: "add", path: n3.path, value: null })).expandedMap, i3), c2 = Tq(s2.enforceStringMap, o2), l2 = Tq(s2.visibleSectionsMap, a2); return xi(xi({}, t4), {}, { expandedMap: u2, enforceStringMap: c2, visibleSectionsMap: l2 }); }(r2, e23, t3) : e23; }, t2); return { json: r2, documentState: i2 }; } function Mq(e22, t2, n2) { var r2 = fs.exports.parsePath(e22, n2.path), i2 = Yp(r2), o2 = fs.exports.compileJSONPointer(i2); if (Gw(fs.exports.getIn(e22, i2))) { var a2 = Uw(kv(r2)), s2 = Rq(t2.expandedMap, i2, a2, 1), u2 = Rq(t2.enforceStringMap, i2, a2, 1), c2 = Rq(t2.visibleSectionsMap, i2, a2, 1); return c2 = zq(c2, o2, function(e23) { return Lq(e23, a2, 1); }), xi(xi({}, t2), {}, { expandedMap: s2, enforceStringMap: u2, visibleSectionsMap: c2 }); } return t2; } function Eq(e22, t2, n2) { var r2 = fs.exports.parsePath(e22, n2.path), i2 = Yp(r2), o2 = fs.exports.compileJSONPointer(i2), a2 = fs.exports.getIn(e22, i2), s2 = t2.expandedMap, u2 = t2.enforceStringMap, c2 = t2.visibleSectionsMap; if (s2 = Pq(s2, r2), u2 = Pq(u2, r2), c2 = Pq(c2, r2), Gw(a2)) { var l2 = Uw(kv(r2)); s2 = Rq(s2, i2, l2, -1), u2 = Rq(u2, i2, l2, -1), c2 = zq(c2 = Rq(c2, i2, l2, -1), o2, function(e23) { return Lq(e23, l2, -1); }); } return xi(xi({}, t2), {}, { expandedMap: s2, enforceStringMap: u2, visibleSectionsMap: c2 }); } function Pq(e22, t2) { var n2 = {}, r2 = fs.exports.compileJSONPointer(t2); return Object.keys(e22).forEach(function(t3) { fs.exports.startsWithJSONPointer(t3, r2) || (n2[t3] = e22[t3]); }), n2; } function Nq(e22, t2) { var n2 = {}; return Object.keys(e22).forEach(function(r2) { fs.exports.startsWithJSONPointer(r2, t2) && (n2[r2] = e22[r2]); }), n2; } function Tq(e22, t2) { return xi(xi({}, e22), t2); } function Iq(e22, t2) { var n2 = {}; return Object.keys(e22).forEach(function(r2) { var i2 = t2(r2); n2[i2] = e22[r2]; }), n2; } function Rq(e22, t2, n2, r2) { for (var i2 = t2.length, o2 = fs.exports.compileJSONPointer(t2), a2 = [], s2 = 0, u2 = Object.keys(e22); s2 < u2.length; s2++) { var c2 = u2[s2]; if (fs.exports.startsWithJSONPointer(c2, o2)) { var l2 = fs.exports.parseJSONPointer(c2), f2 = Uw(l2[i2]); f2 >= n2 && (l2[i2] = String(f2 + r2), a2.push({ oldPointer: c2, newPointer: fs.exports.compileJSONPointer(l2), value: e22[c2] })); } } if (a2.length === 0) return e22; var h2 = xi({}, e22); return a2.forEach(function(e23) { delete h2[e23.oldPointer]; }), a2.forEach(function(e23) { h2[e23.newPointer] = e23.value; }), h2; } function Dq(e22, t2) { var n2 = {}; return Object.keys(t2).filter(function(t3) { return fs.exports.existsIn(e22, fs.exports.parsePath(e22, t3)); }).forEach(function(e23) { n2[e23] = t2[e23]; }), n2; } function zq(e22, t2, n2) { var r2 = e22[t2]; if (t2 in e22) { var i2 = n2(r2); if (!jm(r2, i2)) { var o2 = xi({}, e22); return i2 === void 0 ? delete o2[t2] : o2[t2] = i2, o2; } } return e22; } function Lq(e22, t2, n2) { return e22.map(function(e23) { return { start: e23.start > t2 ? e23.start + n2 : e23.start, end: e23.end >= t2 ? e23.end + n2 : e23.end }; }); } function Bq(e22, t2, n2) { var r2, i2 = t2 ? t2[n2] : void 0; return typeof i2 == "boolean" ? i2 : typeof (r2 = e22) == "string" && typeof Is(r2) != "string"; } function qq(e22, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r2 = e22.indexOf(t2); return r2 !== -1 ? n2 ? e22.slice(r2) : e22.slice(r2 + 1) : []; } function Fq(e22, t2) { var n2 = []; return function e23(r2, i2) { n2.push(i2); var o2 = fs.exports.compileJSONPointer(i2); if (r2 && t2.expandedMap[o2] === true) { if (Gw(r2)) { var a2 = xq(t2, o2); jq(r2, a2, function(t3) { e23(r2[t3], i2.concat(String(t3))); }); } Kw(r2) && Object.keys(r2).forEach(function(t3) { e23(r2[t3], i2.concat(t3)); }); } }(e22, []), n2; } function Vq(e22, t2) { var n2 = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2], r2 = []; function i2(e23, o2) { r2.push({ path: o2, type: ux.value }); var a2 = fs.exports.compileJSONPointer(o2); if (e23 && t2.expandedMap[a2] === true) { if (n2 && r2.push({ path: o2, type: ux.inside }), Gw(e23)) { var s2 = xq(t2, a2); jq(e23, s2, function(t3) { var a3 = o2.concat(String(t3)); i2(e23[t3], a3), n2 && r2.push({ path: a3, type: ux.after }); }); } if (Kw(e23)) Object.keys(e23).forEach(function(t3) { var a3 = o2.concat(t3); r2.push({ path: a3, type: ux.key }), i2(e23[t3], a3), n2 && r2.push({ path: a3, type: ux.after }); }); } } return i2(e22, []), r2; } function Hq(e22, t2, n2) { var r2 = Fq(e22, t2), i2 = r2.map(fs.exports.compileJSONPointer), o2 = fs.exports.compileJSONPointer(n2), a2 = i2.indexOf(o2); return a2 !== -1 && a2 > 0 ? r2[a2 - 1] : null; } function Wq(e22, t2, n2) { var r2 = Fq(e22, t2), i2 = r2.map(fs.exports.compileJSONPointer).indexOf(fs.exports.compileJSONPointer(n2)); return i2 !== -1 && i2 < r2.length - 1 ? r2[i2 + 1] : null; } var Jq = Da("jsoneditor:History"); function Uq() { var e22 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t2 = e22.maxItems || 1e3, n2 = [], r2 = 0; function i2() { return r2 < n2.length; } function o2() { return r2 > 0; } function a2() { return { canUndo: i2(), canRedo: o2(), length: n2.length }; } function s2() { e22.onChange && e22.onChange(a2()); } function u2(e23) { Jq("add", e23), n2 = [e23].concat(n2.slice(r2)).slice(0, t2), r2 = 0, s2(); } function c2() { Jq("clear"), n2 = [], r2 = 0, s2(); } function l2() { if (i2()) { var e23 = n2[r2]; return r2 += 1, Jq("undo", e23), s2(), e23; } } function f2() { if (o2()) return Jq("redo", n2[r2 -= 1]), s2(), n2[r2]; } return { add: u2, clear: c2, getState: a2, undo: l2, redo: f2 }; } function Kq(e22, t2) { for (var n2 = new Set(t2), r2 = e22.replace(/ \(copy( \d+)?\)$/, ""), i2 = e22, o2 = 1; n2.has(i2); ) { var a2 = "copy" + (o2 > 1 ? " " + o2 : ""); i2 = "".concat(r2, " (").concat(a2, ")"), o2++; } return i2; } function Gq(e22, t2) { var n2 = t2 - "...".length; return e22.length > t2 ? e22.substring(0, n2) + "..." : e22; } function Qq(e22) { if (e22 === "") return ""; var t2 = e22.toLowerCase(); if (t2 === "null") return null; if (t2 === "true") return true; if (t2 === "false") return false; if (t2 !== "undefined") { var n2 = Number(e22), r2 = parseFloat(e22); return isNaN(n2) || isNaN(r2) ? e22 : n2; } } function Yq(e22) { return e22 && e22.type === sx.after; } function Zq(e22) { return e22 && e22.type === sx.inside; } function Xq(e22) { return e22 && e22.type === sx.key; } function eF(e22) { return e22 && e22.type === sx.value; } function tF(e22) { return e22 && e22.type === sx.multi; } function nF(e22) { return Zq(e22) ? e22.focusPath : Yp(e22.focusPath); } function rF(e22) { return tF(e22) ? fp(e22.paths) : e22.focusPath; } function iF(e22) { return tF(e22) ? kv(e22.paths) : e22.focusPath; } function oF(e22, t2) { return vF(e22.focusPath, t2) && (e22.focusPath.length > t2.length || Zq(e22)); } function aF(e22, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r2 = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i2 = t2.selection, o2 = !r2 && tF(i2) ? fp(i2.paths) : i2.focusPath, a2 = Hq(e22, t2, o2); if (a2 === null) return null; var s2 = a2, u2 = a2; if (n2) return Yq(i2) || Zq(i2) ? kF(e22, i2.anchorPath, i2.anchorPath) : kF(e22, i2.anchorPath, u2); if (Xq(i2)) { var c2 = Yp(a2), l2 = fs.exports.getIn(e22, c2); return Array.isArray(l2) || xm(a2) ? gF(a2, false) : mF(a2, false); } return eF(i2) ? gF(a2, false) : Yq(i2) || Zq(i2) ? kF(e22, o2, o2) : kF(e22, s2, u2); } function sF(e22, t2, n2) { var r2 = t2.selection, i2 = Vq(e22, t2, n2), o2 = i2.findIndex(function(e23) { return jm(e23.path, r2.focusPath) && String(e23.type) === String(r2.type); }); return { caret: o2 !== -1 ? i2[o2] : null, previous: o2 !== -1 && o2 > 0 ? i2[o2 - 1] : null, next: o2 !== -1 && o2 < i2.length - 1 ? i2[o2 + 1] : null }; } function uF(e22, t2) { for (var n2 = Fq(e22, t2), r2 = 0; r2 < n2.length - 1 && n2[r2 + 1].length > n2[r2].length; ) r2++; var i2 = n2[r2]; return i2.length === 0 || Array.isArray(fs.exports.getIn(e22, Yp(i2))) ? gF(i2, false) : mF(i2, false); } function cF(e22, t2) { if (t2.length === 1) { var n2 = fp(t2); if (n2.op === "replace" || n2.op === "move") return gF(fs.exports.parsePath(e22, n2.path), false); } if (!xm(t2) && t2.every(function(e23) { return e23.op === "move"; })) { var r2 = fp(t2), i2 = t2.slice(1); if ((fs.exports.isJSONPatchCopy(r2) || fs.exports.isJSONPatchMove(r2)) && r2.from !== r2.path && i2.every(function(e23) { return (fs.exports.isJSONPatchCopy(e23) || fs.exports.isJSONPatchMove(e23)) && e23.from === e23.path; })) return mF(fs.exports.parsePath(e22, r2.path), false); } var o2 = t2.filter(function(e23) { return e23.op !== "test" && e23.op !== "remove" && (e23.op !== "move" || e23.from !== e23.path) && typeof e23.path == "string"; }).map(function(t3) { return fs.exports.parsePath(e22, t3.path); }); return xm(o2) ? null : { type: sx.multi, paths: o2, anchorPath: fp(o2), focusPath: kv(o2), pointersMap: lF(o2) }; } function lF(e22) { var t2 = {}; return e22.forEach(function(e23) { t2[fs.exports.compileJSONPointer(e23)] = true; }), t2; } function fF(e22) { return ji({}, fs.exports.compileJSONPointer(e22), true); } function hF(e22) { return e22 && (Xq(e22) || eF(e22) || tF(e22) && e22.paths.length === 1); } function dF(e22, t2) { return hF(t2) && Ms(fs.exports.getIn(e22, t2.focusPath)) ? t2.focusPath : Yp(t2.focusPath); } function vF(e22, t2) { if (e22.length < t2.length) return false; for (var n2 = 0; n2 < t2.length; n2++) if (e22[n2] !== t2[n2]) return false; return true; } function pF(e22) { var t2 = e22.selection; return (Xq(t2) || eF(t2)) && t2.edit ? xi(xi({}, e22), {}, { selection: xi(xi({}, t2), {}, { edit: false }) }) : e22; } function mF(e22, t2) { return { type: sx.key, anchorPath: e22, focusPath: e22, pointersMap: fF(e22), edit: t2 }; } function gF(e22, t2) { return { type: sx.value, anchorPath: e22, focusPath: e22, pointersMap: fF(e22), edit: t2 }; } function yF(e22) { return { type: sx.inside, anchorPath: e22, focusPath: e22, pointersMap: fF(e22) }; } function bF(e22) { return { type: sx.after, anchorPath: e22, focusPath: e22, pointersMap: fF(e22) }; } function kF(e22, t2, n2) { var r2 = function(e23, t3, n3) { if (jm(t3, n3)) return [t3]; var r3 = function(e24, t4) { for (var n4 = 0; n4 < e24.length && n4 < t4.length && e24[n4] === t4[n4]; ) n4++; return e24.slice(0, n4); }(t3, n3); if (t3.length === r3.length || n3.length === r3.length) return [r3]; var i3 = t3[r3.length], o2 = n3[r3.length], a2 = fs.exports.getIn(e23, r3); if (Kw(a2)) { var s2 = Object.keys(a2), u2 = s2.indexOf(i3), c2 = s2.indexOf(o2); if (u2 !== -1 && c2 !== -1) { for (var l2 = Math.min(u2, c2), f2 = Math.max(u2, c2), h2 = [], d2 = l2; d2 <= f2; d2++) h2.push(r3.concat(s2[d2])); return h2; } } if (Gw(a2)) { for (var v2 = Math.min(Uw(i3), Uw(o2)), p2 = Math.max(Uw(i3), Uw(o2)), m2 = [], g2 = v2; g2 <= p2; g2++) m2.push(r3.concat(String(g2))); return m2; } throw new Error("Failed to create selection"); }(e22, t2, n2), i2 = vF(n2, kv(r2)) || vF(t2, fp(r2)); return { type: sx.multi, anchorPath: i2 ? fp(r2) : kv(r2), focusPath: i2 ? kv(r2) : fp(r2), paths: r2, pointersMap: lF(r2) }; } function wF(e22, t2) { var n2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 2; if (Xq(t2)) return String(kv(t2.focusPath)); if (eF(t2)) { var r2 = fs.exports.getIn(e22, t2.focusPath); return typeof r2 == "string" ? r2 : JSON.stringify(r2, null, n2); } if (tF(t2)) { if (xm(t2.focusPath)) return JSON.stringify(e22, null, n2); var i2 = nF(t2), o2 = fs.exports.getIn(e22, i2); if (Array.isArray(o2)) { if (t2.paths.length === 1) { var a2 = fs.exports.getIn(e22, fp(t2.paths)); return JSON.stringify(a2, null, n2); } return t2.paths.map(function(t3) { var r3 = fs.exports.getIn(e22, t3); return "".concat(JSON.stringify(r3, null, n2), ","); }).join("\n"); } return t2.paths.map(function(t3) { var r3 = kv(t3), i3 = fs.exports.getIn(e22, t3); return "".concat(JSON.stringify(r3), ": ").concat(JSON.stringify(i3, null, n2), ","); }).join("\n"); } return null; } function xF(e22) { return tF(e22) ? e22.paths : [e22.focusPath]; } function jF(e22) { return (Xq(e22) || eF(e22)) && e22.edit; } function SF(e22) { return !!e22 && (!(!Xq(e22) && !eF(e22)) || (!(!tF(e22) || e22.paths.length !== 1) || void 0)); } function CF(e22) { switch (e22.type) { case ux.key: return mF(e22.path, false); case ux.value: return gF(e22.path, false); case ux.after: return bF(e22.path); case ux.inside: return yF(e22.path); } } function _F(e22, t2, n2) { switch (t2) { case sx.key: return mF(n2, false); case sx.value: return gF(n2, false); case sx.after: return bF(n2); case sx.inside: return yF(n2); case sx.multi: return kF(e22, n2, n2); } } function $F(e22, t2) { if (e22) return Object.keys(e22.pointersMap).some(function(e23) { return fs.exports.startsWithJSONPointer(e23, t2) || fs.exports.startsWithJSONPointer(t2, e23); }) ? e22 : void 0; } function OF(e22, t2, n2) { var r2 = Yp(t2), i2 = fs.exports.getIn(e22, r2); if (Gw(i2)) { var o2 = Uw(kv(t2)); return n2.map(function(e23, t3) { return { op: "add", path: fs.exports.compileJSONPointer(r2.concat(String(o2 + t3))), value: e23.value }; }); } if (Kw(i2)) { var a2 = kv(t2), s2 = Object.keys(i2), u2 = qq(s2, a2, true); return [].concat(Ni(n2.map(function(e23) { var t3 = Kq(e23.key, s2); return { op: "add", path: fs.exports.compileJSONPointer(r2.concat(t3)), value: e23.value }; })), Ni(u2.map(function(e23) { return NF(r2, e23); }))); } throw new Error("Cannot create insert operations: parent must be an Object or Array"); } function AF(e22, t2, n2) { var r2 = fs.exports.getIn(e22, t2); if (Array.isArray(r2)) { var i2 = r2.length; return n2.map(function(e23, n3) { return { op: "add", path: fs.exports.compileJSONPointer(t2.concat(String(i2 + n3))), value: e23.value }; }); } return n2.map(function(e23) { var n3 = Kq(e23.key, Object.keys(r2)); return { op: "add", path: fs.exports.compileJSONPointer(t2.concat(n3)), value: e23.value }; }); } function MF(e22, t2, n2, r2) { var i2 = Kq(r2, t2.filter(function(e23) { return e23 !== n2; })), o2 = qq(t2, n2, false); return [{ op: "move", from: fs.exports.compileJSONPointer(e22.concat(n2)), path: fs.exports.compileJSONPointer(e22.concat(i2)) }].concat(Ni(o2.map(function(t3) { return NF(e22, t3); }))); } function EF(e22, t2, n2) { if (Xq(t2)) { var r2 = Yw(n2), i2 = Yp(t2.focusPath), o2 = fs.exports.getIn(e22, i2); return MF(i2, Object.keys(o2), kv(t2.focusPath), typeof r2 == "string" ? r2 : n2); } if (eF(t2) || tF(t2) && xm(t2.focusPath)) try { return [{ op: "replace", path: fs.exports.compileJSONPointer(t2.focusPath), value: Zw(n2, Qw) }]; } catch (e23) { return [{ op: "replace", path: fs.exports.compileJSONPointer(t2.focusPath), value: n2 }]; } if (tF(t2)) { var a2 = TF(n2); return function(e23, t3, n3) { var r3 = Yp(fp(t3)), i3 = fs.exports.getIn(e23, r3); if (Gw(i3)) { var o3 = fp(t3), a3 = o3 ? Uw(kv(o3)) : 0; return [].concat(Ni(PF(t3)), Ni(n3.map(function(e24, t4) { return { op: "add", path: fs.exports.compileJSONPointer(r3.concat(String(t4 + a3))), value: e24.value }; }))); } if (Kw(i3)) { var s3 = kv(t3), u3 = Yp(s3), c3 = kv(s3), l3 = Object.keys(i3), f3 = qq(l3, c3, false), h3 = new Set(t3.map(function(e24) { return kv(e24); })), d3 = l3.filter(function(e24) { return !h3.has(e24); }); return [].concat(Ni(PF(t3)), Ni(n3.map(function(e24) { var t4 = Kq(e24.key, d3); return { op: "add", path: fs.exports.compileJSONPointer(u3.concat(t4)), value: e24.value }; })), Ni(f3.map(function(e24) { return NF(u3, e24); }))); } throw new Error("Cannot create replace operations: parent must be an Object or Array"); }(e22, t2.paths, a2); } if (Yq(t2)) { var s2 = TF(n2), u2 = t2.focusPath, c2 = Yp(u2), l2 = fs.exports.getIn(e22, c2); if (Gw(l2)) { var f2 = Uw(kv(u2)); return OF(e22, c2.concat(String(f2 + 1)), s2); } if (Kw(l2)) { var h2 = String(kv(u2)), d2 = Object.keys(l2); if (xm(d2) || kv(d2) === h2) return AF(e22, c2, s2); var v2 = d2.indexOf(h2), p2 = d2[v2 + 1]; return OF(e22, c2.concat(p2), s2); } throw new Error("Cannot create insert operations: parent must be an Object or Array"); } if (Zq(t2)) { var m2 = TF(n2), g2 = t2.focusPath, y2 = fs.exports.getIn(e22, g2); if (Gw(y2)) return OF(e22, g2.concat("0"), m2); if (Kw(y2)) { var b2 = Object.keys(y2); if (xm(b2)) return AF(e22, g2, m2); var k2 = fp(b2); return OF(e22, g2.concat(k2), m2); } throw new Error("Cannot create insert operations: parent must be an Object or Array"); } throw new Error("Cannot insert: unsupported type of selection " + JSON.stringify(t2)); } function PF(e22) { return e22.map(function(e23) { return { op: "remove", path: fs.exports.compileJSONPointer(e23) }; }).reverse(); } function NF(e22, t2) { return { op: "move", from: fs.exports.compileJSONPointer(e22.concat(t2)), path: fs.exports.compileJSONPointer(e22.concat(t2)) }; } function TF(e22) { var t2 = /^\s*{/.test(e22), n2 = /^\s*\[/.test(e22), r2 = Yw(e22), i2 = r2 !== void 0 ? r2 : Zw(e22, Qw); return t2 && As(i2) || n2 && Array.isArray(i2) ? [{ key: "New item", value: i2 }] : Array.isArray(i2) ? i2.map(function(e23, t3) { return { key: "New item " + t3, value: e23 }; }) : As(i2) ? Object.keys(i2).map(function(e23) { return { key: e23, value: i2[e23] }; }) : [{ key: "New item", value: i2 }]; } function IF(e22, t2) { if (Xq(t2)) { var n2 = Yp(t2.focusPath), r2 = fs.exports.getIn(e22, n2), i2 = MF(n2, Object.keys(r2), kv(t2.focusPath), ""); return { operations: i2, newSelection: cF(e22, i2) }; } if (eF(t2)) return { operations: [{ op: "replace", path: fs.exports.compileJSONPointer(t2.focusPath), value: "" }], newSelection: t2 }; if (tF(t2)) { var o2 = PF(t2.paths), a2 = kv(t2.paths); if (xm(a2)) { return { operations: [{ op: "replace", path: "", value: "" }], newSelection: gF([], false) }; } var s2 = Yp(a2), u2 = fs.exports.getIn(e22, s2); if (Gw(u2)) { var c2 = Uw(kv(fp(t2.paths))); return { operations: o2, newSelection: c2 === 0 ? yF(s2) : bF(s2.concat(String(c2 - 1))) }; } if (Kw(u2)) { var l2 = Object.keys(u2), f2 = kv(fp(t2.paths)), h2 = l2.indexOf(f2), d2 = l2[h2 - 1]; return { operations: o2, newSelection: h2 === 0 ? yF(s2) : bF(s2.concat(d2)) }; } throw new Error("Cannot create remove operations: parent must be an Object or Array"); } throw new Error("Cannot remove: unsupported type of selection " + JSON.stringify(t2)); } function RF(e22, t2) { var n2 = Yp(t2), r2 = kv(t2), i2 = fs.exports.getIn(e22, n2); return Kw(i2) ? qq(Object.keys(i2), r2, false).map(function(e23) { return NF(n2, e23); }) : []; } function DF(e22) { var t2 = e22.activeIndex < e22.items.length - 1 ? e22.activeIndex + 1 : e22.items.length > 0 ? 0 : -1, n2 = e22.items[t2], r2 = e22.items.map(function(e23, n3) { return xi(xi({}, e23), {}, { active: n3 === t2 }); }); return xi(xi({}, e22), {}, { items: r2, itemsMap: Np(r2, function(e23) { return fs.exports.compileJSONPointer(e23.path); }), activeItem: n2, activeIndex: t2 }); } function zF(e22) { var t2 = e22.activeIndex > 0 ? e22.activeIndex - 1 : e22.items.length - 1, n2 = e22.items[t2], r2 = e22.items.map(function(e23, n3) { return xi(xi({}, e23), {}, { active: n3 === t2 }); }); return xi(xi({}, e22), {}, { items: r2, itemsMap: Np(r2, function(e23) { return fs.exports.compileJSONPointer(e23.path); }), activeItem: n2, activeIndex: t2 }); } function LF(e22, t2, n2) { var r2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1 / 0, i2 = [], o2 = []; function a2(e23) { i2.length < r2 && i2.push(e23); } function s2(e23, t3) { if (Gw(t3)) { var n3 = o2.length; o2.push("0"); for (var u3 = 0; u3 < t3.length; u3++) if (o2[n3] = String(u3), s2(e23, t3[u3]), i2.length >= r2) return; o2.pop(); } else if (Kw(t3)) { var c2 = Object.keys(t3), l2 = o2.length; o2.push(""); for (var f2 = 0, h2 = c2; f2 < h2.length; f2++) { var d2 = h2[f2]; if (o2[l2] = d2, BF(d2, e23, o2, cx.key, a2), s2(e23, t3[d2]), i2.length >= r2) return; } o2.pop(); } else BF(String(t3), e23, o2, cx.value, a2); } if (typeof e22 == "string" && e22 !== "") { var u2 = e22.toLowerCase(); s2(u2, t2); } return i2; } function BF(e22, t2, n2, r2, i2) { var o2 = e22.toLowerCase(), a2 = 0, s2 = -1, u2 = -1; do { (u2 = o2.indexOf(t2, s2)) !== -1 && (s2 = u2 + t2.length, i2({ path: n2.slice(0), field: r2, fieldIndex: a2, start: u2, end: s2 }), a2++); } while (u2 !== -1); } function qF(e22, t2, n2, r2) { return e22.substring(0, n2) + t2 + e22.substring(r2); } function FF(e22, t2, n2) { var r2 = e22; return Iv(n2, function(e23) { r2 = qF(r2, t2, e23.start, e23.end); }), r2; } function VF(e22, t2, n2, r2) { var i2 = r2.field, o2 = r2.path, a2 = r2.start, s2 = r2.end; if (i2 === cx.key) { var u2 = Yp(o2), c2 = fs.exports.getIn(e22, u2), l2 = kv(o2), f2 = MF(u2, Object.keys(c2), l2, qF(l2, n2, a2, s2)); return { newSelection: cF(e22, f2), operations: f2 }; } if (i2 === cx.value) { var h2 = fs.exports.getIn(e22, o2); if (h2 === void 0) throw new Error("Cannot replace: path not found ".concat(fs.exports.compileJSONPointer(o2))); var d2 = typeof h2 == "string" ? h2 : String(h2), v2 = fs.exports.compileJSONPointer(o2), p2 = Bq(h2, t2.enforceStringMap, v2), m2 = qF(d2, n2, a2, s2), g2 = [{ op: "replace", path: fs.exports.compileJSONPointer(o2), value: p2 ? m2 : Is(m2) }]; return { newSelection: cF(e22, g2), operations: g2 }; } throw new Error("Cannot replace: unknown type of search result field ".concat(i2)); } function HF(e22, t2, n2, r2) { for (var i2 = LF(n2, e22, t2, 1 / 0), o2 = [], a2 = 0; a2 < i2.length; a2++) { var s2 = i2[a2 - 1], u2 = i2[a2]; a2 !== 0 && u2.field === s2.field && jm(u2.path, s2.path) ? kv(o2).items.push(u2) : o2.push({ path: u2.path, field: u2.field, items: [u2] }); } o2.sort(function(e23, t3) { return e23.field !== t3.field ? e23.field === cx.key ? 1 : -1 : t3.path.length - e23.path.length; }); var c2 = [], l2 = void 0; return o2.forEach(function(n3) { var i3 = n3.field, o3 = n3.path, a3 = n3.items; if (i3 === cx.key) { var s3 = Yp(o3), u3 = fs.exports.getIn(e22, s3), f2 = kv(o3), h2 = MF(s3, Object.keys(u3), f2, FF(f2, r2, a3)); c2 = c2.concat(h2), l2 = cF(e22, h2); } else { if (i3 !== cx.value) throw new Error("Cannot replace: unknown type of search result field ".concat(i3)); var d2 = fs.exports.getIn(e22, o3); if (d2 === void 0) throw new Error("Cannot replace: path not found ".concat(fs.exports.compileJSONPointer(o3))); var v2 = typeof d2 == "string" ? d2 : String(d2), p2 = fs.exports.compileJSONPointer(o3), m2 = Bq(d2, t2.enforceStringMap, p2), g2 = FF(v2, r2, a3), y2 = [{ op: "replace", path: fs.exports.compileJSONPointer(o3), value: m2 ? g2 : Is(g2) }]; c2 = c2.concat(y2), l2 = cF(e22, y2); } }), { operations: c2, newSelection: l2 }; } function WF(e22) { return e22.path.concat(e22.field, String(e22.fieldIndex)); } function JF(e22, t2) { var n2, r2 = (n2 = e22 == null ? void 0 : e22[t2]) === null || n2 === void 0 ? void 0 : n2.filter(function(e23) { return e23.field === cx.key; }); if (r2 && r2.length !== 0) return r2; } function UF(e22, t2) { var n2, r2 = (n2 = e22 == null ? void 0 : e22[t2]) === null || n2 === void 0 ? void 0 : n2.filter(function(e23) { return e23.field === cx.value; }); if (r2 && r2.length !== 0) return r2; } function KF(e22) { co(e22, "svelte-d01h2s", ".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}"); } function GF(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2; return a2 = new tS({ props: { data: $j } }), { c: function() { t2 = go("div"), n2 = go("div"), r2 = bo(e22[0]), i2 = ko(), o2 = go("button"), Aa(a2.$$.fragment), So(n2, "class", "jse-title svelte-d01h2s"), So(o2, "type", "button"), So(o2, "class", "jse-close svelte-d01h2s"), So(t2, "class", "jse-header svelte-d01h2s"); }, m: function(l2, f2) { vo(l2, t2, f2), uo(t2, n2), uo(n2, r2), uo(t2, i2), uo(t2, o2), Ma(a2, o2, null), s2 = true, u2 || (c2 = xo(o2, "click", e22[1]), u2 = true); }, p: function(e23, t3) { var n3 = ki(t3, 1)[0]; (!s2 || 1 & n3) && Ao(r2, e23[0]); }, i: function(e23) { s2 || (ya(a2.$$.fragment, e23), s2 = true); }, o: function(e23) { ba(a2.$$.fragment, e23), s2 = false; }, d: function(e23) { e23 && po(t2), Ea(a2), u2 = false, c2(); } }; } function QF(e22, t2, n2) { var r2 = t2.title, i2 = r2 === void 0 ? "Modal" : r2, o2 = Yo("simple-modal").close; return e22.$$set = function(e23) { "title" in e23 && n2(0, i2 = e23.title); }, [i2, o2]; } var YF = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, QF, GF, Ki, { title: 0 }, KF), r2; } return zi(n2); }(); function ZF(e22) { co(e22, "svelte-t45ah0", ".jse-modal.svelte-t45ah0.svelte-t45ah0{--height:36px;--multiItemHeight:28px;--multiItemMargin:2px;--multiItemPadding:2px 8px;--multiClearTop:5px;--multiItemBorderRadius:6px;--clearSelectTop:2px;--clearSelectBottom:2px;--indicatorTop:8px;flex:1;display:flex;flex-direction:column;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-t45ah0 .jse-contents.svelte-t45ah0{padding:20px;overflow:auto}.jse-modal.svelte-t45ah0 .jse-contents .jse-actions.svelte-t45ah0{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-t45ah0 .jse-contents .jse-actions button.svelte-t45ah0{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-t45ah0 .jse-contents .jse-actions button.svelte-t45ah0:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-t45ah0 .jse-contents .jse-actions button.svelte-t45ah0:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-t45ah0 .jse-shortcuts.svelte-t45ah0{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-t45ah0 .jse-shortcuts .jse-shortcut .jse-key.svelte-t45ah0{font-size:200%;color:var(--jse-theme-color)}"); } function XF(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2, b2, k2, w2, x2, j2, S2; return n2 = new YF({ props: { title: "Copying and pasting" } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), r2 = ko(), i2 = go("div"), (o2 = go("div")).textContent = "These actions are unavailable via the menu. Please use:", a2 = ko(), s2 = go("div"), u2 = go("div"), (c2 = go("div")).textContent = "".concat(e22[1], "+C"), l2 = bo("\n for copy"), f2 = ko(), h2 = go("div"), (d2 = go("div")).textContent = "".concat(e22[1], "+X"), v2 = bo("\n for cut"), p2 = ko(), m2 = go("div"), (g2 = go("div")).textContent = "".concat(e22[1], "+V"), y2 = bo("\n for paste"), b2 = ko(), k2 = go("div"), (w2 = go("button")).textContent = "Close", So(c2, "class", "jse-key svelte-t45ah0"), So(u2, "class", "jse-shortcut"), So(d2, "class", "jse-key svelte-t45ah0"), So(h2, "class", "jse-shortcut"), So(g2, "class", "jse-key svelte-t45ah0"), So(m2, "class", "jse-shortcut"), So(s2, "class", "jse-shortcuts svelte-t45ah0"), So(w2, "type", "button"), So(w2, "class", "jse-primary svelte-t45ah0"), So(k2, "class", "jse-actions svelte-t45ah0"), So(i2, "class", "jse-contents svelte-t45ah0"), So(t2, "class", "jse-modal jse-copy-paste svelte-t45ah0"); }, m: function(C2, _2) { vo(C2, t2, _2), Ma(n2, t2, null), uo(t2, r2), uo(t2, i2), uo(i2, o2), uo(i2, a2), uo(i2, s2), uo(s2, u2), uo(u2, c2), uo(u2, l2), uo(s2, f2), uo(s2, h2), uo(h2, d2), uo(h2, v2), uo(s2, p2), uo(s2, m2), uo(m2, g2), uo(m2, y2), uo(i2, b2), uo(i2, k2), uo(k2, w2), x2 = true, j2 || (S2 = xo(w2, "click", e22[0]), j2 = true); }, p: Bi, i: function(e23) { x2 || (ya(n2.$$.fragment, e23), x2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), x2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), j2 = false, S2(); } }; } function eV(e22) { return [Yo("simple-modal").close, Dx ? "\u2318" : "Ctrl"]; } var tV = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, eV, XF, Ki, {}, ZF), r2; } return zi(n2); }(); function nV(e22) { co(e22, "svelte-gz09vf", ".jse-json-repair-component.svelte-gz09vf.svelte-gz09vf{flex:1;display:flex;flex-direction:column;background:var(--jse-background-color);color:var(--jse-text-color)}.jse-json-repair-component.svelte-gz09vf .jse-menu .jse-info.svelte-gz09vf{padding:0 var(--jse-padding)}.jse-json-repair-component.svelte-gz09vf .jse-json-text.svelte-gz09vf{flex:1;border:none;padding:2px;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-background-color);color:var(--jse-text-color);resize:none;outline:none}"); } function rV(e22) { var t2; return { c: function() { (t2 = go("div")).textContent = "Repair invalid JSON, then click apply", So(t2, "slot", "left"), So(t2, "class", "jse-info svelte-gz09vf"); }, m: function(e23, n2) { vo(e23, t2, n2); }, p: Bi, d: function(e23) { e23 && po(t2); } }; } function iV(e22) { var t2, n2; return t2 = new cS({ props: { type: "success", message: "JSON is valid now and can be parsed.", actions: e22[5] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 32 & n3 && (r2.actions = e23[5]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function oV(e22) { var t2, n2; return t2 = new cS({ props: { type: "error", icon: Cj, message: "Cannot parse JSON: ".concat(e22[2].message), actions: e22[6] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 4 & n3 && (r2.message = "Cannot parse JSON: ".concat(e23[2].message)), 64 & n3 && (r2.actions = e23[6]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function aV(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2; n2 = new VS({ props: { items: e22[7], $$slots: { left: [rV] }, $$scope: { ctx: e22 } } }); var f2 = [oV, iV], h2 = []; function d2(e23, t3) { return e23[2] ? 0 : 1; } return i2 = d2(e22), o2 = h2[i2] = f2[i2](e22), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), r2 = ko(), o2.c(), a2 = ko(), (s2 = go("textarea")).value = e22[0], s2.readOnly = e22[1], So(s2, "class", "jse-json-text svelte-gz09vf"), So(s2, "autocomplete", "off"), So(s2, "autocapitalize", "off"), So(s2, "spellcheck", "false"), So(t2, "class", "jse-json-repair-component svelte-gz09vf"); }, m: function(o3, f3) { vo(o3, t2, f3), Ma(n2, t2, null), uo(t2, r2), h2[i2].m(t2, null), uo(t2, a2), uo(t2, s2), e22[19](s2), e22[20](t2), u2 = true, c2 || (l2 = xo(s2, "input", e22[8]), c2 = true); }, p: function(e23, r3) { var c3 = ki(r3, 1)[0], l3 = {}; 128 & c3 && (l3.items = e23[7]), 134217728 & c3 && (l3.$$scope = { dirty: c3, ctx: e23 }), n2.$set(l3); var v2 = i2; (i2 = d2(e23)) === v2 ? h2[i2].p(e23, c3) : (ma(), ba(h2[v2], 1, 1, function() { h2[v2] = null; }), ga(), (o2 = h2[i2]) ? o2.p(e23, c3) : (o2 = h2[i2] = f2[i2](e23)).c(), ya(o2, 1), o2.m(t2, a2)), (!u2 || 1 & c3) && (s2.value = e23[0]), (!u2 || 2 & c3) && (s2.readOnly = e23[1]); }, i: function(e23) { u2 || (ya(n2.$$.fragment, e23), ya(o2), u2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), ba(o2), u2 = false; }, d: function(r3) { r3 && po(t2), Ea(n2), h2[i2].d(), e22[19](null), e22[20](null), c2 = false, l2(); } }; } function sV(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2 = t2.text, v2 = d2 === void 0 ? "" : d2, p2 = t2.readOnly, m2 = p2 !== void 0 && p2, g2 = t2.onParse, y2 = t2.onRepair, b2 = t2.onChange, k2 = b2 === void 0 ? null : b2, w2 = t2.onApply, x2 = t2.onCancel, j2 = t2.onRenderMenu, S2 = j2 === void 0 ? Wu : j2, C2 = Da("jsoneditor:JSONRepair"); function _2() { w2(v2); } return e22.$$set = function(e23) { "text" in e23 && n2(0, v2 = e23.text), "readOnly" in e23 && n2(1, m2 = e23.readOnly), "onParse" in e23 && n2(9, g2 = e23.onParse), "onRepair" in e23 && n2(10, y2 = e23.onRepair), "onChange" in e23 && n2(11, k2 = e23.onChange), "onApply" in e23 && n2(12, w2 = e23.onApply), "onCancel" in e23 && n2(13, x2 = e23.onCancel), "onRenderMenu" in e23 && n2(14, S2 = e23.onRenderMenu); }, e22.$$.update = function() { 1 & e22.$$.dirty && n2(2, r2 = function(e23) { try { return g2(e23), null; } catch (t3) { return tx(e23, t3.message); } }(v2)), 1 & e22.$$.dirty && n2(17, i2 = function(e23) { try { return y2(e23), true; } catch (e24) { return false; } }(v2)), 4 & e22.$$.dirty && C2("error", r2), 8192 & e22.$$.dirty && n2(18, o2 = [{ space: true }, { icon: $j, title: "Cancel repair", className: "jse-cancel", onClick: x2 }]), 278528 & e22.$$.dirty && n2(7, a2 = S2("repair", o2) || o2), 229376 & e22.$$.dirty && n2(6, c2 = i2 ? [s2, u2] : [s2]), 2 & e22.$$.dirty && n2(5, l2 = [{ icon: uj, text: "Apply", title: "Apply fixed JSON", disabled: m2, onClick: _2 }]); }, n2(15, s2 = { icon: nj, text: "Show me", title: "Scroll to the error location", onClick: function() { h2 && r2 && r2.position != null && (h2.setSelectionRange(r2.position, r2.position), setTimeout(function() { h2.focus(); })); } }), n2(16, u2 = { icon: _j, text: "Auto repair", title: "Automatically repair JSON", onClick: function() { try { n2(0, v2 = y2(v2)), k2 && k2(v2); } catch (e23) { } } }), [v2, m2, r2, f2, h2, l2, c2, a2, function(e23) { C2("handleChange"); var t3 = e23.target.value; v2 !== t3 && (n2(0, v2 = t3), k2 && k2(v2)); }, g2, y2, k2, w2, x2, S2, s2, u2, i2, o2, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(4, h2 = e23); }); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(3, f2 = e23); }); }]; } var uV = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, sV, aV, Ki, { text: 0, readOnly: 1, onParse: 9, onRepair: 10, onChange: 11, onApply: 12, onCancel: 13, onRenderMenu: 14 }, nV), r2; } return zi(n2); }(); function cV(e22) { co(e22, "svelte-1ffm3pm", ".jse-modal.jse-repair.svelte-1ffm3pm{flex:1;display:flex;flex-direction:column;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-background-color);color:var(--jse-text-color)}"); } function lV(e22) { var t2, n2, r2, i2; function o2(t3) { e22[7](t3); } var a2 = { onParse: e22[1], onRepair: e22[2], onApply: e22[4], onCancel: e22[5], onRenderMenu: e22[3] }; return e22[0] !== void 0 && (a2.text = e22[0]), n2 = new uV({ props: a2 }), Xo.push(function() { return Oa(n2, "text", o2); }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-modal jse-repair svelte-1ffm3pm"); }, m: function(e23, r3) { vo(e23, t2, r3), Ma(n2, t2, null), i2 = true; }, p: function(e23, t3) { var i3 = ki(t3, 1)[0], o3 = {}; 2 & i3 && (o3.onParse = e23[1]), 4 & i3 && (o3.onRepair = e23[2]), 8 & i3 && (o3.onRenderMenu = e23[3]), !r2 && 1 & i3 && (r2 = true, o3.text = e23[0], sa(function() { return r2 = false; })), n2.$set(o3); }, i: function(e23) { i2 || (ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function fV(e22, t2, n2) { var r2 = t2.text, i2 = t2.onParse, o2 = t2.onRepair, a2 = t2.onApply, s2 = t2.onRenderMenu, u2 = Yo("simple-modal").close; return e22.$$set = function(e23) { "text" in e23 && n2(0, r2 = e23.text), "onParse" in e23 && n2(1, i2 = e23.onParse), "onRepair" in e23 && n2(2, o2 = e23.onRepair), "onApply" in e23 && n2(6, a2 = e23.onApply), "onRenderMenu" in e23 && n2(3, s2 = e23.onRenderMenu); }, [r2, i2, o2, s2, function(e23) { u2(), a2(e23); }, function() { u2(); }, a2, function(e23) { n2(0, r2 = e23); }]; } var hV = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, fV, lV, Ki, { text: 0, onParse: 1, onRepair: 2, onApply: 6, onRenderMenu: 3 }, cV), r2; } return zi(n2); }(); function dV(e22) { co(e22, "svelte-mojfmz", ".jse-dropdown-button.svelte-mojfmz.svelte-mojfmz{flex:1;line-height:normal;border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;position:relative;padding:0;display:flex}.jse-dropdown-button.svelte-mojfmz ul.svelte-mojfmz{margin:0;padding:0}.jse-dropdown-button.svelte-mojfmz ul li.svelte-mojfmz{margin:0;padding:0;list-style-type:none}.jse-dropdown-button.svelte-mojfmz button.jse-open-dropdown.svelte-mojfmz{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:2em;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);border-radius:0}.jse-dropdown-button.svelte-mojfmz button.jse-open-dropdown.jse-visible.svelte-mojfmz{background:var(--jse-context-menu-background)}.jse-dropdown-button.svelte-mojfmz button.jse-open-dropdown.svelte-mojfmz:hover{background:var(--jse-context-menu-background-highlight)}.jse-dropdown-button.svelte-mojfmz button.jse-open-dropdown.svelte-mojfmz:disabled{color:var(--jse-context-menu-color-disabled);background:unset}.jse-dropdown-button.svelte-mojfmz .jse-dropdown-items.svelte-mojfmz{display:none;position:absolute;top:100%;left:0;z-index:1;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);box-shadow:var(--jse-controls-box-shadow)}.jse-dropdown-button.svelte-mojfmz .jse-dropdown-items.jse-visible.svelte-mojfmz{display:block}.jse-dropdown-button.svelte-mojfmz .jse-dropdown-items button.svelte-mojfmz{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:100%;text-align:left;padding:var(--jse-padding);margin:0}.jse-dropdown-button.svelte-mojfmz .jse-dropdown-items button.svelte-mojfmz:hover{background:var(--jse-context-menu-background-highlight)}.jse-dropdown-button.svelte-mojfmz .jse-dropdown-items button.svelte-mojfmz:disabled{color:var(--jse-context-menu-color-disabled);background:unset}"); } function vV(e22, t2, n2) { var r2 = e22.slice(); return r2[11] = t2[n2], r2; } var pV = function(e22) { return {}; }, mV = function(e22) { return {}; }; function gV(e22) { var t2, n2; return t2 = new tS({ props: { data: e22[11].icon } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 1 & n3 && (r2.data = e23[11].icon), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function yV(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2 = e22[11].text + "", h2 = e22[11].icon && gV(e22); function d2() { return e22[9](e22[11]); } return { c: function() { t2 = go("li"), n2 = go("button"), h2 && h2.c(), r2 = ko(), i2 = bo(f2), s2 = ko(), So(n2, "type", "button"), So(n2, "title", o2 = e22[11].title), n2.disabled = a2 = e22[11].disabled, So(n2, "class", "svelte-mojfmz"), So(t2, "class", "svelte-mojfmz"); }, m: function(e23, o3) { vo(e23, t2, o3), uo(t2, n2), h2 && h2.m(n2, null), uo(n2, r2), uo(n2, i2), uo(t2, s2), u2 = true, c2 || (l2 = xo(n2, "click", d2), c2 = true); }, p: function(t3, s3) { (e22 = t3)[11].icon ? h2 ? (h2.p(e22, s3), 1 & s3 && ya(h2, 1)) : ((h2 = gV(e22)).c(), ya(h2, 1), h2.m(n2, r2)) : h2 && (ma(), ba(h2, 1, 1, function() { h2 = null; }), ga()), (!u2 || 1 & s3) && f2 !== (f2 = e22[11].text + "") && Ao(i2, f2), (!u2 || 1 & s3 && o2 !== (o2 = e22[11].title)) && So(n2, "title", o2), (!u2 || 1 & s3 && a2 !== (a2 = e22[11].disabled)) && (n2.disabled = a2); }, i: function(e23) { u2 || (ya(h2), u2 = true); }, o: function(e23) { ba(h2), u2 = false; }, d: function(e23) { e23 && po(t2), h2 && h2.d(), c2 = false, l2(); } }; } function bV(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2 = e22[8].defaultItem, h2 = Gi(f2, e22, e22[7], mV); i2 = new tS({ props: { data: aj } }); for (var d2 = e22[0], v2 = [], p2 = 0; p2 < d2.length; p2 += 1) v2[p2] = yV(vV(e22, d2, p2)); var m2 = function(e23) { return ba(v2[e23], 1, 1, function() { v2[e23] = null; }); }; return { c: function() { t2 = go("div"), h2 && h2.c(), n2 = ko(), r2 = go("button"), Aa(i2.$$.fragment), o2 = ko(), a2 = go("div"), s2 = go("ul"); for (var u3 = 0; u3 < v2.length; u3 += 1) v2[u3].c(); So(r2, "type", "button"), So(r2, "class", "jse-open-dropdown svelte-mojfmz"), So(r2, "data-type", "jse-open-dropdown"), r2.disabled = e22[4], To(r2, "jse-visible", e22[3]), So(s2, "class", "svelte-mojfmz"), So(a2, "class", "jse-dropdown-items svelte-mojfmz"), Eo(a2, "width", e22[2]), To(a2, "jse-visible", e22[3]), So(t2, "class", "jse-dropdown-button svelte-mojfmz"), So(t2, "title", e22[1]); }, m: function(f3, d3) { vo(f3, t2, d3), h2 && h2.m(t2, null), uo(t2, n2), uo(t2, r2), Ma(i2, r2, null), uo(t2, o2), uo(t2, a2), uo(a2, s2); for (var p3 = 0; p3 < v2.length; p3 += 1) v2[p3].m(s2, null); u2 = true, c2 || (l2 = [xo(r2, "click", e22[5]), xo(t2, "click", e22[6])], c2 = true); }, p: function(e23, n3) { var i3 = ki(n3, 1)[0]; if (h2 && h2.p && (!u2 || 128 & i3) && Zi(h2, f2, e23, e23[7], u2 ? Yi(f2, e23[7], i3, pV) : Xi(e23[7]), mV), (!u2 || 16 & i3) && (r2.disabled = e23[4]), 8 & i3 && To(r2, "jse-visible", e23[3]), 1 & i3) { var o3; for (d2 = e23[0], o3 = 0; o3 < d2.length; o3 += 1) { var c3 = vV(e23, d2, o3); v2[o3] ? (v2[o3].p(c3, i3), ya(v2[o3], 1)) : (v2[o3] = yV(c3), v2[o3].c(), ya(v2[o3], 1), v2[o3].m(s2, null)); } for (ma(), o3 = d2.length; o3 < v2.length; o3 += 1) m2(o3); ga(); } (!u2 || 4 & i3) && Eo(a2, "width", e23[2]), 8 & i3 && To(a2, "jse-visible", e23[3]), (!u2 || 2 & i3) && So(t2, "title", e23[1]); }, i: function(e23) { if (!u2) { ya(h2, e23), ya(i2.$$.fragment, e23); for (var t3 = 0; t3 < d2.length; t3 += 1) ya(v2[t3]); u2 = true; } }, o: function(e23) { ba(h2, e23), ba(i2.$$.fragment, e23), v2 = v2.filter(Boolean); for (var t3 = 0; t3 < v2.length; t3 += 1) ba(v2[t3]); u2 = false; }, d: function(e23) { e23 && po(t2), h2 && h2.d(e23), Ea(i2), mo(v2, e23), c2 = false, Wi(l2); } }; } function kV(e22, t2, n2) { var r2, i2 = t2.$$slots, o2 = i2 === void 0 ? {} : i2, a2 = t2.$$scope, s2 = t2.items, u2 = s2 === void 0 ? [] : s2, c2 = t2.title, l2 = c2 === void 0 ? void 0 : c2, f2 = t2.width, h2 = f2 === void 0 ? "120px" : f2, d2 = false; function v2() { n2(3, d2 = false); } function p2(e23) { zx(e23) === "Escape" && (e23.preventDefault(), n2(3, d2 = false)); } Uo(function() { document.addEventListener("click", v2), document.addEventListener("keydown", p2); }), Ko(function() { document.removeEventListener("click", v2), document.removeEventListener("keydown", p2); }); return e22.$$set = function(e23) { "items" in e23 && n2(0, u2 = e23.items), "title" in e23 && n2(1, l2 = e23.title), "width" in e23 && n2(2, h2 = e23.width), "$$scope" in e23 && n2(7, a2 = e23.$$scope); }, e22.$$.update = function() { 1 & e22.$$.dirty && n2(4, r2 = u2.every(function(e23) { return e23.disabled === true; })); }, [u2, l2, h2, d2, r2, function() { var e23 = d2; setTimeout(function() { return n2(3, d2 = !e23); }); }, v2, a2, o2, function(e23) { return e23.onClick(); }]; } var wV = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, kV, bV, Ki, { items: 0, title: 1, width: 2 }, dV), r2; } return zi(n2); }(), xV = { prefix: "far", iconName: "clock", icon: [512, 512, [128339, "clock-four"], "f017", "M232 120C232 106.7 242.7 96 256 96C269.3 96 280 106.7 280 120V243.2L365.3 300C376.3 307.4 379.3 322.3 371.1 333.3C364.6 344.3 349.7 347.3 338.7 339.1L242.7 275.1C236 271.5 232 264 232 255.1L232 120zM256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0zM48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48C141.1 48 48 141.1 48 256z"] }, jV = { prefix: "far", iconName: "lightbulb", icon: [384, 512, [128161], "f0eb", "M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM192 0C90.02 .3203 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.8 289.2 .0039 192 0zM288.4 260.1c-15.66 17.85-35.04 46.3-49.05 75.89h-94.61c-14.01-29.59-33.39-58.04-49.04-75.88C75.24 236.8 64 206.1 64 175.1C64 113.3 112.1 48.25 191.1 48C262.6 48 320 105.4 320 175.1C320 206.1 308.8 236.8 288.4 260.1zM176 80C131.9 80 96 115.9 96 160c0 8.844 7.156 16 16 16S128 168.8 128 160c0-26.47 21.53-48 48-48c8.844 0 16-7.148 16-15.99S184.8 80 176 80z"] }, SV = { prefix: "far", iconName: "square", icon: [448, 512, [9723, 9724, 61590, 9632], "f0c8", "M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"] }, CV = { prefix: "far", iconName: "square-check", icon: [448, 512, [9989, 61510, 9745, "check-square"], "f14a", "M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"] }; /*! * Font Awesome Free 6.1.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2022 Fonticons, Inc. */ function _V(e22) { co(e22, "svelte-1yai37q", ".jse-contextmenu.svelte-1yai37q.svelte-1yai37q{box-shadow:var(--jse-controls-box-shadow);font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-context-menu-background);color:var(--jse-context-menu-color)}.jse-contextmenu.svelte-1yai37q button.svelte-1yai37q{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0}.jse-contextmenu.svelte-1yai37q button.svelte-1yai37q:focus{background:var(--jse-context-menu-background-highlight)}.jse-contextmenu.svelte-1yai37q .jse-row.svelte-1yai37q{display:flex;flex-direction:row;align-items:flex-start;justify-content:stretch}.jse-contextmenu.svelte-1yai37q .jse-row div.jse-label.svelte-1yai37q{flex:1;white-space:nowrap;padding:var(--jse-padding);color:var(--jse-context-menu-color-disabled);line-height:normal}.jse-contextmenu.svelte-1yai37q .jse-row div.jse-tip.svelte-1yai37q{flex:1;background:var(--jse-context-menu-tip-background);color:var(--jse-context-menu-tip-color);margin:calc(0.5 * var(--jse-padding));padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);font-size:80%;line-height:1.3em;display:flex;flex-direction:row;align-items:center;gap:var(--jse-padding);border-radius:3px}.jse-contextmenu.svelte-1yai37q .jse-row div.jse-tip div.svelte-1yai37q{vertical-align:middle}.jse-contextmenu.svelte-1yai37q .jse-row button.svelte-1yai37q{flex:1;white-space:nowrap;padding:var(--jse-padding);color:inherit}.jse-contextmenu.svelte-1yai37q .jse-row button.svelte-1yai37q:hover{background:var(--jse-context-menu-background-highlight)}.jse-contextmenu.svelte-1yai37q .jse-row button.svelte-1yai37q:disabled{color:var(--jse-context-menu-color-disabled);background:unset}.jse-contextmenu.svelte-1yai37q .jse-row button .jse-insert.svelte-1yai37q{display:inline-block;position:relative;width:18px;height:18px;font-family:var(--jse-font-family-mono);font-weight:bold;font-size:16px}.jse-contextmenu.svelte-1yai37q .jse-row button .jse-insert .jse-quote.svelte-1yai37q,.jse-contextmenu.svelte-1yai37q .jse-row button .jse-insert .jse-plus.svelte-1yai37q{position:absolute;top:-4px;left:2px;font-size:24px}.jse-contextmenu.svelte-1yai37q .jse-column.svelte-1yai37q{flex:1;display:flex;flex-direction:column;align-items:stretch}.jse-contextmenu.svelte-1yai37q .jse-column.svelte-1yai37q:not(:last-child){border-right:1px solid var(--jse-context-menu-separator-color)}.jse-contextmenu.svelte-1yai37q .jse-column button.svelte-1yai37q{text-align:left;min-width:130px}.jse-contextmenu.svelte-1yai37q .jse-separator.svelte-1yai37q{width:100%;height:1px;background:var(--jse-context-menu-separator-color)}"); } function $V(e22) { var t2, n2, r2, i2, o2, a2, s2; return n2 = new tS({ props: { data: wj } }), { c: function() { t2 = go("button"), Aa(n2.$$.fragment), r2 = bo(" Edit value"), So(t2, "type", "button"), So(t2, "slot", "defaultItem"), So(t2, "title", "Edit the value (Double-click on the value)"), t2.disabled = i2 = !e22[2], So(t2, "class", "svelte-1yai37q"); }, m: function(i3, u2) { vo(i3, t2, u2), Ma(n2, t2, null), uo(t2, r2), o2 = true, a2 || (s2 = xo(t2, "click", e22[18]), a2 = true); }, p: function(e23, n3) { (!o2 || 4 & n3[0] && i2 !== (i2 = !e23[2])) && (t2.disabled = i2); }, i: function(e23) { o2 || (ya(n2.$$.fragment, e23), o2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), o2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), a2 = false, s2(); } }; } function OV(e22) { var t2, n2, r2, i2, o2, a2, s2; return n2 = new tS({ props: { data: xj } }), { c: function() { t2 = go("button"), Aa(n2.$$.fragment), r2 = bo(" Cut"), So(t2, "type", "button"), So(t2, "slot", "defaultItem"), So(t2, "title", "Cut selected contents, formatted with indentation (Ctrl+X)"), t2.disabled = i2 = !e22[1], So(t2, "class", "svelte-1yai37q"); }, m: function(i3, u2) { vo(i3, t2, u2), Ma(n2, t2, null), uo(t2, r2), o2 = true, a2 || (s2 = xo(t2, "click", e22[19]), a2 = true); }, p: function(e23, n3) { (!o2 || 2 & n3[0] && i2 !== (i2 = !e23[1])) && (t2.disabled = i2); }, i: function(e23) { o2 || (ya(n2.$$.fragment, e23), o2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), o2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), a2 = false, s2(); } }; } function AV(e22) { var t2, n2, r2, i2, o2, a2, s2; return n2 = new tS({ props: { data: vj } }), { c: function() { t2 = go("button"), Aa(n2.$$.fragment), r2 = bo(" Copy"), So(t2, "type", "button"), So(t2, "slot", "defaultItem"), So(t2, "title", "Copy selected contents, formatted with indentation (Ctrl+C)"), t2.disabled = i2 = !e22[1], So(t2, "class", "svelte-1yai37q"); }, m: function(i3, u2) { vo(i3, t2, u2), Ma(n2, t2, null), uo(t2, r2), o2 = true, a2 || (s2 = xo(t2, "click", e22[20]), a2 = true); }, p: function(e23, n3) { (!o2 || 2 & n3[0] && i2 !== (i2 = !e23[1])) && (t2.disabled = i2); }, i: function(e23) { o2 || (ya(n2.$$.fragment, e23), o2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), o2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), a2 = false, s2(); } }; } function MV(e22) { var t2, n2, r2, i2, o2, a2, s2; return i2 = new tS({ props: { data: jV } }), { c: function() { t2 = go("div"), n2 = go("div"), r2 = go("div"), Aa(i2.$$.fragment), o2 = ko(), (a2 = go("div")).textContent = "Tip: you can open this context menu via right-click or with Ctrl+Q", So(r2, "class", "svelte-1yai37q"), So(a2, "class", "svelte-1yai37q"), So(n2, "class", "jse-tip svelte-1yai37q"), So(t2, "class", "jse-row svelte-1yai37q"); }, m: function(e23, u2) { vo(e23, t2, u2), uo(t2, n2), uo(n2, r2), Ma(i2, r2, null), uo(n2, o2), uo(n2, a2), s2 = true; }, p: Bi, i: function(e23) { s2 || (ya(i2.$$.fragment, e23), s2 = true); }, o: function(e23) { ba(i2.$$.fragment, e23), s2 = false; }, d: function(e23) { e23 && po(t2), Ea(i2); } }; } function EV(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2, b2, k2, w2, x2, j2, S2, C2, _2, $2, O2, A2, M2, E2, P2, N2, T2, I2, R2, D2, z2, L2, B2, q2, F2, V2, H2, W2, J2, U2, K2, G2, Q2, Y2, Z2, X2, ee2, te2, ne2, re2, ie2, oe2, ae2, se2, ue2, ce2, le2, fe2, he2, de2, ve2, pe2, me2, ge2, ye2, be2, ke2, we2, xe2, je2, Se2, Ce2, _e2, $e2, Oe2, Ae2, Me2, Ee2, Pe2, Ne2, Te2, Ie2, Re2, De2, ze2, Le2, Be2, qe2, Fe2; i2 = new tS({ props: { data: wj } }), u2 = new wV({ props: { width: "11em", items: e22[8], $$slots: { defaultItem: [$V] }, $$scope: { ctx: e22 } } }), d2 = new wV({ props: { width: "10em", items: e22[7], $$slots: { defaultItem: [OV] }, $$scope: { ctx: e22 } } }), p2 = new wV({ props: { width: "12em", items: e22[6], $$slots: { defaultItem: [AV] }, $$scope: { ctx: e22 } } }), y2 = new tS({ props: { data: kj } }), $2 = new tS({ props: { data: $j } }), P2 = new tS({ props: { data: hj } }), D2 = new tS({ props: { data: pj } }), F2 = new tS({ props: { data: rj } }), U2 = new tS({ props: { data: gj } }), Ee2 = new tS({ props: { data: Sj } }), Re2 = new tS({ props: { data: jj } }); var Ve2 = e22[0] && MV(); return { c: function() { t2 = go("div"), n2 = go("div"), r2 = go("button"), Aa(i2.$$.fragment), o2 = bo(" Edit key"), s2 = ko(), Aa(u2.$$.fragment), c2 = ko(), l2 = go("div"), f2 = ko(), h2 = go("div"), Aa(d2.$$.fragment), v2 = ko(), Aa(p2.$$.fragment), m2 = ko(), g2 = go("button"), Aa(y2.$$.fragment), b2 = bo(" Paste"), w2 = ko(), x2 = go("div"), j2 = ko(), S2 = go("div"), C2 = go("div"), _2 = go("button"), Aa($2.$$.fragment), O2 = bo(" Remove"), M2 = ko(), E2 = go("button"), Aa(P2.$$.fragment), N2 = bo(" Duplicate"), I2 = ko(), R2 = go("button"), Aa(D2.$$.fragment), z2 = bo(" Extract"), B2 = ko(), q2 = go("button"), Aa(F2.$$.fragment), V2 = bo(" Sort"), W2 = ko(), J2 = go("button"), Aa(U2.$$.fragment), K2 = bo(" Transform"), Q2 = ko(), Y2 = go("div"), Z2 = go("div"), X2 = bo(e22[13]), ee2 = bo(":"), te2 = ko(), ne2 = go("button"), re2 = go("span"), (ie2 = go("span")).textContent = "+", oe2 = bo(" Structure"), ue2 = ko(), ce2 = go("button"), (le2 = go("span")).textContent = "{}", fe2 = bo(" Object"), ve2 = ko(), pe2 = go("button"), (me2 = go("span")).textContent = "[]", ge2 = bo(" Array"), ke2 = ko(), we2 = go("button"), (xe2 = go("span")).innerHTML = '"', je2 = bo(" Value"), _e2 = ko(), $e2 = go("div"), Oe2 = ko(), Ae2 = go("div"), Me2 = go("button"), Aa(Ee2.$$.fragment), Pe2 = bo(" Insert before"), Te2 = ko(), Ie2 = go("button"), Aa(Re2.$$.fragment), De2 = bo(" Insert after"), Le2 = ko(), Ve2 && Ve2.c(), So(r2, "type", "button"), So(r2, "title", "Edit the key (Double-click on the key)"), r2.disabled = a2 = !e22[14], So(r2, "class", "svelte-1yai37q"), So(n2, "class", "jse-row svelte-1yai37q"), So(l2, "class", "jse-separator svelte-1yai37q"), So(g2, "type", "button"), So(g2, "title", "Paste clipboard contents (Ctrl+V)"), g2.disabled = k2 = !e22[3], So(g2, "class", "svelte-1yai37q"), So(h2, "class", "jse-row svelte-1yai37q"), So(x2, "class", "jse-separator svelte-1yai37q"), So(_2, "type", "button"), So(_2, "title", "Remove selected contents (Delete)"), _2.disabled = A2 = !e22[1], So(_2, "class", "svelte-1yai37q"), So(E2, "type", "button"), So(E2, "title", "Duplicate selected contents (Ctrl+D)"), E2.disabled = T2 = !e22[16], So(E2, "class", "svelte-1yai37q"), So(R2, "type", "button"), So(R2, "title", "Extract selected contents"), R2.disabled = L2 = !e22[15], So(R2, "class", "svelte-1yai37q"), So(q2, "type", "button"), So(q2, "title", "Sort array or object contents"), q2.disabled = H2 = !e22[1], So(q2, "class", "svelte-1yai37q"), So(J2, "type", "button"), So(J2, "title", "Transform array or object contents (filter, sort, project)"), J2.disabled = G2 = !e22[1], So(J2, "class", "svelte-1yai37q"), So(C2, "class", "jse-column svelte-1yai37q"), So(Z2, "class", "jse-label svelte-1yai37q"), So(ie2, "class", "jse-plus svelte-1yai37q"), So(re2, "class", "jse-insert svelte-1yai37q"), So(ne2, "type", "button"), So(ne2, "title", ae2 = e22[13] + " structure"), ne2.disabled = se2 = !e22[12], So(ne2, "class", "svelte-1yai37q"), So(le2, "class", "jse-insert svelte-1yai37q"), So(ce2, "type", "button"), So(ce2, "title", he2 = e22[13] + " object"), ce2.disabled = de2 = !e22[11], So(ce2, "class", "svelte-1yai37q"), So(me2, "class", "jse-insert svelte-1yai37q"), So(pe2, "type", "button"), So(pe2, "title", ye2 = e22[13] + " array"), pe2.disabled = be2 = !e22[10], So(pe2, "class", "svelte-1yai37q"), So(xe2, "class", "jse-insert svelte-1yai37q"), So(we2, "type", "button"), So(we2, "title", Se2 = e22[13] + " value"), we2.disabled = Ce2 = !e22[9], So(we2, "class", "svelte-1yai37q"), So(Y2, "class", "jse-column svelte-1yai37q"), So(S2, "class", "jse-row svelte-1yai37q"), So($e2, "class", "jse-separator svelte-1yai37q"), So(Me2, "type", "button"), So(Me2, "title", "Select area before current entry to insert or paste contents"), Me2.disabled = Ne2 = !e22[1] || e22[4], So(Me2, "class", "svelte-1yai37q"), So(Ie2, "type", "button"), So(Ie2, "title", "Select area after current entry to insert or paste contents"), Ie2.disabled = ze2 = !e22[1] || e22[4], So(Ie2, "class", "svelte-1yai37q"), So(Ae2, "class", "jse-row svelte-1yai37q"), So(t2, "class", "jse-contextmenu svelte-1yai37q"); }, m: function(a3, k3) { vo(a3, t2, k3), uo(t2, n2), uo(n2, r2), Ma(i2, r2, null), uo(r2, o2), uo(n2, s2), Ma(u2, n2, null), uo(t2, c2), uo(t2, l2), uo(t2, f2), uo(t2, h2), Ma(d2, h2, null), uo(h2, v2), Ma(p2, h2, null), uo(h2, m2), uo(h2, g2), Ma(y2, g2, null), uo(g2, b2), uo(t2, w2), uo(t2, x2), uo(t2, j2), uo(t2, S2), uo(S2, C2), uo(C2, _2), Ma($2, _2, null), uo(_2, O2), uo(C2, M2), uo(C2, E2), Ma(P2, E2, null), uo(E2, N2), uo(C2, I2), uo(C2, R2), Ma(D2, R2, null), uo(R2, z2), uo(C2, B2), uo(C2, q2), Ma(F2, q2, null), uo(q2, V2), uo(C2, W2), uo(C2, J2), Ma(U2, J2, null), uo(J2, K2), uo(S2, Q2), uo(S2, Y2), uo(Y2, Z2), uo(Z2, X2), uo(Z2, ee2), uo(Y2, te2), uo(Y2, ne2), uo(ne2, re2), uo(re2, ie2), uo(ne2, oe2), uo(Y2, ue2), uo(Y2, ce2), uo(ce2, le2), uo(ce2, fe2), uo(Y2, ve2), uo(Y2, pe2), uo(pe2, me2), uo(pe2, ge2), uo(Y2, ke2), uo(Y2, we2), uo(we2, xe2), uo(we2, je2), uo(t2, _e2), uo(t2, $e2), uo(t2, Oe2), uo(t2, Ae2), uo(Ae2, Me2), Ma(Ee2, Me2, null), uo(Me2, Pe2), uo(Ae2, Te2), uo(Ae2, Ie2), Ma(Re2, Ie2, null), uo(Ie2, De2), uo(t2, Le2), Ve2 && Ve2.m(t2, null), e22[58](t2), Be2 = true, qe2 || (Fe2 = [xo(r2, "click", e22[17]), xo(g2, "click", e22[21]), xo(_2, "click", e22[22]), xo(E2, "click", e22[23]), xo(R2, "click", e22[24]), xo(q2, "click", e22[26]), xo(J2, "click", e22[27]), xo(ne2, "click", e22[54]), xo(ce2, "click", e22[55]), xo(pe2, "click", e22[56]), xo(we2, "click", e22[57]), xo(Me2, "click", e22[28]), xo(Ie2, "click", e22[29]), xo(t2, "keydown", e22[30])], qe2 = true); }, p: function(e23, n3) { (!Be2 || 16384 & n3[0] && a2 !== (a2 = !e23[14])) && (r2.disabled = a2); var i3 = {}; 256 & n3[0] && (i3.items = e23[8]), 4 & n3[0] | 1 & n3[2] && (i3.$$scope = { dirty: n3, ctx: e23 }), u2.$set(i3); var o3 = {}; 128 & n3[0] && (o3.items = e23[7]), 2 & n3[0] | 1 & n3[2] && (o3.$$scope = { dirty: n3, ctx: e23 }), d2.$set(o3); var s3 = {}; 64 & n3[0] && (s3.items = e23[6]), 2 & n3[0] | 1 & n3[2] && (s3.$$scope = { dirty: n3, ctx: e23 }), p2.$set(s3), (!Be2 || 8 & n3[0] && k2 !== (k2 = !e23[3])) && (g2.disabled = k2), (!Be2 || 2 & n3[0] && A2 !== (A2 = !e23[1])) && (_2.disabled = A2), (!Be2 || 65536 & n3[0] && T2 !== (T2 = !e23[16])) && (E2.disabled = T2), (!Be2 || 32768 & n3[0] && L2 !== (L2 = !e23[15])) && (R2.disabled = L2), (!Be2 || 2 & n3[0] && H2 !== (H2 = !e23[1])) && (q2.disabled = H2), (!Be2 || 2 & n3[0] && G2 !== (G2 = !e23[1])) && (J2.disabled = G2), (!Be2 || 8192 & n3[0]) && Ao(X2, e23[13]), (!Be2 || 8192 & n3[0] && ae2 !== (ae2 = e23[13] + " structure")) && So(ne2, "title", ae2), (!Be2 || 4096 & n3[0] && se2 !== (se2 = !e23[12])) && (ne2.disabled = se2), (!Be2 || 8192 & n3[0] && he2 !== (he2 = e23[13] + " object")) && So(ce2, "title", he2), (!Be2 || 2048 & n3[0] && de2 !== (de2 = !e23[11])) && (ce2.disabled = de2), (!Be2 || 8192 & n3[0] && ye2 !== (ye2 = e23[13] + " array")) && So(pe2, "title", ye2), (!Be2 || 1024 & n3[0] && be2 !== (be2 = !e23[10])) && (pe2.disabled = be2), (!Be2 || 8192 & n3[0] && Se2 !== (Se2 = e23[13] + " value")) && So(we2, "title", Se2), (!Be2 || 512 & n3[0] && Ce2 !== (Ce2 = !e23[9])) && (we2.disabled = Ce2), (!Be2 || 18 & n3[0] && Ne2 !== (Ne2 = !e23[1] || e23[4])) && (Me2.disabled = Ne2), (!Be2 || 18 & n3[0] && ze2 !== (ze2 = !e23[1] || e23[4])) && (Ie2.disabled = ze2), e23[0] ? Ve2 ? (Ve2.p(e23, n3), 1 & n3[0] && ya(Ve2, 1)) : ((Ve2 = MV()).c(), ya(Ve2, 1), Ve2.m(t2, null)) : Ve2 && (ma(), ba(Ve2, 1, 1, function() { Ve2 = null; }), ga()); }, i: function(e23) { Be2 || (ya(i2.$$.fragment, e23), ya(u2.$$.fragment, e23), ya(d2.$$.fragment, e23), ya(p2.$$.fragment, e23), ya(y2.$$.fragment, e23), ya($2.$$.fragment, e23), ya(P2.$$.fragment, e23), ya(D2.$$.fragment, e23), ya(F2.$$.fragment, e23), ya(U2.$$.fragment, e23), ya(Ee2.$$.fragment, e23), ya(Re2.$$.fragment, e23), ya(Ve2), Be2 = true); }, o: function(e23) { ba(i2.$$.fragment, e23), ba(u2.$$.fragment, e23), ba(d2.$$.fragment, e23), ba(p2.$$.fragment, e23), ba(y2.$$.fragment, e23), ba($2.$$.fragment, e23), ba(P2.$$.fragment, e23), ba(D2.$$.fragment, e23), ba(F2.$$.fragment, e23), ba(U2.$$.fragment, e23), ba(Ee2.$$.fragment, e23), ba(Re2.$$.fragment, e23), ba(Ve2), Be2 = false; }, d: function(n3) { n3 && po(t2), Ea(i2), Ea(u2), Ea(d2), Ea(p2), Ea(y2), Ea($2), Ea(P2), Ea(D2), Ea(F2), Ea(U2), Ea(Ee2), Ea(Re2), Ve2 && Ve2.d(), e22[58](null), qe2 = false, Wi(Fe2); } }; } function PV(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2, b2, k2, w2, x2, j2, S2 = t2.json, C2 = t2.documentState, _2 = t2.showTip, $2 = t2.onCloseContextMenu, O2 = t2.onEditKey, A2 = t2.onEditValue, M2 = t2.onToggleEnforceString, E2 = t2.onCut, P2 = t2.onCopy, N2 = t2.onPaste, T2 = t2.onRemove, I2 = t2.onDuplicate, R2 = t2.onExtract, D2 = t2.onInsertBefore, z2 = t2.onInsert, L2 = t2.onConvert, B2 = t2.onInsertAfter, q2 = t2.onSort, F2 = t2.onTransform; function V2() { $2(), A2(); } function H2() { $2(), M2(); } function W2() { $2(), E2(true); } function J2() { $2(), E2(false); } function U2() { $2(), P2(true); } function K2() { $2(), P2(false); } function G2(e23) { $2(), u2 ? L2(e23) : z2(e23); } Uo(function() { setTimeout(function() { var e23 = Ni(j2.querySelectorAll("button")).find(function(e24) { return !e24.disabled; }); e23 && e23.focus(); }); }); return e22.$$set = function(e23) { "json" in e23 && n2(31, S2 = e23.json), "documentState" in e23 && n2(32, C2 = e23.documentState), "showTip" in e23 && n2(0, _2 = e23.showTip), "onCloseContextMenu" in e23 && n2(33, $2 = e23.onCloseContextMenu), "onEditKey" in e23 && n2(34, O2 = e23.onEditKey), "onEditValue" in e23 && n2(35, A2 = e23.onEditValue), "onToggleEnforceString" in e23 && n2(36, M2 = e23.onToggleEnforceString), "onCut" in e23 && n2(37, E2 = e23.onCut), "onCopy" in e23 && n2(38, P2 = e23.onCopy), "onPaste" in e23 && n2(39, N2 = e23.onPaste), "onRemove" in e23 && n2(40, T2 = e23.onRemove), "onDuplicate" in e23 && n2(41, I2 = e23.onDuplicate), "onExtract" in e23 && n2(42, R2 = e23.onExtract), "onInsertBefore" in e23 && n2(43, D2 = e23.onInsertBefore), "onInsert" in e23 && n2(44, z2 = e23.onInsert), "onConvert" in e23 && n2(45, L2 = e23.onConvert), "onInsertAfter" in e23 && n2(46, B2 = e23.onInsertAfter), "onSort" in e23 && n2(47, q2 = e23.onSort), "onTransform" in e23 && n2(48, F2 = e23.onTransform); }, e22.$$.update = function() { 2 & e22.$$.dirty[1] && n2(50, r2 = C2.selection), 1 & e22.$$.dirty[1] && n2(53, i2 = S2 !== void 0), 524288 & e22.$$.dirty[1] && n2(3, o2 = r2 != null), 8 & e22.$$.dirty[0] | 524288 & e22.$$.dirty[1] && n2(4, a2 = o2 && xm(r2.focusPath)), 8 & e22.$$.dirty[0] | 524289 & e22.$$.dirty[1] && n2(51, s2 = o2 ? fs.exports.getIn(S2, r2.focusPath) : void 0), 4718592 & e22.$$.dirty[1] && n2(1, u2 = i2 && (tF(r2) || Xq(r2) || eF(r2))), 18 & e22.$$.dirty[0] | 4194304 & e22.$$.dirty[1] && n2(16, c2 = i2 && u2 && !a2), 16 & e22.$$.dirty[0] | 4718592 & e22.$$.dirty[1] && n2(15, l2 = i2 && r2 != null && (tF(r2) || eF(r2)) && !a2), 16 & e22.$$.dirty[0] | 4718593 & e22.$$.dirty[1] && n2(14, f2 = i2 && r2 != null && hF(r2) && !a2 && !Array.isArray(fs.exports.getIn(S2, Yp(r2.focusPath)))), 5767168 & e22.$$.dirty[1] && n2(2, h2 = i2 && r2 != null && hF(r2) && !Ms(s2)), 2 & e22.$$.dirty[0] && n2(52, d2 = u2), 2097152 & e22.$$.dirty[1] && n2(13, v2 = d2 ? "Convert to" : "Insert"), 8 & e22.$$.dirty[0] | 2097152 & e22.$$.dirty[1] && n2(12, p2 = !d2 && o2), 8 & e22.$$.dirty[0] | 3670016 & e22.$$.dirty[1] && n2(11, m2 = d2 ? SF(r2) && !As(s2) : o2), 8 & e22.$$.dirty[0] | 3670016 & e22.$$.dirty[1] && n2(10, g2 = d2 ? SF(r2) && !Array.isArray(s2) : o2), 8 & e22.$$.dirty[0] | 3670016 & e22.$$.dirty[1] && n2(9, y2 = d2 ? SF(r2) && Ms(s2) : o2), 1572866 & e22.$$.dirty[1] && n2(49, b2 = r2 != null && Bq(s2, C2.enforceStringMap, fs.exports.compileJSONPointer(r2.focusPath))), 4 & e22.$$.dirty[0] | 262144 & e22.$$.dirty[1] && n2(8, k2 = [{ icon: wj, text: "Edit value", title: "Edit the value (Double-click on the value)", onClick: V2, disabled: !h2 }, { icon: b2 ? CV : SV, text: "Enforce string", title: "Enforce keeping the value as string when it contains a numeric value", onClick: H2, disabled: !h2 }]), 2 & e22.$$.dirty[0] && n2(7, w2 = [{ icon: xj, text: "Cut formatted", title: "Cut selected contents, formatted with indentation (Ctrl+X)", onClick: W2, disabled: !u2 }, { icon: xj, text: "Cut compacted", title: "Cut selected contents, without indentation (Ctrl+Shift+X)", onClick: J2, disabled: !u2 }]), 2 & e22.$$.dirty[0] && n2(6, x2 = [{ icon: vj, text: "Copy formatted", title: "Copy selected contents, formatted with indentation (Ctrl+C)", onClick: U2, disabled: !u2 }, { icon: vj, text: "Copy compacted", title: "Copy selected contents, without indentation (Ctrl+Shift+C)", onClick: K2, disabled: !u2 }]); }, [_2, u2, h2, o2, a2, j2, x2, w2, k2, y2, g2, m2, p2, v2, f2, l2, c2, function() { $2(), O2(); }, V2, W2, U2, function() { $2(), N2(); }, function() { $2(), T2(); }, function() { $2(), I2(); }, function() { $2(), R2(); }, G2, function() { $2(), q2(); }, function() { $2(), F2(); }, function() { $2(), D2(); }, function() { $2(), B2(); }, function(e23) { var t3 = zx(e23).replace(/^Command\+/, "Ctrl+"); if (t3 === "Up" || t3 === "Down" || t3 === "Left" || t3 === "Right") { e23.preventDefault(); var n3 = Rx({ allElements: Array.from(j2.querySelectorAll("button:not([disabled])")), currentElement: e23.target, direction: t3, hasPrio: function(e24) { return e24.getAttribute("data-type") !== "jse-open-dropdown"; } }); n3 && n3.focus(); } }, S2, C2, $2, O2, A2, M2, E2, P2, N2, T2, I2, R2, D2, z2, L2, B2, q2, F2, b2, r2, s2, d2, i2, function() { return G2("structure"); }, function() { return G2("object"); }, function() { return G2("array"); }, function() { return G2("value"); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(5, j2 = e23); }); }]; } var NV = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, PV, EV, Ki, { json: 31, documentState: 32, showTip: 0, onCloseContextMenu: 33, onEditKey: 34, onEditValue: 35, onToggleEnforceString: 36, onCut: 37, onCopy: 38, onPaste: 39, onRemove: 40, onDuplicate: 41, onExtract: 42, onInsertBefore: 43, onInsert: 44, onConvert: 45, onInsertAfter: 46, onSort: 47, onTransform: 48 }, _V, [-1, -1, -1]), r2; } return zi(n2); }(), TV = { exports: {} }; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(e22) { !function() { var t2 = {}.hasOwnProperty; function n2() { for (var e23 = [], r2 = 0; r2 < arguments.length; r2++) { var i2 = arguments[r2]; if (i2) { var o2 = Li(i2); if (o2 === "string" || o2 === "number") e23.push(i2); else if (Array.isArray(i2)) { if (i2.length) { var a2 = n2.apply(null, i2); a2 && e23.push(a2); } } else if (o2 === "object") if (i2.toString === Object.prototype.toString) for (var s2 in i2) t2.call(i2, s2) && i2[s2] && e23.push(s2); else e23.push(i2.toString()); } } return e23.join(" "); } e22.exports ? (n2.default = n2, e22.exports = n2) : window.classNames = n2; }(); }(TV); var IV = TV.exports; function RV(e22) { co(e22, "svelte-1knbf5w", "div.jse-collapsed-items.svelte-1knbf5w.svelte-1knbf5w{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:transparent;background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1knbf5w div.jse-text.svelte-1knbf5w,div.jse-collapsed-items.svelte-1knbf5w button.jse-expand-items.svelte-1knbf5w{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1knbf5w div.jse-text.svelte-1knbf5w{display:inline}div.jse-collapsed-items.svelte-1knbf5w button.jse-expand-items.svelte-1knbf5w{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1knbf5w button.jse-expand-items.svelte-1knbf5w:hover,div.jse-collapsed-items.svelte-1knbf5w button.jse-expand-items.svelte-1knbf5w:focus{color:var(--jse-collapsed-items-link-color-highlight)}"); } function DV(e22, t2, n2) { var r2 = e22.slice(); return r2[13] = t2[n2], r2; } function zV(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2 = e22[13].start + "", l2 = e22[13].end + ""; function f2() { return e22[12](e22[13]); } return { c: function() { t2 = go("button"), n2 = bo("show "), r2 = bo(c2), i2 = bo("-"), o2 = bo(l2), a2 = ko(), So(t2, "type", "button"), So(t2, "class", "jse-expand-items svelte-1knbf5w"); }, m: function(e23, c3) { vo(e23, t2, c3), uo(t2, n2), uo(t2, r2), uo(t2, i2), uo(t2, o2), uo(t2, a2), s2 || (u2 = xo(t2, "click", f2), s2 = true); }, p: function(t3, n3) { e22 = t3, 16 & n3 && c2 !== (c2 = e22[13].start + "") && Ao(r2, c2), 16 & n3 && l2 !== (l2 = e22[13].end + "") && Ao(o2, l2); }, d: function(e23) { e23 && po(t2), s2 = false, u2(); } }; } function LV(e22) { for (var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2 = e22[4], d2 = [], v2 = 0; v2 < h2.length; v2 += 1) d2[v2] = zV(DV(e22, h2, v2)); return { c: function() { t2 = go("div"), n2 = go("div"), r2 = go("div"), i2 = bo("Items "), o2 = bo(e22[3]), a2 = bo("-"), s2 = bo(e22[2]), u2 = ko(); for (var l3 = 0; l3 < d2.length; l3 += 1) d2[l3].c(); So(r2, "class", "jse-text svelte-1knbf5w"), So(t2, "class", "jse-collapsed-items svelte-1knbf5w"), So(t2, "style", c2 = BV(e22[0].length + 2)), To(t2, "jse-selected", e22[5]); }, m: function(e23, c3) { vo(e23, t2, c3), uo(t2, n2), uo(n2, r2), uo(r2, i2), uo(r2, o2), uo(r2, a2), uo(r2, s2), uo(n2, u2); for (var h3 = 0; h3 < d2.length; h3 += 1) d2[h3].m(n2, null); l2 || (f2 = xo(t2, "mousemove", qV), l2 = true); }, p: function(e23, r3) { var i3 = ki(r3, 1)[0]; if (8 & i3 && Ao(o2, e23[3]), 4 & i3 && Ao(s2, e23[2]), 19 & i3) { var a3; for (h2 = e23[4], a3 = 0; a3 < h2.length; a3 += 1) { var u3 = DV(e23, h2, a3); d2[a3] ? d2[a3].p(u3, i3) : (d2[a3] = zV(u3), d2[a3].c(), d2[a3].m(n2, null)); } for (; a3 < d2.length; a3 += 1) d2[a3].d(1); d2.length = h2.length; } 1 & i3 && c2 !== (c2 = BV(e23[0].length + 2)) && So(t2, "style", c2), 32 & i3 && To(t2, "jse-selected", e23[5]); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2), mo(d2, e23), l2 = false, f2(); } }; } function BV(e22) { return "margin-left: calc(".concat(e22, " * var(--jse-indent-size))"); } function qV(e22) { e22.stopPropagation(); } function FV(e22, t2, n2) { var r2, i2, o2, a2, s2, u2 = t2.visibleSections, c2 = t2.sectionIndex, l2 = t2.total, f2 = t2.path, h2 = t2.pointer, d2 = t2.selection, v2 = t2.onExpandSection; return e22.$$set = function(e23) { "visibleSections" in e23 && n2(6, u2 = e23.visibleSections), "sectionIndex" in e23 && n2(7, c2 = e23.sectionIndex), "total" in e23 && n2(8, l2 = e23.total), "path" in e23 && n2(0, f2 = e23.path), "pointer" in e23 && n2(9, h2 = e23.pointer), "selection" in e23 && n2(10, d2 = e23.selection), "onExpandSection" in e23 && n2(1, v2 = e23.onExpandSection); }, e22.$$.update = function() { 192 & e22.$$.dirty && n2(11, r2 = u2[c2]), 2048 & e22.$$.dirty && n2(3, i2 = r2.end), 448 & e22.$$.dirty && n2(2, o2 = u2[c2 + 1] ? u2[c2 + 1].start : l2), 1544 & e22.$$.dirty && n2(5, a2 = !!tF(d2) && d2.pointersMap[fs.exports.appendToJSONPointer(h2, i2)] === true), 12 & e22.$$.dirty && n2(4, s2 = function(e23, t3) { var n3 = { start: e23, end: Math.min(bq(e23), t3) }, r3 = Math.max(kq((e23 + t3) / 2), e23), i3 = { start: r3, end: Math.min(bq(r3), t3) }, o3 = kq(t3), a3 = o3 === t3 ? o3 - 100 : o3, s3 = { start: Math.max(a3, e23), end: t3 }, u3 = [n3], c3 = i3.start >= n3.end && i3.end <= s3.start; return c3 && u3.push(i3), s3.start >= (c3 ? i3.end : n3.end) && u3.push(s3), u3; }(i2, o2)); }, [f2, v2, o2, i2, s2, a2, u2, c2, l2, h2, d2, r2, function(e23) { return v2(f2, e23); }]; } var VV = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, FV, LV, Ki, { visibleSections: 6, sectionIndex: 7, total: 8, path: 0, pointer: 9, selection: 10, onExpandSection: 1 }, RV), r2; } return zi(n2); }(); function HV(e22) { co(e22, "svelte-dol684", ".jse-context-menu-button.svelte-dol684{position:absolute;top:calc(-0.5 * var(--jse-context-menu-button-size));right:calc(-0.5 * var(--jse-context-menu-button-size));width:var(--jse-context-menu-button-size);height:var(--jse-context-menu-button-size);padding:0;margin:0;z-index:2;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-button-background);color:var(--jse-context-menu-button-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-button.svelte-dol684:hover{background:var(--jse-context-menu-button-background-highlight)}"); } function WV(e22) { var t2, n2, r2, i2, o2; return n2 = new tS({ props: { data: aj } }), { c: function() { t2 = go("button"), Aa(n2.$$.fragment), So(t2, "type", "button"), So(t2, "class", "jse-context-menu-button svelte-dol684"), So(t2, "title", is), To(t2, "jse-selected", e22[0]); }, m: function(a2, s2) { vo(a2, t2, s2), Ma(n2, t2, null), r2 = true, i2 || (o2 = xo(t2, "click", e22[1]), i2 = true); }, p: function(e23, n3) { 1 & ki(n3, 1)[0] && To(t2, "jse-selected", e23[0]); }, i: function(e23) { r2 || (ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), i2 = false, o2(); } }; } function JV(e22, t2, n2) { var r2 = t2.selected, i2 = t2.onContextMenu; return e22.$$set = function(e23) { "selected" in e23 && n2(0, r2 = e23.selected), "onContextMenu" in e23 && n2(2, i2 = e23.onContextMenu); }, [r2, function(e23) { for (var t3 = e23.target; t3 && t3.nodeName !== "BUTTON"; ) t3 = t3.parentNode; t3 && i2({ anchor: t3, left: 0, top: 0, width: 260, height: 336, offsetTop: 2, offsetLeft: 0, showTip: true }); }, i2]; } var UV = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, JV, WV, Ki, { selected: 0, onContextMenu: 2 }, HV), r2; } return zi(n2); }(); function KV(e22) { co(e22, "svelte-s6kbew", ".jse-highlight.svelte-s6kbew{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-highlight.jse-active.svelte-s6kbew{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}"); } function GV(e22, t2, n2) { var r2 = e22.slice(); return r2[3] = t2[n2], r2; } function QV(e22) { var t2, n2, r2 = Sx(e22[3].text) + ""; return { c: function() { t2 = go("span"), n2 = bo(r2), So(t2, "class", "jse-highlight svelte-s6kbew"), To(t2, "jse-active", e22[3].active); }, m: function(e23, r3) { vo(e23, t2, r3), uo(t2, n2); }, p: function(e23, i2) { 1 & i2 && r2 !== (r2 = Sx(e23[3].text) + "") && Ao(n2, r2), 1 & i2 && To(t2, "jse-active", e23[3].active); }, d: function(e23) { e23 && po(t2); } }; } function YV(e22) { var t2, n2 = e22[3].text + ""; return { c: function() { t2 = bo(n2); }, m: function(e23, n3) { vo(e23, t2, n3); }, p: function(e23, r2) { 1 & r2 && n2 !== (n2 = e23[3].text + "") && Ao(t2, n2); }, d: function(e23) { e23 && po(t2); } }; } function ZV(e22) { var t2; function n2(e23, t3) { return e23[3].type === "normal" ? YV : QV; } var r2 = n2(e22), i2 = r2(e22); return { c: function() { i2.c(), t2 = wo(); }, m: function(e23, n3) { i2.m(e23, n3), vo(e23, t2, n3); }, p: function(e23, o2) { r2 === (r2 = n2(e23)) && i2 ? i2.p(e23, o2) : (i2.d(1), (i2 = r2(e23)) && (i2.c(), i2.m(t2.parentNode, t2))); }, d: function(e23) { i2.d(e23), e23 && po(t2); } }; } function XV(e22) { for (var t2, n2 = e22[0], r2 = [], i2 = 0; i2 < n2.length; i2 += 1) r2[i2] = ZV(GV(e22, n2, i2)); return { c: function() { for (var e23 = 0; e23 < r2.length; e23 += 1) r2[e23].c(); t2 = wo(); }, m: function(e23, n3) { for (var i3 = 0; i3 < r2.length; i3 += 1) r2[i3].m(e23, n3); vo(e23, t2, n3); }, p: function(e23, i3) { var o2 = ki(i3, 1)[0]; if (1 & o2) { var a2; for (n2 = e23[0], a2 = 0; a2 < n2.length; a2 += 1) { var s2 = GV(e23, n2, a2); r2[a2] ? r2[a2].p(s2, o2) : (r2[a2] = ZV(s2), r2[a2].c(), r2[a2].m(t2.parentNode, t2)); } for (; a2 < r2.length; a2 += 1) r2[a2].d(1); r2.length = n2.length; } }, i: Bi, o: Bi, d: function(e23) { mo(r2, e23), e23 && po(t2); } }; } function eH(e22, t2, n2) { var r2, i2 = t2.text, o2 = t2.searchResultItems; return e22.$$set = function(e23) { "text" in e23 && n2(1, i2 = e23.text), "searchResultItems" in e23 && n2(2, o2 = e23.searchResultItems); }, e22.$$.update = function() { 6 & e22.$$.dirty && n2(0, r2 = function(e23, t3) { var n3, r3 = [], i3 = 0, o3 = bi(t3); try { for (o3.s(); !(n3 = o3.n()).done; ) { var a2 = n3.value, s2 = e23.slice(i3, a2.start); s2 !== "" && r3.push({ type: "normal", text: s2, active: false }); var u2 = e23.slice(a2.start, a2.end); r3.push({ type: "highlight", text: u2, active: a2.active }), i3 = a2.end; } } catch (e24) { o3.e(e24); } finally { o3.f(); } var c2 = kv(t3); return c2.end < e23.length && r3.push({ type: "normal", text: e23.slice(c2.end), active: false }), r3; }(String(i2), o2)); }, [r2, i2, o2]; } var tH = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, eH, XV, Ui, { text: 1, searchResultItems: 2 }, KV), r2; } return zi(n2); }(); function nH(e22) { co(e22, "svelte-rw77oa", ".jse-value.jse-string.svelte-rw77oa{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-rw77oa,.jse-value.jse-array.svelte-rw77oa{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-rw77oa{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-rw77oa{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-rw77oa{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-rw77oa{color:var(--jse-text-color)}.jse-value.jse-url.svelte-rw77oa{color:var(--jse-value-color-url);text-decoration:underline}div.jse-editable-div.svelte-rw77oa{min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;word-break:normal;white-space:pre-wrap;overflow-wrap:anywhere}div.jse-editable-div.jse-short-text.svelte-rw77oa{overflow-wrap:normal}div.jse-editable-div[contenteditable=true].svelte-rw77oa{outline:var(--jse-edit-outline);background:inherit !important;position:relative;border-radius:0;z-index:3}div.jse-editable-div.jse-empty.svelte-rw77oa:not(:focus){outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}div.jse-editable-div.jse-empty.svelte-rw77oa::after{pointer-events:none;color:var(--jse-tag-background)}"); } function rH(e22) { var t2, n2, r2, i2; return { c: function() { So(t2 = go("div"), "class", n2 = eo(IV("jse-editable-div", e22[2], { "jse-short-text": e22[0] })) + " svelte-rw77oa"), So(t2, "contenteditable", "true"), So(t2, "spellcheck", "false"); }, m: function(n3, o2) { vo(n3, t2, o2), e22[13](t2), r2 || (i2 = [xo(t2, "input", e22[3]), xo(t2, "keydown", e22[4]), xo(t2, "paste", e22[5]), xo(t2, "blur", e22[6])], r2 = true); }, p: function(e23, r3) { 5 & ki(r3, 1)[0] && n2 !== (n2 = eo(IV("jse-editable-div", e23[2], { "jse-short-text": e23[0] })) + " svelte-rw77oa") && So(t2, "class", n2); }, i: Bi, o: Bi, d: function(n3) { n3 && po(t2), e22[13](null), r2 = false, Wi(i2); } }; } function iH(e22, t2, n2) { var r2, i2 = Da("jsoneditor:EditableDiv"), o2 = t2.value, a2 = t2.shortText, s2 = a2 !== void 0 && a2, u2 = t2.onChange, c2 = t2.onCancel, l2 = t2.onFind, f2 = t2.onPaste, h2 = f2 === void 0 ? Wu : f2, d2 = t2.onValueClass, v2 = d2 === void 0 ? function() { return ""; } : d2, p2 = v2(o2), m2 = false; function g2() { return function(e23) { return e23.replace(/\n$/, ""); }(r2.innerText); } function y2(e23) { n2(1, r2.innerText = Sx(e23), r2); } return Uo(function() { i2("onMount", { value: o2 }), y2(o2), setTimeout(function() { return Ax(r2); }); }), Ko(function() { var e23 = g2(); i2("onDestroy", { closed: m2, value: o2, newValue: e23 }), m2 || e23 === o2 || u2(e23, os); }), e22.$$set = function(e23) { "value" in e23 && n2(7, o2 = e23.value), "shortText" in e23 && n2(0, s2 = e23.shortText), "onChange" in e23 && n2(8, u2 = e23.onChange), "onCancel" in e23 && n2(9, c2 = e23.onCancel), "onFind" in e23 && n2(10, l2 = e23.onFind), "onPaste" in e23 && n2(11, h2 = e23.onPaste), "onValueClass" in e23 && n2(12, v2 = e23.onValueClass); }, [s2, r2, p2, function() { var e23 = g2(); e23 === "" && y2(""), n2(2, p2 = v2(e23)); }, function(e23) { e23.stopPropagation(); var t3 = zx(e23).replace(/^Command\+/, "Ctrl+"); if (t3 === "Escape" && (m2 = true, c2()), t3 === "Enter" || t3 === "Tab") { m2 = true; var n3 = g2(); u2(n3, ss); } t3 === "Ctrl+F" && (e23.preventDefault(), l2(false)), t3 === "Ctrl+H" && (e23.preventDefault(), l2(true)); }, function(e23) { if (h2) { var t3 = e23.clipboardData.getData("text/plain"); h2(t3); } }, function() { var e23 = document.hasFocus(), t3 = g2(); i2("handleBlur", { hasFocus: e23, closed: m2, value: o2, newValue: t3 }), document.hasFocus() && !m2 && (m2 = true, t3 !== o2 ? u2(t3, as) : c2()); }, o2, u2, c2, l2, h2, v2, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(1, r2 = e23); }); }]; } var oH = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, iH, rH, Ki, { value: 7, shortText: 0, onChange: 8, onCancel: 9, onFind: 10, onPaste: 11, onValueClass: 12 }, nH), r2; } return zi(n2); }(); function aH(e22) { co(e22, "svelte-566egb", '.jse-key.svelte-566egb{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-566egb:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-566egb:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-566egb{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-566egb::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}'); } function sH(e22) { var t2, n2, r2, i2, o2, a2, s2, u2 = [lH, cH], c2 = []; function l2(e23, t3) { return e23[1] ? 0 : 1; } return n2 = l2(e22), r2 = c2[n2] = u2[n2](e22), { c: function() { t2 = go("div"), r2.c(), So(t2, "data-type", "selectable-key"), So(t2, "class", i2 = eo(e22[6](e22[0])) + " svelte-566egb"); }, m: function(r3, i3) { vo(r3, t2, i3), c2[n2].m(t2, null), o2 = true, a2 || (s2 = xo(t2, "dblclick", e22[5]), a2 = true); }, p: function(e23, a3) { var s3 = n2; (n2 = l2(e23)) === s3 ? c2[n2].p(e23, a3) : (ma(), ba(c2[s3], 1, 1, function() { c2[s3] = null; }), ga(), (r2 = c2[n2]) ? r2.p(e23, a3) : (r2 = c2[n2] = u2[n2](e23)).c(), ya(r2, 1), r2.m(t2, null)), (!o2 || 1 & a3 && i2 !== (i2 = eo(e23[6](e23[0])) + " svelte-566egb")) && So(t2, "class", i2); }, i: function(e23) { o2 || (ya(r2), o2 = true); }, o: function(e23) { ba(r2), o2 = false; }, d: function(e23) { e23 && po(t2), c2[n2].d(), a2 = false, s2(); } }; } function uH(e22) { var t2, n2; return t2 = new oH({ props: { value: e22[2].normalization.escapeValue(e22[0]), shortText: true, onChange: e22[7], onCancel: e22[8], onFind: e22[2].onFind } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 5 & n3 && (r2.value = e23[2].normalization.escapeValue(e23[0])), 4 & n3 && (r2.onFind = e23[2].onFind), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function cH(e22) { var t2, n2 = Sx(e22[2].normalization.escapeValue(e22[0])) + ""; return { c: function() { t2 = bo(n2); }, m: function(e23, n3) { vo(e23, t2, n3); }, p: function(e23, r2) { 5 & r2 && n2 !== (n2 = Sx(e23[2].normalization.escapeValue(e23[0])) + "") && Ao(t2, n2); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function lH(e22) { var t2, n2; return t2 = new tH({ props: { text: e22[2].normalization.escapeValue(e22[0]), searchResultItems: e22[1] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 5 & n3 && (r2.text = e23[2].normalization.escapeValue(e23[0])), 2 & n3 && (r2.searchResultItems = e23[1]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function fH(e22) { var t2, n2; return t2 = new UV({ props: { selected: true, onContextMenu: e22[2].onContextMenu } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 4 & n3 && (r2.onContextMenu = e23[2].onContextMenu), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function hH(e22) { var t2, n2, r2, i2, o2, a2 = [uH, sH], s2 = []; function u2(e23, t3) { return e23[4] ? 0 : 1; } t2 = u2(e22), n2 = s2[t2] = a2[t2](e22); var c2 = !e22[2].readOnly && e22[3] && !e22[4] && fH(e22); return { c: function() { n2.c(), r2 = ko(), c2 && c2.c(), i2 = wo(); }, m: function(e23, n3) { s2[t2].m(e23, n3), vo(e23, r2, n3), c2 && c2.m(e23, n3), vo(e23, i2, n3), o2 = true; }, p: function(e23, o3) { var l2 = ki(o3, 1)[0], f2 = t2; (t2 = u2(e23)) === f2 ? s2[t2].p(e23, l2) : (ma(), ba(s2[f2], 1, 1, function() { s2[f2] = null; }), ga(), (n2 = s2[t2]) ? n2.p(e23, l2) : (n2 = s2[t2] = a2[t2](e23)).c(), ya(n2, 1), n2.m(r2.parentNode, r2)), e23[2].readOnly || !e23[3] || e23[4] ? c2 && (ma(), ba(c2, 1, 1, function() { c2 = null; }), ga()) : c2 ? (c2.p(e23, l2), 28 & l2 && ya(c2, 1)) : ((c2 = fH(e23)).c(), ya(c2, 1), c2.m(i2.parentNode, i2)); }, i: function(e23) { o2 || (ya(n2), ya(c2), o2 = true); }, o: function(e23) { ba(n2), ba(c2), o2 = false; }, d: function(e23) { s2[t2].d(e23), e23 && po(r2), c2 && c2.d(e23), e23 && po(i2); } }; } function dH(e22, t2, n2) { var r2, i2, o2 = t2.path, a2 = t2.pointer, s2 = t2.key, u2 = t2.selection, c2 = t2.searchResultItems, l2 = t2.onUpdateKey, f2 = t2.context; return e22.$$set = function(e23) { "path" in e23 && n2(9, o2 = e23.path), "pointer" in e23 && n2(10, a2 = e23.pointer), "key" in e23 && n2(0, s2 = e23.key), "selection" in e23 && n2(11, u2 = e23.selection), "searchResultItems" in e23 && n2(1, c2 = e23.searchResultItems), "onUpdateKey" in e23 && n2(12, l2 = e23.onUpdateKey), "context" in e23 && n2(2, f2 = e23.context); }, e22.$$.update = function() { 3072 & e22.$$.dirty && n2(3, r2 = u2 ? u2.pointersMap[a2] === true && Xq(u2) : void 0), 2056 & e22.$$.dirty && n2(4, i2 = r2 && jF(u2)); }, [s2, c2, f2, r2, i2, function(e23) { i2 || f2.readOnly || (e23.preventDefault(), f2.onSelect(mF(o2, true))); }, function(e23) { return IV("jse-key", { "jse-empty": e23 === "" }); }, function(e23, t3) { var n3 = l2(s2, f2.normalization.unescapeValue(e23)), r3 = Yp(o2).concat(n3); f2.onSelect(t3 === ss ? gF(r3, false) : mF(r3, false)), t3 !== as && f2.focus(); }, function() { f2.onSelect(mF(o2, false)), f2.focus(); }, o2, a2, u2, l2]; } var vH = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, dH, hH, Ki, { path: 9, pointer: 10, key: 0, selection: 11, searchResultItems: 1, onUpdateKey: 12, context: 2 }, aH), r2; } return zi(n2); }(); function pH(e22, t2, n2) { var r2 = e22.slice(); return r2[9] = t2[n2], r2; } function mH(e22) { var t2, n2, r2, i2 = [e22[9].props], o2 = e22[9].component; function a2(e23) { for (var t3 = {}, n3 = 0; n3 < i2.length; n3 += 1) t3 = Fi(t3, i2[n3]); return { props: t3 }; } return o2 && (t2 = new o2(a2())), { c: function() { t2 && Aa(t2.$$.fragment), n2 = wo(); }, m: function(e23, i3) { t2 && Ma(t2, e23, i3), vo(e23, n2, i3), r2 = true; }, p: function(e23, r3) { var s2 = 1 & r3 ? _a(i2, [$a(e23[9].props)]) : {}; if (o2 !== (o2 = e23[9].component)) { if (t2) { ma(); var u2 = t2; ba(u2.$$.fragment, 1, 0, function() { Ea(u2, 1); }), ga(); } o2 ? (Aa((t2 = new o2(a2())).$$.fragment), ya(t2.$$.fragment, 1), Ma(t2, n2.parentNode, n2)) : t2 = null; } else o2 && t2.$set(s2); }, i: function(e23) { r2 || (t2 && ya(t2.$$.fragment, e23), r2 = true); }, o: function(e23) { t2 && ba(t2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(n2), t2 && Ea(t2, e23); } }; } function gH(e22) { for (var t2, n2, r2 = e22[0], i2 = [], o2 = 0; o2 < r2.length; o2 += 1) i2[o2] = mH(pH(e22, r2, o2)); var a2 = function(e23) { return ba(i2[e23], 1, 1, function() { i2[e23] = null; }); }; return { c: function() { for (var e23 = 0; e23 < i2.length; e23 += 1) i2[e23].c(); t2 = wo(); }, m: function(e23, r3) { for (var o3 = 0; o3 < i2.length; o3 += 1) i2[o3].m(e23, r3); vo(e23, t2, r3), n2 = true; }, p: function(e23, n3) { var o3 = ki(n3, 1)[0]; if (1 & o3) { var s2; for (r2 = e23[0], s2 = 0; s2 < r2.length; s2 += 1) { var u2 = pH(e23, r2, s2); i2[s2] ? (i2[s2].p(u2, o3), ya(i2[s2], 1)) : (i2[s2] = mH(u2), i2[s2].c(), ya(i2[s2], 1), i2[s2].m(t2.parentNode, t2)); } for (ma(), s2 = r2.length; s2 < i2.length; s2 += 1) a2(s2); ga(); } }, i: function(e23) { if (!n2) { for (var t3 = 0; t3 < r2.length; t3 += 1) ya(i2[t3]); n2 = true; } }, o: function(e23) { i2 = i2.filter(Boolean); for (var t3 = 0; t3 < i2.length; t3 += 1) ba(i2[t3]); n2 = false; }, d: function(e23) { mo(i2, e23), e23 && po(t2); } }; } function yH(e22, t2, n2) { var r2, i2, o2 = t2.path, a2 = t2.value, s2 = t2.context, u2 = t2.isSelected, c2 = t2.enforceString, l2 = t2.selection, f2 = t2.searchResultItems; return e22.$$set = function(e23) { "path" in e23 && n2(1, o2 = e23.path), "value" in e23 && n2(2, a2 = e23.value), "context" in e23 && n2(3, s2 = e23.context), "isSelected" in e23 && n2(4, u2 = e23.isSelected), "enforceString" in e23 && n2(5, c2 = e23.enforceString), "selection" in e23 && n2(6, l2 = e23.selection), "searchResultItems" in e23 && n2(7, f2 = e23.searchResultItems); }, e22.$$.update = function() { 72 & e22.$$.dirty && n2(8, r2 = !s2.readOnly && eF(l2) && jF(l2)), 510 & e22.$$.dirty && n2(0, i2 = s2.onRenderValue({ path: o2, value: a2, readOnly: s2.readOnly, enforceString: c2, isSelected: u2, isEditing: r2, normalization: s2.normalization, selection: l2, searchResultItems: f2, onPatch: s2.onPatch, onPasteJson: s2.onPasteJson, onSelect: s2.onSelect, onFind: s2.onFind, focus: s2.focus })); }, [i2, o2, a2, s2, u2, c2, l2, f2, r2]; } var bH = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, yH, gH, Ki, { path: 1, value: 2, context: 3, isSelected: 4, enforceString: 5, selection: 6, searchResultItems: 7 }), r2; } return zi(n2); }(), kH = { selecting: false, selectionAnchor: null, selectionAnchorType: null, selectionFocus: null, dragging: false }; function wH(e22) { var t2 = e22.json, n2 = e22.documentState, r2 = e22.deltaY, i2 = e22.items, o2 = n2.selection, a2 = r2 < 0 ? function(e23) { var t3 = e23.items, n3 = e23.selection, r3 = e23.deltaY, i3 = rF(n3), o3 = t3.findIndex(function(e24) { return jm(e24.path, i3); }), a3 = function() { var e24; return (e24 = t3[s3 - 1]) === null || e24 === void 0 ? void 0 : e24.height; }, s3 = o3, u3 = 0; for (; a3() !== void 0 && Math.abs(r3) > u3 + a3() / 2; ) u3 += a3(), s3 -= 1; var c3 = t3[s3].path, l2 = s3 - o3; return s3 !== o3 && t3[s3] !== void 0 ? { beforePath: c3, offset: l2 } : void 0; }({ json: t2, selection: o2, deltaY: r2, items: i2 }) : function(e23) { var t3, n3 = e23.json, r3 = e23.items, i3 = e23.selection, o3 = e23.deltaY, a3 = iF(i3), s3 = r3.findIndex(function(e24) { return jm(e24.path, a3); }), u3 = 0, c3 = s3, l2 = function() { var e24; return (e24 = r3[c3 + 1]) === null || e24 === void 0 ? void 0 : e24.height; }; for (; l2() !== void 0 && Math.abs(o3) > u3 + l2() / 2; ) u3 += l2(), c3 += 1; var f2 = Yp(a3), h2 = fs.exports.getIn(n3, f2), d2 = Array.isArray(h2), v2 = (t3 = r3[d2 ? c3 : c3 + 1]) === null || t3 === void 0 ? void 0 : t3.path, p2 = c3 - s3; return v2 ? { beforePath: v2, offset: p2 } : { append: true, offset: p2 }; }({ json: t2, selection: o2, deltaY: r2, items: i2 }); if (!a2 || a2.offset === 0) return { operations: void 0, updatedSelection: void 0, offset: 0 }; var s2 = function(e23, t3, n3) { var r3 = n3.beforePath, i3 = n3.append, o3 = Yp(t3.focusPath), a3 = fs.exports.getIn(e23, o3); if (!(i3 || r3 && vF(r3, o3) && r3.length > o3.length)) return []; var s3 = rF(t3), u3 = iF(t3), c3 = kv(s3), l2 = kv(u3), f2 = r3 ? r3[o3.length] : void 0; if (!Kw(a3)) { if (Gw(a3)) { var h2 = Uw(c3), d2 = Uw(l2), v2 = f2 !== void 0 ? Uw(f2) : a3.length; return pk(d2 - h2 + 1, v2 < h2 ? function(e24) { return { op: "move", from: fs.exports.compileJSONPointer(o3.concat(String(h2 + e24))), path: fs.exports.compileJSONPointer(o3.concat(String(v2 + e24))) }; } : function() { return { op: "move", from: fs.exports.compileJSONPointer(o3.concat(String(h2))), path: fs.exports.compileJSONPointer(o3.concat(String(v2))) }; }); } throw new Error("Cannot create move operations: parent must be an Object or Array"); } var p2 = Object.keys(a3), m2 = p2.indexOf(c3), g2 = p2.indexOf(l2), y2 = i3 ? p2.length : p2.indexOf(f2); return m2 !== -1 && g2 !== -1 && y2 !== -1 ? y2 > m2 ? [].concat(Ni(p2.slice(m2, g2 + 1)), Ni(p2.slice(y2, p2.length))).map(function(e24) { return NF(o3, e24); }) : [].concat(Ni(p2.slice(y2, m2)), Ni(p2.slice(g2 + 1, p2.length))).map(function(e24) { return NF(o3, e24); }) : void 0; }(t2, n2.selection, a2), u2 = Yp(rF(o2)), c2 = fs.exports.getIn(t2, u2); return Array.isArray(c2) ? { operations: s2, updatedSelection: function(e23) { var t3, n3, r3 = e23.items, i3 = e23.json, o3 = e23.selection, a3 = e23.offset, s3 = rF(o3), u3 = iF(o3), c3 = r3.findIndex(function(e24) { return jm(e24.path, s3); }), l2 = r3.findIndex(function(e24) { return jm(e24.path, u3); }), f2 = (t3 = r3[c3 + a3]) === null || t3 === void 0 ? void 0 : t3.path, h2 = (n3 = r3[l2 + a3]) === null || n3 === void 0 ? void 0 : n3.path; return kF(i3, f2, h2); }({ items: i2, json: t2, selection: o2, offset: a2.offset }), offset: a2.offset } : { operations: s2, updatedSelection: void 0, offset: a2.offset }; } function xH(e22, t2) { return function(e23, t3) { if (e23) { for (var n2 = {}, r2 = 0, i2 = Object.keys(e23); r2 < i2.length; r2++) { var o2 = i2[r2]; t3(o2, e23[o2]) && (n2[o2] = e23[o2]); } return Object.keys(n2).length > 0 ? n2 : void 0; } }(e22, function(e23) { return fs.exports.startsWithJSONPointer(e23, t2); }); } function jH(e22) { co(e22, "svelte-r4omvg", ".jse-tooltip.svelte-r4omvg{font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);border-radius:3px;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);white-space:nowrap;box-shadow:var(--jse-controls-box-shadow)}"); } function SH(e22) { var t2, n2; return { c: function() { t2 = go("div"), n2 = bo(e22[0]), So(t2, "class", "jse-tooltip svelte-r4omvg"); }, m: function(e23, r2) { vo(e23, t2, r2), uo(t2, n2); }, p: function(e23, t3) { 1 & ki(t3, 1)[0] && Ao(n2, e23[0]); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function CH(e22, t2, n2) { var r2 = t2.text; return e22.$$set = function(e23) { "text" in e23 && n2(0, r2 = e23.text); }, [r2]; } var _H = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, CH, SH, Ui, { text: 0 }, jH), r2; } return zi(n2); }(); function $H(e22, t2) { var n2, r2 = t2.text, i2 = t2.openAbsolutePopup, o2 = t2.closeAbsolutePopup; function a2() { n2 = i2(_H, { text: r2 }, { position: "top", width: 10 * r2.length, offsetTop: 3, anchor: e22, closeOnOuterClick: true }); } function s2() { o2(n2); } return e22.addEventListener("mouseenter", a2), e22.addEventListener("mouseleave", s2), { destroy: function() { e22.removeEventListener("mouseenter", a2), e22.removeEventListener("mouseleave", s2); } }; } function OH(e22) { co(e22, "svelte-1q62mys", "button.jse-validation-error.svelte-1q62mys{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;color:var(--jse-warning-color);padding:0 5px;margin:0;font-size:var(--jse-font-size-mono);height:var(--jse-line-height);overflow:hidden}"); } function AH(e22) { var t2, n2, r2, i2, o2, a2; return n2 = new tS({ props: { data: Cj } }), { c: function() { t2 = go("button"), Aa(n2.$$.fragment), So(t2, "type", "button"), So(t2, "class", "jse-validation-error svelte-1q62mys"); }, m: function(s2, u2) { vo(s2, t2, u2), Ma(n2, t2, null), i2 = true, o2 || (a2 = [xo(t2, "click", function() { Ji(e22[0]) && e22[0].apply(this, arguments); }), to(r2 = $H.call(null, t2, xi({ text: e22[1] }, e22[2])))], o2 = true); }, p: function(t3, n3) { var i3 = ki(n3, 1)[0]; e22 = t3, r2 && Ji(r2.update) && 2 & i3 && r2.update.call(null, xi({ text: e22[1] }, e22[2])); }, i: function(e23) { i2 || (ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), o2 = false, Wi(a2); } }; } function MH(e22, t2, n2) { var r2, i2 = Yo("absolute-popup"), o2 = t2.validationError, a2 = t2.onExpand; return e22.$$set = function(e23) { "validationError" in e23 && n2(3, o2 = e23.validationError), "onExpand" in e23 && n2(0, a2 = e23.onExpand); }, e22.$$.update = function() { 8 & e22.$$.dirty && n2(1, r2 = o2.isChildError ? "Contains invalid data" : o2.message); }, [a2, r2, i2, o2]; } var EH = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, MH, AH, Ui, { validationError: 3, onExpand: 0 }, OH), r2; } return zi(n2); }(); function PH(e22) { co(e22, "svelte-uj4yd7", ".jse-json-node.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7 .jse-context-menu-button,.jse-json-node.jse-root.svelte-uj4yd7>.jse-contents-outer.svelte-uj4yd7>.jse-contents.svelte-uj4yd7 .jse-context-menu-button{top:0;right:calc(-2px - var(--jse-context-menu-button-size))}.jse-json-node.jse-root.svelte-uj4yd7>.jse-contents-outer.svelte-uj4yd7>.jse-contents.svelte-uj4yd7.svelte-uj4yd7{padding-left:0}.jse-json-node.jse-hovered.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-meta.svelte-uj4yd7,.jse-json-node.jse-hovered.svelte-uj4yd7 .jse-props .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-hovered.svelte-uj4yd7 .jse-items .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-hovered.svelte-uj4yd7 .jse-props .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-hovered.svelte-uj4yd7 .jse-items .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-hovered.svelte-uj4yd7 .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{background:var(--jse-hover-background-color)}.jse-json-node.svelte-uj4yd7 .jse-props.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.svelte-uj4yd7 .jse-items.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{position:relative}.jse-json-node.svelte-uj4yd7 .jse-header-outer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.svelte-uj4yd7 .jse-footer-outer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{display:flex}.jse-json-node.svelte-uj4yd7 .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{position:relative}.jse-json-node.svelte-uj4yd7 .jse-header .jse-meta.svelte-uj4yd7>.jse-meta-inner.svelte-uj4yd7.svelte-uj4yd7{display:flex;justify-content:center}.jse-json-node.svelte-uj4yd7 .jse-contents-outer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{display:flex}.jse-json-node.svelte-uj4yd7 .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.svelte-uj4yd7 .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{display:flex;flex-direction:row}.jse-json-node.svelte-uj4yd7 .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-uj4yd7 .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-uj4yd7 .jse-insert-selection-area.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-uj4yd7 .jse-insert-selection-area.jse-inside.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{display:inline-flex;align-items:center}.jse-json-node.svelte-uj4yd7 .jse-insert-selection-area.jse-after.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{display:flex;align-items:flex-end}.jse-json-node.svelte-uj4yd7:hover>.jse-contents-outer .jse-insert-selection-area.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7:not(.jse-selected),.jse-json-node.svelte-uj4yd7 .jse-header-outer.svelte-uj4yd7:hover>.jse-insert-selection-area.svelte-uj4yd7.svelte-uj4yd7:not(.jse-selected),.jse-json-node.svelte-uj4yd7 .jse-footer-outer:hover .jse-insert-selection-area.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7:not(.jse-selected){visibility:visible;z-index:1}.jse-json-node.svelte-uj4yd7 .jse-context-menu-button-anchor.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{position:relative}.jse-json-node.svelte-uj4yd7 .jse-insert-area.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{display:flex;position:relative;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-uj4yd7 .jse-insert-area.svelte-uj4yd7 .jse-context-menu-button{right:-1px;background:var(--jse-selection-background-color)}.jse-json-node.svelte-uj4yd7 .jse-insert-area.jse-hovered.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{outline-color:var(--jse-selection-background-color)}.jse-json-node.jse-selected.svelte-uj4yd7 .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected.svelte-uj4yd7 .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected.svelte-uj4yd7 .jse-meta.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected.svelte-uj4yd7 .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected.svelte-uj4yd7 .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected.svelte-uj4yd7 .jse-value{background:var(--jse-selection-background-color) !important;cursor:grab}.jse-json-node.jse-selected.svelte-uj4yd7 .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{cursor:pointer}.jse-json-node.jse-selected-key.svelte-uj4yd7>.jse-contents-outer.svelte-uj4yd7>.jse-contents.svelte-uj4yd7>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:grab}.jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-contents-outer.svelte-uj4yd7>.jse-contents.svelte-uj4yd7>.jse-value{background:var(--jse-selection-background-color);cursor:grab}.jse-json-node.svelte-uj4yd7 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-uj4yd7 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-collapsed-items{background-color:var(--jse-selection-background-color);cursor:grab;background-image:linear-gradient(var(--jse-collapsed-items-selected-background-color), var(--jse-collapsed-items-selected-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%)}.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-meta.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-meta.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-footer-outer.svelte-uj4yd7>.jse-footer.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{background:var(--jse-selection-background-color) !important}.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-meta.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-meta.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-meta.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-meta.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-footer-outer.svelte-uj4yd7>.jse-footer.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-footer-outer.svelte-uj4yd7>.jse-footer.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-contents.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-contents.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-header.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-header.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-footer.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-footer.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-expand.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-expand.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-contents.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-contents.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-header.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-header.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-footer.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-footer.svelte-uj4yd7 .jse-value,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-expand.svelte-uj4yd7 .jse-key,.jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-expand.svelte-uj4yd7 .jse-value{background:var(--jse-selection-background-color);cursor:grab}.jse-json-node.svelte-uj4yd7 .jse-insert-area.jse-selected.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{z-index:2;outline-color:var(--jse-context-menu-button-background)}.jse-json-node.svelte-uj4yd7 .jse-insert-area.jse-selected.svelte-uj4yd7 .jse-context-menu-button{background:var(--jse-context-menu-button-background)}.jse-json-node.svelte-uj4yd7 .jse-insert-area.jse-selected.svelte-uj4yd7 .jse-context-menu-button:hover{background:var(--jse-context-menu-button-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-meta.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-value{background:var(--jse-selection-background-light-color) !important;cursor:grab}.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{cursor:pointer}.jse-main:not(.jse-focus) .jse-json-node.jse-selected-key.svelte-uj4yd7>.jse-contents-outer.svelte-uj4yd7>.jse-contents.svelte-uj4yd7>.jse-identifier>.jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-key.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-identifier>.jse-key{background:var(--jse-selection-background-light-color);cursor:grab}.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-contents-outer.svelte-uj4yd7>.jse-contents.svelte-uj4yd7>.jse-value{background:var(--jse-selection-background-light-color);cursor:grab}.jse-main:not(.jse-focus) .jse-json-node.svelte-uj4yd7 .jse-collapsed-items.jse-selected,.jse-main:not(.jse-focus) .jse-json-node.jse-selected.svelte-uj4yd7 .jse-collapsed-items,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-collapsed-items{background-color:var(--jse-selection-background-light-color);cursor:grab;background-image:linear-gradient(var(--jse-collapsed-items-selected-background-color), var(--jse-collapsed-items-selected-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-selected-background-color) 50.5%)}.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-meta.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-meta.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-footer-outer.svelte-uj4yd7>.jse-footer.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-contents.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-header.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-footer.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{background:var(--jse-selection-background-light-color) !important}.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-meta.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-meta.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-meta.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-header-outer.svelte-uj4yd7>.jse-header.svelte-uj4yd7>.jse-meta.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-footer-outer.svelte-uj4yd7>.jse-footer.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7>.jse-footer-outer.svelte-uj4yd7>.jse-footer.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-contents.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-contents.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-header.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-header.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-footer.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-footer.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-expand.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-props .jse-expand.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-contents.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-contents.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-header.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-header.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-footer.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-footer.svelte-uj4yd7 .jse-value,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-expand.svelte-uj4yd7 .jse-key,.jse-main:not(.jse-focus) .jse-json-node.jse-selected-value.svelte-uj4yd7 .jse-items .jse-expand.svelte-uj4yd7 .jse-value{background:var(--jse-selection-background-light-color);cursor:grab}.jse-main:not(.jse-focus) .jse-json-node.svelte-uj4yd7 .jse-insert-area.jse-selected.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{z-index:2;outline-color:var(--jse-selection-background-color)}.jse-main:not(.jse-focus) .jse-json-node.svelte-uj4yd7 .jse-insert-area.jse-selected.svelte-uj4yd7 .jse-context-menu-button{background:var(--jse-selection-background-color)}.jse-main:not(.jse-focus) .jse-json-node.svelte-uj4yd7 .jse-insert-area.jse-selected.svelte-uj4yd7 .jse-context-menu-button:hover{background:var(--jse-selection-background-color)}.jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7:hover{opacity:0.8}.jse-meta.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-separator.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-index.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7,.jse-bracket.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{padding:0 2px}.jse-bracket.jse-expanded.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{padding-right:var(--jse-padding)}.jse-tag.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;position:relative;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{opacity:0.7;cursor:inherit}.jse-identifier.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7.svelte-uj4yd7{vertical-align:top;position:relative}"); } var NH = function(e22) { return {}; }, TH = function(e22) { return {}; }; function IH(e22, t2, n2) { var r2 = e22.slice(); return r2[54] = t2[n2], r2; } var RH = function(e22) { return {}; }, DH = function(e22) { return {}; }; function zH(e22, t2, n2) { var r2 = e22.slice(); return r2[48] = t2[n2], r2[50] = n2, r2; } function LH(e22, t2, n2) { var r2 = e22.slice(); return r2[51] = t2[n2], r2; } var BH = function(e22) { return {}; }, qH = function(e22) { return {}; }; function FH(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2 = !e22[8].readOnly && e22[16] && e22[7] && (eF(e22[7]) || tF(e22[7])) && !e22[7].edit && jm(e22[7].focusPath, e22[1]), f2 = e22[35].identifier, h2 = Gi(f2, e22, e22[36], TH), d2 = !e22[17] && WH(); o2 = new bH({ props: { path: e22[1], value: e22[0], enforceString: e22[13], isSelected: e22[16], selection: e22[16] ? e22[7] : void 0, searchResultItems: UF(e22[6], e22[9]), context: e22[8] } }); var v2 = l2 && JH(e22), p2 = e22[15] && UH(e22), m2 = !e22[17] && KH(e22); return { c: function() { t2 = go("div"), n2 = go("div"), h2 && h2.c(), r2 = ko(), d2 && d2.c(), i2 = ko(), Aa(o2.$$.fragment), a2 = ko(), v2 && v2.c(), s2 = ko(), p2 && p2.c(), u2 = ko(), m2 && m2.c(), So(n2, "class", "jse-contents svelte-uj4yd7"), So(t2, "class", "jse-contents-outer svelte-uj4yd7"), So(t2, "style", e22[18]); }, m: function(e23, l3) { vo(e23, t2, l3), uo(t2, n2), h2 && h2.m(n2, null), uo(n2, r2), d2 && d2.m(n2, null), uo(n2, i2), Ma(o2, n2, null), uo(n2, a2), v2 && v2.m(n2, null), uo(t2, s2), p2 && p2.m(t2, null), uo(t2, u2), m2 && m2.m(t2, null), c2 = true; }, p: function(e23, r3) { h2 && h2.p && (!c2 || 32 & r3[1]) && Zi(h2, f2, e23, e23[36], c2 ? Yi(f2, e23[36], r3, NH) : Xi(e23[36]), TH), e23[17] ? d2 && (d2.d(1), d2 = null) : d2 || ((d2 = WH()).c(), d2.m(n2, i2)); var a3 = {}; 2 & r3[0] && (a3.path = e23[1]), 1 & r3[0] && (a3.value = e23[0]), 8192 & r3[0] && (a3.enforceString = e23[13]), 65536 & r3[0] && (a3.isSelected = e23[16]), 65664 & r3[0] && (a3.selection = e23[16] ? e23[7] : void 0), 576 & r3[0] && (a3.searchResultItems = UF(e23[6], e23[9])), 256 & r3[0] && (a3.context = e23[8]), o2.$set(a3), 65922 & r3[0] && (l2 = !e23[8].readOnly && e23[16] && e23[7] && (eF(e23[7]) || tF(e23[7])) && !e23[7].edit && jm(e23[7].focusPath, e23[1])), l2 ? v2 ? (v2.p(e23, r3), 65922 & r3[0] && ya(v2, 1)) : ((v2 = JH(e23)).c(), ya(v2, 1), v2.m(n2, null)) : v2 && (ma(), ba(v2, 1, 1, function() { v2 = null; }), ga()), e23[15] ? p2 ? (p2.p(e23, r3), 32768 & r3[0] && ya(p2, 1)) : ((p2 = UH(e23)).c(), ya(p2, 1), p2.m(t2, u2)) : p2 && (ma(), ba(p2, 1, 1, function() { p2 = null; }), ga()), e23[17] ? m2 && (m2.d(1), m2 = null) : m2 ? m2.p(e23, r3) : ((m2 = KH(e23)).c(), m2.m(t2, null)), (!c2 || 262144 & r3[0]) && So(t2, "style", e23[18]); }, i: function(e23) { c2 || (ya(h2, e23), ya(o2.$$.fragment, e23), ya(v2), ya(p2), c2 = true); }, o: function(e23) { ba(h2, e23), ba(o2.$$.fragment, e23), ba(v2), ba(p2), c2 = false; }, d: function(e23) { e23 && po(t2), h2 && h2.d(e23), d2 && d2.d(), Ea(o2), v2 && v2.d(), p2 && p2.d(), m2 && m2.d(); } }; } function VH(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2, b2 = !e22[8].readOnly && e22[16] && e22[7] && (eF(e22[7]) || tF(e22[7])) && !e22[7].edit && jm(e22[7].focusPath, e22[1]), k2 = [QH, GH], w2 = []; function x2(e23, t3) { return e23[12] ? 0 : 1; } i2 = x2(e22), o2 = w2[i2] = k2[i2](e22); var j2 = e22[35].identifier, S2 = Gi(j2, e22, e22[36], DH), C2 = !e22[17] && YH(); function _2(e23, t3) { return e23[12] ? XH : ZH; } var $2 = _2(e22), O2 = $2(e22), A2 = b2 && eW(e22), M2 = e22[15] && (!e22[12] || !e22[15].isChildError) && tW(e22); function E2(e23, t3) { return e23[12] ? rW : e23[17] ? void 0 : nW; } var P2 = E2(e22), N2 = P2 && P2(e22), T2 = e22[12] && iW(e22); return { c: function() { t2 = go("div"), n2 = go("div"), r2 = go("button"), o2.c(), a2 = ko(), S2 && S2.c(), s2 = ko(), C2 && C2.c(), u2 = ko(), c2 = go("div"), l2 = go("div"), O2.c(), f2 = ko(), A2 && A2.c(), h2 = ko(), M2 && M2.c(), d2 = ko(), N2 && N2.c(), v2 = ko(), T2 && T2.c(), p2 = wo(), So(r2, "type", "button"), So(r2, "class", "jse-expand svelte-uj4yd7"), So(r2, "title", "Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"), So(l2, "class", "jse-meta-inner svelte-uj4yd7"), So(c2, "class", "jse-meta svelte-uj4yd7"), So(c2, "data-type", "selectable-value"), So(n2, "class", "jse-header svelte-uj4yd7"), So(t2, "class", "jse-header-outer svelte-uj4yd7"), So(t2, "style", e22[18]); }, m: function(o3, b3) { vo(o3, t2, b3), uo(t2, n2), uo(n2, r2), w2[i2].m(r2, null), uo(n2, a2), S2 && S2.m(n2, null), uo(n2, s2), C2 && C2.m(n2, null), uo(n2, u2), uo(n2, c2), uo(c2, l2), O2.m(l2, null), uo(n2, f2), A2 && A2.m(n2, null), uo(t2, h2), M2 && M2.m(t2, null), uo(t2, d2), N2 && N2.m(t2, null), vo(o3, v2, b3), T2 && T2.m(o3, b3), vo(o3, p2, b3), m2 = true, g2 || (y2 = xo(r2, "click", e22[22]), g2 = true); }, p: function(e23, a3) { var s3 = i2; (i2 = x2(e23)) === s3 ? w2[i2].p(e23, a3) : (ma(), ba(w2[s3], 1, 1, function() { w2[s3] = null; }), ga(), (o2 = w2[i2]) ? o2.p(e23, a3) : (o2 = w2[i2] = k2[i2](e23)).c(), ya(o2, 1), o2.m(r2, null)), S2 && S2.p && (!m2 || 32 & a3[1]) && Zi(S2, j2, e23, e23[36], m2 ? Yi(j2, e23[36], a3, RH) : Xi(e23[36]), DH), e23[17] ? C2 && (C2.d(1), C2 = null) : C2 || ((C2 = YH()).c(), C2.m(n2, u2)), $2 === ($2 = _2(e23)) && O2 ? O2.p(e23, a3) : (O2.d(1), (O2 = $2(e23)) && (O2.c(), O2.m(l2, null))), 65922 & a3[0] && (b2 = !e23[8].readOnly && e23[16] && e23[7] && (eF(e23[7]) || tF(e23[7])) && !e23[7].edit && jm(e23[7].focusPath, e23[1])), b2 ? A2 ? (A2.p(e23, a3), 65922 & a3[0] && ya(A2, 1)) : ((A2 = eW(e23)).c(), ya(A2, 1), A2.m(n2, null)) : A2 && (ma(), ba(A2, 1, 1, function() { A2 = null; }), ga()), !e23[15] || e23[12] && e23[15].isChildError ? M2 && (ma(), ba(M2, 1, 1, function() { M2 = null; }), ga()) : M2 ? (M2.p(e23, a3), 36864 & a3[0] && ya(M2, 1)) : ((M2 = tW(e23)).c(), ya(M2, 1), M2.m(t2, d2)), P2 === (P2 = E2(e23)) && N2 ? N2.p(e23, a3) : (N2 && N2.d(1), (N2 = P2 && P2(e23)) && (N2.c(), N2.m(t2, null))), (!m2 || 262144 & a3[0]) && So(t2, "style", e23[18]), e23[12] ? T2 ? (T2.p(e23, a3), 4096 & a3[0] && ya(T2, 1)) : ((T2 = iW(e23)).c(), ya(T2, 1), T2.m(p2.parentNode, p2)) : T2 && (ma(), ba(T2, 1, 1, function() { T2 = null; }), ga()); }, i: function(e23) { m2 || (ya(o2), ya(S2, e23), ya(A2), ya(M2), ya(T2), m2 = true); }, o: function(e23) { ba(o2), ba(S2, e23), ba(A2), ba(M2), ba(T2), m2 = false; }, d: function(e23) { e23 && po(t2), w2[i2].d(), S2 && S2.d(e23), C2 && C2.d(), O2.d(), A2 && A2.d(), M2 && M2.d(), N2 && N2.d(), e23 && po(v2), T2 && T2.d(e23), e23 && po(p2), g2 = false, y2(); } }; } function HH(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2, b2 = !e22[8].readOnly && e22[16] && e22[7] && (eF(e22[7]) || tF(e22[7])) && !e22[7].edit && jm(e22[7].focusPath, e22[1]), k2 = [lW, cW], w2 = []; function x2(e23, t3) { return e23[12] ? 0 : 1; } i2 = x2(e22), o2 = w2[i2] = k2[i2](e22); var j2 = e22[35].identifier, S2 = Gi(j2, e22, e22[36], qH), C2 = !e22[17] && fW(); function _2(e23, t3) { return e23[12] ? dW : hW; } var $2 = _2(e22), O2 = $2(e22), A2 = b2 && vW(e22), M2 = e22[15] && (!e22[12] || !e22[15].isChildError) && pW(e22); function E2(e23, t3) { return e23[12] ? gW : mW; } var P2 = E2(e22), N2 = P2(e22), T2 = e22[12] && yW(e22); return { c: function() { t2 = go("div"), n2 = go("div"), r2 = go("button"), o2.c(), a2 = ko(), S2 && S2.c(), s2 = ko(), C2 && C2.c(), u2 = ko(), c2 = go("div"), l2 = go("div"), O2.c(), f2 = ko(), A2 && A2.c(), h2 = ko(), M2 && M2.c(), d2 = ko(), N2.c(), v2 = ko(), T2 && T2.c(), p2 = wo(), So(r2, "type", "button"), So(r2, "class", "jse-expand svelte-uj4yd7"), So(r2, "title", "Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"), So(l2, "class", "jse-meta-inner svelte-uj4yd7"), So(l2, "data-type", "selectable-value"), So(c2, "class", "jse-meta svelte-uj4yd7"), So(n2, "class", "jse-header svelte-uj4yd7"), So(t2, "class", "jse-header-outer svelte-uj4yd7"), So(t2, "style", e22[18]); }, m: function(o3, b3) { vo(o3, t2, b3), uo(t2, n2), uo(n2, r2), w2[i2].m(r2, null), uo(n2, a2), S2 && S2.m(n2, null), uo(n2, s2), C2 && C2.m(n2, null), uo(n2, u2), uo(n2, c2), uo(c2, l2), O2.m(l2, null), uo(n2, f2), A2 && A2.m(n2, null), uo(t2, h2), M2 && M2.m(t2, null), uo(t2, d2), N2.m(t2, null), vo(o3, v2, b3), T2 && T2.m(o3, b3), vo(o3, p2, b3), m2 = true, g2 || (y2 = xo(r2, "click", e22[22]), g2 = true); }, p: function(e23, a3) { var s3 = i2; (i2 = x2(e23)) === s3 ? w2[i2].p(e23, a3) : (ma(), ba(w2[s3], 1, 1, function() { w2[s3] = null; }), ga(), (o2 = w2[i2]) ? o2.p(e23, a3) : (o2 = w2[i2] = k2[i2](e23)).c(), ya(o2, 1), o2.m(r2, null)), S2 && S2.p && (!m2 || 32 & a3[1]) && Zi(S2, j2, e23, e23[36], m2 ? Yi(j2, e23[36], a3, BH) : Xi(e23[36]), qH), e23[17] ? C2 && (C2.d(1), C2 = null) : C2 || ((C2 = fW()).c(), C2.m(n2, u2)), $2 === ($2 = _2(e23)) && O2 ? O2.p(e23, a3) : (O2.d(1), (O2 = $2(e23)) && (O2.c(), O2.m(l2, null))), 65922 & a3[0] && (b2 = !e23[8].readOnly && e23[16] && e23[7] && (eF(e23[7]) || tF(e23[7])) && !e23[7].edit && jm(e23[7].focusPath, e23[1])), b2 ? A2 ? (A2.p(e23, a3), 65922 & a3[0] && ya(A2, 1)) : ((A2 = vW(e23)).c(), ya(A2, 1), A2.m(n2, null)) : A2 && (ma(), ba(A2, 1, 1, function() { A2 = null; }), ga()), !e23[15] || e23[12] && e23[15].isChildError ? M2 && (ma(), ba(M2, 1, 1, function() { M2 = null; }), ga()) : M2 ? (M2.p(e23, a3), 36864 & a3[0] && ya(M2, 1)) : ((M2 = pW(e23)).c(), ya(M2, 1), M2.m(t2, d2)), P2 === (P2 = E2(e23)) && N2 ? N2.p(e23, a3) : (N2.d(1), (N2 = P2(e23)) && (N2.c(), N2.m(t2, null))), (!m2 || 262144 & a3[0]) && So(t2, "style", e23[18]), e23[12] ? T2 ? (T2.p(e23, a3), 4096 & a3[0] && ya(T2, 1)) : ((T2 = yW(e23)).c(), ya(T2, 1), T2.m(p2.parentNode, p2)) : T2 && (ma(), ba(T2, 1, 1, function() { T2 = null; }), ga()); }, i: function(e23) { m2 || (ya(o2), ya(S2, e23), ya(A2), ya(M2), ya(T2), m2 = true); }, o: function(e23) { ba(o2), ba(S2, e23), ba(A2), ba(M2), ba(T2), m2 = false; }, d: function(e23) { e23 && po(t2), w2[i2].d(), S2 && S2.d(e23), C2 && C2.d(), O2.d(), A2 && A2.d(), M2 && M2.d(), N2.d(), e23 && po(v2), T2 && T2.d(e23), e23 && po(p2), g2 = false, y2(); } }; } function WH(e22) { var t2; return { c: function() { (t2 = go("div")).textContent = ":", So(t2, "class", "jse-separator svelte-uj4yd7"); }, m: function(e23, n2) { vo(e23, t2, n2); }, d: function(e23) { e23 && po(t2); } }; } function JH(e22) { var t2, n2, r2; return n2 = new UV({ props: { selected: true, onContextMenu: e22[8].onContextMenu } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-context-menu-button-anchor svelte-uj4yd7"); }, m: function(e23, i2) { vo(e23, t2, i2), Ma(n2, t2, null), r2 = true; }, p: function(e23, t3) { var r3 = {}; 256 & t3[0] && (r3.onContextMenu = e23[8].onContextMenu), n2.$set(r3); }, i: function(e23) { r2 || (ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function UH(e22) { var t2, n2; return t2 = new EH({ props: { validationError: e22[15], onExpand: e22[23] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 32768 & n3[0] && (r2.validationError = e23[15]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function KH(e22) { var t2, n2, r2; return { c: function() { So(t2 = go("div"), "class", "jse-insert-selection-area jse-after svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-after"); }, m: function(i2, o2) { vo(i2, t2, o2), n2 || (r2 = xo(t2, "click", e22[31]), n2 = true); }, p: Bi, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function GH(e22) { var t2, n2; return t2 = new tS({ props: { data: sj } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: Bi, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function QH(e22) { var t2, n2; return t2 = new tS({ props: { data: aj } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: Bi, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function YH(e22) { var t2; return { c: function() { (t2 = go("div")).textContent = ":", So(t2, "class", "jse-separator svelte-uj4yd7"); }, m: function(e23, n2) { vo(e23, t2, n2); }, d: function(e23) { e23 && po(t2); } }; } function ZH(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2 = Object.keys(e22[0]).length + "", h2 = Object.keys(e22[0]).length === 1 ? "prop" : "props"; return { c: function() { (t2 = go("div")).textContent = "{", n2 = ko(), r2 = go("button"), i2 = bo(f2), o2 = ko(), a2 = bo(h2), s2 = ko(), (u2 = go("div")).textContent = "}", So(t2, "class", "jse-bracket svelte-uj4yd7"), So(r2, "type", "button"), So(r2, "class", "jse-tag svelte-uj4yd7"), So(u2, "class", "jse-bracket svelte-uj4yd7"); }, m: function(f3, h3) { vo(f3, t2, h3), vo(f3, n2, h3), vo(f3, r2, h3), uo(r2, i2), uo(r2, o2), uo(r2, a2), vo(f3, s2, h3), vo(f3, u2, h3), c2 || (l2 = xo(r2, "click", e22[23]), c2 = true); }, p: function(e23, t3) { 1 & t3[0] && f2 !== (f2 = Object.keys(e23[0]).length + "") && Ao(i2, f2), 1 & t3[0] && h2 !== (h2 = Object.keys(e23[0]).length === 1 ? "prop" : "props") && Ao(a2, h2); }, d: function(e23) { e23 && po(t2), e23 && po(n2), e23 && po(r2), e23 && po(s2), e23 && po(u2), c2 = false, l2(); } }; } function XH(e22) { var t2; return { c: function() { (t2 = go("div")).textContent = "{", So(t2, "class", "jse-bracket jse-expanded svelte-uj4yd7"); }, m: function(e23, n2) { vo(e23, t2, n2); }, p: Bi, d: function(e23) { e23 && po(t2); } }; } function eW(e22) { var t2, n2, r2; return n2 = new UV({ props: { selected: true, onContextMenu: e22[8].onContextMenu } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-context-menu-button-anchor svelte-uj4yd7"); }, m: function(e23, i2) { vo(e23, t2, i2), Ma(n2, t2, null), r2 = true; }, p: function(e23, t3) { var r3 = {}; 256 & t3[0] && (r3.onContextMenu = e23[8].onContextMenu), n2.$set(r3); }, i: function(e23) { r2 || (ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function tW(e22) { var t2, n2; return t2 = new EH({ props: { validationError: e22[15], onExpand: e22[23] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 32768 & n3[0] && (r2.validationError = e23[15]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function nW(e22) { var t2, n2, r2; return { c: function() { So(t2 = go("div"), "class", "jse-insert-selection-area jse-after svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-after"); }, m: function(i2, o2) { vo(i2, t2, o2), n2 || (r2 = xo(t2, "click", e22[31]), n2 = true); }, p: Bi, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function rW(e22) { var t2, n2, r2; return { c: function() { So(t2 = go("div"), "class", "jse-insert-selection-area jse-inside svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-inside"); }, m: function(i2, o2) { vo(i2, t2, o2), n2 || (r2 = xo(t2, "click", e22[30]), n2 = true); }, p: Bi, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function iW(e22) { for (var t2, n2, r2, i2, o2, a2, s2, u2 = !e22[8].readOnly && (e22[10] === "hover-insert-inside" || e22[16] && Zq(e22[7])), c2 = u2 && oW(e22), l2 = e22[20](e22[1], e22[0], e22[2], e22[3], e22[4], e22[5], e22[6], e22[7], e22[11]), f2 = [], h2 = 0; h2 < l2.length; h2 += 1) f2[h2] = sW(IH(e22, l2, h2)); var d2 = function(e23) { return ba(f2[e23], 1, 1, function() { f2[e23] = null; }); }, v2 = !e22[17] && uW(e22); return { c: function() { t2 = go("div"), c2 && c2.c(), n2 = ko(); for (var s3 = 0; s3 < f2.length; s3 += 1) f2[s3].c(); r2 = ko(), i2 = go("div"), (o2 = go("div")).innerHTML = '
}
', a2 = ko(), v2 && v2.c(), So(t2, "class", "jse-props svelte-uj4yd7"), So(o2, "data-type", "selectable-value"), So(o2, "class", "jse-footer svelte-uj4yd7"), So(i2, "class", "jse-footer-outer svelte-uj4yd7"), So(i2, "style", e22[18]); }, m: function(e23, u3) { vo(e23, t2, u3), c2 && c2.m(t2, null), uo(t2, n2); for (var l3 = 0; l3 < f2.length; l3 += 1) f2[l3].m(t2, null); vo(e23, r2, u3), vo(e23, i2, u3), uo(i2, o2), uo(i2, a2), v2 && v2.m(i2, null), s2 = true; }, p: function(e23, r3) { if (66944 & r3[0] && (u2 = !e23[8].readOnly && (e23[10] === "hover-insert-inside" || e23[16] && Zq(e23[7]))), u2 ? c2 ? (c2.p(e23, r3), 66944 & r3[0] && ya(c2, 1)) : ((c2 = oW(e23)).c(), ya(c2, 1), c2.m(t2, n2)) : c2 && (ma(), ba(c2, 1, 1, function() { c2 = null; }), ga()), 152046079 & r3[0]) { var o3; for (l2 = e23[20](e23[1], e23[0], e23[2], e23[3], e23[4], e23[5], e23[6], e23[7], e23[11]), o3 = 0; o3 < l2.length; o3 += 1) { var a3 = IH(e23, l2, o3); f2[o3] ? (f2[o3].p(a3, r3), ya(f2[o3], 1)) : (f2[o3] = sW(a3), f2[o3].c(), ya(f2[o3], 1), f2[o3].m(t2, null)); } for (ma(), o3 = l2.length; o3 < f2.length; o3 += 1) d2(o3); ga(); } e23[17] ? v2 && (v2.d(1), v2 = null) : v2 ? v2.p(e23, r3) : ((v2 = uW(e23)).c(), v2.m(i2, null)), (!s2 || 262144 & r3[0]) && So(i2, "style", e23[18]); }, i: function(e23) { if (!s2) { ya(c2); for (var t3 = 0; t3 < l2.length; t3 += 1) ya(f2[t3]); s2 = true; } }, o: function(e23) { ba(c2), f2 = f2.filter(Boolean); for (var t3 = 0; t3 < f2.length; t3 += 1) ba(f2[t3]); s2 = false; }, d: function(e23) { e23 && po(t2), c2 && c2.d(), mo(f2, e23), e23 && po(r2), e23 && po(i2), v2 && v2.d(); } }; } function oW(e22) { var t2, n2, r2, i2; return n2 = new UV({ props: { selected: e22[16] && Zq(e22[7]), onContextMenu: e22[32] } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-insert-area jse-inside svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-inside"), So(t2, "style", r2 = $W(e22[1].length + 1)), So(t2, "title", rs), To(t2, "jse-hovered", e22[10] === "hover-insert-inside"), To(t2, "jse-selected", e22[16] && Zq(e22[7])); }, m: function(e23, r3) { vo(e23, t2, r3), Ma(n2, t2, null), i2 = true; }, p: function(e23, o2) { var a2 = {}; 65664 & o2[0] && (a2.selected = e23[16] && Zq(e23[7])), n2.$set(a2), (!i2 || 2 & o2[0] && r2 !== (r2 = $W(e23[1].length + 1))) && So(t2, "style", r2), 1024 & o2[0] && To(t2, "jse-hovered", e23[10] === "hover-insert-inside"), 65664 & o2[0] && To(t2, "jse-selected", e23[16] && Zq(e23[7])); }, i: function(e23) { i2 || (ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function aW(e22) { var t2, n2, r2, i2; return n2 = new vH({ props: { path: e22[54].path, pointer: e22[54].pointer, key: e22[54].key, selection: e22[54].selection, searchResultItems: e22[54].keySearchResultItemsMap, context: e22[8], onUpdateKey: e22[24] } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), r2 = ko(), So(t2, "slot", "identifier"), So(t2, "class", "jse-identifier svelte-uj4yd7"); }, m: function(e23, o2) { vo(e23, t2, o2), Ma(n2, t2, null), uo(t2, r2), i2 = true; }, p: function(e23, t3) { var r3 = {}; 2303 & t3[0] && (r3.path = e23[54].path), 2303 & t3[0] && (r3.pointer = e23[54].pointer), 2303 & t3[0] && (r3.key = e23[54].key), 2303 & t3[0] && (r3.selection = e23[54].selection), 2303 & t3[0] && (r3.searchResultItems = e23[54].keySearchResultItemsMap), 256 & t3[0] && (r3.context = e23[8]), n2.$set(r3); }, i: function(e23) { i2 || (ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function sW(e22) { var t2, n2; return t2 = new AW({ props: { value: e22[54].value, path: e22[54].path, expandedMap: e22[54].expandedMap, enforceStringMap: e22[54].enforceStringMap, visibleSectionsMap: e22[54].visibleSectionsMap, validationErrorsMap: e22[54].validationErrorsMap, searchResultItemsMap: e22[54].valueSearchResultItemsMap, selection: e22[54].selection, context: e22[8], onDragSelectionStart: e22[27], $$slots: { identifier: [aW] }, $$scope: { ctx: e22 } } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 2303 & n3[0] && (r2.value = e23[54].value), 2303 & n3[0] && (r2.path = e23[54].path), 2303 & n3[0] && (r2.expandedMap = e23[54].expandedMap), 2303 & n3[0] && (r2.enforceStringMap = e23[54].enforceStringMap), 2303 & n3[0] && (r2.visibleSectionsMap = e23[54].visibleSectionsMap), 2303 & n3[0] && (r2.validationErrorsMap = e23[54].validationErrorsMap), 2303 & n3[0] && (r2.searchResultItemsMap = e23[54].valueSearchResultItemsMap), 2303 & n3[0] && (r2.selection = e23[54].selection), 256 & n3[0] && (r2.context = e23[8]), 2559 & n3[0] | 32 & n3[1] && (r2.$$scope = { dirty: n3, ctx: e23 }), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function uW(e22) { var t2, n2, r2; return { c: function() { So(t2 = go("div"), "class", "jse-insert-selection-area jse-after svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-after"); }, m: function(i2, o2) { vo(i2, t2, o2), n2 || (r2 = xo(t2, "click", e22[31]), n2 = true); }, p: Bi, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function cW(e22) { var t2, n2; return t2 = new tS({ props: { data: sj } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: Bi, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function lW(e22) { var t2, n2; return t2 = new tS({ props: { data: aj } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: Bi, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function fW(e22) { var t2; return { c: function() { (t2 = go("div")).textContent = ":", So(t2, "class", "jse-separator svelte-uj4yd7"); }, m: function(e23, n2) { vo(e23, t2, n2); }, d: function(e23) { e23 && po(t2); } }; } function hW(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2 = e22[0].length + "", h2 = e22[0].length === 1 ? "item" : "items"; return { c: function() { (t2 = go("div")).textContent = "[", n2 = ko(), r2 = go("button"), i2 = bo(f2), o2 = ko(), a2 = bo(h2), s2 = ko(), (u2 = go("div")).textContent = "]", So(t2, "class", "jse-bracket svelte-uj4yd7"), So(r2, "type", "button"), So(r2, "class", "jse-tag svelte-uj4yd7"), So(u2, "class", "jse-bracket svelte-uj4yd7"); }, m: function(f3, h3) { vo(f3, t2, h3), vo(f3, n2, h3), vo(f3, r2, h3), uo(r2, i2), uo(r2, o2), uo(r2, a2), vo(f3, s2, h3), vo(f3, u2, h3), c2 || (l2 = xo(r2, "click", e22[23]), c2 = true); }, p: function(e23, t3) { 1 & t3[0] && f2 !== (f2 = e23[0].length + "") && Ao(i2, f2), 1 & t3[0] && h2 !== (h2 = e23[0].length === 1 ? "item" : "items") && Ao(a2, h2); }, d: function(e23) { e23 && po(t2), e23 && po(n2), e23 && po(r2), e23 && po(s2), e23 && po(u2), c2 = false, l2(); } }; } function dW(e22) { var t2, n2, r2, i2, o2, a2, s2 = e22[0].length + "", u2 = e22[0].length === 1 ? "item" : "items"; return { c: function() { (t2 = go("div")).textContent = "[", n2 = ko(), r2 = go("span"), i2 = bo(s2), o2 = ko(), a2 = bo(u2), So(t2, "class", "jse-bracket svelte-uj4yd7"), So(r2, "class", "jse-tag jse-expanded svelte-uj4yd7"); }, m: function(e23, s3) { vo(e23, t2, s3), vo(e23, n2, s3), vo(e23, r2, s3), uo(r2, i2), uo(r2, o2), uo(r2, a2); }, p: function(e23, t3) { 1 & t3[0] && s2 !== (s2 = e23[0].length + "") && Ao(i2, s2), 1 & t3[0] && u2 !== (u2 = e23[0].length === 1 ? "item" : "items") && Ao(a2, u2); }, d: function(e23) { e23 && po(t2), e23 && po(n2), e23 && po(r2); } }; } function vW(e22) { var t2, n2, r2; return n2 = new UV({ props: { selected: true, onContextMenu: e22[8].onContextMenu } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-context-menu-button-anchor svelte-uj4yd7"); }, m: function(e23, i2) { vo(e23, t2, i2), Ma(n2, t2, null), r2 = true; }, p: function(e23, t3) { var r3 = {}; 256 & t3[0] && (r3.onContextMenu = e23[8].onContextMenu), n2.$set(r3); }, i: function(e23) { r2 || (ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function pW(e22) { var t2, n2; return t2 = new EH({ props: { validationError: e22[15], onExpand: e22[23] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 32768 & n3[0] && (r2.validationError = e23[15]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function mW(e22) { var t2, n2, r2; return { c: function() { So(t2 = go("div"), "class", "jse-insert-selection-area jse-after svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-after"); }, m: function(i2, o2) { vo(i2, t2, o2), n2 || (r2 = xo(t2, "click", e22[31]), n2 = true); }, p: Bi, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function gW(e22) { var t2, n2, r2; return { c: function() { So(t2 = go("div"), "class", "jse-insert-selection-area jse-inside svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-inside"); }, m: function(i2, o2) { vo(i2, t2, o2), n2 || (r2 = xo(t2, "click", e22[30]), n2 = true); }, p: Bi, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function yW(e22) { for (var t2, n2, r2, i2, o2, a2, s2, u2 = !e22[8].readOnly && (e22[10] === "hover-insert-inside" || e22[16] && Zq(e22[7])), c2 = [], l2 = /* @__PURE__ */ new Map(), f2 = u2 && bW(e22), h2 = e22[14] || Xa, d2 = function(e23) { return e23[50]; }, v2 = 0; v2 < h2.length; v2 += 1) { var p2 = zH(e22, h2, v2), m2 = d2(p2); l2.set(m2, c2[v2] = jW(m2, p2)); } var g2 = !e22[17] && SW(e22); return { c: function() { t2 = go("div"), f2 && f2.c(), n2 = ko(); for (var s3 = 0; s3 < c2.length; s3 += 1) c2[s3].c(); r2 = ko(), i2 = go("div"), (o2 = go("div")).innerHTML = ']', a2 = ko(), g2 && g2.c(), So(t2, "class", "jse-items svelte-uj4yd7"), So(o2, "data-type", "selectable-value"), So(o2, "class", "jse-footer svelte-uj4yd7"), So(i2, "class", "jse-footer-outer svelte-uj4yd7"), So(i2, "style", e22[18]); }, m: function(e23, u3) { vo(e23, t2, u3), f2 && f2.m(t2, null), uo(t2, n2); for (var l3 = 0; l3 < c2.length; l3 += 1) c2[l3].m(t2, null); vo(e23, r2, u3), vo(e23, i2, u3), uo(i2, o2), uo(i2, a2), g2 && g2.m(i2, null), s2 = true; }, p: function(e23, r3) { 66944 & r3[0] && (u2 = !e23[8].readOnly && (e23[10] === "hover-insert-inside" || e23[16] && Zq(e23[7]))), u2 ? f2 ? (f2.p(e23, r3), 66944 & r3[0] && ya(f2, 1)) : ((f2 = bW(e23)).c(), ya(f2, 1), f2.m(t2, n2)) : f2 && (ma(), ba(f2, 1, 1, function() { f2 = null; }), ga()), 136334335 & r3[0] && (h2 = e23[14] || Xa, ma(), c2 = Ca(c2, r3, d2, 1, e23, h2, l2, t2, Sa, jW, null, zH), ga()), e23[17] ? g2 && (g2.d(1), g2 = null) : g2 ? g2.p(e23, r3) : ((g2 = SW(e23)).c(), g2.m(i2, null)), (!s2 || 262144 & r3[0]) && So(i2, "style", e23[18]); }, i: function(e23) { if (!s2) { ya(f2); for (var t3 = 0; t3 < h2.length; t3 += 1) ya(c2[t3]); s2 = true; } }, o: function(e23) { ba(f2); for (var t3 = 0; t3 < c2.length; t3 += 1) ba(c2[t3]); s2 = false; }, d: function(e23) { e23 && po(t2), f2 && f2.d(); for (var n3 = 0; n3 < c2.length; n3 += 1) c2[n3].d(); e23 && po(r2), e23 && po(i2), g2 && g2.d(); } }; } function bW(e22) { var t2, n2, r2, i2; return n2 = new UV({ props: { selected: e22[16] && Zq(e22[7]), onContextMenu: e22[32] } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-insert-area jse-inside svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-inside"), So(t2, "style", r2 = $W(e22[1].length + 1)), So(t2, "title", rs), To(t2, "jse-hovered", e22[10] === "hover-insert-inside"), To(t2, "jse-selected", e22[16] && Zq(e22[7])); }, m: function(e23, r3) { vo(e23, t2, r3), Ma(n2, t2, null), i2 = true; }, p: function(e23, o2) { var a2 = {}; 65664 & o2[0] && (a2.selected = e23[16] && Zq(e23[7])), n2.$set(a2), (!i2 || 2 & o2[0] && r2 !== (r2 = $W(e23[1].length + 1))) && So(t2, "style", r2), 1024 & o2[0] && To(t2, "jse-hovered", e23[10] === "hover-insert-inside"), 65664 & o2[0] && To(t2, "jse-selected", e23[16] && Zq(e23[7])); }, i: function(e23) { i2 || (ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function kW(e22) { var t2, n2, r2, i2 = e22[51].index + ""; return { c: function() { t2 = go("div"), n2 = go("div"), r2 = bo(i2), So(n2, "class", "jse-index svelte-uj4yd7"), So(t2, "slot", "identifier"), So(t2, "class", "jse-identifier svelte-uj4yd7"); }, m: function(e23, i3) { vo(e23, t2, i3), uo(t2, n2), uo(n2, r2); }, p: function(e23, t3) { 18687 & t3[0] && i2 !== (i2 = e23[51].index + "") && Ao(r2, i2); }, d: function(e23) { e23 && po(t2); } }; } function wW(e22, t2) { var n2, r2, i2; return r2 = new AW({ props: { value: t2[51].value, path: t2[51].path, expandedMap: t2[51].expandedMap, enforceStringMap: t2[51].enforceStringMap, visibleSectionsMap: t2[51].visibleSectionsMap, validationErrorsMap: t2[51].validationErrorsMap, searchResultItemsMap: t2[51].searchResultItemsMap, selection: t2[51].selection, context: t2[8], onDragSelectionStart: t2[27], $$slots: { identifier: [kW] }, $$scope: { ctx: t2 } } }), { key: e22, first: null, c: function() { n2 = wo(), Aa(r2.$$.fragment), this.first = n2; }, m: function(e23, t3) { vo(e23, n2, t3), Ma(r2, e23, t3), i2 = true; }, p: function(e23, n3) { t2 = e23; var i3 = {}; 18687 & n3[0] && (i3.value = t2[51].value), 18687 & n3[0] && (i3.path = t2[51].path), 18687 & n3[0] && (i3.expandedMap = t2[51].expandedMap), 18687 & n3[0] && (i3.enforceStringMap = t2[51].enforceStringMap), 18687 & n3[0] && (i3.visibleSectionsMap = t2[51].visibleSectionsMap), 18687 & n3[0] && (i3.validationErrorsMap = t2[51].validationErrorsMap), 18687 & n3[0] && (i3.searchResultItemsMap = t2[51].searchResultItemsMap), 18687 & n3[0] && (i3.selection = t2[51].selection), 256 & n3[0] && (i3.context = t2[8]), 18687 & n3[0] | 32 & n3[1] && (i3.$$scope = { dirty: n3, ctx: t2 }), r2.$set(i3); }, i: function(e23) { i2 || (ya(r2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(r2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(n2), Ea(r2, e23); } }; } function xW(e22) { var t2, n2; return t2 = new VV({ props: { visibleSections: e22[14] || Xa, sectionIndex: e22[50], total: e22[0].length, path: e22[1], pointer: e22[9], onExpandSection: e22[8].onExpandSection, selection: e22[7] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 16384 & n3[0] && (r2.visibleSections = e23[14] || Xa), 16384 & n3[0] && (r2.sectionIndex = e23[50]), 1 & n3[0] && (r2.total = e23[0].length), 2 & n3[0] && (r2.path = e23[1]), 512 & n3[0] && (r2.pointer = e23[9]), 256 & n3[0] && (r2.onExpandSection = e23[8].onExpandSection), 128 & n3[0] && (r2.selection = e23[7]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function jW(e22, t2) { for (var n2, r2, i2, o2, a2 = [], s2 = /* @__PURE__ */ new Map(), u2 = t2[21](t2[1], t2[0], t2[48], t2[2], t2[3], t2[4], t2[5], t2[6], t2[7], t2[11]), c2 = function(e23) { return e23[51].index; }, l2 = 0; l2 < u2.length; l2 += 1) { var f2 = LH(t2, u2, l2), h2 = c2(f2); s2.set(h2, a2[l2] = wW(h2, f2)); } var d2 = t2[48].end < t2[0].length && xW(t2); return { key: e22, first: null, c: function() { n2 = wo(); for (var e23 = 0; e23 < a2.length; e23 += 1) a2[e23].c(); r2 = ko(), d2 && d2.c(), i2 = wo(), this.first = n2; }, m: function(e23, t3) { vo(e23, n2, t3); for (var s3 = 0; s3 < a2.length; s3 += 1) a2[s3].m(e23, t3); vo(e23, r2, t3), d2 && d2.m(e23, t3), vo(e23, i2, t3), o2 = true; }, p: function(e23, n3) { t2 = e23, 136333823 & n3[0] && (u2 = t2[21](t2[1], t2[0], t2[48], t2[2], t2[3], t2[4], t2[5], t2[6], t2[7], t2[11]), ma(), a2 = Ca(a2, n3, c2, 1, t2, u2, s2, r2.parentNode, Sa, wW, r2, LH), ga()), t2[48].end < t2[0].length ? d2 ? (d2.p(t2, n3), 16385 & n3[0] && ya(d2, 1)) : ((d2 = xW(t2)).c(), ya(d2, 1), d2.m(i2.parentNode, i2)) : d2 && (ma(), ba(d2, 1, 1, function() { d2 = null; }), ga()); }, i: function(e23) { if (!o2) { for (var t3 = 0; t3 < u2.length; t3 += 1) ya(a2[t3]); ya(d2), o2 = true; } }, o: function(e23) { for (var t3 = 0; t3 < a2.length; t3 += 1) ba(a2[t3]); ba(d2), o2 = false; }, d: function(e23) { e23 && po(n2); for (var t3 = 0; t3 < a2.length; t3 += 1) a2[t3].d(e23); e23 && po(r2), d2 && d2.d(e23), e23 && po(i2); } }; } function SW(e22) { var t2, n2, r2; return { c: function() { So(t2 = go("div"), "class", "jse-insert-selection-area jse-after svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-after"); }, m: function(i2, o2) { vo(i2, t2, o2), n2 || (r2 = xo(t2, "click", e22[31]), n2 = true); }, p: Bi, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function CW(e22) { var t2, n2, r2; return n2 = new UV({ props: { selected: e22[16] && Yq(e22[7]), onContextMenu: e22[33] } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-insert-area jse-after svelte-uj4yd7"), So(t2, "data-type", "insert-selection-area-after"), So(t2, "style", e22[18]), So(t2, "title", rs), To(t2, "jse-hovered", e22[10] === "hover-insert-after"), To(t2, "jse-selected", e22[16] && Yq(e22[7])); }, m: function(e23, i2) { vo(e23, t2, i2), Ma(n2, t2, null), r2 = true; }, p: function(e23, i2) { var o2 = {}; 65664 & i2[0] && (o2.selected = e23[16] && Yq(e23[7])), n2.$set(o2), (!r2 || 262144 & i2[0]) && So(t2, "style", e23[18]), 1024 & i2[0] && To(t2, "jse-hovered", e23[10] === "hover-insert-after"), 65664 & i2[0] && To(t2, "jse-selected", e23[16] && Yq(e23[7])); }, i: function(e23) { r2 || (ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2); } }; } function _W(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2 = !e22[8].readOnly && (e22[10] === "hover-insert-after" || e22[16] && Yq(e22[7])), f2 = [HH, VH, FH], h2 = []; function d2(e23, t3) { return e23[19] === "array" ? 0 : e23[19] === "object" ? 1 : 2; } n2 = d2(e22), r2 = h2[n2] = f2[n2](e22); var v2 = l2 && CW(e22); return { c: function() { t2 = go("div"), r2.c(), i2 = ko(), v2 && v2.c(), So(t2, "class", o2 = eo(IV("jse-json-node", { "jse-expanded": e22[12] }, e22[8].onClassName(e22[1], e22[0]))) + " svelte-uj4yd7"), So(t2, "data-path", a2 = Tx(e22[1])), To(t2, "jse-root", e22[17]), To(t2, "jse-selected", e22[16] && tF(e22[7])), To(t2, "jse-selected-key", e22[16] && Xq(e22[7])), To(t2, "jse-selected-value", e22[16] && eF(e22[7])), To(t2, "jse-hovered", e22[10] === "hover-collection"); }, m: function(r3, o3) { vo(r3, t2, o3), h2[n2].m(t2, null), uo(t2, i2), v2 && v2.m(t2, null), s2 = true, u2 || (c2 = [xo(t2, "mousedown", e22[25]), xo(t2, "mousemove", e22[26]), xo(t2, "mouseover", e22[28]), xo(t2, "mouseout", e22[29]), xo(t2, "focus", void 0), xo(t2, "blur", void 0)], u2 = true); }, p: function(e23, u3) { var c3 = n2; (n2 = d2(e23)) === c3 ? h2[n2].p(e23, u3) : (ma(), ba(h2[c3], 1, 1, function() { h2[c3] = null; }), ga(), (r2 = h2[n2]) ? r2.p(e23, u3) : (r2 = h2[n2] = f2[n2](e23)).c(), ya(r2, 1), r2.m(t2, i2)), 66944 & u3[0] && (l2 = !e23[8].readOnly && (e23[10] === "hover-insert-after" || e23[16] && Yq(e23[7]))), l2 ? v2 ? (v2.p(e23, u3), 66944 & u3[0] && ya(v2, 1)) : ((v2 = CW(e23)).c(), ya(v2, 1), v2.m(t2, null)) : v2 && (ma(), ba(v2, 1, 1, function() { v2 = null; }), ga()), (!s2 || 4355 & u3[0] && o2 !== (o2 = eo(IV("jse-json-node", { "jse-expanded": e23[12] }, e23[8].onClassName(e23[1], e23[0]))) + " svelte-uj4yd7")) && So(t2, "class", o2), (!s2 || 2 & u3[0] && a2 !== (a2 = Tx(e23[1]))) && So(t2, "data-path", a2), 135427 & u3[0] && To(t2, "jse-root", e23[17]), 70019 & u3[0] && To(t2, "jse-selected", e23[16] && tF(e23[7])), 70019 & u3[0] && To(t2, "jse-selected-key", e23[16] && Xq(e23[7])), 70019 & u3[0] && To(t2, "jse-selected-value", e23[16] && eF(e23[7])), 5379 & u3[0] && To(t2, "jse-hovered", e23[10] === "hover-collection"); }, i: function(e23) { s2 || (ya(r2), ya(v2), s2 = true); }, o: function(e23) { ba(r2), ba(v2), s2 = false; }, d: function(e23) { e23 && po(t2), h2[n2].d(), v2 && v2.d(), u2 = false, Wi(c2); } }; } function $W(e22) { return "margin-left: calc(".concat(e22, " * var(--jse-indent-size))"); } function OW(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2, l2, f2, h2 = t2.$$slots, d2 = h2 === void 0 ? {} : h2, v2 = t2.$$scope, p2 = t2.value, m2 = t2.path, g2 = t2.expandedMap, y2 = t2.enforceStringMap, b2 = t2.visibleSectionsMap, k2 = t2.validationErrorsMap, w2 = t2.searchResultItemsMap, x2 = t2.selection, j2 = t2.context, S2 = t2.onDragSelectionStart, C2 = Da("jsoneditor:JSONNode"), _2 = void 0, $2 = void 0, O2 = void 0, A2 = Dl(function(e23) { return e23; }, lS); function M2(e23) { j2.onDrag(e23); } function E2(e23) { kH.selecting && (kH.selecting = false, e23.stopPropagation()), j2.onDragEnd(), document.removeEventListener("mousemove", M2, true), document.removeEventListener("mouseup", E2); } function P2() { var e23, t3; return ((t3 = (e23 = j2.findElement([])) === null || e23 === void 0 ? void 0 : e23.getBoundingClientRect()) === null || t3 === void 0 ? void 0 : t3.top) || 0; } function N2(e23, t3) { var n3 = P2() - e23.initialContentTop; return t3.clientY - e23.initialClientY - n3; } function T2(e23) { if (O2) { var t3 = j2.getJson(), r3 = j2.getDocumentState(), i3 = N2(O2, e23), o3 = wH({ json: t3, documentState: r3, deltaY: i3, items: O2.items }).offset; o3 !== O2.offset && (C2("drag selection", o3, i3), n2(11, O2 = xi(xi({}, O2), {}, { offset: o3, didMoveItems: true }))); } } function I2(e23) { if (O2) { var t3 = j2.getJson(), r3 = wH({ json: t3, documentState: j2.getDocumentState(), deltaY: N2(O2, e23), items: O2.items }), i3 = r3.operations, o3 = r3.updatedSelection; if (i3) j2.onPatch(i3, function(e24, t4) { return { state: xi(xi({}, t4), {}, { selection: o3 || x2 }) }; }); else if (e23.target === O2.initialTarget && !O2.didMoveItems) { var a3 = Nx(e23.target), s3 = Ix(e23.target); s3 && j2.onSelect(_F(t3, a3, s3)); } n2(11, O2 = void 0), kH.dragging = false, document.removeEventListener("mousemove", T2, true), document.removeEventListener("mouseup", I2); } } return e22.$$set = function(e23) { "value" in e23 && n2(0, p2 = e23.value), "path" in e23 && n2(1, m2 = e23.path), "expandedMap" in e23 && n2(2, g2 = e23.expandedMap), "enforceStringMap" in e23 && n2(3, y2 = e23.enforceStringMap), "visibleSectionsMap" in e23 && n2(4, b2 = e23.visibleSectionsMap), "validationErrorsMap" in e23 && n2(5, k2 = e23.validationErrorsMap), "searchResultItemsMap" in e23 && n2(6, w2 = e23.searchResultItemsMap), "selection" in e23 && n2(7, x2 = e23.selection), "context" in e23 && n2(8, j2 = e23.context), "onDragSelectionStart" in e23 && n2(34, S2 = e23.onDragSelectionStart), "$$scope" in e23 && n2(36, v2 = e23.$$scope); }, e22.$$.update = function() { 2 & e22.$$.dirty[0] && n2(9, a2 = fs.exports.compileJSONPointer(m2)), 516 & e22.$$.dirty[0] && n2(12, s2 = !!g2 && g2[a2] === true), 521 & e22.$$.dirty[0] && n2(13, u2 = Bq(p2, y2, a2)), 528 & e22.$$.dirty[0] && n2(14, c2 = b2 ? b2[a2] : void 0), 544 & e22.$$.dirty[0] && n2(15, l2 = k2 ? k2[a2] : void 0), 640 & e22.$$.dirty[0] && n2(16, f2 = !!x2 && x2.pointersMap[a2] === true), 2 & e22.$$.dirty[0] && n2(17, r2 = m2.length === 0), 1 & e22.$$.dirty[0] && n2(19, i2 = Ps(p2)), 2 & e22.$$.dirty[0] && n2(18, o2 = $W(m2.length)); }, [p2, m2, g2, y2, b2, k2, w2, x2, j2, a2, _2, O2, s2, u2, c2, l2, f2, r2, o2, i2, function(e23, t3, n3, r3, i3, o3, s3, u3, c3) { var l3 = Object.keys(t3).map(function(c4) { var l4 = fs.exports.appendToJSONPointer(a2, c4); return { key: c4, value: t3[c4], path: A2(e23.concat(c4)), pointer: l4, expandedMap: xH(n3, l4), enforceStringMap: xH(r3, l4), visibleSectionsMap: xH(i3, l4), validationErrorsMap: xH(o3, l4), keySearchResultItemsMap: JF(s3, l4), valueSearchResultItemsMap: xH(s3, l4), selection: $F(u3, l4) }; }); return c3 && c3.offset !== 0 && (l3 = Jw(l3, c3.selectionStartIndex, c3.selectionItemsCount, c3.offset)), l3; }, function(e23, t3, n3, r3, i3, o3, s3, u3, c3, l3) { for (var f3 = n3.start, h3 = Math.min(n3.end, t3.length), d3 = [], v3 = f3; v3 < h3; v3++) { var p3 = fs.exports.appendToJSONPointer(a2, v3); d3.push({ index: v3, value: t3[v3], path: A2(e23.concat(String(v3))), pointer: p3, expandedMap: xH(r3, p3), enforceStringMap: xH(i3, p3), visibleSectionsMap: xH(o3, p3), validationErrorsMap: xH(s3, p3), searchResultItemsMap: xH(u3, p3), selection: $F(c3, p3) }); } if (l3 && l3.offset !== 0) { var m3 = d3.map(function(e24) { return e24.index; }); d3 = Jw(d3, l3.selectionStartIndex, l3.selectionItemsCount, l3.offset); for (var g3 = 0; g3 < d3.length; g3++) d3[g3].index = m3[g3]; } return d3; }, function(e23) { e23.stopPropagation(); var t3 = e23.ctrlKey; j2.onExpand(m2, !s2, t3); }, function(e23) { e23.stopPropagation(), j2.onExpand(m2, true); }, function(e23, t3) { var n3 = MF(m2, Object.keys(p2), e23, t3); return j2.onPatch(n3), kv(fs.exports.parseJSONPointer(n3[0].path)); }, function(e23) { if (!(function(e24) { return e24.nodeName === "DIV" && e24.contentEditable === "true"; }(e23.target) || e23.which === 1 && Cx(e23.target, "BUTTON"))) { e23.stopPropagation(), e23.preventDefault(), document.addEventListener("mousemove", M2, true), document.addEventListener("mouseup", E2); var t3 = Nx(e23.target), n3 = j2.getJson(), i3 = j2.getDocumentState(); if (function(e24, t4, n4) { if (!e24) return false; var r3 = t4.slice(0); if (tF(e24)) for (; r3.length > 0; ) { if (e24.pointersMap[fs.exports.compileJSONPointer(r3)] === true) return true; r3.pop(); } if (Xq(e24)) return n4 === sx.key && jm(e24.focusPath, t4); if (eF(e24)) { if (n4 === sx.value && jm(e24.focusPath, t4)) return true; if (vF(t4, e24.focusPath) && t4.length > e24.focusPath.length && (n4 === sx.key || n4 === sx.value || n4 === sx.multi)) return true; } return false; }(x2, m2, t3)) e23.button === 0 && S2(e23); else { if (kH.selecting = true, kH.selectionAnchor = m2, kH.selectionAnchorType = t3, kH.selectionFocus = m2, e23.shiftKey) x2 && j2.onSelect(kF(n3, x2.anchorPath, m2)); else if (t3 === sx.multi) if (r2 && e23.target.hasAttribute("data-path")) { var o3 = kv(Vq(p2, i3)); j2.onSelect(CF(o3)); } else j2.onSelect(kF(n3, m2, m2)); else j2.onSelect(_F(n3, t3, m2)); j2.focus(); } } }, function(e23) { if (kH.selecting) { e23.preventDefault(), e23.stopPropagation(), kH.selectionFocus == null && window.getSelection && window.getSelection().empty(); var t3 = Nx(e23.target); if (!jm(m2, kH.selectionFocus) || t3 !== kH.selectionAnchorType) { kH.selectionFocus = m2, kH.selectionAnchorType = t3; var n3 = j2.getJson(); j2.onSelect(kF(n3, kH.selectionAnchor, kH.selectionFocus)); } } }, function(e23) { if (!j2.readOnly) { var t3 = Yp(x2.focusPath); if (jm(m2, t3)) { var r3 = function(e24, t4) { var n3 = []; function r4(e25) { var t5 = m2.concat(e25), r5 = j2.findElement(t5); r5 != null && n3.push({ path: t5, height: r5.clientHeight }); } if (Array.isArray(p2)) { var i4 = rF(e24), o4 = iF(e24), a4 = kv(i4), s3 = kv(o4), u3 = t4.find(function(e25) { return a4 >= e25.start && s3 <= e25.end; }); if (!u3) return null; var c3 = u3.start, l3 = u3.end; Fw(c3, Math.min(p2.length, l3), function(e25) { return r4(String(e25)); }); } else Object.keys(p2).forEach(r4); return n3; }(x2, c2 || Xa); if (C2("dragSelectionStart", { selection: x2, items: r3 }), r3) { var i3 = rF(x2), o3 = r3.findIndex(function(e24) { return jm(e24.path, i3); }), a3 = wH({ json: j2.getJson(), documentState: j2.getDocumentState(), deltaY: 0, items: r3 }).offset; n2(11, O2 = { initialTarget: e23.target, initialClientY: e23.clientY, initialContentTop: P2(), selectionStartIndex: o3, selectionItemsCount: xF(x2).length, items: r3, offset: a3, didMoveItems: false }), kH.dragging = true, document.addEventListener("mousemove", T2, true), document.addEventListener("mouseup", I2); } else C2("Cannot drag the current selection (probably spread over multiple sections)"); } else S2(e23); } }, function(e23) { kH.selecting || kH.dragging || (e23.stopPropagation(), _x(e23.target, "data-type", "selectable-value") ? n2(10, _2 = "hover-collection") : _x(e23.target, "data-type", "insert-selection-area-inside") ? n2(10, _2 = "hover-insert-inside") : _x(e23.target, "data-type", "insert-selection-area-after") && n2(10, _2 = "hover-insert-after"), clearTimeout($2)); }, function(e23) { e23.stopPropagation(), $2 = setTimeout(function() { return n2(10, _2 = void 0); }); }, function(e23) { e23.shiftKey || (e23.stopPropagation(), e23.preventDefault(), j2.onSelect(yF(m2))); }, function(e23) { e23.shiftKey || (e23.stopPropagation(), e23.preventDefault(), j2.onSelect(bF(m2))); }, function(e23) { j2.onSelect(yF(m2)), j2.onContextMenu(e23); }, function(e23) { j2.onSelect(bF(m2)), j2.onContextMenu(e23); }, S2, d2, v2]; } var AW = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, OW, _W, Ki, { value: 0, path: 1, expandedMap: 2, enforceStringMap: 3, visibleSectionsMap: 4, validationErrorsMap: 5, searchResultItemsMap: 6, selection: 7, context: 8, onDragSelectionStart: 34 }, PH, [-1, -1]), r2; } return zi(n2); }(); function MW(e22) { var t2, n2; return t2 = new VS({ props: { items: e22[0] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 1 & ki(n3, 1)[0] && (r2.items = e23[0]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function EW(e22, t2, n2) { var r2, i2, o2, a2, s2, u2, c2, l2 = t2.json, f2 = t2.selection, h2 = t2.readOnly, d2 = t2.showSearch, v2 = d2 !== void 0 && d2, p2 = t2.historyState, m2 = t2.onExpandAll, g2 = t2.onCollapseAll, y2 = t2.onUndo, b2 = t2.onRedo, k2 = t2.onSort, w2 = t2.onTransform, x2 = t2.onContextMenu, j2 = t2.onCopy, S2 = t2.onRenderMenu, C2 = S2 === void 0 ? Wu : S2; function _2() { n2(1, v2 = !v2); } return e22.$$set = function(e23) { "json" in e23 && n2(2, l2 = e23.json), "selection" in e23 && n2(3, f2 = e23.selection), "readOnly" in e23 && n2(4, h2 = e23.readOnly), "showSearch" in e23 && n2(1, v2 = e23.showSearch), "historyState" in e23 && n2(5, p2 = e23.historyState), "onExpandAll" in e23 && n2(6, m2 = e23.onExpandAll), "onCollapseAll" in e23 && n2(7, g2 = e23.onCollapseAll), "onUndo" in e23 && n2(8, y2 = e23.onUndo), "onRedo" in e23 && n2(9, b2 = e23.onRedo), "onSort" in e23 && n2(10, k2 = e23.onSort), "onTransform" in e23 && n2(11, w2 = e23.onTransform), "onContextMenu" in e23 && n2(12, x2 = e23.onContextMenu), "onCopy" in e23 && n2(13, j2 = e23.onCopy), "onRenderMenu" in e23 && n2(14, C2 = e23.onRenderMenu); }, e22.$$.update = function() { 4 & e22.$$.dirty && n2(20, r2 = l2 !== void 0), e22.$$.dirty, 1048584 & e22.$$.dirty && n2(17, i2 = r2 && (tF(f2) || Xq(f2) || eF(f2))), 68 & e22.$$.dirty && n2(19, o2 = { icon: CS, title: "Expand all", className: "jse-expand-all", onClick: m2, disabled: !Ms(l2) }), 132 & e22.$$.dirty && n2(18, a2 = { icon: _S, title: "Collapse all", className: "jse-collapse-all", onClick: g2, disabled: !Ms(l2) }), 4 & e22.$$.dirty && n2(16, s2 = { icon: bj, title: "Search (Ctrl+F)", className: "jse-search", onClick: _2, disabled: l2 === void 0 }), 999220 & e22.$$.dirty && n2(15, u2 = h2 ? [o2, a2, { separator: true }, { icon: vj, title: "Copy (Ctrl+C)", className: "jse-copy", onClick: j2, disabled: !i2 }, { separator: true }, s2, { space: true }] : [o2, a2, { separator: true }, { icon: rj, title: "Sort", className: "jse-sort", onClick: k2, disabled: h2 || l2 === void 0 }, { icon: gj, title: "Transform contents (filter, sort, project)", className: "jse-transform", onClick: w2, disabled: h2 || l2 === void 0 }, s2, { icon: mj, title: is, className: "jse-contextmenu", onClick: x2 }, { separator: true }, { icon: ij, title: "Undo (Ctrl+Z)", className: "jse-undo", onClick: y2, disabled: !p2.canUndo }, { icon: oj, title: "Redo (Ctrl+Shift+Z)", className: "jse-redo", onClick: b2, disabled: !p2.canRedo }, { space: true }]), 49152 & e22.$$.dirty && n2(0, c2 = C2("tree", u2) || u2); }, [c2, v2, l2, f2, h2, p2, m2, g2, y2, b2, k2, w2, x2, j2, C2, u2, s2, i2, a2, o2, r2]; } var PW = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, EW, MW, Ki, { json: 2, selection: 3, readOnly: 4, showSearch: 1, historyState: 5, onExpandAll: 6, onCollapseAll: 7, onUndo: 8, onRedo: 9, onSort: 10, onTransform: 11, onContextMenu: 12, onCopy: 13, onRenderMenu: 14 }), r2; } return zi(n2); }(); function NW(e22) { co(e22, "svelte-1q2qkk2", '@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25CF";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}'); } function TW(e22) { var t2; return { c: function() { (t2 = go("ul")).innerHTML = '
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ', So(t2, "class", "svelte-1q2qkk2"); }, m: function(e23, n2) { vo(e23, t2, n2); }, d: function(e23) { e23 && po(t2); } }; } function IW(e22) { var t2, n2, r2, i2, o2, a2, s2, u2 = !e22[0] && TW(); return { c: function() { t2 = go("div"), n2 = go("div"), r2 = ko(), i2 = go("div"), o2 = bo("Empty document\n "), u2 && u2.c(), a2 = ko(), s2 = go("div"), So(n2, "class", "jse-space jse-before svelte-1q2qkk2"), So(i2, "class", "jse-contents svelte-1q2qkk2"), So(s2, "class", "jse-space jse-after svelte-1q2qkk2"), So(t2, "class", "jse-welcome svelte-1q2qkk2"); }, m: function(e23, c2) { vo(e23, t2, c2), uo(t2, n2), uo(t2, r2), uo(t2, i2), uo(i2, o2), u2 && u2.m(i2, null), uo(t2, a2), uo(t2, s2); }, p: function(e23, t3) { ki(t3, 1)[0]; e23[0] ? u2 && (u2.d(1), u2 = null) : u2 || ((u2 = TW()).c(), u2.m(i2, null)); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2), u2 && u2.d(); } }; } function RW(e22, t2, n2) { var r2 = t2.readOnly; return e22.$$set = function(e23) { "readOnly" in e23 && n2(0, r2 = e23.readOnly); }, [r2]; } var DW = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, RW, IW, Ki, { readOnly: 0 }, NW), r2; } return zi(n2); }(); function zW(e22) { co(e22, "svelte-6hb2gf", ".jse-navigation-bar-dropdown.svelte-6hb2gf.svelte-6hb2gf{position:absolute;top:100%;left:0;z-index:3;background:var(--jse-navigation-bar-background);color:var(--jse-navigation-bar-dropdown-color);box-shadow:var(--jse-controls-box-shadow);display:flex;flex-direction:column;max-height:300px;overflow:auto;min-width:80px}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);border:none;background:transparent;color:inherit;cursor:pointer;outline:none;text-align:left;white-space:nowrap;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding)) 36px}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf:focus,.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf:hover{background:var(--jse-navigation-bar-background-highlight)}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.jse-selected.svelte-6hb2gf{background:var(--jse-navigation-bar-dropdown-color);color:var(--jse-navigation-bar-background)}"); } function LW(e22, t2, n2) { var r2 = e22.slice(); return r2[4] = t2[n2], r2; } function BW(e22, t2) { var n2, r2, i2, o2, a2, s2 = Gq(t2[4], HW) + ""; function u2() { return t2[3](t2[4]); } return { key: e22, first: null, c: function() { n2 = go("button"), r2 = bo(s2), So(n2, "type", "button"), So(n2, "class", "jse-navigation-bar-dropdown-item svelte-6hb2gf"), So(n2, "title", i2 = t2[4]), To(n2, "jse-selected", t2[4] === t2[1]), this.first = n2; }, m: function(e23, t3) { vo(e23, n2, t3), uo(n2, r2), o2 || (a2 = xo(n2, "click", jo(u2)), o2 = true); }, p: function(e23, o3) { t2 = e23, 1 & o3 && s2 !== (s2 = Gq(t2[4], HW) + "") && Ao(r2, s2), 1 & o3 && i2 !== (i2 = t2[4]) && So(n2, "title", i2), 3 & o3 && To(n2, "jse-selected", t2[4] === t2[1]); }, d: function(e23) { e23 && po(n2), o2 = false, a2(); } }; } function qW(e22) { var t2, n2; return { c: function() { t2 = go("button"), n2 = bo("..."), So(t2, "type", "button"), So(t2, "class", "jse-navigation-bar-dropdown-item svelte-6hb2gf"), So(t2, "title", "Limited to " + VW + " items"); }, m: function(e23, r2) { vo(e23, t2, r2), uo(t2, n2); }, p: Bi, d: function(e23) { e23 && po(t2); } }; } function FW(e22) { for (var t2, n2, r2 = [], i2 = /* @__PURE__ */ new Map(), o2 = Vw(e22[0], VW), a2 = function(e23) { return e23[4]; }, s2 = 0; s2 < o2.length; s2 += 1) { var u2 = LW(e22, o2, s2), c2 = a2(u2); i2.set(c2, r2[s2] = BW(c2, u2)); } var l2 = e22[0].length > VW && qW(); return { c: function() { t2 = go("div"); for (var e23 = 0; e23 < r2.length; e23 += 1) r2[e23].c(); n2 = ko(), l2 && l2.c(), So(t2, "class", "jse-navigation-bar-dropdown svelte-6hb2gf"); }, m: function(e23, i3) { vo(e23, t2, i3); for (var o3 = 0; o3 < r2.length; o3 += 1) r2[o3].m(t2, null); uo(t2, n2), l2 && l2.m(t2, null); }, p: function(e23, s3) { var u3 = ki(s3, 1)[0]; 7 & u3 && (o2 = Vw(e23[0], VW), r2 = Ca(r2, u3, a2, 1, e23, o2, i2, t2, ja, BW, n2, LW)), e23[0].length > VW ? l2 ? l2.p(e23, u3) : ((l2 = qW()).c(), l2.m(t2, null)) : l2 && (l2.d(1), l2 = null); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); for (var n3 = 0; n3 < r2.length; n3 += 1) r2[n3].d(); l2 && l2.d(); } }; } var VW = 100, HW = 30; function WW(e22, t2, n2) { var r2 = t2.items, i2 = t2.selectedItem, o2 = t2.onSelect; return e22.$$set = function(e23) { "items" in e23 && n2(0, r2 = e23.items), "selectedItem" in e23 && n2(1, i2 = e23.selectedItem), "onSelect" in e23 && n2(2, o2 = e23.onSelect); }, [r2, i2, o2, function(e23) { return o2(e23); }]; } var JW = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, WW, FW, Ki, { items: 0, selectedItem: 1, onSelect: 2 }, zW), r2; } return zi(n2); }(); function UW(e22) { co(e22, "svelte-1r1k9th", ".jse-navigation-bar-item.svelte-1r1k9th.svelte-1r1k9th{position:relative;display:flex}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th{font-family:inherit;font-size:inherit;padding:calc(0.5 * var(--jse-padding)) 2px;border:none;background:transparent;color:inherit;cursor:pointer;outline:none;min-width:2em;white-space:nowrap}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th:focus,.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th:hover{background:var(--jse-panel-button-background-highlight);color:var(--jse-panel-button-color-highlight)}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.jse-navigation-bar-arrow.svelte-1r1k9th{padding:2px var(--jse-padding) 0}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.jse-navigation-bar-arrow.jse-open.svelte-1r1k9th{background:var(--jse-navigation-bar-background);color:var(--jse-navigation-bar-dropdown-color)}.jse-navigation-bar-item.svelte-1r1k9th.svelte-1r1k9th:last-child{padding-right:var(--jse-padding)}"); } function KW(e22) { var t2, n2, r2, i2; return { c: function() { t2 = go("button"), n2 = bo(e22[2]), So(t2, "type", "button"), So(t2, "class", "jse-navigation-bar-button svelte-1r1k9th"); }, m: function(o2, a2) { vo(o2, t2, a2), uo(t2, n2), r2 || (i2 = xo(t2, "click", e22[9]), r2 = true); }, p: function(e23, t3) { 4 & t3 && Ao(n2, e23[2]); }, d: function(e23) { e23 && po(t2), r2 = false, i2(); } }; } function GW(e22) { var t2, n2, r2, i2, o2, a2, s2; r2 = new tS({ props: { data: tj } }); var u2 = e22[2] !== void 0 && KW(e22); return { c: function() { t2 = go("div"), n2 = go("button"), Aa(r2.$$.fragment), i2 = ko(), u2 && u2.c(), So(n2, "type", "button"), So(n2, "class", "jse-navigation-bar-button jse-navigation-bar-arrow svelte-1r1k9th"), To(n2, "jse-open", e22[1]), So(t2, "class", "jse-navigation-bar-item svelte-1r1k9th"); }, m: function(c2, l2) { vo(c2, t2, l2), uo(t2, n2), Ma(r2, n2, null), uo(t2, i2), u2 && u2.m(t2, null), e22[10](t2), o2 = true, a2 || (s2 = xo(n2, "click", e22[4]), a2 = true); }, p: function(e23, r3) { var i3 = ki(r3, 1)[0]; 2 & i3 && To(n2, "jse-open", e23[1]), e23[2] !== void 0 ? u2 ? u2.p(e23, i3) : ((u2 = KW(e23)).c(), u2.m(t2, null)) : u2 && (u2.d(1), u2 = null); }, i: function(e23) { o2 || (ya(r2.$$.fragment, e23), o2 = true); }, o: function(e23) { ba(r2.$$.fragment, e23), o2 = false; }, d: function(n3) { n3 && po(t2), Ea(r2), u2 && u2.d(), e22[10](null), a2 = false, s2(); } }; } function QW(e22, t2, n2) { var r2, i2, o2, a2, s2 = Yo("absolute-popup"), u2 = s2.openAbsolutePopup, c2 = s2.closeAbsolutePopup, l2 = t2.path, f2 = t2.index, h2 = t2.onSelect, d2 = t2.getItems, v2 = false; function p2(e23) { c2(a2), h2(r2.concat(e23)); } return e22.$$set = function(e23) { "path" in e23 && n2(5, l2 = e23.path), "index" in e23 && n2(6, f2 = e23.index), "onSelect" in e23 && n2(7, h2 = e23.onSelect), "getItems" in e23 && n2(8, d2 = e23.getItems); }, e22.$$.update = function() { 96 & e22.$$.dirty && (r2 = l2.slice(0, f2)), 96 & e22.$$.dirty && n2(2, i2 = l2[f2]); }, [o2, v2, i2, p2, function() { if (o2) { n2(1, v2 = true); var e23 = { items: d2(r2), selectedItem: i2, onSelect: p2 }; a2 = u2(JW, e23, { anchor: o2, closeOnOuterClick: true, onClose: function() { n2(1, v2 = false); } }); } }, l2, f2, h2, d2, function() { return p2(i2); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(0, o2 = e23); }); }]; } var YW = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, QW, GW, Ki, { path: 5, index: 6, onSelect: 7, getItems: 8 }, UW), r2; } return zi(n2); }(), ZW = { exports: {} }, XW = function(e22, t2) { var n2, r2, i2 = 1, o2 = 0, a2 = 0, s2 = String.alphabet; function u2(e23, t3, r3) { if (r3) { for (n2 = t3; (r3 = u2(e23, n2)) < 76 && r3 > 65; ) ++n2; return +e23.slice(t3 - 1, n2); } return (r3 = s2 && s2.indexOf(e23.charAt(t3))) > -1 ? r3 + 76 : (r3 = e23.charCodeAt(t3) || 0) < 45 || r3 > 127 ? r3 : r3 < 46 ? 65 : r3 < 48 ? r3 - 1 : r3 < 58 ? r3 + 18 : r3 < 65 ? r3 - 11 : r3 < 91 ? r3 + 11 : r3 < 97 ? r3 - 37 : r3 < 123 ? r3 + 5 : r3 - 63; } if ((e22 += "") != (t2 += "")) { for (; i2; ) if (r2 = u2(e22, o2++), i2 = u2(t2, a2++), r2 < 76 && i2 < 76 && r2 > 66 && i2 > 66 && (r2 = u2(e22, o2, o2), i2 = u2(t2, a2, o2 = n2), a2 = n2), r2 != i2) return r2 < i2 ? -1 : 1; } return 0; }; try { ZW.exports = XW; } catch (e22) { String.naturalCompare = XW; } function eJ(e22, t2) { var n2 = typeof e22 == "string" ? e22.toLowerCase() : e22, r2 = typeof t2 == "string" ? t2.toLowerCase() : t2; return ZW.exports(n2, r2); } function tJ(e22, t2) { return function(n2, r2) { var i2 = fs.exports.getIn(n2, e22), o2 = fs.exports.getIn(r2, e22); return i2 === void 0 ? t2 : o2 === void 0 ? -t2 : typeof i2 != "string" && typeof o2 != "string" ? i2 > o2 ? t2 : i2 < o2 ? -t2 : 0 : t2 * eJ(i2, o2); }; } function nJ(e22) { co(e22, "svelte-5lwyke", ".jse-navigation-bar.svelte-5lwyke.svelte-5lwyke{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-panel-background);color:var(--jse-panel-button-color);padding:0;margin:0;display:flex;overflow:auto;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-navigation-bar.svelte-5lwyke .jse-navigation-bar-space.svelte-5lwyke{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);color:var(--jse-navigation-bar-color)}"); } function rJ(e22, t2, n2) { var r2 = e22.slice(); return r2[11] = t2[n2], r2[13] = n2, r2; } function iJ(e22, t2) { var n2, r2, i2; return r2 = new YW({ props: { getItems: t2[4], path: t2[1], index: t2[13], onSelect: t2[5] } }), { key: e22, first: null, c: function() { n2 = wo(), Aa(r2.$$.fragment), this.first = n2; }, m: function(e23, t3) { vo(e23, n2, t3), Ma(r2, e23, t3), i2 = true; }, p: function(e23, n3) { t2 = e23; var i3 = {}; 2 & n3 && (i3.path = t2[1]), 2 & n3 && (i3.index = t2[13]), r2.$set(i3); }, i: function(e23) { i2 || (ya(r2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(r2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(n2), Ea(r2, e23); } }; } function oJ(e22) { var t2, n2; return t2 = new YW({ props: { getItems: e22[4], path: e22[1], index: void 0, onSelect: e22[5] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 2 & n3 && (r2.path = e23[1]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function aJ(e22) { for (var t2, n2, r2, i2, o2, a2, s2 = [], u2 = /* @__PURE__ */ new Map(), c2 = Ms(e22[0]) ? "\xA0" : "Navigation bar", l2 = e22[1], f2 = function(e23) { return e23[13]; }, h2 = 0; h2 < l2.length; h2 += 1) { var d2 = rJ(e22, l2, h2), v2 = f2(d2); u2.set(v2, s2[h2] = iJ(v2, d2)); } var p2 = e22[3] && oJ(e22); return { c: function() { t2 = go("div"); for (var e23 = 0; e23 < s2.length; e23 += 1) s2[e23].c(); n2 = ko(), p2 && p2.c(), r2 = ko(), i2 = go("div"), o2 = bo(c2), So(i2, "class", "jse-navigation-bar-space svelte-5lwyke"), So(t2, "class", "jse-navigation-bar svelte-5lwyke"); }, m: function(u3, c3) { vo(u3, t2, c3); for (var l3 = 0; l3 < s2.length; l3 += 1) s2[l3].m(t2, null); uo(t2, n2), p2 && p2.m(t2, null), uo(t2, r2), uo(t2, i2), uo(i2, o2), e22[8](t2), a2 = true; }, p: function(e23, i3) { var h3 = ki(i3, 1)[0]; 50 & h3 && (l2 = e23[1], ma(), s2 = Ca(s2, h3, f2, 1, e23, l2, u2, t2, Sa, iJ, n2, rJ), ga()), e23[3] ? p2 ? (p2.p(e23, h3), 8 & h3 && ya(p2, 1)) : ((p2 = oJ(e23)).c(), ya(p2, 1), p2.m(t2, r2)) : p2 && (ma(), ba(p2, 1, 1, function() { p2 = null; }), ga()), (!a2 || 1 & h3) && c2 !== (c2 = Ms(e23[0]) ? "\xA0" : "Navigation bar") && Ao(o2, c2); }, i: function(e23) { if (!a2) { for (var t3 = 0; t3 < l2.length; t3 += 1) ya(s2[t3]); ya(p2), a2 = true; } }, o: function(e23) { for (var t3 = 0; t3 < s2.length; t3 += 1) ba(s2[t3]); ba(p2), a2 = false; }, d: function(n3) { n3 && po(t2); for (var r3 = 0; r3 < s2.length; r3 += 1) s2[r3].d(); p2 && p2.d(), e22[8](null); } }; } function sJ(e22, t2, n2) { var r2, i2, o2, a2 = Da("jsoneditor:NavigationBar"), s2 = t2.json, u2 = t2.documentState, c2 = t2.onSelect; return e22.$$set = function(e23) { "json" in e23 && n2(0, s2 = e23.json), "documentState" in e23 && n2(6, u2 = e23.documentState), "onSelect" in e23 && n2(7, c2 = e23.onSelect); }, e22.$$.update = function() { 64 & e22.$$.dirty && n2(1, r2 = u2.selection ? u2.selection.focusPath : []), 3 & e22.$$.dirty && n2(3, i2 = Ms(fs.exports.getIn(s2, r2))), 2 & e22.$$.dirty && setTimeout(function() { if (o2 && o2.scrollTo) { var e23 = o2.scrollWidth - o2.clientWidth; e23 > 0 && (a2("scrollTo ", e23), o2.scrollTo({ left: e23, behavior: "smooth" })); } }); }, [s2, r2, o2, i2, function(e23) { a2("get items for path", e23); var t3 = fs.exports.getIn(s2, e23); if (Array.isArray(t3)) return By(0, t3.length).map(String); if (As(t3)) { var n3 = Object.keys(t3).slice(0); return n3.sort(eJ), n3; } return []; }, function(e23) { a2("select path", JSON.stringify(e23)), c2(kF(s2, e23, e23)); }, u2, c2, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(2, o2 = e23); }); }]; } var uJ = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, sJ, aJ, Ki, { json: 0, documentState: 6, onSelect: 7 }, nJ), r2; } return zi(n2); }(); function cJ(e22) { co(e22, "svelte-18vllqh", ".jse-search-box.svelte-18vllqh.svelte-18vllqh{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-18vllqh .jse-search-form.svelte-18vllqh{display:flex;align-items:stretch}.jse-search-box.svelte-18vllqh .jse-search-form button.svelte-18vllqh,.jse-search-box.svelte-18vllqh .jse-search-form input.svelte-18vllqh{font-family:inherit;font-size:inherit}.jse-search-box.svelte-18vllqh .jse-search-form button.svelte-18vllqh{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-18vllqh .jse-search-form button.svelte-18vllqh:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-18vllqh .jse-search-form input.svelte-18vllqh{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;outline:none}.jse-search-box.svelte-18vllqh .jse-search-form .jse-replace-toggle.svelte-18vllqh{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents.svelte-18vllqh{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents .jse-search-section.svelte-18vllqh{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-18vllqh{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-18vllqh{flex:1;display:flex}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-18vllqh{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-18vllqh{visibility:visible}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents .jse-replace-section.svelte-18vllqh{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-18vllqh .jse-search-form .jse-search-contents .jse-replace-section button.svelte-18vllqh{width:auto}"); } function lJ(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2, p2, m2, g2, y2, b2, k2, w2, x2, j2, S2, C2, _2, $2, O2, A2 = (e22[3] !== -1 ? "".concat(e22[3] + 1, "/") : "") + "", M2 = !e22[4] && fJ(e22), E2 = [dJ, hJ], P2 = []; function N2(e23, t3) { return e23[2] ? 0 : 1; } s2 = N2(e22), u2 = P2[s2] = E2[s2](e22), y2 = new tS({ props: { data: cj } }), w2 = new tS({ props: { data: lj } }), S2 = new tS({ props: { data: $j } }); var T2 = e22[0] && !e22[4] && vJ(e22); return { c: function() { t2 = go("div"), n2 = go("form"), M2 && M2.c(), r2 = ko(), i2 = go("div"), o2 = go("div"), a2 = go("div"), u2.c(), c2 = ko(), l2 = go("label"), f2 = go("input"), h2 = ko(), d2 = go("div"), v2 = bo(A2), p2 = bo(e22[10]), m2 = ko(), g2 = go("button"), Aa(y2.$$.fragment), b2 = ko(), k2 = go("button"), Aa(w2.$$.fragment), x2 = ko(), j2 = go("button"), Aa(S2.$$.fragment), C2 = ko(), T2 && T2.c(), So(a2, "class", "jse-search-icon svelte-18vllqh"), So(f2, "class", "jse-search-input svelte-18vllqh"), So(f2, "title", "Enter text to search"), So(f2, "type", "text"), So(f2, "placeholder", "Find"), So(l2, "class", "jse-search-input-label svelte-18vllqh"), So(l2, "about", "jse-search input"), So(d2, "class", "jse-search-count svelte-18vllqh"), To(d2, "jse-visible", e22[8] !== ""), So(g2, "type", "button"), So(g2, "class", "jse-search-next svelte-18vllqh"), So(g2, "title", "Go to next search result (Enter)"), So(k2, "type", "button"), So(k2, "class", "jse-search-previous svelte-18vllqh"), So(k2, "title", "Go to previous search result (Shift+Enter)"), So(j2, "type", "button"), So(j2, "class", "jse-search-clear svelte-18vllqh"), So(j2, "title", "Close search box (Esc)"), So(o2, "class", "jse-search-section svelte-18vllqh"), So(i2, "class", "jse-search-contents svelte-18vllqh"), So(n2, "class", "jse-search-form svelte-18vllqh"), So(t2, "class", "jse-search-box svelte-18vllqh"); }, m: function(u3, A3) { vo(u3, t2, A3), uo(t2, n2), M2 && M2.m(n2, null), uo(n2, r2), uo(n2, i2), uo(i2, o2), uo(o2, a2), P2[s2].m(a2, null), uo(o2, c2), uo(o2, l2), uo(l2, f2), Mo(f2, e22[8]), uo(o2, h2), uo(o2, d2), uo(d2, v2), uo(d2, p2), uo(o2, m2), uo(o2, g2), Ma(y2, g2, null), uo(o2, b2), uo(o2, k2), Ma(w2, k2, null), uo(o2, x2), uo(o2, j2), Ma(S2, j2, null), uo(i2, C2), T2 && T2.m(i2, null), _2 = true, $2 || (O2 = [xo(f2, "input", e22[21]), to(mJ.call(null, f2)), xo(g2, "click", e22[22]), xo(k2, "click", e22[23]), xo(j2, "click", e22[24]), xo(n2, "submit", e22[12]), xo(n2, "keydown", e22[13])], $2 = true); }, p: function(e23, t3) { e23[4] ? M2 && (ma(), ba(M2, 1, 1, function() { M2 = null; }), ga()) : M2 ? (M2.p(e23, t3), 16 & t3 && ya(M2, 1)) : ((M2 = fJ(e23)).c(), ya(M2, 1), M2.m(n2, r2)); var o3 = s2; (s2 = N2(e23)) === o3 ? P2[s2].p(e23, t3) : (ma(), ba(P2[o3], 1, 1, function() { P2[o3] = null; }), ga(), (u2 = P2[s2]) ? u2.p(e23, t3) : (u2 = P2[s2] = E2[s2](e23)).c(), ya(u2, 1), u2.m(a2, null)), 256 & t3 && f2.value !== e23[8] && Mo(f2, e23[8]), (!_2 || 8 & t3) && A2 !== (A2 = (e23[3] !== -1 ? "".concat(e23[3] + 1, "/") : "") + "") && Ao(v2, A2), (!_2 || 1024 & t3) && Ao(p2, e23[10]), 256 & t3 && To(d2, "jse-visible", e23[8] !== ""), e23[0] && !e23[4] ? T2 ? T2.p(e23, t3) : ((T2 = vJ(e23)).c(), T2.m(i2, null)) : T2 && (T2.d(1), T2 = null); }, i: function(e23) { _2 || (ya(M2), ya(u2), ya(y2.$$.fragment, e23), ya(w2.$$.fragment, e23), ya(S2.$$.fragment, e23), _2 = true); }, o: function(e23) { ba(M2), ba(u2), ba(y2.$$.fragment, e23), ba(w2.$$.fragment, e23), ba(S2.$$.fragment, e23), _2 = false; }, d: function(e23) { e23 && po(t2), M2 && M2.d(), P2[s2].d(), Ea(y2), Ea(w2), Ea(S2), T2 && T2.d(), $2 = false, Wi(O2); } }; } function fJ(e22) { var t2, n2, r2, i2, o2; return n2 = new tS({ props: { data: e22[0] ? aj : sj } }), { c: function() { t2 = go("button"), Aa(n2.$$.fragment), So(t2, "type", "button"), So(t2, "class", "jse-replace-toggle svelte-18vllqh"), So(t2, "title", "Toggle visibility of replace options (Ctrl+H)"); }, m: function(a2, s2) { vo(a2, t2, s2), Ma(n2, t2, null), r2 = true, i2 || (o2 = xo(t2, "click", e22[11]), i2 = true); }, p: function(e23, t3) { var r3 = {}; 1 & t3 && (r3.data = e23[0] ? aj : sj), n2.$set(r3); }, i: function(e23) { r2 || (ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), i2 = false, o2(); } }; } function hJ(e22) { var t2, n2; return t2 = new tS({ props: { data: bj } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: Bi, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function dJ(e22) { var t2, n2; return t2 = new tS({ props: { data: fj, spin: true } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: Bi, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function vJ(e22) { var t2, n2, r2, i2, o2, a2, s2, u2; return { c: function() { t2 = go("div"), n2 = go("input"), r2 = ko(), (i2 = go("button")).textContent = "Replace", o2 = ko(), (a2 = go("button")).textContent = "All", So(n2, "class", "jse-replace-input svelte-18vllqh"), So(n2, "title", "Enter replacement text"), So(n2, "type", "text"), So(n2, "placeholder", "Replace"), So(i2, "type", "button"), So(i2, "title", "Replace current occurrence (Ctrl+Enter)"), So(i2, "class", "svelte-18vllqh"), So(a2, "type", "button"), So(a2, "title", "Replace all occurrences"), So(a2, "class", "svelte-18vllqh"), So(t2, "class", "jse-replace-section svelte-18vllqh"); }, m: function(c2, l2) { vo(c2, t2, l2), uo(t2, n2), Mo(n2, e22[9]), uo(t2, r2), uo(t2, i2), uo(t2, o2), uo(t2, a2), s2 || (u2 = [xo(n2, "input", e22[25]), xo(i2, "click", e22[14]), xo(a2, "click", e22[15])], s2 = true); }, p: function(e23, t3) { 512 & t3 && n2.value !== e23[9] && Mo(n2, e23[9]); }, d: function(e23) { e23 && po(t2), s2 = false, Wi(u2); } }; } function pJ(e22) { var t2, n2, r2 = e22[1] && lJ(e22); return { c: function() { r2 && r2.c(), t2 = wo(); }, m: function(e23, i2) { r2 && r2.m(e23, i2), vo(e23, t2, i2), n2 = true; }, p: function(e23, n3) { var i2 = ki(n3, 1)[0]; e23[1] ? r2 ? (r2.p(e23, i2), 2 & i2 && ya(r2, 1)) : ((r2 = lJ(e23)).c(), ya(r2, 1), r2.m(t2.parentNode, t2)) : r2 && (ma(), ba(r2, 1, 1, function() { r2 = null; }), ga()); }, i: function(e23) { n2 || (ya(r2), n2 = true); }, o: function(e23) { ba(r2), n2 = false; }, d: function(e23) { r2 && r2.d(e23), e23 && po(t2); } }; } function mJ(e22) { e22.select(); } function gJ(e22, t2, n2) { var r2, i2, o2 = t2.show, a2 = o2 !== void 0 && o2, s2 = t2.searching, u2 = t2.resultCount, c2 = u2 === void 0 ? 0 : u2, l2 = t2.activeIndex, f2 = l2 === void 0 ? 0 : l2, h2 = t2.showReplace, d2 = h2 !== void 0 && h2, v2 = t2.readOnly, p2 = v2 !== void 0 && v2, m2 = t2.onChange, g2 = m2 === void 0 ? Wu : m2, y2 = t2.onPrevious, b2 = y2 === void 0 ? Wu : y2, k2 = t2.onNext, w2 = k2 === void 0 ? Wu : k2, x2 = t2.onReplace, j2 = x2 === void 0 ? Wu : x2, S2 = t2.onReplaceAll, C2 = S2 === void 0 ? Wu : S2, _2 = t2.onClose, $2 = _2 === void 0 ? Wu : _2, O2 = "", A2 = "", M2 = ""; function E2() { n2(0, d2 = !d2 && !p2); } function P2() { p2 || j2(O2, M2); } return e22.$$set = function(e23) { "show" in e23 && n2(1, a2 = e23.show), "searching" in e23 && n2(2, s2 = e23.searching), "resultCount" in e23 && n2(16, c2 = e23.resultCount), "activeIndex" in e23 && n2(3, f2 = e23.activeIndex), "showReplace" in e23 && n2(0, d2 = e23.showReplace), "readOnly" in e23 && n2(4, p2 = e23.readOnly), "onChange" in e23 && n2(17, g2 = e23.onChange), "onPrevious" in e23 && n2(5, b2 = e23.onPrevious), "onNext" in e23 && n2(6, w2 = e23.onNext), "onReplace" in e23 && n2(18, j2 = e23.onReplace), "onReplaceAll" in e23 && n2(19, C2 = e23.onReplaceAll), "onClose" in e23 && n2(7, $2 = e23.onClose); }, e22.$$.update = function() { 65536 & e22.$$.dirty && n2(10, r2 = c2 >= 1e3 ? "".concat(999, "+") : String(c2)), 131072 & e22.$$.dirty && n2(20, i2 = tv(g2, 300)), 1048832 & e22.$$.dirty && i2(O2), 2 & e22.$$.dirty && a2 && O2 !== "" && g2(O2); }, [d2, a2, s2, f2, p2, b2, w2, $2, O2, M2, r2, E2, function(e23) { e23.preventDefault(), O2 !== A2 ? (A2 = O2, i2.cancel(), g2(O2)) : w2(); }, function(e23) { e23.stopPropagation(); var t3 = zx(e23); t3 === "Enter" && (e23.preventDefault(), w2()), t3 === "Shift+Enter" && (e23.preventDefault(), b2()), t3 !== "Ctrl+Enter" && t3 !== "Command+Enter" || (e23.preventDefault(), d2 ? P2() : w2()), t3 === "Ctrl+H" && (e23.preventDefault(), E2()), t3 === "Escape" && (e23.preventDefault(), $2()); }, P2, function() { p2 || C2(O2, M2); }, c2, g2, j2, C2, i2, function() { O2 = this.value, n2(8, O2); }, function() { return w2(); }, function() { return b2(); }, function() { return $2(); }, function() { M2 = this.value, n2(9, M2); }]; } var yJ = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, gJ, pJ, Ki, { show: 1, searching: 2, resultCount: 16, activeIndex: 3, showReplace: 0, readOnly: 4, onChange: 17, onPrevious: 5, onNext: 6, onReplace: 18, onReplaceAll: 19, onClose: 7 }, cJ), r2; } return zi(n2); }(), bJ = xa.window; function kJ(e22) { co(e22, "svelte-1wno2xw", ".jse-tree-mode.svelte-1wno2xw.svelte-1wno2xw{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color);line-height:var(--jse-line-height)}.jse-tree-mode.svelte-1wno2xw .jse-hidden-input-label.svelte-1wno2xw{position:absolute;right:0;top:0;width:0;height:0}.jse-tree-mode.svelte-1wno2xw .jse-hidden-input-label .jse-hidden-input.svelte-1wno2xw{width:0;height:0;padding:0;border:0;outline:none}.jse-tree-mode.svelte-1wno2xw .jse-search-box-container.svelte-1wno2xw{position:relative;height:0;top:var(--jse-padding);margin-right:calc(var(--jse-padding) + 20px);margin-left:var(--jse-padding);text-align:right;z-index:3}.jse-tree-mode.no-main-menu.svelte-1wno2xw.svelte-1wno2xw{border-top:var(--jse-main-border)}.jse-tree-mode.svelte-1wno2xw .jse-contents.svelte-1wno2xw{border-left:var(--jse-main-border);border-right:var(--jse-main-border);flex:1;overflow:auto;position:relative;padding:2px;display:flex;flex-direction:column}.jse-tree-mode.svelte-1wno2xw .jse-contents.svelte-1wno2xw:last-child{border-bottom:var(--jse-main-border)}.jse-tree-mode.svelte-1wno2xw .jse-contents .jse-loading-space.svelte-1wno2xw{flex:1}.jse-tree-mode.svelte-1wno2xw .jse-contents .jse-loading.svelte-1wno2xw{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-tree-mode.svelte-1wno2xw .jse-preview.svelte-1wno2xw{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;padding:2px}"); } function wJ(e22) { var t2, n2, r2; function i2(t3) { e22[69](t3); } var o2 = { json: e22[7], selection: e22[13].selection, readOnly: e22[0], historyState: e22[19], onExpandAll: e22[37], onCollapseAll: e22[38], onUndo: e22[33], onRedo: e22[34], onSort: e22[35], onTransform: e22[36], onContextMenu: e22[42], onCopy: e22[31], onRenderMenu: e22[4] }; return e22[16] !== void 0 && (o2.showSearch = e22[16]), t2 = new PW({ props: o2 }), Xo.push(function() { return Oa(t2, "showSearch", i2); }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, n3) { Ma(t2, e23, n3), r2 = true; }, p: function(e23, r3) { var i3 = {}; 128 & r3[0] && (i3.json = e23[7]), 8192 & r3[0] && (i3.selection = e23[13].selection), 1 & r3[0] && (i3.readOnly = e23[0]), 524288 & r3[0] && (i3.historyState = e23[19]), 16 & r3[0] && (i3.onRenderMenu = e23[4]), !n2 && 65536 & r3[0] && (n2 = true, i3.showSearch = e23[16], sa(function() { return n2 = false; })), t2.$set(i3); }, i: function(e23) { r2 || (ya(t2.$$.fragment, e23), r2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), r2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function xJ(e22) { var t2, n2; return t2 = new uJ({ props: { json: e22[7], documentState: e22[13], onSelect: e22[45] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 128 & n3[0] && (r2.json = e23[7]), 8192 & n3[0] && (r2.documentState = e23[13]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function jJ(e22) { var t2; return { c: function() { (t2 = go("div")).innerHTML = '
    \n
    loading...
    ', So(t2, "class", "jse-contents svelte-1wno2xw"); }, m: function(e23, n2) { vo(e23, t2, n2); }, p: Bi, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function SJ(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2 = [_J, CJ], f2 = []; function h2(e23, t3) { return e23[7] === void 0 ? 0 : 1; } return i2 = h2(e22), o2 = f2[i2] = l2[i2](e22), { c: function() { t2 = go("label"), n2 = go("input"), r2 = ko(), o2.c(), a2 = wo(), So(n2, "class", "jse-hidden-input svelte-1wno2xw"), So(n2, "tabindex", "-1"), So(t2, "class", "jse-hidden-input-label svelte-1wno2xw"); }, m: function(o3, l3) { vo(o3, t2, l3), uo(t2, n2), e22[70](n2), vo(o3, r2, l3), f2[i2].m(o3, l3), vo(o3, a2, l3), s2 = true, u2 || (c2 = xo(n2, "paste", e22[32]), u2 = true); }, p: function(e23, t3) { var n3 = i2; (i2 = h2(e23)) === n3 ? f2[i2].p(e23, t3) : (ma(), ba(f2[n3], 1, 1, function() { f2[n3] = null; }), ga(), (o2 = f2[i2]) ? o2.p(e23, t3) : (o2 = f2[i2] = l2[i2](e23)).c(), ya(o2, 1), o2.m(a2.parentNode, a2)); }, i: function(e23) { s2 || (ya(o2), s2 = true); }, o: function(e23) { ba(o2), s2 = false; }, d: function(n3) { n3 && po(t2), e22[70](null), n3 && po(r2), f2[i2].d(n3), n3 && po(a2), u2 = false, c2(); } }; } function CJ(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2, l2, f2, h2, d2, v2; a2 = new yJ({ props: { show: e22[16], resultCount: ((t2 = e22[14]) === null || t2 === void 0 || (n2 = t2.items) === null || n2 === void 0 ? void 0 : n2.length) || 0, activeIndex: ((r2 = e22[14]) === null || r2 === void 0 ? void 0 : r2.activeIndex) || 0, showReplace: e22[17], searching: e22[18], readOnly: e22[0], onChange: e22[24], onNext: e22[25], onPrevious: e22[26], onReplace: e22[27], onReplaceAll: e22[28], onClose: e22[29] } }), c2 = new AW({ props: { value: e22[7], path: e22[23], expandedMap: e22[13].expandedMap, enforceStringMap: e22[13].enforceStringMap, visibleSectionsMap: e22[13].visibleSectionsMap, validationErrorsMap: e22[21], searchResultItemsMap: (i2 = e22[14]) === null || i2 === void 0 ? void 0 : i2.itemsMap, selection: e22[13].selection, context: e22[10], onDragSelectionStart: Wu } }); var p2 = e22[15] && $J(e22), m2 = e22[20] && OJ(e22); return d2 = new SS({ props: { validationErrors: e22[9], selectError: e22[30] } }), { c: function() { o2 = go("div"), Aa(a2.$$.fragment), s2 = ko(), u2 = go("div"), Aa(c2.$$.fragment), l2 = ko(), p2 && p2.c(), f2 = ko(), m2 && m2.c(), h2 = ko(), Aa(d2.$$.fragment), So(o2, "class", "jse-search-box-container svelte-1wno2xw"), So(u2, "class", "jse-contents svelte-1wno2xw"), So(u2, "data-jsoneditor-scrollable-contents", true); }, m: function(t3, n3) { vo(t3, o2, n3), Ma(a2, o2, null), vo(t3, s2, n3), vo(t3, u2, n3), Ma(c2, u2, null), e22[71](u2), vo(t3, l2, n3), p2 && p2.m(t3, n3), vo(t3, f2, n3), m2 && m2.m(t3, n3), vo(t3, h2, n3), Ma(d2, t3, n3), v2 = true; }, p: function(e23, t3) { var n3, r3, i3, o3, s3 = {}; 65536 & t3[0] && (s3.show = e23[16]), 16384 & t3[0] && (s3.resultCount = ((n3 = e23[14]) === null || n3 === void 0 || (r3 = n3.items) === null || r3 === void 0 ? void 0 : r3.length) || 0), 16384 & t3[0] && (s3.activeIndex = ((i3 = e23[14]) === null || i3 === void 0 ? void 0 : i3.activeIndex) || 0), 131072 & t3[0] && (s3.showReplace = e23[17]), 262144 & t3[0] && (s3.searching = e23[18]), 1 & t3[0] && (s3.readOnly = e23[0]), a2.$set(s3); var u3 = {}; 128 & t3[0] && (u3.value = e23[7]), 8192 & t3[0] && (u3.expandedMap = e23[13].expandedMap), 8192 & t3[0] && (u3.enforceStringMap = e23[13].enforceStringMap), 8192 & t3[0] && (u3.visibleSectionsMap = e23[13].visibleSectionsMap), 2097152 & t3[0] && (u3.validationErrorsMap = e23[21]), 16384 & t3[0] && (u3.searchResultItemsMap = (o3 = e23[14]) === null || o3 === void 0 ? void 0 : o3.itemsMap), 8192 & t3[0] && (u3.selection = e23[13].selection), 1024 & t3[0] && (u3.context = e23[10]), c2.$set(u3), e23[15] ? p2 ? (p2.p(e23, t3), 32768 & t3[0] && ya(p2, 1)) : ((p2 = $J(e23)).c(), ya(p2, 1), p2.m(f2.parentNode, f2)) : p2 && (ma(), ba(p2, 1, 1, function() { p2 = null; }), ga()), e23[20] ? m2 ? (m2.p(e23, t3), 1048576 & t3[0] && ya(m2, 1)) : ((m2 = OJ(e23)).c(), ya(m2, 1), m2.m(h2.parentNode, h2)) : m2 && (ma(), ba(m2, 1, 1, function() { m2 = null; }), ga()); var l3 = {}; 512 & t3[0] && (l3.validationErrors = e23[9]), d2.$set(l3); }, i: function(e23) { v2 || (ya(a2.$$.fragment, e23), ya(c2.$$.fragment, e23), ya(p2), ya(m2), ya(d2.$$.fragment, e23), v2 = true); }, o: function(e23) { ba(a2.$$.fragment, e23), ba(c2.$$.fragment, e23), ba(p2), ba(m2), ba(d2.$$.fragment, e23), v2 = false; }, d: function(t3) { t3 && po(o2), Ea(a2), t3 && po(s2), t3 && po(u2), Ea(c2), e22[71](null), t3 && po(l2), p2 && p2.d(t3), t3 && po(f2), m2 && m2.d(t3), t3 && po(h2), Ea(d2, t3); } }; } function _J(e22) { var t2, n2, r2, i2, o2 = [MJ, AJ], a2 = []; function s2(e23, t3) { return e23[8] === "" || e23[8] === void 0 ? 0 : 1; } return t2 = s2(e22), n2 = a2[t2] = o2[t2](e22), { c: function() { n2.c(), r2 = wo(); }, m: function(e23, n3) { a2[t2].m(e23, n3), vo(e23, r2, n3), i2 = true; }, p: function(e23, i3) { var u2 = t2; (t2 = s2(e23)) === u2 ? a2[t2].p(e23, i3) : (ma(), ba(a2[u2], 1, 1, function() { a2[u2] = null; }), ga(), (n2 = a2[t2]) ? n2.p(e23, i3) : (n2 = a2[t2] = o2[t2](e23)).c(), ya(n2, 1), n2.m(r2.parentNode, r2)); }, i: function(e23) { i2 || (ya(n2), i2 = true); }, o: function(e23) { ba(n2), i2 = false; }, d: function(e23) { a2[t2].d(e23), e23 && po(r2); } }; } function $J(e22) { var t2, n2; return t2 = new cS({ props: { type: "info", message: "You pasted a JSON ".concat(Array.isArray(e22[15].contents) ? "array" : "object", " as text"), actions: [{ icon: _j, text: "Paste as JSON instead", onMouseDown: e22[43] }, { text: "Leave as is", onClick: e22[44] }] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 32768 & n3[0] && (r2.message = "You pasted a JSON ".concat(Array.isArray(e23[15].contents) ? "array" : "object", " as text")), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function OJ(e22) { var t2, n2; return t2 = new cS({ props: { type: "success", message: "The loaded JSON document was invalid but is successfully repaired.", actions: e22[0] ? [] : [{ icon: uj, text: "Ok", onClick: e22[5] }, { icon: dj, text: "Repair manually instead", onClick: e22[3] }] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 9 & n3[0] && (r2.actions = e23[0] ? [] : [{ icon: uj, text: "Ok", onClick: e23[5] }, { icon: dj, text: "Repair manually instead", onClick: e23[3] }]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function AJ(e22) { var t2, n2, r2, i2, o2, a2 = Gq(e22[8], 2e4) + ""; return t2 = new cS({ props: { type: "error", message: "The loaded JSON document is invalid and could not be repaired automatically.", actions: e22[0] ? [] : [{ icon: dj, text: "Repair manually", onClick: e22[3] }] } }), { c: function() { Aa(t2.$$.fragment), n2 = ko(), r2 = go("div"), i2 = bo(a2), So(r2, "class", "jse-preview svelte-1wno2xw"); }, m: function(e23, a3) { Ma(t2, e23, a3), vo(e23, n2, a3), vo(e23, r2, a3), uo(r2, i2), o2 = true; }, p: function(e23, n3) { var r3 = {}; 9 & n3[0] && (r3.actions = e23[0] ? [] : [{ icon: dj, text: "Repair manually", onClick: e23[3] }]), t2.$set(r3), (!o2 || 256 & n3[0]) && a2 !== (a2 = Gq(e23[8], 2e4) + "") && Ao(i2, a2); }, i: function(e23) { o2 || (ya(t2.$$.fragment, e23), o2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), o2 = false; }, d: function(e23) { Ea(t2, e23), e23 && po(n2), e23 && po(r2); } }; } function MJ(e22) { var t2, n2; return t2 = new DW({ props: { readOnly: e22[0] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 1 & n3[0] && (r2.readOnly = e23[0]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function EJ(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2 = e22[1] && wJ(e22), l2 = e22[2] && xJ(e22), f2 = [SJ, jJ], h2 = []; return i2 = function(e23, t3) { return e23[22] ? 1 : 0; }(e22), o2 = h2[i2] = f2[i2](e22), { c: function() { t2 = go("div"), c2 && c2.c(), n2 = ko(), l2 && l2.c(), r2 = ko(), o2.c(), So(t2, "class", "jse-tree-mode svelte-1wno2xw"), To(t2, "no-main-menu", !e22[1]); }, m: function(o3, f3) { vo(o3, t2, f3), c2 && c2.m(t2, null), uo(t2, n2), l2 && l2.m(t2, null), uo(t2, r2), h2[i2].m(t2, null), e22[72](t2), a2 = true, s2 || (u2 = [xo(bJ, "mousedown", e22[46]), xo(t2, "keydown", e22[39]), xo(t2, "mousedown", e22[40]), xo(t2, "contextmenu", e22[41])], s2 = true); }, p: function(e23, i3) { e23[1] ? c2 ? (c2.p(e23, i3), 2 & i3[0] && ya(c2, 1)) : ((c2 = wJ(e23)).c(), ya(c2, 1), c2.m(t2, n2)) : c2 && (ma(), ba(c2, 1, 1, function() { c2 = null; }), ga()), e23[2] ? l2 ? (l2.p(e23, i3), 4 & i3[0] && ya(l2, 1)) : ((l2 = xJ(e23)).c(), ya(l2, 1), l2.m(t2, r2)) : l2 && (ma(), ba(l2, 1, 1, function() { l2 = null; }), ga()), o2.p(e23, i3), 2 & i3[0] && To(t2, "no-main-menu", !e23[1]); }, i: function(e23) { a2 || (ya(c2), ya(l2), ya(o2), a2 = true); }, o: function(e23) { ba(c2), ba(l2), ba(o2), a2 = false; }, d: function(n3) { n3 && po(t2), c2 && c2.d(), l2 && l2.d(), h2[i2].d(), e22[72](null), s2 = false, Wi(u2); } }; } function PJ(e22) { return e22.length === 0 || e22.length === 1 && e22[0] === "0"; } function NJ() { return true; } function TJ(e22, t2, n2) { var r2, i2 = Da("jsoneditor:TreeMode"), o2 = typeof window == "undefined"; i2("isSSR:", o2); var a2, s2, u2, c2, l2, f2 = Yo("simple-modal").open, h2 = Jk(), d2 = Jk(), v2 = Yo("absolute-popup"), p2 = v2.openAbsolutePopup, m2 = v2.closeAbsolutePopup, g2 = false, y2 = mq(), b2 = t2.readOnly, k2 = b2 !== void 0 && b2, w2 = t2.externalContent, x2 = t2.mainMenuBar, j2 = x2 === void 0 || x2, S2 = t2.navigationBar, C2 = S2 === void 0 || S2, _2 = t2.escapeControlCharacters, $2 = _2 !== void 0 && _2, O2 = t2.escapeUnicodeCharacters, A2 = O2 !== void 0 && O2, M2 = t2.validator, E2 = M2 === void 0 ? null : M2, P2 = t2.indentation, N2 = P2 === void 0 ? 2 : P2, T2 = t2.onError, I2 = t2.onChange, R2 = t2.onRenderValue, D2 = t2.onRequestRepair, z2 = D2 === void 0 ? Wu : D2, L2 = t2.onRenderMenu, B2 = L2 === void 0 ? Wu : L2, q2 = t2.onClassName, F2 = t2.onFocus, V2 = t2.onBlur, H2 = t2.onSortModal, W2 = t2.onTransformModal, J2 = false; Mj({ onMount: Uo, onDestroy: Ko, getWindow: function() { return Mx(u2); }, hasFocus: function() { return J2 && document.hasFocus() || Ex(u2); }, onFocus: function() { g2 = true, F2 && F2(); }, onBlur: function() { g2 = false, V2 && V2(); } }); var U2 = []; function K2(e23) { i2("updateSelection", e23); var t3 = typeof e23 == "function" ? e23(Z2.selection) : e23; jm(t3, Z2.selection) || n2(13, Z2 = xi(xi({}, Z2), {}, { selection: t3 })); } var G2, Q2, Y2, Z2 = wq({ json: c2, expand: X2(c2) }); function X2(e23) { return ix({ json: e23 }, 10240) ? PJ : NJ; } var ee2 = false, te2 = false, ne2 = false, re2 = ""; function ie2(e23) { return oe2.apply(this, arguments); } function oe2() { return (oe2 = yi(mi().mark(function e23(t3) { return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: return i2("search text updated", t3), n2(68, re2 = t3), e24.next = 4, oa(); case 4: return e24.next = 6, le2(); case 6: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function ae2() { return (ae2 = yi(mi().mark(function e23() { return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: return n2(14, G2 = G2 ? DF(G2) : void 0), e24.next = 3, le2(); case 3: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function se2() { return (se2 = yi(mi().mark(function e23() { return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: return n2(14, G2 = G2 ? zF(G2) : void 0), e24.next = 3, le2(); case 3: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function ue2() { return (ue2 = yi(mi().mark(function e23(t3, n3) { var r3, o3, a3, s3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (r3 = G2 == null ? void 0 : G2.activeItem, i2("handleReplace", { replacementText: n3, activeItem: r3 }), r3) { e24.next = 4; break; } return e24.abrupt("return"); case 4: return o3 = VF(c2, Z2, n3, r3), a3 = o3.operations, s3 = o3.newSelection, at2(a3, function(e25, t4) { return { state: xi(xi({}, t4), {}, { selection: s3 }) }; }), e24.next = 8, oa(); case 8: return e24.next = 10, le2(); case 10: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function ce2() { return (ce2 = yi(mi().mark(function e23(t3, n3) { var r3, o3, a3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: return i2("handleReplaceAll", { text: t3, replacementText: n3 }), r3 = HF(c2, Z2, t3, n3), o3 = r3.operations, a3 = r3.newSelection, at2(o3, function(e25, t4) { return { state: xi(xi({}, t4), {}, { selection: a3 }) }; }), e24.next = 5, oa(); case 5: return e24.next = 7, le2(); case 7: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function le2() { return fe2.apply(this, arguments); } function fe2() { return (fe2 = yi(mi().mark(function e23() { var t3, r3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (t3 = G2 == null ? void 0 : G2.activeItem, i2("focusActiveSearchResult", G2), !t3) { e24.next = 9; break; } return r3 = t3.path, n2(13, Z2 = xi(xi({}, Sq(c2, Z2, r3)), {}, { selection: void 0 })), e24.next = 7, oa(); case 7: return e24.next = 9, tt2(r3); case 9: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } var he2 = Uq({ onChange: function(e23) { n2(19, de2 = e23); } }), de2 = he2.getState(); var ve2, pe2, me2 = hk(function() { if (re2 === "") return i2("clearing search result"), void (G2 !== void 0 && n2(14, G2 = void 0)); n2(18, ne2 = true), setTimeout(function() { i2("searching...", re2); var e23 = LF(re2, c2, Z2, 1e3); n2(14, G2 = function(e24, t3, n3) { var r3 = (n3 == null ? void 0 : n3.activeItem) ? WF(n3.activeItem) : void 0, i3 = t3.findIndex(function(e25) { return jm(r3, WF(e25)); }), o3 = i3 !== -1 ? i3 : (n3 == null ? void 0 : n3.activeIndex) < t3.length ? n3 == null ? void 0 : n3.activeIndex : t3.length > 0 ? 0 : -1, a3 = t3.map(function(e25, t4) { return xi(xi({}, e25), {}, { active: t4 === o3 }); }), s3 = a3[o3]; return { items: a3, itemsMap: Np(a3, function(e25) { return fs.exports.compileJSONPointer(e25.path); }), activeItem: s3, activeIndex: o3 }; }(0, e23, G2)), n2(18, ne2 = false); }); }, 300), ge2 = false, ye2 = []; function be2() { return c2; } function ke2() { return Z2; } function we2(e23) { e23.json !== void 0 && function(e24) { if (e24 === void 0) return; var t3 = !jm(c2, e24); if (i2("update external json", { isChanged: t3, currentlyText: c2 === void 0 }), !t3) return; var r3 = Z2, o3 = c2, a3 = l2, s3 = ge2; n2(7, c2 = e24), n2(13, Z2 = Cq(c2, Z2, U2, X2(c2))), n2(8, l2 = void 0), n2(20, ge2 = false), xe2(c2), je2({ previousJson: o3, previousState: r3, previousText: a3, previousTextIsRepaired: s3 }); }(e23.json), e23.text !== void 0 && function(e24) { if (e24 === void 0 || w2.json !== void 0) return; if (e24 === l2) return; i2("update external text"); var t3 = c2, r3 = Z2, o3 = l2, a3 = ge2; try { n2(7, c2 = JSON.parse(e24)), n2(13, Z2 = Cq(c2, Z2, U2, X2(c2))), n2(8, l2 = e24), n2(20, ge2 = false), xe2(c2); } catch (t4) { try { n2(7, c2 = JSON.parse(Os(e24))), n2(13, Z2 = Cq(c2, Z2, U2, X2(c2))), n2(8, l2 = e24), n2(20, ge2 = true), xe2(c2); } catch (e25) { n2(7, c2 = void 0), n2(8, l2 = w2.text), n2(20, ge2 = false), xe2(c2); } } je2({ previousJson: t3, previousState: r3, previousText: o3, previousTextIsRepaired: a3 }); }(e23.text); } function xe2(e23) { Z2.selection !== void 0 && (Z2.selection && fs.exports.existsIn(e23, Z2.selection.anchorPath) && fs.exports.existsIn(e23, Z2.selection.focusPath) || (i2("clearing selection: path does not exist anymore", Z2.selection), n2(13, Z2 = xi(xi({}, Z2), {}, { selection: void 0 })))); } function je2(e23) { var t3 = e23.previousJson, n3 = e23.previousState, r3 = e23.previousText, i3 = e23.previousTextIsRepaired; t3 === void 0 && r3 === void 0 || (c2 !== void 0 ? t3 !== void 0 ? he2.add({ undo: { patch: [{ op: "replace", path: "", value: t3 }], state: pF(n3), json: void 0, text: r3, textIsRepaired: i3 }, redo: { patch: [{ op: "replace", path: "", value: c2 }], state: pF(Z2), json: void 0, text: l2, textIsRepaired: ge2 } }) : he2.add({ undo: { patch: void 0, json: void 0, text: r3, state: pF(n3), textIsRepaired: i3 }, redo: { patch: void 0, json: c2, state: pF(Z2), text: l2, textIsRepaired: ge2 } }) : t3 !== void 0 && he2.add({ undo: { patch: void 0, json: t3, state: pF(n3), text: r3, textIsRepaired: i3 }, redo: { patch: void 0, json: void 0, text: l2, textIsRepaired: ge2, state: pF(Z2) } })); } function Se2() { i2("createDefaultSelection"), n2(13, Z2 = xi(xi({}, Z2), {}, { selection: kF(c2 || {}, [], []) })); } function Ce2(e23, t3) { if (i2("patch", e23, t3), c2 === void 0) throw new Error("Cannot apply patch: no JSON"); var r3 = c2, o3 = Z2, a3 = l2, s3 = ge2, u3 = function(e24, t4) { return fs.exports.revertJSONPatch(e24, t4, { before: function(e25, t5, n3) { if (fs.exports.isJSONPatchRemove(t5)) { var r4 = fs.exports.parseJSONPointer(t5.path); return { revertOperations: [].concat(Ni(n3), Ni(RF(e25, r4))) }; } if (fs.exports.isJSONPatchMove(t5)) { var i3 = fs.exports.parseJSONPointer(t5.from); return { revertOperations: [].concat(Ni(n3), Ni(RF(e25, i3))) }; } return { revertOperations: n3 }; } }); }(c2, e23), f3 = Aq(c2, Z2, e23), h3 = cF(c2, e23), d3 = function(e24, t4) { var n3 = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2]; return t4 !== void 0 || n3 ? xi(xi({}, e24), {}, { selection: t4 }) : e24; }(f3.documentState, h3, false); i2("patch updatedSelection", h3); var v3 = typeof t3 == "function" ? t3(f3.json, d3) : void 0; n2(7, c2 = v3 && v3.json !== void 0 ? v3.json : f3.json); var p3 = v3 && v3.state !== void 0 ? v3.state : d3; return n2(13, Z2 = p3), n2(8, l2 = void 0), n2(20, ge2 = false), xe2(c2), he2.add({ undo: { patch: u3, json: void 0, text: a3, state: pF(o3), textIsRepaired: s3 }, redo: { patch: e23, json: void 0, state: pF(p3), text: l2, textIsRepaired: ge2 } }), { json: c2, previousJson: r3, undo: u3, redo: e23 }; } function _e2(e23) { return tF(e23) || Xq(e23) || eF(e23); } function $e2() { !k2 && Z2.selection && K2(mF(Z2.selection.focusPath, true)); } function Oe2() { !k2 && Z2.selection && K2(gF(Z2.selection.focusPath, true)); } function Ae2() { if (!k2 && eF(Z2.selection)) { var e23 = Z2.selection.focusPath, t3 = fs.exports.compileJSONPointer(e23), n3 = fs.exports.getIn(c2, e23), r3 = !Bq(n3, Z2.enforceStringMap, t3), o3 = r3 ? String(n3) : Is(String(n3)); i2("handleToggleEnforceString", { enforceString: r3, value: n3, updatedValue: o3 }), at2([{ op: "replace", path: fs.exports.compileJSONPointer(e23), value: o3 }], function(e24, n4) { return { state: Oq(n4, t3, r3) }; }); } } function Me2() { return Ee2.apply(this, arguments); } function Ee2() { return (Ee2 = yi(mi().mark(function e23() { var t3, n3, r3, o3, a3, s3, u3 = arguments; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (t3 = !(u3.length > 0 && u3[0] !== void 0) || u3[0], !k2 && _e2(Z2.selection)) { e24.next = 3; break; } return e24.abrupt("return"); case 3: if (n3 = t3 ? N2 : null, (r3 = wF(c2, Z2.selection, n3)) != null) { e24.next = 7; break; } return e24.abrupt("return"); case 7: return i2("cut", { selection: Z2.selection, clipboard: r3, indent: t3 }), e24.prev = 8, e24.next = 11, navigator.clipboard.writeText(r3); case 11: e24.next = 16; break; case 13: e24.prev = 13, e24.t0 = e24.catch(8), T2(e24.t0); case 16: o3 = IF(c2, Z2.selection), a3 = o3.operations, s3 = o3.newSelection, at2(a3, function(e25, t4) { return { state: xi(xi({}, t4), {}, { selection: s3 }) }; }); case 18: case "end": return e24.stop(); } }, e23, null, [[8, 13]]); }))).apply(this, arguments); } function Pe2() { return Ne2.apply(this, arguments); } function Ne2() { return (Ne2 = yi(mi().mark(function e23() { var t3, n3, r3, o3 = arguments; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (t3 = !(o3.length > 0 && o3[0] !== void 0) || o3[0], n3 = t3 ? N2 : null, (r3 = wF(c2, Z2.selection, n3)) != null) { e24.next = 5; break; } return e24.abrupt("return"); case 5: return i2("copy", { clipboard: r3, indent: t3 }), e24.prev = 6, e24.next = 9, navigator.clipboard.writeText(r3); case 9: e24.next = 14; break; case 11: e24.prev = 11, e24.t0 = e24.catch(6), T2(e24.t0); case 14: case "end": return e24.stop(); } }, e23, null, [[6, 11]]); }))).apply(this, arguments); } function Te2() { f2(tV, {}, xi(xi({}, es), {}, { styleWindow: { width: "450px" } }), { onClose: function() { return mt2(); } }); } function Ie2(e23) { if (c2 !== void 0) { Z2.selection || Se2(); var t3 = EF(c2, Z2.selection, e23); i2("paste", { clipboardText: e23, operations: t3, selection: Z2.selection }), at2(t3, function(e24, n3) { var r3 = n3; return t3.filter(function(e25) { return (fs.exports.isJSONPatchAdd(e25) || fs.exports.isJSONPatchReplace(e25)) && Ms(e25.value); }).forEach(function(t4) { var n4 = fs.exports.parsePath(c2, t4.path); r3 = ut2(e24, r3, n4); }), { state: r3 }; }); } else i2("paste text", { clipboardText: e23 }), function(e24, t4) { i2("handleChangeText"); var r3 = Z2, o3 = c2, a3 = l2, s3 = { json: c2, text: l2 }, u3 = ge2; try { n2(7, c2 = JSON.parse(e24)), n2(13, Z2 = Cq(c2, Z2, U2, PJ)), n2(8, l2 = void 0), n2(20, ge2 = false); } catch (t5) { try { n2(7, c2 = JSON.parse(Os(e24))), n2(13, Z2 = Cq(c2, Z2, U2, PJ)), n2(8, l2 = e24), n2(20, ge2 = true); } catch (t6) { n2(7, c2 = void 0), n2(13, Z2 = wq({ json: c2, expand: PJ })), n2(8, l2 = e24), n2(20, ge2 = false); } } if (typeof t4 == "function") { var f3 = t4(c2, Z2); n2(7, c2 = f3 && f3.json ? f3.json : c2), n2(13, Z2 = f3 && f3.state ? f3.state : Z2); } xe2(c2), je2({ previousJson: o3, previousState: r3, previousText: a3, previousTextIsRepaired: u3 }), ot2(s3, null); }(e23, function(e24, t4) { if (e24) { return { state: ut2(e24, t4, []) }; } }); } function Re2() { if (!k2 && Z2.selection) { var e23 = Xq(Z2.selection) || eF(Z2.selection) ? kF(c2, Z2.selection.anchorPath, Z2.selection.focusPath) : Z2.selection; if (xm(Z2.selection.focusPath)) { i2("remove root", { selection: Z2.selection }); I2({ text: "", json: void 0 }, { text: l2, json: c2 }, null); } else { var t3 = IF(c2, e23), n3 = t3.operations, r3 = t3.newSelection; i2("remove", { operations: n3, selection: Z2.selection, newSelection: r3 }), at2(n3, function(e24, t4) { return { state: xi(xi({}, t4), {}, { selection: r3 }) }; }); } } } function De2() { k2 || !_e2(Z2.selection) || xm(Z2.selection.focusPath) || (i2("duplicate", { selection: Z2.selection }), at2(function(e23, t3) { var n3 = kv(t3); if (xm(n3)) throw new Error("Cannot duplicate root object"); var r3 = Yp(n3), i3 = kv(n3), o3 = fs.exports.getIn(e23, r3); if (Gw(o3)) { var a3 = kv(t3), s3 = a3 ? Uw(kv(a3)) + 1 : 0; return Ni(t3.map(function(e24, t4) { return { op: "copy", from: fs.exports.compileJSONPointer(e24), path: fs.exports.compileJSONPointer(r3.concat(String(t4 + s3))) }; })); } if (Kw(o3)) { var u3 = Object.keys(o3), c3 = qq(u3, i3, false); return [].concat(Ni(t3.map(function(e24) { var t4 = Kq(kv(e24), u3); return { op: "copy", from: fs.exports.compileJSONPointer(e24), path: fs.exports.compileJSONPointer(r3.concat(t4)) }; })), Ni(c3.map(function(e24) { return NF(r3, e24); }))); } throw new Error("Cannot create duplicate operations: parent must be an Object or Array"); }(c2, xF(Z2.selection)))); } function ze2() { k2 || !Z2.selection || !tF(Z2.selection) && !eF(Z2.selection) || xm(Z2.selection.focusPath) || (i2("extract", { selection: Z2.selection }), at2(function(e23, t3) { if (eF(t3)) return [{ op: "move", from: fs.exports.compileJSONPointer(t3.focusPath), path: "" }]; if (!tF(t3)) throw new Error("Cannot create extract operations: parent must be an Object or Array"); var n3 = Yp(t3.focusPath), r3 = fs.exports.getIn(e23, n3); if (Gw(r3)) return [{ op: "replace", path: "", value: t3.paths.map(function(e24) { var t4 = Uw(kv(e24)); return r3[t4]; }) }]; if (Kw(r3)) { var i3 = {}; return t3.paths.forEach(function(e24) { var t4 = String(kv(e24)); i3[t4] = r3[t4]; }), [{ op: "replace", path: "", value: i3 }]; } throw new Error("Cannot extract: unsupported type of selection " + JSON.stringify(t3)); }(c2, Z2.selection), function(e23, t3) { if (Ms(e23)) { return { state: ut2(e23, t3, []) }; } })); } function Le2(e23) { if (!k2 && Z2.selection) { var t3 = function(e24, t4, n4) { if (n4 === "object") return {}; if (n4 === "array") return []; if (n4 === "structure") { var r4 = nF(t4), i3 = fs.exports.getIn(e24, r4); if (Array.isArray(i3) && !xm(i3)) { var o4 = fp(i3); return Ms(o4) ? od(o4, function(e25) { return Array.isArray(e25) ? [] : As(e25) ? void 0 : ""; }) : ""; } } return ""; }(c2, Z2.selection, e23); if (c2 !== void 0) { var n3 = JSON.stringify(t3), r3 = EF(c2, Z2.selection, n3); i2("handleInsert", { type: e23, operations: r3, newValue: t3, data: n3 }); var o3 = kv(r3.filter(function(e24) { return e24.op === "add" || e24.op === "replace"; })); at2(r3, function(e24, n4) { if (o3) { var r4 = fs.exports.parsePath(e24, o3.path); if (Ms(t3)) return { state: xi(xi({}, Cq(e24, n4, r4, NJ)), {}, { selection: yF(r4) }) }; if (t3 === "") { var a4 = xm(r4) ? null : fs.exports.getIn(e24, Yp(r4)); return i2("test A", r4, yF(r4)), { state: Sq(e24, xi(xi({}, Z2), {}, { selection: As(a4) ? mF(r4, true) : gF(r4, true) }), r4) }; } } }), i2("after patch"), o3 && t3 === "" && oa().then(function() { setTimeout(function() { return He2("", true); }); }); } else { i2("handleInsert", { type: e23, newValue: t3 }); var a3 = []; st2(t3, function(e24, t4) { return { state: xi(xi({}, ut2(e24, t4, a3)), {}, { selection: yF(a3) }) }; }); } } } function Be2(e23) { Xq(Z2.selection) && K2(gF(Z2.selection.focusPath, false)), Le2(e23); } function qe2(e23) { if (!k2 && Z2.selection) if (SF(Z2.selection)) try { var t3 = Z2.selection.anchorPath, n3 = fs.exports.getIn(c2, t3), r3 = function(e24, t4) { if (t4 === "array") { if (Array.isArray(e24)) return e24; if (As(e24)) return Ww(e24); if (typeof e24 == "string") { var n4 = JSON.parse(e24); if (Array.isArray(n4)) return n4; if (As(n4)) return Ww(n4); } } if (t4 === "object") { if (Array.isArray(e24)) return Hw(e24); if (As(e24)) return e24; if (typeof e24 == "string") { var r4 = JSON.parse(e24); if (As(r4)) return r4; if (Array.isArray(r4)) return Hw(r4); } } if (t4 === "value") return Ms(e24) ? JSON.stringify(e24) : e24; throw new Error("Cannot convert ".concat(Ps(e24), " to ").concat(t4)); }(n3, e23); if (r3 === n3) return; var o3 = [{ op: "replace", path: fs.exports.compileJSONPointer(t3), value: r3 }]; i2("handleConvert", { selection: Z2.selection, path: t3, type: e23, operations: o3 }), at2(o3, function(e24, t4) { return { state: ut2(e24, t4, Z2.selection.focusPath) }; }); } catch (e24) { T2(e24); } else T2(new Error("Cannot convert current selection to ".concat(e23))); } function Fe2() { var e23 = aF(c2, Z2, false), t3 = Yp(Z2.selection.focusPath); !xm(e23.focusPath) && jm(t3, Yp(e23.focusPath)) ? K2(bF(e23.focusPath)) : K2(yF(t3)), i2("insert before", { selection: Z2.selection, selectionBefore: e23, parentPath: t3 }), oa().then(vt2); } function Ve2() { var e23 = tF(Z2.selection) ? kv(Z2.selection.paths) : Z2.selection.focusPath; i2("insert after", e23), K2(bF(e23)), oa().then(vt2); } function He2(e23, t3) { var n3 = Mx(u2).document.activeElement; n3.isContentEditable && (n3.textContent = t3 ? e23 : n3.textContent + e23, Ax(n3)); } function We2(e23) { return Je2.apply(this, arguments); } function Je2() { return (Je2 = yi(mi().mark(function e23(t3) { var n3, r3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (!k2 && Z2.selection) { e24.next = 2; break; } return e24.abrupt("return"); case 2: if (!Xq(Z2.selection)) { e24.next = 9; break; } return n3 = !Z2.selection.edit, K2(xi(xi({}, Z2.selection), {}, { edit: true })), e24.next = 7, oa(); case 7: return setTimeout(function() { return He2(t3, n3); }), e24.abrupt("return"); case 9: if (t3 !== "{") { e24.next = 13; break; } Le2("object"), e24.next = 28; break; case 13: if (t3 !== "[") { e24.next = 17; break; } Le2("array"), e24.next = 28; break; case 17: if (!eF(Z2.selection)) { e24.next = 26; break; } if (Ms(fs.exports.getIn(c2, Z2.selection.focusPath))) { e24.next = 24; break; } return r3 = !Z2.selection.edit, K2(xi(xi({}, Z2.selection), {}, { edit: true })), e24.next = 23, oa(); case 23: setTimeout(function() { return He2(t3, r3); }); case 24: e24.next = 28; break; case 26: return e24.next = 28, Ue2(t3); case 28: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function Ue2(e23) { return Ke2.apply(this, arguments); } function Ke2() { return (Ke2 = yi(mi().mark(function e23(t3) { var n3, r3, i3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (!k2 && Z2.selection) { e24.next = 2; break; } return e24.abrupt("return"); case 2: return Le2("value"), n3 = !jF(Z2.selection), r3 = Z2.selection.focusPath, i3 = fs.exports.getIn(c2, Yp(r3)), Array.isArray(i3) || !i3 || eF(Z2.selection) ? K2(gF(r3, true)) : K2(mF(r3, true)), e24.next = 9, oa(); case 9: setTimeout(function() { return He2(t3, n3); }); case 10: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function Ge2() { if (!k2 && he2.getState().canUndo) { var e23 = he2.undo(); if (e23) { var t3 = { json: c2, text: l2 }; n2(7, c2 = e23.undo.patch ? fs.exports.immutableJSONPatch(c2, e23.undo.patch) : e23.undo.json), n2(13, Z2 = e23.undo.state), n2(8, l2 = e23.undo.text), n2(20, ge2 = e23.undo.textIsRepaired), i2("undo", { item: e23, json: c2, documentState: Z2 }), ot2(t3, { json: c2, previousJson: t3.json, redo: e23.undo.patch, undo: e23.redo.patch }), mt2(), Z2.selection && tt2(Z2.selection.focusPath, false); } } } function Qe2() { if (!k2 && he2.getState().canRedo) { var e23 = he2.redo(); if (e23) { var t3 = { json: c2, text: l2 }; n2(7, c2 = e23.redo.patch ? fs.exports.immutableJSONPatch(c2, e23.redo.patch) : e23.redo.json), n2(13, Z2 = e23.redo.state), n2(8, l2 = e23.redo.text), n2(20, ge2 = e23.redo.textIsRepaired), i2("redo", { item: e23, json: c2, documentState: Z2 }), ot2(t3, { json: c2, previousJson: t3.json, redo: e23.redo.patch, undo: e23.undo.patch }), mt2(), Z2.selection && tt2(Z2.selection.focusPath, false); } } } function Ye2(e23) { var t3; k2 || (J2 = true, H2({ id: h2, json: c2, selectedPath: e23, onSort: (t3 = yi(mi().mark(function t4(n3) { return mi().wrap(function(t5) { for (; ; ) switch (t5.prev = t5.next) { case 0: i2("onSort", e23, n3), at2(n3, function(t6, n4) { return { state: xi(xi({}, ut2(t6, n4, e23)), {}, { selection: gF(e23, false) }) }; }); case 2: case "end": return t5.stop(); } }, t4); })), function(e24) { return t3.apply(this, arguments); }), onClose: function() { J2 = false, mt2(); } })); } function Ze2() { Z2.selection && Ye2(dF(c2, Z2.selection)); } function Xe2(e23) { var t3 = e23.id, n3 = e23.selectedPath, r3 = e23.onTransform, o3 = e23.onClose; J2 = true, W2({ id: t3 || d2, json: c2, selectedPath: n3, onTransform: r3 ? function(e24) { r3({ operations: e24, json: c2, transformedJson: fs.exports.immutableJSONPatch(c2, e24) }); } : function(e24) { i2("onTransform", n3, e24), at2(e24, function(e25, t4) { return { state: xi(xi({}, ut2(e25, t4, n3)), {}, { selection: gF(n3, false) }) }; }); }, onClose: function() { J2 = false, mt2(), o3 && o3(); } }); } function et2() { Z2.selection && Xe2({ selectedPath: dF(c2, Z2.selection) }); } function tt2(e23) { return nt2.apply(this, arguments); } function nt2() { return (nt2 = yi(mi().mark(function e23(t3) { var r3, o3, s3, u3, l3, f3 = arguments; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: return r3 = !(f3.length > 1 && f3[1] !== void 0) || f3[1], n2(13, Z2 = Sq(c2, Z2, Yp(t3))), e24.next = 4, oa(); case 4: if (!(o3 = rt2(t3))) { e24.next = 14; break; } if (i2("scrollTo", { path: t3, elem: o3, refContents: a2 }), s3 = a2.getBoundingClientRect(), u3 = o3.getBoundingClientRect(), r3) { e24.next = 12; break; } if (!(u3.bottom > s3.top && u3.top < s3.bottom)) { e24.next = 12; break; } return e24.abrupt("return"); case 12: l3 = -s3.height / 4, y2(o3, { container: a2, offset: l3, duration: 300 }); case 14: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function rt2(e23) { return a2 ? a2.querySelector('div[data-path="'.concat(Tx(e23), '"]')) : null; } function it2(e23) { var t3 = rt2(e23); if (t3 && a2) { var n3 = a2.getBoundingClientRect(), r3 = t3.getBoundingClientRect(), i3 = Ms(fs.exports.getIn(c2, e23)) ? 20 : r3.height; r3.top < n3.top + 20 ? y2(t3, { container: a2, offset: -20, duration: 0 }) : r3.top + i3 > n3.bottom - 20 && y2(t3, { container: a2, offset: -(n3.height - i3 - 20), duration: 0 }); } } function ot2(e23, t3) { l2 !== void 0 ? I2({ text: l2, json: void 0 }, e23, t3) : c2 !== void 0 && I2({ text: void 0, json: c2 }, e23, t3); } function at2(e23, t3) { if (!k2) { i2("handlePatch", e23, t3); var r3 = { json: c2, text: l2 }, o3 = Ce2(e23, t3); return n2(15, Y2 = void 0), ot2(r3, o3), o3; } } function st2(e23, t3) { var r3 = Z2, i3 = c2, o3 = l2, a3 = { json: c2, text: l2 }, s3 = ge2, u3 = Cq(c2, Z2, U2, PJ), f3 = typeof t3 == "function" ? t3(e23, u3) : void 0; n2(7, c2 = f3 && f3.json !== void 0 ? f3.json : e23), n2(13, Z2 = f3 && f3.state !== void 0 ? f3.state : u3), n2(8, l2 = void 0), n2(20, ge2 = false), xe2(c2), je2({ previousJson: i3, previousState: r3, previousText: o3, previousTextIsRepaired: s3 }); ot2(a3, null); } function ut2(e23, t3, n3) { return Cq(e23, t3, n3, !ix({ json: fs.exports.getIn(e23, n3) }, 10240) ? NJ : PJ); } function ct2(e23, t3) { var r3 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2]; i2("expand", { path: e23, expanded: t3, recursive: r3 }), n2(13, Z2 = t3 ? r3 ? Cq(c2, Z2, e23, NJ) : _q(Z2, e23) : $q(Z2, e23)), Z2.selection && !t3 && oF(Z2.selection, e23) && K2(void 0), setTimeout(function() { Ex(u2) || mt2(); }); } function lt2(e23) { i2("openFind", { findAndReplace: e23 }), n2(16, ee2 = false), n2(17, te2 = false), oa().then(function() { n2(16, ee2 = true), n2(17, te2 = e23); }); } function ft2(e23, t3) { i2("handleExpandSection", e23, t3); var r3 = fs.exports.compileJSONPointer(e23); n2(13, Z2 = function(e24, t4, n3, r4) { return xi(xi({}, t4), {}, { visibleSectionsMap: xi(xi({}, t4.visibleSectionsMap), {}, ji({}, n3, gq(xq(t4, n3).concat(r4)))) }); }(0, Z2, r3, t3)); } function ht2(e23) { i2("pasted json as text", e23), n2(15, Y2 = e23); } function dt2(e23) { var t3 = e23.anchor, n3 = e23.left, r3 = e23.top, i3 = e23.width, o3 = e23.height, a3 = e23.offsetTop, s3 = e23.offsetLeft, u3 = e23.showTip; J2 = true; var l3 = p2(NV, { json: c2, documentState: Z2, showTip: u3, onEditKey: $e2, onEditValue: Oe2, onToggleEnforceString: Ae2, onCut: Me2, onCopy: Pe2, onPaste: Te2, onRemove: Re2, onDuplicate: De2, onExtract: ze2, onInsertBefore: Fe2, onInsert: Be2, onConvert: qe2, onInsertAfter: Ve2, onSort: Ze2, onTransform: et2, onCloseContextMenu: function() { m2(l3), mt2(); } }, { left: n3, top: r3, offsetTop: a3, offsetLeft: s3, width: i3, height: o3, anchor: t3, closeOnOuterClick: true, onClose: function() { J2 = false, mt2(); } }); } function vt2(e23) { if (!k2 && !jF(Z2.selection)) { if (e23 && (e23.stopPropagation(), e23.preventDefault()), e23 && e23.type === "contextmenu" && e23.target !== s2) dt2({ left: e23.clientX, top: e23.clientY, width: 260, height: 336, showTip: false }); else { var t3 = a2 == null ? void 0 : a2.querySelector(".jse-context-menu-button.jse-selected"); if (t3) dt2({ anchor: t3, offsetTop: 2, width: 260, height: 336, showTip: false }); else { var n3 = a2 == null ? void 0 : a2.getBoundingClientRect(); n3 && dt2({ top: n3.top + 2, left: n3.left + 2, width: 260, height: 336, showTip: false }); } } return false; } } function pt2() { return (pt2 = yi(mi().mark(function e23() { var t3, n3, r3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: return i2("apply pasted json", Y2), n3 = (t3 = Y2).path, r3 = t3.contents, K2(gF(n3, false)), e24.next = 5, oa(); case 5: at2([{ op: "replace", path: fs.exports.compileJSONPointer(n3), value: r3 }], function(e25, t4) { return { state: ut2(e25, t4, n3) }; }); case 7: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function mt2() { i2("focus"), s2 && (s2.focus(), s2.select()); } function gt2(e23) { r2 && r2.onDrag(e23); } function yt2() { r2 && r2.onDragEnd(); } return e22.$$set = function(e23) { "readOnly" in e23 && n2(0, k2 = e23.readOnly), "externalContent" in e23 && n2(47, w2 = e23.externalContent), "mainMenuBar" in e23 && n2(1, j2 = e23.mainMenuBar), "navigationBar" in e23 && n2(2, C2 = e23.navigationBar), "escapeControlCharacters" in e23 && n2(48, $2 = e23.escapeControlCharacters), "escapeUnicodeCharacters" in e23 && n2(49, A2 = e23.escapeUnicodeCharacters), "validator" in e23 && n2(50, E2 = e23.validator), "indentation" in e23 && n2(51, N2 = e23.indentation), "onError" in e23 && n2(52, T2 = e23.onError), "onChange" in e23 && n2(53, I2 = e23.onChange), "onRenderValue" in e23 && n2(54, R2 = e23.onRenderValue), "onRequestRepair" in e23 && n2(3, z2 = e23.onRequestRepair), "onRenderMenu" in e23 && n2(4, B2 = e23.onRenderMenu), "onClassName" in e23 && n2(55, q2 = e23.onClassName), "onFocus" in e23 && n2(56, F2 = e23.onFocus), "onBlur" in e23 && n2(57, V2 = e23.onBlur), "onSortModal" in e23 && n2(58, H2 = e23.onSortModal), "onTransformModal" in e23 && n2(59, W2 = e23.onTransformModal); }, e22.$$.update = function() { 393216 & e22.$$.dirty[1] && n2(67, Q2 = dx({ escapeControlCharacters: $2, escapeUnicodeCharacters: A2 })), 65536 & e22.$$.dirty[1] && we2(w2), 128 & e22.$$.dirty[0] | 64 & e22.$$.dirty[2] && me2(re2, c2), e22.$$.dirty[0], 128 & e22.$$.dirty[0] | 524288 & e22.$$.dirty[1] && function(e23, t3) { var r3 = t3 ? t3(e23) : []; jm(r3, ye2) || (i2("updateValidationErrors", r3), n2(9, ye2 = r3)); }(c2, E2), 512 & e22.$$.dirty[0] && n2(21, ve2 = function(e23) { var t3 = {}; return e23.forEach(function(e24) { t3[fs.exports.compileJSONPointer(e24.path)] = e24; }), e23.forEach(function(e24) { for (var n3 = e24.path; n3.length > 0; ) { n3 = Yp(n3); var r3 = fs.exports.compileJSONPointer(n3); r3 in t3 || (t3[r3] = { isChildError: true, path: n3, message: "Contains invalid data" }); } }), t3; }(ye2)), 64 & e22.$$.dirty[0] && (r2 = a2 ? function(e23) { var t3, n3; function r3(e24) { return e24 < 20 ? 200 : e24 < 50 ? 400 : 1200; } function i3() { if (e23) { var n4 = 0.05 * t3; e23.scrollTop += n4; } } function o3(e24) { n3 && e24 === t3 || (a3(), vq("startAutoScroll", e24), t3 = e24, n3 = setInterval(i3, 50)); } function a3() { n3 && (vq("stopAutoScroll"), clearInterval(n3), n3 = void 0, t3 = void 0); } return vq("createAutoScrollHandler", e23), { onDrag: function(t4) { if (e23) { var n4 = t4.clientY, i4 = e23.getBoundingClientRect(), s3 = i4.top, u3 = i4.bottom; n4 < s3 ? o3(-r3(s3 - n4)) : n4 > u3 ? o3(r3(n4 - u3)) : a3(); } }, onDragEnd: function() { a3(); } }; }(a2) : void 0), 1 & e22.$$.dirty[0] | 25165824 & e22.$$.dirty[1] | 32 & e22.$$.dirty[2] && n2(10, pe2 = { readOnly: k2, normalization: Q2, getJson: be2, getDocumentState: ke2, findElement: rt2, focus: mt2, onPatch: at2, onInsert: Le2, onExpand: ct2, onSelect: K2, onFind: lt2, onExpandSection: ft2, onPasteJson: ht2, onRenderValue: R2, onContextMenu: dt2, onClassName: q2 || function() { }, onDrag: gt2, onDragEnd: yt2 }), 1024 & e22.$$.dirty[0] && i2("context changed", pe2); }, [k2, j2, C2, z2, B2, function() { return ge2 && c2 !== void 0 && st2(c2), { json: c2, text: l2 }; }, a2, c2, l2, ye2, pe2, s2, u2, Z2, G2, Y2, ee2, te2, ne2, de2, ge2, ve2, o2, U2, ie2, function() { return ae2.apply(this, arguments); }, function() { return se2.apply(this, arguments); }, function(e23, t3) { return ue2.apply(this, arguments); }, function(e23, t3) { return ce2.apply(this, arguments); }, function() { n2(16, ee2 = false), n2(17, te2 = false), ie2(""), mt2(); }, function(e23) { i2("select validation error", e23), K2(gF(e23.path, false)), tt2(e23.path); }, Pe2, function(e23) { if (e23.preventDefault(), !k2) { var t3 = e23.clipboardData.getData("text/plain"); try { Ie2(t3); } catch (e24) { !function(e25, t4) { f2(hV, { text: e25, onParse: Zw, onRepair: Xw, onApply: t4, onRenderMenu: B2 }, xi(xi({}, es), {}, { styleWindow: { width: "600px", height: "500px" }, styleContent: { padding: 0, height: "100%" } }), { onClose: function() { return mt2(); } }); }(t3, function(e25) { i2("repaired pasted text: ", e25), Ie2(e25); }); } } }, Ge2, Qe2, function() { Ye2([]); }, function() { Xe2({ selectedPath: [] }); }, function() { ct2([], true, true); }, function() { ct2([], false, true); }, function(e23) { var t3 = zx(e23).replace(/^Command\+/, "Ctrl+"), n3 = e23.shiftKey; if (t3 === "Ctrl+X" && (e23.preventDefault(), Me2(true)), t3 === "Ctrl+Shift+X" && (e23.preventDefault(), Me2(false)), t3 === "Ctrl+C" && (e23.preventDefault(), Pe2(true)), t3 === "Ctrl+Shift+C" && (e23.preventDefault(), Pe2(false)), t3 === "Ctrl+D" && (e23.preventDefault(), De2()), t3 !== "Delete" && t3 !== "Backspace" || (e23.preventDefault(), Re2()), t3 === "Insert" && (e23.preventDefault(), Le2("structure")), t3 === "Ctrl+A" && (e23.preventDefault(), K2(gF([], false))), t3 === "Ctrl+Q" && vt2(e23), t3 === "Up" || t3 === "Shift+Up") { e23.preventDefault(); var r3 = Z2.selection ? aF(c2, Z2, n3, true) || Z2.selection : uF(c2, Z2); K2(r3), it2(r3.focusPath); } if (t3 === "Down" || t3 === "Shift+Down") { e23.preventDefault(); var i3 = Z2.selection ? function(e24, t4) { var n4 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r4 = arguments.length > 3 && arguments[3] !== void 0 && arguments[3], i4 = t4.selection, o4 = !r4 && tF(i4) ? kv(i4.paths) : i4.focusPath, a4 = Wq(e24, t4, o4), s4 = a4, u4 = a4; if (a4 === null) return null; if (n4) { var c3 = Wq(e24, Ms(fs.exports.getIn(e24, o4)) ? $q(t4, o4) : t4, o4); return c3 === null ? null : Yq(i4) ? kF(e24, c3, c3) : Zq(i4) ? kF(e24, s4, u4) : kF(e24, i4.anchorPath, c3); } if (Xq(i4)) { var l4 = Yp(a4), f4 = fs.exports.getIn(e24, l4); return Array.isArray(f4) ? gF(u4, false) : mF(u4, false); } return eF(i4) ? gF(u4, false) : Zq(i4) ? kF(e24, s4, u4) : kF(e24, a4, a4); }(c2, Z2, n3, true) || Z2.selection : uF(c2, Z2); K2(i3), it2(i3.focusPath); } if (t3 === "Left" || t3 === "Shift+Left") { e23.preventDefault(); var o3 = Z2.selection ? function(e24, t4) { var n4 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r4 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], i4 = t4.selection, o4 = sF(e24, t4, r4), a4 = o4.caret, s4 = o4.previous; if (n4) return tF(i4) ? null : kF(e24, i4.anchorPath, i4.focusPath); if (a4 && s4) return CF(s4); var u4 = Yp(i4.focusPath), c3 = fs.exports.getIn(e24, u4); return eF(i4) && Array.isArray(c3) ? kF(e24, i4.focusPath, i4.focusPath) : tF(i4) && !Array.isArray(c3) ? mF(i4.focusPath, false) : null; }(c2, Z2, n3, !k2) || Z2.selection : uF(c2, Z2); K2(o3), it2(o3.focusPath); } if (t3 === "Right" || t3 === "Shift+Right") { e23.preventDefault(); var a3 = Z2.selection ? function(e24, t4) { var n4 = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r4 = !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3], i4 = t4.selection, o4 = sF(e24, t4, r4), a4 = o4.caret, s4 = o4.next; return n4 ? tF(i4) ? null : kF(e24, i4.anchorPath, i4.focusPath) : a4 && s4 ? CF(s4) : tF(i4) ? gF(i4.focusPath, false) : null; }(c2, Z2, n3, !k2) || Z2.selection : uF(c2, Z2); K2(a3), it2(a3.focusPath); } if (t3 === "Enter" && Z2.selection) { if (!k2 && tF(Z2.selection) && Z2.selection.paths.length === 1) { var s3 = Z2.selection.focusPath, u3 = fs.exports.getIn(c2, Yp(s3)); Array.isArray(u3) && K2(gF(s3, false)); } if (!k2 && Xq(Z2.selection) && (e23.preventDefault(), K2(xi(xi({}, Z2.selection), {}, { edit: true }))), eF(Z2.selection)) e23.preventDefault(), Ms(fs.exports.getIn(c2, Z2.selection.focusPath)) ? ct2(Z2.selection.focusPath, true) : k2 || K2(xi(xi({}, Z2.selection), {}, { edit: true })); } if (t3.length === (t3.startsWith("Shift+") ? 7 : 1) && Z2.selection) return e23.preventDefault(), void We2(e23.key); if (t3 === "Enter" && (Yq(Z2.selection) || Zq(Z2.selection))) return e23.preventDefault(), void We2(""); if (t3 === "Ctrl+Enter" && eF(Z2.selection)) { var l3 = fs.exports.getIn(c2, Z2.selection.focusPath); Ts(l3) && window.open(String(l3), "_blank"); } if (t3 === "Escape" && Z2.selection && (e23.preventDefault(), K2(void 0)), t3 === "Ctrl+F" && (e23.preventDefault(), lt2(false)), t3 === "Ctrl+H" && (e23.preventDefault(), lt2(true)), t3 === "Ctrl+Z") { e23.preventDefault(); var f3 = document.activeElement; f3 && f3.blur && f3.focus ? (f3.blur(), setTimeout(function() { Ge2(), setTimeout(function() { return f3.select(); }); })) : Ge2(); } if (t3 === "Ctrl+Shift+Z") { e23.preventDefault(); var h3 = document.activeElement; h3 && h3.blur && h3.focus ? (h3.blur(), setTimeout(function() { Qe2(), setTimeout(function() { return h3.select(); }); })) : Qe2(); } }, function(e23) { i2("handleMouseDown", e23), setTimeout(function() { setTimeout(function() { g2 || Cx(e23.target, "BUTTON") || (mt2(), Z2.selection || c2 !== void 0 || l2 !== "" && l2 !== void 0 || Se2()); }); }); }, vt2, function(e23) { k2 || dt2({ anchor: Px(e23.target, "BUTTON"), offsetTop: 0, width: 260, height: 336, showTip: true }); }, function() { return pt2.apply(this, arguments); }, function() { i2("clear pasted json"), n2(15, Y2 = void 0); }, function(e23) { K2(e23), mt2(), tt2(e23.focusPath); }, function(e23) { !$x(e23.target, function(e24) { return e24 === u2; }) && jF(Z2.selection) && (i2("click outside the editor, stop edit mode"), K2(function(e24) { return Xq(e24) || eF(e24) ? xi(xi({}, e24), {}, { edit: false }) : e24; }), g2 && s2 && (s2.focus(), s2.blur()), oa().then(function() { setTimeout(function() { s2 && s2.blur(); }); })); }, w2, $2, A2, E2, N2, T2, I2, R2, q2, F2, V2, H2, W2, function() { var e23 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function() { return true; }; i2("expand"); var t3 = xi(xi({}, Z2), {}, { expandedMap: {}, visibleSectionsMap: {} }); n2(13, Z2 = Cq(c2, t3, U2, e23)); }, be2, Ce2, Xe2, tt2, rt2, mt2, Q2, re2, function(e23) { n2(16, ee2 = e23); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(11, s2 = e23); }); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(6, a2 = e23); }); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(12, u2 = e23); }); }]; } var IJ = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, TJ, EJ, Ki, { readOnly: 0, externalContent: 47, mainMenuBar: 1, navigationBar: 2, escapeControlCharacters: 48, escapeUnicodeCharacters: 49, validator: 50, indentation: 51, onError: 52, onChange: 53, onRenderValue: 54, onRequestRepair: 3, onRenderMenu: 4, onClassName: 55, onFocus: 56, onBlur: 57, onSortModal: 58, onTransformModal: 59, expand: 60, getJson: 61, patch: 62, acceptAutoRepair: 5, openTransformModal: 63, scrollTo: 64, findElement: 65, focus: 66 }, kJ, [-1, -1, -1, -1, -1]), r2; } return zi(n2, [{ key: "expand", get: function() { return this.$$.ctx[60]; } }, { key: "getJson", get: function() { return this.$$.ctx[61]; } }, { key: "patch", get: function() { return this.$$.ctx[62]; } }, { key: "acceptAutoRepair", get: function() { return this.$$.ctx[5]; } }, { key: "openTransformModal", get: function() { return this.$$.ctx[63]; } }, { key: "scrollTo", get: function() { return this.$$.ctx[64]; } }, { key: "findElement", get: function() { return this.$$.ctx[65]; } }, { key: "focus", get: function() { return this.$$.ctx[66]; } }]), n2; }(), RJ = { id: "javascript", name: "JavaScript", description: "\n

    \n Enter a JavaScript function to filter, sort, or transform the data.\n

    \n", createQuery: function(e22, t2) { var n2 = t2.filter, r2 = t2.sort, i2 = t2.projection, o2 = []; if (n2 && n2.path && n2.relation && n2.value) { var a2 = "item => item".concat(hS(n2.path)), s2 = typeof Qq(n2.value) == "string" ? "'".concat(n2.value, "'") : n2.value; o2.push(" data = data.filter(".concat(a2, " ").concat(n2.relation, " ").concat(s2, ")\n")); } r2 && r2.path && r2.direction && (r2.direction === "desc" ? o2.push(" data = data.slice().sort((a, b) => {\n // sort descending\n" + " const valueA = a".concat(hS(r2.path), "\n") + " const valueB = b".concat(hS(r2.path), "\n") + " return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n") : o2.push(" data = data.slice().sort((a, b) => {\n // sort ascending\n" + " const valueA = a".concat(hS(r2.path), "\n") + " const valueB = b".concat(hS(r2.path), "\n") + " return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n")); if (i2 && i2.paths) if (i2.paths.length > 1) { var u2 = i2.paths.map(function(e23) { var t3 = e23[e23.length - 1] || "item", n3 = "item".concat(hS(e23)); return " ".concat(JSON.stringify(t3), ": ").concat(n3); }); o2.push(" data = data.map(item => ({\n".concat(u2.join(",\n"), "})\n )\n")); } else { var c2 = "item".concat(hS(i2.paths[0])); o2.push(" data = data.map(item => ".concat(c2, ")\n")); } return o2.push(" return data\n"), "function query (data) {\n".concat(o2.join(""), "}"); }, executeQuery: function(e22, t2) { var n2 = new Function('"use strict";\n\n' + t2 + ` if (typeof query !== "function") { throw new Error("Cannot execute query: expecting a function named 'query' but is undefined") } return query; `)()(e22); return n2 !== void 0 ? n2 : null; } }; function DJ(e22) { co(e22, "svelte-zs5o25", ".jse-boolean-toggle.svelte-zs5o25{color:var(--jse-value-color-boolean);position:relative;padding-left:calc(0.5 * var(--jse-padding));padding-top:1px;height:var(--jse-line-height)}"); } function zJ(e22) { var t2, n2, r2, i2, o2, a2; return n2 = new tS({ props: { data: e22[0] === true ? CV : SV } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-boolean-toggle svelte-zs5o25"), So(t2, "title", r2 = e22[1] ? "Boolean value ".concat(e22[0]) : "Click to toggle this boolean value"); }, m: function(r3, s2) { vo(r3, t2, s2), Ma(n2, t2, null), i2 = true, o2 || (a2 = xo(t2, "mousedown", e22[2]), o2 = true); }, p: function(e23, o3) { var a3 = ki(o3, 1)[0], s2 = {}; 1 & a3 && (s2.data = e23[0] === true ? CV : SV), n2.$set(s2), (!i2 || 3 & a3 && r2 !== (r2 = e23[1] ? "Boolean value ".concat(e23[0]) : "Click to toggle this boolean value")) && So(t2, "title", r2); }, i: function(e23) { i2 || (ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), o2 = false, a2(); } }; } function LJ(e22, t2, n2) { var r2 = t2.path, i2 = t2.value, o2 = t2.readOnly, a2 = t2.onPatch, s2 = t2.focus; return e22.$$set = function(e23) { "path" in e23 && n2(3, r2 = e23.path), "value" in e23 && n2(0, i2 = e23.value), "readOnly" in e23 && n2(1, o2 = e23.readOnly), "onPatch" in e23 && n2(4, a2 = e23.onPatch), "focus" in e23 && n2(5, s2 = e23.focus); }, [i2, o2, function(e23) { e23.stopPropagation(), o2 || (a2([{ op: "replace", path: fs.exports.compileJSONPointer(r2), value: !i2 }]), setTimeout(s2)); }, r2, a2, s2]; } var BJ = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, LJ, zJ, Ki, { path: 3, value: 0, readOnly: 1, onPatch: 4, focus: 5 }, DJ), r2; } return zi(n2); }(); function qJ(e22) { co(e22, "svelte-1gn8yt9", ".jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup,.jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup .picker_arrow::before,.jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup .picker_arrow::after{background:var(--jse-color-picker-background);line-height:normal}.jse-color-picker-popup.svelte-1gn8yt9 .picker_slider,.jse-color-picker-popup.svelte-1gn8yt9 .picker_sl,.jse-color-picker-popup.svelte-1gn8yt9 .picker_editor input,.jse-color-picker-popup.svelte-1gn8yt9 .picker_sample,.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button{box-shadow:var(--jse-color-picker-border-box-shadow)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_editor input{background:var(--jse-background-color);color:var(--jse-text-color)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button{background:var(--jse-button-background);color:var(--jse-button-color)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button:hover{background:var(--jse-button-background-highlight)}"); } function FJ(e22) { var t2; return { c: function() { So(t2 = go("div"), "class", "jse-color-picker-popup svelte-1gn8yt9"); }, m: function(n2, r2) { vo(n2, t2, r2), e22[4](t2); }, p: Bi, i: Bi, o: Bi, d: function(n2) { n2 && po(t2), e22[4](null); } }; } function VJ(e22, t2, n2) { var r2, i2, o2 = t2.color, a2 = t2.onChange, s2 = t2.showOnTop; return Uo(yi(mi().mark(function e23() { var t3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: return e24.next = 2, Promise.resolve().then(function() { return UG; }); case 2: t3 = e24.sent.default, (i2 = new t3({ parent: r2, color: o2, popup: s2 ? "top" : "bottom", onDone: function(e25) { var t4 = e25.rgba[3] === 1 ? e25.hex.substring(0, 7) : e25.hex; a2(t4); } })).show(); case 5: case "end": return e24.stop(); } }, e23); }))), Ko(function() { i2 && i2.destroy(); }), e22.$$set = function(e23) { "color" in e23 && n2(1, o2 = e23.color), "onChange" in e23 && n2(2, a2 = e23.onChange), "showOnTop" in e23 && n2(3, s2 = e23.showOnTop); }, [r2, o2, a2, s2, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(0, r2 = e23); }); }]; } var HJ = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, VJ, FJ, Ui, { color: 1, onChange: 2, showOnTop: 3 }, qJ), r2; } return zi(n2); }(); function WJ(e22) { co(e22, "svelte-fk1u9y", ".jse-color-picker-button.svelte-fk1u9y{font-size:var(--jse-font-size-mono);width:var(--jse-color-picker-button-size);height:var(--jse-color-picker-button-size);box-sizing:border-box;padding:0;margin:2px;border:1px solid var(--jse-text-color);border-radius:2px;background:inherit;outline:none;cursor:pointer}"); } function JJ(e22) { var t2, n2, r2, i2; return { c: function() { So(t2 = go("button"), "class", "jse-color-picker-button svelte-fk1u9y"), Eo(t2, "background", e22[2]), So(t2, "title", n2 = e22[1] ? "Color ".concat(e22[0]) : "Click to open a color picker"); }, m: function(n3, o2) { vo(n3, t2, o2), r2 || (i2 = xo(t2, "click", e22[3]), r2 = true); }, p: function(e23, r3) { var i3 = ki(r3, 1)[0]; 4 & i3 && Eo(t2, "background", e23[2]), 3 & i3 && n2 !== (n2 = e23[1] ? "Color ".concat(e23[0]) : "Click to open a color picker") && So(t2, "title", n2); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2), r2 = false, i2(); } }; } function UJ(e22, t2, n2) { var r2, i2 = Yo("absolute-popup").openAbsolutePopup, o2 = t2.path, a2 = t2.value, s2 = t2.readOnly, u2 = t2.onPatch, c2 = t2.focus; function l2(e23) { u2([{ op: "replace", path: fs.exports.compileJSONPointer(o2), value: e23 }]), f2(); } function f2() { c2(); } return e22.$$set = function(e23) { "path" in e23 && n2(4, o2 = e23.path), "value" in e23 && n2(0, a2 = e23.value), "readOnly" in e23 && n2(1, s2 = e23.readOnly), "onPatch" in e23 && n2(5, u2 = e23.onPatch), "focus" in e23 && n2(6, c2 = e23.focus); }, e22.$$.update = function() { 1 & e22.$$.dirty && n2(2, r2 = Es(a2)); }, [a2, s2, r2, function(e23) { if (!s2) { var t3 = e23.target.getBoundingClientRect().top, n3 = Mx(e23.target).innerHeight; i2(HJ, { color: a2, onChange: l2, showOnTop: n3 - t3 < 300 && t3 > 300 }, { anchor: e23.target, closeOnOuterClick: true, onClose: f2, offsetTop: 18, offsetLeft: -8, height: 300 }); } }, o2, u2, c2]; } var KJ = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, UJ, JJ, Ki, { path: 4, value: 0, readOnly: 1, onPatch: 5, focus: 6 }, WJ), r2; } return zi(n2); }(); function GJ(e22) { var t2 = Ps(e22); return IV("jse-value", "jse-" + t2, { "jse-url": Ts(e22), "jse-empty": typeof e22 == "string" && e22.length === 0 }); } function QJ(e22) { var t2, n2; return t2 = new oH({ props: { value: e22[1].escapeValue(e22[0]), onChange: e22[3], onCancel: e22[4], onPaste: e22[5], onFind: e22[2], onValueClass: e22[6] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = ki(n3, 1)[0], i2 = {}; 3 & r2 && (i2.value = e23[1].escapeValue(e23[0])), 4 & r2 && (i2.onFind = e23[2]), t2.$set(i2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function YJ(e22, t2, n2) { var r2 = t2.path, i2 = t2.value, o2 = t2.normalization, a2 = t2.enforceString, s2 = t2.onPatch, u2 = t2.onPasteJson, c2 = t2.onSelect, l2 = t2.onFind, f2 = t2.focus; function h2(e23) { return a2 ? e23 : Is(e23); } return e22.$$set = function(e23) { "path" in e23 && n2(7, r2 = e23.path), "value" in e23 && n2(0, i2 = e23.value), "normalization" in e23 && n2(1, o2 = e23.normalization), "enforceString" in e23 && n2(8, a2 = e23.enforceString), "onPatch" in e23 && n2(9, s2 = e23.onPatch), "onPasteJson" in e23 && n2(10, u2 = e23.onPasteJson), "onSelect" in e23 && n2(11, c2 = e23.onSelect), "onFind" in e23 && n2(2, l2 = e23.onFind), "focus" in e23 && n2(12, f2 = e23.focus); }, [i2, o2, l2, function(e23, t3) { s2([{ op: "replace", path: fs.exports.compileJSONPointer(r2), value: h2(o2.unescapeValue(e23)) }], function(e24, n3) { var i3 = t3 === ss ? function(e25, t4, n4) { var r3 = Yp(n4), i4 = [kv(n4)], o3 = Wq(fs.exports.getIn(e25, r3), t4, i4); return o3 ? gF(r3.concat(o3), false) : bF(n4); }(e24, n3, r2) || n3.selection : gF(r2, false); return { state: xi(xi({}, n3), {}, { selection: i3 }) }; }), t3 !== as && f2(); }, function() { c2(gF(r2, false)), f2(); }, function(e23) { try { var t3 = JSON.parse(e23); Ms(t3) && u2({ path: r2, contents: t3 }); } catch (e24) { } }, function(e23) { return GJ(h2(o2.unescapeValue(e23))); }, r2, a2, s2, u2, c2, f2]; } var ZJ = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, YJ, QJ, Ki, { path: 7, value: 0, normalization: 1, enforceString: 8, onPatch: 9, onPasteJson: 10, onSelect: 11, onFind: 2, focus: 12 }), r2; } return zi(n2); }(); function XJ(e22) { co(e22, "svelte-6ci2p7", '.jse-value.jse-string.svelte-6ci2p7{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-6ci2p7,.jse-value.jse-array.svelte-6ci2p7{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-6ci2p7{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-6ci2p7{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-6ci2p7{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-6ci2p7{color:var(--jse-text-color)}.jse-value.jse-url.svelte-6ci2p7{color:var(--jse-value-color-url);text-decoration:underline}.jse-value.svelte-6ci2p7{min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;word-break:normal;overflow-wrap:anywhere;white-space:pre-wrap}.jse-value.svelte-6ci2p7:hover{background:var(--jse-hover-background-color)}.jse-value.jse-empty.svelte-6ci2p7{min-width:4em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-value.jse-empty.svelte-6ci2p7::after{pointer-events:none;color:var(--jse-tag-background);content:"value"}'); } function eU(e22) { var t2, n2 = Sx(e22[1].escapeValue(e22[0])) + ""; return { c: function() { t2 = bo(n2); }, m: function(e23, n3) { vo(e23, t2, n3); }, p: function(e23, r2) { 3 & r2 && n2 !== (n2 = Sx(e23[1].escapeValue(e23[0])) + "") && Ao(t2, n2); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function tU(e22) { var t2, n2; return t2 = new tH({ props: { text: e22[1].escapeValue(e22[0]), searchResultItems: e22[2] } }), { c: function() { Aa(t2.$$.fragment); }, m: function(e23, r2) { Ma(t2, e23, r2), n2 = true; }, p: function(e23, n3) { var r2 = {}; 3 & n3 && (r2.text = e23[1].escapeValue(e23[0])), 4 & n3 && (r2.searchResultItems = e23[2]), t2.$set(r2); }, i: function(e23) { n2 || (ya(t2.$$.fragment, e23), n2 = true); }, o: function(e23) { ba(t2.$$.fragment, e23), n2 = false; }, d: function(e23) { Ea(t2, e23); } }; } function nU(e22) { var t2, n2, r2, i2, o2, a2, s2, u2, c2 = [tU, eU], l2 = []; function f2(e23, t3) { return e23[2] ? 0 : 1; } return n2 = f2(e22), r2 = l2[n2] = c2[n2](e22), { c: function() { t2 = go("div"), r2.c(), So(t2, "data-type", "selectable-value"), So(t2, "class", i2 = eo(GJ(e22[0])) + " svelte-6ci2p7"), So(t2, "title", o2 = e22[3] ? "Ctrl+Click or Ctrl+Enter to open url in new window" : null); }, m: function(r3, i3) { vo(r3, t2, i3), l2[n2].m(t2, null), a2 = true, s2 || (u2 = [xo(t2, "click", e22[4]), xo(t2, "dblclick", e22[5])], s2 = true); }, p: function(e23, s3) { var u3 = ki(s3, 1)[0], h2 = n2; (n2 = f2(e23)) === h2 ? l2[n2].p(e23, u3) : (ma(), ba(l2[h2], 1, 1, function() { l2[h2] = null; }), ga(), (r2 = l2[n2]) ? r2.p(e23, u3) : (r2 = l2[n2] = c2[n2](e23)).c(), ya(r2, 1), r2.m(t2, null)), (!a2 || 1 & u3 && i2 !== (i2 = eo(GJ(e23[0])) + " svelte-6ci2p7")) && So(t2, "class", i2), (!a2 || 8 & u3 && o2 !== (o2 = e23[3] ? "Ctrl+Click or Ctrl+Enter to open url in new window" : null)) && So(t2, "title", o2); }, i: function(e23) { a2 || (ya(r2), a2 = true); }, o: function(e23) { ba(r2), a2 = false; }, d: function(e23) { e23 && po(t2), l2[n2].d(), s2 = false, Wi(u2); } }; } function rU(e22, t2, n2) { var r2, i2 = t2.path, o2 = t2.value, a2 = t2.readOnly, s2 = t2.normalization, u2 = t2.onSelect, c2 = t2.searchResultItems; return e22.$$set = function(e23) { "path" in e23 && n2(6, i2 = e23.path), "value" in e23 && n2(0, o2 = e23.value), "readOnly" in e23 && n2(7, a2 = e23.readOnly), "normalization" in e23 && n2(1, s2 = e23.normalization), "onSelect" in e23 && n2(8, u2 = e23.onSelect), "searchResultItems" in e23 && n2(2, c2 = e23.searchResultItems); }, e22.$$.update = function() { 1 & e22.$$.dirty && n2(3, r2 = Ts(o2)); }, [o2, s2, c2, r2, function(e23) { typeof o2 == "string" && r2 && e23.ctrlKey && (e23.preventDefault(), e23.stopPropagation(), window.open(o2, "_blank")); }, function(e23) { a2 || (e23.preventDefault(), u2(gF(i2, true))); }, i2, a2, u2]; } var iU = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, rU, nU, Ki, { path: 6, value: 0, readOnly: 7, normalization: 1, onSelect: 8, searchResultItems: 2 }, XJ), r2; } return zi(n2); }(); function oU(e22) { co(e22, "svelte-1u00zub", ".jse-timestamp.svelte-1u00zub{padding:0;margin:0;height:var(--jse-line-height);color:var(--jse-value-color-number);border-radius:3px}"); } function aU(e22) { var t2, n2, r2, i2, o2, a2; return n2 = new tS({ props: { data: xV } }), { c: function() { t2 = go("div"), Aa(n2.$$.fragment), So(t2, "class", "jse-timestamp svelte-1u00zub"); }, m: function(s2, u2) { vo(s2, t2, u2), Ma(n2, t2, null), i2 = true, o2 || (a2 = to(r2 = $H.call(null, t2, xi({ text: e22[0] }, e22[1]))), o2 = true); }, p: function(e23, t3) { var n3 = ki(t3, 1)[0]; r2 && Ji(r2.update) && 1 & n3 && r2.update.call(null, xi({ text: e23[0] }, e23[1])); }, i: function(e23) { i2 || (ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), Ea(n2), o2 = false, a2(); } }; } function sU(e22, t2, n2) { var r2, i2 = Yo("absolute-popup"), o2 = t2.value; return e22.$$set = function(e23) { "value" in e23 && n2(2, o2 = e23.value); }, e22.$$.update = function() { 4 & e22.$$.dirty && n2(0, r2 = "Time: ".concat(new Date(o2).toString())); }, [r2, i2, o2]; } var uU = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, sU, aU, Ki, { value: 2 }, oU), r2; } return zi(n2); }(); function cU(e22) { var t2 = e22.path, n2 = e22.value, r2 = e22.readOnly, i2 = e22.enforceString, o2 = e22.searchResultItems, a2 = e22.isEditing, s2 = e22.normalization, u2 = e22.onPatch, c2 = e22.onPasteJson, l2 = e22.onSelect, f2 = e22.onFind, h2 = e22.focus, d2 = []; return !a2 && function(e23) { return e23 === true || e23 === false; }(n2) && d2.push({ component: BJ, props: { path: t2, value: n2, readOnly: r2, onPatch: u2, focus: h2 } }), !a2 && function(e23) { return typeof e23 == "string" && !!Es(e23); }(n2) && d2.push({ component: KJ, props: { path: t2, value: n2, readOnly: r2, onPatch: u2, focus: h2 } }), a2 && d2.push({ component: ZJ, props: { path: t2, value: n2, enforceString: i2, normalization: s2, onPatch: u2, onPasteJson: c2, onSelect: l2, onFind: f2, focus: h2 } }), a2 || d2.push({ component: iU, props: { path: t2, value: n2, readOnly: r2, normalization: s2, searchResultItems: o2, onSelect: l2 } }), !a2 && function(e23) { return typeof e23 == "number" && e23 > 9466848e5 && isFinite(e23) && Math.floor(e23) === e23 && !isNaN(new Date(e23).valueOf()); }(n2) && d2.push({ component: uU, props: { value: n2 } }), d2; } var lU = {}; function fU(e22) { co(e22, "svelte-3e0qet", ".item.svelte-3e0qet{cursor:default;height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--itemPadding, 0 20px);color:var(--itemColor, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.groupHeader.svelte-3e0qet{text-transform:var(--groupTitleTextTransform, uppercase)}.groupItem.svelte-3e0qet{padding-left:var(--groupItemPaddingLeft, 40px)}.item.svelte-3e0qet:active{background:var(--itemActiveBackground, #b9daff)}.item.active.svelte-3e0qet{background:var(--itemIsActiveBG, #007aff);color:var(--itemIsActiveColor, #fff)}.item.notSelectable.svelte-3e0qet{color:var(--itemIsNotSelectableColor, #999)}.item.first.svelte-3e0qet{border-radius:var(--itemFirstBorderRadius, 4px 4px 0 0)}.item.hover.svelte-3e0qet:not(.active){background:var(--itemHoverBG, #e7f2ff);color:var(--itemHoverColor, inherit)}"); } function hU(e22) { var t2, n2, r2 = e22[0](e22[1], e22[2]) + ""; return { c: function() { So(t2 = go("div"), "class", n2 = "item " + e22[3] + " svelte-3e0qet"); }, m: function(e23, n3) { vo(e23, t2, n3), t2.innerHTML = r2; }, p: function(e23, i2) { var o2 = ki(i2, 1)[0]; 7 & o2 && r2 !== (r2 = e23[0](e23[1], e23[2]) + "") && (t2.innerHTML = r2), 8 & o2 && n2 !== (n2 = "item " + e23[3] + " svelte-3e0qet") && So(t2, "class", n2); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function dU(e22, t2, n2) { var r2 = t2.isActive, i2 = r2 !== void 0 && r2, o2 = t2.isFirst, a2 = o2 !== void 0 && o2, s2 = t2.isHover, u2 = s2 !== void 0 && s2, c2 = t2.isSelectable, l2 = c2 !== void 0 && c2, f2 = t2.getOptionLabel, h2 = f2 === void 0 ? void 0 : f2, d2 = t2.item, v2 = d2 === void 0 ? void 0 : d2, p2 = t2.filterText, m2 = p2 === void 0 ? "" : p2, g2 = ""; return e22.$$set = function(e23) { "isActive" in e23 && n2(4, i2 = e23.isActive), "isFirst" in e23 && n2(5, a2 = e23.isFirst), "isHover" in e23 && n2(6, u2 = e23.isHover), "isSelectable" in e23 && n2(7, l2 = e23.isSelectable), "getOptionLabel" in e23 && n2(0, h2 = e23.getOptionLabel), "item" in e23 && n2(1, v2 = e23.item), "filterText" in e23 && n2(2, m2 = e23.filterText); }, e22.$$.update = function() { if (242 & e22.$$.dirty) { var t3 = []; i2 && t3.push("active"), a2 && t3.push("first"), u2 && t3.push("hover"), v2.isGroupHeader && t3.push("groupHeader"), v2.isGroupItem && t3.push("groupItem"), l2 || t3.push("notSelectable"), n2(3, g2 = t3.join(" ")); } }, [h2, v2, m2, g2, i2, a2, u2, l2]; } var vU = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, dU, hU, Ui, { isActive: 4, isFirst: 5, isHover: 6, isSelectable: 7, getOptionLabel: 0, item: 1, filterText: 2 }, fU), r2; } return zi(n2); }(); function pU(e22) { co(e22, "svelte-1uyqfml", ".listContainer.svelte-1uyqfml{box-shadow:var(--listShadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--listBorderRadius, 4px);max-height:var(--listMaxHeight, 250px);overflow-y:auto;background:var(--listBackground, #fff);border:var(--listBorder, none);position:var(--listPosition, absolute);z-index:var(--listZIndex, 2);width:100%;left:var(--listLeft, 0);right:var(--listRight, 0)}.virtualList.svelte-1uyqfml{height:var(--virtualListHeight, 200px)}.listGroupTitle.svelte-1uyqfml{color:var(--groupTitleColor, #8f8f8f);cursor:default;font-size:var(--groupTitleFontSize, 12px);font-weight:var(--groupTitleFontWeight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--groupTitlePadding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--groupTitleTextTransform, uppercase)}.empty.svelte-1uyqfml{text-align:var(--listEmptyTextAlign, center);padding:var(--listEmptyPadding, 20px 0);color:var(--listEmptyColor, #78848f)}"); } function mU(e22, t2, n2) { var r2 = e22.slice(); return r2[41] = t2[n2], r2[42] = n2, r2; } function gU(e22) { for (var t2, n2, r2 = e22[1], i2 = [], o2 = 0; o2 < r2.length; o2 += 1) i2[o2] = jU(mU(e22, r2, o2)); var a2 = function(e23) { return ba(i2[e23], 1, 1, function() { i2[e23] = null; }); }, s2 = null; return r2.length || (s2 = bU(e22)), { c: function() { for (var e23 = 0; e23 < i2.length; e23 += 1) i2[e23].c(); t2 = wo(), s2 && s2.c(); }, m: function(e23, r3) { for (var o3 = 0; o3 < i2.length; o3 += 1) i2[o3].m(e23, r3); vo(e23, t2, r3), s2 && s2.m(e23, r3), n2 = true; }, p: function(e23, n3) { if (114390 & n3[0]) { var o3; for (r2 = e23[1], o3 = 0; o3 < r2.length; o3 += 1) { var u2 = mU(e23, r2, o3); i2[o3] ? (i2[o3].p(u2, n3), ya(i2[o3], 1)) : (i2[o3] = jU(u2), i2[o3].c(), ya(i2[o3], 1), i2[o3].m(t2.parentNode, t2)); } for (ma(), o3 = r2.length; o3 < i2.length; o3 += 1) a2(o3); ga(), !r2.length && s2 ? s2.p(e23, n3) : r2.length ? s2 && (s2.d(1), s2 = null) : ((s2 = bU(e23)).c(), s2.m(t2.parentNode, t2)); } }, i: function(e23) { if (!n2) { for (var t3 = 0; t3 < r2.length; t3 += 1) ya(i2[t3]); n2 = true; } }, o: function(e23) { i2 = i2.filter(Boolean); for (var t3 = 0; t3 < i2.length; t3 += 1) ba(i2[t3]); n2 = false; }, d: function(e23) { mo(i2, e23), e23 && po(t2), s2 && s2.d(e23); } }; } function yU(e22) { var t2, n2, r2, i2 = e22[3]; function o2(e23) { return { props: { items: e23[1], itemHeight: e23[8], $$slots: { default: [SU, function(e24) { return { 41: e24.item, 42: e24.i }; }, function(e24) { return [0, (e24.item ? 1024 : 0) | (e24.i ? 2048 : 0)]; }] }, $$scope: { ctx: e23 } } }; } return i2 && (t2 = new i2(o2(e22))), { c: function() { t2 && Aa(t2.$$.fragment), n2 = wo(); }, m: function(e23, i3) { t2 && Ma(t2, e23, i3), vo(e23, n2, i3), r2 = true; }, p: function(e23, r3) { var a2 = {}; if (2 & r3[0] && (a2.items = e23[1]), 256 & r3[0] && (a2.itemHeight = e23[8]), 9814 & r3[0] | 11264 & r3[1] && (a2.$$scope = { dirty: r3, ctx: e23 }), i2 !== (i2 = e23[3])) { if (t2) { ma(); var s2 = t2; ba(s2.$$.fragment, 1, 0, function() { Ea(s2, 1); }), ga(); } i2 ? (Aa((t2 = new i2(o2(e23))).$$.fragment), ya(t2.$$.fragment, 1), Ma(t2, n2.parentNode, n2)) : t2 = null; } else i2 && t2.$set(a2); }, i: function(e23) { r2 || (t2 && ya(t2.$$.fragment, e23), r2 = true); }, o: function(e23) { t2 && ba(t2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(n2), t2 && Ea(t2, e23); } }; } function bU(e22) { var t2, n2 = !e22[11] && kU(e22); return { c: function() { n2 && n2.c(), t2 = wo(); }, m: function(e23, r2) { n2 && n2.m(e23, r2), vo(e23, t2, r2); }, p: function(e23, r2) { e23[11] ? n2 && (n2.d(1), n2 = null) : n2 ? n2.p(e23, r2) : ((n2 = kU(e23)).c(), n2.m(t2.parentNode, t2)); }, d: function(e23) { n2 && n2.d(e23), e23 && po(t2); } }; } function kU(e22) { var t2, n2; return { c: function() { t2 = go("div"), n2 = bo(e22[12]), So(t2, "class", "empty svelte-1uyqfml"); }, m: function(e23, r2) { vo(e23, t2, r2), uo(t2, n2); }, p: function(e23, t3) { 4096 & t3[0] && Ao(n2, e23[12]); }, d: function(e23) { e23 && po(t2); } }; } function wU(e22) { var t2, n2, r2, i2, o2, a2, s2 = e22[4]; function u2(e23) { return { props: { item: e23[41], filterText: e23[13], getOptionLabel: e23[6], isFirst: $U(e23[42]), isActive: _U(e23[41], e23[9], e23[10]), isHover: OU(e23[2], e23[41], e23[42], e23[1]), isSelectable: AU(e23[41]) } }; } function c2() { return e22[29](e22[42]); } function l2() { return e22[30](e22[42]); } function f2() { for (var t3, n3 = arguments.length, r3 = new Array(n3), i3 = 0; i3 < n3; i3++) r3[i3] = arguments[i3]; return (t3 = e22)[31].apply(t3, [e22[41], e22[42]].concat(r3)); } return s2 && (n2 = new s2(u2(e22))), { c: function() { t2 = go("div"), n2 && Aa(n2.$$.fragment), r2 = ko(), So(t2, "class", "listItem"), So(t2, "tabindex", "-1"); }, m: function(e23, s3) { vo(e23, t2, s3), n2 && Ma(n2, t2, null), uo(t2, r2), i2 = true, o2 || (a2 = [xo(t2, "mouseover", c2), xo(t2, "focus", l2), xo(t2, "click", f2)], o2 = true); }, p: function(i3, o3) { e22 = i3; var a3 = {}; if (2 & o3[0] && (a3.item = e22[41]), 8192 & o3[0] && (a3.filterText = e22[13]), 64 & o3[0] && (a3.getOptionLabel = e22[6]), 1538 & o3[0] && (a3.isActive = _U(e22[41], e22[9], e22[10])), 6 & o3[0] && (a3.isHover = OU(e22[2], e22[41], e22[42], e22[1])), 2 & o3[0] && (a3.isSelectable = AU(e22[41])), s2 !== (s2 = e22[4])) { if (n2) { ma(); var c3 = n2; ba(c3.$$.fragment, 1, 0, function() { Ea(c3, 1); }), ga(); } s2 ? (Aa((n2 = new s2(u2(e22))).$$.fragment), ya(n2.$$.fragment, 1), Ma(n2, t2, r2)) : n2 = null; } else s2 && n2.$set(a3); }, i: function(e23) { i2 || (n2 && ya(n2.$$.fragment, e23), i2 = true); }, o: function(e23) { n2 && ba(n2.$$.fragment, e23), i2 = false; }, d: function(e23) { e23 && po(t2), n2 && Ea(n2), o2 = false, Wi(a2); } }; } function xU(e22) { var t2, n2, r2 = e22[7](e22[41]) + ""; return { c: function() { t2 = go("div"), n2 = bo(r2), So(t2, "class", "listGroupTitle svelte-1uyqfml"); }, m: function(e23, r3) { vo(e23, t2, r3), uo(t2, n2); }, p: function(e23, t3) { 130 & t3[0] && r2 !== (r2 = e23[7](e23[41]) + "") && Ao(n2, r2); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function jU(e22) { var t2, n2, r2, i2, o2 = [xU, wU], a2 = []; function s2(e23, t3) { return e23[41].isGroupHeader && !e23[41].isSelectable ? 0 : 1; } return t2 = s2(e22), n2 = a2[t2] = o2[t2](e22), { c: function() { n2.c(), r2 = wo(); }, m: function(e23, n3) { a2[t2].m(e23, n3), vo(e23, r2, n3), i2 = true; }, p: function(e23, i3) { var u2 = t2; (t2 = s2(e23)) === u2 ? a2[t2].p(e23, i3) : (ma(), ba(a2[u2], 1, 1, function() { a2[u2] = null; }), ga(), (n2 = a2[t2]) ? n2.p(e23, i3) : (n2 = a2[t2] = o2[t2](e23)).c(), ya(n2, 1), n2.m(r2.parentNode, r2)); }, i: function(e23) { i2 || (ya(n2), i2 = true); }, o: function(e23) { ba(n2), i2 = false; }, d: function(e23) { a2[t2].d(e23), e23 && po(r2); } }; } function SU(e22) { var t2, n2, r2, i2, o2, a2 = e22[4]; function s2(e23) { return { props: { item: e23[41], filterText: e23[13], getOptionLabel: e23[6], isFirst: $U(e23[42]), isActive: _U(e23[41], e23[9], e23[10]), isHover: OU(e23[2], e23[41], e23[42], e23[1]), isSelectable: AU(e23[41]) } }; } function u2() { return e22[26](e22[42]); } function c2() { return e22[27](e22[42]); } function l2() { for (var t3, n3 = arguments.length, r3 = new Array(n3), i3 = 0; i3 < n3; i3++) r3[i3] = arguments[i3]; return (t3 = e22)[28].apply(t3, [e22[41], e22[42]].concat(r3)); } return a2 && (n2 = new a2(s2(e22))), { c: function() { t2 = go("div"), n2 && Aa(n2.$$.fragment), So(t2, "class", "listItem"); }, m: function(e23, a3) { vo(e23, t2, a3), n2 && Ma(n2, t2, null), r2 = true, i2 || (o2 = [xo(t2, "mouseover", u2), xo(t2, "focus", c2), xo(t2, "click", l2)], i2 = true); }, p: function(r3, i3) { e22 = r3; var o3 = {}; if (1024 & i3[1] && (o3.item = e22[41]), 8192 & i3[0] && (o3.filterText = e22[13]), 64 & i3[0] && (o3.getOptionLabel = e22[6]), 2048 & i3[1] && (o3.isFirst = $U(e22[42])), 1536 & i3[0] | 1024 & i3[1] && (o3.isActive = _U(e22[41], e22[9], e22[10])), 6 & i3[0] | 3072 & i3[1] && (o3.isHover = OU(e22[2], e22[41], e22[42], e22[1])), 1024 & i3[1] && (o3.isSelectable = AU(e22[41])), a2 !== (a2 = e22[4])) { if (n2) { ma(); var u3 = n2; ba(u3.$$.fragment, 1, 0, function() { Ea(u3, 1); }), ga(); } a2 ? (Aa((n2 = new a2(s2(e22))).$$.fragment), ya(n2.$$.fragment, 1), Ma(n2, t2, null)) : n2 = null; } else a2 && n2.$set(o3); }, i: function(e23) { r2 || (n2 && ya(n2.$$.fragment, e23), r2 = true); }, o: function(e23) { n2 && ba(n2.$$.fragment, e23), r2 = false; }, d: function(e23) { e23 && po(t2), n2 && Ea(n2), i2 = false, Wi(o2); } }; } function CU(e22) { var t2, n2, r2, i2, o2, a2, s2 = [yU, gU], u2 = []; function c2(e23, t3) { return e23[5] ? 0 : 1; } return n2 = c2(e22), r2 = u2[n2] = s2[n2](e22), { c: function() { t2 = go("div"), r2.c(), So(t2, "class", "listContainer svelte-1uyqfml"), So(t2, "style", e22[14]), To(t2, "virtualList", e22[5]); }, m: function(r3, s3) { vo(r3, t2, s3), u2[n2].m(t2, null), e22[32](t2), i2 = true, o2 || (a2 = [xo(window, "keydown", e22[17]), xo(window, "resize", e22[18])], o2 = true); }, p: function(e23, o3) { var a3 = n2; (n2 = c2(e23)) === a3 ? u2[n2].p(e23, o3) : (ma(), ba(u2[a3], 1, 1, function() { u2[a3] = null; }), ga(), (r2 = u2[n2]) ? r2.p(e23, o3) : (r2 = u2[n2] = s2[n2](e23)).c(), ya(r2, 1), r2.m(t2, null)), (!i2 || 16384 & o3[0]) && So(t2, "style", e23[14]), 32 & o3[0] && To(t2, "virtualList", e23[5]); }, i: function(e23) { i2 || (ya(r2), i2 = true); }, o: function(e23) { ba(r2), i2 = false; }, d: function(r3) { r3 && po(t2), u2[n2].d(), e22[32](null), o2 = false, Wi(a2); } }; } function _U(e22, t2, n2) { return t2 && t2[n2] === e22[n2]; } function $U(e22) { return e22 === 0; } function OU(e22, t2, n2, r2) { return AU(t2) && (e22 === n2 || r2.length === 1); } function AU(e22) { return e22.isGroupHeader && e22.isSelectable || e22.selectable || !e22.hasOwnProperty("selectable"); } function MU(e22, t2, n2) { var r2, i2, o2 = Go(), a2 = t2.container, s2 = a2 === void 0 ? void 0 : a2, u2 = t2.VirtualList, c2 = u2 === void 0 ? null : u2, l2 = t2.Item, f2 = l2 === void 0 ? vU : l2, h2 = t2.isVirtualList, d2 = h2 !== void 0 && h2, v2 = t2.items, p2 = v2 === void 0 ? [] : v2, m2 = t2.labelIdentifier, g2 = m2 === void 0 ? "label" : m2, y2 = t2.getOptionLabel, b2 = y2 === void 0 ? function(e23, t3) { if (e23) return e23.isCreator ? 'Create "'.concat(t3, '"') : e23[g2]; } : y2, k2 = t2.getGroupHeaderLabel, w2 = k2 === void 0 ? null : k2, x2 = t2.itemHeight, j2 = x2 === void 0 ? 40 : x2, S2 = t2.hoverItemIndex, C2 = S2 === void 0 ? 0 : S2, _2 = t2.value, $2 = _2 === void 0 ? void 0 : _2, O2 = t2.optionIdentifier, A2 = O2 === void 0 ? "value" : O2, M2 = t2.hideEmptyState, E2 = M2 !== void 0 && M2, P2 = t2.noOptionsMessage, N2 = P2 === void 0 ? "No options" : P2, T2 = t2.isMulti, I2 = T2 !== void 0 && T2, R2 = t2.activeItemIndex, D2 = R2 === void 0 ? 0 : R2, z2 = t2.filterText, L2 = z2 === void 0 ? "" : z2, B2 = t2.parent, q2 = B2 === void 0 ? null : B2, F2 = t2.listPlacement, V2 = F2 === void 0 ? null : F2, H2 = t2.listAutoWidth, W2 = H2 === void 0 ? null : H2, J2 = t2.listOffset, U2 = J2 === void 0 ? 5 : J2, K2 = 0, G2 = false; function Q2(e23) { e23.isCreator || o2("itemSelected", e23); } function Y2(e23) { G2 || n2(2, C2 = e23); } function Z2(e23) { var t3 = e23.item, r3 = e23.i; if (e23.event.stopPropagation(), $2 && !I2 && $2[A2] === t3[A2]) return X2(); t3.isCreator ? o2("itemCreated", L2) : AU(t3) && (n2(19, D2 = r3), n2(2, C2 = r3), Q2(t3)); } function X2() { o2("closeList"); } function ee2(e23) { return te2.apply(this, arguments); } function te2() { return (te2 = yi(mi().mark(function e23(t3) { var r3; return mi().wrap(function(e24) { for (; ; ) switch (e24.prev = e24.next) { case 0: if (!d2) { e24.next = 2; break; } return e24.abrupt("return"); case 2: for (r3 = true; r3; ) t3 > 0 && C2 === p2.length - 1 ? n2(2, C2 = 0) : n2(2, t3 < 0 && C2 === 0 ? C2 = p2.length - 1 : C2 += t3), r3 = !AU(p2[C2]); return e24.next = 6, oa(); case 6: ne2("hover"); case 7: case "end": return e24.stop(); } }, e23); }))).apply(this, arguments); } function ne2(e23) { if (!d2 && s2) { var t3, r3 = s2.querySelector(".listItem .".concat(e23)); r3 && (t3 = s2.getBoundingClientRect().bottom - r3.getBoundingClientRect().bottom), n2(0, s2.scrollTop -= t3, s2); } } function re2() { var e23 = q2.getBoundingClientRect(), t3 = e23.height, r3 = e23.width; n2(14, i2 = ""), n2(14, i2 += "min-width:".concat(r3, "px;width:").concat(W2 ? "auto" : "100%", ";")), V2 === "top" || V2 === "auto" && function(e24, t4) { var n3 = e24.getBoundingClientRect(), r4 = t4.getBoundingClientRect(), i3 = {}; return i3.top = n3.top < 0, i3.left = n3.left < 0, i3.bottom = n3.bottom + r4.height > (window.innerHeight || document.documentElement.clientHeight), i3.right = n3.right > (window.innerWidth || document.documentElement.clientWidth), i3.any = i3.top || i3.left || i3.bottom || i3.right, i3; }(q2, s2).bottom ? n2(14, i2 += "bottom:".concat(t3 + U2, "px;")) : n2(14, i2 += "top:".concat(t3 + U2, "px;")); } Uo(function() { if (p2.length > 0 && !I2 && $2) { var e23 = p2.findIndex(function(e24) { return e24[A2] === $2[A2]; }); e23 && n2(2, C2 = e23); } ne2("active"), s2.addEventListener("scroll", function() { clearTimeout(K2), K2 = setTimeout(function() { G2 = false; }, 100); }, false); }), Jo(function() { p2 || n2(1, p2 = []), p2 !== r2 && p2.length > 0 && n2(2, C2 = 0), r2 = p2; }); return e22.$$set = function(e23) { "container" in e23 && n2(0, s2 = e23.container), "VirtualList" in e23 && n2(3, c2 = e23.VirtualList), "Item" in e23 && n2(4, f2 = e23.Item), "isVirtualList" in e23 && n2(5, d2 = e23.isVirtualList), "items" in e23 && n2(1, p2 = e23.items), "labelIdentifier" in e23 && n2(20, g2 = e23.labelIdentifier), "getOptionLabel" in e23 && n2(6, b2 = e23.getOptionLabel), "getGroupHeaderLabel" in e23 && n2(7, w2 = e23.getGroupHeaderLabel), "itemHeight" in e23 && n2(8, j2 = e23.itemHeight), "hoverItemIndex" in e23 && n2(2, C2 = e23.hoverItemIndex), "value" in e23 && n2(9, $2 = e23.value), "optionIdentifier" in e23 && n2(10, A2 = e23.optionIdentifier), "hideEmptyState" in e23 && n2(11, E2 = e23.hideEmptyState), "noOptionsMessage" in e23 && n2(12, N2 = e23.noOptionsMessage), "isMulti" in e23 && n2(21, I2 = e23.isMulti), "activeItemIndex" in e23 && n2(19, D2 = e23.activeItemIndex), "filterText" in e23 && n2(13, L2 = e23.filterText), "parent" in e23 && n2(22, q2 = e23.parent), "listPlacement" in e23 && n2(23, V2 = e23.listPlacement), "listAutoWidth" in e23 && n2(24, W2 = e23.listAutoWidth), "listOffset" in e23 && n2(25, U2 = e23.listOffset); }, e22.$$.update = function() { 4194305 & e22.$$.dirty[0] && q2 && s2 && re2(); }, [s2, p2, C2, c2, f2, d2, b2, w2, j2, $2, A2, E2, N2, L2, i2, Y2, Z2, function(e23) { switch (e23.key) { case "Escape": e23.preventDefault(), X2(); break; case "ArrowDown": e23.preventDefault(), p2.length && ee2(1); break; case "ArrowUp": e23.preventDefault(), p2.length && ee2(-1); break; case "Enter": if (e23.preventDefault(), p2.length === 0) break; var t3 = p2[C2]; if ($2 && !I2 && $2[A2] === t3[A2]) { X2(); break; } t3.isCreator ? o2("itemCreated", L2) : (n2(19, D2 = C2), Q2(p2[C2])); break; case "Tab": if (e23.preventDefault(), p2.length === 0) return X2(); if ($2 && $2[A2] === p2[C2][A2]) return X2(); n2(19, D2 = C2), Q2(p2[C2]); } }, re2, D2, g2, I2, q2, V2, W2, U2, function(e23) { return Y2(e23); }, function(e23) { return Y2(e23); }, function(e23, t3, n3) { return Z2({ item: e23, i: t3, event: n3 }); }, function(e23) { return Y2(e23); }, function(e23) { return Y2(e23); }, function(e23, t3, n3) { return Z2({ item: e23, i: t3, event: n3 }); }, function(e23) { Xo[e23 ? "unshift" : "push"](function() { n2(0, s2 = e23); }); }]; } var EU = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, MU, CU, Ui, { container: 0, VirtualList: 3, Item: 4, isVirtualList: 5, items: 1, labelIdentifier: 20, getOptionLabel: 6, getGroupHeaderLabel: 7, itemHeight: 8, hoverItemIndex: 2, value: 9, optionIdentifier: 10, hideEmptyState: 11, noOptionsMessage: 12, isMulti: 21, activeItemIndex: 19, filterText: 13, parent: 22, listPlacement: 23, listAutoWidth: 24, listOffset: 25 }, pU, [-1, -1]), r2; } return zi(n2); }(); function PU(e22) { co(e22, "svelte-pu1q1n", ".selection.svelte-pu1q1n{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}"); } function NU(e22) { var t2, n2 = e22[0](e22[1]) + ""; return { c: function() { So(t2 = go("div"), "class", "selection svelte-pu1q1n"); }, m: function(e23, r2) { vo(e23, t2, r2), t2.innerHTML = n2; }, p: function(e23, r2) { 3 & ki(r2, 1)[0] && n2 !== (n2 = e23[0](e23[1]) + "") && (t2.innerHTML = n2); }, i: Bi, o: Bi, d: function(e23) { e23 && po(t2); } }; } function TU(e22, t2, n2) { var r2 = t2.getSelectionLabel, i2 = r2 === void 0 ? void 0 : r2, o2 = t2.item, a2 = o2 === void 0 ? void 0 : o2; return e22.$$set = function(e23) { "getSelectionLabel" in e23 && n2(0, i2 = e23.getSelectionLabel), "item" in e23 && n2(1, a2 = e23.item); }, [i2, a2]; } var IU = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, TU, NU, Ui, { getSelectionLabel: 0, item: 1 }, PU), r2; } return zi(n2); }(); function RU(e22) { co(e22, "svelte-liu9pa", ".multiSelectItem.svelte-liu9pa.svelte-liu9pa{background:var(--multiItemBG, #ebedef);margin:var(--multiItemMargin, 5px 5px 0 0);border-radius:var(--multiItemBorderRadius, 16px);height:var(--multiItemHeight, 32px);line-height:var(--multiItemHeight, 32px);display:flex;cursor:default;padding:var(--multiItemPadding, 0 10px 0 15px);max-width:100%}.multiSelectItem_label.svelte-liu9pa.svelte-liu9pa{margin:var(--multiLabelMargin, 0 5px 0 0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multiSelectItem.svelte-liu9pa.svelte-liu9pa:hover,.multiSelectItem.active.svelte-liu9pa.svelte-liu9pa{background-color:var(--multiItemActiveBG, #006fff);color:var(--multiItemActiveColor, #fff)}.multiSelectItem.disabled.svelte-liu9pa.svelte-liu9pa:hover{background:var(--multiItemDisabledHoverBg, #ebedef);color:var(--multiItemDisabledHoverColor, #c1c6cc)}.multiSelectItem_clear.svelte-liu9pa.svelte-liu9pa{border-radius:var(--multiClearRadius, 50%);background:var(--multiClearBG, #52616f);min-width:var(--multiClearWidth, 16px);max-width:var(--multiClearWidth, 16px);height:var(--multiClearHeight, 16px);position:relative;top:var(--multiClearTop, 8px);text-align:var(--multiClearTextAlign, center);padding:var(--multiClearPadding, 1px)}.multiSelectItem_clear.svelte-liu9pa.svelte-liu9pa:hover,.active.svelte-liu9pa .multiSelectItem_clear.svelte-liu9pa{background:var(--multiClearHoverBG, #fff)}.multiSelectItem_clear.svelte-liu9pa:hover svg.svelte-liu9pa,.active.svelte-liu9pa .multiSelectItem_clear svg.svelte-liu9pa{fill:var(--multiClearHoverFill, #006fff)}.multiSelectItem_clear.svelte-liu9pa svg.svelte-liu9pa{fill:var(--multiClearFill, #ebedef);vertical-align:top}"); } function DU(e22, t2, n2) { var r2 = e22.slice(); return r2[9] = t2[n2], r2[11] = n2, r2; } function zU(e22) { var t2, n2, r2; function i2() { for (var t3, n3 = arguments.length, r3 = new Array(n3), i3 = 0; i3 < n3; i3++) r3[i3] = arguments[i3]; return (t3 = e22)[6].apply(t3, [e22[11]].concat(r3)); } return { c: function() { (t2 = go("div")).innerHTML = '', So(t2, "class", "multiSelectItem_clear svelte-liu9pa"); }, m: function(e23, o2) { vo(e23, t2, o2), n2 || (r2 = xo(t2, "click", i2), n2 = true); }, p: function(t3, n3) { e22 = t3; }, d: function(e23) { e23 && po(t2), n2 = false, r2(); } }; } function LU(e22) { var t2, n2, r2, i2, o2, a2, s2, u2 = e22[4](e22[9]) + "", c2 = !e22[2] && !e22[3] && zU(e22); function l2() { for (var t3, n3 = arguments.length, r3 = new Array(n3), i3 = 0; i3 < n3; i3++) r3[i3] = arguments[i3]; return (t3 = e22)[7].apply(t3, [e22[11]].concat(r3)); } return { c: function() { t2 = go("div"), n2 = go("div"), r2 = ko(), c2 && c2.c(), i2 = ko(), So(n2, "class", "multiSelectItem_label svelte-liu9pa"), So(t2, "class", o2 = "multiSelectItem " + (e22[1] === e22[11] ? "active" : "") + " " + (e22[2] ? "disabled" : "") + " svelte-liu9pa"); }, m: function(e23, o3) { vo(e23, t2, o3), uo(t2, n2), n2.innerHTML = u2, uo(t2, r2), c2 && c2.m(t2, null), uo(t2, i2), a2 || (s2 = xo(t2, "click", l2), a2 = true); }, p: function(r3, a3) { e22 = r3, 17 & a3 && u2 !== (u2 = e22[4](e22[9]) + "") && (n2.innerHTML = u2), e22[2] || e22[3] ? c2 && (c2.d(1), c2 = null) : c2 ? c2.p(e22, a3) : ((c2 = zU(e22)).c(), c2.m(t2, i2)), 6 & a3 && o2 !== (o2 = "multiSelectItem " + (e22[1] === e22[11] ? "active" : "") + " " + (e22[2] ? "disabled" : "") + " svelte-liu9pa") && So(t2, "class", o2); }, d: function(e23) { e23 && po(t2), c2 && c2.d(), a2 = false, s2(); } }; } function BU(e22) { for (var t2, n2 = e22[0], r2 = [], i2 = 0; i2 < n2.length; i2 += 1) r2[i2] = LU(DU(e22, n2, i2)); return { c: function() { for (var e23 = 0; e23 < r2.length; e23 += 1) r2[e23].c(); t2 = wo(); }, m: function(e23, n3) { for (var i3 = 0; i3 < r2.length; i3 += 1) r2[i3].m(e23, n3); vo(e23, t2, n3); }, p: function(e23, i3) { var o2 = ki(i3, 1)[0]; if (63 & o2) { var a2; for (n2 = e23[0], a2 = 0; a2 < n2.length; a2 += 1) { var s2 = DU(e23, n2, a2); r2[a2] ? r2[a2].p(s2, o2) : (r2[a2] = LU(s2), r2[a2].c(), r2[a2].m(t2.parentNode, t2)); } for (; a2 < r2.length; a2 += 1) r2[a2].d(1); r2.length = n2.length; } }, i: Bi, o: Bi, d: function(e23) { mo(r2, e23), e23 && po(t2); } }; } function qU(e22, t2, n2) { var r2 = Go(), i2 = t2.value, o2 = i2 === void 0 ? [] : i2, a2 = t2.activeValue, s2 = a2 === void 0 ? void 0 : a2, u2 = t2.isDisabled, c2 = u2 !== void 0 && u2, l2 = t2.multiFullItemClearable, f2 = l2 !== void 0 && l2, h2 = t2.getSelectionLabel, d2 = h2 === void 0 ? void 0 : h2; function v2(e23, t3) { t3.stopPropagation(), r2("multiItemClear", { i: e23 }); } return e22.$$set = function(e23) { "value" in e23 && n2(0, o2 = e23.value), "activeValue" in e23 && n2(1, s2 = e23.activeValue), "isDisabled" in e23 && n2(2, c2 = e23.isDisabled), "multiFullItemClearable" in e23 && n2(3, f2 = e23.multiFullItemClearable), "getSelectionLabel" in e23 && n2(4, d2 = e23.getSelectionLabel); }, [o2, s2, c2, f2, d2, v2, function(e23, t3) { return v2(e23, t3); }, function(e23, t3) { return f2 ? v2(e23, t3) : {}; }]; } var FU = function(e22) { _i(n2, Ta); var t2 = Oi(n2); function n2(e23) { var r2; return Ri(this, n2), Na(Mi(r2 = t2.call(this)), e23, qU, BU, Ui, { value: 0, activeValue: 1, isDisabled: 2, multiFullItemClearable: 3, getSelectionLabel: 4 }, RU), r2; } return zi(n2); }(); function VU(e22) { co(e22, "svelte-g2cagw", "svelte-virtual-list-viewport.svelte-g2cagw{position:relative;overflow-y:auto;-webkit-overflow-scrolling:touch;display:block}svelte-virtual-list-contents.svelte-g2cagw,svelte-virtual-list-row.svelte-g2cagw{display:block}svelte-virtual-list-row.svelte-g2cagw{overflow:hidden}"); } function HU(e22, t2, n2) { var r2 = e22.slice(); return r2[23] = t2[n2], r2; } var WU = function(e22) { return { item: 32 & e22, i: 32 & e22, hoverItemIndex: 2 & e22 }; }, JU = function(e22) { return { item: e22[23].data, i: e22[23].index, hoverItemIndex: e22[1] }; }; function UU(e22, t2) { var n2, r2, i2, o2 = t2[15].default, a2 = Gi(o2, t2, t2[14], JU), s2 = a2 || function(e23) { var t3; return { c: function() { t3 = bo("Missing template"); }, m: function(e24, n3) { vo(e24, t3, n3); }, d: function(e24) { e24 && po(t3); } }; }(); return { key: e22, first: null, c: function() { n2 = go("svelte-virtual-list-row"), s2 && s2.c(), r2 = ko(), $o(n2, "class", "svelte-g2cagw"), this.first = n2; }, m: function(e23, t3) { vo(e23, n2, t3), s2 && s2.m(n2, null), uo(n2, r2), i2 = true; }, p: function(e23, n3) { t2 = e23, a2 && a2.p && (!i2 || 16418 & n3) && Zi(a2, o2, t2, t2[14], i2 ? Yi(o2, t2[14], n3, WU) : Xi(t2[14]), JU); }, i: function(e23) { i2 || (ya(s2, e23), i2 = true); }, o: function(e23) { ba(s2, e23), i2 = false; }, d: function(e23) { e23 && po(n2), s2 && s2.d(e23); } }; } function KU(e22) { for (var t2, n2, r2, i2, o2, a2, s2 = [], u2 = /* @__PURE__ */ new Map(), c2 = e22[5], l2 = function(e23) { return e23[23].index; }, f2 = 0; f2 < c2.length; f2 += 1) { var h2 = HU(e22, c2, f2), d2 = l2(h2); u2.set(d2, s2[f2] = UU(d2, h2)); } return { c: function() { t2 = go("svelte-virtual-list-viewport"), n2 = go("svelte-virtual-list-contents"); for (var r3 = 0; r3 < s2.length; r3 += 1) s2[r3].c(); Eo(n2, "padding-top", e22[6] + "px"), Eo(n2, "padding-bottom", e22[7] + "px"), $o(n2, "class", "svelte-g2cagw"), Eo(t2, "height", e22[0]), $o(t2, "class", "svelte-g2cagw"), aa(function() { return e22[18].call(t2); }); }, m: function(u3, c3) { vo(u3, t2, c3), uo(t2, n2); for (var l3 = 0; l3 < s2.length; l3 += 1) s2[l3].m(n2, null); e22[16](n2), e22[17](t2), r2 = function(e23, t3) { getComputedStyle(e23).position === "static" && (e23.style.position = "relative"); var n3 = go("iframe"); n3.setAttribute("style", "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"), n3.setAttribute("aria-hidden", "true"), n3.tabIndex = -1; var r3, i3 = No(); return i3 ? (n3.src = "data:text/html,