@fileverse-dev/ddoc 5.1.12 → 5.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var n0 = Object.defineProperty;
|
|
2
2
|
var r0 = (e, t, r) => t in e ? n0(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var
|
|
3
|
+
var fe = (e, t, r) => r0(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { jsx as f, jsxs as U, Fragment as Bt } from "react/jsx-runtime";
|
|
5
5
|
import { P as io, a as ao, i as Zd, p as Qd, N as o0, C as s0, E as co, g as i0, b as a0, u as Jd, c as He, l as c0, d as ef, B as l0, M as u0, e as vc, f as d0, h as Ui, s as f0, j as h0, k as p0, m as m0, n as tf, w as Pi, o as g0, t as y0, q as x0, r as Ht, v as ae, x as Fn, y as nf, z as lo, A as si, D as Vo, F as w0, G as b0, H as v0, L as C0, I as rf, J as E0, K as $o, O as _a, Q as ht, S as S0, R as Ra, T as D0, U as It, V as A0, W as of, X as k0, Y as T0, Z as sf, _ as $r, $ as N0, a0 as _0, a1 as af, a2 as Cc, a3 as Ec, a4 as cf, a5 as R0, a6 as I0, a7 as Sc, a8 as B0, a9 as O0, aa as L0, ab as M0, ac as lf, ad as F0, ae as U0, af as P0, ag as hs, ah as H0, ai as Hi, aj as z0, ak as K0, al as qt, am as j0, an as Ml, ao as V0, ap as $0, aq as q0, ar as W0, as as Sr, at as uf, au as Dc, av as G0, aw as Lo, ax as Y0, ay as ii, az as X0, aA as Z0, aB as Q0, aC as J0, aD as eg, aE as df, aF as qo, aG as ff, aH as hf, aI as Ro, aJ as tg, aK as Ia, aL as Fl, aM as Ul, aN as Lt, aO as ng, aP as rg, aQ as og, aR as pf, aS as sg, aT as ig, aU as ag, aV as cg, aW as lg, aX as ug, aY as dg, aZ as fg, a_ as hg, a$ as pg, b0 as mg, b1 as gg, b2 as yg, b3 as xg, b4 as zi, b5 as mf, b6 as gf, b7 as wg, b8 as Tn, b9 as Fs, ba as Rt, bb as Ac, bc as Pl, bd as Ki, be as bg, bf as vg, bg as Cg, bh as Xt, bi as Eg, bj as Sg, bk as Dg, bl as Ag, bm as kg, bn as Tg, bo as ir, bp as Ng, bq as Hl, br as Mo, bs as kc, bt as _g, bu as Rg, bv as Ig, bw as Tc, bx as Bg, by as Og, bz as Us, bA as ji, bB as Wo, bC as Lg, bD as Mg, bE as Fg, bF as vo, bG as Ug, bH as Pg, bI as Hg, bJ as zg, bK as Kg, bL as jg, bM as Vg, bN as $g, bO as qg, bP as Wg, bQ as Gg, bR as Ba, bS as Oa, bT as Yg, bU as Xg, bV as Zg, bW as Qg, bX as Jg, bY as ey, bZ as zl, b_ as ty, b$ as ny, c0 as ry, c1 as Kl, c2 as oy, c3 as sy, c4 as iy, c5 as ay, c6 as cy, c7 as ly, c8 as uy, c9 as dy, ca as yf, cb as fy, cc as hy } from "./use-headless-editor-DQoc0Oo1.mjs";
|
|
6
|
-
import { cd as
|
|
6
|
+
import { cd as WD, ce as GD } from "./use-headless-editor-DQoc0Oo1.mjs";
|
|
7
7
|
import * as Nt from "react";
|
|
8
8
|
import St, { useRef as ie, useEffect as le, useState as pe, useCallback as ee, useMemo as Ze, forwardRef as Qt, useReducer as py, useLayoutEffect as Xr, memo as ai, createElement as La, lazy as xf, Suspense as jl, useImperativeHandle as wf } from "react";
|
|
9
9
|
import { createPortal as ci } from "react-dom";
|
|
@@ -5140,7 +5140,7 @@ const vx = ({
|
|
|
5140
5140
|
});
|
|
5141
5141
|
}, kr = class kr {
|
|
5142
5142
|
constructor() {
|
|
5143
|
-
|
|
5143
|
+
fe(this, "_currentZoom", "1");
|
|
5144
5144
|
}
|
|
5145
5145
|
static getInstance() {
|
|
5146
5146
|
return kr.instance || (kr.instance = new kr()), kr.instance;
|
|
@@ -5169,7 +5169,7 @@ const vx = ({
|
|
|
5169
5169
|
), !window.matchMedia("(max-width: 1280px)").matches && r in n && t.classList.add(n[r]);
|
|
5170
5170
|
}
|
|
5171
5171
|
};
|
|
5172
|
-
|
|
5172
|
+
fe(kr, "instance");
|
|
5173
5173
|
let Pa = kr;
|
|
5174
5174
|
const qi = Pa.getInstance();
|
|
5175
5175
|
var Kt = typeof globalThis < "u" && globalThis || typeof self < "u" && self || // eslint-disable-next-line no-undef
|
|
@@ -6921,14 +6921,14 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
6921
6921
|
}), { handleCommentInteraction: oe, handleCommentClick: se } = E1({
|
|
6922
6922
|
isFocusMode: d,
|
|
6923
6923
|
onCommentInteraction: h
|
|
6924
|
-
}),
|
|
6924
|
+
}), he = ie(d);
|
|
6925
6925
|
le(() => {
|
|
6926
|
-
|
|
6926
|
+
he.current = d;
|
|
6927
6927
|
}, [d]);
|
|
6928
6928
|
const Te = ee(
|
|
6929
6929
|
(Ie, Be) => {
|
|
6930
6930
|
var Je;
|
|
6931
|
-
if (!Co(Ie, ye.current) ||
|
|
6931
|
+
if (!Co(Ie, ye.current) || he.current)
|
|
6932
6932
|
return !1;
|
|
6933
6933
|
const qe = Zi(Be.target), Le = qe == null ? void 0 : qe.closest(
|
|
6934
6934
|
"[data-suggestion-id][data-comment-id]"
|
|
@@ -11765,8 +11765,8 @@ var $h = {};
|
|
|
11765
11765
|
B[m] = G[m] - P[m];
|
|
11766
11766
|
}
|
|
11767
11767
|
function w(B, G, P) {
|
|
11768
|
-
let m, H, re = 0, Z = 0, ce = 0, de = 0, Ae = 0, ke = 0, ye = 0, ge = 0, we = 0, Ue = 0, Ee = 0, ze = 0, be = 0, We = 0, C = 0, O = 0, j = 0, Q = 0, ne = 0, J = 0, oe = 0, se = 0,
|
|
11769
|
-
m = G[0], re += m * Et, Z += m * me, ce += m * Dt, de += m * bt, Ae += m * gt, ke += m * At, ye += m * Pe, ge += m * Me, we += m * tt, Ue += m * De, Ee += m * st, ze += m * nt, be += m * it, We += m * ft, C += m * Ne, O += m * ct, m = G[1], Z += m * Et, ce += m * me, de += m * Dt, Ae += m * bt, ke += m * gt, ye += m * At, ge += m * Pe, we += m * Me, Ue += m * tt, Ee += m * De, ze += m * st, be += m * nt, We += m * it, C += m * ft, O += m * Ne, j += m * ct, m = G[2], ce += m * Et, de += m * me, Ae += m * Dt, ke += m * bt, ye += m * gt, ge += m * At, we += m * Pe, Ue += m * Me, Ee += m * tt, ze += m * De, be += m * st, We += m * nt, C += m * it, O += m * ft, j += m * Ne, Q += m * ct, m = G[3], de += m * Et, Ae += m * me, ke += m * Dt, ye += m * bt, ge += m * gt, we += m * At, Ue += m * Pe, Ee += m * Me, ze += m * tt, be += m * De, We += m * st, C += m * nt, O += m * it, j += m * ft, Q += m * Ne, ne += m * ct, m = G[4], Ae += m * Et, ke += m * me, ye += m * Dt, ge += m * bt, we += m * gt, Ue += m * At, Ee += m * Pe, ze += m * Me, be += m * tt, We += m * De, C += m * st, O += m * nt, j += m * it, Q += m * ft, ne += m * Ne, J += m * ct, m = G[5], ke += m * Et, ye += m * me, ge += m * Dt, we += m * bt, Ue += m * gt, Ee += m * At, ze += m * Pe, be += m * Me, We += m * tt, C += m * De, O += m * st, j += m * nt, Q += m * it, ne += m * ft, J += m * Ne, oe += m * ct, m = G[6], ye += m * Et, ge += m * me, we += m * Dt, Ue += m * bt, Ee += m * gt, ze += m * At, be += m * Pe, We += m * Me, C += m * tt, O += m * De, j += m * st, Q += m * nt, ne += m * it, J += m * ft, oe += m * Ne, se += m * ct, m = G[7], ge += m * Et, we += m * me, Ue += m * Dt, Ee += m * bt, ze += m * gt, be += m * At, We += m * Pe, C += m * Me, O += m * tt, j += m * De, Q += m * st, ne += m * nt, J += m * it, oe += m * ft, se += m * Ne,
|
|
11768
|
+
let m, H, re = 0, Z = 0, ce = 0, de = 0, Ae = 0, ke = 0, ye = 0, ge = 0, we = 0, Ue = 0, Ee = 0, ze = 0, be = 0, We = 0, C = 0, O = 0, j = 0, Q = 0, ne = 0, J = 0, oe = 0, se = 0, he = 0, Te = 0, Oe = 0, Re = 0, je = 0, Ct = 0, wt = 0, Jt = 0, an = 0, Et = P[0], me = P[1], Dt = P[2], bt = P[3], gt = P[4], At = P[5], Pe = P[6], Me = P[7], tt = P[8], De = P[9], st = P[10], nt = P[11], it = P[12], ft = P[13], Ne = P[14], ct = P[15];
|
|
11769
|
+
m = G[0], re += m * Et, Z += m * me, ce += m * Dt, de += m * bt, Ae += m * gt, ke += m * At, ye += m * Pe, ge += m * Me, we += m * tt, Ue += m * De, Ee += m * st, ze += m * nt, be += m * it, We += m * ft, C += m * Ne, O += m * ct, m = G[1], Z += m * Et, ce += m * me, de += m * Dt, Ae += m * bt, ke += m * gt, ye += m * At, ge += m * Pe, we += m * Me, Ue += m * tt, Ee += m * De, ze += m * st, be += m * nt, We += m * it, C += m * ft, O += m * Ne, j += m * ct, m = G[2], ce += m * Et, de += m * me, Ae += m * Dt, ke += m * bt, ye += m * gt, ge += m * At, we += m * Pe, Ue += m * Me, Ee += m * tt, ze += m * De, be += m * st, We += m * nt, C += m * it, O += m * ft, j += m * Ne, Q += m * ct, m = G[3], de += m * Et, Ae += m * me, ke += m * Dt, ye += m * bt, ge += m * gt, we += m * At, Ue += m * Pe, Ee += m * Me, ze += m * tt, be += m * De, We += m * st, C += m * nt, O += m * it, j += m * ft, Q += m * Ne, ne += m * ct, m = G[4], Ae += m * Et, ke += m * me, ye += m * Dt, ge += m * bt, we += m * gt, Ue += m * At, Ee += m * Pe, ze += m * Me, be += m * tt, We += m * De, C += m * st, O += m * nt, j += m * it, Q += m * ft, ne += m * Ne, J += m * ct, m = G[5], ke += m * Et, ye += m * me, ge += m * Dt, we += m * bt, Ue += m * gt, Ee += m * At, ze += m * Pe, be += m * Me, We += m * tt, C += m * De, O += m * st, j += m * nt, Q += m * it, ne += m * ft, J += m * Ne, oe += m * ct, m = G[6], ye += m * Et, ge += m * me, we += m * Dt, Ue += m * bt, Ee += m * gt, ze += m * At, be += m * Pe, We += m * Me, C += m * tt, O += m * De, j += m * st, Q += m * nt, ne += m * it, J += m * ft, oe += m * Ne, se += m * ct, m = G[7], ge += m * Et, we += m * me, Ue += m * Dt, Ee += m * bt, ze += m * gt, be += m * At, We += m * Pe, C += m * Me, O += m * tt, j += m * De, Q += m * st, ne += m * nt, J += m * it, oe += m * ft, se += m * Ne, he += m * ct, m = G[8], we += m * Et, Ue += m * me, Ee += m * Dt, ze += m * bt, be += m * gt, We += m * At, C += m * Pe, O += m * Me, j += m * tt, Q += m * De, ne += m * st, J += m * nt, oe += m * it, se += m * ft, he += m * Ne, Te += m * ct, m = G[9], Ue += m * Et, Ee += m * me, ze += m * Dt, be += m * bt, We += m * gt, C += m * At, O += m * Pe, j += m * Me, Q += m * tt, ne += m * De, J += m * st, oe += m * nt, se += m * it, he += m * ft, Te += m * Ne, Oe += m * ct, m = G[10], Ee += m * Et, ze += m * me, be += m * Dt, We += m * bt, C += m * gt, O += m * At, j += m * Pe, Q += m * Me, ne += m * tt, J += m * De, oe += m * st, se += m * nt, he += m * it, Te += m * ft, Oe += m * Ne, Re += m * ct, m = G[11], ze += m * Et, be += m * me, We += m * Dt, C += m * bt, O += m * gt, j += m * At, Q += m * Pe, ne += m * Me, J += m * tt, oe += m * De, se += m * st, he += m * nt, Te += m * it, Oe += m * ft, Re += m * Ne, je += m * ct, m = G[12], be += m * Et, We += m * me, C += m * Dt, O += m * bt, j += m * gt, Q += m * At, ne += m * Pe, J += m * Me, oe += m * tt, se += m * De, he += m * st, Te += m * nt, Oe += m * it, Re += m * ft, je += m * Ne, Ct += m * ct, m = G[13], We += m * Et, C += m * me, O += m * Dt, j += m * bt, Q += m * gt, ne += m * At, J += m * Pe, oe += m * Me, se += m * tt, he += m * De, Te += m * st, Oe += m * nt, Re += m * it, je += m * ft, Ct += m * Ne, wt += m * ct, m = G[14], C += m * Et, O += m * me, j += m * Dt, Q += m * bt, ne += m * gt, J += m * At, oe += m * Pe, se += m * Me, he += m * tt, Te += m * De, Oe += m * st, Re += m * nt, je += m * it, Ct += m * ft, wt += m * Ne, Jt += m * ct, m = G[15], O += m * Et, j += m * me, Q += m * Dt, ne += m * bt, J += m * gt, oe += m * At, se += m * Pe, he += m * Me, Te += m * tt, Oe += m * De, Re += m * st, je += m * nt, Ct += m * it, wt += m * ft, Jt += m * Ne, an += m * ct, re += 38 * j, Z += 38 * Q, ce += 38 * ne, de += 38 * J, Ae += 38 * oe, ke += 38 * se, ye += 38 * he, ge += 38 * Te, we += 38 * Oe, Ue += 38 * Re, Ee += 38 * je, ze += 38 * Ct, be += 38 * wt, We += 38 * Jt, C += 38 * an, H = 1, m = re + H + 65535, H = Math.floor(m / 65536), re = m - H * 65536, m = Z + H + 65535, H = Math.floor(m / 65536), Z = m - H * 65536, m = ce + H + 65535, H = Math.floor(m / 65536), ce = m - H * 65536, m = de + H + 65535, H = Math.floor(m / 65536), de = m - H * 65536, m = Ae + H + 65535, H = Math.floor(m / 65536), Ae = m - H * 65536, m = ke + H + 65535, H = Math.floor(m / 65536), ke = m - H * 65536, m = ye + H + 65535, H = Math.floor(m / 65536), ye = m - H * 65536, m = ge + H + 65535, H = Math.floor(m / 65536), ge = m - H * 65536, m = we + H + 65535, H = Math.floor(m / 65536), we = m - H * 65536, m = Ue + H + 65535, H = Math.floor(m / 65536), Ue = m - H * 65536, m = Ee + H + 65535, H = Math.floor(m / 65536), Ee = m - H * 65536, m = ze + H + 65535, H = Math.floor(m / 65536), ze = m - H * 65536, m = be + H + 65535, H = Math.floor(m / 65536), be = m - H * 65536, m = We + H + 65535, H = Math.floor(m / 65536), We = m - H * 65536, m = C + H + 65535, H = Math.floor(m / 65536), C = m - H * 65536, m = O + H + 65535, H = Math.floor(m / 65536), O = m - H * 65536, re += H - 1 + 37 * (H - 1), H = 1, m = re + H + 65535, H = Math.floor(m / 65536), re = m - H * 65536, m = Z + H + 65535, H = Math.floor(m / 65536), Z = m - H * 65536, m = ce + H + 65535, H = Math.floor(m / 65536), ce = m - H * 65536, m = de + H + 65535, H = Math.floor(m / 65536), de = m - H * 65536, m = Ae + H + 65535, H = Math.floor(m / 65536), Ae = m - H * 65536, m = ke + H + 65535, H = Math.floor(m / 65536), ke = m - H * 65536, m = ye + H + 65535, H = Math.floor(m / 65536), ye = m - H * 65536, m = ge + H + 65535, H = Math.floor(m / 65536), ge = m - H * 65536, m = we + H + 65535, H = Math.floor(m / 65536), we = m - H * 65536, m = Ue + H + 65535, H = Math.floor(m / 65536), Ue = m - H * 65536, m = Ee + H + 65535, H = Math.floor(m / 65536), Ee = m - H * 65536, m = ze + H + 65535, H = Math.floor(m / 65536), ze = m - H * 65536, m = be + H + 65535, H = Math.floor(m / 65536), be = m - H * 65536, m = We + H + 65535, H = Math.floor(m / 65536), We = m - H * 65536, m = C + H + 65535, H = Math.floor(m / 65536), C = m - H * 65536, m = O + H + 65535, H = Math.floor(m / 65536), O = m - H * 65536, re += H - 1 + 37 * (H - 1), B[0] = re, B[1] = Z, B[2] = ce, B[3] = de, B[4] = Ae, B[5] = ke, B[6] = ye, B[7] = ge, B[8] = we, B[9] = Ue, B[10] = Ee, B[11] = ze, B[12] = be, B[13] = We, B[14] = C, B[15] = O;
|
|
11770
11770
|
}
|
|
11771
11771
|
function x(B, G) {
|
|
11772
11772
|
w(B, G, G);
|
|
@@ -12132,11 +12132,11 @@ var Qh = { exports: {} };
|
|
|
12132
12132
|
return C > 0 ? Math.floor(C) : Math.ceil(C);
|
|
12133
12133
|
}
|
|
12134
12134
|
function N(C, O) {
|
|
12135
|
-
var j = C.length, Q = O.length, ne = new Array(j), J = 0, oe = n, se,
|
|
12136
|
-
for (
|
|
12137
|
-
se = C[
|
|
12138
|
-
for (;
|
|
12139
|
-
se = C[
|
|
12135
|
+
var j = C.length, Q = O.length, ne = new Array(j), J = 0, oe = n, se, he;
|
|
12136
|
+
for (he = 0; he < Q; he++)
|
|
12137
|
+
se = C[he] + O[he] + J, J = se >= oe ? 1 : 0, ne[he] = se - J * oe;
|
|
12138
|
+
for (; he < j; )
|
|
12139
|
+
se = C[he] + J, J = se === oe ? 1 : 0, ne[he++] = se - J * oe;
|
|
12140
12140
|
return J > 0 && ne.push(J), ne;
|
|
12141
12141
|
}
|
|
12142
12142
|
function E(C, O) {
|
|
@@ -12170,16 +12170,16 @@ var Qh = { exports: {} };
|
|
|
12170
12170
|
return new h(this.value + be(C).value);
|
|
12171
12171
|
}, h.prototype.plus = h.prototype.add;
|
|
12172
12172
|
function A(C, O) {
|
|
12173
|
-
var j = C.length, Q = O.length, ne = new Array(j), J = 0, oe = n, se,
|
|
12173
|
+
var j = C.length, Q = O.length, ne = new Array(j), J = 0, oe = n, se, he;
|
|
12174
12174
|
for (se = 0; se < Q; se++)
|
|
12175
|
-
|
|
12175
|
+
he = C[se] - J - O[se], he < 0 ? (he += oe, J = 1) : J = 0, ne[se] = he;
|
|
12176
12176
|
for (se = Q; se < j; se++) {
|
|
12177
|
-
if (
|
|
12177
|
+
if (he = C[se] - J, he < 0) he += oe;
|
|
12178
12178
|
else {
|
|
12179
|
-
ne[se++] =
|
|
12179
|
+
ne[se++] = he;
|
|
12180
12180
|
break;
|
|
12181
12181
|
}
|
|
12182
|
-
ne[se] =
|
|
12182
|
+
ne[se] = he;
|
|
12183
12183
|
}
|
|
12184
12184
|
for (; se < j; se++)
|
|
12185
12185
|
ne[se] = C[se];
|
|
@@ -12190,9 +12190,9 @@ var Qh = { exports: {} };
|
|
|
12190
12190
|
return q(C, O) >= 0 ? Q = A(C, O) : (Q = A(O, C), j = !j), Q = y(Q), typeof Q == "number" ? (j && (Q = -Q), new d(Q)) : new l(Q, j);
|
|
12191
12191
|
}
|
|
12192
12192
|
function x(C, O, j) {
|
|
12193
|
-
var Q = C.length, ne = new Array(Q), J = -O, oe = n, se,
|
|
12193
|
+
var Q = C.length, ne = new Array(Q), J = -O, oe = n, se, he;
|
|
12194
12194
|
for (se = 0; se < Q; se++)
|
|
12195
|
-
|
|
12195
|
+
he = C[se] + J, J = Math.floor(he / oe), he %= oe, ne[se] = he < 0 ? he + oe : he;
|
|
12196
12196
|
return ne = y(ne), typeof ne == "number" ? (j && (ne = -ne), new d(ne)) : new l(ne, j);
|
|
12197
12197
|
}
|
|
12198
12198
|
l.prototype.subtract = function(C) {
|
|
@@ -12224,11 +12224,11 @@ var Qh = { exports: {} };
|
|
|
12224
12224
|
return new h(this.value >= 0 ? this.value : -this.value);
|
|
12225
12225
|
};
|
|
12226
12226
|
function D(C, O) {
|
|
12227
|
-
var j = C.length, Q = O.length, ne = j + Q, J = v(ne), oe = n, se,
|
|
12227
|
+
var j = C.length, Q = O.length, ne = j + Q, J = v(ne), oe = n, se, he, Te, Oe, Re;
|
|
12228
12228
|
for (Te = 0; Te < j; ++Te) {
|
|
12229
12229
|
Oe = C[Te];
|
|
12230
12230
|
for (var je = 0; je < Q; ++je)
|
|
12231
|
-
Re = O[je], se = Oe * Re + J[Te + je],
|
|
12231
|
+
Re = O[je], se = Oe * Re + J[Te + je], he = Math.floor(se / oe), J[Te + je] = se - he * oe, J[Te + je + 1] += he;
|
|
12232
12232
|
}
|
|
12233
12233
|
return b(J), J;
|
|
12234
12234
|
}
|
|
@@ -12248,7 +12248,7 @@ var Qh = { exports: {} };
|
|
|
12248
12248
|
var j = Math.max(C.length, O.length);
|
|
12249
12249
|
if (j <= 30) return D(C, O);
|
|
12250
12250
|
j = Math.ceil(j / 2);
|
|
12251
|
-
var Q = C.slice(j), ne = C.slice(0, j), J = O.slice(j), oe = O.slice(0, j), se = I(ne, oe),
|
|
12251
|
+
var Q = C.slice(j), ne = C.slice(0, j), J = O.slice(j), oe = O.slice(0, j), se = I(ne, oe), he = I(Q, J), Te = I(E(ne, Q), E(oe, J)), Oe = E(E(se, T(A(A(Te, se), he), j)), T(he, 2 * j));
|
|
12252
12252
|
return b(Oe), Oe;
|
|
12253
12253
|
}
|
|
12254
12254
|
function L(C, O) {
|
|
@@ -12279,11 +12279,11 @@ var Qh = { exports: {} };
|
|
|
12279
12279
|
return new h(this.value * be(C).value);
|
|
12280
12280
|
}, h.prototype.times = h.prototype.multiply;
|
|
12281
12281
|
function R(C) {
|
|
12282
|
-
var O = C.length, j = v(O + O), Q = n, ne, J, oe, se,
|
|
12282
|
+
var O = C.length, j = v(O + O), Q = n, ne, J, oe, se, he;
|
|
12283
12283
|
for (oe = 0; oe < O; oe++) {
|
|
12284
12284
|
se = C[oe], J = 0 - se * se;
|
|
12285
12285
|
for (var Te = oe; Te < O; Te++)
|
|
12286
|
-
|
|
12286
|
+
he = C[Te], ne = 2 * (se * he) + j[oe + Te] + J, J = Math.floor(ne / Q), j[oe + Te] = ne - J * Q;
|
|
12287
12287
|
j[oe + O] = J;
|
|
12288
12288
|
}
|
|
12289
12289
|
return b(j), j;
|
|
@@ -12297,26 +12297,26 @@ var Qh = { exports: {} };
|
|
|
12297
12297
|
return new h(this.value * this.value);
|
|
12298
12298
|
};
|
|
12299
12299
|
function K(C, O) {
|
|
12300
|
-
var j = C.length, Q = O.length, ne = n, J = v(O.length), oe = O[Q - 1], se = Math.ceil(ne / (2 * oe)),
|
|
12301
|
-
for (
|
|
12302
|
-
for (Oe = ne - 1,
|
|
12303
|
-
je += Oe * Te[wt], an = Math.floor(je / ne), Ct +=
|
|
12300
|
+
var j = C.length, Q = O.length, ne = n, J = v(O.length), oe = O[Q - 1], se = Math.ceil(ne / (2 * oe)), he = S(C, se), Te = S(O, se), Oe, Re, je, Ct, wt, Jt, an;
|
|
12301
|
+
for (he.length <= j && he.push(0), Te.push(0), oe = Te[Q - 1], Re = j - Q; Re >= 0; Re--) {
|
|
12302
|
+
for (Oe = ne - 1, he[Re + Q] !== oe && (Oe = Math.floor((he[Re + Q] * ne + he[Re + Q - 1]) / oe)), je = 0, Ct = 0, Jt = Te.length, wt = 0; wt < Jt; wt++)
|
|
12303
|
+
je += Oe * Te[wt], an = Math.floor(je / ne), Ct += he[Re + wt] - (je - an * ne), je = an, Ct < 0 ? (he[Re + wt] = Ct + ne, Ct = -1) : (he[Re + wt] = Ct, Ct = 0);
|
|
12304
12304
|
for (; Ct !== 0; ) {
|
|
12305
12305
|
for (Oe -= 1, je = 0, wt = 0; wt < Jt; wt++)
|
|
12306
|
-
je +=
|
|
12306
|
+
je += he[Re + wt] - ne + Te[wt], je < 0 ? (he[Re + wt] = je + ne, je = 0) : (he[Re + wt] = je, je = 1);
|
|
12307
12307
|
Ct += je;
|
|
12308
12308
|
}
|
|
12309
12309
|
J[Re] = Oe;
|
|
12310
12310
|
}
|
|
12311
|
-
return
|
|
12311
|
+
return he = $(he, se)[0], [y(J), y(he)];
|
|
12312
12312
|
}
|
|
12313
12313
|
function X(C, O) {
|
|
12314
|
-
for (var j = C.length, Q = O.length, ne = [], J = [], oe = n, se,
|
|
12314
|
+
for (var j = C.length, Q = O.length, ne = [], J = [], oe = n, se, he, Te, Oe, Re; j; ) {
|
|
12315
12315
|
if (J.unshift(C[--j]), b(J), q(J, O) < 0) {
|
|
12316
12316
|
ne.push(0);
|
|
12317
12317
|
continue;
|
|
12318
12318
|
}
|
|
12319
|
-
|
|
12319
|
+
he = J.length, Te = J[he - 1] * oe + J[he - 2], Oe = O[Q - 1] * oe + O[Q - 2], he > Q && (Te = (Te + 1) * oe), se = Math.ceil(Te / Oe);
|
|
12320
12320
|
do {
|
|
12321
12321
|
if (Re = S(O, se), q(Re, J) <= 0) break;
|
|
12322
12322
|
se--;
|
|
@@ -12326,9 +12326,9 @@ var Qh = { exports: {} };
|
|
|
12326
12326
|
return ne.reverse(), [y(ne), y(J)];
|
|
12327
12327
|
}
|
|
12328
12328
|
function $(C, O) {
|
|
12329
|
-
var j = C.length, Q = v(j), ne = n, J, oe, se,
|
|
12329
|
+
var j = C.length, Q = v(j), ne = n, J, oe, se, he;
|
|
12330
12330
|
for (se = 0, J = j - 1; J >= 0; --J)
|
|
12331
|
-
|
|
12331
|
+
he = se * ne + C[J], oe = _(he / O), se = he - oe * O, Q[J] = oe | 0;
|
|
12332
12332
|
return [Q, se | 0];
|
|
12333
12333
|
}
|
|
12334
12334
|
function z(C, O) {
|
|
@@ -12345,8 +12345,8 @@ var Qh = { exports: {} };
|
|
|
12345
12345
|
var se = Math.abs(J);
|
|
12346
12346
|
if (se < n) {
|
|
12347
12347
|
j = $(ne, se), oe = y(j[0]);
|
|
12348
|
-
var
|
|
12349
|
-
return C.sign && (
|
|
12348
|
+
var he = j[1];
|
|
12349
|
+
return C.sign && (he = -he), typeof oe == "number" ? (C.sign !== Q.sign && (oe = -oe), [new d(oe), new d(he)]) : [new l(oe, C.sign !== Q.sign), new d(he)];
|
|
12350
12350
|
}
|
|
12351
12351
|
J = g(se);
|
|
12352
12352
|
}
|
|
@@ -12392,9 +12392,9 @@ var Qh = { exports: {} };
|
|
|
12392
12392
|
if (j === J) return u[1];
|
|
12393
12393
|
if (j === BigInt(-1)) return O.isEven() ? u[1] : u[-1];
|
|
12394
12394
|
if (O.isNegative()) return new h(ne);
|
|
12395
|
-
for (var se = this,
|
|
12395
|
+
for (var se = this, he = u[1]; (Q & J) === J && (he = he.times(se), --Q), Q !== ne; )
|
|
12396
12396
|
Q /= oe, se = se.square();
|
|
12397
|
-
return
|
|
12397
|
+
return he;
|
|
12398
12398
|
}, l.prototype.modPow = function(C, O) {
|
|
12399
12399
|
if (C = be(C), O = be(O), O.isZero()) throw new Error("Cannot take modPow with modulus 0");
|
|
12400
12400
|
var j = u[1], Q = this.mod(O);
|
|
@@ -12573,8 +12573,8 @@ var Qh = { exports: {} };
|
|
|
12573
12573
|
}, h.prototype.shiftRight = d.prototype.shiftRight = l.prototype.shiftRight;
|
|
12574
12574
|
function B(C, O, j) {
|
|
12575
12575
|
O = be(O);
|
|
12576
|
-
for (var Q = C.isNegative(), ne = O.isNegative(), J = Q ? C.not() : C, oe = ne ? O.not() : O, se = 0,
|
|
12577
|
-
Te = z(J, Y), se = Te[1].toJSNumber(), Q && (se = Y - 1 - se), Oe = z(oe, Y),
|
|
12576
|
+
for (var Q = C.isNegative(), ne = O.isNegative(), J = Q ? C.not() : C, oe = ne ? O.not() : O, se = 0, he = 0, Te = null, Oe = null, Re = []; !J.isZero() || !oe.isZero(); )
|
|
12577
|
+
Te = z(J, Y), se = Te[1].toJSNumber(), Q && (se = Y - 1 - se), Oe = z(oe, Y), he = Oe[1].toJSNumber(), ne && (he = Y - 1 - he), J = Te[0], oe = Oe[0], Re.push(j(se, he));
|
|
12578
12578
|
for (var je = j(Q ? 1 : 0, ne ? 1 : 0) !== 0 ? t(-1) : t(0), Ct = Re.length - 1; Ct >= 0; Ct -= 1)
|
|
12579
12579
|
je = je.multiply(Y).add(t(Re[Ct]));
|
|
12580
12580
|
return je;
|
|
@@ -12638,11 +12638,11 @@ var Qh = { exports: {} };
|
|
|
12638
12638
|
C = be(C), O = be(O);
|
|
12639
12639
|
var Q = j || Math.random, ne = Z(C, O), J = re(C, O), oe = J.subtract(ne).add(1);
|
|
12640
12640
|
if (oe.isSmall) return ne.add(Math.floor(Q() * oe));
|
|
12641
|
-
for (var se = we(oe, n).value,
|
|
12641
|
+
for (var se = we(oe, n).value, he = [], Te = !0, Oe = 0; Oe < se.length; Oe++) {
|
|
12642
12642
|
var Re = Te ? se[Oe] + (Oe + 1 < se.length ? se[Oe + 1] / n : 0) : n, je = _(Q() * Re);
|
|
12643
|
-
|
|
12643
|
+
he.push(je), je < se[Oe] && (Te = !1);
|
|
12644
12644
|
}
|
|
12645
|
-
return ne.add(u.fromArray(
|
|
12645
|
+
return ne.add(u.fromArray(he, n, !1));
|
|
12646
12646
|
}
|
|
12647
12647
|
var ke = function(C, O, j, Q) {
|
|
12648
12648
|
j = j || a, C = String(C), Q || (C = C.toLowerCase(), j = j.toLowerCase());
|
|
@@ -12650,24 +12650,24 @@ var Qh = { exports: {} };
|
|
|
12650
12650
|
for (J = 0; J < j.length; J++)
|
|
12651
12651
|
se[j[J]] = J;
|
|
12652
12652
|
for (J = 0; J < ne; J++) {
|
|
12653
|
-
var
|
|
12654
|
-
if (
|
|
12655
|
-
if (
|
|
12656
|
-
throw new Error(
|
|
12653
|
+
var he = C[J];
|
|
12654
|
+
if (he !== "-" && he in se && se[he] >= oe) {
|
|
12655
|
+
if (he === "1" && oe === 1) continue;
|
|
12656
|
+
throw new Error(he + " is not a valid digit in base " + O + ".");
|
|
12657
12657
|
}
|
|
12658
12658
|
}
|
|
12659
12659
|
O = be(O);
|
|
12660
12660
|
var Te = [], Oe = C[0] === "-";
|
|
12661
12661
|
for (J = Oe ? 1 : 0; J < C.length; J++) {
|
|
12662
|
-
var
|
|
12663
|
-
if (
|
|
12664
|
-
else if (
|
|
12662
|
+
var he = C[J];
|
|
12663
|
+
if (he in se) Te.push(be(se[he]));
|
|
12664
|
+
else if (he === "<") {
|
|
12665
12665
|
var Re = J;
|
|
12666
12666
|
do
|
|
12667
12667
|
J++;
|
|
12668
12668
|
while (C[J] !== ">" && J < C.length);
|
|
12669
12669
|
Te.push(be(C.slice(Re + 1, J)));
|
|
12670
|
-
} else throw new Error(
|
|
12670
|
+
} else throw new Error(he + " is not a valid character");
|
|
12671
12671
|
}
|
|
12672
12672
|
return ye(Te, O, Oe);
|
|
12673
12673
|
};
|
|
@@ -12765,9 +12765,9 @@ var Qh = { exports: {} };
|
|
|
12765
12765
|
if (!se) throw new Error("Invalid integer: " + C);
|
|
12766
12766
|
if (c)
|
|
12767
12767
|
return new h(BigInt(j ? "-" + C : C));
|
|
12768
|
-
for (var
|
|
12769
|
-
|
|
12770
|
-
return b(
|
|
12768
|
+
for (var he = [], Te = C.length, Oe = o, Re = Te - Oe; Te > 0; )
|
|
12769
|
+
he.push(+C.slice(Re, Te)), Re -= Oe, Re < 0 && (Re = 0), Te -= Oe;
|
|
12770
|
+
return b(he), new l(he, j);
|
|
12771
12771
|
}
|
|
12772
12772
|
function ze(C) {
|
|
12773
12773
|
if (c)
|
|
@@ -14214,25 +14214,25 @@ class Y3 {
|
|
|
14214
14214
|
// indicates whether the hash was finalized
|
|
14215
14215
|
constructor() {
|
|
14216
14216
|
/** Length of hash output */
|
|
14217
|
-
|
|
14217
|
+
fe(this, "digestLength", G3);
|
|
14218
14218
|
/** Block size */
|
|
14219
|
-
|
|
14219
|
+
fe(this, "blockSize", qu);
|
|
14220
14220
|
// Note: Int32Array is used instead of Uint32Array for performance reasons.
|
|
14221
|
-
|
|
14221
|
+
fe(this, "_stateHi", new Int32Array(8));
|
|
14222
14222
|
// hash state, high bytes
|
|
14223
|
-
|
|
14223
|
+
fe(this, "_stateLo", new Int32Array(8));
|
|
14224
14224
|
// hash state, low bytes
|
|
14225
|
-
|
|
14225
|
+
fe(this, "_tempHi", new Int32Array(16));
|
|
14226
14226
|
// temporary state, high bytes
|
|
14227
|
-
|
|
14227
|
+
fe(this, "_tempLo", new Int32Array(16));
|
|
14228
14228
|
// temporary state, low bytes
|
|
14229
|
-
|
|
14229
|
+
fe(this, "_buffer", new Uint8Array(256));
|
|
14230
14230
|
// buffer for data to hash
|
|
14231
|
-
|
|
14231
|
+
fe(this, "_bufferLength", 0);
|
|
14232
14232
|
// number of bytes in buffer
|
|
14233
|
-
|
|
14233
|
+
fe(this, "_bytesHashed", 0);
|
|
14234
14234
|
// number of total bytes hashed
|
|
14235
|
-
|
|
14235
|
+
fe(this, "_finished", !1);
|
|
14236
14236
|
this.reset();
|
|
14237
14237
|
}
|
|
14238
14238
|
_initState() {
|
|
@@ -16758,55 +16758,91 @@ const xE = (e) => (t, r, n) => ({
|
|
|
16758
16758
|
return ky(e, t);
|
|
16759
16759
|
},
|
|
16760
16760
|
generateRandomBytes: Ma
|
|
16761
|
-
},
|
|
16761
|
+
}, CE = 60, EE = 3600, SE = 60, DE = 1e12, AE = 1e14, kE = (e) => typeof e == "number" && e >= DE && e < AE, TE = typeof performance < "u" && typeof performance.now == "function" ? () => performance.now() : null;
|
|
16762
|
+
class NE {
|
|
16763
|
+
constructor(t = () => Date.now(), r = TE) {
|
|
16764
|
+
fe(this, "anchor", null);
|
|
16765
|
+
this.wallNow = t, this.monoNow = r;
|
|
16766
|
+
}
|
|
16767
|
+
/**
|
|
16768
|
+
* Time since the handshake is measured on the monotonic clock, so a device clock change
|
|
16769
|
+
* mid-session cannot skew it. A missing or implausible stamp (older server) falls back to the
|
|
16770
|
+
* device clock. Delivery delay and sleep only make the estimate trail the server, which the
|
|
16771
|
+
* token window absorbs.
|
|
16772
|
+
*/
|
|
16773
|
+
sync(t) {
|
|
16774
|
+
this.anchor = kE(t) ? { serverMs: t, localMs: this.elapsedBase() } : null;
|
|
16775
|
+
}
|
|
16776
|
+
nowSeconds() {
|
|
16777
|
+
const t = this.anchor ? this.anchor.serverMs + (this.elapsedBase() - this.anchor.localMs) : this.wallNow();
|
|
16778
|
+
return Math.floor(t / 1e3);
|
|
16779
|
+
}
|
|
16780
|
+
ucanWindow() {
|
|
16781
|
+
const t = this.nowSeconds();
|
|
16782
|
+
return {
|
|
16783
|
+
notBefore: t - CE,
|
|
16784
|
+
expiration: t + EE
|
|
16785
|
+
};
|
|
16786
|
+
}
|
|
16787
|
+
/** Whether a cached UCAN can still be presented: active, and not expiring within the margin. */
|
|
16788
|
+
isUsable(t) {
|
|
16789
|
+
const { nbf: r, exp: n } = t.payload, o = this.nowSeconds();
|
|
16790
|
+
return (!r || r <= o) && (!n || n > o + SE);
|
|
16791
|
+
}
|
|
16792
|
+
elapsedBase() {
|
|
16793
|
+
return this.monoNow ? this.monoNow() : this.wallNow();
|
|
16794
|
+
}
|
|
16795
|
+
}
|
|
16796
|
+
const xd = (e) => e === "xchacha" ? "xchacha" : "ecies", wd = () => {
|
|
16762
16797
|
const e = new Error("Lost connection to websocket server");
|
|
16763
16798
|
return e.name = "SocketConnectionLostError", e;
|
|
16764
16799
|
};
|
|
16765
16800
|
class fl {
|
|
16766
16801
|
constructor(t) {
|
|
16767
|
-
|
|
16768
|
-
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
|
|
16775
|
-
|
|
16776
|
-
|
|
16777
|
-
|
|
16778
|
-
|
|
16779
|
-
|
|
16780
|
-
|
|
16781
|
-
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
16791
|
-
|
|
16792
|
-
|
|
16793
|
-
|
|
16794
|
-
|
|
16795
|
-
|
|
16796
|
-
|
|
16802
|
+
fe(this, "_socketUrl");
|
|
16803
|
+
fe(this, "_restBase");
|
|
16804
|
+
fe(this, "_lastSessionToken", null);
|
|
16805
|
+
fe(this, "_socket", null);
|
|
16806
|
+
fe(this, "_webSocketStatus", _t.CLOSED);
|
|
16807
|
+
fe(this, "_isIntentionalDisconnect", !1);
|
|
16808
|
+
fe(this, "_pendingAckFailures", /* @__PURE__ */ new Set());
|
|
16809
|
+
fe(this, "_websocketServiceDid", "");
|
|
16810
|
+
fe(this, "roomId", "");
|
|
16811
|
+
fe(this, "roomMembers", []);
|
|
16812
|
+
fe(this, "_lastPresenceSignature", "");
|
|
16813
|
+
fe(this, "_presenceColorByName", /* @__PURE__ */ new Map());
|
|
16814
|
+
fe(this, "_onPresenceChange");
|
|
16815
|
+
fe(this, "_pendingAwarenessUpdates", []);
|
|
16816
|
+
fe(this, "collaborationKeyPair", null);
|
|
16817
|
+
fe(this, "ownerKeyPair");
|
|
16818
|
+
fe(this, "contractAddress");
|
|
16819
|
+
fe(this, "ownerUcan");
|
|
16820
|
+
fe(this, "collaborationUcan");
|
|
16821
|
+
fe(this, "serverClock", new NE());
|
|
16822
|
+
fe(this, "ownerAddress");
|
|
16823
|
+
fe(this, "ddocId");
|
|
16824
|
+
fe(this, "editLock");
|
|
16825
|
+
fe(this, "encryptedTitle");
|
|
16826
|
+
fe(this, "identityToken");
|
|
16827
|
+
fe(this, "editUcan");
|
|
16828
|
+
fe(this, "refreshEditClaim");
|
|
16829
|
+
fe(this, "lastGoodEditUcan");
|
|
16830
|
+
fe(this, "actorHandle");
|
|
16831
|
+
fe(this, "joinOnly");
|
|
16832
|
+
fe(this, "roomKey");
|
|
16797
16833
|
// What the server announced for this room. ECIES until an ack or ratchet says otherwise.
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16834
|
+
fe(this, "wireFormat", "ecies");
|
|
16835
|
+
fe(this, "roomInfo");
|
|
16836
|
+
fe(this, "awareness", null);
|
|
16837
|
+
fe(this, "connectionAttemptErrorCount", 0);
|
|
16838
|
+
fe(this, "_onHandshakeData", null);
|
|
16839
|
+
fe(this, "_onEpochAvailable", null);
|
|
16840
|
+
fe(this, "_onCutover", null);
|
|
16805
16841
|
// True while an in-place rekey's re-auth is in flight — the outgoing session's
|
|
16806
16842
|
// leave can trigger '/session/terminated' on this same socket; swallow it so a
|
|
16807
16843
|
// rotation isn't surfaced as a kick.
|
|
16808
|
-
|
|
16809
|
-
|
|
16844
|
+
fe(this, "_rotating", !1);
|
|
16845
|
+
fe(this, "_recomputePresence", () => {
|
|
16810
16846
|
var a, c, u;
|
|
16811
16847
|
if (!this.isConnected || !this.awareness || !this._onPresenceChange) return;
|
|
16812
16848
|
const t = V3(this.awareness.getStates()), r = W3(this.roomMembers, t);
|
|
@@ -16821,7 +16857,7 @@ class fl {
|
|
|
16821
16857
|
color: i
|
|
16822
16858
|
}), this._onPresenceChange(n);
|
|
16823
16859
|
});
|
|
16824
|
-
|
|
16860
|
+
fe(this, "disconnect", () => {
|
|
16825
16861
|
if (this._isIntentionalDisconnect = !0, this._webSocketStatus = _t.CLOSED, this._pendingAwarenessUpdates = [], !this._socket) {
|
|
16826
16862
|
this._failPendingAcks();
|
|
16827
16863
|
return;
|
|
@@ -16830,10 +16866,10 @@ class fl {
|
|
|
16830
16866
|
});
|
|
16831
16867
|
// Re-establishes the connection so '/server/handshake' → '/auth' re-runs (re-minting the
|
|
16832
16868
|
// editUcan via refreshEditClaim), without tearing down editor/SyncManager state.
|
|
16833
|
-
|
|
16869
|
+
fe(this, "reauth", () => {
|
|
16834
16870
|
this._socket && (this._socket.connected ? this._socket.disconnect().connect() : this._socket.connect());
|
|
16835
16871
|
});
|
|
16836
|
-
|
|
16872
|
+
fe(this, "terminateSession", async () => {
|
|
16837
16873
|
var t;
|
|
16838
16874
|
try {
|
|
16839
16875
|
const r = await this.getOwnerToken(), n = {
|
|
@@ -16848,20 +16884,18 @@ class fl {
|
|
|
16848
16884
|
this.disconnect();
|
|
16849
16885
|
}
|
|
16850
16886
|
});
|
|
16851
|
-
|
|
16887
|
+
fe(this, "buildSessionToken", async () => {
|
|
16852
16888
|
if (!this._websocketServiceDid)
|
|
16853
16889
|
throw new Error(
|
|
16854
16890
|
"SocketClient: Server did not response with the server DID"
|
|
16855
16891
|
);
|
|
16856
|
-
if (this.collaborationUcan && this.
|
|
16892
|
+
if (this.collaborationUcan && this.serverClock.isUsable(this.collaborationUcan))
|
|
16857
16893
|
return this._lastSessionToken = cn(this.collaborationUcan), this._lastSessionToken;
|
|
16858
16894
|
const t = this.getCollaborationKeyPair();
|
|
16859
16895
|
return this.collaborationUcan = await Vu({
|
|
16860
16896
|
audience: this._websocketServiceDid,
|
|
16861
16897
|
issuer: t,
|
|
16862
|
-
|
|
16863
|
-
// 1 Hour
|
|
16864
|
-
notBefore: Math.floor(Date.now() / 1e3) - 60,
|
|
16898
|
+
...this.serverClock.ucanWindow(),
|
|
16865
16899
|
capabilities: [
|
|
16866
16900
|
{
|
|
16867
16901
|
with: {
|
|
@@ -16875,7 +16909,7 @@ class fl {
|
|
|
16875
16909
|
});
|
|
16876
16910
|
// Builds the /auth args and emits, shared by the initial handshake and rekey's in-place
|
|
16877
16911
|
// re-auth (rotationCutover: true) on an already-connected socket.
|
|
16878
|
-
|
|
16912
|
+
fe(this, "_authenticate", async (t) => {
|
|
16879
16913
|
var i, a, c;
|
|
16880
16914
|
const n = {
|
|
16881
16915
|
collaborationToken: await this.buildSessionToken(),
|
|
@@ -16902,8 +16936,8 @@ class fl {
|
|
|
16902
16936
|
wireFormat: this.wireFormat
|
|
16903
16937
|
}), s;
|
|
16904
16938
|
});
|
|
16905
|
-
|
|
16906
|
-
if (this._websocketServiceDid = t.server_did, this._webSocketStatus === _t.CLOSED || !this.roomId)
|
|
16939
|
+
fe(this, "_handleHandShake", async (t, r) => {
|
|
16940
|
+
if (this._websocketServiceDid = t.server_did, this.serverClock.sync(t.server_time), this._webSocketStatus === _t.CLOSED || !this.roomId)
|
|
16907
16941
|
throw new Error(
|
|
16908
16942
|
"Cannot establish handshake. WebSocket not connected or roomId not defined"
|
|
16909
16943
|
);
|
|
@@ -16916,7 +16950,7 @@ class fl {
|
|
|
16916
16950
|
this._webSocketStatus = _t.CONNECTED, r.onHandshakeSuccess(), await this._fetchRoomMembers().catch(() => {
|
|
16917
16951
|
}), this._onPresenceChange = r.onPresenceChange, this._stampSocketId(), this._recomputePresence();
|
|
16918
16952
|
});
|
|
16919
|
-
|
|
16953
|
+
fe(this, "_handleAwarenessUpdate", (t) => {
|
|
16920
16954
|
if (!this.awareness) {
|
|
16921
16955
|
this._pendingAwarenessUpdates.length < 64 && this._pendingAwarenessUpdates.push(t);
|
|
16922
16956
|
return;
|
|
@@ -16940,10 +16974,10 @@ class fl {
|
|
|
16940
16974
|
);
|
|
16941
16975
|
}
|
|
16942
16976
|
});
|
|
16943
|
-
|
|
16977
|
+
fe(this, "_onSessionTerminated", () => {
|
|
16944
16978
|
this.disconnect(), this.resetSocketClient();
|
|
16945
16979
|
});
|
|
16946
|
-
|
|
16980
|
+
fe(this, "resetSocketClient", () => {
|
|
16947
16981
|
this._webSocketStatus = _t.CLOSED, this._socket = null, this._websocketServiceDid = "", this.roomId = "", this.roomMembers = [];
|
|
16948
16982
|
});
|
|
16949
16983
|
this._socketUrl = t.wsUrl || "ws://localhost:5000", this._restBase = (t.wsUrl || "http://localhost:5000").replace(/^ws(s?):\/\//, "http$1://").replace(/\/+$/, "");
|
|
@@ -17150,19 +17184,13 @@ class fl {
|
|
|
17150
17184
|
throw new Error("No collaboration key pair");
|
|
17151
17185
|
return this.collaborationKeyPair;
|
|
17152
17186
|
}
|
|
17153
|
-
isUcanValid(t) {
|
|
17154
|
-
const r = t.payload, n = Math.floor(Date.now() / 1e3);
|
|
17155
|
-
return (!r.nbf || r.nbf <= n) && (!r.exp || r.exp > n + 60);
|
|
17156
|
-
}
|
|
17157
17187
|
async getOwnerToken() {
|
|
17158
17188
|
if (!this.ownerKeyPair || !this.contractAddress)
|
|
17159
17189
|
throw new Error("SocketClient: No owner key pair or contract address");
|
|
17160
|
-
return this.ownerUcan && this.
|
|
17190
|
+
return this.ownerUcan && this.serverClock.isUsable(this.ownerUcan) ? cn(this.ownerUcan) : (this.ownerUcan = await Vu({
|
|
17161
17191
|
audience: this._websocketServiceDid,
|
|
17162
17192
|
issuer: this.ownerKeyPair,
|
|
17163
|
-
|
|
17164
|
-
// 1 Hour
|
|
17165
|
-
notBefore: Math.floor(Date.now() / 1e3) - 60,
|
|
17193
|
+
...this.serverClock.ucanWindow(),
|
|
17166
17194
|
capabilities: [
|
|
17167
17195
|
{
|
|
17168
17196
|
with: {
|
|
@@ -17314,23 +17342,23 @@ const bd = (e, t, r, n) => {
|
|
|
17314
17342
|
s && clearTimeout(s), s = setTimeout(a, i);
|
|
17315
17343
|
};
|
|
17316
17344
|
};
|
|
17317
|
-
function
|
|
17345
|
+
function _E(e, t) {
|
|
17318
17346
|
let r = e;
|
|
17319
17347
|
for (const n of t)
|
|
17320
17348
|
n > r && (r = n);
|
|
17321
17349
|
return r;
|
|
17322
17350
|
}
|
|
17323
|
-
function
|
|
17351
|
+
function RE(e) {
|
|
17324
17352
|
return e.canAuthor && e.updatesSinceLastSnapshot >= e.threshold;
|
|
17325
17353
|
}
|
|
17326
|
-
function
|
|
17354
|
+
function IE(e, t) {
|
|
17327
17355
|
const r = at.encodeStateAsUpdate(e);
|
|
17328
17356
|
if (r.length <= 2) return null;
|
|
17329
17357
|
if (t === null) return r;
|
|
17330
17358
|
const n = at.encodeStateVectorFromUpdate(t), o = at.encodeStateAsUpdate(e, n), s = at.diffUpdate(t, n);
|
|
17331
17359
|
return o.length === s.length && o.every((i, a) => i === s[a]) ? null : o;
|
|
17332
17360
|
}
|
|
17333
|
-
function
|
|
17361
|
+
function BE(e, t) {
|
|
17334
17362
|
const r = [];
|
|
17335
17363
|
let n = t;
|
|
17336
17364
|
for (const o of e)
|
|
@@ -17344,7 +17372,7 @@ const pr = {
|
|
|
17344
17372
|
error: null,
|
|
17345
17373
|
terminationReason: void 0
|
|
17346
17374
|
};
|
|
17347
|
-
function
|
|
17375
|
+
function OE(e, t, r) {
|
|
17348
17376
|
const n = t.type;
|
|
17349
17377
|
switch (e) {
|
|
17350
17378
|
case "idle":
|
|
@@ -17460,97 +17488,97 @@ function xa(e, t) {
|
|
|
17460
17488
|
function Ao(e, t, r = !1) {
|
|
17461
17489
|
return { code: e, message: t, recoverable: r };
|
|
17462
17490
|
}
|
|
17463
|
-
const wa = 3, Ds = 4e3,
|
|
17464
|
-
function
|
|
17491
|
+
const wa = 3, Ds = 4e3, LE = 1e3, ME = 3e4, vd = 2e3, Cd = 3e4, FE = 4e6, UE = 9e6, ba = (e, t, r) => Math.min(r, t * 2 ** Math.min(Math.max(e - 1, 0), 10));
|
|
17492
|
+
function PE(e, t) {
|
|
17465
17493
|
if (e.length !== t.length) return !1;
|
|
17466
17494
|
for (let r = 0; r < e.length; r++)
|
|
17467
17495
|
if (e[r] !== t[r]) return !1;
|
|
17468
17496
|
return !0;
|
|
17469
17497
|
}
|
|
17470
|
-
class
|
|
17498
|
+
class HE {
|
|
17471
17499
|
constructor(t, r) {
|
|
17472
17500
|
// --- State machine ---
|
|
17473
|
-
|
|
17474
|
-
|
|
17475
|
-
|
|
17501
|
+
fe(this, "_status", "idle");
|
|
17502
|
+
fe(this, "_context", { ...pr });
|
|
17503
|
+
fe(this, "_awareness", null);
|
|
17476
17504
|
// --- Internal state ---
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
|
|
17505
|
+
fe(this, "socketClient", null);
|
|
17506
|
+
fe(this, "roomKey", "");
|
|
17507
|
+
fe(this, "roomKeyBytes", null);
|
|
17480
17508
|
// Set while an in-place roomKey rotation's re-auth is in flight — dispatch pauses (edits
|
|
17481
17509
|
// still enqueue) so nothing goes out under a mismatched key. Cleared in rekey()'s finally.
|
|
17482
|
-
|
|
17510
|
+
fe(this, "rotating", !1);
|
|
17483
17511
|
// Prior roomKey bytes during a rotation's dual-decrypt window (consumed by the self-heal
|
|
17484
17512
|
// path for stragglers still encrypting under the old key). Stays set after a successful rekey.
|
|
17485
|
-
|
|
17513
|
+
fe(this, "roomKeyBytesPrev", null);
|
|
17486
17514
|
// Rotation key resolved at PREPARE, epoch-tagged and held until the server signals
|
|
17487
17515
|
// CUTOVER for that same epoch. An epoch mismatch at cutover means this key was PREPARE'd
|
|
17488
17516
|
// for a since-superseded rotation — discarded rather than applied.
|
|
17489
|
-
|
|
17517
|
+
fe(this, "pendingRotationKey", null);
|
|
17490
17518
|
// In-flight decrypt-miss self-heal, shared so concurrent callers (a write-409 racing an
|
|
17491
17519
|
// inbound decrypt miss) join the same outcome instead of one bailing false while the
|
|
17492
17520
|
// other converges.
|
|
17493
|
-
|
|
17521
|
+
fe(this, "healingPromise", null);
|
|
17494
17522
|
// Backoff floor after a failed self-heal: the post-rotation gate blob anchors on-chain
|
|
17495
17523
|
// seconds-to-a-minute after the cutover, so a 'failed' heal is usually "not anchored YET".
|
|
17496
17524
|
// Send paths pause (edits keep queueing) instead of hot-looping the heal or terminalizing.
|
|
17497
|
-
|
|
17525
|
+
fe(this, "healBackoffUntil", 0);
|
|
17498
17526
|
// Bounds the "resend once on a stale current-key-ok 409" retry shared by the write-ack
|
|
17499
17527
|
// paths below, so a genuinely-stuck client can't loop. Reset on any successful ack.
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
|
|
17505
|
-
|
|
17506
|
-
|
|
17507
|
-
|
|
17508
|
-
|
|
17509
|
-
|
|
17510
|
-
|
|
17511
|
-
|
|
17528
|
+
fe(this, "staleAckRetries", 0);
|
|
17529
|
+
fe(this, "encryptMirror", null);
|
|
17530
|
+
fe(this, "fileKeyEpoch", 0);
|
|
17531
|
+
fe(this, "mirrorIdleTimer", null);
|
|
17532
|
+
fe(this, "MIRROR_IDLE_MS", 4e3);
|
|
17533
|
+
fe(this, "isOwner", !1);
|
|
17534
|
+
fe(this, "joinOnly", !1);
|
|
17535
|
+
fe(this, "updateQueue", []);
|
|
17536
|
+
fe(this, "contentTobeAppliedQueue", []);
|
|
17537
|
+
fe(this, "isProcessing", !1);
|
|
17538
|
+
fe(this, "syncId", 0);
|
|
17539
|
+
fe(this, "floor", 0);
|
|
17512
17540
|
// Set when a catch-up read skipped a row it could not decrypt. While set, the floor is
|
|
17513
17541
|
// pinned below that row, no snapshot is authored and no local-only diff is broadcast.
|
|
17514
17542
|
// Cleared by the next miss-free catch-up read.
|
|
17515
|
-
|
|
17543
|
+
fe(this, "hydrationIncomplete", !1);
|
|
17516
17544
|
// Announced write format for the current room; every outbound seal goes through
|
|
17517
17545
|
// encryptForWire so a ratchet applies to the next batch without any other change.
|
|
17518
|
-
|
|
17519
|
-
|
|
17546
|
+
fe(this, "wireFormat", "ecies");
|
|
17547
|
+
fe(this, "lastReportedWriteFormat", null);
|
|
17520
17548
|
// Bumped by connect() and by every teardown. Socket callbacks, timers and async
|
|
17521
17549
|
// continuations capture it and stand down once their session is gone, so a late event
|
|
17522
17550
|
// from a dropped socket can never act on the session that replaced it.
|
|
17523
|
-
|
|
17524
|
-
|
|
17525
|
-
|
|
17551
|
+
fe(this, "sessionGen", 0);
|
|
17552
|
+
fe(this, "sendFailures", 0);
|
|
17553
|
+
fe(this, "sendRetryTimer", null);
|
|
17526
17554
|
// Resume after a transient loss: the session's config is kept so resume() can reopen it
|
|
17527
17555
|
// without the host. Only set by dropToResumableIdle; anything intentional or terminal
|
|
17528
17556
|
// clears it.
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
|
|
17537
|
-
|
|
17557
|
+
fe(this, "lastConnectConfig", null);
|
|
17558
|
+
fe(this, "resumable", !1);
|
|
17559
|
+
fe(this, "resuming", !1);
|
|
17560
|
+
fe(this, "resumeFailures", 0);
|
|
17561
|
+
fe(this, "nextResumeAt", 0);
|
|
17562
|
+
fe(this, "updatesSinceSnapshot", 0);
|
|
17563
|
+
fe(this, "isAuthoringSnapshot", !1);
|
|
17564
|
+
fe(this, "SNAPSHOT_THRESHOLD", 100);
|
|
17565
|
+
fe(this, "deferredSnapshotTimer", null);
|
|
17538
17566
|
// Gap catch-up (rotation room-migration skew / missed broadcasts): see runGapCatchUp.
|
|
17539
|
-
|
|
17540
|
-
|
|
17541
|
-
|
|
17567
|
+
fe(this, "gapCatchUpTimer", null);
|
|
17568
|
+
fe(this, "gapCatchUpInFlight", !1);
|
|
17569
|
+
fe(this, "gapCatchUpCooldownUntil", 0);
|
|
17542
17570
|
// Compact when the hydration walk needed more than one page (>~9MB of tail) or the
|
|
17543
17571
|
// row count alone makes replay expensive.
|
|
17544
|
-
|
|
17545
|
-
|
|
17546
|
-
|
|
17547
|
-
|
|
17548
|
-
|
|
17549
|
-
|
|
17572
|
+
fe(this, "TAIL_COMPACT_PAGES", 2);
|
|
17573
|
+
fe(this, "TAIL_COMPACT_ROWS", 200);
|
|
17574
|
+
fe(this, "flushTimer", null);
|
|
17575
|
+
fe(this, "FLUSH_INTERVAL_MS", 50);
|
|
17576
|
+
fe(this, "MAX_QUEUE_SIZE", 5);
|
|
17577
|
+
fe(this, "_awarenessUpdateHandler", null);
|
|
17550
17578
|
// --- Config (from constructor) ---
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17579
|
+
fe(this, "ydoc");
|
|
17580
|
+
fe(this, "callbacksRef");
|
|
17581
|
+
fe(this, "onLocalUpdate");
|
|
17554
17582
|
this.onCollabStateChange = r, this.ydoc = t.ydoc, this.callbacksRef = t.callbacks, this.onLocalUpdate = t.onLocalUpdate;
|
|
17555
17583
|
}
|
|
17556
17584
|
getWireFormat() {
|
|
@@ -17626,7 +17654,7 @@ class IE {
|
|
|
17626
17654
|
}
|
|
17627
17655
|
send(t) {
|
|
17628
17656
|
var s, i;
|
|
17629
|
-
const r =
|
|
17657
|
+
const r = OE(this._status, t, this._context);
|
|
17630
17658
|
if (!r)
|
|
17631
17659
|
return console.warn(
|
|
17632
17660
|
`SyncManager: invalid transition (${this._status}, ${t.type}) — ignored`
|
|
@@ -17840,7 +17868,7 @@ class IE {
|
|
|
17840
17868
|
return this.rotating || !t ? Promise.resolve("failed") : (this.healingPromise = (async () => {
|
|
17841
17869
|
try {
|
|
17842
17870
|
const n = await t();
|
|
17843
|
-
return n ? this.roomKeyBytes &&
|
|
17871
|
+
return n ? this.roomKeyBytes && PE(Lt(n), this.roomKeyBytes) ? "current-key-ok" : (await this.rekey(n), this.healBackoffUntil = 0, "rekeyed") : (console.warn(
|
|
17844
17872
|
"SyncManager: rotation self-heal yielded no key (post-rotation blob may not be anchored yet)"
|
|
17845
17873
|
), this.healBackoffUntil = Date.now() + Ds, "failed");
|
|
17846
17874
|
} catch (n) {
|
|
@@ -17923,13 +17951,13 @@ class IE {
|
|
|
17923
17951
|
takeBatch() {
|
|
17924
17952
|
let t = 0, r = 0;
|
|
17925
17953
|
for (const n of this.updateQueue) {
|
|
17926
|
-
if (r > 0 && t + n.byteLength >
|
|
17954
|
+
if (r > 0 && t + n.byteLength > FE) break;
|
|
17927
17955
|
t += n.byteLength, r += 1;
|
|
17928
17956
|
}
|
|
17929
17957
|
return this.updateQueue.slice(0, r);
|
|
17930
17958
|
}
|
|
17931
17959
|
isUndeliverable(t, r) {
|
|
17932
|
-
return t.length !== 1 || r.length <=
|
|
17960
|
+
return t.length !== 1 || r.length <= UE ? !1 : (console.error(
|
|
17933
17961
|
`SyncManager: dropping a ${t[0].byteLength}-byte update, over the collaboration server's packet limit`
|
|
17934
17962
|
), !0);
|
|
17935
17963
|
}
|
|
@@ -17953,7 +17981,7 @@ class IE {
|
|
|
17953
17981
|
console.error("SyncManager: send retry failed", r);
|
|
17954
17982
|
});
|
|
17955
17983
|
},
|
|
17956
|
-
ba(this.sendFailures,
|
|
17984
|
+
ba(this.sendFailures, LE, ME)
|
|
17957
17985
|
);
|
|
17958
17986
|
}
|
|
17959
17987
|
// Extracted from sendUpdateBatch so a 'current-key-ok' 409 (a stale ack for a pre-rotation
|
|
@@ -18058,7 +18086,7 @@ class IE {
|
|
|
18058
18086
|
// of growing forever. authorSnapshot's own isAuthoringSnapshot/syncId guards keep the
|
|
18059
18087
|
// fire-and-forget re-entrant-safe when triggered mid-hydrate.
|
|
18060
18088
|
maybeAuthorSnapshotAfterSend() {
|
|
18061
|
-
this.updatesSinceSnapshot += 1,
|
|
18089
|
+
this.updatesSinceSnapshot += 1, RE({
|
|
18062
18090
|
canAuthor: !this.joinOnly,
|
|
18063
18091
|
updatesSinceLastSnapshot: this.updatesSinceSnapshot,
|
|
18064
18092
|
threshold: this.SNAPSHOT_THRESHOLD
|
|
@@ -18312,7 +18340,7 @@ class IE {
|
|
|
18312
18340
|
decrypted: v
|
|
18313
18341
|
}), r && v && (fc(b.data) ? r.xchachaRows += 1 : r.eciesRows += 1);
|
|
18314
18342
|
}
|
|
18315
|
-
const p =
|
|
18343
|
+
const p = BE(d, i);
|
|
18316
18344
|
i = p.incomplete;
|
|
18317
18345
|
const g = p.seqs;
|
|
18318
18346
|
if (r && (r.pages += 1, r.tailRows += d.filter((b) => b.isTail).length, u.snapshot && r.snapshotFormat === null && (r.snapshotFormat = fc(u.snapshot.data) ? "xchacha" : "ecies")), l.length) {
|
|
@@ -18320,7 +18348,7 @@ class IE {
|
|
|
18320
18348
|
at.applyUpdate(this.ydoc, b, "self"), s = s || d.some((v) => v.isTail && v.seq !== null), r && (r.merged = r.merged ? at.mergeUpdates([r.merged, b]) : b);
|
|
18321
18349
|
}
|
|
18322
18350
|
const y = u.snapshot && typeof u.snapshot.floorSeq == "number" && h && !i ? u.snapshot.floorSeq : 0;
|
|
18323
|
-
if (this.floor =
|
|
18351
|
+
if (this.floor = _E(Math.max(this.floor, y), g), u.hasMore && typeof u.nextSeq == "number") {
|
|
18324
18352
|
o = u.nextSeq;
|
|
18325
18353
|
continue;
|
|
18326
18354
|
}
|
|
@@ -18370,7 +18398,7 @@ class IE {
|
|
|
18370
18398
|
await this.withRetry(async () => {
|
|
18371
18399
|
const a = await this.catchUpFloor(t, s);
|
|
18372
18400
|
if (!r() || (a && this.isOwner && this.send({ type: "SET_UNMERGED_UPDATES", hasUpdates: !0 }), !n || !o) || s.pages === 0 || s.incomplete && s.merged === null) return;
|
|
18373
|
-
const c =
|
|
18401
|
+
const c = IE(this.ydoc, s.merged);
|
|
18374
18402
|
c && r() && await this.broadcastLocalContents(Xt(c), t);
|
|
18375
18403
|
}, "hydrate"), n && s.pages > 0 && r() && this.emitWireTelemetry({
|
|
18376
18404
|
type: "hydrate",
|
|
@@ -18631,9 +18659,9 @@ class IE {
|
|
|
18631
18659
|
this.sessionGen += 1, this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.sendRetryTimer && (clearTimeout(this.sendRetryTimer), this.sendRetryTimer = null), this.sendFailures = 0, this.mirrorIdleTimer && (clearTimeout(this.mirrorIdleTimer), this.mirrorIdleTimer = null), this.deferredSnapshotTimer && (clearTimeout(this.deferredSnapshotTimer), this.deferredSnapshotTimer = null), this.gapCatchUpTimer && (clearTimeout(this.gapCatchUpTimer), this.gapCatchUpTimer = null), this.gapCatchUpInFlight = !1, this.gapCatchUpCooldownUntil = 0, this.socketClient = null, this.updateQueue = [], this.contentTobeAppliedQueue = [], this.isProcessing = !1, this.roomKey = "", this.roomKeyBytes = null, this.isOwner = !1, this.floor = 0, this.hydrationIncomplete = !1, this.wireFormat = "ecies", this.lastReportedWriteFormat = null, this.updatesSinceSnapshot = 0, this.isAuthoringSnapshot = !1, this.rotating = !1, this.roomKeyBytesPrev = null, this.pendingRotationKey = null, this.healingPromise = null, this.staleAckRetries = 0;
|
|
18632
18660
|
}
|
|
18633
18661
|
}
|
|
18634
|
-
const
|
|
18635
|
-
const [t, r] = pe(
|
|
18636
|
-
n.current || (n.current = new
|
|
18662
|
+
const zE = { status: "idle" }, KE = (e) => {
|
|
18663
|
+
const [t, r] = pe(zE), n = ie(null), o = ie(!1);
|
|
18664
|
+
n.current || (n.current = new HE(e, r));
|
|
18637
18665
|
const s = n.current;
|
|
18638
18666
|
s.updateRefs(e.services, e.callbacks, e.onLocalUpdate);
|
|
18639
18667
|
const i = s.isConnected, a = s.awareness;
|
|
@@ -18721,7 +18749,7 @@ const BE = { status: "idle" }, OE = (e) => {
|
|
|
18721
18749
|
awareness: a,
|
|
18722
18750
|
hasCollabContentInitialised: b
|
|
18723
18751
|
};
|
|
18724
|
-
},
|
|
18752
|
+
}, jE = ({
|
|
18725
18753
|
onChange: e,
|
|
18726
18754
|
enableIndexeddbSync: t,
|
|
18727
18755
|
ddocId: r,
|
|
@@ -18739,7 +18767,7 @@ const BE = { status: "idle" }, OE = (e) => {
|
|
|
18739
18767
|
awareness: N,
|
|
18740
18768
|
hasCollabContentInitialised: E,
|
|
18741
18769
|
state: F
|
|
18742
|
-
} =
|
|
18770
|
+
} = KE({
|
|
18743
18771
|
ydoc: i,
|
|
18744
18772
|
services: l,
|
|
18745
18773
|
callbacks: d,
|
|
@@ -18867,7 +18895,7 @@ const BE = { status: "idle" }, OE = (e) => {
|
|
|
18867
18895
|
]
|
|
18868
18896
|
), ce = ie(Z);
|
|
18869
18897
|
ce.current = Z;
|
|
18870
|
-
const de =
|
|
18898
|
+
const de = jE({
|
|
18871
18899
|
onChange: s,
|
|
18872
18900
|
enableIndexeddbSync: y,
|
|
18873
18901
|
ddocId: g,
|
|
@@ -18979,7 +19007,7 @@ const BE = { status: "idle" }, OE = (e) => {
|
|
|
18979
19007
|
duplicateTab: ye.duplicateTab,
|
|
18980
19008
|
orderTab: ye.orderTab
|
|
18981
19009
|
};
|
|
18982
|
-
},
|
|
19010
|
+
}, VE = (e) => {
|
|
18983
19011
|
var s, i, a;
|
|
18984
19012
|
const t = (s = e == null ? void 0 : e.view) == null ? void 0 : s.dom;
|
|
18985
19013
|
if (!t) return;
|
|
@@ -18988,7 +19016,7 @@ const BE = { status: "idle" }, OE = (e) => {
|
|
|
18988
19016
|
if (!r || r.rangeCount === 0) return;
|
|
18989
19017
|
const { anchorNode: n, focusNode: o } = r;
|
|
18990
19018
|
!n || !t.contains(n) || o && !t.contains(o) || r.removeAllRanges();
|
|
18991
|
-
},
|
|
19019
|
+
}, $E = ({
|
|
18992
19020
|
editor: e,
|
|
18993
19021
|
onError: t,
|
|
18994
19022
|
isKeyboardVisible: r,
|
|
@@ -19055,7 +19083,7 @@ const BE = { status: "idle" }, OE = (e) => {
|
|
|
19055
19083
|
);
|
|
19056
19084
|
le(() => {
|
|
19057
19085
|
const x = u !== ht.NONE;
|
|
19058
|
-
return A(x), x &&
|
|
19086
|
+
return A(x), x && VE(e), () => A(!1);
|
|
19059
19087
|
}, [u, e, A]), le(() => {
|
|
19060
19088
|
if (u === ht.LINK_POPUP) {
|
|
19061
19089
|
const { text: x, url: D } = F();
|
|
@@ -19171,7 +19199,7 @@ const BE = { status: "idle" }, OE = (e) => {
|
|
|
19171
19199
|
}
|
|
19172
19200
|
)
|
|
19173
19201
|
] });
|
|
19174
|
-
}, Kp = St.memo(
|
|
19202
|
+
}, Kp = St.memo($E);
|
|
19175
19203
|
Kp.displayName = "MobileToolbar";
|
|
19176
19204
|
new Dc({
|
|
19177
19205
|
html: !0,
|
|
@@ -19190,7 +19218,7 @@ ir.addRule("pageBreak", {
|
|
|
19190
19218
|
`;
|
|
19191
19219
|
}
|
|
19192
19220
|
});
|
|
19193
|
-
const
|
|
19221
|
+
const qE = (e) => {
|
|
19194
19222
|
if (!e.nodeName) return "";
|
|
19195
19223
|
switch (e.nodeName) {
|
|
19196
19224
|
case "H1":
|
|
@@ -19206,7 +19234,7 @@ const UE = (e) => {
|
|
|
19206
19234
|
ir.addRule("heading", {
|
|
19207
19235
|
filter: ["h1", "h2", "h3"],
|
|
19208
19236
|
replacement: function(e, t) {
|
|
19209
|
-
const r =
|
|
19237
|
+
const r = qE(t), n = e.replace(/\n\n===\n\n/g, "<br>");
|
|
19210
19238
|
return `${r} ${n}`;
|
|
19211
19239
|
}
|
|
19212
19240
|
});
|
|
@@ -19273,7 +19301,7 @@ ir.addRule("taskListItem", {
|
|
|
19273
19301
|
` : ""}`;
|
|
19274
19302
|
}
|
|
19275
19303
|
});
|
|
19276
|
-
const
|
|
19304
|
+
const WE = async (e, t, r) => {
|
|
19277
19305
|
const n = e.state.doc, o = await Ng(
|
|
19278
19306
|
n,
|
|
19279
19307
|
t,
|
|
@@ -19289,7 +19317,7 @@ const PE = async (e, t, r) => {
|
|
|
19289
19317
|
} finally {
|
|
19290
19318
|
Hl(!1), s.destroy();
|
|
19291
19319
|
}
|
|
19292
|
-
},
|
|
19320
|
+
}, GE = ({
|
|
19293
19321
|
slides: e,
|
|
19294
19322
|
currentSlide: t,
|
|
19295
19323
|
setCurrentSlide: r,
|
|
@@ -19396,7 +19424,7 @@ en.renderer.rules.list_item_open = (e, t) => {
|
|
|
19396
19424
|
}
|
|
19397
19425
|
return "<li>";
|
|
19398
19426
|
};
|
|
19399
|
-
const
|
|
19427
|
+
const YE = (e, t, r) => {
|
|
19400
19428
|
const n = [], o = t.reduce((i, a) => i + a.length, 0) / t.length, s = Math.min(
|
|
19401
19429
|
r - 2,
|
|
19402
19430
|
// Account for header and separator
|
|
@@ -19427,7 +19455,7 @@ const zE = (e, t, r) => {
|
|
|
19427
19455
|
else
|
|
19428
19456
|
n += (n ? " " : "") + s;
|
|
19429
19457
|
return n && r.push(n.trim()), r;
|
|
19430
|
-
},
|
|
19458
|
+
}, XE = (e, t) => {
|
|
19431
19459
|
const r = [], n = e[0].slice(3).trim(), o = e.slice(1, -1);
|
|
19432
19460
|
for (let s = 0; s < o.length; s += t - 2) {
|
|
19433
19461
|
const i = [
|
|
@@ -19445,7 +19473,7 @@ const zE = (e, t, r) => {
|
|
|
19445
19473
|
/^\d+\.\s/.test(e) || // Unordered list items
|
|
19446
19474
|
/^[-*+]\s/.test(e) || // Indented list items (nested)
|
|
19447
19475
|
/^\s+[-*+]\s/.test(e) || /^\s+\d+\.\s/.test(e)
|
|
19448
|
-
),
|
|
19476
|
+
), ZE = (e, t) => {
|
|
19449
19477
|
const r = [];
|
|
19450
19478
|
let n = t;
|
|
19451
19479
|
for (; n < e.length && (jp(e[n]) || e[n].trim() === ""); )
|
|
@@ -19462,18 +19490,18 @@ const zE = (e, t, r) => {
|
|
|
19462
19490
|
n.push(r.slice(o, o + t).join(`
|
|
19463
19491
|
`));
|
|
19464
19492
|
return n;
|
|
19465
|
-
},
|
|
19493
|
+
}, QE = (e) => {
|
|
19466
19494
|
var o, s, i;
|
|
19467
19495
|
const n = new DOMParser().parseFromString(e, "text/html").querySelector(
|
|
19468
19496
|
'figure[data-type="resizable-media"]'
|
|
19469
19497
|
);
|
|
19470
19498
|
return n ? (n.classList.add("slide-media"), (o = n.querySelector("img")) == null || o.classList.add("slide-image"), (s = n.querySelector("video")) == null || s.classList.add("slide-video"), (i = n.querySelector("figcaption")) == null || i.classList.add("slide-caption"), n.outerHTML) : null;
|
|
19471
|
-
},
|
|
19499
|
+
}, JE = (e) => {
|
|
19472
19500
|
var s;
|
|
19473
19501
|
const r = new DOMParser().parseFromString(e, "text/html"), n = r.querySelector("img.slide-image"), o = r.querySelector("figcaption, .slide-caption");
|
|
19474
19502
|
return !!n && !((s = o == null ? void 0 : o.textContent) != null && s.trim()) && r.body.children.length === 1;
|
|
19475
19503
|
};
|
|
19476
|
-
function
|
|
19504
|
+
function e6(e, t = {}) {
|
|
19477
19505
|
var E, F;
|
|
19478
19506
|
const {
|
|
19479
19507
|
preserveNewlines: r = !0,
|
|
@@ -19553,7 +19581,7 @@ function qE(e, t = {}) {
|
|
|
19553
19581
|
if (w.length < 2) return [""];
|
|
19554
19582
|
const x = w[0].split("|").map((I) => I.trim()).filter(Boolean), D = w[1], S = w.slice(2);
|
|
19555
19583
|
return w.length <= i ? [`<div class="table-wrapper">${en.render(A.join(`
|
|
19556
|
-
`))}</div>`] :
|
|
19584
|
+
`))}</div>`] : YE(x, S, i).map((I) => {
|
|
19557
19585
|
const L = [
|
|
19558
19586
|
`|${x.join("|")}|`,
|
|
19559
19587
|
D,
|
|
@@ -19567,7 +19595,7 @@ function qE(e, t = {}) {
|
|
|
19567
19595
|
for (let A = 0; A < v.length; A++) {
|
|
19568
19596
|
const w = v[A].trim();
|
|
19569
19597
|
if (jp(w)) {
|
|
19570
|
-
const { listContent: x, endIndex: D } =
|
|
19598
|
+
const { listContent: x, endIndex: D } = ZE(v, A), S = x.split(`
|
|
19571
19599
|
`).filter((I) => I.trim()), T = S.reduce(
|
|
19572
19600
|
(I, L) => I + d(L),
|
|
19573
19601
|
0
|
|
@@ -19644,7 +19672,7 @@ function qE(e, t = {}) {
|
|
|
19644
19672
|
l.push(w);
|
|
19645
19673
|
else {
|
|
19646
19674
|
if (l.push(w), l.length > i)
|
|
19647
|
-
|
|
19675
|
+
XE(l, 23).forEach((D, S) => {
|
|
19648
19676
|
(S > 0 || h(D, c)) && g(), c.push({
|
|
19649
19677
|
type: "content",
|
|
19650
19678
|
content: en.render(D)
|
|
@@ -19671,7 +19699,7 @@ function qE(e, t = {}) {
|
|
|
19671
19699
|
for (; A + 1 < v.length && !x.some((T) => T.includes("</figure>")); )
|
|
19672
19700
|
x.push(v[++A]);
|
|
19673
19701
|
const D = x.join(`
|
|
19674
|
-
`).trim(), S =
|
|
19702
|
+
`).trim(), S = QE(D);
|
|
19675
19703
|
if (S) {
|
|
19676
19704
|
y("media", S, D);
|
|
19677
19705
|
continue;
|
|
@@ -19724,7 +19752,7 @@ function qE(e, t = {}) {
|
|
|
19724
19752
|
`).replace(/>\n+</g, `>
|
|
19725
19753
|
<`)), n && (N = Rg.sanitize(N)), N;
|
|
19726
19754
|
}
|
|
19727
|
-
const
|
|
19755
|
+
const t6 = ({
|
|
19728
19756
|
content: e,
|
|
19729
19757
|
editor: t,
|
|
19730
19758
|
onTouchStart: r,
|
|
@@ -19737,7 +19765,7 @@ const WE = ({
|
|
|
19737
19765
|
le(() => {
|
|
19738
19766
|
setTimeout(() => {
|
|
19739
19767
|
var d;
|
|
19740
|
-
(d = t.view) != null && d.dom && (t.commands.setContent(e),
|
|
19768
|
+
(d = t.view) != null && d.dom && (t.commands.setContent(e), JE(e) ? t.view.dom.classList.add("solo-slide-image") : t.view.dom.classList.remove("solo-slide-image"));
|
|
19741
19769
|
});
|
|
19742
19770
|
}, [e]);
|
|
19743
19771
|
const c = Mo(
|
|
@@ -19768,7 +19796,7 @@ const WE = ({
|
|
|
19768
19796
|
onTouchEnd: o
|
|
19769
19797
|
}
|
|
19770
19798
|
);
|
|
19771
|
-
},
|
|
19799
|
+
}, n6 = ({
|
|
19772
19800
|
editor: e,
|
|
19773
19801
|
onClose: t,
|
|
19774
19802
|
isFullscreen: r,
|
|
@@ -19819,11 +19847,11 @@ const WE = ({
|
|
|
19819
19847
|
return;
|
|
19820
19848
|
}
|
|
19821
19849
|
w(!0);
|
|
19822
|
-
const Y = await
|
|
19850
|
+
const Y = await WE(
|
|
19823
19851
|
e,
|
|
19824
19852
|
g,
|
|
19825
19853
|
b
|
|
19826
|
-
), ue =
|
|
19854
|
+
), ue = e6(Y, {
|
|
19827
19855
|
preserveNewlines: !0,
|
|
19828
19856
|
sanitize: !0,
|
|
19829
19857
|
maxCharsPerSlide: 1e3,
|
|
@@ -19906,7 +19934,7 @@ const WE = ({
|
|
|
19906
19934
|
),
|
|
19907
19935
|
children: [
|
|
19908
19936
|
!r && /* @__PURE__ */ f(
|
|
19909
|
-
|
|
19937
|
+
GE,
|
|
19910
19938
|
{
|
|
19911
19939
|
slides: l,
|
|
19912
19940
|
currentSlide: E,
|
|
@@ -20050,7 +20078,7 @@ const WE = ({
|
|
|
20050
20078
|
},
|
|
20051
20079
|
E
|
|
20052
20080
|
) }) : /* @__PURE__ */ f(
|
|
20053
|
-
|
|
20081
|
+
t6,
|
|
20054
20082
|
{
|
|
20055
20083
|
content: l[E],
|
|
20056
20084
|
editor: X,
|
|
@@ -20093,7 +20121,7 @@ const WE = ({
|
|
|
20093
20121
|
]
|
|
20094
20122
|
}
|
|
20095
20123
|
);
|
|
20096
|
-
},
|
|
20124
|
+
}, r6 = ({
|
|
20097
20125
|
username: e,
|
|
20098
20126
|
setUsername: t,
|
|
20099
20127
|
isConnected: r,
|
|
@@ -20164,15 +20192,15 @@ const WE = ({
|
|
|
20164
20192
|
}
|
|
20165
20193
|
)
|
|
20166
20194
|
}
|
|
20167
|
-
), XE = "data:image/svg+xml,%3csvg%20width='192'%20height='160'%20viewBox='0%200%20192%20160'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8C2.5%203.85787%205.85786%200.5%2010%200.5Z'%20fill='white'/%3e%3cpath%20d='M10%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8C2.5%203.85787%205.85786%200.5%2010%200.5Z'%20stroke='%23E8EBEC'/%3e%3cpath%20d='M14%2024C14%2015.1634%2021.1634%208%2030%208V8C38.8366%208%2046%2015.1634%2046%2024V24C46%2032.8366%2038.8366%2040%2030%2040V40C21.1634%2040%2014%2032.8366%2014%2024V24Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2015C56%2012.7909%2057.7909%2011%2060%2011H174C176.209%2011%20178%2012.7909%20178%2015V18C178%2020.2091%20176.209%2022%20174%2022H60C57.7909%2022%2056%2020.2091%2056%2018V15Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2030C56%2027.7909%2057.7909%2026%2060%2026H112C114.209%2026%20116%2027.7909%20116%2030V33C116%2035.2091%20114.209%2037%20112%2037H60C57.7909%2037%2056%2035.2091%2056%2033V30Z'%20fill='%23E8EBEC'/%3e%3cg%20filter='url(%23filter0_d_4765_56257)'%3e%3cpath%20d='M2%2064C2%2059.5817%205.58172%2056%2010%2056H182C186.418%2056%20190%2059.5817%20190%2064V96C190%20100.418%20186.418%20104%20182%20104H10C5.58172%20104%202%20100.418%202%2096V64Z'%20fill='white'/%3e%3cpath%20d='M10%2056.5H182C186.142%2056.5%20189.5%2059.8579%20189.5%2064V96C189.5%20100.142%20186.142%20103.5%20182%20103.5H10C5.85786%20103.5%202.5%20100.142%202.5%2096V64C2.5%2059.8579%205.85786%2056.5%2010%2056.5Z'%20stroke='%23EFC703'/%3e%3cpath%20d='M14%2080C14%2071.1634%2021.1634%2064%2030%2064V64C38.8366%2064%2046%2071.1634%2046%2080V80C46%2088.8366%2038.8366%2096%2030%2096V96C21.1634%2096%2014%2088.8366%2014%2080V80Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2071C56%2068.7909%2057.7909%2067%2060%2067H174C176.209%2067%20178%2068.7909%20178%2071V74C178%2076.2091%20176.209%2078%20174%2078H60C57.7909%2078%2056%2076.2091%2056%2074V71Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2086C56%2083.7909%2057.7909%2082%2060%2082H112C114.209%2082%20116%2083.7909%20116%2086V89C116%2091.2091%20114.209%2093%20112%2093H60C57.7909%2093%2056%2091.2091%2056%2089V86Z'%20fill='%23E8EBEC'/%3e%3c/g%3e%3cpath%20d='M10%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120C2.5%20115.858%205.85786%20112.5%2010%20112.5Z'%20fill='white'/%3e%3cpath%20d='M10%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120C2.5%20115.858%205.85786%20112.5%2010%20112.5Z'%20stroke='%23E8EBEC'/%3e%3cpath%20d='M14%20136C14%20127.163%2021.1634%20120%2030%20120V120C38.8366%20120%2046%20127.163%2046%20136V136C46%20144.837%2038.8366%20152%2030%20152V152C21.1634%20152%2014%20144.837%2014%20136V136Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%20127C56%20124.791%2057.7909%20123%2060%20123H174C176.209%20123%20178%20124.791%20178%20127V130C178%20132.209%20176.209%20134%20174%20134H60C57.7909%20134%2056%20132.209%2056%20130V127Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%20142C56%20139.791%2057.7909%20138%2060%20138H112C114.209%20138%20116%20139.791%20116%20142V145C116%20147.209%20114.209%20149%20112%20149H60C57.7909%20149%2056%20147.209%2056%20145V142Z'%20fill='%23E8EBEC'/%3e%3crect%20x='2'%20width='188'%20height='56'%20fill='url(%23paint0_linear_4765_56257)'/%3e%3crect%20x='2'%20y='104'%20width='188'%20height='56'%20fill='url(%23paint1_linear_4765_56257)'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_4765_56257'%20x='0'%20y='55'%20width='192'%20height='52'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='1'/%3e%3cfeGaussianBlur%20stdDeviation='1'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.937255%200%200%200%200%200.780392%200%200%200%200%200.0117647%200%200%200%200.32%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_4765_56257'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_4765_56257'%20result='shape'/%3e%3c/filter%3e%3clinearGradient%20id='paint0_linear_4765_56257'%20x1='96'%20y1='0'%20x2='96'%20y2='56'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_4765_56257'%20x1='96'%20y1='160'%20x2='96'%20y2='104'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", ZE = "data:image/svg+xml,%3csvg%20width='192'%20height='160'%20viewBox='0%200%20192%20160'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%208C2.5%203.85787%205.85786%200.5%2010%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8Z'%20fill='%232E2E2E'/%3e%3cpath%20d='M2.5%208C2.5%203.85787%205.85786%200.5%2010%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8Z'%20stroke='%23404040'/%3e%3cpath%20d='M14%2024C14%2015.1634%2021.1634%208%2030%208C38.8366%208%2046%2015.1634%2046%2024C46%2032.8366%2038.8366%2040%2030%2040C21.1634%2040%2014%2032.8366%2014%2024Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2015C56%2012.7909%2057.7909%2011%2060%2011H174C176.209%2011%20178%2012.7909%20178%2015V18C178%2020.2091%20176.209%2022%20174%2022H60C57.7909%2022%2056%2020.2091%2056%2018V15Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2030C56%2027.7909%2057.7909%2026%2060%2026H112C114.209%2026%20116%2027.7909%20116%2030V33C116%2035.2091%20114.209%2037%20112%2037H60C57.7909%2037%2056%2035.2091%2056%2033V30Z'%20fill='%23404040'/%3e%3cg%20filter='url(%23filter0_d_5573_80525)'%3e%3cpath%20d='M2%2064C2%2059.5817%205.58172%2056%2010%2056H182C186.418%2056%20190%2059.5817%20190%2064V96C190%20100.418%20186.418%20104%20182%20104H10C5.58172%20104%202%20100.418%202%2096V64Z'%20fill='%232E2E2E'/%3e%3cpath%20d='M2.5%2064C2.5%2059.8579%205.85786%2056.5%2010%2056.5H182C186.142%2056.5%20189.5%2059.8579%20189.5%2064V96C189.5%20100.142%20186.142%20103.5%20182%20103.5H10C5.85786%20103.5%202.5%20100.142%202.5%2096V64Z'%20stroke='%23EFC703'/%3e%3cpath%20d='M14%2080C14%2071.1634%2021.1634%2064%2030%2064C38.8366%2064%2046%2071.1634%2046%2080C46%2088.8366%2038.8366%2096%2030%2096C21.1634%2096%2014%2088.8366%2014%2080Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2071C56%2068.7909%2057.7909%2067%2060%2067H174C176.209%2067%20178%2068.7909%20178%2071V74C178%2076.2091%20176.209%2078%20174%2078H60C57.7909%2078%2056%2076.2091%2056%2074V71Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2086C56%2083.7909%2057.7909%2082%2060%2082H112C114.209%2082%20116%2083.7909%20116%2086V89C116%2091.2091%20114.209%2093%20112%2093H60C57.7909%2093%2056%2091.2091%2056%2089V86Z'%20fill='%23404040'/%3e%3c/g%3e%3cpath%20d='M2.5%20120C2.5%20115.858%205.85786%20112.5%2010%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120Z'%20fill='%232E2E2E'/%3e%3cpath%20d='M2.5%20120C2.5%20115.858%205.85786%20112.5%2010%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120Z'%20stroke='%23404040'/%3e%3cpath%20d='M14%20136C14%20127.163%2021.1634%20120%2030%20120C38.8366%20120%2046%20127.163%2046%20136C46%20144.837%2038.8366%20152%2030%20152C21.1634%20152%2014%20144.837%2014%20136Z'%20fill='%23404040'/%3e%3cpath%20d='M56%20127C56%20124.791%2057.7909%20123%2060%20123H174C176.209%20123%20178%20124.791%20178%20127V130C178%20132.209%20176.209%20134%20174%20134H60C57.7909%20134%2056%20132.209%2056%20130V127Z'%20fill='%23404040'/%3e%3cpath%20d='M56%20142C56%20139.791%2057.7909%20138%2060%20138H112C114.209%20138%20116%20139.791%20116%20142V145C116%20147.209%20114.209%20149%20112%20149H60C57.7909%20149%2056%20147.209%2056%20145V142Z'%20fill='%23404040'/%3e%3crect%20x='2'%20width='188'%20height='56'%20fill='url(%23paint0_linear_5573_80525)'/%3e%3crect%20x='2'%20y='104'%20width='188'%20height='56'%20fill='url(%23paint1_linear_5573_80525)'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_5573_80525'%20x='0'%20y='55'%20width='192'%20height='52'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='1'/%3e%3cfeGaussianBlur%20stdDeviation='1'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.937255%200%200%200%200%200.780392%200%200%200%200%200.0117647%200%200%200%200.32%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_5573_80525'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_5573_80525'%20result='shape'/%3e%3c/filter%3e%3clinearGradient%20id='paint0_linear_5573_80525'%20x1='96'%20y1='0'%20x2='96'%20y2='56'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%232E2E2E'/%3e%3cstop%20offset='1'%20stop-color='%232E2E2E'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_5573_80525'%20x1='96'%20y1='160'%20x2='96'%20y2='104'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%232E2E2E'/%3e%3cstop%20offset='1'%20stop-color='%232E2E2E'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", QE = ({
|
|
20195
|
+
), o6 = "data:image/svg+xml,%3csvg%20width='192'%20height='160'%20viewBox='0%200%20192%20160'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8C2.5%203.85787%205.85786%200.5%2010%200.5Z'%20fill='white'/%3e%3cpath%20d='M10%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8C2.5%203.85787%205.85786%200.5%2010%200.5Z'%20stroke='%23E8EBEC'/%3e%3cpath%20d='M14%2024C14%2015.1634%2021.1634%208%2030%208V8C38.8366%208%2046%2015.1634%2046%2024V24C46%2032.8366%2038.8366%2040%2030%2040V40C21.1634%2040%2014%2032.8366%2014%2024V24Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2015C56%2012.7909%2057.7909%2011%2060%2011H174C176.209%2011%20178%2012.7909%20178%2015V18C178%2020.2091%20176.209%2022%20174%2022H60C57.7909%2022%2056%2020.2091%2056%2018V15Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2030C56%2027.7909%2057.7909%2026%2060%2026H112C114.209%2026%20116%2027.7909%20116%2030V33C116%2035.2091%20114.209%2037%20112%2037H60C57.7909%2037%2056%2035.2091%2056%2033V30Z'%20fill='%23E8EBEC'/%3e%3cg%20filter='url(%23filter0_d_4765_56257)'%3e%3cpath%20d='M2%2064C2%2059.5817%205.58172%2056%2010%2056H182C186.418%2056%20190%2059.5817%20190%2064V96C190%20100.418%20186.418%20104%20182%20104H10C5.58172%20104%202%20100.418%202%2096V64Z'%20fill='white'/%3e%3cpath%20d='M10%2056.5H182C186.142%2056.5%20189.5%2059.8579%20189.5%2064V96C189.5%20100.142%20186.142%20103.5%20182%20103.5H10C5.85786%20103.5%202.5%20100.142%202.5%2096V64C2.5%2059.8579%205.85786%2056.5%2010%2056.5Z'%20stroke='%23EFC703'/%3e%3cpath%20d='M14%2080C14%2071.1634%2021.1634%2064%2030%2064V64C38.8366%2064%2046%2071.1634%2046%2080V80C46%2088.8366%2038.8366%2096%2030%2096V96C21.1634%2096%2014%2088.8366%2014%2080V80Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2071C56%2068.7909%2057.7909%2067%2060%2067H174C176.209%2067%20178%2068.7909%20178%2071V74C178%2076.2091%20176.209%2078%20174%2078H60C57.7909%2078%2056%2076.2091%2056%2074V71Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%2086C56%2083.7909%2057.7909%2082%2060%2082H112C114.209%2082%20116%2083.7909%20116%2086V89C116%2091.2091%20114.209%2093%20112%2093H60C57.7909%2093%2056%2091.2091%2056%2089V86Z'%20fill='%23E8EBEC'/%3e%3c/g%3e%3cpath%20d='M10%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120C2.5%20115.858%205.85786%20112.5%2010%20112.5Z'%20fill='white'/%3e%3cpath%20d='M10%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120C2.5%20115.858%205.85786%20112.5%2010%20112.5Z'%20stroke='%23E8EBEC'/%3e%3cpath%20d='M14%20136C14%20127.163%2021.1634%20120%2030%20120V120C38.8366%20120%2046%20127.163%2046%20136V136C46%20144.837%2038.8366%20152%2030%20152V152C21.1634%20152%2014%20144.837%2014%20136V136Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%20127C56%20124.791%2057.7909%20123%2060%20123H174C176.209%20123%20178%20124.791%20178%20127V130C178%20132.209%20176.209%20134%20174%20134H60C57.7909%20134%2056%20132.209%2056%20130V127Z'%20fill='%23E8EBEC'/%3e%3cpath%20d='M56%20142C56%20139.791%2057.7909%20138%2060%20138H112C114.209%20138%20116%20139.791%20116%20142V145C116%20147.209%20114.209%20149%20112%20149H60C57.7909%20149%2056%20147.209%2056%20145V142Z'%20fill='%23E8EBEC'/%3e%3crect%20x='2'%20width='188'%20height='56'%20fill='url(%23paint0_linear_4765_56257)'/%3e%3crect%20x='2'%20y='104'%20width='188'%20height='56'%20fill='url(%23paint1_linear_4765_56257)'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_4765_56257'%20x='0'%20y='55'%20width='192'%20height='52'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='1'/%3e%3cfeGaussianBlur%20stdDeviation='1'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.937255%200%200%200%200%200.780392%200%200%200%200%200.0117647%200%200%200%200.32%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_4765_56257'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_4765_56257'%20result='shape'/%3e%3c/filter%3e%3clinearGradient%20id='paint0_linear_4765_56257'%20x1='96'%20y1='0'%20x2='96'%20y2='56'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_4765_56257'%20x1='96'%20y1='160'%20x2='96'%20y2='104'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", s6 = "data:image/svg+xml,%3csvg%20width='192'%20height='160'%20viewBox='0%200%20192%20160'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%208C2.5%203.85787%205.85786%200.5%2010%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8Z'%20fill='%232E2E2E'/%3e%3cpath%20d='M2.5%208C2.5%203.85787%205.85786%200.5%2010%200.5H182C186.142%200.5%20189.5%203.85786%20189.5%208V40C189.5%2044.1421%20186.142%2047.5%20182%2047.5H10C5.85786%2047.5%202.5%2044.1421%202.5%2040V8Z'%20stroke='%23404040'/%3e%3cpath%20d='M14%2024C14%2015.1634%2021.1634%208%2030%208C38.8366%208%2046%2015.1634%2046%2024C46%2032.8366%2038.8366%2040%2030%2040C21.1634%2040%2014%2032.8366%2014%2024Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2015C56%2012.7909%2057.7909%2011%2060%2011H174C176.209%2011%20178%2012.7909%20178%2015V18C178%2020.2091%20176.209%2022%20174%2022H60C57.7909%2022%2056%2020.2091%2056%2018V15Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2030C56%2027.7909%2057.7909%2026%2060%2026H112C114.209%2026%20116%2027.7909%20116%2030V33C116%2035.2091%20114.209%2037%20112%2037H60C57.7909%2037%2056%2035.2091%2056%2033V30Z'%20fill='%23404040'/%3e%3cg%20filter='url(%23filter0_d_5573_80525)'%3e%3cpath%20d='M2%2064C2%2059.5817%205.58172%2056%2010%2056H182C186.418%2056%20190%2059.5817%20190%2064V96C190%20100.418%20186.418%20104%20182%20104H10C5.58172%20104%202%20100.418%202%2096V64Z'%20fill='%232E2E2E'/%3e%3cpath%20d='M2.5%2064C2.5%2059.8579%205.85786%2056.5%2010%2056.5H182C186.142%2056.5%20189.5%2059.8579%20189.5%2064V96C189.5%20100.142%20186.142%20103.5%20182%20103.5H10C5.85786%20103.5%202.5%20100.142%202.5%2096V64Z'%20stroke='%23EFC703'/%3e%3cpath%20d='M14%2080C14%2071.1634%2021.1634%2064%2030%2064C38.8366%2064%2046%2071.1634%2046%2080C46%2088.8366%2038.8366%2096%2030%2096C21.1634%2096%2014%2088.8366%2014%2080Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2071C56%2068.7909%2057.7909%2067%2060%2067H174C176.209%2067%20178%2068.7909%20178%2071V74C178%2076.2091%20176.209%2078%20174%2078H60C57.7909%2078%2056%2076.2091%2056%2074V71Z'%20fill='%23404040'/%3e%3cpath%20d='M56%2086C56%2083.7909%2057.7909%2082%2060%2082H112C114.209%2082%20116%2083.7909%20116%2086V89C116%2091.2091%20114.209%2093%20112%2093H60C57.7909%2093%2056%2091.2091%2056%2089V86Z'%20fill='%23404040'/%3e%3c/g%3e%3cpath%20d='M2.5%20120C2.5%20115.858%205.85786%20112.5%2010%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120Z'%20fill='%232E2E2E'/%3e%3cpath%20d='M2.5%20120C2.5%20115.858%205.85786%20112.5%2010%20112.5H182C186.142%20112.5%20189.5%20115.858%20189.5%20120V152C189.5%20156.142%20186.142%20159.5%20182%20159.5H10C5.85786%20159.5%202.5%20156.142%202.5%20152V120Z'%20stroke='%23404040'/%3e%3cpath%20d='M14%20136C14%20127.163%2021.1634%20120%2030%20120C38.8366%20120%2046%20127.163%2046%20136C46%20144.837%2038.8366%20152%2030%20152C21.1634%20152%2014%20144.837%2014%20136Z'%20fill='%23404040'/%3e%3cpath%20d='M56%20127C56%20124.791%2057.7909%20123%2060%20123H174C176.209%20123%20178%20124.791%20178%20127V130C178%20132.209%20176.209%20134%20174%20134H60C57.7909%20134%2056%20132.209%2056%20130V127Z'%20fill='%23404040'/%3e%3cpath%20d='M56%20142C56%20139.791%2057.7909%20138%2060%20138H112C114.209%20138%20116%20139.791%20116%20142V145C116%20147.209%20114.209%20149%20112%20149H60C57.7909%20149%2056%20147.209%2056%20145V142Z'%20fill='%23404040'/%3e%3crect%20x='2'%20width='188'%20height='56'%20fill='url(%23paint0_linear_5573_80525)'/%3e%3crect%20x='2'%20y='104'%20width='188'%20height='56'%20fill='url(%23paint1_linear_5573_80525)'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_5573_80525'%20x='0'%20y='55'%20width='192'%20height='52'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='1'/%3e%3cfeGaussianBlur%20stdDeviation='1'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.937255%200%200%200%200%200.780392%200%200%200%200%200.0117647%200%200%200%200.32%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_5573_80525'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_5573_80525'%20result='shape'/%3e%3c/filter%3e%3clinearGradient%20id='paint0_linear_5573_80525'%20x1='96'%20y1='0'%20x2='96'%20y2='56'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%232E2E2E'/%3e%3cstop%20offset='1'%20stop-color='%232E2E2E'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_5573_80525'%20x1='96'%20y1='160'%20x2='96'%20y2='104'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%232E2E2E'/%3e%3cstop%20offset='1'%20stop-color='%232E2E2E'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", i6 = ({
|
|
20168
20196
|
commentType: e,
|
|
20169
20197
|
handleReset: t
|
|
20170
20198
|
}) => /* @__PURE__ */ U("div", { className: "flex flex-col items-center justify-center h-full color-text-default", children: [
|
|
20171
|
-
/* @__PURE__ */ f("img", { src:
|
|
20199
|
+
/* @__PURE__ */ f("img", { src: o6, alt: "empty comments", className: "dark:hidden" }),
|
|
20172
20200
|
/* @__PURE__ */ f(
|
|
20173
20201
|
"img",
|
|
20174
20202
|
{
|
|
20175
|
-
src:
|
|
20203
|
+
src: s6,
|
|
20176
20204
|
alt: "empty comments",
|
|
20177
20205
|
className: "hidden dark:block"
|
|
20178
20206
|
}
|
|
@@ -20194,14 +20222,14 @@ const WE = ({
|
|
|
20194
20222
|
" ",
|
|
20195
20223
|
"the filter parameters"
|
|
20196
20224
|
] })
|
|
20197
|
-
] }),
|
|
20225
|
+
] }), a6 = 20, jt = (e, t = 296) => {
|
|
20198
20226
|
e.rows = 1, e.style.height = "auto";
|
|
20199
20227
|
const r = Math.min(
|
|
20200
|
-
Math.max(e.scrollHeight,
|
|
20228
|
+
Math.max(e.scrollHeight, a6),
|
|
20201
20229
|
t
|
|
20202
20230
|
);
|
|
20203
20231
|
e.style.height = `${r}px`;
|
|
20204
|
-
},
|
|
20232
|
+
}, c6 = ({
|
|
20205
20233
|
commentId: e,
|
|
20206
20234
|
replyCount: t,
|
|
20207
20235
|
commentUsername: r
|
|
@@ -20304,7 +20332,7 @@ const WE = ({
|
|
|
20304
20332
|
}
|
|
20305
20333
|
)
|
|
20306
20334
|
] });
|
|
20307
|
-
},
|
|
20335
|
+
}, l6 = ({ tabId: e }) => {
|
|
20308
20336
|
const t = ae((c) => c.comment), r = ae((c) => c.username), n = ae((c) => c.handleCommentChange), o = ae((c) => c.handleCommentKeyDown), s = ae((c) => c.handleCommentSubmit), i = ie(null), a = Pn(r);
|
|
20309
20337
|
return le(() => {
|
|
20310
20338
|
i.current && jt(i.current, 96);
|
|
@@ -20355,7 +20383,7 @@ const WE = ({
|
|
|
20355
20383
|
) })
|
|
20356
20384
|
] });
|
|
20357
20385
|
};
|
|
20358
|
-
function
|
|
20386
|
+
function u6(e, t, r, n = !1) {
|
|
20359
20387
|
const {
|
|
20360
20388
|
activeCommentAnchorIds: o,
|
|
20361
20389
|
activeCommentAnchorIdsTabId: s,
|
|
@@ -20409,7 +20437,7 @@ const Vp = ({
|
|
|
20409
20437
|
}
|
|
20410
20438
|
),
|
|
20411
20439
|
B.map((P) => /* @__PURE__ */ f(
|
|
20412
|
-
|
|
20440
|
+
d6,
|
|
20413
20441
|
{
|
|
20414
20442
|
comment: P,
|
|
20415
20443
|
tabName: W(P),
|
|
@@ -20489,7 +20517,7 @@ const Vp = ({
|
|
|
20489
20517
|
!k && "px-4 pb-4",
|
|
20490
20518
|
" w-full overflow-y-auto h-full"
|
|
20491
20519
|
),
|
|
20492
|
-
children: q.length === 0 ? /* @__PURE__ */ f(
|
|
20520
|
+
children: q.length === 0 ? /* @__PURE__ */ f(i6, { commentType: s, handleReset: d }) : /* @__PURE__ */ f(
|
|
20493
20521
|
"div",
|
|
20494
20522
|
{
|
|
20495
20523
|
ref: I,
|
|
@@ -20516,9 +20544,9 @@ const Vp = ({
|
|
|
20516
20544
|
)
|
|
20517
20545
|
}
|
|
20518
20546
|
),
|
|
20519
|
-
u && /* @__PURE__ */ f(
|
|
20547
|
+
u && /* @__PURE__ */ f(l6, { tabId: c }),
|
|
20520
20548
|
k && $ && /* @__PURE__ */ f(
|
|
20521
|
-
|
|
20549
|
+
f6,
|
|
20522
20550
|
{
|
|
20523
20551
|
onUndo: () => {
|
|
20524
20552
|
E($), z(null);
|
|
@@ -20528,7 +20556,7 @@ const Vp = ({
|
|
|
20528
20556
|
]
|
|
20529
20557
|
}
|
|
20530
20558
|
) : /* @__PURE__ */ f(
|
|
20531
|
-
|
|
20559
|
+
r6,
|
|
20532
20560
|
{
|
|
20533
20561
|
connectViaWallet: x,
|
|
20534
20562
|
username: p,
|
|
@@ -20538,7 +20566,7 @@ const Vp = ({
|
|
|
20538
20566
|
isLoading: D
|
|
20539
20567
|
}
|
|
20540
20568
|
);
|
|
20541
|
-
},
|
|
20569
|
+
}, d6 = ({
|
|
20542
20570
|
comment: e,
|
|
20543
20571
|
tabName: t,
|
|
20544
20572
|
activeCommentId: r,
|
|
@@ -20555,7 +20583,7 @@ const Vp = ({
|
|
|
20555
20583
|
onSetOpenReplyId: p
|
|
20556
20584
|
}) => {
|
|
20557
20585
|
var N, E;
|
|
20558
|
-
const [g, y] = pe(!1), { isBelow1280px: b } = Fn(), v =
|
|
20586
|
+
const [g, y] = pe(!1), { isBelow1280px: b } = Fn(), v = u6(
|
|
20559
20587
|
e.id,
|
|
20560
20588
|
e.selectedContent,
|
|
20561
20589
|
e.tabId,
|
|
@@ -20631,7 +20659,7 @@ const Vp = ({
|
|
|
20631
20659
|
className: Ce("flex flex-col gap-2", e.resolved && "hidden"),
|
|
20632
20660
|
onClick: (F) => F.stopPropagation(),
|
|
20633
20661
|
children: a === e.id && /* @__PURE__ */ f(
|
|
20634
|
-
|
|
20662
|
+
c6,
|
|
20635
20663
|
{
|
|
20636
20664
|
commentId: e.id,
|
|
20637
20665
|
commentUsername: e.username,
|
|
@@ -20654,7 +20682,7 @@ const Vp = ({
|
|
|
20654
20682
|
]
|
|
20655
20683
|
}
|
|
20656
20684
|
);
|
|
20657
|
-
},
|
|
20685
|
+
}, f6 = ({ onUndo: e }) => /* @__PURE__ */ f(
|
|
20658
20686
|
"div",
|
|
20659
20687
|
{
|
|
20660
20688
|
className: "fixed bottom-4 left-0 right-0 z-[999999] flex items-center justify-center",
|
|
@@ -20682,7 +20710,7 @@ const Vp = ({
|
|
|
20682
20710
|
)
|
|
20683
20711
|
] })
|
|
20684
20712
|
}
|
|
20685
|
-
),
|
|
20713
|
+
), h6 = ({
|
|
20686
20714
|
activeCommentId: e,
|
|
20687
20715
|
commentType: t,
|
|
20688
20716
|
commentTypeOptions: r,
|
|
@@ -20780,7 +20808,7 @@ const Vp = ({
|
|
|
20780
20808
|
}
|
|
20781
20809
|
)
|
|
20782
20810
|
}
|
|
20783
|
-
),
|
|
20811
|
+
), p6 = ({
|
|
20784
20812
|
activeDraft: e,
|
|
20785
20813
|
activeDraftId: t,
|
|
20786
20814
|
isConnected: r,
|
|
@@ -20943,7 +20971,7 @@ const Vp = ({
|
|
|
20943
20971
|
return {
|
|
20944
20972
|
submitLabel: o
|
|
20945
20973
|
};
|
|
20946
|
-
},
|
|
20974
|
+
}, m6 = ({
|
|
20947
20975
|
activeSuggestionDraftCard: e,
|
|
20948
20976
|
isConnected: t,
|
|
20949
20977
|
isDiscardSuggestionOverlayVisible: r,
|
|
@@ -21040,7 +21068,7 @@ const Vp = ({
|
|
|
21040
21068
|
]
|
|
21041
21069
|
}
|
|
21042
21070
|
);
|
|
21043
|
-
},
|
|
21071
|
+
}, g6 = ({
|
|
21044
21072
|
activeCommentId: e,
|
|
21045
21073
|
activeDraft: t,
|
|
21046
21074
|
activeDraftId: r,
|
|
@@ -21086,7 +21114,7 @@ const Vp = ({
|
|
|
21086
21114
|
),
|
|
21087
21115
|
"data-comment-drawer-mobile-input": !0,
|
|
21088
21116
|
children: n ? /* @__PURE__ */ f(
|
|
21089
|
-
|
|
21117
|
+
m6,
|
|
21090
21118
|
{
|
|
21091
21119
|
activeSuggestionDraftCard: n,
|
|
21092
21120
|
isConnected: c,
|
|
@@ -21099,7 +21127,7 @@ const Vp = ({
|
|
|
21099
21127
|
onSubmit: k
|
|
21100
21128
|
}
|
|
21101
21129
|
) : d ? /* @__PURE__ */ f(
|
|
21102
|
-
|
|
21130
|
+
p6,
|
|
21103
21131
|
{
|
|
21104
21132
|
activeDraft: t,
|
|
21105
21133
|
activeDraftId: r,
|
|
@@ -21213,7 +21241,7 @@ const Vp = ({
|
|
|
21213
21241
|
}
|
|
21214
21242
|
)
|
|
21215
21243
|
}
|
|
21216
|
-
),
|
|
21244
|
+
), y6 = ({
|
|
21217
21245
|
selectedCommentTabId: e,
|
|
21218
21246
|
setOpenReplyId: t
|
|
21219
21247
|
}) => {
|
|
@@ -21263,11 +21291,11 @@ const Vp = ({
|
|
|
21263
21291
|
setIsDiscardSuggestionOverlayVisible: g,
|
|
21264
21292
|
updateInlineDraftText: l
|
|
21265
21293
|
};
|
|
21266
|
-
}, ko = "__all_tabs__",
|
|
21294
|
+
}, ko = "__all_tabs__", x6 = [
|
|
21267
21295
|
{ id: "all", label: "All types" },
|
|
21268
21296
|
{ id: "active", label: "Active" },
|
|
21269
21297
|
{ id: "resolved", label: "Resolved" }
|
|
21270
|
-
],
|
|
21298
|
+
], w6 = ({
|
|
21271
21299
|
activeTabId: e,
|
|
21272
21300
|
comments: t,
|
|
21273
21301
|
tabs: r
|
|
@@ -21296,7 +21324,7 @@ const Vp = ({
|
|
|
21296
21324
|
c(!1), l(!1);
|
|
21297
21325
|
}, []),
|
|
21298
21326
|
commentType: n,
|
|
21299
|
-
commentTypeOptions:
|
|
21327
|
+
commentTypeOptions: x6,
|
|
21300
21328
|
filteredComments: b,
|
|
21301
21329
|
handleCommentTypeSelectOpenChange: _,
|
|
21302
21330
|
handleTabSelectOpenChange: N,
|
|
@@ -21312,7 +21340,7 @@ const Vp = ({
|
|
|
21312
21340
|
tabList: h,
|
|
21313
21341
|
tabNameById: p
|
|
21314
21342
|
};
|
|
21315
|
-
},
|
|
21343
|
+
}, b6 = ({
|
|
21316
21344
|
activeTabId: e,
|
|
21317
21345
|
comments: t,
|
|
21318
21346
|
focusCommentInEditor: r,
|
|
@@ -21369,7 +21397,7 @@ const Vp = ({
|
|
|
21369
21397
|
window.removeEventListener("keydown", t);
|
|
21370
21398
|
};
|
|
21371
21399
|
}, [e]);
|
|
21372
|
-
},
|
|
21400
|
+
}, v6 = ({
|
|
21373
21401
|
activeSuggestionDraftCard: e,
|
|
21374
21402
|
closeFilterSelects: t,
|
|
21375
21403
|
isBelow1280px: r,
|
|
@@ -21404,7 +21432,7 @@ const Vp = ({
|
|
|
21404
21432
|
} : (ji(), () => {
|
|
21405
21433
|
ji();
|
|
21406
21434
|
}), [r, n, o, s]);
|
|
21407
|
-
},
|
|
21435
|
+
}, C6 = ({
|
|
21408
21436
|
comments: e,
|
|
21409
21437
|
mobileDrawerRef: t,
|
|
21410
21438
|
onCommentFocus: r,
|
|
@@ -21453,7 +21481,7 @@ const Vp = ({
|
|
|
21453
21481
|
mobileActiveCommentsCount: s.length,
|
|
21454
21482
|
mobileFocusedCommentIndex: i
|
|
21455
21483
|
};
|
|
21456
|
-
},
|
|
21484
|
+
}, E6 = ({
|
|
21457
21485
|
isOpen: e,
|
|
21458
21486
|
onClose: t,
|
|
21459
21487
|
isNavbarVisible: r,
|
|
@@ -21484,7 +21512,7 @@ const Vp = ({
|
|
|
21484
21512
|
setTab: q,
|
|
21485
21513
|
tabList: V,
|
|
21486
21514
|
tabNameById: M
|
|
21487
|
-
} =
|
|
21515
|
+
} = w6({ activeTabId: s, comments: u, tabs: c }), {
|
|
21488
21516
|
activeDraft: W,
|
|
21489
21517
|
activeDraftId: te,
|
|
21490
21518
|
activeSuggestionDraftCard: Y,
|
|
@@ -21498,7 +21526,7 @@ const Vp = ({
|
|
|
21498
21526
|
setIsDiscardCommentOverlayVisible: Z,
|
|
21499
21527
|
setIsDiscardSuggestionOverlayVisible: ce,
|
|
21500
21528
|
updateInlineDraftText: de
|
|
21501
|
-
} =
|
|
21529
|
+
} = y6({ selectedCommentTabId: K, setOpenReplyId: y }), Ae = p && re, ke = e || Y !== null, { clearPendingCommentFocus: ye, handleCommentFocus: ge } = b6({
|
|
21502
21530
|
activeTabId: s,
|
|
21503
21531
|
comments: u,
|
|
21504
21532
|
focusCommentInEditor: d,
|
|
@@ -21513,14 +21541,14 @@ const Vp = ({
|
|
|
21513
21541
|
handleViewAllComments: be,
|
|
21514
21542
|
mobileActiveCommentsCount: We,
|
|
21515
21543
|
mobileFocusedCommentIndex: C
|
|
21516
|
-
} =
|
|
21544
|
+
} = C6({
|
|
21517
21545
|
comments: u,
|
|
21518
21546
|
mobileDrawerRef: N,
|
|
21519
21547
|
onCommentFocus: ge,
|
|
21520
21548
|
openReplyId: g,
|
|
21521
21549
|
setOpenReplyId: y
|
|
21522
21550
|
});
|
|
21523
|
-
return
|
|
21551
|
+
return v6({
|
|
21524
21552
|
activeSuggestionDraftCard: Y,
|
|
21525
21553
|
closeFilterSelects: A,
|
|
21526
21554
|
isBelow1280px: _,
|
|
@@ -21531,7 +21559,7 @@ const Vp = ({
|
|
|
21531
21559
|
setIsDiscardCommentOverlayVisible: Z,
|
|
21532
21560
|
setIsDiscardSuggestionOverlayVisible: ce
|
|
21533
21561
|
}), /* @__PURE__ */ f("div", { ref: N, "data-testid": "comment-drawer", children: _ ? /* @__PURE__ */ f(
|
|
21534
|
-
|
|
21562
|
+
g6,
|
|
21535
21563
|
{
|
|
21536
21564
|
activeCommentId: o,
|
|
21537
21565
|
activeDraft: W,
|
|
@@ -21576,7 +21604,7 @@ const Vp = ({
|
|
|
21576
21604
|
username: v
|
|
21577
21605
|
}
|
|
21578
21606
|
) : /* @__PURE__ */ f(
|
|
21579
|
-
|
|
21607
|
+
h6,
|
|
21580
21608
|
{
|
|
21581
21609
|
activeCommentId: o,
|
|
21582
21610
|
commentType: w,
|
|
@@ -21604,7 +21632,7 @@ const Vp = ({
|
|
|
21604
21632
|
tabNameById: M
|
|
21605
21633
|
}
|
|
21606
21634
|
) });
|
|
21607
|
-
},
|
|
21635
|
+
}, S6 = ({
|
|
21608
21636
|
editor: e,
|
|
21609
21637
|
activeCommentId: t,
|
|
21610
21638
|
commentDrawerOpen: r,
|
|
@@ -21685,9 +21713,9 @@ const Vp = ({
|
|
|
21685
21713
|
)
|
|
21686
21714
|
}
|
|
21687
21715
|
);
|
|
21688
|
-
}, Wp = 8,
|
|
21716
|
+
}, Wp = 8, D6 = 48, A6 = 48;
|
|
21689
21717
|
var Ut = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Anchor = 1] = "Anchor", e[e.Viewport = 2] = "Viewport", e[e.Height = 4] = "Height", e[e.Visibility = 8] = "Visibility", e))(Ut || {});
|
|
21690
|
-
const
|
|
21718
|
+
const k6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured && e.anchorTop !== null && e.height > 0, hc = (e) => e === null ? null : Math.round(e), hl = (e) => e.lastCommittedTranslateY ?? e.anchorTop ?? null, pc = (e) => e.invalidationFlags !== 0, mc = (e, t) => hc(t) !== e.lastCommittedTranslateY, gc = (e, t) => {
|
|
21691
21719
|
e.set(t.floatingCardId, {
|
|
21692
21720
|
translateY: hl(t),
|
|
21693
21721
|
isVisible: !1
|
|
@@ -21703,7 +21731,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21703
21731
|
}, Yp = (e, t) => {
|
|
21704
21732
|
const r = Gp(t);
|
|
21705
21733
|
return r ? e === null ? r.bottom : Math.max(e, r.bottom) : e;
|
|
21706
|
-
},
|
|
21734
|
+
}, T6 = ({
|
|
21707
21735
|
floatingCards: e,
|
|
21708
21736
|
focusedFloatingCardId: t,
|
|
21709
21737
|
firstInvalidatedIndex: r,
|
|
@@ -21758,16 +21786,16 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21758
21786
|
stopIndex: d,
|
|
21759
21787
|
usedFocusedLayout: !0
|
|
21760
21788
|
};
|
|
21761
|
-
},
|
|
21789
|
+
}, N6 = ({
|
|
21762
21790
|
floatingCards: e,
|
|
21763
21791
|
recomputeStartIndex: t,
|
|
21764
|
-
firstInvalidatedIndex: r =
|
|
21792
|
+
firstInvalidatedIndex: r = k6,
|
|
21765
21793
|
lastInvalidatedIndex: n,
|
|
21766
21794
|
gap: o = Wp,
|
|
21767
21795
|
focusedFloatingCardId: s
|
|
21768
21796
|
}) => {
|
|
21769
21797
|
if (s) {
|
|
21770
|
-
const c =
|
|
21798
|
+
const c = T6({
|
|
21771
21799
|
floatingCards: e,
|
|
21772
21800
|
focusedFloatingCardId: s,
|
|
21773
21801
|
firstInvalidatedIndex: r,
|
|
@@ -21814,7 +21842,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21814
21842
|
stopIndex: e.length - 1,
|
|
21815
21843
|
usedFocusedLayout: !1
|
|
21816
21844
|
};
|
|
21817
|
-
},
|
|
21845
|
+
}, _6 = 1, ni = (e) => e.type === "draft" ? {
|
|
21818
21846
|
anchorId: e.draftId,
|
|
21819
21847
|
anchorType: "draft"
|
|
21820
21848
|
} : e.type === "suggestion-draft" ? {
|
|
@@ -21823,21 +21851,21 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21823
21851
|
} : {
|
|
21824
21852
|
anchorId: e.commentId,
|
|
21825
21853
|
anchorType: "thread"
|
|
21826
|
-
},
|
|
21854
|
+
}, R6 = (e) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/"/g, '\\"'), I6 = ({
|
|
21827
21855
|
anchorId: e,
|
|
21828
21856
|
anchorType: t
|
|
21829
21857
|
}) => {
|
|
21830
21858
|
let r = "data-comment-id";
|
|
21831
|
-
return t === "draft" && (r = "data-draft-comment-id"), t === "suggestion-draft" && (r = "data-suggestion-id"), `[${r}="${
|
|
21832
|
-
},
|
|
21859
|
+
return t === "draft" && (r = "data-draft-comment-id"), t === "suggestion-draft" && (r = "data-suggestion-id"), `[${r}="${R6(e)}"]`;
|
|
21860
|
+
}, B6 = ({
|
|
21833
21861
|
editorRoot: e,
|
|
21834
21862
|
anchorId: t,
|
|
21835
21863
|
anchorType: r
|
|
21836
21864
|
}) => Array.from(
|
|
21837
21865
|
e.querySelectorAll(
|
|
21838
|
-
|
|
21866
|
+
I6({ anchorId: t, anchorType: r })
|
|
21839
21867
|
)
|
|
21840
|
-
),
|
|
21868
|
+
), O6 = (e, t) => {
|
|
21841
21869
|
let r = null;
|
|
21842
21870
|
return t.forEach((n) => {
|
|
21843
21871
|
try {
|
|
@@ -21852,18 +21880,18 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21852
21880
|
} catch {
|
|
21853
21881
|
return null;
|
|
21854
21882
|
}
|
|
21855
|
-
},
|
|
21883
|
+
}, L6 = (e, t) => e.length !== t.length ? !1 : e.every(
|
|
21856
21884
|
(r, n) => r === t[n]
|
|
21857
21885
|
), Dd = (e, t) => e.lastSeenEditorRoot === t && e.elements.length > 0 && e.elements.every(
|
|
21858
21886
|
(r) => r.isConnected && t.contains(r)
|
|
21859
|
-
),
|
|
21887
|
+
), M6 = ({
|
|
21860
21888
|
cachedRect: e,
|
|
21861
21889
|
scrollTop: t,
|
|
21862
21890
|
containerTop: r
|
|
21863
21891
|
}) => ({
|
|
21864
21892
|
top: e.top - (t - e.scrollTop) + (e.containerTop - r),
|
|
21865
21893
|
height: e.height
|
|
21866
|
-
}),
|
|
21894
|
+
}), F6 = ({
|
|
21867
21895
|
elements: e,
|
|
21868
21896
|
viewportTop: t,
|
|
21869
21897
|
viewportBottom: r
|
|
@@ -21881,7 +21909,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21881
21909
|
height: Math.max(1, i - s),
|
|
21882
21910
|
intersectsViewport: o
|
|
21883
21911
|
};
|
|
21884
|
-
},
|
|
21912
|
+
}, U6 = (e, t) => e === t ? 0 : e === null ? 1 : t === null ? -1 : e - t, P6 = ({
|
|
21885
21913
|
previousOrderedFloatingCardIds: e,
|
|
21886
21914
|
nextFloatingCards: t,
|
|
21887
21915
|
getPos: r
|
|
@@ -21892,7 +21920,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21892
21920
|
c
|
|
21893
21921
|
])
|
|
21894
21922
|
), o = t.map((a) => a.floatingCardId).sort((a, c) => {
|
|
21895
|
-
const u =
|
|
21923
|
+
const u = U6(r(a), r(c));
|
|
21896
21924
|
if (u !== 0)
|
|
21897
21925
|
return u;
|
|
21898
21926
|
const l = (n.get(a) ?? Number.POSITIVE_INFINITY) - (n.get(c) ?? Number.POSITIVE_INFINITY);
|
|
@@ -21912,7 +21940,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21912
21940
|
orderedFloatingCardIds: o,
|
|
21913
21941
|
firstChangedIndex: s
|
|
21914
21942
|
};
|
|
21915
|
-
}, Ad = (e, t) => e.length !== t.length ? !1 : e.every((r, n) => r === t[n]),
|
|
21943
|
+
}, Ad = (e, t) => e.length !== t.length ? !1 : e.every((r, n) => r === t[n]), H6 = (e) => ({
|
|
21916
21944
|
floatingCardId: e.floatingCardId,
|
|
21917
21945
|
anchorTop: e.anchorTop,
|
|
21918
21946
|
height: e.height,
|
|
@@ -21920,7 +21948,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21920
21948
|
isMeasured: e.isMeasured,
|
|
21921
21949
|
lastCommittedTranslateY: e.lastCommittedTranslateY,
|
|
21922
21950
|
invalidationFlags: e.invalidationFlags
|
|
21923
|
-
}),
|
|
21951
|
+
}), z6 = () => {
|
|
21924
21952
|
const e = ie(/* @__PURE__ */ new Map()), t = ie(/* @__PURE__ */ new Set()), r = ie(null), n = ie(null), o = ee((c) => {
|
|
21925
21953
|
t.current.add(c);
|
|
21926
21954
|
}, []), s = ee(
|
|
@@ -21968,7 +21996,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21968
21996
|
L.anchorPosition = (K == null ? void 0 : K.pmPos) ?? L.anchorPosition;
|
|
21969
21997
|
return;
|
|
21970
21998
|
}
|
|
21971
|
-
const $ =
|
|
21999
|
+
const $ = B6({
|
|
21972
22000
|
editorRoot: d,
|
|
21973
22001
|
anchorId: k,
|
|
21974
22002
|
anchorType: R
|
|
@@ -21993,7 +22021,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
21993
22021
|
}), N = !0, L.anchorPosition = (K == null ? void 0 : K.pmPos) ?? L.anchorPosition;
|
|
21994
22022
|
return;
|
|
21995
22023
|
}
|
|
21996
|
-
const z =
|
|
22024
|
+
const z = O6(l, $), q = !K || K.anchorType !== R || K.pmPos !== z || K.lastSeenEditorRoot !== d || !L6(K.elements, $), V = {
|
|
21997
22025
|
floatingCardId: I.floatingCardId,
|
|
21998
22026
|
anchorId: k,
|
|
21999
22027
|
anchorType: R,
|
|
@@ -22046,7 +22074,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22046
22074
|
resetAnchorRegistry: i,
|
|
22047
22075
|
syncAnchors: a
|
|
22048
22076
|
};
|
|
22049
|
-
},
|
|
22077
|
+
}, K6 = () => {
|
|
22050
22078
|
const e = ie(
|
|
22051
22079
|
/* @__PURE__ */ new Map()
|
|
22052
22080
|
), t = ie([]), r = ie(/* @__PURE__ */ new Map()), n = ie(!0), o = ie(/* @__PURE__ */ new Set()), s = ie({
|
|
@@ -22098,7 +22126,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22098
22126
|
orderedFloatingCardIds: t.current,
|
|
22099
22127
|
firstChangedIndex: null
|
|
22100
22128
|
};
|
|
22101
|
-
const A =
|
|
22129
|
+
const A = P6({
|
|
22102
22130
|
previousOrderedFloatingCardIds: t.current,
|
|
22103
22131
|
nextFloatingCards: E,
|
|
22104
22132
|
getPos: (w) => u(w).anchorPosition
|
|
@@ -22148,7 +22176,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22148
22176
|
[]
|
|
22149
22177
|
), _ = ee(
|
|
22150
22178
|
() => t.current.map(
|
|
22151
|
-
(E) =>
|
|
22179
|
+
(E) => H6(u(E))
|
|
22152
22180
|
),
|
|
22153
22181
|
[u]
|
|
22154
22182
|
), N = ee(() => {
|
|
@@ -22174,23 +22202,23 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22174
22202
|
getFloatingCardLayoutInputs: _,
|
|
22175
22203
|
resetFloatingCardState: N
|
|
22176
22204
|
};
|
|
22177
|
-
},
|
|
22205
|
+
}, j6 = (e) => e instanceof Element ? !!e.closest(
|
|
22178
22206
|
'[data-inline-comment-actions-menu], [data-radix-popper-content-wrapper], [data-floating-ui-portal], [role="dialog"]'
|
|
22179
|
-
) : !1,
|
|
22207
|
+
) : !1, V6 = "--floating-comment-container-min-height", Ca = ({
|
|
22180
22208
|
top: e,
|
|
22181
22209
|
bottom: t,
|
|
22182
22210
|
viewportTop: r,
|
|
22183
22211
|
viewportBottom: n,
|
|
22184
22212
|
viewportHeight: o
|
|
22185
22213
|
}) => {
|
|
22186
|
-
const s = o *
|
|
22214
|
+
const s = o * _6;
|
|
22187
22215
|
return t >= r - s && e <= n + s;
|
|
22188
|
-
},
|
|
22189
|
-
const r =
|
|
22216
|
+
}, $6 = (e) => e instanceof Node ? e.nodeType === Node.TEXT_NODE ? e.parentElement : e instanceof Element ? e : null : null, q6 = (e, t) => {
|
|
22217
|
+
const r = $6(e);
|
|
22190
22218
|
return !r || !t ? !1 : !!(t.contains(r) && r.closest(
|
|
22191
22219
|
'[data-comment-id], [data-draft-comment-id], .inline-comment, mark[data-color="yellow"]'
|
|
22192
22220
|
));
|
|
22193
|
-
},
|
|
22221
|
+
}, W6 = ({
|
|
22194
22222
|
blurFloatingCard: e,
|
|
22195
22223
|
closeFloatingCard: t,
|
|
22196
22224
|
editor: r,
|
|
@@ -22300,7 +22328,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22300
22328
|
G.current !== ke && (G.current = ke, P.current = null), (B.current === null || Math.abs(
|
|
22301
22329
|
B.current - Q.top
|
|
22302
22330
|
) > 0.5) && (B.current = Q.top, m.current.containerOffset += 1);
|
|
22303
|
-
const oe = j.height, se = j.top - Q.top,
|
|
22331
|
+
const oe = j.height, se = j.top - Q.top, he = se + oe, Te = m.current.appliedScroll !== m.current.scroll, Oe = m.current.appliedContainerOffset !== m.current.containerOffset;
|
|
22304
22332
|
I.current.forEach((Pe, Me) => {
|
|
22305
22333
|
const tt = ze.get(Pe);
|
|
22306
22334
|
if (!tt)
|
|
@@ -22313,7 +22341,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22313
22341
|
), S(Me)), De.anchorTop = null, De.anchorHeight = 0;
|
|
22314
22342
|
return;
|
|
22315
22343
|
}
|
|
22316
|
-
let it = nt.cachedRect ?
|
|
22344
|
+
let it = nt.cachedRect ? M6({
|
|
22317
22345
|
cachedRect: nt.cachedRect,
|
|
22318
22346
|
scrollTop: Ae.scrollTop,
|
|
22319
22347
|
containerTop: Q.top
|
|
@@ -22323,11 +22351,11 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22323
22351
|
top: it.top,
|
|
22324
22352
|
bottom: it.top + it.height,
|
|
22325
22353
|
viewportTop: se,
|
|
22326
|
-
viewportBottom:
|
|
22354
|
+
viewportBottom: he,
|
|
22327
22355
|
viewportHeight: oe
|
|
22328
22356
|
}), Ne = De.anchorVersion !== nt.anchorVersion;
|
|
22329
22357
|
if ((!nt.cachedRect || De.isInViewport || ft || Ne || !De.isMeasured || Oe && ft || Te && De.isInViewport) && Dd(nt, de)) {
|
|
22330
|
-
const Wt =
|
|
22358
|
+
const Wt = F6({
|
|
22331
22359
|
elements: nt.elements,
|
|
22332
22360
|
viewportTop: j.top,
|
|
22333
22361
|
viewportBottom: j.bottom
|
|
@@ -22347,13 +22375,13 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22347
22375
|
top: De.anchorTop,
|
|
22348
22376
|
bottom: De.anchorTop + Math.max(De.anchorHeight, 1),
|
|
22349
22377
|
viewportTop: se,
|
|
22350
|
-
viewportBottom:
|
|
22378
|
+
viewportBottom: he,
|
|
22351
22379
|
viewportHeight: oe
|
|
22352
22380
|
}), un = De.translateY ?? De.lastCommittedTranslateY, Ve = De.isMeasured && un !== null && Ca({
|
|
22353
22381
|
top: un,
|
|
22354
22382
|
bottom: un + De.height,
|
|
22355
22383
|
viewportTop: se,
|
|
22356
|
-
viewportBottom:
|
|
22384
|
+
viewportBottom: he,
|
|
22357
22385
|
viewportHeight: oe
|
|
22358
22386
|
}), dn = Hn || Ve;
|
|
22359
22387
|
if (De.isInViewport !== dn) {
|
|
@@ -22401,7 +22429,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22401
22429
|
), an = Math.min(
|
|
22402
22430
|
w.current.recomputeFromIndex,
|
|
22403
22431
|
Math.max(I.current.length - 1, 0)
|
|
22404
|
-
), Et = !!V.current && Y.current && I.current.length > 0, me =
|
|
22432
|
+
), Et = !!V.current && Y.current && I.current.length > 0, me = N6({
|
|
22405
22433
|
floatingCards: N(),
|
|
22406
22434
|
recomputeStartIndex: an,
|
|
22407
22435
|
firstInvalidatedIndex: Et ? 0 : wt,
|
|
@@ -22434,11 +22462,11 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22434
22462
|
const ft = !!De.isVisible && Me.isMeasured && Me.anchorTop !== null && !c;
|
|
22435
22463
|
(ft !== Me.lastCommittedVisible || (Me.invalidationFlags & (Ut.Visibility | Ut.Height)) !== 0) && (tt.style.visibility = ft ? "visible" : "hidden", tt.style.opacity = ft ? "1" : "0", Me.lastCommittedVisible = ft);
|
|
22436
22464
|
});
|
|
22437
|
-
const bt = Dt > 0 ? Dt +
|
|
22465
|
+
const bt = Dt > 0 ? Dt + D6 : 0, gt = Math.ceil(
|
|
22438
22466
|
Math.max(J, bt)
|
|
22439
22467
|
);
|
|
22440
22468
|
P.current !== gt && (ke.style.setProperty(
|
|
22441
|
-
|
|
22469
|
+
V6,
|
|
22442
22470
|
`${gt}px`
|
|
22443
22471
|
), P.current = gt), v(me.stopIndex), w.current.recomputeFromIndex = I.current.length, be.size > 0 && be.forEach((Pe) => {
|
|
22444
22472
|
t(Pe);
|
|
@@ -22535,10 +22563,10 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22535
22563
|
]), Wo(
|
|
22536
22564
|
W,
|
|
22537
22565
|
(ce) => {
|
|
22538
|
-
if (!a || !i ||
|
|
22566
|
+
if (!a || !i || j6(ce.target))
|
|
22539
22567
|
return;
|
|
22540
22568
|
const de = va(r);
|
|
22541
|
-
|
|
22569
|
+
q6(ce.target, de) || e(i);
|
|
22542
22570
|
},
|
|
22543
22571
|
"mousedown",
|
|
22544
22572
|
{ capture: !0 }
|
|
@@ -22684,7 +22712,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22684
22712
|
floatingCardListContainerRef: $,
|
|
22685
22713
|
registerCardNode: Z
|
|
22686
22714
|
};
|
|
22687
|
-
},
|
|
22715
|
+
}, G6 = ({
|
|
22688
22716
|
blurFloatingCard: e,
|
|
22689
22717
|
closeFloatingCard: t,
|
|
22690
22718
|
editor: r,
|
|
@@ -22696,7 +22724,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22696
22724
|
isHidden: c,
|
|
22697
22725
|
scrollContainerRef: u
|
|
22698
22726
|
}) => {
|
|
22699
|
-
const l =
|
|
22727
|
+
const l = z6(), d = K6(), { floatingCardListContainerRef: h, registerCardNode: p } = W6({
|
|
22700
22728
|
blurFloatingCard: e,
|
|
22701
22729
|
closeFloatingCard: t,
|
|
22702
22730
|
editor: r,
|
|
@@ -22715,7 +22743,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22715
22743
|
mountedFloatingCardIds: d.mountedFloatingCardIds,
|
|
22716
22744
|
registerCardNode: p
|
|
22717
22745
|
};
|
|
22718
|
-
},
|
|
22746
|
+
}, Y6 = () => {
|
|
22719
22747
|
const e = ae((a) => a.blurFloatingCard), t = ae((a) => a.closeFloatingCard), r = ae((a) => a.floatingCards), n = ae(
|
|
22720
22748
|
(a) => a.isDesktopFloatingEnabled
|
|
22721
22749
|
), o = Ze(
|
|
@@ -22745,7 +22773,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22745
22773
|
focusedFloatingCardId: i,
|
|
22746
22774
|
isDesktopFloatingEnabled: n
|
|
22747
22775
|
};
|
|
22748
|
-
},
|
|
22776
|
+
}, X6 = ({
|
|
22749
22777
|
editor: e,
|
|
22750
22778
|
editorWrapperRef: t,
|
|
22751
22779
|
scrollContainerRef: r,
|
|
@@ -22759,11 +22787,11 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22759
22787
|
floatingCards: c,
|
|
22760
22788
|
focusedFloatingCardId: u,
|
|
22761
22789
|
isDesktopFloatingEnabled: l
|
|
22762
|
-
} =
|
|
22790
|
+
} = Y6(), {
|
|
22763
22791
|
floatingCardListContainerRef: d,
|
|
22764
22792
|
mountedFloatingCardIds: h,
|
|
22765
22793
|
registerCardNode: p
|
|
22766
|
-
} =
|
|
22794
|
+
} = G6({
|
|
22767
22795
|
blurFloatingCard: o,
|
|
22768
22796
|
closeFloatingCard: s,
|
|
22769
22797
|
editor: e,
|
|
@@ -22786,7 +22814,7 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22786
22814
|
registerCardNode: p,
|
|
22787
22815
|
shouldRender: y
|
|
22788
22816
|
};
|
|
22789
|
-
}, Xp = 300,
|
|
22817
|
+
}, Xp = 300, Z6 = (e) => e instanceof Element ? !!e.closest(
|
|
22790
22818
|
'button, [role="button"], a, [data-inline-comment-actions-menu], [data-radix-popper-content-wrapper]'
|
|
22791
22819
|
) : !1, rs = Qt(({ floatingCardId: e, isHidden: t, isFocused: r, onFocus: n, children: o }, s) => /* @__PURE__ */ f(
|
|
22792
22820
|
"div",
|
|
@@ -22804,13 +22832,13 @@ const w6 = Number.POSITIVE_INFINITY, Ls = (e) => e.isVisible && e.isMeasured &&
|
|
|
22804
22832
|
opacity: t ? 0 : 1
|
|
22805
22833
|
},
|
|
22806
22834
|
onMouseDown: (i) => {
|
|
22807
|
-
|
|
22835
|
+
Z6(i.target) || n();
|
|
22808
22836
|
},
|
|
22809
22837
|
children: o
|
|
22810
22838
|
}
|
|
22811
22839
|
));
|
|
22812
22840
|
rs.displayName = "FloatingCardShell";
|
|
22813
|
-
const
|
|
22841
|
+
const Q6 = ({
|
|
22814
22842
|
draft: e,
|
|
22815
22843
|
isHidden: t,
|
|
22816
22844
|
registerCardNode: r
|
|
@@ -22864,11 +22892,11 @@ const V6 = ({
|
|
|
22864
22892
|
)
|
|
22865
22893
|
] })
|
|
22866
22894
|
] }),
|
|
22867
|
-
/* @__PURE__ */ f(
|
|
22895
|
+
/* @__PURE__ */ f(J6, { draftState: o, draft: e })
|
|
22868
22896
|
] }) : /* @__PURE__ */ f(ns, { isDraft: !0 })
|
|
22869
22897
|
}
|
|
22870
22898
|
) : null;
|
|
22871
|
-
},
|
|
22899
|
+
}, J6 = ({
|
|
22872
22900
|
draftState: e,
|
|
22873
22901
|
draft: t
|
|
22874
22902
|
}) => {
|
|
@@ -22921,7 +22949,7 @@ const V6 = ({
|
|
|
22921
22949
|
)
|
|
22922
22950
|
] })
|
|
22923
22951
|
] });
|
|
22924
|
-
},
|
|
22952
|
+
}, eS = ({
|
|
22925
22953
|
card: e,
|
|
22926
22954
|
isHidden: t,
|
|
22927
22955
|
registerCardNode: r
|
|
@@ -23003,7 +23031,7 @@ const V6 = ({
|
|
|
23003
23031
|
] }) : /* @__PURE__ */ f(ns, { isDraft: !0 })
|
|
23004
23032
|
}
|
|
23005
23033
|
);
|
|
23006
|
-
},
|
|
23034
|
+
}, tS = ({
|
|
23007
23035
|
thread: e,
|
|
23008
23036
|
comment: t,
|
|
23009
23037
|
isHidden: r,
|
|
@@ -23033,7 +23061,7 @@ const V6 = ({
|
|
|
23033
23061
|
onFocus: d,
|
|
23034
23062
|
children: /* @__PURE__ */ U("div", { className: "flex group flex-col gap-2 p-3 pb-0", children: [
|
|
23035
23063
|
/* @__PURE__ */ f(
|
|
23036
|
-
|
|
23064
|
+
nS,
|
|
23037
23065
|
{
|
|
23038
23066
|
username: t.username,
|
|
23039
23067
|
createdAt: t.createdAt,
|
|
@@ -23053,18 +23081,18 @@ const V6 = ({
|
|
|
23053
23081
|
}
|
|
23054
23082
|
) }),
|
|
23055
23083
|
/* @__PURE__ */ f(
|
|
23056
|
-
|
|
23084
|
+
rS,
|
|
23057
23085
|
{
|
|
23058
23086
|
thread: e,
|
|
23059
23087
|
comment: t,
|
|
23060
23088
|
onFocusRequest: d
|
|
23061
23089
|
}
|
|
23062
23090
|
),
|
|
23063
|
-
/* @__PURE__ */ f(
|
|
23091
|
+
/* @__PURE__ */ f(oS, { thread: e, comment: t })
|
|
23064
23092
|
] })
|
|
23065
23093
|
}
|
|
23066
23094
|
);
|
|
23067
|
-
},
|
|
23095
|
+
}, nS = ({
|
|
23068
23096
|
username: e,
|
|
23069
23097
|
createdAt: t,
|
|
23070
23098
|
canAcceptReject: r,
|
|
@@ -23134,7 +23162,7 @@ const V6 = ({
|
|
|
23134
23162
|
}
|
|
23135
23163
|
)
|
|
23136
23164
|
] });
|
|
23137
|
-
},
|
|
23165
|
+
}, rS = ({
|
|
23138
23166
|
thread: e,
|
|
23139
23167
|
comment: t,
|
|
23140
23168
|
onFocusRequest: r
|
|
@@ -23176,7 +23204,7 @@ const V6 = ({
|
|
|
23176
23204
|
visibleReplies: h
|
|
23177
23205
|
}
|
|
23178
23206
|
) });
|
|
23179
|
-
},
|
|
23207
|
+
}, oS = ({
|
|
23180
23208
|
thread: e,
|
|
23181
23209
|
comment: t
|
|
23182
23210
|
}) => {
|
|
@@ -23265,7 +23293,7 @@ const V6 = ({
|
|
|
23265
23293
|
}
|
|
23266
23294
|
)
|
|
23267
23295
|
] }) : null : null;
|
|
23268
|
-
},
|
|
23296
|
+
}, sS = ({
|
|
23269
23297
|
thread: e,
|
|
23270
23298
|
comment: t,
|
|
23271
23299
|
tabName: r,
|
|
@@ -23321,7 +23349,7 @@ const V6 = ({
|
|
|
23321
23349
|
}
|
|
23322
23350
|
),
|
|
23323
23351
|
e.isFocused && !a && /* @__PURE__ */ f(ns, {}),
|
|
23324
|
-
/* @__PURE__ */ f("div", { className: "px-3", children: /* @__PURE__ */ f(
|
|
23352
|
+
/* @__PURE__ */ f("div", { className: "px-3", children: /* @__PURE__ */ f(iS, { comment: t, thread: e }) }),
|
|
23325
23353
|
/* @__PURE__ */ f(
|
|
23326
23354
|
Zo,
|
|
23327
23355
|
{
|
|
@@ -23334,7 +23362,7 @@ const V6 = ({
|
|
|
23334
23362
|
] })
|
|
23335
23363
|
}
|
|
23336
23364
|
);
|
|
23337
|
-
},
|
|
23365
|
+
}, iS = ({
|
|
23338
23366
|
comment: e,
|
|
23339
23367
|
thread: t
|
|
23340
23368
|
}) => {
|
|
@@ -23440,7 +23468,7 @@ const V6 = ({
|
|
|
23440
23468
|
}
|
|
23441
23469
|
)
|
|
23442
23470
|
] });
|
|
23443
|
-
},
|
|
23471
|
+
}, aS = ({
|
|
23444
23472
|
editor: e,
|
|
23445
23473
|
editorWrapperRef: t,
|
|
23446
23474
|
scrollContainerRef: r,
|
|
@@ -23452,7 +23480,7 @@ const V6 = ({
|
|
|
23452
23480
|
mountedFloatingCards: a,
|
|
23453
23481
|
registerCardNode: c,
|
|
23454
23482
|
shouldRender: u
|
|
23455
|
-
} =
|
|
23483
|
+
} = X6({
|
|
23456
23484
|
editor: e,
|
|
23457
23485
|
editorWrapperRef: t,
|
|
23458
23486
|
scrollContainerRef: r,
|
|
@@ -23471,12 +23499,12 @@ const V6 = ({
|
|
|
23471
23499
|
width: Xp,
|
|
23472
23500
|
boxSizing: "content-box",
|
|
23473
23501
|
minHeight: "var(--floating-comment-container-min-height, 100%)",
|
|
23474
|
-
paddingRight: o ? 0 :
|
|
23502
|
+
paddingRight: o ? 0 : A6
|
|
23475
23503
|
},
|
|
23476
23504
|
children: a.map((l) => {
|
|
23477
23505
|
if (l.type === "draft")
|
|
23478
23506
|
return /* @__PURE__ */ f(
|
|
23479
|
-
|
|
23507
|
+
Q6,
|
|
23480
23508
|
{
|
|
23481
23509
|
draft: l,
|
|
23482
23510
|
isHidden: o,
|
|
@@ -23486,7 +23514,7 @@ const V6 = ({
|
|
|
23486
23514
|
);
|
|
23487
23515
|
if (l.type === "suggestion-draft")
|
|
23488
23516
|
return /* @__PURE__ */ f(
|
|
23489
|
-
|
|
23517
|
+
eS,
|
|
23490
23518
|
{
|
|
23491
23519
|
card: l,
|
|
23492
23520
|
isHidden: o,
|
|
@@ -23498,7 +23526,7 @@ const V6 = ({
|
|
|
23498
23526
|
(h) => h.id === l.commentId
|
|
23499
23527
|
);
|
|
23500
23528
|
return d != null && d.isSuggestion ? /* @__PURE__ */ f(
|
|
23501
|
-
|
|
23529
|
+
tS,
|
|
23502
23530
|
{
|
|
23503
23531
|
thread: l,
|
|
23504
23532
|
comment: d,
|
|
@@ -23508,7 +23536,7 @@ const V6 = ({
|
|
|
23508
23536
|
},
|
|
23509
23537
|
l.floatingCardId
|
|
23510
23538
|
) : /* @__PURE__ */ f(
|
|
23511
|
-
|
|
23539
|
+
sS,
|
|
23512
23540
|
{
|
|
23513
23541
|
thread: l,
|
|
23514
23542
|
comment: d,
|
|
@@ -23875,7 +23903,7 @@ const ri = St.memo(Jp), yc = ({
|
|
|
23875
23903
|
className: Ce("fixed z-50"),
|
|
23876
23904
|
style: { top: d.top, left: d.left },
|
|
23877
23905
|
children: /* @__PURE__ */ U(
|
|
23878
|
-
|
|
23906
|
+
cS,
|
|
23879
23907
|
{
|
|
23880
23908
|
className: Ce(
|
|
23881
23909
|
"color-bg-default rounded-lg border shadow-md",
|
|
@@ -23885,9 +23913,9 @@ const ri = St.memo(Jp), yc = ({
|
|
|
23885
23913
|
t(y), i(!1);
|
|
23886
23914
|
},
|
|
23887
23915
|
children: [
|
|
23888
|
-
/* @__PURE__ */ f(
|
|
23889
|
-
/* @__PURE__ */ f(
|
|
23890
|
-
/* @__PURE__ */ f(
|
|
23916
|
+
/* @__PURE__ */ f(lS, {}),
|
|
23917
|
+
/* @__PURE__ */ f(hS, {}),
|
|
23918
|
+
/* @__PURE__ */ f(pS, {})
|
|
23891
23919
|
]
|
|
23892
23920
|
}
|
|
23893
23921
|
)
|
|
@@ -23895,7 +23923,7 @@ const ri = St.memo(Jp), yc = ({
|
|
|
23895
23923
|
)
|
|
23896
23924
|
] });
|
|
23897
23925
|
};
|
|
23898
|
-
function
|
|
23926
|
+
function cS({
|
|
23899
23927
|
className: e,
|
|
23900
23928
|
...t
|
|
23901
23929
|
}) {
|
|
@@ -23911,7 +23939,7 @@ function eS({
|
|
|
23911
23939
|
}
|
|
23912
23940
|
);
|
|
23913
23941
|
}
|
|
23914
|
-
function
|
|
23942
|
+
function lS({
|
|
23915
23943
|
className: e,
|
|
23916
23944
|
...t
|
|
23917
23945
|
}) {
|
|
@@ -23934,13 +23962,13 @@ function tS({
|
|
|
23934
23962
|
}
|
|
23935
23963
|
);
|
|
23936
23964
|
}
|
|
23937
|
-
function
|
|
23965
|
+
function uS({
|
|
23938
23966
|
children: e,
|
|
23939
23967
|
...t
|
|
23940
23968
|
}) {
|
|
23941
23969
|
return /* @__PURE__ */ f("div", { ...t, className: "scroll-my-1 px-1", "data-slot": "emoji-picker-row", children: e });
|
|
23942
23970
|
}
|
|
23943
|
-
function
|
|
23971
|
+
function dS({
|
|
23944
23972
|
emoji: e,
|
|
23945
23973
|
className: t,
|
|
23946
23974
|
...r
|
|
@@ -23958,7 +23986,7 @@ function rS({
|
|
|
23958
23986
|
}
|
|
23959
23987
|
);
|
|
23960
23988
|
}
|
|
23961
|
-
function
|
|
23989
|
+
function fS({
|
|
23962
23990
|
category: e,
|
|
23963
23991
|
...t
|
|
23964
23992
|
}) {
|
|
@@ -23972,7 +24000,7 @@ function oS({
|
|
|
23972
24000
|
}
|
|
23973
24001
|
);
|
|
23974
24002
|
}
|
|
23975
|
-
function
|
|
24003
|
+
function hS({
|
|
23976
24004
|
className: e,
|
|
23977
24005
|
...t
|
|
23978
24006
|
}) {
|
|
@@ -24004,9 +24032,9 @@ function sS({
|
|
|
24004
24032
|
{
|
|
24005
24033
|
className: "select-none pb-1",
|
|
24006
24034
|
components: {
|
|
24007
|
-
Row:
|
|
24008
|
-
Emoji:
|
|
24009
|
-
CategoryHeader:
|
|
24035
|
+
Row: uS,
|
|
24036
|
+
Emoji: dS,
|
|
24037
|
+
CategoryHeader: fS
|
|
24010
24038
|
},
|
|
24011
24039
|
"data-slot": "emoji-picker-list"
|
|
24012
24040
|
}
|
|
@@ -24015,7 +24043,7 @@ function sS({
|
|
|
24015
24043
|
}
|
|
24016
24044
|
);
|
|
24017
24045
|
}
|
|
24018
|
-
function
|
|
24046
|
+
function pS({
|
|
24019
24047
|
className: e,
|
|
24020
24048
|
...t
|
|
24021
24049
|
}) {
|
|
@@ -24035,7 +24063,7 @@ function iS({
|
|
|
24035
24063
|
}
|
|
24036
24064
|
);
|
|
24037
24065
|
}
|
|
24038
|
-
const
|
|
24066
|
+
const mS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30px] border-radius-sm flex items-center w-full", gS = (e) => {
|
|
24039
24067
|
const [t, r] = pe(!1), {
|
|
24040
24068
|
attributes: n,
|
|
24041
24069
|
listeners: o,
|
|
@@ -24286,7 +24314,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24286
24314
|
]
|
|
24287
24315
|
}
|
|
24288
24316
|
);
|
|
24289
|
-
},
|
|
24317
|
+
}, yS = ({
|
|
24290
24318
|
name: e,
|
|
24291
24319
|
emoji: t
|
|
24292
24320
|
}) => /* @__PURE__ */ U(
|
|
@@ -24300,14 +24328,14 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24300
24328
|
/* @__PURE__ */ f("span", { className: "text-heading-xsm color-text-default truncate", children: e })
|
|
24301
24329
|
]
|
|
24302
24330
|
}
|
|
24303
|
-
),
|
|
24331
|
+
), xS = ({
|
|
24304
24332
|
item: e
|
|
24305
24333
|
}) => {
|
|
24306
24334
|
const [t, r] = pe(!1), n = /* @__PURE__ */ U(
|
|
24307
24335
|
"div",
|
|
24308
24336
|
{
|
|
24309
24337
|
"data-testid": `tab-menu-${e.id}`,
|
|
24310
|
-
className: He(
|
|
24338
|
+
className: He(mS, e.disabled && "!cursor-not-allowed"),
|
|
24311
24339
|
onClick: (s) => {
|
|
24312
24340
|
var i;
|
|
24313
24341
|
s.stopPropagation(), !e.disabled && ((i = e.onSelect) == null || i.call(e));
|
|
@@ -24369,7 +24397,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24369
24397
|
className: He("w-[160px] space-xsm", r),
|
|
24370
24398
|
children: n.map((o, s) => /* @__PURE__ */ U("div", { children: [
|
|
24371
24399
|
s > 0 && /* @__PURE__ */ f("hr", { className: "border-t space-x-xsm color-border-default my-[4px] w-full" }),
|
|
24372
|
-
o.map((i) => /* @__PURE__ */ f(
|
|
24400
|
+
o.map((i) => /* @__PURE__ */ f(xS, { item: i }, i.id))
|
|
24373
24401
|
] }, `section-${s}`))
|
|
24374
24402
|
}
|
|
24375
24403
|
)
|
|
@@ -24434,7 +24462,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24434
24462
|
] })
|
|
24435
24463
|
}
|
|
24436
24464
|
) });
|
|
24437
|
-
},
|
|
24465
|
+
}, wS = ({
|
|
24438
24466
|
tabSectionContainer: e,
|
|
24439
24467
|
...t
|
|
24440
24468
|
}) => !e && t.isVersionHistoryMode ? null : e ? ci(/* @__PURE__ */ f(kd, { ...t }), e) : /* @__PURE__ */ f(kd, { ...t }), kd = ({
|
|
@@ -24610,7 +24638,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24610
24638
|
)
|
|
24611
24639
|
] }) }),
|
|
24612
24640
|
/* @__PURE__ */ f("div", { className: "w-full overflow-y-auto space-y-1", children: e.map((M, W) => /* @__PURE__ */ f(
|
|
24613
|
-
|
|
24641
|
+
bS,
|
|
24614
24642
|
{
|
|
24615
24643
|
tab: M,
|
|
24616
24644
|
tabIndex: W,
|
|
@@ -24648,7 +24676,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24648
24676
|
}
|
|
24649
24677
|
),
|
|
24650
24678
|
/* @__PURE__ */ f(My, { children: x ? /* @__PURE__ */ f(
|
|
24651
|
-
|
|
24679
|
+
yS,
|
|
24652
24680
|
{
|
|
24653
24681
|
emoji: (T == null ? void 0 : T.emoji) ?? "",
|
|
24654
24682
|
name: (T == null ? void 0 : T.name) ?? ""
|
|
@@ -24678,7 +24706,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24678
24706
|
}
|
|
24679
24707
|
)
|
|
24680
24708
|
] });
|
|
24681
|
-
},
|
|
24709
|
+
}, bS = ({
|
|
24682
24710
|
tab: e,
|
|
24683
24711
|
tabIndex: t,
|
|
24684
24712
|
tabCount: r,
|
|
@@ -24705,7 +24733,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24705
24733
|
const A = r > 1;
|
|
24706
24734
|
return /* @__PURE__ */ U("div", { className: "w-full flex flex-col gap-2", children: [
|
|
24707
24735
|
/* @__PURE__ */ f(
|
|
24708
|
-
|
|
24736
|
+
gS,
|
|
24709
24737
|
{
|
|
24710
24738
|
id: e.id,
|
|
24711
24739
|
tabId: e.id,
|
|
@@ -24744,7 +24772,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24744
24772
|
}
|
|
24745
24773
|
) }) : null
|
|
24746
24774
|
] });
|
|
24747
|
-
},
|
|
24775
|
+
}, vS = ({
|
|
24748
24776
|
isOpen: e,
|
|
24749
24777
|
initialName: t,
|
|
24750
24778
|
onClose: r,
|
|
@@ -24807,7 +24835,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
24807
24835
|
)
|
|
24808
24836
|
}
|
|
24809
24837
|
);
|
|
24810
|
-
},
|
|
24838
|
+
}, CS = ({
|
|
24811
24839
|
tabs: e,
|
|
24812
24840
|
activeTabId: t,
|
|
24813
24841
|
setActiveTabId: r,
|
|
@@ -25159,7 +25187,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25159
25187
|
}
|
|
25160
25188
|
),
|
|
25161
25189
|
/* @__PURE__ */ f(
|
|
25162
|
-
|
|
25190
|
+
vS,
|
|
25163
25191
|
{
|
|
25164
25192
|
isOpen: !!A,
|
|
25165
25193
|
initialName: (A == null ? void 0 : A.name) ?? "",
|
|
@@ -25173,7 +25201,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25173
25201
|
]
|
|
25174
25202
|
}
|
|
25175
25203
|
);
|
|
25176
|
-
},
|
|
25204
|
+
}, ES = ({
|
|
25177
25205
|
editor: e,
|
|
25178
25206
|
hasToC: t,
|
|
25179
25207
|
items: r,
|
|
@@ -25281,7 +25309,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25281
25309
|
}) => {
|
|
25282
25310
|
const x = Ht("(max-width:1280px)");
|
|
25283
25311
|
return c.length ? x ? /* @__PURE__ */ f(
|
|
25284
|
-
|
|
25312
|
+
CS,
|
|
25285
25313
|
{
|
|
25286
25314
|
tabs: c,
|
|
25287
25315
|
setTabs: u,
|
|
@@ -25304,7 +25332,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25304
25332
|
isFocusMode: w
|
|
25305
25333
|
}
|
|
25306
25334
|
) : /* @__PURE__ */ f(
|
|
25307
|
-
|
|
25335
|
+
wS,
|
|
25308
25336
|
{
|
|
25309
25337
|
tabs: c,
|
|
25310
25338
|
setTabs: u,
|
|
@@ -25332,7 +25360,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25332
25360
|
isFocusMode: w
|
|
25333
25361
|
}
|
|
25334
25362
|
) : /* @__PURE__ */ f(
|
|
25335
|
-
|
|
25363
|
+
ES,
|
|
25336
25364
|
{
|
|
25337
25365
|
editor: e,
|
|
25338
25366
|
hasToC: t,
|
|
@@ -25344,14 +25372,14 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25344
25372
|
orientation: a
|
|
25345
25373
|
}
|
|
25346
25374
|
);
|
|
25347
|
-
},
|
|
25375
|
+
}, SS = {
|
|
25348
25376
|
initial: { opacity: 0 },
|
|
25349
25377
|
animate: { opacity: 1 },
|
|
25350
25378
|
exit: { opacity: 0 }
|
|
25351
25379
|
}, rm = (e, t) => /* @__PURE__ */ f(
|
|
25352
25380
|
Cn.div,
|
|
25353
25381
|
{
|
|
25354
|
-
variants:
|
|
25382
|
+
variants: SS,
|
|
25355
25383
|
initial: "initial",
|
|
25356
25384
|
animate: "animate",
|
|
25357
25385
|
exit: "exit",
|
|
@@ -25359,14 +25387,14 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25359
25387
|
children: e
|
|
25360
25388
|
},
|
|
25361
25389
|
t
|
|
25362
|
-
),
|
|
25390
|
+
), DS = {
|
|
25363
25391
|
initial: { y: 10, opacity: 0 },
|
|
25364
25392
|
animate: { y: 0, opacity: 1 },
|
|
25365
25393
|
exit: { y: -10, opacity: 0 }
|
|
25366
25394
|
}, om = (e, t) => /* @__PURE__ */ f(
|
|
25367
25395
|
Cn.div,
|
|
25368
25396
|
{
|
|
25369
|
-
variants:
|
|
25397
|
+
variants: DS,
|
|
25370
25398
|
initial: "initial",
|
|
25371
25399
|
animate: "animate",
|
|
25372
25400
|
exit: "exit",
|
|
@@ -25387,7 +25415,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25387
25415
|
className: He(t, !e && "invisible pointer-events-none"),
|
|
25388
25416
|
children: r
|
|
25389
25417
|
}
|
|
25390
|
-
),
|
|
25418
|
+
), AS = "h-6 bg-gradient-to-r [--from:210,_17%,_98%,_1] [--to:0,_0%,_93%,_1] dark:[--from:0,0%,16%,1] dark:[--to:0,0%,12%,1] from-[hsl(var(--from))] to-[hsl(var(--to))]", yn = ({ className: e }) => /* @__PURE__ */ f("div", { className: Ce(AS, e) }), sm = () => /* @__PURE__ */ f("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ U(
|
|
25391
25419
|
Ay,
|
|
25392
25420
|
{
|
|
25393
25421
|
transition: {
|
|
@@ -25443,10 +25471,10 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25443
25471
|
)
|
|
25444
25472
|
]
|
|
25445
25473
|
}
|
|
25446
|
-
) }),
|
|
25474
|
+
) }), kS = {
|
|
25447
25475
|
tweet: { label: "Embed Tweet", icon: "GalleryVertical" },
|
|
25448
25476
|
image: { label: "Image", icon: "Image" }
|
|
25449
|
-
},
|
|
25477
|
+
}, TS = ({ editor: e }) => {
|
|
25450
25478
|
const t = ie([]), r = ie(null), n = Sc({
|
|
25451
25479
|
editor: e,
|
|
25452
25480
|
selector: ({ editor: l }) => {
|
|
@@ -25489,7 +25517,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25489
25517
|
}
|
|
25490
25518
|
},
|
|
25491
25519
|
[e, a, s]
|
|
25492
|
-
), u =
|
|
25520
|
+
), u = kS[n ?? "image"];
|
|
25493
25521
|
return /* @__PURE__ */ f(
|
|
25494
25522
|
pi,
|
|
25495
25523
|
{
|
|
@@ -25543,7 +25571,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25543
25571
|
if (t === "") return null;
|
|
25544
25572
|
const r = Number.parseFloat(t);
|
|
25545
25573
|
return Number.isNaN(r) ? null : Math.min(jg, Math.max(Vg, Math.round(r)));
|
|
25546
|
-
}, Ea = (e, t) => e === "mixed" || e === null ? "" : t === "lineHeight" ? zg(String(e)) : String(e),
|
|
25574
|
+
}, Ea = (e, t) => e === "mixed" || e === null ? "" : t === "lineHeight" ? zg(String(e)) : String(e), NS = ({
|
|
25547
25575
|
editor: e,
|
|
25548
25576
|
open: t,
|
|
25549
25577
|
onOpenChange: r
|
|
@@ -25699,12 +25727,12 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25699
25727
|
/* @__PURE__ */ f(Ke, { onClick: l, className: "!min-w-[80px] !w-[80px]", children: "Apply" })
|
|
25700
25728
|
] }) })
|
|
25701
25729
|
] }) });
|
|
25702
|
-
},
|
|
25730
|
+
}, _S = ({
|
|
25703
25731
|
editor: e
|
|
25704
25732
|
}) => {
|
|
25705
25733
|
const t = _a((n) => n.isCustomSpacingOpen), r = _a((n) => n.setCustomSpacingOpen);
|
|
25706
|
-
return /* @__PURE__ */ f(
|
|
25707
|
-
},
|
|
25734
|
+
return /* @__PURE__ */ f(NS, { editor: e, open: t, onOpenChange: r });
|
|
25735
|
+
}, RS = ({
|
|
25708
25736
|
editor: e,
|
|
25709
25737
|
ydoc: t,
|
|
25710
25738
|
tabs: r,
|
|
@@ -25750,7 +25778,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25750
25778
|
onRegisterExportTrigger: n
|
|
25751
25779
|
}
|
|
25752
25780
|
) });
|
|
25753
|
-
},
|
|
25781
|
+
}, IS = ({
|
|
25754
25782
|
onFocusMode: e,
|
|
25755
25783
|
isFocusMode: t,
|
|
25756
25784
|
onFocusModeChange: r
|
|
@@ -25769,7 +25797,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25769
25797
|
}, [a, c]), qp(() => {
|
|
25770
25798
|
i && c();
|
|
25771
25799
|
}), { isFocusMode: i, toggleFocusMode: c };
|
|
25772
|
-
},
|
|
25800
|
+
}, BS = [
|
|
25773
25801
|
"[data-editor-bubble-menu]",
|
|
25774
25802
|
"[data-radix-dialog-content]",
|
|
25775
25803
|
'[role="dialog"]',
|
|
@@ -25777,7 +25805,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25777
25805
|
"[data-overlay]",
|
|
25778
25806
|
"[data-radix-popper-content-wrapper]",
|
|
25779
25807
|
"[data-floating-ui-portal]"
|
|
25780
|
-
].join(", "),
|
|
25808
|
+
].join(", "), OS = (e, t) => !(t != null && t.contains(e)) && !e.closest(BS), LS = ({
|
|
25781
25809
|
dropdownOpen: e,
|
|
25782
25810
|
setDropdownOpen: t,
|
|
25783
25811
|
zoomLevel: r,
|
|
@@ -25854,7 +25882,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
25854
25882
|
}
|
|
25855
25883
|
) })
|
|
25856
25884
|
] });
|
|
25857
|
-
},
|
|
25885
|
+
}, MS = (e) => {
|
|
25858
25886
|
switch (e) {
|
|
25859
25887
|
case "meeting-notes":
|
|
25860
25888
|
return {
|
|
@@ -28652,14 +28680,14 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28652
28680
|
}), Tt = (e) => ({
|
|
28653
28681
|
type: "dBlock",
|
|
28654
28682
|
content: [e]
|
|
28655
|
-
}), ot = (e) => Xe(e, [{ type: "bold" }]), pt = (e) => Xe(e, [{ type: "italic" }]),
|
|
28683
|
+
}), ot = (e) => Xe(e, [{ type: "bold" }]), pt = (e) => Xe(e, [{ type: "italic" }]), FS = (e) => ({
|
|
28656
28684
|
type: "listItem",
|
|
28657
28685
|
content: [wn(e)]
|
|
28658
28686
|
}), eo = (e) => ({
|
|
28659
28687
|
type: "bulletList",
|
|
28660
28688
|
attrs: { tight: !0 },
|
|
28661
|
-
content: e.map(
|
|
28662
|
-
}),
|
|
28689
|
+
content: e.map(FS)
|
|
28690
|
+
}), US = {
|
|
28663
28691
|
type: "doc",
|
|
28664
28692
|
content: [
|
|
28665
28693
|
Tt(
|
|
@@ -28707,7 +28735,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28707
28735
|
wn([pt("[A little spicy blurb to hook your readers in]")])
|
|
28708
28736
|
)
|
|
28709
28737
|
]
|
|
28710
|
-
},
|
|
28738
|
+
}, PS = {
|
|
28711
28739
|
type: "doc",
|
|
28712
28740
|
content: [
|
|
28713
28741
|
Tt(Lr(1, [Xe("★Plot & outline")])),
|
|
@@ -28785,7 +28813,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28785
28813
|
])
|
|
28786
28814
|
)
|
|
28787
28815
|
]
|
|
28788
|
-
},
|
|
28816
|
+
}, HS = {
|
|
28789
28817
|
type: "doc",
|
|
28790
28818
|
content: [
|
|
28791
28819
|
Tt(Lr(1, [Xe("𖠋 Characters")])),
|
|
@@ -28833,7 +28861,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28833
28861
|
])
|
|
28834
28862
|
)
|
|
28835
28863
|
]
|
|
28836
|
-
},
|
|
28864
|
+
}, zS = {
|
|
28837
28865
|
type: "doc",
|
|
28838
28866
|
content: [
|
|
28839
28867
|
Tt(Lr(1, [Xe("꩜ World & Canon")])),
|
|
@@ -28888,14 +28916,14 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28888
28916
|
])
|
|
28889
28917
|
)
|
|
28890
28918
|
]
|
|
28891
|
-
},
|
|
28919
|
+
}, KS = {
|
|
28892
28920
|
type: "tabbed-doc",
|
|
28893
28921
|
title: "Fanfic Planner",
|
|
28894
28922
|
tabs: [
|
|
28895
|
-
{ name: "Ship Basis", emoji: "🥐", content:
|
|
28896
|
-
{ name: "Plot & Outline", emoji: "🍩", content:
|
|
28897
|
-
{ name: "Characters", emoji: "🍦", content:
|
|
28898
|
-
{ name: "World & Canon", emoji: "🧋", content:
|
|
28923
|
+
{ name: "Ship Basis", emoji: "🥐", content: US },
|
|
28924
|
+
{ name: "Plot & Outline", emoji: "🍩", content: PS },
|
|
28925
|
+
{ name: "Characters", emoji: "🍦", content: HS },
|
|
28926
|
+
{ name: "World & Canon", emoji: "🧋", content: zS }
|
|
28899
28927
|
]
|
|
28900
28928
|
}, im = {
|
|
28901
28929
|
id: "todo-list",
|
|
@@ -28905,11 +28933,11 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28905
28933
|
id: "breathe",
|
|
28906
28934
|
label: "Breathe!",
|
|
28907
28935
|
icon: "🧘♂️"
|
|
28908
|
-
},
|
|
28936
|
+
}, jS = {
|
|
28909
28937
|
id: "fanfic",
|
|
28910
28938
|
label: "Fanfic",
|
|
28911
28939
|
icon: "✍️",
|
|
28912
|
-
tabbedContent:
|
|
28940
|
+
tabbedContent: KS
|
|
28913
28941
|
}, Rd = [
|
|
28914
28942
|
{
|
|
28915
28943
|
id: "meeting-notes",
|
|
@@ -28932,7 +28960,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28932
28960
|
icon: "🏄🏻♂️"
|
|
28933
28961
|
}
|
|
28934
28962
|
], am = (e, t, r) => {
|
|
28935
|
-
const n = e.tabbedContent ??
|
|
28963
|
+
const n = e.tabbedContent ?? MS(e.id);
|
|
28936
28964
|
return {
|
|
28937
28965
|
label: e.label,
|
|
28938
28966
|
icon: e.icon,
|
|
@@ -28941,7 +28969,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28941
28969
|
},
|
|
28942
28970
|
content: n
|
|
28943
28971
|
};
|
|
28944
|
-
},
|
|
28972
|
+
}, VS = (e, t = !1) => (t ? [im, ...Rd] : Rd).map((r) => am(r, e)), $S = (e, t, r = !1) => (r ? [_d, jS] : [im, _d]).map(
|
|
28945
28973
|
(n) => am(n, e, t)
|
|
28946
28974
|
), Id = (e, t) => typeof e == "string" && Sy[e] ? /* @__PURE__ */ f(
|
|
28947
28975
|
Se,
|
|
@@ -28949,7 +28977,7 @@ const aS = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30p
|
|
|
28949
28977
|
name: e,
|
|
28950
28978
|
className: t
|
|
28951
28979
|
}
|
|
28952
|
-
) : typeof e == "string" ? /* @__PURE__ */ f("span", { className: t, children: e }) : null,
|
|
28980
|
+
) : typeof e == "string" ? /* @__PURE__ */ f("span", { className: t, children: e }) : null, qS = (e, t, r, n, o, s, i, a) => s || i || a ? null : /* @__PURE__ */ U(Ey, { className: "template-buttons space-x-0 gap-2 group-has-[.is-editor-empty[dir='rtl']]/collision:md:!left-0 group-has-[.is-editor-empty[dir='rtl']]/collision:md:!right-[unset]", children: [
|
|
28953
28981
|
e.map((c, u) => /* @__PURE__ */ U(
|
|
28954
28982
|
Ke,
|
|
28955
28983
|
{
|
|
@@ -29040,7 +29068,7 @@ function Ni(e, t, r) {
|
|
|
29040
29068
|
n.push(d);
|
|
29041
29069
|
}), n;
|
|
29042
29070
|
}
|
|
29043
|
-
var
|
|
29071
|
+
var WS = class cm {
|
|
29044
29072
|
constructor(t, r) {
|
|
29045
29073
|
this.anchor = t, this.head = r;
|
|
29046
29074
|
}
|
|
@@ -29106,7 +29134,7 @@ var PS = class cm {
|
|
|
29106
29134
|
return new this(t.resolve(r), t.resolve(n), o, s);
|
|
29107
29135
|
}
|
|
29108
29136
|
getBookmark() {
|
|
29109
|
-
return new
|
|
29137
|
+
return new WS(this.anchor, this.head);
|
|
29110
29138
|
}
|
|
29111
29139
|
};
|
|
29112
29140
|
sr.prototype.visible = !1;
|
|
@@ -29197,26 +29225,26 @@ co.create({
|
|
|
29197
29225
|
];
|
|
29198
29226
|
}
|
|
29199
29227
|
});
|
|
29200
|
-
function
|
|
29228
|
+
function GS(e) {
|
|
29201
29229
|
let t = "";
|
|
29202
29230
|
const r = getComputedStyle(e);
|
|
29203
29231
|
for (let n = 0; n < r.length; n += 1)
|
|
29204
29232
|
t += `${r[n]}:${r.getPropertyValue(r[n])};`;
|
|
29205
29233
|
return t;
|
|
29206
29234
|
}
|
|
29207
|
-
function
|
|
29235
|
+
function YS(e) {
|
|
29208
29236
|
const t = e.cloneNode(!0), r = [e, ...Array.from(e.getElementsByTagName("*"))], n = [t, ...Array.from(t.getElementsByTagName("*"))];
|
|
29209
29237
|
return r.forEach((o, s) => {
|
|
29210
|
-
n[s].style.cssText =
|
|
29238
|
+
n[s].style.cssText = GS(o);
|
|
29211
29239
|
}), t;
|
|
29212
29240
|
}
|
|
29213
|
-
function
|
|
29241
|
+
function XS(e, t) {
|
|
29214
29242
|
let r = e;
|
|
29215
29243
|
for (; r != null && r.parentElement && r.parentElement !== t.dom; )
|
|
29216
29244
|
r = r.parentElement;
|
|
29217
29245
|
return (r == null ? void 0 : r.parentElement) === t.dom ? r : void 0;
|
|
29218
29246
|
}
|
|
29219
|
-
function
|
|
29247
|
+
function ZS(e, t, r, n = 5) {
|
|
29220
29248
|
const o = e.dom, s = o.firstElementChild, i = o.lastElementChild;
|
|
29221
29249
|
if (!s || !i)
|
|
29222
29250
|
return { x: t, y: r };
|
|
@@ -29225,12 +29253,12 @@ function jS(e, t, r, n = 5) {
|
|
|
29225
29253
|
return d && h && (p = a), { x: Math.min(Math.max(p.left + n, t), p.right - n), y: u };
|
|
29226
29254
|
}
|
|
29227
29255
|
var lm = (e) => {
|
|
29228
|
-
const { x: t, y: r, editor: n } = e, { view: o, state: s } = n, { x: i, y: a } =
|
|
29256
|
+
const { x: t, y: r, editor: n } = e, { view: o, state: s } = n, { x: i, y: a } = ZS(o, t, r, 5), c = o.root.elementsFromPoint(i, a);
|
|
29229
29257
|
let u;
|
|
29230
29258
|
if (Array.prototype.some.call(c, (h) => {
|
|
29231
29259
|
if (!o.dom.contains(h))
|
|
29232
29260
|
return !1;
|
|
29233
|
-
const p =
|
|
29261
|
+
const p = XS(h, o);
|
|
29234
29262
|
return p ? (u = p, !0) : !1;
|
|
29235
29263
|
}), !u)
|
|
29236
29264
|
return { resultElement: null, resultNode: null, pos: null };
|
|
@@ -29250,13 +29278,13 @@ var lm = (e) => {
|
|
|
29250
29278
|
function ks(e, t) {
|
|
29251
29279
|
return window.getComputedStyle(e)[t];
|
|
29252
29280
|
}
|
|
29253
|
-
function
|
|
29281
|
+
function QS(e = 0, t = 0, r = 0) {
|
|
29254
29282
|
return Math.min(Math.max(e, t), r);
|
|
29255
29283
|
}
|
|
29256
|
-
function
|
|
29284
|
+
function JS(e, t, r) {
|
|
29257
29285
|
const n = parseInt(ks(e.dom, "paddingLeft"), 10), o = parseInt(ks(e.dom, "paddingRight"), 10), s = parseInt(ks(e.dom, "borderLeftWidth"), 10), i = parseInt(ks(e.dom, "borderLeftWidth"), 10), a = e.dom.getBoundingClientRect();
|
|
29258
29286
|
return {
|
|
29259
|
-
left:
|
|
29287
|
+
left: QS(t, a.left + n + s, a.right - o - i),
|
|
29260
29288
|
top: r
|
|
29261
29289
|
};
|
|
29262
29290
|
}
|
|
@@ -29264,7 +29292,7 @@ function um(e) {
|
|
|
29264
29292
|
var t;
|
|
29265
29293
|
(t = e.parentNode) == null || t.removeChild(e);
|
|
29266
29294
|
}
|
|
29267
|
-
function
|
|
29295
|
+
function e5(e, t) {
|
|
29268
29296
|
const { doc: r } = t.view.state, n = lm({
|
|
29269
29297
|
editor: t,
|
|
29270
29298
|
x: e.clientX,
|
|
@@ -29272,7 +29300,7 @@ function qS(e, t) {
|
|
|
29272
29300
|
});
|
|
29273
29301
|
if (!n.resultNode || n.pos === null)
|
|
29274
29302
|
return [];
|
|
29275
|
-
const o = e.clientX, s =
|
|
29303
|
+
const o = e.clientX, s = JS(t.view, o, e.clientY), i = t.view.posAtCoords(s);
|
|
29276
29304
|
if (!i)
|
|
29277
29305
|
return [];
|
|
29278
29306
|
const { pos: a } = i;
|
|
@@ -29281,16 +29309,16 @@ function qS(e, t) {
|
|
|
29281
29309
|
const u = r.resolve(n.pos), l = r.resolve(n.pos + 1);
|
|
29282
29310
|
return Ni(u, l, 0);
|
|
29283
29311
|
}
|
|
29284
|
-
function
|
|
29312
|
+
function t5(e, t) {
|
|
29285
29313
|
const { view: r } = t;
|
|
29286
29314
|
if (!e.dataTransfer)
|
|
29287
29315
|
return;
|
|
29288
|
-
const { empty: n, $from: o, $to: s } = r.state.selection, i =
|
|
29316
|
+
const { empty: n, $from: o, $to: s } = r.state.selection, i = e5(e, t), a = Ni(o, s, 0), c = a.some((b) => i.find((v) => v.$from === b.$from && v.$to === b.$to)), u = n || !c ? i : a;
|
|
29289
29317
|
if (!u.length)
|
|
29290
29318
|
return;
|
|
29291
29319
|
const { tr: l } = r.state, d = document.createElement("div"), h = u[0].$from.pos, p = u[u.length - 1].$to.pos, g = sr.create(r.state.doc, h, p), y = g.content();
|
|
29292
29320
|
u.forEach((b) => {
|
|
29293
|
-
const v = r.nodeDOM(b.$from.pos), _ =
|
|
29321
|
+
const v = r.nodeDOM(b.$from.pos), _ = YS(v);
|
|
29294
29322
|
d.append(_);
|
|
29295
29323
|
}), d.style.position = "absolute", d.style.top = "-10000px", document.body.append(d), e.dataTransfer.clearData(), e.dataTransfer.setDragImage(d, 0, 0), r.dragging = { slice: y, move: !0 }, l.setSelection(g), r.dispatch(l), document.addEventListener("drop", () => um(d), { once: !0 });
|
|
29296
29324
|
}
|
|
@@ -29308,7 +29336,7 @@ var Od = (e, t) => {
|
|
|
29308
29336
|
}, Sa = (e, t) => {
|
|
29309
29337
|
const r = qo.getState(e);
|
|
29310
29338
|
return r ? Ba(t, r.type, r.binding.mapping) : null;
|
|
29311
|
-
},
|
|
29339
|
+
}, n5 = (e, t) => {
|
|
29312
29340
|
const r = qo.getState(e);
|
|
29313
29341
|
return r ? Oa(r.doc, r.type, t, r.binding.mapping) || 0 : -1;
|
|
29314
29342
|
}, Md = (e, t) => {
|
|
@@ -29353,7 +29381,7 @@ var Od = (e, t) => {
|
|
|
29353
29381
|
});
|
|
29354
29382
|
}
|
|
29355
29383
|
function _(E) {
|
|
29356
|
-
i == null || i(E),
|
|
29384
|
+
i == null || i(E), t5(E, r), setTimeout(() => {
|
|
29357
29385
|
t && (t.style.pointerEvents = "none");
|
|
29358
29386
|
}, 0);
|
|
29359
29387
|
}
|
|
@@ -29376,7 +29404,7 @@ var Od = (e, t) => {
|
|
|
29376
29404
|
return y(), u = !1, l = null, d = -1, s == null || s({ editor: r, node: null, pos: -1 }), F;
|
|
29377
29405
|
if (E.docChanged && d !== -1 && t)
|
|
29378
29406
|
if (Gg(E)) {
|
|
29379
|
-
const S =
|
|
29407
|
+
const S = n5(w, h);
|
|
29380
29408
|
S !== d && (d = S);
|
|
29381
29409
|
} else {
|
|
29382
29410
|
const S = E.mapping.map(d);
|
|
@@ -29485,7 +29513,7 @@ co.create({
|
|
|
29485
29513
|
];
|
|
29486
29514
|
}
|
|
29487
29515
|
});
|
|
29488
|
-
var
|
|
29516
|
+
var r5 = (e) => {
|
|
29489
29517
|
const {
|
|
29490
29518
|
className: t = "drag-handle",
|
|
29491
29519
|
children: r,
|
|
@@ -29518,7 +29546,7 @@ var YS = (e) => {
|
|
|
29518
29546
|
};
|
|
29519
29547
|
}, [u, n, s, o, c, i, a]), /* @__PURE__ */ f("div", { className: t, style: { visibility: "hidden", position: "absolute" }, ref: l, children: r });
|
|
29520
29548
|
};
|
|
29521
|
-
function
|
|
29549
|
+
function o5(e) {
|
|
29522
29550
|
const [t, r] = pe(!1), n = ie(e), o = ie(null), s = ee(() => {
|
|
29523
29551
|
if (!n.current) {
|
|
29524
29552
|
r(!1);
|
|
@@ -29549,8 +29577,8 @@ function XS(e) {
|
|
|
29549
29577
|
[t]
|
|
29550
29578
|
);
|
|
29551
29579
|
}
|
|
29552
|
-
const
|
|
29553
|
-
const { hasAIWriter: r } =
|
|
29580
|
+
const s5 = (e, t) => {
|
|
29581
|
+
const { hasAIWriter: r } = o5(e), n = ee(() => {
|
|
29554
29582
|
const a = t();
|
|
29555
29583
|
if (!a)
|
|
29556
29584
|
return;
|
|
@@ -29671,7 +29699,7 @@ function Fd(e, t) {
|
|
|
29671
29699
|
return e(t);
|
|
29672
29700
|
e != null && (e.current = t);
|
|
29673
29701
|
}
|
|
29674
|
-
function
|
|
29702
|
+
function i5(...e) {
|
|
29675
29703
|
return (t) => {
|
|
29676
29704
|
let r = !1;
|
|
29677
29705
|
const n = e.map((o) => {
|
|
@@ -29688,20 +29716,20 @@ function QS(...e) {
|
|
|
29688
29716
|
};
|
|
29689
29717
|
}
|
|
29690
29718
|
function ym(...e) {
|
|
29691
|
-
return Nt.useCallback(
|
|
29719
|
+
return Nt.useCallback(i5(...e), e);
|
|
29692
29720
|
}
|
|
29693
29721
|
// @__NO_SIDE_EFFECTS__
|
|
29694
|
-
function
|
|
29722
|
+
function a5(e) {
|
|
29695
29723
|
const t = Nt.forwardRef((r, n) => {
|
|
29696
29724
|
let { children: o, ...s } = r, i = null, a = !1;
|
|
29697
29725
|
const c = [];
|
|
29698
29726
|
Ud(o) && typeof Ts == "function" && (o = Ts(o._payload)), Nt.Children.forEach(o, (h) => {
|
|
29699
29727
|
var p;
|
|
29700
|
-
if (
|
|
29728
|
+
if (f5(h)) {
|
|
29701
29729
|
a = !0;
|
|
29702
29730
|
const g = h;
|
|
29703
29731
|
let y = "child" in g.props ? g.props.child : g.props.children;
|
|
29704
|
-
Ud(y) && typeof Ts == "function" && (y = Ts(y._payload)), i =
|
|
29732
|
+
Ud(y) && typeof Ts == "function" && (y = Ts(y._payload)), i = l5(g, y), c.push((p = i == null ? void 0 : i.props) == null ? void 0 : p.children);
|
|
29705
29733
|
} else
|
|
29706
29734
|
c.push(h);
|
|
29707
29735
|
}), i ? i = Nt.cloneElement(i, void 0, c) : (
|
|
@@ -29711,27 +29739,27 @@ function JS(e) {
|
|
|
29711
29739
|
// itself as the slot target — throw a descriptive error below instead.
|
|
29712
29740
|
!a && Nt.Children.count(o) === 1 && Nt.isValidElement(o) && (i = o)
|
|
29713
29741
|
);
|
|
29714
|
-
const u = i ?
|
|
29742
|
+
const u = i ? d5(i) : void 0, l = ym(n, u);
|
|
29715
29743
|
if (!i) {
|
|
29716
29744
|
if (o || o === 0)
|
|
29717
29745
|
throw new Error(
|
|
29718
|
-
a ?
|
|
29746
|
+
a ? g5(e) : m5(e)
|
|
29719
29747
|
);
|
|
29720
29748
|
return o;
|
|
29721
29749
|
}
|
|
29722
|
-
const d =
|
|
29750
|
+
const d = u5(s, i.props ?? {});
|
|
29723
29751
|
return i.type !== Nt.Fragment && (d.ref = n ? l : u), Nt.cloneElement(i, d);
|
|
29724
29752
|
});
|
|
29725
29753
|
return t.displayName = `${e}.Slot`, t;
|
|
29726
29754
|
}
|
|
29727
|
-
var
|
|
29755
|
+
var c5 = Symbol.for("radix.slottable"), l5 = (e, t) => {
|
|
29728
29756
|
if ("child" in e.props) {
|
|
29729
29757
|
const r = e.props.child;
|
|
29730
29758
|
return Nt.isValidElement(r) ? Nt.cloneElement(r, void 0, e.props.children(r.props.children)) : null;
|
|
29731
29759
|
}
|
|
29732
29760
|
return Nt.isValidElement(t) ? t : null;
|
|
29733
29761
|
};
|
|
29734
|
-
function
|
|
29762
|
+
function u5(e, t) {
|
|
29735
29763
|
const r = { ...t };
|
|
29736
29764
|
for (const n in t) {
|
|
29737
29765
|
const o = e[n], s = t[n];
|
|
@@ -29742,22 +29770,22 @@ function n5(e, t) {
|
|
|
29742
29770
|
}
|
|
29743
29771
|
return { ...e, ...r };
|
|
29744
29772
|
}
|
|
29745
|
-
function
|
|
29773
|
+
function d5(e) {
|
|
29746
29774
|
var n, o;
|
|
29747
29775
|
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
29748
29776
|
return r ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
29749
29777
|
}
|
|
29750
|
-
function
|
|
29751
|
-
return Nt.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
29778
|
+
function f5(e) {
|
|
29779
|
+
return Nt.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === c5;
|
|
29752
29780
|
}
|
|
29753
|
-
var
|
|
29781
|
+
var h5 = Symbol.for("react.lazy");
|
|
29754
29782
|
function Ud(e) {
|
|
29755
|
-
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof ===
|
|
29783
|
+
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === h5 && "_payload" in e && p5(e._payload);
|
|
29756
29784
|
}
|
|
29757
|
-
function
|
|
29785
|
+
function p5(e) {
|
|
29758
29786
|
return typeof e == "object" && e !== null && "then" in e;
|
|
29759
29787
|
}
|
|
29760
|
-
var
|
|
29788
|
+
var m5 = (e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, g5 = (e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, Ts = Nt[" use ".trim().toString()], y5 = [
|
|
29761
29789
|
"a",
|
|
29762
29790
|
"button",
|
|
29763
29791
|
"div",
|
|
@@ -29775,8 +29803,8 @@ var a5 = (e) => `${e} failed to slot onto its children. Expected a single React
|
|
|
29775
29803
|
"span",
|
|
29776
29804
|
"svg",
|
|
29777
29805
|
"ul"
|
|
29778
|
-
],
|
|
29779
|
-
const r = /* @__PURE__ */
|
|
29806
|
+
], x5 = y5.reduce((e, t) => {
|
|
29807
|
+
const r = /* @__PURE__ */ a5(`Primitive.${t}`), n = Nt.forwardRef((o, s) => {
|
|
29780
29808
|
const { asChild: i, ...a } = o, c = i ? r : t;
|
|
29781
29809
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(c, { ...a, ref: s });
|
|
29782
29810
|
});
|
|
@@ -29791,7 +29819,7 @@ function Pd(e) {
|
|
|
29791
29819
|
return (n = t.current) == null ? void 0 : n.call(t, ...r);
|
|
29792
29820
|
}, []);
|
|
29793
29821
|
}
|
|
29794
|
-
var Da = "focusScope.autoFocusOnMount", Aa = "focusScope.autoFocusOnUnmount", Hd = { bubbles: !1, cancelable: !0 },
|
|
29822
|
+
var Da = "focusScope.autoFocusOnMount", Aa = "focusScope.autoFocusOnUnmount", Hd = { bubbles: !1, cancelable: !0 }, w5 = "FocusScope", xm = Nt.forwardRef((e, t) => {
|
|
29795
29823
|
const {
|
|
29796
29824
|
loop: r = !1,
|
|
29797
29825
|
trapped: n = !1,
|
|
@@ -29834,7 +29862,7 @@ var Da = "focusScope.autoFocusOnMount", Aa = "focusScope.autoFocusOnUnmount", Hd
|
|
|
29834
29862
|
const y = document.activeElement;
|
|
29835
29863
|
if (!a.contains(y)) {
|
|
29836
29864
|
const v = new CustomEvent(Da, Hd);
|
|
29837
|
-
a.addEventListener(Da, u), a.dispatchEvent(v), v.defaultPrevented || (
|
|
29865
|
+
a.addEventListener(Da, u), a.dispatchEvent(v), v.defaultPrevented || (b5(D5(wm(a)), { select: !0 }), document.activeElement === y && hr(a));
|
|
29838
29866
|
}
|
|
29839
29867
|
return () => {
|
|
29840
29868
|
a.removeEventListener(Da, u), setTimeout(() => {
|
|
@@ -29849,21 +29877,21 @@ var Da = "focusScope.autoFocusOnMount", Aa = "focusScope.autoFocusOnUnmount", Hd
|
|
|
29849
29877
|
if (!r && !n || p.paused) return;
|
|
29850
29878
|
const b = y.key === "Tab" && !y.altKey && !y.ctrlKey && !y.metaKey, v = document.activeElement;
|
|
29851
29879
|
if (b && v) {
|
|
29852
|
-
const _ = y.currentTarget, [N, E] =
|
|
29880
|
+
const _ = y.currentTarget, [N, E] = v5(_);
|
|
29853
29881
|
N && E ? !y.shiftKey && v === E ? (y.preventDefault(), r && hr(N, { select: !0 })) : y.shiftKey && v === N && (y.preventDefault(), r && hr(E, { select: !0 })) : v === _ && y.preventDefault();
|
|
29854
29882
|
}
|
|
29855
29883
|
},
|
|
29856
29884
|
[r, n, p.paused]
|
|
29857
29885
|
);
|
|
29858
|
-
return /* @__PURE__ */ f(
|
|
29886
|
+
return /* @__PURE__ */ f(x5.div, { tabIndex: -1, ...i, ref: h, onKeyDown: g });
|
|
29859
29887
|
});
|
|
29860
|
-
xm.displayName =
|
|
29861
|
-
function
|
|
29888
|
+
xm.displayName = w5;
|
|
29889
|
+
function b5(e, { select: t = !1 } = {}) {
|
|
29862
29890
|
const r = document.activeElement;
|
|
29863
29891
|
for (const n of e)
|
|
29864
29892
|
if (hr(n, { select: t }), document.activeElement !== r) return;
|
|
29865
29893
|
}
|
|
29866
|
-
function
|
|
29894
|
+
function v5(e) {
|
|
29867
29895
|
const t = wm(e), r = zd(t, e), n = zd(t.reverse(), e);
|
|
29868
29896
|
return [r, n];
|
|
29869
29897
|
}
|
|
@@ -29879,9 +29907,9 @@ function wm(e) {
|
|
|
29879
29907
|
}
|
|
29880
29908
|
function zd(e, t) {
|
|
29881
29909
|
for (const r of e)
|
|
29882
|
-
if (!
|
|
29910
|
+
if (!C5(r, { upTo: t })) return r;
|
|
29883
29911
|
}
|
|
29884
|
-
function
|
|
29912
|
+
function C5(e, { upTo: t }) {
|
|
29885
29913
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
29886
29914
|
for (; e; ) {
|
|
29887
29915
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -29890,17 +29918,17 @@ function p5(e, { upTo: t }) {
|
|
|
29890
29918
|
}
|
|
29891
29919
|
return !1;
|
|
29892
29920
|
}
|
|
29893
|
-
function
|
|
29921
|
+
function E5(e) {
|
|
29894
29922
|
return e instanceof HTMLInputElement && "select" in e;
|
|
29895
29923
|
}
|
|
29896
29924
|
function hr(e, { select: t = !1 } = {}) {
|
|
29897
29925
|
if (e && e.focus) {
|
|
29898
29926
|
const r = document.activeElement;
|
|
29899
|
-
e.focus({ preventScroll: !0 }), e !== r &&
|
|
29927
|
+
e.focus({ preventScroll: !0 }), e !== r && E5(e) && t && e.select();
|
|
29900
29928
|
}
|
|
29901
29929
|
}
|
|
29902
|
-
var Kd =
|
|
29903
|
-
function
|
|
29930
|
+
var Kd = S5();
|
|
29931
|
+
function S5() {
|
|
29904
29932
|
let e = [];
|
|
29905
29933
|
return {
|
|
29906
29934
|
add(t) {
|
|
@@ -29917,7 +29945,7 @@ function jd(e, t) {
|
|
|
29917
29945
|
const r = [...e], n = r.indexOf(t);
|
|
29918
29946
|
return n !== -1 && r.splice(n, 1), r;
|
|
29919
29947
|
}
|
|
29920
|
-
function
|
|
29948
|
+
function D5(e) {
|
|
29921
29949
|
return e.filter((t) => t.tagName !== "A");
|
|
29922
29950
|
}
|
|
29923
29951
|
const bm = Qt(
|
|
@@ -29927,7 +29955,7 @@ const bm = Qt(
|
|
|
29927
29955
|
(e, t) => /* @__PURE__ */ f("div", { ref: t, className: "flex items-center", children: e.children })
|
|
29928
29956
|
);
|
|
29929
29957
|
bm.displayName = "MenuTrigger";
|
|
29930
|
-
const
|
|
29958
|
+
const A5 = St.memo(
|
|
29931
29959
|
({ isOpen: e, onOpenChange: t, trigger: r, actions: n }) => /* @__PURE__ */ f(xm, { onMountAutoFocus: (o) => o.preventDefault(), trapped: !1, children: /* @__PURE__ */ U(uo, { open: e, onOpenChange: t, children: [
|
|
29932
29960
|
/* @__PURE__ */ f(Go, { asChild: !0, children: /* @__PURE__ */ f(bm, { children: r }) }),
|
|
29933
29961
|
/* @__PURE__ */ f(
|
|
@@ -29981,7 +30009,7 @@ const x5 = St.memo(
|
|
|
29981
30009
|
position: t = "bottom",
|
|
29982
30010
|
children: r
|
|
29983
30011
|
}) => /* @__PURE__ */ f(vt, { text: e, position: t, asTriggerChild: !0, children: r })
|
|
29984
|
-
),
|
|
30012
|
+
), k5 = St.memo(
|
|
29985
30013
|
({ children: e }) => /* @__PURE__ */ f(
|
|
29986
30014
|
_i,
|
|
29987
30015
|
{
|
|
@@ -29993,7 +30021,7 @@ const x5 = St.memo(
|
|
|
29993
30021
|
children: e
|
|
29994
30022
|
}
|
|
29995
30023
|
)
|
|
29996
|
-
),
|
|
30024
|
+
), T5 = St.memo(
|
|
29997
30025
|
({ children: e }) => /* @__PURE__ */ f(
|
|
29998
30026
|
_i,
|
|
29999
30027
|
{
|
|
@@ -30005,7 +30033,7 @@ const x5 = St.memo(
|
|
|
30005
30033
|
children: e
|
|
30006
30034
|
}
|
|
30007
30035
|
)
|
|
30008
|
-
),
|
|
30036
|
+
), N5 = St.memo(
|
|
30009
30037
|
({
|
|
30010
30038
|
isCollapsed: e,
|
|
30011
30039
|
children: t
|
|
@@ -30017,23 +30045,23 @@ const x5 = St.memo(
|
|
|
30017
30045
|
children: t
|
|
30018
30046
|
}
|
|
30019
30047
|
)
|
|
30020
|
-
),
|
|
30048
|
+
), _5 = St.memo(
|
|
30021
30049
|
({ children: e }) => /* @__PURE__ */ f(_i, { text: "Copy link to heading", position: "bottom", children: e })
|
|
30022
|
-
), Vd = 24,
|
|
30050
|
+
), Vd = 24, R5 = (e, t) => {
|
|
30023
30051
|
try {
|
|
30024
30052
|
const r = e.view.nodeDOM(t), n = (r == null ? void 0 : r.querySelector("[data-node-view-content] > *")) ?? r ?? null, o = n ? parseFloat(getComputedStyle(n).lineHeight) : NaN;
|
|
30025
30053
|
return Number.isFinite(o) && o > Vd ? Math.round((o - Vd) / 2) : 0;
|
|
30026
30054
|
} catch {
|
|
30027
30055
|
return 0;
|
|
30028
30056
|
}
|
|
30029
|
-
},
|
|
30057
|
+
}, I5 = (e, t) => {
|
|
30030
30058
|
const { doc: r } = e.state;
|
|
30031
30059
|
if (t < 0 || t > r.content.size) return null;
|
|
30032
30060
|
const n = r.resolve(t);
|
|
30033
30061
|
if (n.depth !== 0) return null;
|
|
30034
30062
|
const o = n.nodeAfter;
|
|
30035
30063
|
return o ? { editor: e, node: o, pos: t } : null;
|
|
30036
|
-
},
|
|
30064
|
+
}, B5 = (e, t, r, n) => {
|
|
30037
30065
|
if (r.childCount > 0 || !n.dataTransfer) return !1;
|
|
30038
30066
|
const { view: o } = e, s = sr.create(
|
|
30039
30067
|
o.state.doc,
|
|
@@ -30050,22 +30078,22 @@ const x5 = St.memo(
|
|
|
30050
30078
|
const c = document.querySelector(".drag-handle");
|
|
30051
30079
|
c && (c.style.pointerEvents = "none");
|
|
30052
30080
|
}, 0), !0;
|
|
30053
|
-
},
|
|
30081
|
+
}, O5 = { placement: "left-start" }, L5 = ({
|
|
30054
30082
|
editor: e,
|
|
30055
30083
|
runtimeState: t,
|
|
30056
30084
|
onCopyHeadingLink: r
|
|
30057
30085
|
}) => {
|
|
30058
30086
|
const [n, o] = pe(null), [s, i] = pe(!1), a = ie(null), c = Ht("(max-width: 767px)"), u = ee(
|
|
30059
|
-
() => n ?
|
|
30087
|
+
() => n ? I5(e, n.pos) : null,
|
|
30060
30088
|
[e, n]
|
|
30061
|
-
), l =
|
|
30089
|
+
), l = s5(e, u), d = ee(
|
|
30062
30090
|
({
|
|
30063
30091
|
node: w,
|
|
30064
30092
|
editor: x,
|
|
30065
30093
|
pos: D
|
|
30066
30094
|
}) => {
|
|
30067
30095
|
if (w) {
|
|
30068
|
-
const S =
|
|
30096
|
+
const S = R5(x, D);
|
|
30069
30097
|
a.current && (a.current.style.transform = S ? `translateY(${S}px)` : "");
|
|
30070
30098
|
}
|
|
30071
30099
|
o((S) => !w || S && S.pos === D && S.node === w ? S : { node: w, pos: D });
|
|
@@ -30081,7 +30109,7 @@ const x5 = St.memo(
|
|
|
30081
30109
|
if (!w) return;
|
|
30082
30110
|
const x = (D) => {
|
|
30083
30111
|
const S = h.current();
|
|
30084
|
-
S &&
|
|
30112
|
+
S && B5(
|
|
30085
30113
|
S.editor,
|
|
30086
30114
|
S.pos,
|
|
30087
30115
|
S.node,
|
|
@@ -30119,10 +30147,10 @@ const x5 = St.memo(
|
|
|
30119
30147
|
"d-block-button color-text-default hover:color-bg-default-hover aspect-square h-5 w-5 min-w-0 shrink-0"
|
|
30120
30148
|
);
|
|
30121
30149
|
return /* @__PURE__ */ f(
|
|
30122
|
-
|
|
30150
|
+
r5,
|
|
30123
30151
|
{
|
|
30124
30152
|
editor: e,
|
|
30125
|
-
computePositionConfig:
|
|
30153
|
+
computePositionConfig: O5,
|
|
30126
30154
|
onNodeChange: d,
|
|
30127
30155
|
children: /* @__PURE__ */ U(
|
|
30128
30156
|
"div",
|
|
@@ -30133,7 +30161,7 @@ const x5 = St.memo(
|
|
|
30133
30161
|
style: b ? { visibility: "hidden", pointerEvents: "none" } : void 0,
|
|
30134
30162
|
children: [
|
|
30135
30163
|
g ? /* @__PURE__ */ U(Bt, { children: [
|
|
30136
|
-
/* @__PURE__ */ f(
|
|
30164
|
+
/* @__PURE__ */ f(k5, { children: /* @__PURE__ */ f(
|
|
30137
30165
|
pm,
|
|
30138
30166
|
{
|
|
30139
30167
|
onClick: _,
|
|
@@ -30141,11 +30169,11 @@ const x5 = St.memo(
|
|
|
30141
30169
|
}
|
|
30142
30170
|
) }),
|
|
30143
30171
|
/* @__PURE__ */ f(
|
|
30144
|
-
|
|
30172
|
+
A5,
|
|
30145
30173
|
{
|
|
30146
30174
|
isOpen: s,
|
|
30147
30175
|
onOpenChange: i,
|
|
30148
|
-
trigger: /* @__PURE__ */ f(
|
|
30176
|
+
trigger: /* @__PURE__ */ f(T5, { children: /* @__PURE__ */ f(
|
|
30149
30177
|
hm,
|
|
30150
30178
|
{
|
|
30151
30179
|
onClick: N,
|
|
@@ -30156,7 +30184,7 @@ const x5 = St.memo(
|
|
|
30156
30184
|
}
|
|
30157
30185
|
)
|
|
30158
30186
|
] }) : null,
|
|
30159
|
-
/* @__PURE__ */ f(
|
|
30187
|
+
/* @__PURE__ */ f(N5, { isCollapsed: !!(p != null && p.isThisHeadingCollapsed), children: /* @__PURE__ */ f(
|
|
30160
30188
|
mm,
|
|
30161
30189
|
{
|
|
30162
30190
|
isCollapsed: !!(p != null && p.isThisHeadingCollapsed),
|
|
@@ -30167,7 +30195,7 @@ const x5 = St.memo(
|
|
|
30167
30195
|
)
|
|
30168
30196
|
}
|
|
30169
30197
|
) }),
|
|
30170
|
-
v ? /* @__PURE__ */ f(
|
|
30198
|
+
v ? /* @__PURE__ */ f(_5, { children: /* @__PURE__ */ f(
|
|
30171
30199
|
gm,
|
|
30172
30200
|
{
|
|
30173
30201
|
onClick: F,
|
|
@@ -30182,7 +30210,7 @@ const x5 = St.memo(
|
|
|
30182
30210
|
)
|
|
30183
30211
|
}
|
|
30184
30212
|
);
|
|
30185
|
-
},
|
|
30213
|
+
}, M5 = (e) => {
|
|
30186
30214
|
var r;
|
|
30187
30215
|
const t = e.type.name === "dBlock" ? e.content.firstChild : e;
|
|
30188
30216
|
if ((t == null ? void 0 : t.type.name) !== "paragraph")
|
|
@@ -30195,7 +30223,7 @@ const x5 = St.memo(
|
|
|
30195
30223
|
return !0;
|
|
30196
30224
|
}, bc = (e) => {
|
|
30197
30225
|
for (let t = 0; t < e.childCount; t += 1)
|
|
30198
|
-
if (!
|
|
30226
|
+
if (!M5(e.child(t)))
|
|
30199
30227
|
return !1;
|
|
30200
30228
|
return !0;
|
|
30201
30229
|
}, Ms = (e) => {
|
|
@@ -30210,11 +30238,11 @@ const x5 = St.memo(
|
|
|
30210
30238
|
node: n,
|
|
30211
30239
|
pos: o
|
|
30212
30240
|
};
|
|
30213
|
-
},
|
|
30241
|
+
}, F5 = (e, t) => !e || e.isDestroyed ? null : vm(
|
|
30214
30242
|
e,
|
|
30215
30243
|
t,
|
|
30216
30244
|
bc(e.state.doc)
|
|
30217
|
-
),
|
|
30245
|
+
), U5 = ({
|
|
30218
30246
|
editor: e,
|
|
30219
30247
|
enableFanficTemplate: t,
|
|
30220
30248
|
onApplyTabbedTemplate: r,
|
|
@@ -30266,7 +30294,7 @@ const x5 = St.memo(
|
|
|
30266
30294
|
c.isBlank
|
|
30267
30295
|
) : null, p = ee(
|
|
30268
30296
|
(N) => {
|
|
30269
|
-
const E =
|
|
30297
|
+
const E = F5(e, n);
|
|
30270
30298
|
if (!E)
|
|
30271
30299
|
return;
|
|
30272
30300
|
const F = !!(e != null && e.schema.nodes.dBlock);
|
|
@@ -30277,14 +30305,14 @@ const x5 = St.memo(
|
|
|
30277
30305
|
},
|
|
30278
30306
|
[e, n]
|
|
30279
30307
|
), g = Ze(
|
|
30280
|
-
() =>
|
|
30308
|
+
() => $S(
|
|
30281
30309
|
p,
|
|
30282
30310
|
r,
|
|
30283
30311
|
t
|
|
30284
30312
|
),
|
|
30285
30313
|
[p, t, r]
|
|
30286
30314
|
), y = Ze(
|
|
30287
|
-
() =>
|
|
30315
|
+
() => VS(p, t),
|
|
30288
30316
|
[p, t]
|
|
30289
30317
|
), b = ee(() => {
|
|
30290
30318
|
s((N) => (a(N ? 2 : y.length), !N));
|
|
@@ -30296,7 +30324,7 @@ const x5 = St.memo(
|
|
|
30296
30324
|
"data-template-overlay": "true",
|
|
30297
30325
|
contentEditable: !1,
|
|
30298
30326
|
className: "top-[66px] right-20 w-max absolute z-10 max-md:right-[unset] max-md:left-9",
|
|
30299
|
-
children:
|
|
30327
|
+
children: qS(
|
|
30300
30328
|
g,
|
|
30301
30329
|
y,
|
|
30302
30330
|
i,
|
|
@@ -30321,7 +30349,7 @@ const x5 = St.memo(
|
|
|
30321
30349
|
}) => o ? /* @__PURE__ */ f(Bt, { children: e }) : /* @__PURE__ */ U(Bt, { children: [
|
|
30322
30350
|
e,
|
|
30323
30351
|
t && !t.isDestroyed ? /* @__PURE__ */ f(
|
|
30324
|
-
|
|
30352
|
+
L5,
|
|
30325
30353
|
{
|
|
30326
30354
|
editor: t,
|
|
30327
30355
|
runtimeState: n,
|
|
@@ -30329,7 +30357,7 @@ const x5 = St.memo(
|
|
|
30329
30357
|
}
|
|
30330
30358
|
) : null,
|
|
30331
30359
|
/* @__PURE__ */ f(
|
|
30332
|
-
|
|
30360
|
+
U5,
|
|
30333
30361
|
{
|
|
30334
30362
|
editor: t,
|
|
30335
30363
|
enableFanficTemplate: r,
|
|
@@ -30348,7 +30376,7 @@ const x5 = St.memo(
|
|
|
30348
30376
|
if (!n.has(o) || !Object.is(s, n.get(o)))
|
|
30349
30377
|
return !1;
|
|
30350
30378
|
return !0;
|
|
30351
|
-
},
|
|
30379
|
+
}, P5 = (e, t) => {
|
|
30352
30380
|
const r = e[Symbol.iterator](), n = t[Symbol.iterator]();
|
|
30353
30381
|
let o = r.next(), s = n.next();
|
|
30354
30382
|
for (; !o.done && !s.done; ) {
|
|
@@ -30358,25 +30386,25 @@ const x5 = St.memo(
|
|
|
30358
30386
|
}
|
|
30359
30387
|
return !!o.done && !!s.done;
|
|
30360
30388
|
};
|
|
30361
|
-
function
|
|
30362
|
-
return Object.is(e, t) ? !0 : typeof e != "object" || e === null || typeof t != "object" || t === null || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 : $d(e) && $d(t) ? qd(e) && qd(t) ? Wd(e, t) :
|
|
30389
|
+
function H5(e, t) {
|
|
30390
|
+
return Object.is(e, t) ? !0 : typeof e != "object" || e === null || typeof t != "object" || t === null || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 : $d(e) && $d(t) ? qd(e) && qd(t) ? Wd(e, t) : P5(e, t) : Wd(
|
|
30363
30391
|
{ entries: () => Object.entries(e) },
|
|
30364
30392
|
{ entries: () => Object.entries(t) }
|
|
30365
30393
|
);
|
|
30366
30394
|
}
|
|
30367
|
-
function
|
|
30395
|
+
function z5(e) {
|
|
30368
30396
|
const t = St.useRef(void 0);
|
|
30369
30397
|
return (r) => {
|
|
30370
30398
|
const n = e(r);
|
|
30371
|
-
return
|
|
30399
|
+
return H5(t.current, n) ? t.current : t.current = n;
|
|
30372
30400
|
};
|
|
30373
30401
|
}
|
|
30374
|
-
const
|
|
30402
|
+
const K5 = ({
|
|
30375
30403
|
editor: e,
|
|
30376
30404
|
viewerMode: t
|
|
30377
30405
|
}) => {
|
|
30378
30406
|
const r = typeof t < "u", { searchTerm: n, replaceTerm: o, showSearchReplacePopover: s, showReplace: i } = zl(
|
|
30379
|
-
|
|
30407
|
+
z5((T) => ({
|
|
30380
30408
|
searchTerm: T.searchTerm,
|
|
30381
30409
|
replaceTerm: T.replaceTerm,
|
|
30382
30410
|
showReplace: T.showReplace,
|
|
@@ -30577,14 +30605,14 @@ const O5 = ({
|
|
|
30577
30605
|
* This source code is licensed under the ISC license.
|
|
30578
30606
|
* See the LICENSE file in the root directory of this source tree.
|
|
30579
30607
|
*/
|
|
30580
|
-
const
|
|
30608
|
+
const j5 = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Em = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
|
|
30581
30609
|
/**
|
|
30582
30610
|
* @license lucide-react v0.475.0 - ISC
|
|
30583
30611
|
*
|
|
30584
30612
|
* This source code is licensed under the ISC license.
|
|
30585
30613
|
* See the LICENSE file in the root directory of this source tree.
|
|
30586
30614
|
*/
|
|
30587
|
-
var
|
|
30615
|
+
var V5 = {
|
|
30588
30616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30589
30617
|
width: 24,
|
|
30590
30618
|
height: 24,
|
|
@@ -30601,7 +30629,7 @@ var M5 = {
|
|
|
30601
30629
|
* This source code is licensed under the ISC license.
|
|
30602
30630
|
* See the LICENSE file in the root directory of this source tree.
|
|
30603
30631
|
*/
|
|
30604
|
-
const
|
|
30632
|
+
const $5 = Qt(
|
|
30605
30633
|
({
|
|
30606
30634
|
color: e = "currentColor",
|
|
30607
30635
|
size: t = 24,
|
|
@@ -30615,7 +30643,7 @@ const F5 = Qt(
|
|
|
30615
30643
|
"svg",
|
|
30616
30644
|
{
|
|
30617
30645
|
ref: c,
|
|
30618
|
-
...
|
|
30646
|
+
...V5,
|
|
30619
30647
|
width: t,
|
|
30620
30648
|
height: t,
|
|
30621
30649
|
stroke: e,
|
|
@@ -30635,12 +30663,12 @@ const F5 = Qt(
|
|
|
30635
30663
|
* This source code is licensed under the ISC license.
|
|
30636
30664
|
* See the LICENSE file in the root directory of this source tree.
|
|
30637
30665
|
*/
|
|
30638
|
-
const
|
|
30666
|
+
const q5 = (e, t) => {
|
|
30639
30667
|
const r = Qt(
|
|
30640
|
-
({ className: n, ...o }, s) => La(
|
|
30668
|
+
({ className: n, ...o }, s) => La($5, {
|
|
30641
30669
|
ref: s,
|
|
30642
30670
|
iconNode: t,
|
|
30643
|
-
className: Em(`lucide-${
|
|
30671
|
+
className: Em(`lucide-${j5(e)}`, n),
|
|
30644
30672
|
...o
|
|
30645
30673
|
})
|
|
30646
30674
|
);
|
|
@@ -30652,7 +30680,7 @@ const U5 = (e, t) => {
|
|
|
30652
30680
|
* This source code is licensed under the ISC license.
|
|
30653
30681
|
* See the LICENSE file in the root directory of this source tree.
|
|
30654
30682
|
*/
|
|
30655
|
-
const
|
|
30683
|
+
const W5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], G5 = q5("ChevronRight", W5), Y5 = ({
|
|
30656
30684
|
customCSS: e
|
|
30657
30685
|
}) => {
|
|
30658
30686
|
const [t, r] = pe(!1), n = e == null ? void 0 : e.trim();
|
|
@@ -30666,7 +30694,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30666
30694
|
className: "w-full flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium color-text-secondary hover:color-bg-default-hover transition-all",
|
|
30667
30695
|
children: [
|
|
30668
30696
|
/* @__PURE__ */ f(
|
|
30669
|
-
|
|
30697
|
+
G5,
|
|
30670
30698
|
{
|
|
30671
30699
|
size: 12,
|
|
30672
30700
|
className: `transition-transform ${t ? "rotate-90" : ""}`
|
|
@@ -30679,7 +30707,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30679
30707
|
),
|
|
30680
30708
|
t && /* @__PURE__ */ f("pre", { className: "m-0 px-3 pb-2 text-[11px] leading-relaxed font-mono color-text-secondary whitespace-pre-wrap break-words max-h-40 overflow-auto select-text", children: n })
|
|
30681
30709
|
] }) : null;
|
|
30682
|
-
},
|
|
30710
|
+
}, X5 = xf(() => import("./markdown-source-pane-CGw52H-P.mjs")), Z5 = xf(() => import("./split-view-toolbar-rXlmeoLe.mjs")), Q5 = ({
|
|
30683
30711
|
markdown: e,
|
|
30684
30712
|
onMarkdownChange: t,
|
|
30685
30713
|
ipfsImageUploadFn: r,
|
|
@@ -30697,20 +30725,20 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30697
30725
|
className: "flex-1 min-w-0 h-full flex flex-col color-bg-default rounded border color-border-default overflow-hidden",
|
|
30698
30726
|
children: [
|
|
30699
30727
|
/* @__PURE__ */ f(jl, { fallback: null, children: /* @__PURE__ */ f(
|
|
30700
|
-
|
|
30728
|
+
Z5,
|
|
30701
30729
|
{
|
|
30702
30730
|
view: i,
|
|
30703
30731
|
ipfsImageUploadFn: r,
|
|
30704
30732
|
onError: n
|
|
30705
30733
|
}
|
|
30706
30734
|
) }),
|
|
30707
|
-
/* @__PURE__ */ f(
|
|
30735
|
+
/* @__PURE__ */ f(Y5, { customCSS: o }),
|
|
30708
30736
|
/* @__PURE__ */ f("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ f(
|
|
30709
30737
|
jl,
|
|
30710
30738
|
{
|
|
30711
30739
|
fallback: /* @__PURE__ */ f("div", { className: "px-4 py-3 text-sm color-text-secondary", children: "Loading editor…" }),
|
|
30712
30740
|
children: /* @__PURE__ */ f(
|
|
30713
|
-
|
|
30741
|
+
X5,
|
|
30714
30742
|
{
|
|
30715
30743
|
value: e,
|
|
30716
30744
|
onChange: t,
|
|
@@ -30728,7 +30756,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30728
30756
|
}, Yd = (e, t) => {
|
|
30729
30757
|
const r = document.createElement("a");
|
|
30730
30758
|
r.href = e, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(e);
|
|
30731
|
-
},
|
|
30759
|
+
}, J5 = ({
|
|
30732
30760
|
editor: e,
|
|
30733
30761
|
onExitSplitView: t,
|
|
30734
30762
|
showTabsPanel: r,
|
|
@@ -30797,7 +30825,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30797
30825
|
) })
|
|
30798
30826
|
] })
|
|
30799
30827
|
] })
|
|
30800
|
-
] }),
|
|
30828
|
+
] }), eD = /^\s*<style>[\s\S]*?<\/style>\s*\n*/i, tD = ({
|
|
30801
30829
|
editor: e,
|
|
30802
30830
|
isSplitView: t,
|
|
30803
30831
|
isPreviewMode: r,
|
|
@@ -30855,7 +30883,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30855
30883
|
embedImages: !1
|
|
30856
30884
|
});
|
|
30857
30885
|
if (!N && typeof A == "string") {
|
|
30858
|
-
const w = cf(A).replace(
|
|
30886
|
+
const w = cf(A).replace(eD, "");
|
|
30859
30887
|
c(w), d.current = !0;
|
|
30860
30888
|
}
|
|
30861
30889
|
} catch (A) {
|
|
@@ -30883,7 +30911,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30883
30911
|
onMarkdownChange: _,
|
|
30884
30912
|
rightScrollRef: h
|
|
30885
30913
|
};
|
|
30886
|
-
},
|
|
30914
|
+
}, nD = ({
|
|
30887
30915
|
defaultRatio: e = 0.5,
|
|
30888
30916
|
min: t = 0.2,
|
|
30889
30917
|
max: r = 0.8
|
|
@@ -30909,7 +30937,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30909
30937
|
var c;
|
|
30910
30938
|
return (c = i.current) == null ? void 0 : c.call(i);
|
|
30911
30939
|
}, []), { containerRef: n, leftRatio: o, onSeparatorMouseDown: a };
|
|
30912
|
-
},
|
|
30940
|
+
}, rD = ({
|
|
30913
30941
|
activeTabId: e,
|
|
30914
30942
|
editor: t,
|
|
30915
30943
|
flushPendingUpdate: r,
|
|
@@ -30939,14 +30967,14 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30939
30967
|
}, oi = /* @__PURE__ */ new Map(), Ns = (e, t) => `${e ?? "ddoc"}::${t}`, Sm = (e) => {
|
|
30940
30968
|
let t = oi.get(e);
|
|
30941
30969
|
return t || (t = { interacted: !1 }, oi.set(e, t)), t;
|
|
30942
|
-
},
|
|
30970
|
+
}, oD = (e) => {
|
|
30943
30971
|
Sm(e).interacted = !0;
|
|
30944
|
-
},
|
|
30972
|
+
}, sD = (e, t) => {
|
|
30945
30973
|
const r = oi.get(e);
|
|
30946
30974
|
return r != null && r.interacted ? (r.cursor = t, !0) : !1;
|
|
30947
|
-
},
|
|
30975
|
+
}, iD = (e, t) => {
|
|
30948
30976
|
Sm(e).scrollTop = t;
|
|
30949
|
-
},
|
|
30977
|
+
}, aD = (e) => oi.get(e), cD = (e) => {
|
|
30950
30978
|
var s;
|
|
30951
30979
|
if (e.isDestroyed) return null;
|
|
30952
30980
|
const { state: t } = e, { anchor: r, head: n } = t.selection, o = qo.getState(t);
|
|
@@ -30976,7 +31004,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30976
31004
|
absHead: n,
|
|
30977
31005
|
docGuid: null
|
|
30978
31006
|
};
|
|
30979
|
-
},
|
|
31007
|
+
}, lD = (e, t) => {
|
|
30980
31008
|
var s;
|
|
30981
31009
|
const r = e.state.doc.content.size, n = (i) => Math.max(0, Math.min(i, r)), o = qo.getState(e.state);
|
|
30982
31010
|
if (t.docGuid && ((s = o == null ? void 0 : o.doc) != null && s.guid) && t.docGuid !== o.doc.guid)
|
|
@@ -30999,7 +31027,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
30999
31027
|
} catch {
|
|
31000
31028
|
}
|
|
31001
31029
|
return { anchor: n(t.absAnchor), head: n(t.absHead) };
|
|
31002
|
-
},
|
|
31030
|
+
}, uD = ({
|
|
31003
31031
|
caretTop: e,
|
|
31004
31032
|
containerTop: t,
|
|
31005
31033
|
containerClientHeight: r,
|
|
@@ -31007,14 +31035,14 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31007
31035
|
}) => Math.max(
|
|
31008
31036
|
0,
|
|
31009
31037
|
n + (e - t) - r / 2
|
|
31010
|
-
),
|
|
31038
|
+
), dD = '[data-editor-scroll-container="true"]', ka = (e) => {
|
|
31011
31039
|
var t, r;
|
|
31012
31040
|
return ((r = (t = e.view) == null ? void 0 : t.dom) == null ? void 0 : r.getAttribute("data-ddoc-editor-inactive")) === "true";
|
|
31013
31041
|
}, Xd = (e) => {
|
|
31014
31042
|
var r;
|
|
31015
31043
|
const t = e && !e.isDestroyed ? (r = e.view) == null ? void 0 : r.dom : null;
|
|
31016
|
-
return t ? Ro({ targetElement: t, editorRoot: t }) : document.querySelector(
|
|
31017
|
-
},
|
|
31044
|
+
return t ? Ro({ targetElement: t, editorRoot: t }) : document.querySelector(dD);
|
|
31045
|
+
}, fD = ({
|
|
31018
31046
|
editor: e,
|
|
31019
31047
|
activeTabId: t,
|
|
31020
31048
|
ddocId: r,
|
|
@@ -31032,13 +31060,13 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31032
31060
|
const l = (p = e.view) == null ? void 0 : p.dom;
|
|
31033
31061
|
if (!l) return;
|
|
31034
31062
|
const d = () => {
|
|
31035
|
-
e.isDestroyed || ka(e) ||
|
|
31063
|
+
e.isDestroyed || ka(e) || oD(
|
|
31036
31064
|
Ns(c.current, a.current)
|
|
31037
31065
|
);
|
|
31038
31066
|
}, h = () => {
|
|
31039
31067
|
if (e.isDestroyed || ka(e)) return;
|
|
31040
|
-
const g =
|
|
31041
|
-
g &&
|
|
31068
|
+
const g = cD(e);
|
|
31069
|
+
g && sD(
|
|
31042
31070
|
Ns(c.current, a.current),
|
|
31043
31071
|
g
|
|
31044
31072
|
);
|
|
@@ -31052,7 +31080,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31052
31080
|
const d = a.current;
|
|
31053
31081
|
if (!i && e && !e.isDestroyed && d && l !== d) {
|
|
31054
31082
|
const h = Xd(e);
|
|
31055
|
-
h &&
|
|
31083
|
+
h && iD(
|
|
31056
31084
|
Ns(c.current, d),
|
|
31057
31085
|
h.scrollTop
|
|
31058
31086
|
);
|
|
@@ -31069,9 +31097,9 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31069
31097
|
return;
|
|
31070
31098
|
}
|
|
31071
31099
|
if (ka(e)) return;
|
|
31072
|
-
const d =
|
|
31100
|
+
const d = aD(Ns(r, t));
|
|
31073
31101
|
if (d != null && d.cursor) {
|
|
31074
|
-
const h =
|
|
31102
|
+
const h = lD(e, d.cursor);
|
|
31075
31103
|
if (h) {
|
|
31076
31104
|
const { anchor: p, head: g } = h, { doc: y, tr: b } = e.state, v = Lo.between(
|
|
31077
31105
|
y.resolve(p),
|
|
@@ -31082,7 +31110,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31082
31110
|
), s || e.commands.focus(null, { scrollIntoView: !1 }), l)
|
|
31083
31111
|
try {
|
|
31084
31112
|
const _ = e.view.coordsAtPos(v.head), N = l.getBoundingClientRect();
|
|
31085
|
-
l.scrollTop =
|
|
31113
|
+
l.scrollTop = uD({
|
|
31086
31114
|
caretTop: _.top,
|
|
31087
31115
|
containerTop: N.top,
|
|
31088
31116
|
containerClientHeight: l.clientHeight,
|
|
@@ -31099,7 +31127,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31099
31127
|
}
|
|
31100
31128
|
l && (l.scrollTop = 0);
|
|
31101
31129
|
}, [t, e]), { switchTab: u };
|
|
31102
|
-
}, Ta = (e) => !!(e != null && e.enabled && (e.connection.livePresence ?? !0)),
|
|
31130
|
+
}, Ta = (e) => !!(e != null && e.enabled && (e.connection.livePresence ?? !0)), FD = Qt(
|
|
31103
31131
|
({
|
|
31104
31132
|
isPreviewMode: e = !1,
|
|
31105
31133
|
viewerMode: t,
|
|
@@ -31171,7 +31199,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31171
31199
|
onResolveComment: J,
|
|
31172
31200
|
onUnresolveComment: oe,
|
|
31173
31201
|
onDeleteComment: se,
|
|
31174
|
-
onDeleteReply:
|
|
31202
|
+
onDeleteReply: he,
|
|
31175
31203
|
theme: Te,
|
|
31176
31204
|
showTOC: Oe,
|
|
31177
31205
|
setShowTOC: Re,
|
|
@@ -31200,7 +31228,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31200
31228
|
...Hn
|
|
31201
31229
|
}, un) => {
|
|
31202
31230
|
var Ol, Ll;
|
|
31203
|
-
const { isFocusMode: Ve, toggleFocusMode: dn } =
|
|
31231
|
+
const { isFocusMode: Ve, toggleFocusMode: dn } = IS({
|
|
31204
31232
|
isFocusMode: B,
|
|
31205
31233
|
onFocusModeChange: G,
|
|
31206
31234
|
onFocusMode: (xe) => {
|
|
@@ -31332,7 +31360,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31332
31360
|
[mn, lr]
|
|
31333
31361
|
), Fm = ee(
|
|
31334
31362
|
(xe) => {
|
|
31335
|
-
!ve || ve.isDestroyed || !mn ||
|
|
31363
|
+
!ve || ve.isDestroyed || !mn || rD({
|
|
31336
31364
|
activeTabId: mn,
|
|
31337
31365
|
editor: ve,
|
|
31338
31366
|
flushPendingUpdate: Cl,
|
|
@@ -31341,7 +31369,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31341
31369
|
});
|
|
31342
31370
|
},
|
|
31343
31371
|
[mn, ve, Cl, pn]
|
|
31344
|
-
), { switchTab: Li } =
|
|
31372
|
+
), { switchTab: Li } = fD({
|
|
31345
31373
|
editor: ve,
|
|
31346
31374
|
activeTabId: mn,
|
|
31347
31375
|
ddocId: R,
|
|
@@ -31360,11 +31388,11 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31360
31388
|
containerRef: Pm,
|
|
31361
31389
|
leftRatio: Fi,
|
|
31362
31390
|
onSeparatorMouseDown: Hm
|
|
31363
|
-
} =
|
|
31391
|
+
} = nD(), [El, zm] = pe(!1), {
|
|
31364
31392
|
markdown: Km,
|
|
31365
31393
|
onMarkdownChange: jm,
|
|
31366
31394
|
rightScrollRef: Vm
|
|
31367
|
-
} =
|
|
31395
|
+
} = tD({
|
|
31368
31396
|
editor: ve,
|
|
31369
31397
|
isSplitView: lt,
|
|
31370
31398
|
isPreviewMode: e,
|
|
@@ -31525,7 +31553,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31525
31553
|
},
|
|
31526
31554
|
[]
|
|
31527
31555
|
), Zm = (xe) => {
|
|
31528
|
-
!Ve || !ve || xe.button !== 0 ||
|
|
31556
|
+
!Ve || !ve || xe.button !== 0 || OS(
|
|
31529
31557
|
xe.target,
|
|
31530
31558
|
us.current
|
|
31531
31559
|
) && (xe.preventDefault(), ve.commands.focus("end", { scrollIntoView: !1 }));
|
|
@@ -31589,7 +31617,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31589
31617
|
}
|
|
31590
31618
|
), Jm = () => /* @__PURE__ */ f(Yo, { children: /* @__PURE__ */ U(Bt, { children: [
|
|
31591
31619
|
Ve && /* @__PURE__ */ f(
|
|
31592
|
-
|
|
31620
|
+
LS,
|
|
31593
31621
|
{
|
|
31594
31622
|
dropdownOpen: Ot,
|
|
31595
31623
|
setDropdownOpen: fn,
|
|
@@ -31602,7 +31630,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31602
31630
|
),
|
|
31603
31631
|
!lt && Qm,
|
|
31604
31632
|
(e || lt) && ve && /* @__PURE__ */ f(
|
|
31605
|
-
|
|
31633
|
+
RS,
|
|
31606
31634
|
{
|
|
31607
31635
|
editor: ve,
|
|
31608
31636
|
ydoc: pn,
|
|
@@ -31625,7 +31653,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31625
31653
|
}
|
|
31626
31654
|
),
|
|
31627
31655
|
$ && ve && /* @__PURE__ */ f(
|
|
31628
|
-
|
|
31656
|
+
n6,
|
|
31629
31657
|
{
|
|
31630
31658
|
editor: ve,
|
|
31631
31659
|
onClose: qm,
|
|
@@ -31837,8 +31865,8 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
31837
31865
|
isCollabDocOwner: n != null && n.enabled ? n.connection.isOwner : !0
|
|
31838
31866
|
}
|
|
31839
31867
|
),
|
|
31840
|
-
/* @__PURE__ */ f(
|
|
31841
|
-
/* @__PURE__ */ f(
|
|
31868
|
+
/* @__PURE__ */ f(TS, { editor: ve }),
|
|
31869
|
+
/* @__PURE__ */ f(_S, { editor: ve })
|
|
31842
31870
|
] }),
|
|
31843
31871
|
ve && /* @__PURE__ */ f(
|
|
31844
31872
|
cx,
|
|
@@ -32017,7 +32045,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32017
32045
|
}
|
|
32018
32046
|
),
|
|
32019
32047
|
ve && !Ve && /* @__PURE__ */ f("div", { className: "comment-floating-slot absolute left-full top-0 ml-[12px] overflow-visible", children: /* @__PURE__ */ f(
|
|
32020
|
-
|
|
32048
|
+
aS,
|
|
32021
32049
|
{
|
|
32022
32050
|
editor: ve,
|
|
32023
32051
|
editorWrapperRef: Be,
|
|
@@ -32104,7 +32132,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32104
32132
|
}
|
|
32105
32133
|
),
|
|
32106
32134
|
ve && /* @__PURE__ */ f(
|
|
32107
|
-
|
|
32135
|
+
E6,
|
|
32108
32136
|
{
|
|
32109
32137
|
isOpen: Ue,
|
|
32110
32138
|
onClose: () => Ee == null ? void 0 : Ee(!1),
|
|
@@ -32118,7 +32146,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32118
32146
|
}
|
|
32119
32147
|
),
|
|
32120
32148
|
/* @__PURE__ */ f("div", { children: ve && qe && !Ve && /* @__PURE__ */ f(
|
|
32121
|
-
|
|
32149
|
+
S6,
|
|
32122
32150
|
{
|
|
32123
32151
|
editor: ve,
|
|
32124
32152
|
activeCommentId: jn,
|
|
@@ -32171,7 +32199,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32171
32199
|
),
|
|
32172
32200
|
style: Ve ? void 0 : ss(),
|
|
32173
32201
|
children: [
|
|
32174
|
-
/* @__PURE__ */ f(
|
|
32202
|
+
/* @__PURE__ */ f(K5, { editor: ve, viewerMode: t }),
|
|
32175
32203
|
/* @__PURE__ */ U(
|
|
32176
32204
|
fy,
|
|
32177
32205
|
{
|
|
@@ -32194,7 +32222,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32194
32222
|
onResolveComment: J,
|
|
32195
32223
|
onUnresolveComment: oe,
|
|
32196
32224
|
onDeleteComment: se,
|
|
32197
|
-
onDeleteReply:
|
|
32225
|
+
onDeleteReply: he,
|
|
32198
32226
|
ensResolutionUrl: g,
|
|
32199
32227
|
isConnected: je,
|
|
32200
32228
|
connectViaWallet: Ct,
|
|
@@ -32240,7 +32268,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32240
32268
|
),
|
|
32241
32269
|
children: [
|
|
32242
32270
|
ve && lt && /* @__PURE__ */ f(
|
|
32243
|
-
|
|
32271
|
+
Q5,
|
|
32244
32272
|
{
|
|
32245
32273
|
markdown: Km,
|
|
32246
32274
|
onMarkdownChange: jm,
|
|
@@ -32272,7 +32300,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32272
32300
|
),
|
|
32273
32301
|
children: [
|
|
32274
32302
|
ve && lt && /* @__PURE__ */ f(
|
|
32275
|
-
|
|
32303
|
+
J5,
|
|
32276
32304
|
{
|
|
32277
32305
|
editor: ve,
|
|
32278
32306
|
onExitSplitView: () => V == null ? void 0 : V(!1),
|
|
@@ -32346,7 +32374,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32346
32374
|
}
|
|
32347
32375
|
);
|
|
32348
32376
|
}
|
|
32349
|
-
),
|
|
32377
|
+
), hD = Qt(
|
|
32350
32378
|
({
|
|
32351
32379
|
isPreviewMode: e = !1,
|
|
32352
32380
|
initialContent: t,
|
|
@@ -32598,19 +32626,19 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32598
32626
|
)
|
|
32599
32627
|
] });
|
|
32600
32628
|
}
|
|
32601
|
-
),
|
|
32629
|
+
), UD = Qt(
|
|
32602
32630
|
(e, t) => {
|
|
32603
32631
|
var s, i;
|
|
32604
32632
|
const r = !!((s = e.versionHistoryState) != null && s.enabled), n = ((i = e.versionHistoryState) == null ? void 0 : i.versionId) || "default", o = r ? n : "default";
|
|
32605
|
-
return /* @__PURE__ */ f(
|
|
32633
|
+
return /* @__PURE__ */ f(hD, { ...e, ref: t }, o);
|
|
32606
32634
|
}
|
|
32607
|
-
),
|
|
32635
|
+
), pD = [
|
|
32608
32636
|
"pdf",
|
|
32609
32637
|
"md",
|
|
32610
32638
|
"html",
|
|
32611
32639
|
"txt",
|
|
32612
32640
|
"odt"
|
|
32613
|
-
],
|
|
32641
|
+
], mD = (e) => e !== void 0 && pD.includes(e), PD = (e) => {
|
|
32614
32642
|
const t = ie(null), r = ie(!1), [n, o] = pe(null), [s, i] = pe(!1), a = hy(e), { getEditor: c, setContent: u } = a, l = ee(
|
|
32615
32643
|
(D, S) => {
|
|
32616
32644
|
D && !D.isDestroyed && D.destroy(), S && !S.isDestroyed && S.destroy();
|
|
@@ -32792,7 +32820,7 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32792
32820
|
tabs: L,
|
|
32793
32821
|
activeTabId: R,
|
|
32794
32822
|
exportName: K,
|
|
32795
|
-
initialFormat:
|
|
32823
|
+
initialFormat: mD(D.initialFormat) ? D.initialFormat : "pdf"
|
|
32796
32824
|
};
|
|
32797
32825
|
d(X), i(!0);
|
|
32798
32826
|
} catch (L) {
|
|
@@ -32845,18 +32873,18 @@ const P5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], H5 = U5("ChevronRi
|
|
|
32845
32873
|
exportModalProps: x
|
|
32846
32874
|
};
|
|
32847
32875
|
}, pl = { type: "doc", content: [] };
|
|
32848
|
-
function
|
|
32876
|
+
function gD(e) {
|
|
32849
32877
|
return e && typeof e == "object" && e.type === "doc" && Array.isArray(e.content) ? e : pl;
|
|
32850
32878
|
}
|
|
32851
32879
|
function Na(e, t) {
|
|
32852
32880
|
try {
|
|
32853
32881
|
const r = fx(e, t);
|
|
32854
|
-
return
|
|
32882
|
+
return gD(r);
|
|
32855
32883
|
} catch {
|
|
32856
32884
|
return pl;
|
|
32857
32885
|
}
|
|
32858
32886
|
}
|
|
32859
|
-
function
|
|
32887
|
+
function HD(e) {
|
|
32860
32888
|
var r;
|
|
32861
32889
|
const t = new at.Doc();
|
|
32862
32890
|
try {
|
|
@@ -32899,7 +32927,7 @@ function ID(e) {
|
|
|
32899
32927
|
t.isDestroyed || t.destroy();
|
|
32900
32928
|
}
|
|
32901
32929
|
}
|
|
32902
|
-
const
|
|
32930
|
+
const zD = (e, t, r = "ecies") => bn.encryptData(Lt(e), t, r), KD = (e, t) => bn.decryptData(Lt(e), t);
|
|
32903
32931
|
function Dm(e, t, r, n) {
|
|
32904
32932
|
return {
|
|
32905
32933
|
wsUrl: e.wsUrl,
|
|
@@ -32947,7 +32975,7 @@ function Am(e) {
|
|
|
32947
32975
|
});
|
|
32948
32976
|
});
|
|
32949
32977
|
}
|
|
32950
|
-
async function
|
|
32978
|
+
async function jD(e) {
|
|
32951
32979
|
const t = new fl(
|
|
32952
32980
|
Dm(e.ownerAuth, e.roomKey, e.ddocId, !0)
|
|
32953
32981
|
);
|
|
@@ -32974,7 +33002,7 @@ async function LD(e) {
|
|
|
32974
33002
|
t.disconnect();
|
|
32975
33003
|
}
|
|
32976
33004
|
}
|
|
32977
|
-
async function
|
|
33005
|
+
async function VD(e) {
|
|
32978
33006
|
const t = new fl(
|
|
32979
33007
|
Dm(
|
|
32980
33008
|
e.ownerAuth,
|
|
@@ -32997,23 +33025,23 @@ async function MD(e) {
|
|
|
32997
33025
|
}
|
|
32998
33026
|
}
|
|
32999
33027
|
export {
|
|
33000
|
-
|
|
33028
|
+
FD as DdocEditor,
|
|
33001
33029
|
lx as DdocExportModal,
|
|
33002
33030
|
hf as Editor,
|
|
33003
|
-
|
|
33004
|
-
|
|
33031
|
+
KS as FANFIC_TEMPLATE,
|
|
33032
|
+
UD as PreviewDdocEditor,
|
|
33005
33033
|
wE as WIRE_TAG,
|
|
33006
|
-
|
|
33007
|
-
|
|
33008
|
-
|
|
33009
|
-
|
|
33034
|
+
HD as buildVersionDiffSnapshot,
|
|
33035
|
+
KD as decryptForRoomKey,
|
|
33036
|
+
zD as encryptForRoomKey,
|
|
33037
|
+
jD as fetchSessionState,
|
|
33010
33038
|
Ec as handleContentPrint,
|
|
33011
33039
|
fc as isXChaChaCipher,
|
|
33012
33040
|
dy as mergeTabAwareYjsUpdates,
|
|
33013
33041
|
uy as sanitizeCustomCss,
|
|
33014
|
-
|
|
33015
|
-
|
|
33016
|
-
|
|
33042
|
+
VD as seedSession,
|
|
33043
|
+
WD as useEditorCommands,
|
|
33044
|
+
PD as useExportHeadlessEditorContent,
|
|
33017
33045
|
hy as useHeadlessEditor,
|
|
33018
|
-
|
|
33046
|
+
GD as validateCustomCss
|
|
33019
33047
|
};
|