jaml-ui 4.2.0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { JIMBO_ANIMATIONS as ya, JimboColorOption as Ca, withAlpha as ba } from "./ui.js";
1
+ import { J as ya, a as ba, b as Ca, c as Ea, d as Qa, e as ka, w as va } from "./chunks/JimboBackground-DlaVcKnf.js";
2
2
  import { jsxs as C, jsx as A, Fragment as Ve } from "react/jsx-runtime";
3
3
  import { useRef as Ae, useState as re, useEffect as ft, useCallback as ht, useMemo as q, Fragment as wn } from "react";
4
4
  import { f as T, b as vs, d as kt, e as Is, h as vt, C as Bs, E as Sn, a as Pt, R as Lt, c as jn, g as mt, S as Tn, T as ws, V as It, r as Te } from "./chunks/spriteMapper-BiDkbZrD.js";
5
5
  import { L as X } from "./chunks/Layer-B5y9UIAt.js";
6
6
  import { decodeMotelyItem as Pe, decodeMotelyItemToJamlCard as Mn } from "./motely.js";
7
- import { decodeMotelyItemName as Qa, getMotelySpriteByName as ka, motelyItemCategory as va, motelyItemDisplayName as Ia, motelyItemEditionName as Ba, motelyItemEnhancementName as wa, motelyItemRenderCategory as Sa, motelyItemSealName as ja, motelyItemToSprite as Ta, motelyItemTypeName as Ma, motelyStandardcardRankName as Na, motelyStandardcardSuitName as Oa, resolveMotelyItemType as Ja } from "./motely.js";
7
+ import { decodeMotelyItemName as Ba, getMotelySpriteByName as wa, motelyItemCategory as Sa, motelyItemDisplayName as ja, motelyItemEditionName as Ta, motelyItemEnhancementName as Ma, motelyItemRenderCategory as Na, motelyItemSealName as Oa, motelyItemToSprite as Ja, motelyItemTypeName as Pa, motelyStandardcardRankName as La, motelyStandardcardSuitName as za, resolveMotelyItemType as Ra } from "./motely.js";
8
8
  import { MotelyDeck as Ss, MotelyStake as js, MotelyTag as Ts, MotelyBossBlind as Ms, MotelyVoucher as Ns, MotelyBoosterPack as Os } from "motely-wasm";
9
9
  import * as Ki from "motely-wasm";
