magic-json-tree
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -1,33 +0,33 @@ | ||
function p() { | ||
function b() { | ||
} | ||
function ae(e) { | ||
function se(e) { | ||
return e(); | ||
} | ||
function $() { | ||
function te() { | ||
return /* @__PURE__ */ Object.create(null); | ||
} | ||
function M(e) { | ||
e.forEach(ae); | ||
function P(e) { | ||
e.forEach(se); | ||
} | ||
function Y(e) { | ||
function x(e) { | ||
return typeof e == "function"; | ||
} | ||
function q(e, t) { | ||
function z(e, t) { | ||
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function"; | ||
} | ||
function de(e) { | ||
function ve(e) { | ||
return Object.keys(e).length === 0; | ||
} | ||
function F(e, t) { | ||
function D(e, t) { | ||
e.appendChild(t); | ||
} | ||
function d(e, t, l) { | ||
e.insertBefore(t, l || null); | ||
function h(e, t, n) { | ||
e.insertBefore(t, n || null); | ||
} | ||
function h(e) { | ||
function y(e) { | ||
e.parentNode && e.parentNode.removeChild(e); | ||
} | ||
function ie(e, t) { | ||
for (let l = 0; l < e.length; l += 1) | ||
e[l] && e[l].d(t); | ||
function me(e, t) { | ||
for (let n = 0; n < e.length; n += 1) | ||
e[n] && e[n].d(t); | ||
} | ||
@@ -37,69 +37,81 @@ function v(e) { | ||
} | ||
function b(e) { | ||
function S(e) { | ||
return document.createTextNode(e); | ||
} | ||
function oe() { | ||
return b(" "); | ||
function ce() { | ||
return S(" "); | ||
} | ||
function se() { | ||
return b(""); | ||
function _e() { | ||
return S(""); | ||
} | ||
function ge(e, t, l, n) { | ||
return e.addEventListener(t, l, n), () => e.removeEventListener(t, l, n); | ||
function be(e, t, n, r) { | ||
return e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r); | ||
} | ||
function g(e, t, l) { | ||
l == null ? e.removeAttribute(t) : e.getAttribute(t) !== l && e.setAttribute(t, l); | ||
function k(e, t, n) { | ||
n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n); | ||
} | ||
function ke(e) { | ||
function pe(e) { | ||
return Array.from(e.childNodes); | ||
} | ||
function E(e, t) { | ||
t = "" + t, e.wholeText !== t && (e.data = t); | ||
function G(e, t) { | ||
t = "" + t, e.data !== t && (e.data = t); | ||
} | ||
function Q(e, t, l) { | ||
e.classList[l ? "add" : "remove"](t); | ||
function R(e, t, n) { | ||
e.classList[n ? "add" : "remove"](t); | ||
} | ||
let Z; | ||
function B(e) { | ||
Z = e; | ||
let ee; | ||
function M(e) { | ||
ee = e; | ||
} | ||
const O = [], x = [], H = [], ee = [], ve = Promise.resolve(); | ||
let W = !1; | ||
function be() { | ||
W || (W = !0, ve.then(me)); | ||
const C = [], ne = []; | ||
let T = []; | ||
const re = [], Ae = /* @__PURE__ */ Promise.resolve(); | ||
let Z = !1; | ||
function Se() { | ||
Z || (Z = !0, Ae.then(de)); | ||
} | ||
function X(e) { | ||
H.push(e); | ||
function $(e) { | ||
T.push(e); | ||
} | ||
const U = /* @__PURE__ */ new Set(); | ||
let G = 0; | ||
function me() { | ||
const e = Z; | ||
const Y = /* @__PURE__ */ new Set(); | ||
let V = 0; | ||
function de() { | ||
if (V !== 0) | ||
return; | ||
const e = ee; | ||
do { | ||
for (; G < O.length; ) { | ||
const t = O[G]; | ||
G++, B(t), pe(t.$$); | ||
try { | ||
for (; V < C.length; ) { | ||
const t = C[V]; | ||
V++, M(t), je(t.$$); | ||
} | ||
} catch (t) { | ||
throw C.length = 0, V = 0, t; | ||
} | ||
for (B(null), O.length = 0, G = 0; x.length; ) | ||
x.pop()(); | ||
for (let t = 0; t < H.length; t += 1) { | ||
const l = H[t]; | ||
U.has(l) || (U.add(l), l()); | ||
for (M(null), C.length = 0, V = 0; ne.length; ) | ||
ne.pop()(); | ||
for (let t = 0; t < T.length; t += 1) { | ||
const n = T[t]; | ||
Y.has(n) || (Y.add(n), n()); | ||
} | ||
H.length = 0; | ||
} while (O.length); | ||
for (; ee.length; ) | ||
ee.pop()(); | ||
W = !1, U.clear(), B(e); | ||
T.length = 0; | ||
} while (C.length); | ||
for (; re.length; ) | ||
re.pop()(); | ||
Z = !1, Y.clear(), M(e); | ||
} | ||
function pe(e) { | ||
function je(e) { | ||
if (e.fragment !== null) { | ||
e.update(), M(e.before_update); | ||
e.update(), P(e.before_update); | ||
const t = e.dirty; | ||
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(X); | ||
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach($); | ||
} | ||
} | ||
const J = /* @__PURE__ */ new Set(); | ||
function we(e) { | ||
const t = [], n = []; | ||
T.forEach((r) => e.indexOf(r) === -1 ? t.push(r) : n.push(r)), n.forEach((r) => r()), T = t; | ||
} | ||
const Q = /* @__PURE__ */ new Set(); | ||
let w; | ||
function C() { | ||
function I() { | ||
w = { | ||
@@ -111,17 +123,17 @@ r: 0, | ||
} | ||
function T() { | ||
w.r || M(w.c), w = w.p; | ||
function O() { | ||
w.r || P(w.c), w = w.p; | ||
} | ||
function _(e, t) { | ||
e && e.i && (J.delete(e), e.i(t)); | ||
e && e.i && (Q.delete(e), e.i(t)); | ||
} | ||
function y(e, t, l, n) { | ||
function d(e, t, n, r) { | ||
if (e && e.o) { | ||
if (J.has(e)) | ||
if (Q.has(e)) | ||
return; | ||
J.add(e), w.c.push(() => { | ||
J.delete(e), n && (l && e.d(1), n()); | ||
Q.add(e), w.c.push(() => { | ||
Q.delete(e), r && (n && e.d(1), r()); | ||
}), e.o(t); | ||
} else | ||
n && n(); | ||
r && r(); | ||
} | ||
@@ -131,26 +143,26 @@ function j(e) { | ||
} | ||
function S(e, t, l, n) { | ||
const { fragment: r, after_update: a } = e.$$; | ||
r && r.m(t, l), n || X(() => { | ||
const f = e.$$.on_mount.map(ae).filter(Y); | ||
e.$$.on_destroy ? e.$$.on_destroy.push(...f) : M(f), e.$$.on_mount = []; | ||
}), a.forEach(X); | ||
function p(e, t, n, r) { | ||
const { fragment: l, after_update: u } = e.$$; | ||
l && l.m(t, n), r || $(() => { | ||
const f = e.$$.on_mount.map(se).filter(x); | ||
e.$$.on_destroy ? e.$$.on_destroy.push(...f) : P(f), e.$$.on_mount = []; | ||
}), u.forEach($); | ||
} | ||
function A(e, t) { | ||
const l = e.$$; | ||
l.fragment !== null && (M(l.on_destroy), l.fragment && l.fragment.d(t), l.on_destroy = l.fragment = null, l.ctx = []); | ||
const n = e.$$; | ||
n.fragment !== null && (we(n.after_update), P(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []); | ||
} | ||
function Se(e, t) { | ||
e.$$.dirty[0] === -1 && (O.push(e), be(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31; | ||
function Ee(e, t) { | ||
e.$$.dirty[0] === -1 && (C.push(e), Se(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31; | ||
} | ||
function P(e, t, l, n, r, a, f, i = [-1]) { | ||
const u = Z; | ||
B(e); | ||
function H(e, t, n, r, l, u, f, i = [-1]) { | ||
const a = ee; | ||
M(e); | ||
const o = e.$$ = { | ||
fragment: null, | ||
ctx: [], | ||
props: a, | ||
update: p, | ||
not_equal: r, | ||
bound: $(), | ||
props: u, | ||
update: b, | ||
not_equal: l, | ||
bound: te(), | ||
on_mount: [], | ||
@@ -161,237 +173,224 @@ on_destroy: [], | ||
after_update: [], | ||
context: new Map(t.context || (u ? u.$$.context : [])), | ||
callbacks: $(), | ||
context: new Map(t.context || (a ? a.$$.context : [])), | ||
callbacks: te(), | ||
dirty: i, | ||
skip_bound: !1, | ||
root: t.target || u.$$.root | ||
root: t.target || a.$$.root | ||
}; | ||
f && f(o.root); | ||
let s = !1; | ||
if (o.ctx = l ? l(e, t.props || {}, (c, k, ...K) => { | ||
const V = K.length ? K[0] : k; | ||
return o.ctx && r(o.ctx[c], o.ctx[c] = V) && (!o.skip_bound && o.bound[c] && o.bound[c](V), s && Se(e, c)), k; | ||
}) : [], o.update(), s = !0, M(o.before_update), o.fragment = n ? n(o.ctx) : !1, t.target) { | ||
if (o.ctx = n ? n(e, t.props || {}, (c, g, ...E) => { | ||
const K = E.length ? E[0] : g; | ||
return o.ctx && l(o.ctx[c], o.ctx[c] = K) && (!o.skip_bound && o.bound[c] && o.bound[c](K), s && Ee(e, c)), g; | ||
}) : [], o.update(), s = !0, P(o.before_update), o.fragment = r ? r(o.ctx) : !1, t.target) { | ||
if (t.hydrate) { | ||
const c = ke(t.target); | ||
o.fragment && o.fragment.l(c), c.forEach(h); | ||
const c = pe(t.target); | ||
o.fragment && o.fragment.l(c), c.forEach(y); | ||
} else | ||
o.fragment && o.fragment.c(); | ||
t.intro && _(e.$$.fragment), S(e, t.target, t.anchor, t.customElement), me(); | ||
t.intro && _(e.$$.fragment), p(e, t.target, t.anchor, t.customElement), de(); | ||
} | ||
B(u); | ||
M(a); | ||
} | ||
class z { | ||
class J { | ||
$destroy() { | ||
A(this, 1), this.$destroy = p; | ||
A(this, 1), this.$destroy = b; | ||
} | ||
$on(t, l) { | ||
if (!Y(l)) | ||
return p; | ||
const n = this.$$.callbacks[t] || (this.$$.callbacks[t] = []); | ||
return n.push(l), () => { | ||
const r = n.indexOf(l); | ||
r !== -1 && n.splice(r, 1); | ||
$on(t, n) { | ||
if (!x(n)) | ||
return b; | ||
const r = this.$$.callbacks[t] || (this.$$.callbacks[t] = []); | ||
return r.push(n), () => { | ||
const l = r.indexOf(n); | ||
l !== -1 && r.splice(l, 1); | ||
}; | ||
} | ||
$set(t) { | ||
this.$$set && !de(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1); | ||
this.$$set && !ve(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1); | ||
} | ||
} | ||
function Ae(e) { | ||
let t, l = (e[3] ? e[3]([e[0], e[1]], e[2]) : String(e[0])) + "", n; | ||
function q(e) { | ||
return e === null ? "null" : Array.isArray(e) ? "array" : e instanceof Map ? "map" : e instanceof Set ? "set" : typeof e; | ||
} | ||
function N(e) { | ||
return Array.isArray(e) || e instanceof Map || e instanceof Set ? [...e.entries()] : Object.entries(e); | ||
} | ||
function U(e) { | ||
const t = q(e); | ||
return t === "string" ? `${t}[v.length]` : t === "array" || t === "map" || t === "set" || t === "object" ? `${t}[${N(e).length}]` : t; | ||
} | ||
function W(e) { | ||
return N(e).sort(([t], [n]) => ("" + t).localeCompare(n)); | ||
} | ||
const Ke = ([e]) => String(e); | ||
function Ve(e) { | ||
let t, n = e[3]([e[0], e[1]], e[2]) + "", r; | ||
return { | ||
c() { | ||
t = v("div"), n = b(l), g(t, "class", "magic-json-tree-key svelte-8rygun"); | ||
t = v("div"), r = S(n), k(t, "class", "magic-json-tree-key svelte-8rygun"); | ||
}, | ||
m(r, a) { | ||
d(r, t, a), F(t, n); | ||
m(l, u) { | ||
h(l, t, u), D(t, r); | ||
}, | ||
p(r, [a]) { | ||
a & 15 && l !== (l = (r[3] ? r[3]([r[0], r[1]], r[2]) : String(r[0])) + "") && E(n, l); | ||
p(l, [u]) { | ||
u & 15 && n !== (n = l[3]([l[0], l[1]], l[2]) + "") && G(r, n); | ||
}, | ||
i: p, | ||
o: p, | ||
d(r) { | ||
r && h(t); | ||
i: b, | ||
o: b, | ||
d(l) { | ||
l && y(t); | ||
} | ||
}; | ||
} | ||
function je(e, t, l) { | ||
let { key: n = null } = t, { value: r } = t, { path: a = [] } = t, { format: f = null } = t; | ||
function Ce(e, t, n) { | ||
let { key: r = null } = t, { value: l } = t, { path: u = [] } = t, { format: f = Ke } = t; | ||
return e.$$set = (i) => { | ||
"key" in i && l(0, n = i.key), "value" in i && l(1, r = i.value), "path" in i && l(2, a = i.path), "format" in i && l(3, f = i.format); | ||
}, [n, r, a, f]; | ||
"key" in i && n(0, r = i.key), "value" in i && n(1, l = i.value), "path" in i && n(2, u = i.path), "format" in i && n(3, f = i.format); | ||
}, [r, l, u, f]; | ||
} | ||
class we extends z { | ||
class Te extends J { | ||
constructor(t) { | ||
super(), P(this, t, je, Ae, q, { key: 0, value: 1, path: 2, format: 3 }); | ||
super(), H(this, t, Ce, Ve, z, { key: 0, value: 1, path: 2, format: 3 }); | ||
} | ||
} | ||
const ce = we; | ||
function L(e) { | ||
return e === null ? "null" : Array.isArray(e) ? "array" : e instanceof Map ? "map" : e instanceof Set ? "set" : typeof e; | ||
} | ||
function D(e) { | ||
return Array.isArray(e) ? Object.keys(e).map((t) => [t, e[t]]) : "entries" in e && typeof e.entries == "function" ? [...e.entries()] : Object.entries(e); | ||
} | ||
function R(e) { | ||
const t = L(e); | ||
return t === "string" ? `${t}[v.length]` : t === "array" || t === "map" || t === "set" || t === "object" ? `${t}[${D(e).length}]` : t; | ||
} | ||
function Ke(e) { | ||
let t = String(e[0]) + "", l; | ||
const ye = Te; | ||
function Ne(e) { | ||
let t = e[3]([e[1], e[0]], e[2]) + "", n; | ||
return { | ||
c() { | ||
l = b(t); | ||
n = S(t); | ||
}, | ||
m(n, r) { | ||
d(n, l, r); | ||
m(r, l) { | ||
h(r, n, l); | ||
}, | ||
p(n, r) { | ||
r & 1 && t !== (t = String(n[0]) + "") && E(l, t); | ||
p(r, l) { | ||
l & 15 && t !== (t = r[3]([r[1], r[0]], r[2]) + "") && G(n, t); | ||
}, | ||
d(n) { | ||
n && h(l); | ||
d(r) { | ||
r && y(n); | ||
} | ||
}; | ||
} | ||
function Ve(e) { | ||
let t = String(e[3]([e[1], e[0]], e[2])) + "", l; | ||
function Ie(e) { | ||
let t = e[3]([e[1], e[0]], e[2]) + "", n; | ||
return { | ||
c() { | ||
l = b(t); | ||
n = S(t); | ||
}, | ||
m(n, r) { | ||
d(n, l, r); | ||
m(r, l) { | ||
h(r, n, l); | ||
}, | ||
p(n, r) { | ||
r & 15 && t !== (t = String(n[3]([n[1], n[0]], n[2])) + "") && E(l, t); | ||
p(r, l) { | ||
l & 15 && t !== (t = r[3]([r[1], r[0]], r[2]) + "") && G(n, t); | ||
}, | ||
d(n) { | ||
n && h(l); | ||
d(r) { | ||
r && y(n); | ||
} | ||
}; | ||
} | ||
function Ee(e) { | ||
let t = (e[3] ? e[3]([e[1], e[0]], e[2]) : `"${e[0]}"`) + "", l; | ||
return { | ||
c() { | ||
l = b(t); | ||
}, | ||
m(n, r) { | ||
d(n, l, r); | ||
}, | ||
p(n, r) { | ||
r & 15 && t !== (t = (n[3] ? n[3]([n[1], n[0]], n[2]) : `"${n[0]}"`) + "") && E(l, t); | ||
}, | ||
d(n) { | ||
n && h(l); | ||
} | ||
}; | ||
} | ||
function Ce(e) { | ||
let t, l; | ||
function n(f, i) { | ||
return typeof f[0] == "string" ? Ee : f[3] ? Ve : Ke; | ||
function Oe(e) { | ||
let t, n; | ||
function r(f, i) { | ||
return typeof f[0] == "string" ? Ie : Ne; | ||
} | ||
let r = n(e), a = r(e); | ||
let l = r(e), u = l(e); | ||
return { | ||
c() { | ||
t = v("div"), a.c(), g(t, "class", l = "magic-json-tree-value magic-json-tree-value-" + L(e[0]) + " svelte-jtmsic"); | ||
t = v("div"), u.c(), k(t, "class", n = "magic-json-tree-value magic-json-tree-value-" + q(e[0]) + " svelte-jtmsic"); | ||
}, | ||
m(f, i) { | ||
d(f, t, i), a.m(t, null); | ||
h(f, t, i), u.m(t, null); | ||
}, | ||
p(f, [i]) { | ||
r === (r = n(f)) && a ? a.p(f, i) : (a.d(1), a = r(f), a && (a.c(), a.m(t, null))), i & 1 && l !== (l = "magic-json-tree-value magic-json-tree-value-" + L(f[0]) + " svelte-jtmsic") && g(t, "class", l); | ||
l === (l = r(f)) && u ? u.p(f, i) : (u.d(1), u = l(f), u && (u.c(), u.m(t, null))), i & 1 && n !== (n = "magic-json-tree-value magic-json-tree-value-" + q(f[0]) + " svelte-jtmsic") && k(t, "class", n); | ||
}, | ||
i: p, | ||
o: p, | ||
i: b, | ||
o: b, | ||
d(f) { | ||
f && h(t), a.d(); | ||
f && y(t), u.d(); | ||
} | ||
}; | ||
} | ||
function Te(e, t, l) { | ||
let { value: n } = t, { key: r = null } = t, { path: a = [] } = t, { format: f = null } = t; | ||
function Fe(e, t, n) { | ||
let { value: r } = t, { key: l = null } = t, { path: u = [] } = t, { format: f = ([, i]) => `"${String(i)}"` } = t; | ||
return e.$$set = (i) => { | ||
"value" in i && l(0, n = i.value), "key" in i && l(1, r = i.key), "path" in i && l(2, a = i.path), "format" in i && l(3, f = i.format); | ||
}, [n, r, a, f]; | ||
"value" in i && n(0, r = i.value), "key" in i && n(1, l = i.key), "path" in i && n(2, u = i.path), "format" in i && n(3, f = i.format); | ||
}, [r, l, u, f]; | ||
} | ||
class Ne extends z { | ||
class Be extends J { | ||
constructor(t) { | ||
super(), P(this, t, Te, Ce, q, { value: 0, key: 1, path: 2, format: 3 }); | ||
super(), H(this, t, Fe, Oe, z, { value: 0, key: 1, path: 2, format: 3 }); | ||
} | ||
} | ||
const _e = Ne; | ||
function Ie(e) { | ||
let t = R(e[0]) + "", l; | ||
const he = Be; | ||
function Le(e) { | ||
let t = U(e[0]) + "", n; | ||
return { | ||
c() { | ||
l = b(t); | ||
n = S(t); | ||
}, | ||
m(n, r) { | ||
d(n, l, r); | ||
m(r, l) { | ||
h(r, n, l); | ||
}, | ||
p(n, r) { | ||
r & 1 && t !== (t = R(n[0]) + "") && E(l, t); | ||
p(r, l) { | ||
l & 1 && t !== (t = U(r[0]) + "") && G(n, t); | ||
}, | ||
d(n) { | ||
n && h(l); | ||
d(r) { | ||
r && y(n); | ||
} | ||
}; | ||
} | ||
function Oe(e) { | ||
var n; | ||
let t = ((n = e[2]([e[3], e[0]], e[4])) != null ? n : R(e[0])) + "", l; | ||
function Me(e) { | ||
var r; | ||
let t = ((r = e[2]([e[3], e[0]], e[4])) != null ? r : U(e[0])) + "", n; | ||
return { | ||
c() { | ||
l = b(t); | ||
n = S(t); | ||
}, | ||
m(r, a) { | ||
d(r, l, a); | ||
m(l, u) { | ||
h(l, n, u); | ||
}, | ||
p(r, a) { | ||
p(l, u) { | ||
var f; | ||
a & 29 && t !== (t = ((f = r[2]([r[3], r[0]], r[4])) != null ? f : R(r[0])) + "") && E(l, t); | ||
u & 29 && t !== (t = ((f = l[2]([l[3], l[0]], l[4])) != null ? f : U(l[0])) + "") && G(n, t); | ||
}, | ||
d(r) { | ||
r && h(l); | ||
d(l) { | ||
l && y(n); | ||
} | ||
}; | ||
} | ||
function Be(e) { | ||
let t, l, n, r, a; | ||
function De(e) { | ||
let t, n, r, l, u; | ||
function f(o, s) { | ||
return o[2] ? Oe : Ie; | ||
return o[2] ? Me : Le; | ||
} | ||
let i = f(e), u = i(e); | ||
let i = f(e), a = i(e); | ||
return { | ||
c() { | ||
t = v("a"), l = v("span"), l.textContent = "\u2023", n = v("span"), u.c(), g(l, "class", "arrow"), g(n, "class", "summary-content svelte-1yur81u"), g(t, "class", "magic-json-tree-summary svelte-1yur81u"), g(t, "href", "#"); | ||
t = v("a"), n = v("span"), n.textContent = "\u2023", r = v("span"), a.c(), k(n, "class", "arrow"), k(r, "class", "summary-content svelte-l74mo7"), k(t, "class", "magic-json-tree-summary svelte-l74mo7"), k(t, "href", "#"); | ||
}, | ||
m(o, s) { | ||
d(o, t, s), F(t, l), F(t, n), u.m(n, null), r || (a = ge(t, "click", function() { | ||
Y(e[1]) && e[1].apply(this, arguments); | ||
}), r = !0); | ||
h(o, t, s), D(t, n), D(t, r), a.m(r, null), l || (u = be(t, "click", function() { | ||
x(e[1]) && e[1].apply(this, arguments); | ||
}), l = !0); | ||
}, | ||
p(o, [s]) { | ||
e = o, i === (i = f(e)) && u ? u.p(e, s) : (u.d(1), u = i(e), u && (u.c(), u.m(n, null))); | ||
e = o, i === (i = f(e)) && a ? a.p(e, s) : (a.d(1), a = i(e), a && (a.c(), a.m(r, null))); | ||
}, | ||
i: p, | ||
o: p, | ||
i: b, | ||
o: b, | ||
d(o) { | ||
o && h(t), u.d(), r = !1, a(); | ||
o && y(t), a.d(), l = !1, u(); | ||
} | ||
}; | ||
} | ||
function Fe(e, t, l) { | ||
let { value: n } = t, { onClick: r } = t, { format: a = null } = t, { key: f = null } = t, { path: i = [] } = t; | ||
return e.$$set = (u) => { | ||
"value" in u && l(0, n = u.value), "onClick" in u && l(1, r = u.onClick), "format" in u && l(2, a = u.format), "key" in u && l(3, f = u.key), "path" in u && l(4, i = u.path); | ||
}, [n, r, a, f, i]; | ||
function qe(e, t, n) { | ||
let { value: r } = t, { onClick: l } = t, { format: u } = t, { key: f = null } = t, { path: i = [] } = t; | ||
return e.$$set = (a) => { | ||
"value" in a && n(0, r = a.value), "onClick" in a && n(1, l = a.onClick), "format" in a && n(2, u = a.format), "key" in a && n(3, f = a.key), "path" in a && n(4, i = a.path); | ||
}, [r, l, u, f, i]; | ||
} | ||
class Le extends z { | ||
class Pe extends J { | ||
constructor(t) { | ||
super(), P(this, t, Fe, Be, q, { | ||
super(), H(this, t, qe, De, z, { | ||
value: 0, | ||
@@ -405,10 +404,10 @@ onClick: 1, | ||
} | ||
const ye = Le; | ||
function te(e, t, l) { | ||
const n = e.slice(); | ||
return n[12] = t[l][0], n[13] = t[l][1], n; | ||
const ge = Pe; | ||
function le(e, t, n) { | ||
const r = e.slice(); | ||
return r[14] = t[n][0], r[15] = t[n][1], r; | ||
} | ||
function De(e) { | ||
let t, l, n, r, a; | ||
return l = new ce({ | ||
function ze(e) { | ||
let t, n, r, l, u; | ||
return n = new ye({ | ||
props: { | ||
@@ -420,3 +419,3 @@ key: e[0], | ||
} | ||
}), r = new _e({ | ||
}), l = new he({ | ||
props: { | ||
@@ -430,27 +429,27 @@ key: e[0], | ||
c() { | ||
t = v("div"), j(l.$$.fragment), n = b(":"), j(r.$$.fragment), g(t, "class", "key-line svelte-o8j8yy"); | ||
t = v("div"), j(n.$$.fragment), r = S(":"), j(l.$$.fragment), k(t, "class", "key-line svelte-o8j8yy"); | ||
}, | ||
m(f, i) { | ||
d(f, t, i), S(l, t, null), F(t, n), S(r, t, null), a = !0; | ||
h(f, t, i), p(n, t, null), D(t, r), p(l, t, null), u = !0; | ||
}, | ||
p(f, i) { | ||
const u = {}; | ||
i & 1 && (u.key = f[0]), i & 2 && (u.value = f[1]), i & 4 && (u.path = f[2]), i & 8 && (u.format = f[3]), l.$set(u); | ||
const a = {}; | ||
i & 1 && (a.key = f[0]), i & 2 && (a.value = f[1]), i & 4 && (a.path = f[2]), i & 8 && (a.format = f[3]), n.$set(a); | ||
const o = {}; | ||
i & 1 && (o.key = f[0]), i & 2 && (o.value = f[1]), i & 4 && (o.path = f[2]), i & 16 && (o.format = f[4]), r.$set(o); | ||
i & 1 && (o.key = f[0]), i & 2 && (o.value = f[1]), i & 4 && (o.path = f[2]), i & 16 && (o.format = f[4]), l.$set(o); | ||
}, | ||
i(f) { | ||
a || (_(l.$$.fragment, f), _(r.$$.fragment, f), a = !0); | ||
u || (_(n.$$.fragment, f), _(l.$$.fragment, f), u = !0); | ||
}, | ||
o(f) { | ||
y(l.$$.fragment, f), y(r.$$.fragment, f), a = !1; | ||
d(n.$$.fragment, f), d(l.$$.fragment, f), u = !1; | ||
}, | ||
d(f) { | ||
f && h(t), A(l), A(r); | ||
f && y(t), A(n), A(l); | ||
} | ||
}; | ||
} | ||
function Me(e) { | ||
let t, l, n, r, a, f, i; | ||
l = new ce({ | ||
function Ge(e) { | ||
let t, n, r, l, u, f, i; | ||
n = new ye({ | ||
props: { | ||
@@ -462,3 +461,3 @@ key: e[0], | ||
} | ||
}), r = new ye({ | ||
}), l = new ge({ | ||
props: { | ||
@@ -469,38 +468,38 @@ value: e[1], | ||
format: e[5], | ||
onClick: e[9] | ||
onClick: e[10] | ||
} | ||
}); | ||
let u = e[8] && ne(e); | ||
let a = e[8] && fe(e); | ||
return { | ||
c() { | ||
t = v("div"), j(l.$$.fragment), n = b(":"), j(r.$$.fragment), a = oe(), u && u.c(), f = se(), g(t, "class", "key-line svelte-o8j8yy"); | ||
t = v("div"), j(n.$$.fragment), r = S(":"), j(l.$$.fragment), u = ce(), a && a.c(), f = _e(), k(t, "class", "key-line svelte-o8j8yy"); | ||
}, | ||
m(o, s) { | ||
d(o, t, s), S(l, t, null), F(t, n), S(r, t, null), d(o, a, s), u && u.m(o, s), d(o, f, s), i = !0; | ||
h(o, t, s), p(n, t, null), D(t, r), p(l, t, null), h(o, u, s), a && a.m(o, s), h(o, f, s), i = !0; | ||
}, | ||
p(o, s) { | ||
const c = {}; | ||
s & 1 && (c.key = o[0]), s & 2 && (c.value = o[1]), s & 4 && (c.path = o[2]), s & 8 && (c.format = o[3]), l.$set(c); | ||
const k = {}; | ||
s & 2 && (k.value = o[1]), s & 1 && (k.key = o[0]), s & 4 && (k.path = o[2]), s & 32 && (k.format = o[5]), r.$set(k), o[8] ? u ? (u.p(o, s), s & 256 && _(u, 1)) : (u = ne(o), u.c(), _(u, 1), u.m(f.parentNode, f)) : u && (C(), y(u, 1, 1, () => { | ||
u = null; | ||
}), T()); | ||
s & 1 && (c.key = o[0]), s & 2 && (c.value = o[1]), s & 4 && (c.path = o[2]), s & 8 && (c.format = o[3]), n.$set(c); | ||
const g = {}; | ||
s & 2 && (g.value = o[1]), s & 1 && (g.key = o[0]), s & 4 && (g.path = o[2]), s & 32 && (g.format = o[5]), l.$set(g), o[8] ? a ? (a.p(o, s), s & 256 && _(a, 1)) : (a = fe(o), a.c(), _(a, 1), a.m(f.parentNode, f)) : a && (I(), d(a, 1, 1, () => { | ||
a = null; | ||
}), O()); | ||
}, | ||
i(o) { | ||
i || (_(l.$$.fragment, o), _(r.$$.fragment, o), _(u), i = !0); | ||
i || (_(n.$$.fragment, o), _(l.$$.fragment, o), _(a), i = !0); | ||
}, | ||
o(o) { | ||
y(l.$$.fragment, o), y(r.$$.fragment, o), y(u), i = !1; | ||
d(n.$$.fragment, o), d(l.$$.fragment, o), d(a), i = !1; | ||
}, | ||
d(o) { | ||
o && h(t), A(l), A(r), o && h(a), u && u.d(o), o && h(f); | ||
o && y(t), A(n), A(l), o && y(u), a && a.d(o), o && y(f); | ||
} | ||
}; | ||
} | ||
function ne(e) { | ||
let t, l, n = D(e[1]), r = []; | ||
for (let f = 0; f < n.length; f += 1) | ||
r[f] = le(te(e, n, f)); | ||
const a = (f) => y(r[f], 1, 1, () => { | ||
r[f] = null; | ||
function fe(e) { | ||
let t, n, r = e[9](e[1]), l = []; | ||
for (let f = 0; f < r.length; f += 1) | ||
l[f] = ae(le(e, r, f)); | ||
const u = (f) => d(l[f], 1, 1, () => { | ||
l[f] = null; | ||
}); | ||
@@ -510,55 +509,55 @@ return { | ||
t = v("div"); | ||
for (let f = 0; f < r.length; f += 1) | ||
r[f].c(); | ||
g(t, "class", "magic-json-tree-object-items"); | ||
for (let f = 0; f < l.length; f += 1) | ||
l[f].c(); | ||
k(t, "class", "magic-json-tree-object-items"); | ||
}, | ||
m(f, i) { | ||
d(f, t, i); | ||
for (let u = 0; u < r.length; u += 1) | ||
r[u].m(t, null); | ||
l = !0; | ||
h(f, t, i); | ||
for (let a = 0; a < l.length; a += 1) | ||
l[a] && l[a].m(t, null); | ||
n = !0; | ||
}, | ||
p(f, i) { | ||
if (i & 3326) { | ||
n = D(f[1]); | ||
let u; | ||
for (u = 0; u < n.length; u += 1) { | ||
const o = te(f, n, u); | ||
r[u] ? (r[u].p(o, i), _(r[u], 1)) : (r[u] = le(o), r[u].c(), _(r[u], 1), r[u].m(t, null)); | ||
if (i & 6910) { | ||
r = f[9](f[1]); | ||
let a; | ||
for (a = 0; a < r.length; a += 1) { | ||
const o = le(f, r, a); | ||
l[a] ? (l[a].p(o, i), _(l[a], 1)) : (l[a] = ae(o), l[a].c(), _(l[a], 1), l[a].m(t, null)); | ||
} | ||
for (C(), u = n.length; u < r.length; u += 1) | ||
a(u); | ||
T(); | ||
for (I(), a = r.length; a < l.length; a += 1) | ||
u(a); | ||
O(); | ||
} | ||
}, | ||
i(f) { | ||
if (!l) { | ||
for (let i = 0; i < n.length; i += 1) | ||
_(r[i]); | ||
l = !0; | ||
if (!n) { | ||
for (let i = 0; i < r.length; i += 1) | ||
_(l[i]); | ||
n = !0; | ||
} | ||
}, | ||
o(f) { | ||
r = r.filter(Boolean); | ||
for (let i = 0; i < r.length; i += 1) | ||
y(r[i]); | ||
l = !1; | ||
l = l.filter(Boolean); | ||
for (let i = 0; i < l.length; i += 1) | ||
d(l[i]); | ||
n = !1; | ||
}, | ||
d(f) { | ||
f && h(t), ie(r, f); | ||
f && y(t), me(l, f); | ||
} | ||
}; | ||
} | ||
function le(e) { | ||
let t, l; | ||
return t = new he({ | ||
function ae(e) { | ||
let t, n; | ||
return t = new ke({ | ||
props: { | ||
key: e[12], | ||
value: e[13], | ||
key: e[14], | ||
value: e[15], | ||
level: e[6] + 1, | ||
path: [...e[2], e[12]], | ||
path: [...e[2], e[14]], | ||
formatKey: e[3], | ||
formatValue: e[4], | ||
formatSummary: e[5], | ||
expand: Array.isArray(e[7]) ? e[10] === e[12] ? e[11] : 0 : e[7] | ||
expand: Array.isArray(e[7]) ? e[11] === e[14] ? e[12] : 0 : e[7] | ||
} | ||
@@ -569,76 +568,81 @@ }), { | ||
}, | ||
m(n, r) { | ||
S(t, n, r), l = !0; | ||
m(r, l) { | ||
p(t, r, l), n = !0; | ||
}, | ||
p(n, r) { | ||
const a = {}; | ||
r & 2 && (a.key = n[12]), r & 2 && (a.value = n[13]), r & 64 && (a.level = n[6] + 1), r & 6 && (a.path = [...n[2], n[12]]), r & 8 && (a.formatKey = n[3]), r & 16 && (a.formatValue = n[4]), r & 32 && (a.formatSummary = n[5]), r & 130 && (a.expand = Array.isArray(n[7]) ? n[10] === n[12] ? n[11] : 0 : n[7]), t.$set(a); | ||
p(r, l) { | ||
const u = {}; | ||
l & 514 && (u.key = r[14]), l & 514 && (u.value = r[15]), l & 64 && (u.level = r[6] + 1), l & 518 && (u.path = [...r[2], r[14]]), l & 8 && (u.formatKey = r[3]), l & 16 && (u.formatValue = r[4]), l & 32 && (u.formatSummary = r[5]), l & 642 && (u.expand = Array.isArray(r[7]) ? r[11] === r[14] ? r[12] : 0 : r[7]), t.$set(u); | ||
}, | ||
i(n) { | ||
l || (_(t.$$.fragment, n), l = !0); | ||
i(r) { | ||
n || (_(t.$$.fragment, r), n = !0); | ||
}, | ||
o(n) { | ||
y(t.$$.fragment, n), l = !1; | ||
o(r) { | ||
d(t.$$.fragment, r), n = !1; | ||
}, | ||
d(n) { | ||
A(t, n); | ||
d(r) { | ||
A(t, r); | ||
} | ||
}; | ||
} | ||
function qe(e) { | ||
let t, l, n, r, a; | ||
const f = [Me, De], i = []; | ||
function u(o, s) { | ||
function He(e) { | ||
let t, n, r, l, u; | ||
const f = [Ge, ze], i = []; | ||
function a(o, s) { | ||
return typeof o[1] == "object" && o[1] !== null ? 0 : 1; | ||
} | ||
return l = u(e), n = i[l] = f[l](e), { | ||
return n = a(e), r = i[n] = f[n](e), { | ||
c() { | ||
t = v("div"), n.c(), g(t, "class", r = "magic-json-tree-item magic-json-tree-item-" + L(e[1]) + " svelte-o8j8yy"), Q(t, "expanded", e[8]); | ||
t = v("div"), r.c(), k(t, "class", l = "magic-json-tree-item magic-json-tree-item-" + q(e[1]) + " svelte-o8j8yy"), R(t, "expanded", e[8]); | ||
}, | ||
m(o, s) { | ||
d(o, t, s), i[l].m(t, null), a = !0; | ||
h(o, t, s), i[n].m(t, null), u = !0; | ||
}, | ||
p(o, [s]) { | ||
let c = l; | ||
l = u(o), l === c ? i[l].p(o, s) : (C(), y(i[c], 1, 1, () => { | ||
let c = n; | ||
n = a(o), n === c ? i[n].p(o, s) : (I(), d(i[c], 1, 1, () => { | ||
i[c] = null; | ||
}), T(), n = i[l], n ? n.p(o, s) : (n = i[l] = f[l](o), n.c()), _(n, 1), n.m(t, null)), (!a || s & 2 && r !== (r = "magic-json-tree-item magic-json-tree-item-" + L(o[1]) + " svelte-o8j8yy")) && g(t, "class", r), (!a || s & 258) && Q(t, "expanded", o[8]); | ||
}), O(), r = i[n], r ? r.p(o, s) : (r = i[n] = f[n](o), r.c()), _(r, 1), r.m(t, null)), (!u || s & 2 && l !== (l = "magic-json-tree-item magic-json-tree-item-" + q(o[1]) + " svelte-o8j8yy")) && k(t, "class", l), (!u || s & 258) && R(t, "expanded", o[8]); | ||
}, | ||
i(o) { | ||
a || (_(n), a = !0); | ||
u || (_(r), u = !0); | ||
}, | ||
o(o) { | ||
y(n), a = !1; | ||
d(r), u = !1; | ||
}, | ||
d(o) { | ||
o && h(t), i[l].d(); | ||
o && y(t), i[n].d(); | ||
} | ||
}; | ||
} | ||
function Pe(e, t, l) { | ||
let { key: n } = t, { value: r } = t, { path: a = [] } = t, { formatKey: f = null } = t, { formatValue: i = null } = t, { formatSummary: u = null } = t, { level: o = 2 } = t, { expand: s } = t, c = Array.isArray(s) ? !0 : s >= o; | ||
function k(m) { | ||
l(8, c = !c), m.preventDefault(); | ||
function Je(e, t, n) { | ||
let { key: r } = t, { value: l } = t, { path: u = [] } = t, { formatKey: f } = t, { formatValue: i } = t, { formatSummary: a } = t, { level: o = 2 } = t, { expand: s } = t, { sorted: c = !1 } = t, g = Array.isArray(s) ? !0 : s >= o; | ||
function E(m) { | ||
n(8, g = !g), m.preventDefault(); | ||
} | ||
const [K, ...V] = Array.isArray(s) ? s : []; | ||
const [K, ...X] = Array.isArray(s) ? s : []; | ||
let F = c ? W : N; | ||
return e.$$set = (m) => { | ||
"key" in m && l(0, n = m.key), "value" in m && l(1, r = m.value), "path" in m && l(2, a = m.path), "formatKey" in m && l(3, f = m.formatKey), "formatValue" in m && l(4, i = m.formatValue), "formatSummary" in m && l(5, u = m.formatSummary), "level" in m && l(6, o = m.level), "expand" in m && l(7, s = m.expand); | ||
"key" in m && n(0, r = m.key), "value" in m && n(1, l = m.value), "path" in m && n(2, u = m.path), "formatKey" in m && n(3, f = m.formatKey), "formatValue" in m && n(4, i = m.formatValue), "formatSummary" in m && n(5, a = m.formatSummary), "level" in m && n(6, o = m.level), "expand" in m && n(7, s = m.expand), "sorted" in m && n(13, c = m.sorted); | ||
}, e.$$.update = () => { | ||
e.$$.dirty & 8192 && n(9, F = c ? W : N); | ||
}, [ | ||
n, | ||
r, | ||
a, | ||
l, | ||
u, | ||
f, | ||
i, | ||
u, | ||
a, | ||
o, | ||
s, | ||
c, | ||
k, | ||
g, | ||
F, | ||
E, | ||
K, | ||
V | ||
X, | ||
c | ||
]; | ||
} | ||
class he extends z { | ||
class ke extends J { | ||
constructor(t) { | ||
super(), P(this, t, Pe, qe, q, { | ||
super(), H(this, t, Je, He, z, { | ||
key: 0, | ||
@@ -651,17 +655,18 @@ value: 1, | ||
level: 6, | ||
expand: 7 | ||
expand: 7, | ||
sorted: 13 | ||
}); | ||
} | ||
} | ||
const ze = he; | ||
function re(e, t, l) { | ||
const n = e.slice(); | ||
return n[12] = t[l][0], n[13] = t[l][1], n; | ||
const Qe = ke; | ||
function ue(e, t, n) { | ||
const r = e.slice(); | ||
return r[14] = t[n][0], r[15] = t[n][1], r; | ||
} | ||
function Ge(e) { | ||
let t, l; | ||
return t = new _e({ | ||
function Re(e) { | ||
let t, n; | ||
return t = new he({ | ||
props: { | ||
value: e[0], | ||
format: e[3] | ||
format: e[4] | ||
} | ||
@@ -672,60 +677,60 @@ }), { | ||
}, | ||
m(n, r) { | ||
S(t, n, r), l = !0; | ||
m(r, l) { | ||
p(t, r, l), n = !0; | ||
}, | ||
p(n, r) { | ||
const a = {}; | ||
r & 1 && (a.value = n[0]), r & 8 && (a.format = n[3]), t.$set(a); | ||
p(r, l) { | ||
const u = {}; | ||
l & 1 && (u.value = r[0]), l & 16 && (u.format = r[4]), t.$set(u); | ||
}, | ||
i(n) { | ||
l || (_(t.$$.fragment, n), l = !0); | ||
i(r) { | ||
n || (_(t.$$.fragment, r), n = !0); | ||
}, | ||
o(n) { | ||
y(t.$$.fragment, n), l = !1; | ||
o(r) { | ||
d(t.$$.fragment, r), n = !1; | ||
}, | ||
d(n) { | ||
A(t, n); | ||
d(r) { | ||
A(t, r); | ||
} | ||
}; | ||
} | ||
function He(e) { | ||
let t, l, n, r; | ||
t = new ye({ | ||
function Ue(e) { | ||
let t, n, r, l; | ||
t = new ge({ | ||
props: { | ||
value: e[0], | ||
onClick: e[6], | ||
format: e[4] | ||
onClick: e[8], | ||
format: e[5] | ||
} | ||
}); | ||
let a = e[5] && fe(e); | ||
let u = e[6] && ie(e); | ||
return { | ||
c() { | ||
j(t.$$.fragment), l = oe(), a && a.c(), n = se(); | ||
j(t.$$.fragment), n = ce(), u && u.c(), r = _e(); | ||
}, | ||
m(f, i) { | ||
S(t, f, i), d(f, l, i), a && a.m(f, i), d(f, n, i), r = !0; | ||
p(t, f, i), h(f, n, i), u && u.m(f, i), h(f, r, i), l = !0; | ||
}, | ||
p(f, i) { | ||
const u = {}; | ||
i & 1 && (u.value = f[0]), i & 16 && (u.format = f[4]), t.$set(u), f[5] ? a ? (a.p(f, i), i & 32 && _(a, 1)) : (a = fe(f), a.c(), _(a, 1), a.m(n.parentNode, n)) : a && (C(), y(a, 1, 1, () => { | ||
a = null; | ||
}), T()); | ||
const a = {}; | ||
i & 1 && (a.value = f[0]), i & 32 && (a.format = f[5]), t.$set(a), f[6] ? u ? (u.p(f, i), i & 64 && _(u, 1)) : (u = ie(f), u.c(), _(u, 1), u.m(r.parentNode, r)) : u && (I(), d(u, 1, 1, () => { | ||
u = null; | ||
}), O()); | ||
}, | ||
i(f) { | ||
r || (_(t.$$.fragment, f), _(a), r = !0); | ||
l || (_(t.$$.fragment, f), _(u), l = !0); | ||
}, | ||
o(f) { | ||
y(t.$$.fragment, f), y(a), r = !1; | ||
d(t.$$.fragment, f), d(u), l = !1; | ||
}, | ||
d(f) { | ||
A(t, f), f && h(l), a && a.d(f), f && h(n); | ||
A(t, f), f && y(n), u && u.d(f), f && y(r); | ||
} | ||
}; | ||
} | ||
function fe(e) { | ||
let t, l, n = D(e[0]), r = []; | ||
for (let f = 0; f < n.length; f += 1) | ||
r[f] = ue(re(e, n, f)); | ||
const a = (f) => y(r[f], 1, 1, () => { | ||
r[f] = null; | ||
function ie(e) { | ||
let t, n, r = e[7](e[0]), l = []; | ||
for (let f = 0; f < r.length; f += 1) | ||
l[f] = oe(ue(e, r, f)); | ||
const u = (f) => d(l[f], 1, 1, () => { | ||
l[f] = null; | ||
}); | ||
@@ -735,55 +740,56 @@ return { | ||
t = v("div"); | ||
for (let f = 0; f < r.length; f += 1) | ||
r[f].c(); | ||
g(t, "class", "magic-json-tree-object-items"); | ||
for (let f = 0; f < l.length; f += 1) | ||
l[f].c(); | ||
k(t, "class", "magic-json-tree-object-items"); | ||
}, | ||
m(f, i) { | ||
d(f, t, i); | ||
for (let u = 0; u < r.length; u += 1) | ||
r[u].m(t, null); | ||
l = !0; | ||
h(f, t, i); | ||
for (let a = 0; a < l.length; a += 1) | ||
l[a] && l[a].m(t, null); | ||
n = !0; | ||
}, | ||
p(f, i) { | ||
if (i & 415) { | ||
n = D(f[0]); | ||
let u; | ||
for (u = 0; u < n.length; u += 1) { | ||
const o = re(f, n, u); | ||
r[u] ? (r[u].p(o, i), _(r[u], 1)) : (r[u] = ue(o), r[u].c(), _(r[u], 1), r[u].m(t, null)); | ||
if (i & 1727) { | ||
r = f[7](f[0]); | ||
let a; | ||
for (a = 0; a < r.length; a += 1) { | ||
const o = ue(f, r, a); | ||
l[a] ? (l[a].p(o, i), _(l[a], 1)) : (l[a] = oe(o), l[a].c(), _(l[a], 1), l[a].m(t, null)); | ||
} | ||
for (C(), u = n.length; u < r.length; u += 1) | ||
a(u); | ||
T(); | ||
for (I(), a = r.length; a < l.length; a += 1) | ||
u(a); | ||
O(); | ||
} | ||
}, | ||
i(f) { | ||
if (!l) { | ||
for (let i = 0; i < n.length; i += 1) | ||
_(r[i]); | ||
l = !0; | ||
if (!n) { | ||
for (let i = 0; i < r.length; i += 1) | ||
_(l[i]); | ||
n = !0; | ||
} | ||
}, | ||
o(f) { | ||
r = r.filter(Boolean); | ||
for (let i = 0; i < r.length; i += 1) | ||
y(r[i]); | ||
l = !1; | ||
l = l.filter(Boolean); | ||
for (let i = 0; i < l.length; i += 1) | ||
d(l[i]); | ||
n = !1; | ||
}, | ||
d(f) { | ||
f && h(t), ie(r, f); | ||
f && y(t), me(l, f); | ||
} | ||
}; | ||
} | ||
function ue(e) { | ||
let t, l; | ||
return t = new ze({ | ||
function oe(e) { | ||
let t, n; | ||
return t = new Qe({ | ||
props: { | ||
key: e[12], | ||
value: e[13], | ||
path: [e[12]], | ||
formatKey: e[2], | ||
formatValue: e[3], | ||
formatSummary: e[4], | ||
key: e[14], | ||
value: e[15], | ||
path: [e[14]], | ||
formatKey: e[3], | ||
formatValue: e[4], | ||
formatSummary: e[5], | ||
level: 2, | ||
expand: Array.isArray(e[1]) ? e[7] === e[12] ? e[8] : 0 : e[1] | ||
sorted: e[2], | ||
expand: Array.isArray(e[1]) ? e[9] === e[14] ? e[10] : 0 : e[1] | ||
} | ||
@@ -794,89 +800,92 @@ }), { | ||
}, | ||
m(n, r) { | ||
S(t, n, r), l = !0; | ||
m(r, l) { | ||
p(t, r, l), n = !0; | ||
}, | ||
p(n, r) { | ||
const a = {}; | ||
r & 1 && (a.key = n[12]), r & 1 && (a.value = n[13]), r & 1 && (a.path = [n[12]]), r & 4 && (a.formatKey = n[2]), r & 8 && (a.formatValue = n[3]), r & 16 && (a.formatSummary = n[4]), r & 3 && (a.expand = Array.isArray(n[1]) ? n[7] === n[12] ? n[8] : 0 : n[1]), t.$set(a); | ||
p(r, l) { | ||
const u = {}; | ||
l & 129 && (u.key = r[14]), l & 129 && (u.value = r[15]), l & 129 && (u.path = [r[14]]), l & 8 && (u.formatKey = r[3]), l & 16 && (u.formatValue = r[4]), l & 32 && (u.formatSummary = r[5]), l & 4 && (u.sorted = r[2]), l & 131 && (u.expand = Array.isArray(r[1]) ? r[9] === r[14] ? r[10] : 0 : r[1]), t.$set(u); | ||
}, | ||
i(n) { | ||
l || (_(t.$$.fragment, n), l = !0); | ||
i(r) { | ||
n || (_(t.$$.fragment, r), n = !0); | ||
}, | ||
o(n) { | ||
y(t.$$.fragment, n), l = !1; | ||
o(r) { | ||
d(t.$$.fragment, r), n = !1; | ||
}, | ||
d(n) { | ||
A(t, n); | ||
d(r) { | ||
A(t, r); | ||
} | ||
}; | ||
} | ||
function Je(e) { | ||
let t, l, n, r; | ||
const a = [He, Ge], f = []; | ||
function i(u, o) { | ||
return typeof u[0] == "object" && u[0] !== null ? 0 : 1; | ||
function We(e) { | ||
let t, n, r, l; | ||
const u = [Ue, Re], f = []; | ||
function i(a, o) { | ||
return typeof a[0] == "object" && a[0] !== null ? 0 : 1; | ||
} | ||
return l = i(e), n = f[l] = a[l](e), { | ||
return n = i(e), r = f[n] = u[n](e), { | ||
c() { | ||
t = v("div"), n.c(), g(t, "class", "magic-json-tree-root svelte-1slccqa"), Q(t, "expanded", e[5]); | ||
t = v("div"), r.c(), k(t, "class", "magic-json-tree-root svelte-1slccqa"), R(t, "expanded", e[6]); | ||
}, | ||
m(u, o) { | ||
d(u, t, o), f[l].m(t, null), r = !0; | ||
m(a, o) { | ||
h(a, t, o), f[n].m(t, null), l = !0; | ||
}, | ||
p(u, [o]) { | ||
let s = l; | ||
l = i(u), l === s ? f[l].p(u, o) : (C(), y(f[s], 1, 1, () => { | ||
p(a, [o]) { | ||
let s = n; | ||
n = i(a), n === s ? f[n].p(a, o) : (I(), d(f[s], 1, 1, () => { | ||
f[s] = null; | ||
}), T(), n = f[l], n ? n.p(u, o) : (n = f[l] = a[l](u), n.c()), _(n, 1), n.m(t, null)), (!r || o & 32) && Q(t, "expanded", u[5]); | ||
}), O(), r = f[n], r ? r.p(a, o) : (r = f[n] = u[n](a), r.c()), _(r, 1), r.m(t, null)), (!l || o & 64) && R(t, "expanded", a[6]); | ||
}, | ||
i(u) { | ||
r || (_(n), r = !0); | ||
i(a) { | ||
l || (_(r), l = !0); | ||
}, | ||
o(u) { | ||
y(n), r = !1; | ||
o(a) { | ||
d(r), l = !1; | ||
}, | ||
d(u) { | ||
u && h(t), f[l].d(); | ||
d(a) { | ||
a && y(t), f[n].d(); | ||
} | ||
}; | ||
} | ||
function Qe(e, t, l) { | ||
let { value: n } = t, { expand: r = 0 } = t, { formatKey: a = null } = t, { formatValue: f = null } = t, { formatSummary: i = null } = t, u = null, o = null, s = null, c = Array.isArray(r) ? !0 : r >= 1; | ||
function k(m) { | ||
l(5, c = !c), m.preventDefault(); | ||
function Xe(e, t, n) { | ||
let { value: r } = t, { expand: l = 0 } = t, { formatKey: u = void 0 } = t, { formatValue: f = void 0 } = t, { formatSummary: i = void 0 } = t, { sorted: a = !1 } = t, o, s, c, g = Array.isArray(l) ? !0 : l >= 1; | ||
function E(m) { | ||
n(6, g = !g), m.preventDefault(); | ||
} | ||
const [K, ...V] = Array.isArray(r) ? r : []; | ||
const [K, ...X] = Array.isArray(l) ? l : []; | ||
let F = a ? W : N; | ||
return e.$$set = (m) => { | ||
"value" in m && l(0, n = m.value), "expand" in m && l(1, r = m.expand), "formatKey" in m && l(9, a = m.formatKey), "formatValue" in m && l(10, f = m.formatValue), "formatSummary" in m && l(11, i = m.formatSummary); | ||
"value" in m && n(0, r = m.value), "expand" in m && n(1, l = m.expand), "formatKey" in m && n(11, u = m.formatKey), "formatValue" in m && n(12, f = m.formatValue), "formatSummary" in m && n(13, i = m.formatSummary), "sorted" in m && n(2, a = m.sorted); | ||
}, e.$$.update = () => { | ||
e.$$.dirty & 512 && l(2, u = a ? (m, N) => { | ||
e.$$.dirty & 2048 && typeof u == "function" && n(3, o = (m, B) => { | ||
try { | ||
return a(m, N); | ||
} catch (I) { | ||
return console.error("The passed `formatKey` function threw an error. An unformatted key will be rendered.\n", I), m[0]; | ||
return u(m, B); | ||
} catch (L) { | ||
return console.error("The passed `formatKey` function threw an error. An unformatted key will be rendered.\n", L), m[0]; | ||
} | ||
} : null), e.$$.dirty & 1024 && l(3, o = f ? (m, N) => { | ||
}), e.$$.dirty & 4096 && typeof f == "function" && n(4, s = (m, B) => { | ||
try { | ||
return f(m, N); | ||
} catch (I) { | ||
return console.error("The passed `formatValue` function threw an error. An unformatted value will be rendered.\n", I), m[1]; | ||
return f(m, B); | ||
} catch (L) { | ||
return console.error("The passed `formatValue` function threw an error. An unformatted value will be rendered.\n", L), m[1]; | ||
} | ||
} : null), e.$$.dirty & 2048 && l(4, s = i ? (m, N) => { | ||
}), e.$$.dirty & 8192 && typeof i == "function" && n(5, c = (m, B) => { | ||
try { | ||
return i(m, N); | ||
} catch (I) { | ||
return console.error("The passed `formatSummary` function threw an error. A default summary will be rendered.\n", I), m[1]; | ||
return i(m, B); | ||
} catch (L) { | ||
return console.error("The passed `formatSummary` function threw an error. A default summary will be rendered.\n", L), m[1]; | ||
} | ||
} : null); | ||
}), e.$$.dirty & 4 && n(7, F = a ? W : N); | ||
}, [ | ||
n, | ||
r, | ||
u, | ||
l, | ||
a, | ||
o, | ||
s, | ||
c, | ||
k, | ||
g, | ||
F, | ||
E, | ||
K, | ||
V, | ||
a, | ||
X, | ||
u, | ||
f, | ||
@@ -886,17 +895,18 @@ i | ||
} | ||
class Re extends z { | ||
class Ye extends J { | ||
constructor(t) { | ||
super(), P(this, t, Qe, Je, q, { | ||
super(), H(this, t, Xe, We, z, { | ||
value: 0, | ||
expand: 1, | ||
formatKey: 9, | ||
formatValue: 10, | ||
formatSummary: 11 | ||
formatKey: 11, | ||
formatValue: 12, | ||
formatSummary: 13, | ||
sorted: 2 | ||
}); | ||
} | ||
} | ||
const Ue = Re; | ||
const $e = Ye; | ||
export { | ||
Ue as default, | ||
R as getTypeSummary | ||
$e as default, | ||
U as getTypeSummary | ||
}; |
{ | ||
"name": "magic-json-tree", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"author": "Richard Laffers", | ||
@@ -22,2 +22,3 @@ "license": "ISC", | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/magic-json-tree.js", | ||
@@ -33,8 +34,9 @@ "require": "./dist/magic-json-tree.umd.cjs" | ||
"@sveltejs/vite-plugin-svelte": "^1.1.0", | ||
"@tsconfig/svelte": "^3.0.0", | ||
"svelte": "^3.52.0", | ||
"svelte-check": "^2.9.2", | ||
"svelte-preprocess": "^4.10.7", | ||
"@tsconfig/svelte": "^5.0.2", | ||
"eslint": "8", | ||
"svelte": "^3.59.2", | ||
"svelte-check": "^3.5.1", | ||
"svelte-preprocess": "^5.0.4", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.6.4", | ||
"typescript": "^5.2.2", | ||
"vite": "^3.2.3" | ||
@@ -47,12 +49,16 @@ }, | ||
"volta": { | ||
"node": "16.15.0", | ||
"npm": "8.11.0" | ||
"node": "18.17.0" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"build": "vite build && tsc -p tsconfig.build.json", | ||
"preview": "vite preview", | ||
"check": "svelte-check --tsconfig ./tsconfig.json", | ||
"lint": "svelte-check" | ||
"lint": "eslint lib/ src/", | ||
"lint:fix": "eslint --fix lib/ src/", | ||
"prepublish": "pnpm check" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
59124
8
1028
9