@surrealdb/ui 1.0.80 → 1.0.82

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/ui.js CHANGED
@@ -1792,8 +1792,8 @@ function wr(O) {
1792
1792
  function B5(O) {
1793
1793
  var e;
1794
1794
  let { buffer: t, nodeSet: i, maxBufferLength: r = Os, reused: a = [], minRepeatType: n = i.types.length } = O, s = Array.isArray(t) ? new Vr(t, t.length) : t, o = i.types, Q = 0, $ = 0;
1795
- function c(X, b, V, G, L, S) {
1796
- let { id: x, start: C, end: R, size: Y } = s, N = $, xO = Q;
1795
+ function c(X, y, V, G, L, S) {
1796
+ let { id: x, start: C, end: b, size: Y } = s, N = $, xO = Q;
1797
1797
  if (Y < 0)
1798
1798
  if (s.next(), Y == -1) {
1799
1799
  let yO = a[x];
@@ -1808,62 +1808,62 @@ function B5(O) {
1808
1808
  } else
1809
1809
  throw new RangeError(`Unrecognized record size: ${Y}`);
1810
1810
  let Q1 = o[x], U, hO, it = C - X;
1811
- if (R - C <= r && (hO = m(s.pos - b, L))) {
1811
+ if (b - C <= r && (hO = w(s.pos - y, L))) {
1812
1812
  let yO = new Uint16Array(hO.size - hO.skip), bO = s.pos - hO.size, HO = yO.length;
1813
1813
  for (; s.pos > bO; )
1814
1814
  HO = P(hO.start, yO, HO);
1815
- U = new k1(yO, R - hO.start, i), it = hO.start - X;
1815
+ U = new k1(yO, b - hO.start, i), it = hO.start - X;
1816
1816
  } else {
1817
1817
  let yO = s.pos - Y;
1818
1818
  s.next();
1819
- let bO = [], HO = [], L1 = x >= n ? x : -1, J1 = 0, rt = R;
1819
+ let bO = [], HO = [], L1 = x >= n ? x : -1, J1 = 0, rt = b;
1820
1820
  for (; s.pos > yO; )
1821
1821
  L1 >= 0 && s.id == L1 && s.size >= 0 ? (s.end <= rt - r && (f(bO, HO, C, J1, s.end, rt, L1, N, xO), J1 = bO.length, rt = s.end), s.next()) : S > 2500 ? d(C, yO, bO, HO) : c(C, yO, bO, HO, L1, S + 1);
1822
1822
  if (L1 >= 0 && J1 > 0 && J1 < bO.length && f(bO, HO, C, J1, C, rt, L1, N, xO), bO.reverse(), HO.reverse(), L1 > -1 && J1 > 0) {
1823
1823
  let ta = h(Q1, xO);
1824
- U = Zr(Q1, bO, HO, 0, bO.length, 0, R - C, ta, ta);
1824
+ U = Zr(Q1, bO, HO, 0, bO.length, 0, b - C, ta, ta);
1825
1825
  } else
1826
- U = g(Q1, bO, HO, R - C, N - R, xO);
1826
+ U = g(Q1, bO, HO, b - C, N - b, xO);
1827
1827
  }
1828
1828
  V.push(U), G.push(it);
1829
1829
  }
1830
- function d(X, b, V, G) {
1830
+ function d(X, y, V, G) {
1831
1831
  let L = [], S = 0, x = -1;
1832
- for (; s.pos > b; ) {
1833
- let { id: C, start: R, end: Y, size: N } = s;
1832
+ for (; s.pos > y; ) {
1833
+ let { id: C, start: b, end: Y, size: N } = s;
1834
1834
  if (N > 4)
1835
1835
  s.next();
1836
1836
  else {
1837
- if (x > -1 && R < x)
1837
+ if (x > -1 && b < x)
1838
1838
  break;
1839
- x < 0 && (x = Y - r), L.push(C, R, Y), S++, s.next();
1839
+ x < 0 && (x = Y - r), L.push(C, b, Y), S++, s.next();
1840
1840
  }
1841
1841
  }
1842
1842
  if (S) {
1843
- let C = new Uint16Array(S * 4), R = L[L.length - 2];
1843
+ let C = new Uint16Array(S * 4), b = L[L.length - 2];
1844
1844
  for (let Y = L.length - 3, N = 0; Y >= 0; Y -= 3)
1845
- C[N++] = L[Y], C[N++] = L[Y + 1] - R, C[N++] = L[Y + 2] - R, C[N++] = N;
1846
- V.push(new k1(C, L[2] - R, i)), G.push(R - X);
1845
+ C[N++] = L[Y], C[N++] = L[Y + 1] - b, C[N++] = L[Y + 2] - b, C[N++] = N;
1846
+ V.push(new k1(C, L[2] - b, i)), G.push(b - X);
1847
1847
  }
1848
1848
  }
1849
- function h(X, b) {
1849
+ function h(X, y) {
1850
1850
  return (V, G, L) => {
1851
- let S = 0, x = V.length - 1, C, R;
1851
+ let S = 0, x = V.length - 1, C, b;
1852
1852
  if (x >= 0 && (C = V[x]) instanceof QO) {
1853
1853
  if (!x && C.type == X && C.length == L)
1854
1854
  return C;
1855
- (R = C.prop(I.lookAhead)) && (S = G[x] + C.length + R);
1855
+ (b = C.prop(I.lookAhead)) && (S = G[x] + C.length + b);
1856
1856
  }
1857
- return g(X, V, G, L, S, b);
1857
+ return g(X, V, G, L, S, y);
1858
1858
  };
1859
1859
  }
1860
- function f(X, b, V, G, L, S, x, C, R) {
1860
+ function f(X, y, V, G, L, S, x, C, b) {
1861
1861
  let Y = [], N = [];
1862
1862
  for (; X.length > G; )
1863
- Y.push(X.pop()), N.push(b.pop() + V - L);
1864
- X.push(g(i.types[x], Y, N, S - L, C - S, R)), b.push(L - V);
1863
+ Y.push(X.pop()), N.push(y.pop() + V - L);
1864
+ X.push(g(i.types[x], Y, N, S - L, C - S, b)), y.push(L - V);
1865
1865
  }
1866
- function g(X, b, V, G, L, S, x) {
1866
+ function g(X, y, V, G, L, S, x) {
1867
1867
  if (S) {
1868
1868
  let C = [I.contextHash, S];
1869
1869
  x = x ? [C].concat(x) : [C];
@@ -1872,18 +1872,18 @@ function B5(O) {
1872
1872
  let C = [I.lookAhead, L];
1873
1873
  x = x ? [C].concat(x) : [C];
1874
1874
  }
1875
- return new QO(X, b, V, G, x);
1875
+ return new QO(X, y, V, G, x);
1876
1876
  }
1877
- function m(X, b) {
1877
+ function w(X, y) {
1878
1878
  let V = s.fork(), G = 0, L = 0, S = 0, x = V.end - r, C = { size: 0, start: 0, skip: 0 };
1879
- O: for (let R = V.pos - X; V.pos > R; ) {
1879
+ O: for (let b = V.pos - X; V.pos > b; ) {
1880
1880
  let Y = V.size;
1881
- if (V.id == b && Y >= 0) {
1881
+ if (V.id == y && Y >= 0) {
1882
1882
  C.size = G, C.start = L, C.skip = S, S += 4, G += 4, V.next();
1883
1883
  continue;
1884
1884
  }
1885
1885
  let N = V.pos - Y;
1886
- if (Y < 0 || N < R || V.start < x)
1886
+ if (Y < 0 || N < b || V.start < x)
1887
1887
  break;
1888
1888
  let xO = V.id >= n ? 4 : 0, Q1 = V.start;
1889
1889
  for (V.next(); V.pos > N; ) {
@@ -1897,26 +1897,26 @@ function B5(O) {
1897
1897
  }
1898
1898
  L = Q1, G += Y, S += xO;
1899
1899
  }
1900
- return (b < 0 || G == X) && (C.size = G, C.start = L, C.skip = S), C.size > 4 ? C : void 0;
1900
+ return (y < 0 || G == X) && (C.size = G, C.start = L, C.skip = S), C.size > 4 ? C : void 0;
1901
1901
  }
1902
- function P(X, b, V) {
1902
+ function P(X, y, V) {
1903
1903
  let { id: G, start: L, end: S, size: x } = s;
1904
1904
  if (s.next(), x >= 0 && G < n) {
1905
1905
  let C = V;
1906
1906
  if (x > 4) {
1907
- let R = s.pos - (x - 4);
1908
- for (; s.pos > R; )
1909
- V = P(X, b, V);
1907
+ let b = s.pos - (x - 4);
1908
+ for (; s.pos > b; )
1909
+ V = P(X, y, V);
1910
1910
  }
1911
- b[--V] = C, b[--V] = S - X, b[--V] = L - X, b[--V] = G;
1911
+ y[--V] = C, y[--V] = S - X, y[--V] = L - X, y[--V] = G;
1912
1912
  } else x == -3 ? Q = G : x == -4 && ($ = G);
1913
1913
  return V;
1914
1914
  }
1915
- let y = [], w = [];
1915
+ let R = [], m = [];
1916
1916
  for (; s.pos > 0; )
1917
- c(O.start || 0, O.bufferStart || 0, y, w, -1, 0);
1918
- let T = (e = O.length) !== null && e !== void 0 ? e : y.length ? w[0] + y[0].length : 0;
1919
- return new QO(o[O.topID], y.reverse(), w.reverse(), T);
1917
+ c(O.start || 0, O.bufferStart || 0, R, m, -1, 0);
1918
+ let T = (e = O.length) !== null && e !== void 0 ? e : R.length ? m[0] + R[0].length : 0;
1919
+ return new QO(o[O.topID], R.reverse(), m.reverse(), T);
1920
1920
  }
1921
1921
  const ha = /* @__PURE__ */ new WeakMap();
1922
1922
  function ft(O, e) {
@@ -1944,27 +1944,27 @@ function Zr(O, e, t, i, r, a, n, s, o) {
1944
1944
  Q * 1.5 / 8
1945
1945
  /* Balance.BranchFactor */
1946
1946
  ), c = [], d = [];
1947
- function h(f, g, m, P, y) {
1948
- for (let w = m; w < P; ) {
1949
- let T = w, X = g[w], b = ft(O, f[w]);
1950
- for (w++; w < P; w++) {
1951
- let V = ft(O, f[w]);
1952
- if (b + V >= $)
1947
+ function h(f, g, w, P, R) {
1948
+ for (let m = w; m < P; ) {
1949
+ let T = m, X = g[m], y = ft(O, f[m]);
1950
+ for (m++; m < P; m++) {
1951
+ let V = ft(O, f[m]);
1952
+ if (y + V >= $)
1953
1953
  break;
1954
- b += V;
1954
+ y += V;
1955
1955
  }
1956
- if (w == T + 1) {
1957
- if (b > $) {
1956
+ if (m == T + 1) {
1957
+ if (y > $) {
1958
1958
  let V = f[T];
1959
- h(V.children, V.positions, 0, V.children.length, g[T] + y);
1959
+ h(V.children, V.positions, 0, V.children.length, g[T] + R);
1960
1960
  continue;
1961
1961
  }
1962
1962
  c.push(f[T]);
1963
1963
  } else {
1964
- let V = g[w - 1] + f[w - 1].length - X;
1965
- c.push(Zr(O, f, g, T, w, X, V, null, o));
1964
+ let V = g[m - 1] + f[m - 1].length - X;
1965
+ c.push(Zr(O, f, g, T, m, X, V, null, o));
1966
1966
  }
1967
- d.push(X + y - a);
1967
+ d.push(X + R - a);
1968
1968
  }
1969
1969
  }
1970
1970
  return h(e, t, i, r, 0), (s || o)(c, d, n);
@@ -2207,12 +2207,12 @@ function iQ(O) {
2207
2207
  while (!O.tree);
2208
2208
  let r = O.tree, a = r.children.indexOf(i), n = r.children[a], s = n.buffer, o = [a];
2209
2209
  function Q($, c, d, h, f, g) {
2210
- let m = t[g], P = [], y = [];
2211
- Sa(n, $, m, P, y, h);
2212
- let w = s[m + 1], T = s[m + 2];
2210
+ let w = t[g], P = [], R = [];
2211
+ Sa(n, $, w, P, R, h);
2212
+ let m = s[w + 1], T = s[w + 2];
2213
2213
  o.push(P.length);
2214
- let X = g ? Q(m + 4, s[m + 3], n.set.types[s[m]], w, T - w, g - 1) : e.toTree();
2215
- return P.push(X), y.push(w - h), Sa(n, s[m + 3], c, P, y, h), new QO(d, P, y, f);
2214
+ let X = g ? Q(w + 4, s[w + 3], n.set.types[s[w]], m, T - m, g - 1) : e.toTree();
2215
+ return P.push(X), R.push(m - h), Sa(n, s[w + 3], c, P, R, h), new QO(d, P, R, f);
2216
2216
  }
2217
2217
  r.children[a] = Q(0, s.length, LO.none, 0, n.length, t.length - 1);
2218
2218
  for (let $ of o) {
@@ -2545,15 +2545,15 @@ class uQ {
2545
2545
  return;
2546
2546
  let d = e.tree && e.tree.prop(I.mounted);
2547
2547
  if (d && d.overlay) {
2548
- let h = e.node.enter(d.overlay[0].from + s, 1), f = this.highlighters.filter((m) => !m.scope || m.scope(d.tree.type)), g = e.firstChild();
2549
- for (let m = 0, P = s; ; m++) {
2550
- let y = m < d.overlay.length ? d.overlay[m] : null, w = y ? y.from + s : o, T = Math.max(t, P), X = Math.min(i, w);
2548
+ let h = e.node.enter(d.overlay[0].from + s, 1), f = this.highlighters.filter((w) => !w.scope || w.scope(d.tree.type)), g = e.firstChild();
2549
+ for (let w = 0, P = s; ; w++) {
2550
+ let R = w < d.overlay.length ? d.overlay[w] : null, m = R ? R.from + s : o, T = Math.max(t, P), X = Math.min(i, m);
2551
2551
  if (T < X && g)
2552
- for (; e.from < X && (this.highlightRange(e, T, X, r, a), this.startSpan(Math.min(X, e.to), Q), !(e.to >= w || !e.nextSibling())); )
2552
+ for (; e.from < X && (this.highlightRange(e, T, X, r, a), this.startSpan(Math.min(X, e.to), Q), !(e.to >= m || !e.nextSibling())); )
2553
2553
  ;
2554
- if (!y || w > i)
2554
+ if (!R || m > i)
2555
2555
  break;
2556
- P = y.to + s, P > t && (this.highlightRange(h.cursor(), Math.max(t, y.from + s), Math.min(i, P), "", f), this.startSpan(Math.min(i, P), Q));
2556
+ P = R.to + s, P > t && (this.highlightRange(h.cursor(), Math.max(t, R.from + s), Math.min(i, P), "", f), this.startSpan(Math.min(i, P), Q));
2557
2557
  }
2558
2558
  g && e.parent();
2559
2559
  } else if (e.firstChild()) {
@@ -3063,17 +3063,17 @@ function li(O) {
3063
3063
  }
3064
3064
  }
3065
3065
  function ZO(O) {
3066
- var e = O.statementIndentUnit, t = O.dontAlignCalls, i = O.keywords || {}, r = O.types || {}, a = O.builtin || {}, n = O.blockKeywords || {}, s = O.defKeywords || {}, o = O.atoms || {}, Q = O.hooks || {}, $ = O.multiLineStrings, c = O.indentStatements !== !1, d = O.indentSwitch !== !1, h = O.namespaceSeparator, f = O.isPunctuationChar || /[\[\]{}\(\),;\:\.]/, g = O.numberStart || /[\d\.]/, m = O.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i, P = O.isOperatorChar || /[+\-*&%=<>!?|\/]/, y = O.isIdentifierChar || /[\w\$_\xa1-\uffff]/, w = O.isReservedIdentifier || !1, T, X;
3067
- function b(S, x) {
3066
+ var e = O.statementIndentUnit, t = O.dontAlignCalls, i = O.keywords || {}, r = O.types || {}, a = O.builtin || {}, n = O.blockKeywords || {}, s = O.defKeywords || {}, o = O.atoms || {}, Q = O.hooks || {}, $ = O.multiLineStrings, c = O.indentStatements !== !1, d = O.indentSwitch !== !1, h = O.namespaceSeparator, f = O.isPunctuationChar || /[\[\]{}\(\),;\:\.]/, g = O.numberStart || /[\d\.]/, w = O.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i, P = O.isOperatorChar || /[+\-*&%=<>!?|\/]/, R = O.isIdentifierChar || /[\w\$_\xa1-\uffff]/, m = O.isReservedIdentifier || !1, T, X;
3067
+ function y(S, x) {
3068
3068
  var C = S.next();
3069
3069
  if (Q[C]) {
3070
- var R = Q[C](S, x);
3071
- if (R !== !1) return R;
3070
+ var b = Q[C](S, x);
3071
+ if (b !== !1) return b;
3072
3072
  }
3073
3073
  if (C == '"' || C == "'")
3074
3074
  return x.tokenize = V(C), x.tokenize(S, x);
3075
3075
  if (g.test(C)) {
3076
- if (S.backUp(1), S.match(m)) return "number";
3076
+ if (S.backUp(1), S.match(w)) return "number";
3077
3077
  S.next();
3078
3078
  }
3079
3079
  if (f.test(C))
@@ -3089,30 +3089,30 @@ function ZO(O) {
3089
3089
  ;
3090
3090
  return "operator";
3091
3091
  }
3092
- if (S.eatWhile(y), h) for (; S.match(h); )
3093
- S.eatWhile(y);
3092
+ if (S.eatWhile(R), h) for (; S.match(h); )
3093
+ S.eatWhile(R);
3094
3094
  var Y = S.current();
3095
- return h1(i, Y) ? (h1(n, Y) && (T = "newstatement"), h1(s, Y) && (X = !0), "keyword") : h1(r, Y) ? "type" : h1(a, Y) || w && w(Y) ? (h1(n, Y) && (T = "newstatement"), "builtin") : h1(o, Y) ? "atom" : "variable";
3095
+ return h1(i, Y) ? (h1(n, Y) && (T = "newstatement"), h1(s, Y) && (X = !0), "keyword") : h1(r, Y) ? "type" : h1(a, Y) || m && m(Y) ? (h1(n, Y) && (T = "newstatement"), "builtin") : h1(o, Y) ? "atom" : "variable";
3096
3096
  }
3097
3097
  function V(S) {
3098
3098
  return function(x, C) {
3099
- for (var R = !1, Y, N = !1; (Y = x.next()) != null; ) {
3100
- if (Y == S && !R) {
3099
+ for (var b = !1, Y, N = !1; (Y = x.next()) != null; ) {
3100
+ if (Y == S && !b) {
3101
3101
  N = !0;
3102
3102
  break;
3103
3103
  }
3104
- R = !R && Y == "\\";
3104
+ b = !b && Y == "\\";
3105
3105
  }
3106
- return (N || !(R || $)) && (C.tokenize = null), "string";
3106
+ return (N || !(b || $)) && (C.tokenize = null), "string";
3107
3107
  };
3108
3108
  }
3109
3109
  function G(S, x) {
3110
- for (var C = !1, R; R = S.next(); ) {
3111
- if (R == "/" && C) {
3110
+ for (var C = !1, b; b = S.next(); ) {
3111
+ if (b == "/" && C) {
3112
3112
  x.tokenize = null;
3113
3113
  break;
3114
3114
  }
3115
- C = R == "*";
3115
+ C = b == "*";
3116
3116
  }
3117
3117
  return "comment";
3118
3118
  }
@@ -3135,8 +3135,8 @@ function ZO(O) {
3135
3135
  if (S.sol() && (C.align == null && (C.align = !1), x.indented = S.indentation(), x.startOfLine = !0), S.eatSpace())
3136
3136
  return L(S, x), null;
3137
3137
  T = X = null;
3138
- var R = (x.tokenize || b)(S, x);
3139
- if (R == "comment" || R == "meta") return R;
3138
+ var b = (x.tokenize || y)(S, x);
3139
+ if (b == "comment" || b == "meta") return b;
3140
3140
  if (C.align == null && (C.align = !0), T == ";" || T == ":" || T == "," && S.match(/^\s*(?:\/\/.*)?$/, !1))
3141
3141
  for (; x.context.type == "statement"; ) Te(x);
3142
3142
  else if (T == "{") $t(x, S.column(), "}");
@@ -3146,29 +3146,29 @@ function ZO(O) {
3146
3146
  for (; C.type == "statement"; ) C = Te(x);
3147
3147
  for (C.type == "}" && (C = Te(x)); C.type == "statement"; ) C = Te(x);
3148
3148
  } else T == C.type ? Te(x) : c && ((C.type == "}" || C.type == "top") && T != ";" || C.type == "statement" && T == "newstatement") && $t(x, S.column(), "statement", S.current());
3149
- if (R == "variable" && (x.prevToken == "def" || O.typeFirstDefinitions && Ca(S, x, S.start) && li(x.context) && S.match(/^\s*\(/, !1)) && (R = "def"), Q.token) {
3150
- var Y = Q.token(S, x, R);
3151
- Y !== void 0 && (R = Y);
3149
+ if (b == "variable" && (x.prevToken == "def" || O.typeFirstDefinitions && Ca(S, x, S.start) && li(x.context) && S.match(/^\s*\(/, !1)) && (b = "def"), Q.token) {
3150
+ var Y = Q.token(S, x, b);
3151
+ Y !== void 0 && (b = Y);
3152
3152
  }
3153
- return R == "def" && O.styleDefs === !1 && (R = "variable"), x.startOfLine = !1, x.prevToken = X ? "def" : R || T, L(S, x), R;
3153
+ return b == "def" && O.styleDefs === !1 && (b = "variable"), x.startOfLine = !1, x.prevToken = X ? "def" : b || T, L(S, x), b;
3154
3154
  },
3155
3155
  indent: function(S, x, C) {
3156
- if (S.tokenize != b && S.tokenize != null || S.typeAtEndOfLine && li(S.context))
3156
+ if (S.tokenize != y && S.tokenize != null || S.typeAtEndOfLine && li(S.context))
3157
3157
  return null;
3158
- var R = S.context, Y = x && x.charAt(0), N = Y == R.type;
3159
- if (R.type == "statement" && Y == "}" && (R = R.prev), O.dontIndentStatements)
3160
- for (; R.type == "statement" && O.dontIndentStatements.test(R.info); )
3161
- R = R.prev;
3158
+ var b = S.context, Y = x && x.charAt(0), N = Y == b.type;
3159
+ if (b.type == "statement" && Y == "}" && (b = b.prev), O.dontIndentStatements)
3160
+ for (; b.type == "statement" && O.dontIndentStatements.test(b.info); )
3161
+ b = b.prev;
3162
3162
  if (Q.indent) {
3163
- var xO = Q.indent(S, R, x, C.unit);
3163
+ var xO = Q.indent(S, b, x, C.unit);
3164
3164
  if (typeof xO == "number") return xO;
3165
3165
  }
3166
- var Q1 = R.prev && R.prev.info == "switch";
3166
+ var Q1 = b.prev && b.prev.info == "switch";
3167
3167
  if (O.allmanIndentation && /[{(]/.test(Y)) {
3168
- for (; R.type != "top" && R.type != "}"; ) R = R.prev;
3169
- return R.indented;
3168
+ for (; b.type != "top" && b.type != "}"; ) b = b.prev;
3169
+ return b.indented;
3170
3170
  }
3171
- return R.type == "statement" ? R.indented + (Y == "{" ? 0 : e || C.unit) : R.align && (!t || R.type != ")") ? R.column + (N ? 0 : 1) : R.type == ")" && !N ? R.indented + (e || C.unit) : R.indented + (N ? 0 : C.unit) + (!N && Q1 && !/^(?:case|default)\b/.test(x) ? C.unit : 0);
3171
+ return b.type == "statement" ? b.indented + (Y == "{" ? 0 : e || C.unit) : b.align && (!t || b.type != ")") ? b.column + (N ? 0 : 1) : b.type == ")" && !N ? b.indented + (e || C.unit) : b.indented + (N ? 0 : C.unit) + (!N && Q1 && !/^(?:case|default)\b/.test(x) ? C.unit : 0);
3172
3172
  },
3173
3173
  languageData: {
3174
3174
  indentOnInput: d ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/,
@@ -4304,10 +4304,10 @@ function us(O, e, t, i, r, a) {
4304
4304
  continue O;
4305
4305
  }
4306
4306
  for (; c < d; ) {
4307
- let h = c + d >> 1, f = Q + h + (h << 1), g = O[f], m = O[f + 1] || 65536;
4307
+ let h = c + d >> 1, f = Q + h + (h << 1), g = O[f], w = O[f + 1] || 65536;
4308
4308
  if ($ < g)
4309
4309
  d = h;
4310
- else if ($ >= m)
4310
+ else if ($ >= w)
4311
4311
  c = h + 1;
4312
4312
  else {
4313
4313
  n = O[f + 2], e.advance();
@@ -7374,16 +7374,16 @@ function Gg(O = {}) {
7374
7374
  onChangeDocument: $,
7375
7375
  onChangeSelection: c,
7376
7376
  onChangeState: d
7377
- } = O, { colorScheme: h } = An(), [f, g] = j(!1), m = VO(null), P = VO(null), y = VO(null), w = VO(new oa()), T = VO(new oa()), X = sO((S) => {
7377
+ } = O, { colorScheme: h } = An(), [f, g] = j(!1), w = VO(null), P = VO(null), R = VO(null), m = VO(new oa()), T = VO(new oa()), X = sO((S) => {
7378
7378
  if ($ && S.docChanged && $?.(S.state.doc.toString()), c && S.selectionSet && c?.(S.state.selection), d && (S.docChanged || S.selectionSet)) {
7379
7379
  const x = S.state.toJSON(e);
7380
- d?.(x), y.current = x;
7380
+ d?.(x), R.current = x;
7381
7381
  }
7382
- }), b = tO(
7382
+ }), y = tO(
7383
7383
  () => ({
7384
7384
  extensions: [
7385
7385
  ie.updateListener.of(X),
7386
- w.current.of([]),
7386
+ m.current.of([]),
7387
7387
  T.current.of(n ?? []),
7388
7388
  wd()
7389
7389
  ]
@@ -7393,7 +7393,7 @@ function Gg(O = {}) {
7393
7393
  const S = P.current;
7394
7394
  S && S.dispatch({
7395
7395
  effects: [
7396
- w.current.reconfigure([
7396
+ m.current.reconfigure([
7397
7397
  Ze.readOnly.of(a),
7398
7398
  hQ(i, h),
7399
7399
  Ln({ newGroupDelay: 250 }),
@@ -7402,21 +7402,21 @@ function Gg(O = {}) {
7402
7402
  ]
7403
7403
  });
7404
7404
  }), G = sO((S) => {
7405
- P.current && (xd(y.current, S) || (P.current.setState(Ze.fromJSON(S, b, e)), y.current = S, V()));
7405
+ P.current && (xd(R.current, S) || (P.current.setState(Ze.fromJSON(S, y, e)), R.current = S, V()));
7406
7406
  }), L = sO(() => {
7407
7407
  if (!P.current)
7408
7408
  throw new Error("Editor not initialized");
7409
7409
  return P.current;
7410
7410
  });
7411
7411
  return H(() => {
7412
- if (!m.current) return;
7412
+ if (!w.current) return;
7413
7413
  const S = new ie({
7414
- parent: m.current,
7414
+ parent: w.current,
7415
7415
  scrollTo: ie.scrollIntoView(0),
7416
- state: Ze.create(b)
7416
+ state: Ze.create(y)
7417
7417
  });
7418
7418
  return P.current = S, g(!0), Q?.(S), () => {
7419
- S.destroy(), P.current = null, y.current = null, g(!1);
7419
+ S.destroy(), P.current = null, R.current = null, g(!1);
7420
7420
  };
7421
7421
  }, []), H(() => {
7422
7422
  V();
@@ -7432,7 +7432,7 @@ function Gg(O = {}) {
7432
7432
  }));
7433
7433
  }, [n, s]), tO(
7434
7434
  () => ({
7435
- ref: m,
7435
+ ref: w,
7436
7436
  mounted: f,
7437
7437
  getEditor: L,
7438
7438
  restoreState: G
@@ -7565,7 +7565,7 @@ const ks = ({
7565
7565
  const o = [], Q = Sd(e), $ = t === "auto" ? n : t, c = [];
7566
7566
  let d = [], h = 0;
7567
7567
  const f = (P) => i.some(
7568
- (y) => P >= y.start && P <= y.end
7568
+ (R) => P >= R.start && P <= R.end
7569
7569
  ), g = ({ lineIndex: P }) => r && /* @__PURE__ */ p(
7570
7570
  "span",
7571
7571
  {
@@ -7575,7 +7575,7 @@ const ks = ({
7575
7575
  },
7576
7576
  children: P + 1
7577
7577
  }
7578
- ), m = () => {
7578
+ ), w = () => {
7579
7579
  if (d.length > 0) {
7580
7580
  const P = [...d];
7581
7581
  f(h) ? c.push([
@@ -7649,12 +7649,12 @@ const ks = ({
7649
7649
  O,
7650
7650
  Q.parse(O),
7651
7651
  yd($),
7652
- (P, y) => {
7652
+ (P, R) => {
7653
7653
  d.push(
7654
7654
  /* @__PURE__ */ p(
7655
7655
  "span",
7656
7656
  {
7657
- style: { color: y },
7657
+ style: { color: R },
7658
7658
  children: P
7659
7659
  },
7660
7660
  `span-${h}-${d.length}`
@@ -7662,11 +7662,11 @@ const ks = ({
7662
7662
  );
7663
7663
  },
7664
7664
  () => {
7665
- m();
7665
+ w();
7666
7666
  }
7667
- ), d.length > 0 && m()) : O.split(`
7668
- `).forEach((y, w) => {
7669
- d = [/* @__PURE__ */ p("span", { children: y }, `text-${w}`)], m();
7667
+ ), d.length > 0 && w()) : O.split(`
7668
+ `).forEach((R, m) => {
7669
+ d = [/* @__PURE__ */ p("span", { children: R }, `text-${m}`)], w();
7670
7670
  }), c.forEach((P) => {
7671
7671
  o.push(...P);
7672
7672
  }), o;
@@ -8483,16 +8483,16 @@ function ih({
8483
8483
  ...e
8484
8484
  }), [e, n]), o = M(
8485
8485
  ($, c, d, h) => {
8486
- const f = $.id, g = typeof f == "string" ? f : c, m = () => s[$.type];
8486
+ const f = $.id, g = typeof f == "string" ? f : c, w = () => s[$.type];
8487
8487
  if ($.type === "text")
8488
8488
  return $.value;
8489
8489
  let P = h;
8490
8490
  if ($.type === "table" && (P = { table: $ }), eh($)) {
8491
- const w = m(), T = $, X = T.children[0], b = T.children.slice(1), V = X ? o(X, 0, $, P) : null, G = b.map(
8491
+ const m = w(), T = $, X = T.children[0], y = T.children.slice(1), V = X ? o(X, 0, $, P) : null, G = y.map(
8492
8492
  (L, S) => o(L, S + 1, $, P)
8493
8493
  );
8494
8494
  return /* @__PURE__ */ v(
8495
- w,
8495
+ m,
8496
8496
  {
8497
8497
  node: $,
8498
8498
  children: [
@@ -8504,9 +8504,9 @@ function ih({
8504
8504
  );
8505
8505
  }
8506
8506
  if (th($)) {
8507
- const w = m();
8507
+ const m = w();
8508
8508
  return /* @__PURE__ */ p(
8509
- w,
8509
+ m,
8510
8510
  {
8511
8511
  node: $,
8512
8512
  children: $.children.map((T, X) => o(T, X, $, P))
@@ -8514,9 +8514,9 @@ function ih({
8514
8514
  g
8515
8515
  );
8516
8516
  }
8517
- const y = m();
8517
+ const R = w();
8518
8518
  return /* @__PURE__ */ p(
8519
- y,
8519
+ R,
8520
8520
  {
8521
8521
  node: $
8522
8522
  },
@@ -9970,8 +9970,8 @@ W.parseSubscript = function(O, e, t, i, r, a, n) {
9970
9970
  if (r && !o && this.shouldParseAsyncArrow())
9971
9971
  return this.checkPatternErrors(c, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = d, this.awaitPos = h, this.awaitIdentPos = f, this.parseSubscriptAsyncArrow(e, t, g, n);
9972
9972
  this.checkExpressionErrors(c, !0), this.yieldPos = d || this.yieldPos, this.awaitPos = h || this.awaitPos, this.awaitIdentPos = f || this.awaitIdentPos;
9973
- var m = this.startNodeAt(e, t);
9974
- m.callee = O, m.arguments = g, s && (m.optional = o), O = this.finishNode(m, "CallExpression");
9973
+ var w = this.startNodeAt(e, t);
9974
+ w.callee = O, w.arguments = g, s && (w.optional = o), O = this.finishNode(w, "CallExpression");
9975
9975
  } else if (this.type === u.backQuote) {
9976
9976
  (o || a) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
9977
9977
  var P = this.startNodeAt(e, t);
@@ -10085,10 +10085,10 @@ W.parseParenAndDistinguishExpression = function(O, e) {
10085
10085
  break;
10086
10086
  } else
10087
10087
  o.push(this.parseMaybeAssign(!1, c, this.parseParenItem));
10088
- var g = this.lastTokEnd, m = this.lastTokEndLoc;
10088
+ var g = this.lastTokEnd, w = this.lastTokEndLoc;
10089
10089
  if (this.expect(u.parenR), O && this.shouldParseArrow(o) && this.eat(u.arrow))
10090
10090
  return this.checkPatternErrors(c, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = d, this.awaitPos = h, this.parseParenArrowList(t, i, o, e);
10091
- (!o.length || $) && this.unexpected(this.lastTokStart), f && this.unexpected(f), this.checkExpressionErrors(c, !0), this.yieldPos = d || this.yieldPos, this.awaitPos = h || this.awaitPos, o.length > 1 ? (r = this.startNodeAt(n, s), r.expressions = o, this.finishNodeAt(r, "SequenceExpression", g, m)) : r = o[0];
10091
+ (!o.length || $) && this.unexpected(this.lastTokStart), f && this.unexpected(f), this.checkExpressionErrors(c, !0), this.yieldPos = d || this.yieldPos, this.awaitPos = h || this.awaitPos, o.length > 1 ? (r = this.startNodeAt(n, s), r.expressions = o, this.finishNodeAt(r, "SequenceExpression", g, w)) : r = o[0];
10092
10092
  } else
10093
10093
  r = this.parseParenExpression();
10094
10094
  if (this.options.preserveParens) {
@@ -12030,9 +12030,9 @@ function pP(O, e, t, i) {
12030
12030
  }
12031
12031
  const c = `</${e}>`;
12032
12032
  if (n !== -1) {
12033
- const g = t.slice(n + 1), m = g.indexOf(c);
12034
- if (m !== -1) {
12035
- const P = g.slice(0, m);
12033
+ const g = t.slice(n + 1), w = g.indexOf(c);
12034
+ if (w !== -1) {
12035
+ const P = g.slice(0, w);
12036
12036
  O.currentIndex = i + 1, P.trim() && ($.children = Cn([P])), $.position = { start: Q, end: i + 1 }, O.currentContainer.push($);
12037
12037
  return;
12038
12038
  }
@@ -12045,12 +12045,12 @@ function pP(O, e, t, i) {
12045
12045
  g.trim() && h.push(g);
12046
12046
  }
12047
12047
  for (; O.currentIndex < O.lines.length && d > 0; ) {
12048
- const g = O.lines[O.currentIndex], m = g.trim();
12049
- if (m.includes(f) && !m.includes(`</${e}`)) {
12048
+ const g = O.lines[O.currentIndex], w = g.trim();
12049
+ if (w.includes(f) && !w.includes(`</${e}`)) {
12050
12050
  d++, h.push(g), O.currentIndex++;
12051
12051
  continue;
12052
12052
  }
12053
- if (m.includes(c) && (d--, d === 0)) {
12053
+ if (w.includes(c) && (d--, d === 0)) {
12054
12054
  O.currentIndex++;
12055
12055
  break;
12056
12056
  }
@@ -12931,11 +12931,11 @@ function yn(O) {
12931
12931
  let t = "unordered", i;
12932
12932
  const r = O.lines[O.currentIndex].trim(), a = Ro(r);
12933
12933
  for (a.isOrdered && (t = "ordered", i = a.start); O.currentIndex < O.lines.length; ) {
12934
- const o = O.lines[O.currentIndex].trim();
12934
+ const s = O.lines[O.currentIndex], o = s.trim();
12935
12935
  if (o === "") {
12936
12936
  if (O.currentIndex++, O.currentIndex >= O.lines.length) break;
12937
- const y = O.lines[O.currentIndex].trim();
12938
- if (!y.startsWith("-") && !y.startsWith("*") && !y.startsWith("+") && !qt(y))
12937
+ const m = O.lines[O.currentIndex].trim();
12938
+ if (!m.startsWith("-") && !m.startsWith("*") && !m.startsWith("+") && !qt(m))
12939
12939
  break;
12940
12940
  continue;
12941
12941
  }
@@ -12944,26 +12944,27 @@ function yn(O) {
12944
12944
  break;
12945
12945
  const c = [];
12946
12946
  let d, h = O.currentIndex;
12947
+ const f = s.length - s.trimStart().length;
12947
12948
  for (; h < O.lines.length; ) {
12948
- const y = O.lines[h], w = y.trim();
12949
- if (w === "") {
12949
+ const m = O.lines[h], T = m.trim();
12950
+ if (T === "") {
12950
12951
  h++;
12951
12952
  continue;
12952
12953
  }
12953
12954
  if (h === O.currentIndex) {
12954
12955
  if ($)
12955
- c.push(GP(w));
12956
+ c.push(GP(T));
12956
12957
  else {
12957
- const { content: T, checked: X } = UP(w);
12958
- c.push(T), d = X;
12958
+ const { content: X, checked: y } = UP(T);
12959
+ c.push(X), d = y;
12959
12960
  }
12960
12961
  h++;
12961
- } else if (y.length - y.trimStart().length >= 2)
12962
- c.push(y), h++;
12962
+ } else if (m.length - m.trimStart().length > f)
12963
+ c.push(m), h++;
12963
12964
  else
12964
12965
  break;
12965
12966
  }
12966
- const m = {
12967
+ const P = {
12967
12968
  lines: c.join(`
12968
12969
  `).split(`
12969
12970
  `),
@@ -12972,13 +12973,13 @@ function yn(O) {
12972
12973
  root: [],
12973
12974
  currentContainer: []
12974
12975
  };
12975
- for (m.currentContainer = m.root; m.currentIndex < m.lines.length; )
12976
- Se(m);
12977
- const P = {
12976
+ for (P.currentContainer = P.root; P.currentIndex < P.lines.length; )
12977
+ Se(P);
12978
+ const R = {
12978
12979
  type: "listItem",
12979
- children: m.root
12980
+ children: P.root
12980
12981
  };
12981
- d !== void 0 && (P.checked = d, t === "unordered" && (t = "checklist")), e.push(P), O.currentIndex = h;
12982
+ d !== void 0 && (R.checked = d, t === "unordered" && (t = "checklist")), e.push(R), O.currentIndex = h;
12982
12983
  }
12983
12984
  const n = {
12984
12985
  type: "list",
@@ -13169,17 +13170,17 @@ const lr = {
13169
13170
  s && h.current?.focus();
13170
13171
  }, [s]);
13171
13172
  const f = M(() => {
13172
- const w = Q.trim();
13173
- w !== n.code && KO.updateElement(r, {
13173
+ const m = Q.trim();
13174
+ m !== n.code && KO.updateElement(r, {
13174
13175
  blockId: t,
13175
13176
  type: "brandsafe-image",
13176
- props: { code: w }
13177
+ props: { code: m }
13177
13178
  }), o(!1);
13178
13179
  }, [r, t, Q, n.code]), g = M(() => {
13179
13180
  $(n.code), o(!1);
13180
- }, [n.code]), m = M(
13181
- (w) => {
13182
- w.stopPropagation(), w.key === "Enter" && f(), w.key === "Escape" && g();
13181
+ }, [n.code]), w = M(
13182
+ (m) => {
13183
+ m.stopPropagation(), m.key === "Enter" && f(), m.key === "Escape" && g();
13183
13184
  },
13184
13185
  [f, g]
13185
13186
  ), P = tO(() => n.code ? Ei(n.code) : "", [n.code]);
@@ -13220,7 +13221,7 @@ const lr = {
13220
13221
  {
13221
13222
  type: "button",
13222
13223
  onClick: () => o(!0),
13223
- onMouseDown: (w) => w.stopPropagation(),
13224
+ onMouseDown: (m) => m.stopPropagation(),
13224
13225
  style: {
13225
13226
  position: "absolute",
13226
13227
  inset: 0,
@@ -13238,11 +13239,11 @@ const lr = {
13238
13239
  padding: "var(--mantine-spacing-md)",
13239
13240
  width: "100%"
13240
13241
  },
13241
- onMouseEnter: (w) => {
13242
- w.currentTarget.style.opacity = "1";
13242
+ onMouseEnter: (m) => {
13243
+ m.currentTarget.style.opacity = "1";
13243
13244
  },
13244
- onMouseLeave: (w) => {
13245
- s || (w.currentTarget.style.opacity = "0");
13245
+ onMouseLeave: (m) => {
13246
+ s || (m.currentTarget.style.opacity = "0");
13246
13247
  },
13247
13248
  children: s ? /* @__PURE__ */ p(
13248
13249
  WO,
@@ -13252,11 +13253,11 @@ const lr = {
13252
13253
  label: "Enter a new BrandSafe code",
13253
13254
  placeholder: "BrandSafe image code…",
13254
13255
  value: Q,
13255
- onChange: (w) => $(w.currentTarget.value),
13256
+ onChange: (m) => $(m.currentTarget.value),
13256
13257
  onBlur: f,
13257
- onKeyDown: m,
13258
- onMouseDown: (w) => w.stopPropagation(),
13259
- onClick: (w) => w.stopPropagation(),
13258
+ onKeyDown: w,
13259
+ onMouseDown: (m) => m.stopPropagation(),
13260
+ onClick: (m) => m.stopPropagation(),
13260
13261
  classNames: {
13261
13262
  input: "brandsafe-image-overlay-input",
13262
13263
  label: "brandsafe-image-overlay-label"
@@ -13307,10 +13308,10 @@ const lr = {
13307
13308
  variant: "filled",
13308
13309
  placeholder: "e.g. d65ks6dhk7ec73f2k0dg",
13309
13310
  value: Q,
13310
- onChange: (w) => $(w.currentTarget.value),
13311
+ onChange: (m) => $(m.currentTarget.value),
13311
13312
  onBlur: f,
13312
- onKeyDown: m,
13313
- onMouseDown: (w) => w.stopPropagation()
13313
+ onKeyDown: w,
13314
+ onMouseDown: (m) => m.stopPropagation()
13314
13315
  }
13315
13316
  )
13316
13317
  ]
@@ -13380,46 +13381,46 @@ const lr = {
13380
13381
  H(() => {
13381
13382
  const T = O.current;
13382
13383
  if (!T) return;
13383
- const X = () => a(T.currentTime || 0), b = () => i(T.duration || 0);
13384
- return X(), b(), T.addEventListener("timeupdate", X), T.addEventListener("loadedmetadata", b), T.addEventListener("durationchange", b), () => {
13385
- T.removeEventListener("timeupdate", X), T.removeEventListener("loadedmetadata", b), T.removeEventListener("durationchange", b);
13384
+ const X = () => a(T.currentTime || 0), y = () => i(T.duration || 0);
13385
+ return X(), y(), T.addEventListener("timeupdate", X), T.addEventListener("loadedmetadata", y), T.addEventListener("durationchange", y), () => {
13386
+ T.removeEventListener("timeupdate", X), T.removeEventListener("loadedmetadata", y), T.removeEventListener("durationchange", y);
13386
13387
  };
13387
13388
  }, [O]);
13388
13389
  const $ = sO((T) => {
13389
- const X = O.current, b = e.current;
13390
- if (!X || !b || !Number.isFinite(X.duration) || X.duration <= 0)
13390
+ const X = O.current, y = e.current;
13391
+ if (!X || !y || !Number.isFinite(X.duration) || X.duration <= 0)
13391
13392
  return null;
13392
- const V = b.getBoundingClientRect();
13393
+ const V = y.getBoundingClientRect();
13393
13394
  if (!V.width) return null;
13394
13395
  const G = (T - V.left) / V.width;
13395
13396
  return Math.min(X.duration, Math.max(0, G * X.duration));
13396
13397
  }), c = sO((T) => {
13397
13398
  const X = $(T.clientX);
13398
13399
  if (X === null) return;
13399
- const b = O.current;
13400
- b && (b.currentTime = X, a(X));
13400
+ const y = O.current;
13401
+ y && (y.currentTime = X, a(X));
13401
13402
  }), d = sO((T) => {
13402
13403
  if (T.button !== 0) return;
13403
13404
  T.currentTarget.setPointerCapture(T.pointerId), s(!0);
13404
13405
  const X = $(T.clientX);
13405
13406
  if (X === null) return;
13406
- const b = O.current;
13407
- b && (b.currentTime = X, a(X), Q(X));
13407
+ const y = O.current;
13408
+ y && (y.currentTime = X, a(X), Q(X));
13408
13409
  }), h = sO((T) => {
13409
13410
  const X = $(T.clientX);
13410
13411
  if (X === null || (Q(X), !n)) return;
13411
- const b = O.current;
13412
- b && (b.currentTime = X, a(X));
13412
+ const y = O.current;
13413
+ y && (y.currentTime = X, a(X));
13413
13414
  }), f = sO((T) => {
13414
13415
  const X = $(T.clientX);
13415
13416
  X !== null && Q(X);
13416
13417
  }), g = sO((T) => {
13417
13418
  T.currentTarget.hasPointerCapture(T.pointerId) && T.currentTarget.releasePointerCapture(T.pointerId), s(!1);
13418
- }), m = sO(() => {
13419
+ }), w = sO(() => {
13419
13420
  n || Q(null);
13420
- }), P = tO(() => !t || t <= 0 ? 0 : Math.min(100, Math.max(0, r / t * 100)), [r, t]), y = tO(() => o === null || !t || t <= 0 ? null : Math.min(100, Math.max(0, o / t * 100)), [t, o]), w = sO((T) => {
13421
- const X = Math.max(0, Math.floor(T)), b = Math.floor(X / 60), V = X % 60;
13422
- return `${b}:${V.toString().padStart(2, "0")}`;
13421
+ }), P = tO(() => !t || t <= 0 ? 0 : Math.min(100, Math.max(0, r / t * 100)), [r, t]), R = tO(() => o === null || !t || t <= 0 ? null : Math.min(100, Math.max(0, o / t * 100)), [t, o]), m = sO((T) => {
13422
+ const X = Math.max(0, Math.floor(T)), y = Math.floor(X / 60), V = X % 60;
13423
+ return `${y}:${V.toString().padStart(2, "0")}`;
13423
13424
  });
13424
13425
  return /* @__PURE__ */ v(
13425
13426
  aO,
@@ -13434,7 +13435,7 @@ const lr = {
13434
13435
  onPointerMove: h,
13435
13436
  onPointerUp: g,
13436
13437
  onPointerCancel: g,
13437
- onPointerLeave: m,
13438
+ onPointerLeave: w,
13438
13439
  disabled: !t,
13439
13440
  "aria-label": "Seek video",
13440
13441
  "aria-valuemin": 0,
@@ -13442,12 +13443,12 @@ const lr = {
13442
13443
  "aria-valuenow": r,
13443
13444
  "aria-valuetext": t ? `${Math.round(r)} seconds of ${Math.round(t)} seconds` : "Video progress",
13444
13445
  children: [
13445
- y !== null && /* @__PURE__ */ p(
13446
+ R !== null && /* @__PURE__ */ p(
13446
13447
  aO,
13447
13448
  {
13448
13449
  className: NO.progressTooltip,
13449
- style: { left: `${y}%` },
13450
- children: w(o ?? 0)
13450
+ style: { left: `${R}%` },
13451
+ children: m(o ?? 0)
13451
13452
  }
13452
13453
  ),
13453
13454
  /* @__PURE__ */ p(
@@ -13477,18 +13478,18 @@ const lr = {
13477
13478
  videoProps: o,
13478
13479
  ...Q
13479
13480
  }) => {
13480
- const $ = VO(null), [c, d] = j(!1), [h, f] = j(a), [g, m] = j(!1), [P, y] = j(!1), {
13481
- onPlay: w,
13481
+ const $ = VO(null), [c, d] = j(!1), [h, f] = j(a), [g, w] = j(!1), [P, R] = j(!1), {
13482
+ onPlay: m,
13482
13483
  onPause: T,
13483
13484
  onVolumeChange: X,
13484
- onTimeUpdate: b,
13485
+ onTimeUpdate: y,
13485
13486
  onLoadedMetadata: V,
13486
13487
  onCanPlay: G,
13487
13488
  onDurationChange: L,
13488
13489
  onEnded: S,
13489
13490
  onError: x,
13490
13491
  ...C
13491
- } = o ?? {}, R = !!e && (g || !P), Y = sO(() => {
13492
+ } = o ?? {}, b = !!e && (g || !P), Y = sO(() => {
13492
13493
  const U = $.current;
13493
13494
  U && U.play().catch((hO) => console.error("Failed to start video playback:", hO));
13494
13495
  });
@@ -13537,7 +13538,7 @@ const lr = {
13537
13538
  ...Q,
13538
13539
  style: { overflow: "hidden", ...Q.style },
13539
13540
  children: [
13540
- R && /* @__PURE__ */ p(
13541
+ b && /* @__PURE__ */ p(
13541
13542
  aO,
13542
13543
  {
13543
13544
  component: "img",
@@ -13561,7 +13562,7 @@ const lr = {
13561
13562
  muted: h,
13562
13563
  playsInline: !0,
13563
13564
  onPlay: (U) => {
13564
- d(!0), y(!0), m(!1), w?.(U);
13565
+ d(!0), R(!0), w(!1), m?.(U);
13565
13566
  },
13566
13567
  onPause: (U) => {
13567
13568
  d(!1), T?.(U);
@@ -13570,13 +13571,13 @@ const lr = {
13570
13571
  f(U.currentTarget?.muted ?? !1), X?.(U);
13571
13572
  },
13572
13573
  onTimeUpdate: (U) => {
13573
- b?.(U);
13574
+ y?.(U);
13574
13575
  },
13575
13576
  onLoadedMetadata: (U) => {
13576
- m(!1), V?.(U);
13577
+ w(!1), V?.(U);
13577
13578
  },
13578
13579
  onCanPlay: (U) => {
13579
- m(!1), G?.(U);
13580
+ w(!1), G?.(U);
13580
13581
  },
13581
13582
  onDurationChange: (U) => {
13582
13583
  L?.(U);
@@ -13585,7 +13586,7 @@ const lr = {
13585
13586
  d(!1), S?.(U);
13586
13587
  },
13587
13588
  onError: (U) => {
13588
- m(!0), d(!1), x?.(U);
13589
+ w(!0), d(!1), x?.(U);
13589
13590
  },
13590
13591
  ...C
13591
13592
  }
@@ -14473,9 +14474,9 @@ const wf = qi.TodoList.extend({
14473
14474
  },
14474
14475
  [r, t]
14475
14476
  ), d = M(
14476
- (T, X, b) => {
14477
+ (T, X, y) => {
14477
14478
  const V = Q.map((G) => [...G]);
14478
- V[T][X] = b, $(V), c(V);
14479
+ V[T][X] = y, $(V), c(V);
14479
14480
  },
14480
14481
  [Q, c]
14481
14482
  ), h = M(() => {
@@ -14484,17 +14485,17 @@ const wf = qi.TodoList.extend({
14484
14485
  }, [Q, o, c]), f = M(
14485
14486
  (T) => {
14486
14487
  if (Q.length <= 1) return;
14487
- const X = Q.filter((b, V) => V !== T);
14488
+ const X = Q.filter((y, V) => V !== T);
14488
14489
  $(X), c(X);
14489
14490
  },
14490
14491
  [Q, c]
14491
14492
  ), g = M(() => {
14492
14493
  const T = Q.map((X) => [...X, ""]);
14493
14494
  $(T), c(T);
14494
- }, [Q, c]), m = M(
14495
+ }, [Q, c]), w = M(
14495
14496
  (T) => {
14496
14497
  if (o <= 1) return;
14497
- const X = Q.map((b) => b.filter((V, G) => G !== T));
14498
+ const X = Q.map((y) => y.filter((V, G) => G !== T));
14498
14499
  $(X), c(X);
14499
14500
  },
14500
14501
  [Q, o, c]
@@ -14516,8 +14517,8 @@ const wf = qi.TodoList.extend({
14516
14517
  withColumnBorders: !0,
14517
14518
  children: [
14518
14519
  n.caption && /* @__PURE__ */ p(K.Caption, { children: n.caption }),
14519
- T && /* @__PURE__ */ p(K.Thead, { children: /* @__PURE__ */ p(K.Tr, { children: T.map((b, V) => /* @__PURE__ */ p(K.Th, { children: b }, V)) }) }),
14520
- /* @__PURE__ */ p(K.Tbody, { children: X.map((b, V) => /* @__PURE__ */ p(K.Tr, { children: b.map((G, L) => /* @__PURE__ */ p(K.Td, { children: G }, L)) }, V)) })
14520
+ T && /* @__PURE__ */ p(K.Thead, { children: /* @__PURE__ */ p(K.Tr, { children: T.map((y, V) => /* @__PURE__ */ p(K.Th, { children: y }, V)) }) }),
14521
+ /* @__PURE__ */ p(K.Tbody, { children: X.map((y, V) => /* @__PURE__ */ p(K.Tr, { children: y.map((G, L) => /* @__PURE__ */ p(K.Td, { children: G }, L)) }, V)) })
14521
14522
  ]
14522
14523
  }
14523
14524
  ),
@@ -14526,7 +14527,7 @@ const wf = qi.TodoList.extend({
14526
14527
  }
14527
14528
  );
14528
14529
  }
14529
- const P = n.withHeaderRow ? Q[0] : void 0, y = n.withHeaderRow ? 1 : 0, w = Q.slice(y);
14530
+ const P = n.withHeaderRow ? Q[0] : void 0, R = n.withHeaderRow ? 1 : 0, m = Q.slice(R);
14530
14531
  return /* @__PURE__ */ v(
14531
14532
  "div",
14532
14533
  {
@@ -14552,9 +14553,9 @@ const wf = qi.TodoList.extend({
14552
14553
  minRows: 1,
14553
14554
  value: T,
14554
14555
  placeholder: `Header ${X + 1}`,
14555
- onChange: (b) => d(0, X, b.currentTarget.value),
14556
- onMouseDown: (b) => b.stopPropagation(),
14557
- onKeyDown: (b) => b.stopPropagation(),
14556
+ onChange: (y) => d(0, X, y.currentTarget.value),
14557
+ onMouseDown: (y) => y.stopPropagation(),
14558
+ onKeyDown: (y) => y.stopPropagation(),
14558
14559
  styles: { input: { fontWeight: 700, resize: "none" } }
14559
14560
  }
14560
14561
  ) }, X)),
@@ -14564,7 +14565,7 @@ const wf = qi.TodoList.extend({
14564
14565
  size: "xs",
14565
14566
  variant: "subtle",
14566
14567
  color: "red",
14567
- onClick: () => m(o - 1),
14568
+ onClick: () => w(o - 1),
14568
14569
  disabled: o <= 1,
14569
14570
  children: /* @__PURE__ */ p(
14570
14571
  rO,
@@ -14576,8 +14577,8 @@ const wf = qi.TodoList.extend({
14576
14577
  }
14577
14578
  ) }) })
14578
14579
  ] }) }),
14579
- /* @__PURE__ */ p(K.Tbody, { children: w.map((T, X) => {
14580
- const b = X + y;
14580
+ /* @__PURE__ */ p(K.Tbody, { children: m.map((T, X) => {
14581
+ const y = X + R;
14581
14582
  return /* @__PURE__ */ v(K.Tr, { children: [
14582
14583
  T.map((V, G) => /* @__PURE__ */ p(K.Td, { children: /* @__PURE__ */ p(
14583
14584
  la,
@@ -14588,7 +14589,7 @@ const wf = qi.TodoList.extend({
14588
14589
  minRows: 1,
14589
14590
  value: V,
14590
14591
  placeholder: "…",
14591
- onChange: (L) => d(b, G, L.currentTarget.value),
14592
+ onChange: (L) => d(y, G, L.currentTarget.value),
14592
14593
  onMouseDown: (L) => L.stopPropagation(),
14593
14594
  onKeyDown: (L) => L.stopPropagation(),
14594
14595
  styles: { input: { resize: "none" } }
@@ -14600,7 +14601,7 @@ const wf = qi.TodoList.extend({
14600
14601
  size: "xs",
14601
14602
  variant: "subtle",
14602
14603
  color: "red",
14603
- onClick: () => f(b),
14604
+ onClick: () => f(y),
14604
14605
  disabled: Q.length <= 1,
14605
14606
  children: /* @__PURE__ */ p(
14606
14607
  rO,
@@ -14611,7 +14612,7 @@ const wf = qi.TodoList.extend({
14611
14612
  )
14612
14613
  }
14613
14614
  ) }) })
14614
- ] }, b);
14615
+ ] }, y);
14615
14616
  }) })
14616
14617
  ]
14617
14618
  }
@@ -14804,29 +14805,29 @@ const zn = {
14804
14805
  c(n.title);
14805
14806
  }, [n.title]);
14806
14807
  const h = M(
14807
- (y) => {
14808
+ (R) => {
14808
14809
  KO.updateElement(r, {
14809
14810
  blockId: t,
14810
14811
  type: "surreal-codeblock",
14811
- props: y
14812
+ props: R
14812
14813
  });
14813
14814
  },
14814
14815
  [r, t]
14815
14816
  ), f = M(
14816
- (y) => {
14817
- Q(y), h({ code: y });
14817
+ (R) => {
14818
+ Q(R), h({ code: R });
14818
14819
  },
14819
14820
  [h]
14820
14821
  ), g = M(
14821
- (y) => {
14822
- f(y.currentTarget.value);
14822
+ (R) => {
14823
+ f(R.currentTarget.value);
14823
14824
  },
14824
14825
  [f]
14825
- ), m = M((y) => {
14826
- if (y.stopPropagation(), y.key === "Tab") {
14827
- y.preventDefault();
14828
- const w = y.currentTarget, T = w.selectionStart, X = w.selectionEnd, b = w.value, V = `${b.substring(0, T)} ${b.substring(X)}`;
14829
- w.value = V, w.selectionStart = w.selectionEnd = T + 1, Q(V);
14826
+ ), w = M((R) => {
14827
+ if (R.stopPropagation(), R.key === "Tab") {
14828
+ R.preventDefault();
14829
+ const m = R.currentTarget, T = m.selectionStart, X = m.selectionEnd, y = m.value, V = `${y.substring(0, T)} ${y.substring(X)}`;
14830
+ m.value = V, m.selectionStart = m.selectionEnd = T + 1, Q(V);
14830
14831
  }
14831
14832
  }, []), P = M(() => {
14832
14833
  f(o);
@@ -14871,8 +14872,8 @@ const zn = {
14871
14872
  py: "xs",
14872
14873
  gap: "xs",
14873
14874
  wrap: "nowrap",
14874
- onMouseDown: (y) => y.stopPropagation(),
14875
- onKeyDown: (y) => y.stopPropagation(),
14875
+ onMouseDown: (R) => R.stopPropagation(),
14876
+ onKeyDown: (R) => R.stopPropagation(),
14876
14877
  style: { background: "var(--surreal-glass-subtle)" },
14877
14878
  children: [
14878
14879
  /* @__PURE__ */ p(
@@ -14882,9 +14883,9 @@ const zn = {
14882
14883
  variant: "unstyled",
14883
14884
  placeholder: "Untitled",
14884
14885
  value: $,
14885
- onChange: (y) => {
14886
- const w = y.currentTarget.value;
14887
- c(w), h({ title: w });
14886
+ onChange: (R) => {
14887
+ const m = R.currentTarget.value;
14888
+ c(m), h({ title: m });
14888
14889
  },
14889
14890
  styles: {
14890
14891
  input: {
@@ -14903,8 +14904,8 @@ const zn = {
14903
14904
  variant: "filled",
14904
14905
  data: d,
14905
14906
  value: n.language,
14906
- onChange: (y) => {
14907
- y && h({ language: y });
14907
+ onChange: (R) => {
14908
+ R && h({ language: R });
14908
14909
  },
14909
14910
  comboboxProps: { withinPortal: !0 },
14910
14911
  allowDeselect: !1,
@@ -14925,7 +14926,7 @@ const zn = {
14925
14926
  {
14926
14927
  size: "xs",
14927
14928
  checked: n.withLineNumbers,
14928
- onChange: (y) => h({ withLineNumbers: y.currentTarget.checked })
14929
+ onChange: (R) => h({ withLineNumbers: R.currentTarget.checked })
14929
14930
  }
14930
14931
  )
14931
14932
  }
@@ -14961,7 +14962,7 @@ const zn = {
14961
14962
  ref: s,
14962
14963
  value: o,
14963
14964
  onChange: g,
14964
- onKeyDown: m,
14965
+ onKeyDown: w,
14965
14966
  onBlur: P,
14966
14967
  placeholder: "Enter code...",
14967
14968
  spellCheck: !1,
@@ -16266,12 +16267,12 @@ function gS(O, e, t) {
16266
16267
  if (s.push(V1(O.children[$], h, c)), $ === r)
16267
16268
  s.push(oO(e, t, h, c)), s.push(oO(f, c, g, t));
16268
16269
  else {
16269
- const m = c - t;
16270
+ const w = c - t;
16270
16271
  s.push(
16271
16272
  /* @__PURE__ */ p(
16272
16273
  "path",
16273
16274
  {
16274
- d: `M ${e} ${t} ${ce(_, m > 0 ? _ : -_)} L ${e + _} ${c - (m > 0 ? _ : -_)} ${ue(_, m > 0 ? _ : -_)}`
16275
+ d: `M ${e} ${t} ${ce(_, w > 0 ? _ : -_)} L ${e + _} ${c - (w > 0 ? _ : -_)} ${ue(_, w > 0 ? _ : -_)}`
16275
16276
  },
16276
16277
  eO()
16277
16278
  )
@@ -16281,7 +16282,7 @@ function gS(O, e, t) {
16281
16282
  /* @__PURE__ */ p(
16282
16283
  "path",
16283
16284
  {
16284
- d: `M ${P} ${c} ${ce(_, m > 0 ? -_ : _)} L ${g - _} ${t + (m > 0 ? _ : -_)} ${ue(_, m > 0 ? -_ : _)}`
16285
+ d: `M ${P} ${c} ${ce(_, w > 0 ? -_ : _)} L ${g - _} ${t + (w > 0 ? _ : -_)} ${ue(_, w > 0 ? -_ : _)}`
16285
16286
  },
16286
16287
  eO()
16287
16288
  )
@@ -16397,7 +16398,7 @@ function tm({
16397
16398
  selectProps: Q,
16398
16399
  ...$
16399
16400
  }) {
16400
- const c = typeof r == "number" ? `${r}px` : r, d = n ?? (a === "above" ? `(min-width: ${c})` : `(max-width: ${c})`), h = P5(d), f = (P) => typeof P.selectLabel == "string" ? P.selectLabel : typeof P.label == "string" || typeof P.label == "number" ? String(P.label) : P.value, [g, m] = f5({
16401
+ const c = typeof r == "number" ? `${r}px` : r, d = n ?? (a === "above" ? `(min-width: ${c})` : `(max-width: ${c})`), h = P5(d), f = (P) => typeof P.selectLabel == "string" ? P.selectLabel : typeof P.label == "string" || typeof P.label == "number" ? String(P.label) : P.value, [g, w] = f5({
16401
16402
  value: e,
16402
16403
  defaultValue: t,
16403
16404
  finalValue: O[0]?.value ?? null,
@@ -16405,11 +16406,11 @@ function tm({
16405
16406
  });
16406
16407
  return H(() => {
16407
16408
  if (O.length === 0) {
16408
- g !== null && m(null);
16409
+ g !== null && w(null);
16409
16410
  return;
16410
16411
  }
16411
- O.some((P) => P.value === g) || m(O[0].value);
16412
- }, [O, g, m]), h ? /* @__PURE__ */ p(
16412
+ O.some((P) => P.value === g) || w(O[0].value);
16413
+ }, [O, g, w]), h ? /* @__PURE__ */ p(
16413
16414
  r1,
16414
16415
  {
16415
16416
  data: O.map((P) => ({
@@ -16417,7 +16418,7 @@ function tm({
16417
16418
  label: f(P)
16418
16419
  })),
16419
16420
  value: g,
16420
- onChange: m,
16421
+ onChange: w,
16421
16422
  allowDeselect: !1,
16422
16423
  miw: 220,
16423
16424
  flex: { base: "1 1 100%", sm: "unset" },
@@ -16427,7 +16428,7 @@ function tm({
16427
16428
  Ve,
16428
16429
  {
16429
16430
  value: g,
16430
- onChange: m,
16431
+ onChange: w,
16431
16432
  ...$,
16432
16433
  children: /* @__PURE__ */ p(Z2, { ...s, children: O.map((P) => /* @__PURE__ */ p(
16433
16434
  y2,