10
- import { default as La } from "motely-wasm";
10
+ import { default as Da } from "motely-wasm";
11
11
  function sn(n) {
12
12
  return new Promise((e) => {
13
13
  const t = new window.Image();
@@ -38,76 +38,76 @@ function Js({
38
38
  invert: e = !1,
39
39
  hoverTilt: t = !1
40
40
  }) {
41
- const s = Ae(null), r = Ae(null), i = Ae(/* @__PURE__ */ new Map()), [a, o] = re(3 / 4), [, l] = re(0), c = Ae(null), f = Ae({ rx: 0, ry: 0, rz: 0 }), u = Ae({ rx: 0, ry: 0, rz: 0 }), m = n == null ? void 0 : n.some((E) => E.animated);
41
+ const s = Ae(null), r = Ae(null), i = Ae(/* @__PURE__ */ new Map()), [a, o] = re(3 / 4), [, l] = re(0), c = Ae(null), f = Ae({ rx: 0, ry: 0, rz: 0 }), u = Ae({ rx: 0, ry: 0, rz: 0 }), m = n == null ? void 0 : n.some((p) => p.animated);
42
42
  ft(() => {
43
- let E = !1;
44
- const p = i.current;
43
+ let p = !1;
44
+ const Q = i.current;
45
45
  return (async () => {
46
- const B = Array.from(new Set(Object.values(T).map((v) => v.src))), I = await Promise.all(B.map((v) => sn(v)));
47
- E || (I.forEach((v, S) => {
48
- v && p.set(B[S], v);
49
- }), l((v) => v + 1));
50
- })().catch((B) => console.error("[JamlCardRenderer]", B)), () => {
51
- E = !0, p.clear();
46
+ const v = Array.from(new Set(Object.values(T).map((k) => k.src))), B = await Promise.all(v.map((k) => sn(k)));
47
+ p || (B.forEach((k, S) => {
48
+ k && Q.set(v[S], k);
49
+ }), l((k) => k + 1));
50
+ })().catch((v) => console.error("[JamlCardRenderer]", v)), () => {
51
+ p = !0, Q.clear();
52
52
  };
53
53
  }, []), ft(() => {
54
- const E = s.current;
55
- if (!E || !n || n.length === 0) return;
56
- const p = E.getContext("2d");
57
- if (!p) return;
58
- let k = !1, B = null, I;
59
- const v = (S) => {
60
- p.clearRect(0, 0, E.width, E.height), [...n].sort((j, J) => j.order - J.order).forEach((j) => {
54
+ const p = s.current;
55
+ if (!p || !n || n.length === 0) return;
56
+ const Q = p.getContext("2d");
57
+ if (!Q) return;
58
+ let b = !1, v = null, B;
59
+ const k = (S) => {
60
+ Q.clearRect(0, 0, p.width, p.height), [...n].sort((j, J) => j.order - J.order).forEach((j) => {
61
61
  const J = i.current.get(j.source);
62
62
  if (J) {
63
- const R = rn(E, p, J, j, m ? S : void 0);
63
+ const R = rn(p, Q, J, j, m ? S : void 0);
64
64
  j.order === 0 && o(R);
65
65
  return;
66
66
  }
67
67
  sn(j.source).then((R) => {
68
- if (!(k || !R)) {
68
+ if (!(b || !R)) {
69
69
  if (i.current.set(j.source, R), !m) {
70
- const H = rn(E, p, R, j);
70
+ const H = rn(p, Q, R, j);
71
71
  j.order === 0 && o(H);
72
72
  }
73
73
  l((H) => H + 1);
74
74
  }
75
75
  });
76
- }), E.style.filter = e ? "invert(0.94)" : "none";
76
+ }), p.style.filter = e ? "invert(0.94)" : "none";
77
77
  };
78
78
  if (m) {
79
79
  const S = (j) => {
80
- k || (I === void 0 && (I = j), v(j - I), B = requestAnimationFrame(S));
80
+ b || (B === void 0 && (B = j), k(j - B), v = requestAnimationFrame(S));
81
81
  };
82
- B = requestAnimationFrame(S);
82
+ v = requestAnimationFrame(S);
83
83
  } else
84
- v();
84
+ k();
85
85
  return () => {
86
- k = !0, B !== null && cancelAnimationFrame(B);
86
+ b = !0, v !== null && cancelAnimationFrame(v);
87
87
  };
88
88
  }, [n, e, m]);
89
89
  const h = ht(() => {
90
90
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
91
91
  }, []), y = ht(() => {
92
- const E = s.current;
93
- if (!E) return;
94
- const p = u.current;
95
- E.style.transform = `rotateX(${p.rx}deg) rotateY(${p.ry}deg) rotateZ(${p.rz}deg)`;
92
+ const p = s.current;
93
+ if (!p) return;
94
+ const Q = u.current;
95
+ p.style.transform = `rotateX(${Q.rx}deg) rotateY(${Q.ry}deg) rotateZ(${Q.rz}deg)`;
96
96
  }, []), d = ht(
97
- (E, p) => {
97
+ (p, Q) => {
98
98
  h();
99
- let k = performance.now();
100
- const B = (I) => {
101
- const v = Math.min(0.05, (I - k) / 1e3);
102
- k = I;
103
- const S = f.current, j = u.current, J = 1 - Math.exp(-E * v);
99
+ let b = performance.now();
100
+ const v = (B) => {
101
+ const k = Math.min(0.05, (B - b) / 1e3);
102
+ b = B;
103
+ const S = f.current, j = u.current, J = 1 - Math.exp(-p * k);
104
104
  if (j.rx += (S.rx - j.rx) * J, j.ry += (S.ry - j.ry) * J, j.rz += (S.rz - j.rz) * J, y(), Math.abs(S.rx - j.rx) < 0.02 && Math.abs(S.ry - j.ry) < 0.02 && Math.abs(S.rz - j.rz) < 0.02) {
105
- j.rx = S.rx, j.ry = S.ry, j.rz = S.rz, y(), c.current = null, p == null || p();
105
+ j.rx = S.rx, j.ry = S.ry, j.rz = S.rz, y(), c.current = null, Q == null || Q();
106
106
  return;
107
107
  }
108
- c.current = requestAnimationFrame(B);
108
+ c.current = requestAnimationFrame(v);
109
109
  };
110
- c.current = requestAnimationFrame(B);
110
+ c.current = requestAnimationFrame(v);
111
111
  },
112
112
  [h, y]
113
113
  );
@@ -116,26 +116,26 @@ function Js({
116
116
  containerRef: r,
117
117
  ratio: a,
118
118
  handlers: {
119
- onPointerEnter: t ? (E) => {
120
- var p;
121
- !t || E.pointerType === "touch" || ((p = r.current) == null || p.setAttribute("data-hovered", "true"), d(22));
119
+ onPointerEnter: t ? (p) => {
120
+ var Q;
121
+ !t || p.pointerType === "touch" || ((Q = r.current) == null || Q.setAttribute("data-hovered", "true"), d(22));
122
122
  } : void 0,
123
123
  onPointerLeave: t ? () => {
124
- var E;
125
- t && ((E = r.current) == null || E.setAttribute("data-hovered", "false"), f.current = { rx: 0, ry: 0, rz: 0 }, d(14, () => {
126
- const p = s.current;
127
- p && (p.style.transform = "");
124
+ var p;
125
+ t && ((p = r.current) == null || p.setAttribute("data-hovered", "false"), f.current = { rx: 0, ry: 0, rz: 0 }, d(14, () => {
126
+ const Q = s.current;
127
+ Q && (Q.style.transform = "");
128
128
  }));
129
129
  } : void 0,
130
- onPointerMove: t ? (E) => {
131
- var I, v;
132
- if (!t || E.pointerType === "touch") return;
133
- const p = E.currentTarget.getBoundingClientRect(), k = Math.max(-1, Math.min(1, ((E.clientX - p.left) / p.width - 0.5) * 2)), B = Math.max(-1, Math.min(1, ((E.clientY - p.top) / p.height - 0.5) * 2));
130
+ onPointerMove: t ? (p) => {
131
+ var B, k;
132
+ if (!t || p.pointerType === "touch") return;
133
+ const Q = p.currentTarget.getBoundingClientRect(), b = Math.max(-1, Math.min(1, ((p.clientX - Q.left) / Q.width - 0.5) * 2)), v = Math.max(-1, Math.min(1, ((p.clientY - Q.top) / Q.height - 0.5) * 2));
134
134
  f.current = {
135
- rx: B * -10,
136
- ry: k * 12,
137
- rz: k * B * -1.2
138
- }, (I = r.current) == null || I.style.setProperty("--j-card-glare-x", `${(k + 1) * 50}%`), (v = r.current) == null || v.style.setProperty("--j-card-glare-y", `${(1 - B) * 50}%`), d(22);
135
+ rx: v * -10,
136
+ ry: b * 12,
137
+ rz: b * v * -1.2
138
+ }, (B = r.current) == null || B.style.setProperty("--j-card-glare-x", `${(b + 1) * 50}%`), (k = r.current) == null || k.style.setProperty("--j-card-glare-y", `${(1 - v) * 50}%`), d(22);
139
139
  } : void 0
140
140
  }
141
141
  };
@@ -310,14 +310,14 @@ function qi(n, e = 1) {
310
310
  function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
311
311
  const { name: r, edition: i, isEternal: a, isPerishable: o, isRental: l, rank: c, suit: f, enhancements: u, seal: m, scale: h = 1 } = n, y = [];
312
312
  if (e === "joker") {
313
- const d = kt.find((b) => b.name === r);
313
+ const d = kt.find((E) => E.name === r);
314
314
  d && y.push(new X({ ...d, source: T.jokers.src, order: 0, columns: T.jokers.columns, rows: T.jokers.rows }));
315
- const g = Is.find((b) => b.name === r);
315
+ const g = Is.find((E) => E.name === r);
316
316
  g && y.push(new X({ ...g, source: T.jokers.src, order: 1, columns: T.jokers.columns, rows: T.jokers.rows }));
317
317
  } else if (e === "consumable") {
318
- const d = vt.find((b) => b.name === r);
318
+ const d = vt.find((E) => E.name === r);
319
319
  d && y.push(new X({ ...d, order: 0, source: T.tarots.src, rows: T.tarots.rows, columns: T.tarots.columns }));
320
- const g = Bs.find((b) => b.name === r);
320
+ const g = Bs.find((E) => E.name === r);
321
321
  g && y.push(
322
322
  new X({
323
323
  ...g,
@@ -331,7 +331,7 @@ function Nn({ card: n, type: e, className: t = "", hoverTilt: s = !1 }) {
331
331
  } else {
332
332
  const d = c && f ? { rank: c, suit: f } : Bt(r);
333
333
  if (d) {
334
- const g = (u ?? []).map((b) => Sn[b]).find((b) => !!b) ?? { x: 1, y: 0 };
334
+ const g = (u ?? []).map((E) => Sn[E]).find((E) => !!E) ?? { x: 1, y: 0 };
335
335
  y.push(
336
336
  new X({
337
337
  pos: g,
@@ -509,7 +509,7 @@ function xs({
509
509
  const c = (!e || !n) && t ? Ds(t) : null, f = e ?? (c == null ? void 0 : c.rank), u = n ?? (c == null ? void 0 : c.suit), m = f ? Lt[f] : void 0, h = u ? Pt[u] : void 0;
510
510
  if (m === void 0 || h === void 0)
511
511
  return console.warn(`Invalid card: ${f} of ${u}`), null;
512
- const y = o / ie, d = o * (Be / ie), g = -m * ie, b = -h * Be, Q = { x: 1, y: 0 }, E = s ? Sn[s] ?? Q : Q, p = r ? Tn[r] ?? null : null, k = i ? jn[i] : void 0, B = i === ln.Negative, I = B ? "invert(0.94)" : "none", v = Te("enhancers"), S = Te("deck"), j = Te("editions"), J = {
512
+ const y = o / ie, d = o * (Be / ie), g = -m * ie, E = -h * Be, I = { x: 1, y: 0 }, p = s ? Sn[s] ?? I : I, Q = r ? Tn[r] ?? null : null, b = i ? jn[i] : void 0, v = i === ln.Negative, B = v ? "invert(0.94)" : "none", k = Te("enhancers"), S = Te("deck"), j = Te("editions"), J = {
513
513
  position: "absolute",
514
514
  top: 0,
515
515
  left: 0,
@@ -541,8 +541,8 @@ function xs({
541
541
  style: {
542
542
  ...J,
543
543
  zIndex: 0,
544
- backgroundImage: `url(${v})`,
545
- backgroundPosition: `${-E.x * ie}px ${-E.y * Be}px`
544
+ backgroundImage: `url(${k})`,
545
+ backgroundPosition: `${-p.x * ie}px ${-p.y * Be}px`
546
546
  }
547
547
  }
548
548
  ),
@@ -553,12 +553,12 @@ function xs({
553
553
  ...J,
554
554
  zIndex: 1,
555
555
  backgroundImage: `url(${S})`,
556
- backgroundPosition: `${g}px ${b}px`,
557
- filter: I
556
+ backgroundPosition: `${g}px ${E}px`,
557
+ filter: B
558
558
  }
559
559
  }
560
560
  ),
561
- i && i !== ln.Negative && k !== void 0 && /* @__PURE__ */ A(
561
+ i && i !== ln.Negative && b !== void 0 && /* @__PURE__ */ A(
562
562
  "div",
563
563
  {
564
564
  style: {
@@ -567,22 +567,22 @@ function xs({
567
567
  mixBlendMode: "screen",
568
568
  opacity: 0.6,
569
569
  backgroundImage: `url(${j})`,
570
- backgroundPosition: `${-k * ie}px 0px`
570
+ backgroundPosition: `${-b * ie}px 0px`
571
571
  }
572
572
  }
573
573
  ),
574
- p && /* @__PURE__ */ A(
574
+ Q && /* @__PURE__ */ A(
575
575
  "div",
576
576
  {
577
577
  style: {
578
578
  ...J,
579
579
  zIndex: 3,
580
- backgroundImage: `url(${v})`,
581
- backgroundPosition: `${-p.x * ie}px ${-p.y * Be}px`
580
+ backgroundImage: `url(${k})`,
581
+ backgroundPosition: `${-Q.x * ie}px ${-Q.y * Be}px`
582
582
  }
583
583
  }
584
584
  ),
585
- B && /* @__PURE__ */ A(
585
+ v && /* @__PURE__ */ A(
586
586
  "div",
587
587
  {
588
588
  style: {
@@ -599,12 +599,12 @@ function xs({
599
599
  }
600
600
  );
601
601
  }
602
- const zt = Symbol.for("yaml.alias"), wt = Symbol.for("yaml.document"), se = Symbol.for("yaml.map"), Jn = Symbol.for("yaml.pair"), $ = Symbol.for("yaml.scalar"), be = Symbol.for("yaml.seq"), W = Symbol.for("yaml.node.type"), Ee = (n) => !!n && typeof n == "object" && n[W] === zt, nt = (n) => !!n && typeof n == "object" && n[W] === wt, Le = (n) => !!n && typeof n == "object" && n[W] === se, z = (n) => !!n && typeof n == "object" && n[W] === Jn, O = (n) => !!n && typeof n == "object" && n[W] === $, ze = (n) => !!n && typeof n == "object" && n[W] === be;
602
+ const zt = Symbol.for("yaml.alias"), wt = Symbol.for("yaml.document"), se = Symbol.for("yaml.map"), Jn = Symbol.for("yaml.pair"), $ = Symbol.for("yaml.scalar"), Ce = Symbol.for("yaml.seq"), W = Symbol.for("yaml.node.type"), Ee = (n) => !!n && typeof n == "object" && n[W] === zt, nt = (n) => !!n && typeof n == "object" && n[W] === wt, Le = (n) => !!n && typeof n == "object" && n[W] === se, z = (n) => !!n && typeof n == "object" && n[W] === Jn, O = (n) => !!n && typeof n == "object" && n[W] === $, ze = (n) => !!n && typeof n == "object" && n[W] === Ce;
603
603
  function P(n) {
604
604
  if (n && typeof n == "object")
605
605
  switch (n[W]) {
606
606
  case se:
607
- case be:
607
+ case Ce:
608
608
  return !0;
609
609
  }
610
610
  return !1;
@@ -615,7 +615,7 @@ function L(n) {
615
615
  case zt:
616
616
  case se:
617
617
  case $:
618
- case be:
618
+ case Ce:
619
619
  return !0;
620
620
  }
621
621
  return !1;
@@ -1067,7 +1067,7 @@ function Oe(n, e, t) {
1067
1067
  const y = new M(n);
1068
1068
  return l && (l.node = y), y;
1069
1069
  }
1070
- c = n instanceof Map ? a[se] : Symbol.iterator in Object(n) ? a[be] : a[se];
1070
+ c = n instanceof Map ? a[se] : Symbol.iterator in Object(n) ? a[Ce] : a[se];
1071
1071
  }
1072
1072
  i && (i(c), delete t.onTagObj);
1073
1073
  const f = c != null && c.createNode ? c.createNode(t.schema, n, t) : typeof ((h = c == null ? void 0 : c.nodeClass) == null ? void 0 : h.from) == "function" ? c.nodeClass.from(t.schema, n, t) : new M(n);
@@ -1207,10 +1207,10 @@ function st(n, e, t = "flow", { indentAtStart: s, lineWidth: r = 80, minContentW
1207
1207
  const c = [], f = {};
1208
1208
  let u = r - e.length;
1209
1209
  typeof s == "number" && (s > r - Math.max(2, i) ? c.push(0) : u = r - s);
1210
- let m, h, y = !1, d = -1, g = -1, b = -1;
1210
+ let m, h, y = !1, d = -1, g = -1, E = -1;
1211
1211
  t === St && (d = cn(n, d, e.length), d !== -1 && (u = d + l));
1212
- for (let E; E = n[d += 1]; ) {
1213
- if (t === Ue && E === "\\") {
1212
+ for (let p; p = n[d += 1]; ) {
1213
+ if (t === Ue && p === "\\") {
1214
1214
  switch (g = d, n[d + 1]) {
1215
1215
  case "x":
1216
1216
  d += 3;
@@ -1224,44 +1224,44 @@ function st(n, e, t = "flow", { indentAtStart: s, lineWidth: r = 80, minContentW
1224
1224
  default:
1225
1225
  d += 1;
1226
1226
  }
1227
- b = d;
1227
+ E = d;
1228
1228
  }
1229
- if (E === `
1229
+ if (p === `
1230
1230
  `)
1231
1231
  t === St && (d = cn(n, d, e.length)), u = d + e.length + l, m = void 0;
1232
1232
  else {
1233
- if (E === " " && h && h !== " " && h !== `
1233
+ if (p === " " && h && h !== " " && h !== `
1234
1234
  ` && h !== " ") {
1235
- const p = n[d + 1];
1236
- p && p !== " " && p !== `
1237
- ` && p !== " " && (m = d);
1235
+ const Q = n[d + 1];
1236
+ Q && Q !== " " && Q !== `
1237
+ ` && Q !== " " && (m = d);
1238
1238
  }
1239
1239
  if (d >= u)
1240
1240
  if (m)
1241
1241
  c.push(m), u = m + l, m = void 0;
1242
1242
  else if (t === Ue) {
1243
1243
  for (; h === " " || h === " "; )
1244
- h = E, E = n[d += 1], y = !0;
1245
- const p = d > b + 1 ? d - 2 : g - 1;
1246
- if (f[p])
1244
+ h = p, p = n[d += 1], y = !0;
1245
+ const Q = d > E + 1 ? d - 2 : g - 1;
1246
+ if (f[Q])
1247
1247
  return n;
1248
- c.push(p), f[p] = !0, u = p + l, m = void 0;
1248
+ c.push(Q), f[Q] = !0, u = Q + l, m = void 0;
1249
1249
  } else
1250
1250
  y = !0;
1251
1251
  }
1252
- h = E;
1252
+ h = p;
1253
1253
  }
1254
1254
  if (y && o && o(), c.length === 0)
1255
1255
  return n;
1256
1256
  a && a();
1257
- let Q = n.slice(0, c[0]);
1258
- for (let E = 0; E < c.length; ++E) {
1259
- const p = c[E], k = c[E + 1] || n.length;
1260
- p === 0 ? Q = `
1261
- ${e}${n.slice(0, k)}` : (t === Ue && f[p] && (Q += `${n[p]}\\`), Q += `
1262
- ${e}${n.slice(p + 1, k)}`);
1257
+ let I = n.slice(0, c[0]);
1258
+ for (let p = 0; p < c.length; ++p) {
1259
+ const Q = c[p], b = c[p + 1] || n.length;
1260
+ Q === 0 ? I = `
1261
+ ${e}${n.slice(0, b)}` : (t === Ue && f[Q] && (I += `${n[Q]}\\`), I += `
1262
+ ${e}${n.slice(Q + 1, b)}`);
1263
1263
  }
1264
- return Q;
1264
+ return I;
1265
1265
  }
1266
1266
  function cn(n, e, t) {
1267
1267
  let s = e, r = e + 1, i = n[r];
@@ -1398,9 +1398,9 @@ function Fe({ comment: n, type: e, value: t }, s, r, i) {
1398
1398
  `;
1399
1399
  let u, m;
1400
1400
  for (m = t.length; m > 0; --m) {
1401
- const k = t[m - 1];
1402
- if (k !== `
1403
- ` && k !== " " && k !== " ")
1401
+ const b = t[m - 1];
1402
+ if (b !== `
1403
+ ` && b !== " " && b !== " ")
1404
1404
  break;
1405
1405
  }
1406
1406
  let h = t.substring(m);
@@ -1408,35 +1408,35 @@ function Fe({ comment: n, type: e, value: t }, s, r, i) {
1408
1408
  `);
1409
1409
  y === -1 ? u = "-" : t === h || y !== h.length - 1 ? (u = "+", i && i()) : u = "", h && (t = t.slice(0, -h.length), h[h.length - 1] === `
1410
1410
  ` && (h = h.slice(0, -1)), h = h.replace(Tt, `$&${c}`));
1411
- let d = !1, g, b = -1;
1411
+ let d = !1, g, E = -1;
1412
1412
  for (g = 0; g < t.length; ++g) {
1413
- const k = t[g];
1414
- if (k === " ")
1413
+ const b = t[g];
1414
+ if (b === " ")
1415
1415
  d = !0;
1416
- else if (k === `
1416
+ else if (b === `
1417
1417
  `)
1418
- b = g;
1418
+ E = g;
1419
1419
  else
1420
1420
  break;
1421
1421
  }
1422
- let Q = t.substring(0, b < g ? b + 1 : g);
1423
- Q && (t = t.substring(Q.length), Q = Q.replace(/\n+/g, `$&${c}`));
1424
- let p = (d ? c ? "2" : "1" : "") + u;
1425
- if (n && (p += " " + o(n.replace(/ ?[\r\n]+/g, " ")), r && r()), !f) {
1426
- const k = t.replace(/\n+/g, `
1422
+ let I = t.substring(0, E < g ? E + 1 : g);
1423
+ I && (t = t.substring(I.length), I = I.replace(/\n+/g, `$&${c}`));
1424
+ let Q = (d ? c ? "2" : "1" : "") + u;
1425
+ if (n && (Q += " " + o(n.replace(/ ?[\r\n]+/g, " ")), r && r()), !f) {
1426
+ const b = t.replace(/\n+/g, `
1427
1427
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
1428
- let B = !1;
1429
- const I = rt(s, !0);
1430
- a !== "folded" && e !== M.BLOCK_FOLDED && (I.onOverflow = () => {
1431
- B = !0;
1428
+ let v = !1;
1429
+ const B = rt(s, !0);
1430
+ a !== "folded" && e !== M.BLOCK_FOLDED && (B.onOverflow = () => {
1431
+ v = !0;
1432
1432
  });
1433
- const v = st(`${Q}${k}${h}`, c, St, I);
1434
- if (!B)
1435
- return `>${p}
1436
- ${c}${v}`;
1433
+ const k = st(`${I}${b}${h}`, c, St, B);
1434
+ if (!v)
1435
+ return `>${Q}
1436
+ ${c}${k}`;
1437
1437
  }
1438
- return t = t.replace(/\n+/g, `$&${c}`), `|${p}
1439
- ${c}${Q}${t}${h}`;
1438
+ return t = t.replace(/\n+/g, `$&${c}`), `|${Q}
1439
+ ${c}${I}${t}${h}`;
1440
1440
  }
1441
1441
  function _s(n, e, t, s) {
1442
1442
  const { type: r, value: i } = n, { actualString: a, implicitKey: o, indent: l, indentStep: c, inFlow: f } = e;
@@ -1598,8 +1598,8 @@ function nr({ key: n, value: e }, t, s, r) {
1598
1598
  if (m)
1599
1599
  throw new Error("With simple keys, key nodes cannot have comments");
1600
1600
  if (P(n) || !L(n) && typeof n == "object") {
1601
- const I = "With simple keys, collection cannot be used as a key value";
1602
- throw new Error(I);
1601
+ const B = "With simple keys, collection cannot be used as a key value";
1602
+ throw new Error(B);
1603
1603
  }
1604
1604
  }
1605
1605
  let h = !u && (!n || m && e == null && !t.inFlow || P(n) || (O(n) ? n.type === M.BLOCK_FOLDED || n.type === M.BLOCK_LITERAL : typeof n == "object"));
@@ -1621,38 +1621,38 @@ function nr({ key: n, value: e }, t, s, r) {
1621
1621
  return g = `? ${g}`, m && !y ? g += oe(g, t.indent, c(m)) : d && r && r(), g;
1622
1622
  y && (m = null), h ? (m && (g += oe(g, t.indent, c(m))), g = `? ${g}
1623
1623
  ${o}:`) : (g = `${g}:`, m && (g += oe(g, t.indent, c(m))));
1624
- let b, Q, E;
1625
- L(e) ? (b = !!e.spaceBefore, Q = e.commentBefore, E = e.comment) : (b = !1, Q = null, E = null, e && typeof e == "object" && (e = a.createNode(e))), t.implicitKey = !1, !h && !m && O(e) && (t.indentAtStart = g.length + 1), d = !1, !f && l.length >= 2 && !t.inFlow && !h && ze(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1626
- let p = !1;
1627
- const k = ye(e, t, () => p = !0, () => d = !0);
1628
- let B = " ";
1629
- if (m || b || Q) {
1630
- if (B = b ? `
1631
- ` : "", Q) {
1632
- const I = c(Q);
1633
- B += `
1634
- ${ee(I, t.indent)}`;
1624
+ let E, I, p;
1625
+ L(e) ? (E = !!e.spaceBefore, I = e.commentBefore, p = e.comment) : (E = !1, I = null, p = null, e && typeof e == "object" && (e = a.createNode(e))), t.implicitKey = !1, !h && !m && O(e) && (t.indentAtStart = g.length + 1), d = !1, !f && l.length >= 2 && !t.inFlow && !h && ze(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1626
+ let Q = !1;
1627
+ const b = ye(e, t, () => Q = !0, () => d = !0);
1628
+ let v = " ";
1629
+ if (m || E || I) {
1630
+ if (v = E ? `
1631
+ ` : "", I) {
1632
+ const B = c(I);
1633
+ v += `
1634
+ ${ee(B, t.indent)}`;
1635
1635
  }
1636
- k === "" && !t.inFlow ? B === `
1637
- ` && E && (B = `
1636
+ b === "" && !t.inFlow ? v === `
1637
+ ` && p && (v = `
1638
1638
 
1639
- `) : B += `
1639
+ `) : v += `
1640
1640
  ${t.indent}`;
1641
1641
  } else if (!h && P(e)) {
1642
- const I = k[0], v = k.indexOf(`
1643
- `), S = v !== -1, j = t.inFlow ?? e.flow ?? e.items.length === 0;
1642
+ const B = b[0], k = b.indexOf(`
1643
+ `), S = k !== -1, j = t.inFlow ?? e.flow ?? e.items.length === 0;
1644
1644
  if (S || !j) {
1645
1645
  let J = !1;
1646
- if (S && (I === "&" || I === "!")) {
1647
- let R = k.indexOf(" ");
1648
- I === "&" && R !== -1 && R < v && k[R + 1] === "!" && (R = k.indexOf(" ", R + 1)), (R === -1 || v < R) && (J = !0);
1646
+ if (S && (B === "&" || B === "!")) {
1647
+ let R = b.indexOf(" ");
1648
+ B === "&" && R !== -1 && R < k && b[R + 1] === "!" && (R = b.indexOf(" ", R + 1)), (R === -1 || k < R) && (J = !0);
1649
1649
  }
1650
- J || (B = `
1650
+ J || (v = `
1651
1651
  ${t.indent}`);
1652
1652
  }
1653
- } else (k === "" || k[0] === `
1654
- `) && (B = "");
1655
- return g += B + k, t.inFlow ? p && s && s() : E && !p ? g += oe(g, t.indent, c(E)) : d && r && r(), g;
1653
+ } else (b === "" || b[0] === `
1654
+ `) && (v = "");
1655
+ return g += v + b, t.inFlow ? Q && s && s() : p && !Q ? g += oe(g, t.indent, c(p)) : d && r && r(), g;
1656
1656
  }
1657
1657
  function Zn(n, e) {
1658
1658
  (n === "debug" || n === "warn") && console.warn(e);
@@ -1771,12 +1771,12 @@ function ir({ comment: n, items: e }, t, { blockItemPrefix: s, flowChars: r, ite
1771
1771
  if (L(d))
1772
1772
  !u && d.spaceBefore && m.push(""), qe(t, m, d.commentBefore, u), d.comment && (g = d.comment);
1773
1773
  else if (z(d)) {
1774
- const Q = L(d.key) ? d.key : null;
1775
- Q && (!u && Q.spaceBefore && m.push(""), qe(t, m, Q.commentBefore, u));
1774
+ const I = L(d.key) ? d.key : null;
1775
+ I && (!u && I.spaceBefore && m.push(""), qe(t, m, I.commentBefore, u));
1776
1776
  }
1777
1777
  u = !1;
1778
- let b = ye(d, f, () => g = null, () => u = !0);
1779
- g && (b += oe(b, i, c(g))), u && g && (u = !1), m.push(s + b);
1778
+ let E = ye(d, f, () => g = null, () => u = !0);
1779
+ g && (E += oe(E, i, c(g))), u && g && (u = !1), m.push(s + E);
1780
1780
  }
1781
1781
  let h;
1782
1782
  if (m.length === 0)
@@ -1809,15 +1809,15 @@ function ar({ items: n }, e, { flowChars: t, itemIndent: s }) {
1809
1809
  if (L(d))
1810
1810
  d.spaceBefore && u.push(""), qe(e, u, d.commentBefore, !1), d.comment && (g = d.comment);
1811
1811
  else if (z(d)) {
1812
- const Q = L(d.key) ? d.key : null;
1813
- Q && (Q.spaceBefore && u.push(""), qe(e, u, Q.commentBefore, !1), Q.comment && (c = !0));
1814
- const E = L(d.value) ? d.value : null;
1815
- E ? (E.comment && (g = E.comment), E.commentBefore && (c = !0)) : d.value == null && (Q != null && Q.comment) && (g = Q.comment);
1812
+ const I = L(d.key) ? d.key : null;
1813
+ I && (I.spaceBefore && u.push(""), qe(e, u, I.commentBefore, !1), I.comment && (c = !0));
1814
+ const p = L(d.value) ? d.value : null;
1815
+ p ? (p.comment && (g = p.comment), p.commentBefore && (c = !0)) : d.value == null && (I != null && I.comment) && (g = I.comment);
1816
1816
  }
1817
1817
  g && (c = !0);
1818
- let b = ye(d, l, () => g = null);
1819
- c || (c = u.length > f || b.includes(`
1820
- `)), y < n.length - 1 ? b += "," : e.options.trailingComma && (e.options.lineWidth > 0 && (c || (c = u.reduce((Q, E) => Q + E.length + 2, 2) + (b.length + 2) > e.options.lineWidth)), c && (b += ",")), g && (b += oe(b, s, o(g))), u.push(b), f = u.length;
1818
+ let E = ye(d, l, () => g = null);
1819
+ c || (c = u.length > f || E.includes(`
1820
+ `)), y < n.length - 1 ? E += "," : e.options.trailingComma && (e.options.lineWidth > 0 && (c || (c = u.reduce((I, p) => I + p.length + 2, 2) + (E.length + 2) > e.options.lineWidth)), c && (E += ",")), g && (E += oe(E, s, o(g))), u.push(E), f = u.length;
1821
1821
  }
1822
1822
  const { start: m, end: h } = t;
1823
1823
  if (u.length === 0)
@@ -1953,7 +1953,7 @@ class ce extends Dn {
1953
1953
  return "tag:yaml.org,2002:seq";
1954
1954
  }
1955
1955
  constructor(e) {
1956
- super(be, e), this.items = [];
1956
+ super(Ce, e), this.items = [];
1957
1957
  }
1958
1958
  add(e) {
1959
1959
  this.items.push(e);
@@ -2654,17 +2654,17 @@ function pt(n, e, t) {
2654
2654
  return i.includes(o) || i.push(o), i;
2655
2655
  }, []);
2656
2656
  }
2657
- const Cr = (n, e) => n.key < e.key ? -1 : n.key > e.key ? 1 : 0;
2657
+ const br = (n, e) => n.key < e.key ? -1 : n.key > e.key ? 1 : 0;
2658
2658
  class Kt {
2659
2659
  constructor({ compat: e, customTags: t, merge: s, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
2660
- this.compat = Array.isArray(e) ? pt(e, "compat") : e ? pt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? yr : {}, this.tags = pt(t, this.name, s), this.toStringOptions = o ?? null, Object.defineProperty(this, se, { value: ke }), Object.defineProperty(this, $, { value: at }), Object.defineProperty(this, be, { value: ve }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? Cr : null;
2660
+ this.compat = Array.isArray(e) ? pt(e, "compat") : e ? pt(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? yr : {}, this.tags = pt(t, this.name, s), this.toStringOptions = o ?? null, Object.defineProperty(this, se, { value: ke }), Object.defineProperty(this, $, { value: at }), Object.defineProperty(this, Ce, { value: ve }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? br : null;
2661
2661
  }
2662
2662
  clone() {
2663
2663
  const e = Object.create(Kt.prototype, Object.getOwnPropertyDescriptors(this));
2664
2664
  return e.tags = this.tags.slice(), e;
2665
2665
  }
2666
2666
  }
2667
- function br(n, e) {
2667
+ function Cr(n, e) {
2668
2668
  var l;
2669
2669
  const t = [];
2670
2670
  let s = e.directives === !0;
@@ -2768,8 +2768,8 @@ class dt {
2768
2768
  if (typeof t == "function")
2769
2769
  e = t.call({ "": e }, "", e), r = t;
2770
2770
  else if (Array.isArray(t)) {
2771
- const g = (Q) => typeof Q == "number" || Q instanceof String || Q instanceof Number, b = t.filter(g).map(String);
2772
- b.length > 0 && (t = t.concat(b)), r = t;
2771
+ const g = (I) => typeof I == "number" || I instanceof String || I instanceof Number, E = t.filter(g).map(String);
2772
+ E.length > 0 && (t = t.concat(E)), r = t;
2773
2773
  } else s === void 0 && t && (s = t, t = void 0);
2774
2774
  const { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: l, onTagObj: c, tag: f } = s ?? {}, { onAnchor: u, setAnchors: m, sourceObjects: h } = Us(
2775
2775
  this,
@@ -2915,7 +2915,7 @@ class dt {
2915
2915
  const t = JSON.stringify(e.indent);
2916
2916
  throw new Error(`"indent" option must be a positive integer, not ${t}`);
2917
2917
  }
2918
- return br(this, e);
2918
+ return Cr(this, e);
2919
2919
  }
2920
2920
  }
2921
2921
  function de(n) {
@@ -2966,53 +2966,53 @@ ${c}
2966
2966
  `;
2967
2967
  }
2968
2968
  };
2969
- function Ce(n, { flow: e, indicator: t, next: s, offset: r, onError: i, parentIndent: a, startOnNewline: o }) {
2970
- let l = !1, c = o, f = o, u = "", m = "", h = !1, y = !1, d = null, g = null, b = null, Q = null, E = null, p = null, k = null;
2971
- for (const v of n)
2972
- switch (y && (v.type !== "space" && v.type !== "newline" && v.type !== "comma" && i(v.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), d && (c && v.type !== "comment" && v.type !== "newline" && i(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), d = null), v.type) {
2969
+ function be(n, { flow: e, indicator: t, next: s, offset: r, onError: i, parentIndent: a, startOnNewline: o }) {
2970
+ let l = !1, c = o, f = o, u = "", m = "", h = !1, y = !1, d = null, g = null, E = null, I = null, p = null, Q = null, b = null;
2971
+ for (const k of n)
2972
+ switch (y && (k.type !== "space" && k.type !== "newline" && k.type !== "comma" && i(k.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), d && (c && k.type !== "comment" && k.type !== "newline" && i(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), d = null), k.type) {
2973
2973
  case "space":
2974
- !e && (t !== "doc-start" || (s == null ? void 0 : s.type) !== "flow-collection") && v.source.includes(" ") && (d = v), f = !0;
2974
+ !e && (t !== "doc-start" || (s == null ? void 0 : s.type) !== "flow-collection") && k.source.includes(" ") && (d = k), f = !0;
2975
2975
  break;
2976
2976
  case "comment": {
2977
- f || i(v, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2978
- const S = v.source.substring(1) || " ";
2977
+ f || i(k, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2978
+ const S = k.source.substring(1) || " ";
2979
2979
  u ? u += m + S : u = S, m = "", c = !1;
2980
2980
  break;
2981
2981
  }
2982
2982
  case "newline":
2983
- c ? u ? u += v.source : (!p || t !== "seq-item-ind") && (l = !0) : m += v.source, c = !0, h = !0, (g || b) && (Q = v), f = !0;
2983
+ c ? u ? u += k.source : (!Q || t !== "seq-item-ind") && (l = !0) : m += k.source, c = !0, h = !0, (g || E) && (I = k), f = !0;
2984
2984
  break;
2985
2985
  case "anchor":
2986
- g && i(v, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), v.source.endsWith(":") && i(v.offset + v.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), g = v, k ?? (k = v.offset), c = !1, f = !1, y = !0;
2986
+ g && i(k, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), k.source.endsWith(":") && i(k.offset + k.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), g = k, b ?? (b = k.offset), c = !1, f = !1, y = !0;
2987
2987
  break;
2988
2988
  case "tag": {
2989
- b && i(v, "MULTIPLE_TAGS", "A node can have at most one tag"), b = v, k ?? (k = v.offset), c = !1, f = !1, y = !0;
2989
+ E && i(k, "MULTIPLE_TAGS", "A node can have at most one tag"), E = k, b ?? (b = k.offset), c = !1, f = !1, y = !0;
2990
2990
  break;
2991
2991
  }
2992
2992
  case t:
2993
- (g || b) && i(v, "BAD_PROP_ORDER", `Anchors and tags must be after the ${v.source} indicator`), p && i(v, "UNEXPECTED_TOKEN", `Unexpected ${v.source} in ${e ?? "collection"}`), p = v, c = t === "seq-item-ind" || t === "explicit-key-ind", f = !1;
2993
+ (g || E) && i(k, "BAD_PROP_ORDER", `Anchors and tags must be after the ${k.source} indicator`), Q && i(k, "UNEXPECTED_TOKEN", `Unexpected ${k.source} in ${e ?? "collection"}`), Q = k, c = t === "seq-item-ind" || t === "explicit-key-ind", f = !1;
2994
2994
  break;
2995
2995
  case "comma":
2996
2996
  if (e) {
2997
- E && i(v, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), E = v, c = !1, f = !1;
2997
+ p && i(k, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), p = k, c = !1, f = !1;
2998
2998
  break;
2999
2999
  }
3000
3000
  // else fallthrough
3001
3001
  default:
3002
- i(v, "UNEXPECTED_TOKEN", `Unexpected ${v.type} token`), c = !1, f = !1;
3002
+ i(k, "UNEXPECTED_TOKEN", `Unexpected ${k.type} token`), c = !1, f = !1;
3003
3003
  }
3004
- const B = n[n.length - 1], I = B ? B.offset + B.source.length : r;
3004
+ const v = n[n.length - 1], B = v ? v.offset + v.source.length : r;
3005
3005
  return y && s && s.type !== "space" && s.type !== "newline" && s.type !== "comma" && (s.type !== "scalar" || s.source !== "") && i(s.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), d && (c && d.indent <= a || (s == null ? void 0 : s.type) === "block-map" || (s == null ? void 0 : s.type) === "block-seq") && i(d, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
3006
- comma: E,
3007
- found: p,
3006
+ comma: p,
3007
+ found: Q,
3008
3008
  spaceBefore: l,
3009
3009
  comment: u,
3010
3010
  hasNewline: h,
3011
3011
  anchor: g,
3012
- tag: b,
3013
- newlineAfterProp: Q,
3014
- end: I,
3015
- start: k ?? I
3012
+ tag: E,
3013
+ newlineAfterProp: I,
3014
+ end: B,
3015
+ start: b ?? B
3016
3016
  };
3017
3017
  }
3018
3018
  function Je(n) {
@@ -3070,15 +3070,15 @@ function Qr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3070
3070
  t.atRoot && (t.atRoot = !1);
3071
3071
  let l = s.offset, c = null;
3072
3072
  for (const u of s.items) {
3073
- const { start: m, key: h, sep: y, value: d } = u, g = Ce(m, {
3073
+ const { start: m, key: h, sep: y, value: d } = u, g = be(m, {
3074
3074
  indicator: "explicit-key-ind",
3075
3075
  next: h ?? (y == null ? void 0 : y[0]),
3076
3076
  offset: l,
3077
3077
  onError: r,
3078
3078
  parentIndent: s.indent,
3079
3079
  startOnNewline: !0
3080
- }), b = !g.found;
3081
- if (b) {
3080
+ }), E = !g.found;
3081
+ if (E) {
3082
3082
  if (h && (h.type === "block-seq" ? r(l, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in h && h.indent !== s.indent && r(l, "BAD_INDENT", mn)), !g.anchor && !g.tag && !y) {
3083
3083
  c = g.end, g.comment && (o.comment ? o.comment += `
3084
3084
  ` + g.comment : o.comment = g.comment);
@@ -3087,27 +3087,27 @@ function Qr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3087
3087
  (g.newlineAfterProp || Je(h)) && r(h ?? m[m.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
3088
3088
  } else ((f = g.found) == null ? void 0 : f.indent) !== s.indent && r(l, "BAD_INDENT", mn);
3089
3089
  t.atKey = !0;
3090
- const Q = g.end, E = h ? n(t, h, g, r) : e(t, Q, m, null, g, r);
3091
- t.schema.compat && Mt(s.indent, h, r), t.atKey = !1, As(t, o.items, E) && r(Q, "DUPLICATE_KEY", "Map keys must be unique");
3092
- const p = Ce(y ?? [], {
3090
+ const I = g.end, p = h ? n(t, h, g, r) : e(t, I, m, null, g, r);
3091
+ t.schema.compat && Mt(s.indent, h, r), t.atKey = !1, As(t, o.items, p) && r(I, "DUPLICATE_KEY", "Map keys must be unique");
3092
+ const Q = be(y ?? [], {
3093
3093
  indicator: "map-value-ind",
3094
3094
  next: d,
3095
- offset: E.range[2],
3095
+ offset: p.range[2],
3096
3096
  onError: r,
3097
3097
  parentIndent: s.indent,
3098
3098
  startOnNewline: !h || h.type === "block-scalar"
3099
3099
  });
3100
- if (l = p.end, p.found) {
3101
- b && ((d == null ? void 0 : d.type) === "block-map" && !p.hasNewline && r(l, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && g.start < p.found.offset - 1024 && r(E.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
3102
- const k = d ? n(t, d, p, r) : e(t, l, y, null, p, r);
3103
- t.schema.compat && Mt(s.indent, d, r), l = k.range[2];
3104
- const B = new x(E, k);
3105
- t.options.keepSourceTokens && (B.srcToken = u), o.items.push(B);
3100
+ if (l = Q.end, Q.found) {
3101
+ E && ((d == null ? void 0 : d.type) === "block-map" && !Q.hasNewline && r(l, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && g.start < Q.found.offset - 1024 && r(p.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
3102
+ const b = d ? n(t, d, Q, r) : e(t, l, y, null, Q, r);
3103
+ t.schema.compat && Mt(s.indent, d, r), l = b.range[2];
3104
+ const v = new x(p, b);
3105
+ t.options.keepSourceTokens && (v.srcToken = u), o.items.push(v);
3106
3106
  } else {
3107
- b && r(E.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), p.comment && (E.comment ? E.comment += `
3108
- ` + p.comment : E.comment = p.comment);
3109
- const k = new x(E);
3110
- t.options.keepSourceTokens && (k.srcToken = u), o.items.push(k);
3107
+ E && r(p.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), Q.comment && (p.comment ? p.comment += `
3108
+ ` + Q.comment : p.comment = Q.comment);
3109
+ const b = new x(p);
3110
+ t.options.keepSourceTokens && (b.srcToken = u), o.items.push(b);
3111
3111
  }
3112
3112
  }
3113
3113
  return c && c < l && r(c, "IMPOSSIBLE", "Map comment with trailing content"), o.range = [s.offset, l, c ?? l], o;
@@ -3117,7 +3117,7 @@ function kr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3117
3117
  t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
3118
3118
  let l = s.offset, c = null;
3119
3119
  for (const { start: f, value: u } of s.items) {
3120
- const m = Ce(f, {
3120
+ const m = be(f, {
3121
3121
  indicator: "seq-item-ind",
3122
3122
  next: u,
3123
3123
  offset: l,
@@ -3164,7 +3164,7 @@ function He(n, e, t, s) {
3164
3164
  }
3165
3165
  return { comment: r, offset: e };
3166
3166
  }
3167
- const yt = "Block collections are not allowed within flow collections", Ct = (n) => n && (n.type === "block-map" || n.type === "block-seq");
3167
+ const yt = "Block collections are not allowed within flow collections", bt = (n) => n && (n.type === "block-map" || n.type === "block-seq");
3168
3168
  function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3169
3169
  var g;
3170
3170
  const a = s.start.source === "{", o = a ? "flow map" : "flow sequence", l = (i == null ? void 0 : i.nodeClass) ?? (a ? Y : ce), c = new l(t.schema);
@@ -3172,70 +3172,70 @@ function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3172
3172
  const f = t.atRoot;
3173
3173
  f && (t.atRoot = !1), t.atKey && (t.atKey = !1);
3174
3174
  let u = s.offset + s.start.source.length;
3175
- for (let b = 0; b < s.items.length; ++b) {
3176
- const Q = s.items[b], { start: E, key: p, sep: k, value: B } = Q, I = Ce(E, {
3175
+ for (let E = 0; E < s.items.length; ++E) {
3176
+ const I = s.items[E], { start: p, key: Q, sep: b, value: v } = I, B = be(p, {
3177
3177
  flow: o,
3178
3178
  indicator: "explicit-key-ind",
3179
- next: p ?? (k == null ? void 0 : k[0]),
3179
+ next: Q ?? (b == null ? void 0 : b[0]),
3180
3180
  offset: u,
3181
3181
  onError: r,
3182
3182
  parentIndent: s.indent,
3183
3183
  startOnNewline: !1
3184
3184
  });
3185
- if (!I.found) {
3186
- if (!I.anchor && !I.tag && !k && !B) {
3187
- b === 0 && I.comma ? r(I.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${o}`) : b < s.items.length - 1 && r(I.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${o}`), I.comment && (c.comment ? c.comment += `
3188
- ` + I.comment : c.comment = I.comment), u = I.end;
3185
+ if (!B.found) {
3186
+ if (!B.anchor && !B.tag && !b && !v) {
3187
+ E === 0 && B.comma ? r(B.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${o}`) : E < s.items.length - 1 && r(B.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${o}`), B.comment && (c.comment ? c.comment += `
3188
+ ` + B.comment : c.comment = B.comment), u = B.end;
3189
3189
  continue;
3190
3190
  }
3191
- !a && t.options.strict && Je(p) && r(
3192
- p,
3191
+ !a && t.options.strict && Je(Q) && r(
3192
+ Q,
3193
3193
  // checked by containsNewline()
3194
3194
  "MULTILINE_IMPLICIT_KEY",
3195
3195
  "Implicit keys of flow sequence pairs need to be on a single line"
3196
3196
  );
3197
3197
  }
3198
- if (b === 0)
3199
- I.comma && r(I.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${o}`);
3200
- else if (I.comma || r(I.start, "MISSING_CHAR", `Missing , between ${o} items`), I.comment) {
3201
- let v = "";
3202
- e: for (const S of E)
3198
+ if (E === 0)
3199
+ B.comma && r(B.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${o}`);
3200
+ else if (B.comma || r(B.start, "MISSING_CHAR", `Missing , between ${o} items`), B.comment) {
3201
+ let k = "";
3202
+ e: for (const S of p)
3203
3203
  switch (S.type) {
3204
3204
  case "comma":
3205
3205
  case "space":
3206
3206
  break;
3207
3207
  case "comment":
3208
- v = S.source.substring(1);
3208
+ k = S.source.substring(1);
3209
3209
  break e;
3210
3210
  default:
3211
3211
  break e;
3212
3212
  }
3213
- if (v) {
3213
+ if (k) {
3214
3214
  let S = c.items[c.items.length - 1];
3215
3215
  z(S) && (S = S.value ?? S.key), S.comment ? S.comment += `
3216
- ` + v : S.comment = v, I.comment = I.comment.substring(v.length + 1);
3216
+ ` + k : S.comment = k, B.comment = B.comment.substring(k.length + 1);
3217
3217
  }
3218
3218
  }
3219
- if (!a && !k && !I.found) {
3220
- const v = B ? n(t, B, I, r) : e(t, I.end, k, null, I, r);
3221
- c.items.push(v), u = v.range[2], Ct(B) && r(v.range, "BLOCK_IN_FLOW", yt);
3219
+ if (!a && !b && !B.found) {
3220
+ const k = v ? n(t, v, B, r) : e(t, B.end, b, null, B, r);
3221
+ c.items.push(k), u = k.range[2], bt(v) && r(k.range, "BLOCK_IN_FLOW", yt);
3222
3222
  } else {
3223
3223
  t.atKey = !0;
3224
- const v = I.end, S = p ? n(t, p, I, r) : e(t, v, E, null, I, r);
3225
- Ct(p) && r(S.range, "BLOCK_IN_FLOW", yt), t.atKey = !1;
3226
- const j = Ce(k ?? [], {
3224
+ const k = B.end, S = Q ? n(t, Q, B, r) : e(t, k, p, null, B, r);
3225
+ bt(Q) && r(S.range, "BLOCK_IN_FLOW", yt), t.atKey = !1;
3226
+ const j = be(b ?? [], {
3227
3227
  flow: o,
3228
3228
  indicator: "map-value-ind",
3229
- next: B,
3229
+ next: v,
3230
3230
  offset: S.range[2],
3231
3231
  onError: r,
3232
3232
  parentIndent: s.indent,
3233
3233
  startOnNewline: !1
3234
3234
  });
3235
3235
  if (j.found) {
3236
- if (!a && !I.found && t.options.strict) {
3237
- if (k)
3238
- for (const H of k) {
3236
+ if (!a && !B.found && t.options.strict) {
3237
+ if (b)
3238
+ for (const H of b) {
3239
3239
  if (H === j.found)
3240
3240
  break;
3241
3241
  if (H.type === "newline") {
@@ -3243,16 +3243,16 @@ function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3243
3243
  break;
3244
3244
  }
3245
3245
  }
3246
- I.start < j.found.offset - 1024 && r(j.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
3246
+ B.start < j.found.offset - 1024 && r(j.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
3247
3247
  }
3248
- } else B && ("source" in B && ((g = B.source) == null ? void 0 : g[0]) === ":" ? r(B, "MISSING_CHAR", `Missing space after : in ${o}`) : r(j.start, "MISSING_CHAR", `Missing , or : between ${o} items`));
3249
- const J = B ? n(t, B, j, r) : j.found ? e(t, j.end, k, null, j, r) : null;
3250
- J ? Ct(B) && r(J.range, "BLOCK_IN_FLOW", yt) : j.comment && (S.comment ? S.comment += `
3248
+ } else v && ("source" in v && ((g = v.source) == null ? void 0 : g[0]) === ":" ? r(v, "MISSING_CHAR", `Missing space after : in ${o}`) : r(j.start, "MISSING_CHAR", `Missing , or : between ${o} items`));
3249
+ const J = v ? n(t, v, j, r) : j.found ? e(t, j.end, b, null, j, r) : null;
3250
+ J ? bt(v) && r(J.range, "BLOCK_IN_FLOW", yt) : j.comment && (S.comment ? S.comment += `
3251
3251
  ` + j.comment : S.comment = j.comment);
3252
3252
  const R = new x(S, J);
3253
- if (t.options.keepSourceTokens && (R.srcToken = Q), a) {
3253
+ if (t.options.keepSourceTokens && (R.srcToken = I), a) {
3254
3254
  const H = c;
3255
- As(t, H.items, S) && r(v, "DUPLICATE_KEY", "Map keys must be unique"), H.items.push(R);
3255
+ As(t, H.items, S) && r(k, "DUPLICATE_KEY", "Map keys must be unique"), H.items.push(R);
3256
3256
  } else {
3257
3257
  const H = new Y(t.schema);
3258
3258
  H.flow = !0, H.items.push(R);
@@ -3267,18 +3267,18 @@ function vr({ composeNode: n, composeEmptyNode: e }, t, s, r, i) {
3267
3267
  if ((h == null ? void 0 : h.source) === m)
3268
3268
  d = h.offset + h.source.length;
3269
3269
  else {
3270
- const b = o[0].toUpperCase() + o.substring(1), Q = f ? `${b} must end with a ${m}` : `${b} in block collection must be sufficiently indented and end with a ${m}`;
3271
- r(u, f ? "MISSING_CHAR" : "BAD_INDENT", Q), h && h.source.length !== 1 && y.unshift(h);
3270
+ const E = o[0].toUpperCase() + o.substring(1), I = f ? `${E} must end with a ${m}` : `${E} in block collection must be sufficiently indented and end with a ${m}`;
3271
+ r(u, f ? "MISSING_CHAR" : "BAD_INDENT", I), h && h.source.length !== 1 && y.unshift(h);
3272
3272
  }
3273
3273
  if (y.length > 0) {
3274
- const b = He(y, d, t.options.strict, r);
3275
- b.comment && (c.comment ? c.comment += `
3276
- ` + b.comment : c.comment = b.comment), c.range = [s.offset, d, b.offset];
3274
+ const E = He(y, d, t.options.strict, r);
3275
+ E.comment && (c.comment ? c.comment += `
3276
+ ` + E.comment : c.comment = E.comment), c.range = [s.offset, d, E.offset];
3277
3277
  } else
3278
3278
  c.range = [s.offset, d, d];
3279
3279
  return c;
3280
3280
  }
3281
- function bt(n, e, t, s, r, i) {
3281
+ function Ct(n, e, t, s, r, i) {
3282
3282
  const a = t.type === "block-map" ? Qr(n, e, t, s, i) : t.type === "block-seq" ? kr(n, e, t, s, i) : vr(n, e, t, s, i), o = a.constructor;
3283
3283
  return r === "!" || r === o.tagName ? (a.tag = o.tagName, a) : (r && (a.tag = r), a);
3284
3284
  }
@@ -3291,16 +3291,16 @@ function Ir(n, e, t, s, r) {
3291
3291
  }
3292
3292
  const o = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
3293
3293
  if (!i || !a || a === "!" || a === Y.tagName && o === "map" || a === ce.tagName && o === "seq")
3294
- return bt(n, e, t, r, a);
3294
+ return Ct(n, e, t, r, a);
3295
3295
  let l = e.schema.tags.find((h) => h.tag === a && h.collection === o);
3296
3296
  if (!l) {
3297
3297
  const h = e.schema.knownTags[a];
3298
3298
  if ((h == null ? void 0 : h.collection) === o)
3299
3299
  e.schema.tags.push(Object.assign({}, h, { default: !1 })), l = h;
3300
3300
  else
3301
- return h ? r(i, "BAD_COLLECTION_TYPE", `${h.tag} used for ${o} collection, but expects ${h.collection ?? "scalar"}`, !0) : r(i, "TAG_RESOLVE_FAILED", `Unresolved tag: ${a}`, !0), bt(n, e, t, r, a);
3301
+ return h ? r(i, "BAD_COLLECTION_TYPE", `${h.tag} used for ${o} collection, but expects ${h.collection ?? "scalar"}`, !0) : r(i, "TAG_RESOLVE_FAILED", `Unresolved tag: ${a}`, !0), Ct(n, e, t, r, a);
3302
3302
  }
3303
- const c = bt(n, e, t, r, a, l), f = ((m = l.resolve) == null ? void 0 : m.call(l, c, (h) => r(i, "TAG_RESOLVE_FAILED", h), e.options)) ?? c, u = L(f) ? f : new M(f);
3303
+ const c = Ct(n, e, t, r, a, l), f = ((m = l.resolve) == null ? void 0 : m.call(l, c, (h) => r(i, "TAG_RESOLVE_FAILED", h), e.options)) ?? c, u = L(f) ? f : new M(f);
3304
3304
  return u.range = c.range, u.tag = a, l != null && l.format && (u.format = l.format), u;
3305
3305
  }
3306
3306
  function Br(n, e, t) {
@@ -3324,14 +3324,14 @@ function Br(n, e, t) {
3324
3324
  }
3325
3325
  let l = e.indent + r.indent, c = e.offset + r.length, f = 0;
3326
3326
  for (let d = 0; d < o; ++d) {
3327
- const [g, b] = a[d];
3328
- if (b === "" || b === "\r")
3327
+ const [g, E] = a[d];
3328
+ if (E === "" || E === "\r")
3329
3329
  r.indent === 0 && g.length > l && (l = g.length);
3330
3330
  else {
3331
3331
  g.length < l && t(c + g.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), r.indent === 0 && (l = g.length), f = d, l === 0 && !n.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
3332
3332
  break;
3333
3333
  }
3334
- c += g.length + b.length + 1;
3334
+ c += g.length + E.length + 1;
3335
3335
  }
3336
3336
  for (let d = a.length - 1; d >= o; --d)
3337
3337
  a[d][0].length > l && (o = d + 1);
@@ -3340,23 +3340,23 @@ function Br(n, e, t) {
3340
3340
  u += a[d][0].slice(l) + `
3341
3341
  `;
3342
3342
  for (let d = f; d < o; ++d) {
3343
- let [g, b] = a[d];
3344
- c += g.length + b.length + 1;
3345
- const Q = b[b.length - 1] === "\r";
3346
- if (Q && (b = b.slice(0, -1)), b && g.length < l) {
3347
- const p = `Block scalar lines must not be less indented than their ${r.indent ? "explicit indentation indicator" : "first line"}`;
3348
- t(c - b.length - (Q ? 2 : 1), "BAD_INDENT", p), g = "";
3343
+ let [g, E] = a[d];
3344
+ c += g.length + E.length + 1;
3345
+ const I = E[E.length - 1] === "\r";
3346
+ if (I && (E = E.slice(0, -1)), E && g.length < l) {
3347
+ const Q = `Block scalar lines must not be less indented than their ${r.indent ? "explicit indentation indicator" : "first line"}`;
3348
+ t(c - E.length - (I ? 2 : 1), "BAD_INDENT", Q), g = "";
3349
3349
  }
3350
- i === M.BLOCK_LITERAL ? (u += m + g.slice(l) + b, m = `
3351
- `) : g.length > l || b[0] === " " ? (m === " " ? m = `
3350
+ i === M.BLOCK_LITERAL ? (u += m + g.slice(l) + E, m = `
3351
+ `) : g.length > l || E[0] === " " ? (m === " " ? m = `
3352
3352
  ` : !h && m === `
3353
3353
  ` && (m = `
3354
3354
 
3355
- `), u += m + g.slice(l) + b, m = `
3356
- `, h = !0) : b === "" ? m === `
3355
+ `), u += m + g.slice(l) + E, m = `
3356
+ `, h = !0) : E === "" ? m === `
3357
3357
  ` ? u += `
3358
3358
  ` : m = `
3359
- ` : (u += m + b, m = " ", h = !1);
3359
+ ` : (u += m + E, m = " ", h = !1);
3360
3360
  }
3361
3361
  switch (r.chomp) {
3362
3362
  case "-":
@@ -3720,7 +3720,7 @@ function xr(n, e, { offset: t, start: s, value: r, end: i }, a) {
3720
3720
  directives: l.directives,
3721
3721
  options: l.options,
3722
3722
  schema: l.schema
3723
- }, f = Ce(s, {
3723
+ }, f = be(s, {
3724
3724
  indicator: "doc-start",
3725
3725
  next: r ?? (i == null ? void 0 : i[0]),
3726
3726
  offset: t,
@@ -4470,7 +4470,7 @@ function $e(n, e) {
4470
4470
  for (let t = 0; t < e.length; ++t)
4471
4471
  n.push(e[t]);
4472
4472
  }
4473
- function Cn(n) {
4473
+ function bn(n) {
4474
4474
  if (n.start.type === "flow-seq-start")
4475
4475
  for (const e of n.items)
4476
4476
  e.sep && !e.value && !ne(e.start, "explicit-key-ind") && !ne(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, ps(e.value) ? e.value.end ? $e(e.value.end, e.sep) : e.value.end = e.sep : $e(e.start, e.sep), delete e.sep);
@@ -4594,7 +4594,7 @@ class Ur {
4594
4594
  yield t;
4595
4595
  else {
4596
4596
  const s = this.peek(1);
4597
- switch (t.type === "block-scalar" ? t.indent = "indent" in s ? s.indent : 0 : t.type === "flow-collection" && s.type === "document" && (t.indent = 0), t.type === "flow-collection" && Cn(t), s.type) {
4597
+ switch (t.type === "block-scalar" ? t.indent = "indent" in s ? s.indent : 0 : t.type === "flow-collection" && s.type === "document" && (t.indent = 0), t.type === "flow-collection" && bn(t), s.type) {
4598
4598
  case "document":
4599
4599
  s.value = t;
4600
4600
  break;
@@ -4949,7 +4949,7 @@ class Ur {
4949
4949
  yield* this.pop(), yield* this.step();
4950
4950
  else if (this.type === "map-value-ind" && s.type !== "flow-collection") {
4951
4951
  const r = Ge(s), i = ue(r);
4952
- Cn(e);
4952
+ bn(e);
4953
4953
  const a = e.end.splice(1, e.end.length);
4954
4954
  a.push(this.sourceToken);
4955
4955
  const o = {
@@ -5155,7 +5155,7 @@ function si(n, e, t) {
5155
5155
  const s = _e(t);
5156
5156
  return n.names.some((r) => _e(r) === s);
5157
5157
  }
5158
- function Cs(n, e) {
5158
+ function bs(n, e) {
5159
5159
  return !n.antes || n.antes.length === 0 ? !0 : n.antes.includes(e);
5160
5160
  }
5161
5161
  function ri(n) {
@@ -5181,7 +5181,7 @@ function Ie(n) {
5181
5181
  function ai(n) {
5182
5182
  return Ie(Os[n]);
5183
5183
  }
5184
- function bn(n) {
5184
+ function Cn(n) {
5185
5185
  return Ie(Ms[n]);
5186
5186
  }
5187
5187
  function Ye(n) {
@@ -5226,7 +5226,7 @@ function ci(n) {
5226
5226
  return e;
5227
5227
  }
5228
5228
  function _(n, e, t, s) {
5229
- const r = `${n}:${_e(e)}`, a = (s.get(r) ?? []).filter((l) => Cs(l, t));
5229
+ const r = `${n}:${_e(e)}`, a = (s.get(r) ?? []).filter((l) => bs(l, t));
5230
5230
  if (a.length === 0) return;
5231
5231
  const o = a.find((l) => l.kind === "should") ?? a.find((l) => l.kind === "must") ?? a[0];
5232
5232
  return ri(o.kind);
@@ -5351,76 +5351,75 @@ function hi({
5351
5351
  onHoverClause: o
5352
5352
  }) {
5353
5353
  const l = s ?? 39, [c, f] = re(() => {
5354
- var p;
5355
- return ((p = n.antes[0]) == null ? void 0 : p.ante) ?? 0;
5356
- }), [u, m] = re(null), h = q(() => i || (r ? ys(r).all : []), [i, r]), y = q(() => h.filter((p) => p.kind === "should"), [h]), d = q(() => ci(h), [h]), g = q(() => {
5354
+ var b;
5355
+ return ((b = n.antes[0]) == null ? void 0 : b.ante) ?? 0;
5356
+ }), [u, m] = re(null), h = q(() => i || (r ? ys(r).all : []), [i, r]), y = q(() => h.filter((b) => b.kind === "should"), [h]), d = q(() => ci(h), [h]), g = q(() => {
5357
5357
  if (!u) return d;
5358
- const p = /* @__PURE__ */ new Map();
5359
- return d.forEach((k, B) => {
5360
- const I = k.filter((v) => v === u);
5361
- I.length > 0 && p.set(B, I);
5362
- }), p;
5363
- }, [d, u]);
5364
- q(
5365
- () => new Set(n.antes.map((p) => p.ante)),
5358
+ const b = /* @__PURE__ */ new Map();
5359
+ return d.forEach((v, B) => {
5360
+ const k = v.filter((S) => S === u);
5361
+ k.length > 0 && b.set(B, k);
5362
+ }), b;
5363
+ }, [d, u]), E = q(
5364
+ () => new Set(n.antes.map((b) => b.ante)),
5366
5365
  [n.antes]
5367
- );
5368
- const b = q(
5369
- () => Array.from({ length: l + 1 }, (p, k) => k),
5366
+ ), I = q(
5367
+ () => Array.from({ length: l + 1 }, (b, v) => v),
5370
5368
  [l]
5371
- ), Q = q(
5372
- () => n.antes.find((p) => p.ante === c) ?? n.antes[0],
5369
+ ), p = q(
5370
+ () => n.antes.find((b) => b.ante === c) ?? n.antes[0],
5373
5371
  [n.antes, c]
5374
- ), E = (p) => {
5375
- m(p), o == null || o(p);
5372
+ ), Q = (b) => {
5373
+ m(b), o == null || o(b);
5376
5374
  };
5377
- return Q ? /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-lg)" }, children: [
5375
+ return p ? /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-lg)" }, children: [
5378
5376
  /* @__PURE__ */ C("div", { className: "j-flex", style: { gap: "var(--j-space-md)", alignItems: "flex-start" }, children: [
5379
5377
  /* @__PURE__ */ C("div", { className: "j-ante-scroll", style: { display: "flex", flexDirection: "column", gap: "var(--j-space-sm)", maxHeight: 420, overflowY: "auto", minWidth: 72 }, children: [
5380
5378
  h.length > 0 && /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-sm)", padding: "var(--j-space-md)" }, children: [
5381
5379
  /* @__PURE__ */ A("div", { className: "j-text j-text--label j-text--upper j-text--gold", children: "Clauses" }),
5382
- y.map((p, k) => /* @__PURE__ */ A(
5380
+ y.map((b, v) => /* @__PURE__ */ A(
5383
5381
  "button",
5384
5382
  {
5385
5383
  className: "j-btn j-btn--xs",
5386
- onMouseEnter: () => E(p),
5387
- onMouseLeave: () => E(null),
5384
+ onMouseEnter: () => Q(b),
5385
+ onMouseLeave: () => Q(null),
5388
5386
  style: { width: "100%" },
5389
- children: /* @__PURE__ */ C("span", { className: `j-btn__face j-text j-text--micro ${a && k < a.length && a[k] > 0 ? "j-text--green" : "j-text--grey"}`.trim(), children: [
5390
- a && k < a.length ? `${a[k]} · ` : "",
5391
- p.label
5387
+ children: /* @__PURE__ */ C("span", { className: `j-btn__face j-text j-text--micro ${a && v < a.length && a[v] > 0 ? "j-text--green" : "j-text--grey"}`.trim(), children: [
5388
+ a && v < a.length ? `${a[v]} · ` : "",
5389
+ b.label
5392
5390
  ] })
5393
5391
  },
5394
- k
5392
+ v
5395
5393
  )),
5396
- h.filter((p) => p.kind !== "should").map((p, k) => /* @__PURE__ */ A(
5394
+ h.filter((b) => b.kind !== "should").map((b, v) => /* @__PURE__ */ A(
5397
5395
  "button",
5398
5396
  {
5399
5397
  className: "j-btn j-btn--xs",
5400
- onMouseEnter: () => E(p),
5401
- onMouseLeave: () => E(null),
5398
+ onMouseEnter: () => Q(b),
5399
+ onMouseLeave: () => Q(null),
5402
5400
  style: { width: "100%" },
5403
- children: /* @__PURE__ */ C("span", { className: `j-btn__face j-text j-text--micro ${p.kind === "must" ? "j-text--red" : "j-text--grey"}`.trim(), children: [
5404
- p.kind === "must" ? "MUST " : "NOT ",
5405
- p.label
5401
+ children: /* @__PURE__ */ C("span", { className: `j-btn__face j-text j-text--micro ${b.kind === "must" ? "j-text--red" : "j-text--grey"}`.trim(), children: [
5402
+ b.kind === "must" ? "MUST " : "NOT ",
5403
+ b.label
5406
5404
  ] })
5407
5405
  },
5408
- `other-${k}`
5406
+ `other-${v}`
5409
5407
  ))
5410
5408
  ] }),
5411
- b.map((p) => /* @__PURE__ */ A(
5409
+ I.map((b) => /* @__PURE__ */ A(
5412
5410
  "button",
5413
5411
  {
5414
5412
  className: "j-btn j-btn--xs",
5415
- "data-pressed": p === c,
5416
- onClick: () => f(p),
5413
+ "data-pressed": b === c,
5414
+ disabled: !E.has(b),
5415
+ onClick: () => f(b),
5417
5416
  style: { width: "100%" },
5418
5417
  children: /* @__PURE__ */ C("span", { className: "j-btn__face j-text j-text--label j-text--upper", children: [
5419
5418
  "Ante ",
5420
- p
5419
+ b
5421
5420
  ] })
5422
5421
  },
5423
- p
5422
+ b
5424
5423
  ))
5425
5424
  ] }),
5426
5425
  /* @__PURE__ */ C("div", { className: "j-flex-1 j-flex-col", style: { gap: "var(--j-space-lg)", minWidth: 0 }, children: [
@@ -5447,36 +5446,36 @@ function hi({
5447
5446
  /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5448
5447
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Blinds" }),
5449
5448
  /* @__PURE__ */ C("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-md)", alignItems: "center" }, children: [
5450
- /* @__PURE__ */ C("div", { className: `j-inner-panel j-flex ${_("tag", Ye(Q.smallBlindTag), Q.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5449
+ /* @__PURE__ */ C("div", { className: `j-inner-panel j-flex ${_("tag", Ye(p.smallBlindTag), p.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5451
5450
  /* @__PURE__ */ A("span", { className: "j-text j-text--label j-text--grey", children: "SMALL" }),
5452
- /* @__PURE__ */ A(on, { tagName: Ye(Q.smallBlindTag), scale: 0.75 })
5451
+ /* @__PURE__ */ A(on, { tagName: Ye(p.smallBlindTag), scale: 0.75 })
5453
5452
  ] }),
5454
- /* @__PURE__ */ C("div", { className: `j-inner-panel j-flex ${_("tag", Ye(Q.bigBlindTag), Q.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5453
+ /* @__PURE__ */ C("div", { className: `j-inner-panel j-flex ${_("tag", Ye(p.bigBlindTag), p.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5455
5454
  /* @__PURE__ */ A("span", { className: "j-text j-text--label j-text--grey", children: "BIG" }),
5456
- /* @__PURE__ */ A(on, { tagName: Ye(Q.bigBlindTag), scale: 0.75 })
5455
+ /* @__PURE__ */ A(on, { tagName: Ye(p.bigBlindTag), scale: 0.75 })
5457
5456
  ] }),
5458
- /* @__PURE__ */ C("div", { className: `j-inner-panel j-flex ${_("boss", bn(Q.boss), Q.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5457
+ /* @__PURE__ */ C("div", { className: `j-inner-panel j-flex ${_("boss", Cn(p.boss), p.ante, g) || ""}`.trim(), style: { alignItems: "center", gap: "var(--j-space-md)" }, children: [
5459
5458
  /* @__PURE__ */ A("span", { className: "j-text j-text--label j-text--grey", children: "BOSS" }),
5460
- /* @__PURE__ */ A(Hs, { bossName: bn(Q.boss), scale: 0.75 })
5459
+ /* @__PURE__ */ A(Hs, { bossName: Cn(p.boss), scale: 0.75 })
5461
5460
  ] })
5462
5461
  ] })
5463
5462
  ] }),
5464
5463
  /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5465
5464
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Voucher" }),
5466
- /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: /* @__PURE__ */ A("div", { className: _("voucher", Ot(Q.voucher), Q.ante, g) || void 0, children: /* @__PURE__ */ A(On, { voucherName: Ot(Q.voucher), scale: 0.9 }) }) })
5465
+ /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: /* @__PURE__ */ A("div", { className: _("voucher", Ot(p.voucher), p.ante, g) || void 0, children: /* @__PURE__ */ A(On, { voucherName: Ot(p.voucher), scale: 0.9 }) }) })
5467
5466
  ] }),
5468
5467
  /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5469
5468
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Shop" }),
5470
- /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: Q.shopItems.map((p, k) => {
5471
- const B = Pe(p), I = B ? _($t(B.category), B.displayName, Q.ante, g) : void 0;
5472
- return /* @__PURE__ */ A(ut, { item: p, highlight: I }, k);
5469
+ /* @__PURE__ */ A("div", { className: "j-flex j-flex-wrap", style: { gap: "var(--j-space-sm)" }, children: p.shopItems.map((b, v) => {
5470
+ const B = Pe(b), k = B ? _($t(B.category), B.displayName, p.ante, g) : void 0;
5471
+ return /* @__PURE__ */ A(ut, { item: b, highlight: k }, v);
5473
5472
  }) })
5474
5473
  ] }),
5475
- Q.packs.length > 0 && /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5474
+ p.packs.length > 0 && /* @__PURE__ */ C("div", { className: "j-panel", style: { gap: "var(--j-space-md)" }, children: [
5476
5475
  /* @__PURE__ */ A("div", { className: "j-text j-text--heading j-text--upper j-text--gold", children: "Packs" }),
5477
- Q.packs.map((p, k) => /* @__PURE__ */ A(Ai, { pack: p, ante: Q.ante, matches: g }, k))
5476
+ p.packs.map((b, v) => /* @__PURE__ */ A(Ai, { pack: b, ante: p.ante, matches: g }, v))
5478
5477
  ] }),
5479
- /* @__PURE__ */ A(di, { ante: Q, matches: g })
5478
+ /* @__PURE__ */ A(di, { ante: p, matches: g })
5480
5479
  ] })
5481
5480
  ] }),
5482
5481
  n.erraticDeck && n.erraticDeck.length > 0 && /* @__PURE__ */ A(fi, { cards: n.erraticDeck, matches: g }),
@@ -5535,7 +5534,7 @@ function pi(n, e) {
5535
5534
  for (const s of e) {
5536
5535
  const r = [];
5537
5536
  for (const i of n.antes) {
5538
- if (!Cs(s, i.ante)) continue;
5537
+ if (!bs(s, i.ante)) continue;
5539
5538
  [
5540
5539
  ...i.shopItems,
5541
5540
  ...i.packs.flatMap((l) => l.items),
@@ -5575,33 +5574,33 @@ function sa({ results: n, jamlText: e, clauses: t, tallies: s, deck: r, stake: i
5575
5574
  )
5576
5575
  ] }),
5577
5576
  c.length > 0 && /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-md)", flexWrap: "wrap" }, children: c.map((d, g) => {
5578
- const b = m.get(d) ?? [], Q = y && g < y.length ? y[g] : void 0;
5577
+ const E = m.get(d) ?? [], I = y && g < y.length ? y[g] : void 0;
5579
5578
  return /* @__PURE__ */ C("div", { className: "j-inner-panel", style: { minWidth: 140 }, children: [
5580
5579
  /* @__PURE__ */ C("div", { className: "j-text j-text--label j-text--grey", style: { marginBottom: "var(--j-space-sm)" }, children: [
5581
5580
  d.label,
5582
- Q !== void 0 && /* @__PURE__ */ C("span", { className: "j-text--green", children: [
5581
+ I !== void 0 && /* @__PURE__ */ C("span", { className: "j-text--green", children: [
5583
5582
  " (",
5584
- Q,
5583
+ I,
5585
5584
  ")"
5586
5585
  ] })
5587
5586
  ] }),
5588
- /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: b.length > 0 ? b.map((E) => /* @__PURE__ */ C("span", { className: "j-badge j-badge--green j-badge--sm", children: [
5587
+ /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: E.length > 0 ? E.map((p) => /* @__PURE__ */ C("span", { className: "j-badge j-badge--green j-badge--sm", children: [
5589
5588
  "Ante ",
5590
- E
5591
- ] }, E)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5589
+ p
5590
+ ] }, p)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5592
5591
  ] }, g);
5593
5592
  }) }),
5594
5593
  l.filter((d) => d.kind !== "should").length > 0 && /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-md)", flexWrap: "wrap" }, children: l.filter((d) => d.kind !== "should").map((d, g) => {
5595
- const b = m.get(d) ?? [], Q = d.kind === "must" ? "red" : "grey";
5594
+ const E = m.get(d) ?? [], I = d.kind === "must" ? "red" : "grey";
5596
5595
  return /* @__PURE__ */ C("div", { className: "j-inner-panel", style: { minWidth: 140 }, children: [
5597
5596
  /* @__PURE__ */ C("div", { className: `j-text j-text--label j-text--${d.kind === "must" ? "red" : "grey"}`, style: { marginBottom: "var(--j-space-sm)" }, children: [
5598
5597
  d.kind === "must" ? "MUST " : "NOT ",
5599
5598
  d.label
5600
5599
  ] }),
5601
- /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: b.length > 0 ? b.map((E) => /* @__PURE__ */ C("span", { className: `j-badge j-badge--${Q} j-badge--sm`, children: [
5600
+ /* @__PURE__ */ A("div", { className: "j-flex", style: { gap: "var(--j-space-xs)", flexWrap: "wrap" }, children: E.length > 0 ? E.map((p) => /* @__PURE__ */ C("span", { className: `j-badge j-badge--${I} j-badge--sm`, children: [
5602
5601
  "Ante ",
5603
- E
5604
- ] }, E)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5602
+ p
5603
+ ] }, p)) : /* @__PURE__ */ A("span", { className: "j-text j-text--micro j-text--grey", children: "no hits" }) })
5605
5604
  ] }, `other-${g}`);
5606
5605
  }) }),
5607
5606
  h && /* @__PURE__ */ A("div", { style: { marginTop: "var(--j-space-md)" }, children: /* @__PURE__ */ A(
@@ -5645,9 +5644,9 @@ const En = {
5645
5644
  purple: { x: 1, y: 1 },
5646
5645
  orange: { x: 2, y: 1 },
5647
5646
  gold: { x: 3, y: 1 }
5648
- }, Ci = 142, bi = 190, Qn = 7, kn = 5, vn = 5, In = 3;
5647
+ }, bi = 142, Ci = 190, Qn = 7, kn = 5, vn = 5, In = 3;
5649
5648
  function ra({ deck: n, stake: e, size: t = 50, className: s = "", style: r }) {
5650
- const i = (n || "erratic").toLowerCase().replace(/\s*deck$/, "").trim(), a = En[i] ?? En.erratic, o = e ? yi[e.toLowerCase().replace(/\s*stake$/, "").trim()] : null, l = t / Ci, c = bi * l;
5649
+ const i = (n || "erratic").toLowerCase().replace(/\s*deck$/, "").trim(), a = En[i] ?? En.erratic, o = e ? yi[e.toLowerCase().replace(/\s*stake$/, "").trim()] : null, l = t / bi, c = Ci * l;
5651
5650
  return /* @__PURE__ */ C(
5652
5651
  "div",
5653
5652
  {
@@ -5691,16 +5690,16 @@ function ra({ deck: n, stake: e, size: t = 50, className: s = "", style: r }) {
5691
5690
  }
5692
5691
  );
5693
5692
  }
5694
- function bs(n, e) {
5693
+ function Cs(n, e) {
5695
5694
  var r;
5696
5695
  const t = e[n.type];
5697
5696
  if (!t)
5698
5697
  return console.warn(`[json-render] Unknown type: "${n.type}"`), null;
5699
- const s = (r = n.children) == null ? void 0 : r.map((i, a) => /* @__PURE__ */ A(wn, { children: bs(i, e) }, a));
5698
+ const s = (r = n.children) == null ? void 0 : r.map((i, a) => /* @__PURE__ */ A(wn, { children: Cs(i, e) }, a));
5700
5699
  return /* @__PURE__ */ A(t, { ...n.props ?? {}, children: s });
5701
5700
  }
5702
5701
  function ia(n, e) {
5703
- return n.map((t, s) => /* @__PURE__ */ A(wn, { children: bs(t, e) }, s));
5702
+ return n.map((t, s) => /* @__PURE__ */ A(wn, { children: Cs(t, e) }, s));
5704
5703
  }
5705
5704
  function aa(n) {
5706
5705
  return n;
@@ -7864,8 +7863,12 @@ export {
7864
7863
  hi as JamlyzerView,
7865
7864
  Mi as JammyMascot,
7866
7865
  Qs as JammyOrbitalMenu,
7866
+ ba as JimboBackground,
7867
7867
  na as JimboBalatroFooter,
7868
- Ca as JimboColorOption,
7868
+ Ca as JimboButton,
7869
+ Ea as JimboColorOption,
7870
+ Qa as JimboPanel,
7871
+ ka as JimboTextArea,
7869
7872
  wi as JokerBadge,
7870
7873
  Ri as JokerCard,
7871
7874
  Ii as LoadingPulse,
@@ -7886,12 +7889,12 @@ export {
7886
7889
  w as Text,
7887
7890
  oa as balatroCatalog,
7888
7891
  ua as balatroRegistry,
7889
- La as bootsharp,
7892
+ Da as bootsharp,
7890
7893
  ma as buildAnalyzerSpec,
7891
7894
  ha as buildEncyclopediaSpec,
7892
7895
  fa as buildSearchSpec,
7893
7896
  Pe as decodeMotelyItem,
7894
- Qa as decodeMotelyItemName,
7897
+ Ba as decodeMotelyItemName,
7895
7898
  Mn as decodeMotelyItemToJamlCard,
7896
7899
  aa as defineCatalog,
7897
7900
  ks as findSynergies,
@@ -7902,28 +7905,28 @@ export {
7902
7905
  Pi as getDeck,
7903
7906
  et as getJoker,
7904
7907
  la as getJokersByCategory,
7905
- ka as getMotelySpriteByName,
7908
+ wa as getMotelySpriteByName,
7906
7909
  Oi as getRecommendedSynergies,
7907
7910
  Li as getStake,
7908
7911
  Ni as getSynergies,
7909
- Cs as matchClauseToAnte,
7912
+ bs as matchClauseToAnte,
7910
7913
  si as matchClauseToItem,
7911
7914
  ii as matchMotelyItemToClause,
7912
- va as motelyItemCategory,
7913
- Ia as motelyItemDisplayName,
7914
- Ba as motelyItemEditionName,
7915
- wa as motelyItemEnhancementName,
7916
- Sa as motelyItemRenderCategory,
7917
- ja as motelyItemSealName,
7918
- Ta as motelyItemToSprite,
7919
- Ma as motelyItemTypeName,
7920
- Na as motelyStandardcardRankName,
7921
- Oa as motelyStandardcardSuitName,
7915
+ Sa as motelyItemCategory,
7916
+ ja as motelyItemDisplayName,
7917
+ Ta as motelyItemEditionName,
7918
+ Ma as motelyItemEnhancementName,
7919
+ Na as motelyItemRenderCategory,
7920
+ Oa as motelyItemSealName,
7921
+ Ja as motelyItemToSprite,
7922
+ Pa as motelyItemTypeName,
7923
+ La as motelyStandardcardRankName,
7924
+ za as motelyStandardcardSuitName,
7922
7925
  ys as parseJamlClauses,
7923
- bs as render,
7926
+ Cs as render,
7924
7927
  ia as renderList,
7925
7928
  qi as resolveAnalyzerShopItem,
7926
- Ja as resolveMotelyItemType,
7927
- ba as withAlpha
7929
+ Ra as resolveMotelyItemType,
7930
+ va as withAlpha
7928
7931
  };
7929
7932
  //# sourceMappingURL=index.js.map