@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.css +1 -1
- package/dist/ui.js +242 -241
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
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,
|
|
1796
|
-
let { id: x, start: C, end:
|
|
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 (
|
|
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,
|
|
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 =
|
|
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,
|
|
1824
|
+
U = Zr(Q1, bO, HO, 0, bO.length, 0, b - C, ta, ta);
|
|
1825
1825
|
} else
|
|
1826
|
-
U = g(Q1, bO, HO,
|
|
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,
|
|
1830
|
+
function d(X, y, V, G) {
|
|
1831
1831
|
let L = [], S = 0, x = -1;
|
|
1832
|
-
for (; s.pos >
|
|
1833
|
-
let { id: C, start:
|
|
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 &&
|
|
1837
|
+
if (x > -1 && b < x)
|
|
1838
1838
|
break;
|
|
1839
|
-
x < 0 && (x = Y - r), L.push(C,
|
|
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),
|
|
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] -
|
|
1846
|
-
V.push(new k1(C, L[2] -
|
|
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,
|
|
1849
|
+
function h(X, y) {
|
|
1850
1850
|
return (V, G, L) => {
|
|
1851
|
-
let S = 0, x = V.length - 1, C,
|
|
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
|
-
(
|
|
1855
|
+
(b = C.prop(I.lookAhead)) && (S = G[x] + C.length + b);
|
|
1856
1856
|
}
|
|
1857
|
-
return g(X, V, G, L, S,
|
|
1857
|
+
return g(X, V, G, L, S, y);
|
|
1858
1858
|
};
|
|
1859
1859
|
}
|
|
1860
|
-
function f(X,
|
|
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(
|
|
1864
|
-
X.push(g(i.types[x], Y, N, S - L, C - S,
|
|
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,
|
|
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,
|
|
1875
|
+
return new QO(X, y, V, G, x);
|
|
1876
1876
|
}
|
|
1877
|
-
function
|
|
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
|
|
1879
|
+
O: for (let b = V.pos - X; V.pos > b; ) {
|
|
1880
1880
|
let Y = V.size;
|
|
1881
|
-
if (V.id ==
|
|
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 <
|
|
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 (
|
|
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,
|
|
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
|
|
1908
|
-
for (; s.pos >
|
|
1909
|
-
V = P(X,
|
|
1907
|
+
let b = s.pos - (x - 4);
|
|
1908
|
+
for (; s.pos > b; )
|
|
1909
|
+
V = P(X, y, V);
|
|
1910
1910
|
}
|
|
1911
|
-
|
|
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
|
|
1915
|
+
let R = [], m = [];
|
|
1916
1916
|
for (; s.pos > 0; )
|
|
1917
|
-
c(O.start || 0, O.bufferStart || 0,
|
|
1918
|
-
let T = (e = O.length) !== null && e !== void 0 ? e :
|
|
1919
|
-
return new QO(o[O.topID],
|
|
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,
|
|
1948
|
-
for (let
|
|
1949
|
-
let T =
|
|
1950
|
-
for (
|
|
1951
|
-
let V = ft(O, f[
|
|
1952
|
-
if (
|
|
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
|
-
|
|
1954
|
+
y += V;
|
|
1955
1955
|
}
|
|
1956
|
-
if (
|
|
1957
|
-
if (
|
|
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] +
|
|
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[
|
|
1965
|
-
c.push(Zr(O, f, g, T,
|
|
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 +
|
|
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
|
|
2211
|
-
Sa(n, $,
|
|
2212
|
-
let
|
|
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(
|
|
2215
|
-
return P.push(X),
|
|
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((
|
|
2549
|
-
for (let
|
|
2550
|
-
let
|
|
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 >=
|
|
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 (!
|
|
2554
|
+
if (!R || m > i)
|
|
2555
2555
|
break;
|
|
2556
|
-
P =
|
|
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\.]/,
|
|
3067
|
-
function
|
|
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
|
|
3071
|
-
if (
|
|
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(
|
|
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(
|
|
3093
|
-
S.eatWhile(
|
|
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) ||
|
|
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
|
|
3100
|
-
if (Y == S && !
|
|
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
|
-
|
|
3104
|
+
b = !b && Y == "\\";
|
|
3105
3105
|
}
|
|
3106
|
-
return (N || !(
|
|
3106
|
+
return (N || !(b || $)) && (C.tokenize = null), "string";
|
|
3107
3107
|
};
|
|
3108
3108
|
}
|
|
3109
3109
|
function G(S, x) {
|
|
3110
|
-
for (var C = !1,
|
|
3111
|
-
if (
|
|
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 =
|
|
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
|
|
3139
|
-
if (
|
|
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 (
|
|
3150
|
-
var Y = Q.token(S, x,
|
|
3151
|
-
Y !== void 0 && (
|
|
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
|
|
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 !=
|
|
3156
|
+
if (S.tokenize != y && S.tokenize != null || S.typeAtEndOfLine && li(S.context))
|
|
3157
3157
|
return null;
|
|
3158
|
-
var
|
|
3159
|
-
if (
|
|
3160
|
-
for (;
|
|
3161
|
-
|
|
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,
|
|
3163
|
+
var xO = Q.indent(S, b, x, C.unit);
|
|
3164
3164
|
if (typeof xO == "number") return xO;
|
|
3165
3165
|
}
|
|
3166
|
-
var Q1 =
|
|
3166
|
+
var Q1 = b.prev && b.prev.info == "switch";
|
|
3167
3167
|
if (O.allmanIndentation && /[{(]/.test(Y)) {
|
|
3168
|
-
for (;
|
|
3169
|
-
return
|
|
3168
|
+
for (; b.type != "top" && b.type != "}"; ) b = b.prev;
|
|
3169
|
+
return b.indented;
|
|
3170
3170
|
}
|
|
3171
|
-
return
|
|
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],
|
|
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 ($ >=
|
|
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),
|
|
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),
|
|
7380
|
+
d?.(x), R.current = x;
|
|
7381
7381
|
}
|
|
7382
|
-
}),
|
|
7382
|
+
}), y = tO(
|
|
7383
7383
|
() => ({
|
|
7384
7384
|
extensions: [
|
|
7385
7385
|
ie.updateListener.of(X),
|
|
7386
|
-
|
|
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
|
-
|
|
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(
|
|
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 (!
|
|
7412
|
+
if (!w.current) return;
|
|
7413
7413
|
const S = new ie({
|
|
7414
|
-
parent:
|
|
7414
|
+
parent: w.current,
|
|
7415
7415
|
scrollTo: ie.scrollIntoView(0),
|
|
7416
|
-
state: Ze.create(
|
|
7416
|
+
state: Ze.create(y)
|
|
7417
7417
|
});
|
|
7418
7418
|
return P.current = S, g(!0), Q?.(S), () => {
|
|
7419
|
-
S.destroy(), P.current = null,
|
|
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:
|
|
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
|
-
(
|
|
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
|
-
),
|
|
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,
|
|
7652
|
+
(P, R) => {
|
|
7653
7653
|
d.push(
|
|
7654
7654
|
/* @__PURE__ */ p(
|
|
7655
7655
|
"span",
|
|
7656
7656
|
{
|
|
7657
|
-
style: { color:
|
|
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
|
-
|
|
7665
|
+
w();
|
|
7666
7666
|
}
|
|
7667
|
-
), d.length > 0 &&
|
|
7668
|
-
`).forEach((
|
|
7669
|
-
d = [/* @__PURE__ */ p("span", { children:
|
|
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,
|
|
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
|
|
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
|
-
|
|
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
|
|
8507
|
+
const m = w();
|
|
8508
8508
|
return /* @__PURE__ */ p(
|
|
8509
|
-
|
|
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
|
|
8517
|
+
const R = w();
|
|
8518
8518
|
return /* @__PURE__ */ p(
|
|
8519
|
-
|
|
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
|
|
9974
|
-
|
|
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,
|
|
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,
|
|
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),
|
|
12034
|
-
if (
|
|
12035
|
-
const P = g.slice(0,
|
|
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],
|
|
12049
|
-
if (
|
|
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 (
|
|
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
|
|
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
|
|
12938
|
-
if (!
|
|
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
|
|
12949
|
-
if (
|
|
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(
|
|
12956
|
+
c.push(GP(T));
|
|
12956
12957
|
else {
|
|
12957
|
-
const { content:
|
|
12958
|
-
c.push(
|
|
12958
|
+
const { content: X, checked: y } = UP(T);
|
|
12959
|
+
c.push(X), d = y;
|
|
12959
12960
|
}
|
|
12960
12961
|
h++;
|
|
12961
|
-
} else if (
|
|
12962
|
-
c.push(
|
|
12962
|
+
} else if (m.length - m.trimStart().length > f)
|
|
12963
|
+
c.push(m), h++;
|
|
12963
12964
|
else
|
|
12964
12965
|
break;
|
|
12965
12966
|
}
|
|
12966
|
-
const
|
|
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 (
|
|
12976
|
-
Se(
|
|
12977
|
-
const
|
|
12976
|
+
for (P.currentContainer = P.root; P.currentIndex < P.lines.length; )
|
|
12977
|
+
Se(P);
|
|
12978
|
+
const R = {
|
|
12978
12979
|
type: "listItem",
|
|
12979
|
-
children:
|
|
12980
|
+
children: P.root
|
|
12980
12981
|
};
|
|
12981
|
-
d !== void 0 && (
|
|
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
|
|
13173
|
-
|
|
13173
|
+
const m = Q.trim();
|
|
13174
|
+
m !== n.code && KO.updateElement(r, {
|
|
13174
13175
|
blockId: t,
|
|
13175
13176
|
type: "brandsafe-image",
|
|
13176
|
-
props: { code:
|
|
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]),
|
|
13181
|
-
(
|
|
13182
|
-
|
|
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: (
|
|
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: (
|
|
13242
|
-
|
|
13242
|
+
onMouseEnter: (m) => {
|
|
13243
|
+
m.currentTarget.style.opacity = "1";
|
|
13243
13244
|
},
|
|
13244
|
-
onMouseLeave: (
|
|
13245
|
-
s || (
|
|
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: (
|
|
13256
|
+
onChange: (m) => $(m.currentTarget.value),
|
|
13256
13257
|
onBlur: f,
|
|
13257
|
-
onKeyDown:
|
|
13258
|
-
onMouseDown: (
|
|
13259
|
-
onClick: (
|
|
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: (
|
|
13311
|
+
onChange: (m) => $(m.currentTarget.value),
|
|
13311
13312
|
onBlur: f,
|
|
13312
|
-
onKeyDown:
|
|
13313
|
-
onMouseDown: (
|
|
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),
|
|
13384
|
-
return X(),
|
|
13385
|
-
T.removeEventListener("timeupdate", X), T.removeEventListener("loadedmetadata",
|
|
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,
|
|
13390
|
-
if (!X || !
|
|
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 =
|
|
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
|
|
13400
|
-
|
|
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
|
|
13407
|
-
|
|
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
|
|
13412
|
-
|
|
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
|
-
}),
|
|
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]),
|
|
13421
|
-
const X = Math.max(0, Math.floor(T)),
|
|
13422
|
-
return `${
|
|
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:
|
|
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
|
-
|
|
13446
|
+
R !== null && /* @__PURE__ */ p(
|
|
13446
13447
|
aO,
|
|
13447
13448
|
{
|
|
13448
13449
|
className: NO.progressTooltip,
|
|
13449
|
-
style: { left: `${
|
|
13450
|
-
children:
|
|
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,
|
|
13481
|
-
onPlay:
|
|
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:
|
|
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 ?? {},
|
|
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
|
-
|
|
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),
|
|
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
|
-
|
|
13574
|
+
y?.(U);
|
|
13574
13575
|
},
|
|
13575
13576
|
onLoadedMetadata: (U) => {
|
|
13576
|
-
|
|
13577
|
+
w(!1), V?.(U);
|
|
13577
13578
|
},
|
|
13578
13579
|
onCanPlay: (U) => {
|
|
13579
|
-
|
|
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
|
-
|
|
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,
|
|
14477
|
+
(T, X, y) => {
|
|
14477
14478
|
const V = Q.map((G) => [...G]);
|
|
14478
|
-
V[T][X] =
|
|
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((
|
|
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]),
|
|
14495
|
+
}, [Q, c]), w = M(
|
|
14495
14496
|
(T) => {
|
|
14496
14497
|
if (o <= 1) return;
|
|
14497
|
-
const X = Q.map((
|
|
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((
|
|
14520
|
-
/* @__PURE__ */ p(K.Tbody, { children: X.map((
|
|
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,
|
|
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: (
|
|
14556
|
-
onMouseDown: (
|
|
14557
|
-
onKeyDown: (
|
|
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: () =>
|
|
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:
|
|
14580
|
-
const
|
|
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(
|
|
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(
|
|
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
|
-
] },
|
|
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
|
-
(
|
|
14808
|
+
(R) => {
|
|
14808
14809
|
KO.updateElement(r, {
|
|
14809
14810
|
blockId: t,
|
|
14810
14811
|
type: "surreal-codeblock",
|
|
14811
|
-
props:
|
|
14812
|
+
props: R
|
|
14812
14813
|
});
|
|
14813
14814
|
},
|
|
14814
14815
|
[r, t]
|
|
14815
14816
|
), f = M(
|
|
14816
|
-
(
|
|
14817
|
-
Q(
|
|
14817
|
+
(R) => {
|
|
14818
|
+
Q(R), h({ code: R });
|
|
14818
14819
|
},
|
|
14819
14820
|
[h]
|
|
14820
14821
|
), g = M(
|
|
14821
|
-
(
|
|
14822
|
-
f(
|
|
14822
|
+
(R) => {
|
|
14823
|
+
f(R.currentTarget.value);
|
|
14823
14824
|
},
|
|
14824
14825
|
[f]
|
|
14825
|
-
),
|
|
14826
|
-
if (
|
|
14827
|
-
|
|
14828
|
-
const
|
|
14829
|
-
|
|
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: (
|
|
14875
|
-
onKeyDown: (
|
|
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: (
|
|
14886
|
-
const
|
|
14887
|
-
c(
|
|
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: (
|
|
14907
|
-
|
|
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: (
|
|
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:
|
|
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
|
|
16270
|
+
const w = c - t;
|
|
16270
16271
|
s.push(
|
|
16271
16272
|
/* @__PURE__ */ p(
|
|
16272
16273
|
"path",
|
|
16273
16274
|
{
|
|
16274
|
-
d: `M ${e} ${t} ${ce(_,
|
|
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(_,
|
|
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,
|
|
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 &&
|
|
16409
|
+
g !== null && w(null);
|
|
16409
16410
|
return;
|
|
16410
16411
|
}
|
|
16411
|
-
O.some((P) => P.value === g) ||
|
|
16412
|
-
}, [O, g,
|
|
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:
|
|
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:
|
|
16431
|
+
onChange: w,
|
|
16431
16432
|
...$,
|
|
16432
16433
|
children: /* @__PURE__ */ p(Z2, { ...s, children: O.map((P) => /* @__PURE__ */ p(
|
|
16433
16434
|
y2,
|